From 492d9b153d00ec2fc2fec89ded42e71df52e27aa Mon Sep 17 00:00:00 2001 From: Inochi Amaoto Date: Sat, 7 Oct 2023 11:06:30 +0800 Subject: 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 Reviewed-by: Anup Patel --- platform/generic/include/thead/c9xx_errata.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 platform/generic/include/thead/c9xx_errata.h (limited to 'platform/generic/include') diff --git a/platform/generic/include/thead/c9xx_errata.h b/platform/generic/include/thead/c9xx_errata.h new file mode 100644 index 00000000..bf979384 --- /dev/null +++ b/platform/generic/include/thead/c9xx_errata.h @@ -0,0 +1,13 @@ + +#ifndef __RISCV_THEAD_C9XX_ERRATA_H____ +#define __RISCV_THEAD_C9XX_ERRATA_H____ + +/** + * T-HEAD board with this quirk need to execute sfence.vma to flush + * stale entrie avoid incorrect memory access. + */ +#define THEAD_QUIRK_ERRATA_TLB_FLUSH BIT(0) + +void thead_register_tlb_flush_trap_handler(void); + +#endif // __RISCV_THEAD_C9XX_ERRATA_H____ -- cgit v1.3.1