platform: generic: sophgo: add mango soc support
The mango cpu of sophgo is a 64 cores C920 CPU. The board with mango can have at most two sockets. The CPU have the following features: 1) support RV64GCV 2) one seperate timer each cluster 3) T-HEAD pmu device Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
This commit is contained in:
committed by
xingxg2022
parent
c6a092cd80
commit
35fb234d39
@@ -274,6 +274,10 @@ struct sbi_trap_regs *sbi_trap_handler(struct sbi_trap_regs *regs)
|
||||
}
|
||||
|
||||
if (mcause & (1UL << (__riscv_xlen - 1))) {
|
||||
if (misa_extension('S')) {
|
||||
__asm__ __volatile__("sfence.vma");
|
||||
}
|
||||
|
||||
if (sbi_hart_has_extension(sbi_scratch_thishart_ptr(),
|
||||
SBI_HART_EXT_SMAIA))
|
||||
rc = sbi_trap_aia_irq(regs, mcause);
|
||||
@@ -318,6 +322,10 @@ struct sbi_trap_regs *sbi_trap_handler(struct sbi_trap_regs *regs)
|
||||
trap.tinst = mtinst;
|
||||
trap.gva = sbi_regs_gva(regs);
|
||||
|
||||
if (misa_extension('S')) {
|
||||
__asm__ __volatile__("sfence.vma");
|
||||
}
|
||||
|
||||
rc = sbi_trap_redirect(regs, &trap);
|
||||
break;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user