platform: generic: thead: separate implement of T-HEAD c9xx errata

Separate the implement of T-HEAD c9xx errata to allow any platform
with bug related to c9xx cores can use it.

Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
Inochi Amaoto
2023-10-07 11:06:30 +08:00
committed by Anup Patel
parent 8e941e7fe3
commit 492d9b153d
7 changed files with 49 additions and 18 deletions

View File

@@ -0,0 +1,17 @@
/*
* SPDX-License-Identifier: BSD-2-Clause
*
* Authors:
* Inochi Amaoto <inochiama@outlook.com>
*
*/
#include <sbi/riscv_encoding.h>
#include <sbi/riscv_asm.h>
void _thead_tlb_flush_fixup_trap_handler(void);
void thead_register_tlb_flush_trap_handler(void)
{
csr_write(CSR_MTVEC, &_thead_tlb_flush_fixup_trap_handler);
}