You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After setting mstatus.MIE in the timerinit() function in start.c, it seems that there is no situation between when mstatus.MIE is set and asm volatile("mret") where global interrupts needing to be used in M-mode are required.
And after mret enters S-mode, mstatus.MIE will be replaced by mstatus.MPIE, which is 0. Additionally, due to the design of RISC-V, in lower privilege levels, regardless of the value of mstatus.MIE, interrupts in M-mode are always enabled.
I am curious if there is any special consideration for setting mstatus.MIE in this case?
The text was updated successfully, but these errors were encountered:
After setting
mstatus.MIE
in thetimerinit()
function instart.c
, it seems that there is no situation between whenmstatus.MIE
is set andasm volatile("mret")
where global interrupts needing to be used in M-mode are required.And after
mret
enters S-mode,mstatus.MIE
will be replaced bymstatus.MPIE
, which is 0. Additionally, due to the design of RISC-V, in lower privilege levels, regardless of the value ofmstatus.MIE
, interrupts in M-mode are always enabled.I am curious if there is any special consideration for setting
mstatus.MIE
in this case?The text was updated successfully, but these errors were encountered: