进入中断,硬件自动禁用中断,出中断,自动开启中断,无需手动操作,删除对应的代码
This commit is contained in:
@@ -128,15 +128,19 @@ trap_entry:
|
||||
sw t6,124(sp)
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
csrr t0, mstatus # 读取 mstatus 寄存器
|
||||
andi t0, t0, ~(1 << 3) # 清除 MIE 位 (全局中断禁用)
|
||||
csrw mstatus, t0 # 写回 mstatus 寄存器
|
||||
#endif
|
||||
|
||||
call plic_handle
|
||||
|
||||
#if 0
|
||||
csrr t0, mstatus
|
||||
ori t0, t0, 1<<3
|
||||
csrw mstatus, t0
|
||||
#endif
|
||||
|
||||
lw ra,4(sp)
|
||||
lw sp,8(sp)
|
||||
@@ -219,9 +223,11 @@ opt_trap_entry:
|
||||
#sw t5,120(sp)
|
||||
#sw t6,124(sp)
|
||||
|
||||
#if 0
|
||||
csrr t0, mstatus # 读取 mstatus 寄存器
|
||||
andi t0, t0, ~(1 << 3) # 清除 MIE 位 (全局中断禁用)
|
||||
csrw mstatus, t0 # 写回 mstatus 寄存器
|
||||
#endif
|
||||
|
||||
lui t1, %hi(plic_claim)
|
||||
lw t0, %lo(plic_claim)(t1) # t0 = &plic_claim
|
||||
@@ -264,9 +270,11 @@ opt_trap_entry:
|
||||
sw s1,%lo(flag_intRxEnd)(s0)
|
||||
|
||||
4:
|
||||
#if 0
|
||||
csrr t0, mstatus
|
||||
ori t0, t0, 1<<3
|
||||
csrw mstatus, t0
|
||||
#endif
|
||||
|
||||
#lw ra,4(sp)
|
||||
#lw sp,8(sp)
|
||||
|
||||
Reference in New Issue
Block a user