How to diable supervisor-interrupt on user-mode?


#1

I want to disable supervisor-interrupt on user-mode. (no implement user-interrput spec)

riscv-privileged manual written,
“Interrupts for higher-privilege modes, y>x, are always globally enabled regardless of the setting of the higherprivilege mode’s global y IE bit.”

How to diable supervisor-interrupt on user-mode?


(Bobo) #2

Excuse me, do you know how to generate the timer interrupts or software interrupts in the Supervisor mode? The interrupt of the Supervisor mode needs to set the delegate register, set the corresponding pending bit, and finally execute the “mret” instruction, but I made an error when testing.Any suggestions?:rofl:


#3

Sorry, I mistake.

Not supervisor-mode-interrupt, but machine-mode-interrupt.
When replaced,
" How to diable machine-mode-interrupt on user-mode?"


(Bobo) #4

I think it is possible to set the interrupt disable in the machine mode, and then enter the user mode. In the User mode, setting the config of machine register will have permission conflicts.


#5

riscv-privileged manual written,

Privilege and Global Interrupt-Enable Stack in mstatus register
Interrupts for higher-privilege modes, y>x, are always globally enabled regardless of the setting of the higherprivilege mode’s global y IE bit.

It meen that,
When running user-mode, not disable machine-mode-interrput by mstatus/MIE bit.

Really?