lib: sbi_trap: Workaroud for cpu still using i-utlb when into m mode

This commit is contained in:
xiaoguang.xing
2023-04-04 17:17:46 +08:00
parent 0e87f899c3
commit be6e558f66
2 changed files with 2 additions and 4 deletions

View File

@@ -757,6 +757,8 @@ memcmp:
.globl _trap_handler
.globl _trap_exit
_trap_handler:
sfence.vma
TRAP_SAVE_AND_SETUP_SP_T0
TRAP_SAVE_MEPC_MSTATUS 0

View File

@@ -268,10 +268,6 @@ struct sbi_trap_regs *sbi_trap_handler(struct sbi_trap_regs *regs)
ulong mtval = csr_read(CSR_MTVAL), mtval2 = 0, mtinst = 0;
struct sbi_trap_info trap;
if (misa_extension('S')) {
__asm__ __volatile__("sfence.vma");
}
if (misa_extension('H')) {
mtval2 = csr_read(CSR_MTVAL2);
mtinst = csr_read(CSR_MTINST);