mirror of
https://github.com/revyos/thead-opensbi.git
synced 2026-06-21 09:12:28 +02:00
Linux_SDK_V1.2.0
This commit is contained in:
@@ -713,6 +713,7 @@ fw_platform_init:
|
||||
.globl _trap_handler
|
||||
.globl _trap_exit
|
||||
_trap_handler:
|
||||
sfence.vma zero, t0
|
||||
TRAP_SAVE_AND_SETUP_SP_T0
|
||||
|
||||
TRAP_SAVE_MEPC_MSTATUS 0
|
||||
|
||||
@@ -225,6 +225,15 @@ struct sbi_trap_regs *sbi_trap_handler(struct sbi_trap_regs *regs)
|
||||
|
||||
if (mcause & (1UL << (__riscv_xlen - 1))) {
|
||||
mcause &= ~(1UL << (__riscv_xlen - 1));
|
||||
|
||||
/*
|
||||
* DCACHE.CALL:
|
||||
* | 31 - 25 | 24 - 20 | 19 - 15 | 14 - 12 | 11 - 7 | 6 - 0 |
|
||||
* 0000000 00001 00000 000 00000 0001011
|
||||
*/
|
||||
if ((regs->mepc & 0x7f) == 4)
|
||||
asm volatile(".long 0x0010000b\n");
|
||||
|
||||
switch (mcause) {
|
||||
case IRQ_M_TIMER:
|
||||
sbi_timer_process();
|
||||
|
||||
Reference in New Issue
Block a user