arch/risc-v/src/fe310: Branch to up_sigdeliver() with interrupts disabled
When executing an MRET instruction, MIE is set to MPIE. In order to branch to up_sigdeliver() with interrupts disabled, we need to change MPIE, not MIE.
This commit is contained in:
parent
0e98dc306b
commit
2adec1f366
@ -155,7 +155,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||
g_current_regs[REG_EPC] = (uint32_t)up_sigdeliver;
|
||||
|
||||
int_ctx = g_current_regs[REG_INT_CTX];
|
||||
int_ctx &= ~MSTATUS_MIE;
|
||||
int_ctx &= ~MSTATUS_MPIE;
|
||||
|
||||
g_current_regs[REG_INT_CTX] = int_ctx;
|
||||
|
||||
@ -195,7 +195,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||
tcb->xcp.regs[REG_EPC] = (uint32_t)up_sigdeliver;
|
||||
|
||||
int_ctx = tcb->xcp.regs[REG_INT_CTX];
|
||||
int_ctx &= ~MSTATUS_MIE;
|
||||
int_ctx &= ~MSTATUS_MPIE;
|
||||
|
||||
tcb->xcp.regs[REG_INT_CTX] = int_ctx;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user