Re: Question about supervisor interrupt in M mode


Allen Baum
 

I think (and will be corrected if wrong) that the sentence should be interpreted as
When xIE=0, Interrupts for lower-privilege modes, w<x are always globally disabled regardless of the setting of any global wIE bit for the lower-privilege mode."


On Tue, Nov 29, 2022 at 3:50 AM Oscar Jupp <jupposcar@...> wrote:
Dear architect, 
Priv spec section 3.1.6.1 write: 
When a hart is executing in privilege mode x, interrupts are globally enabled when xIE=1 and globally disabled when xIE=0. Interrupts for lower-privilege modes, w<x are always globally disabled regardless of the setting of any global wIE bit for the lower-privilege mode."

So I think when a hart is executing in M mode, supervisor timer interrupt is disabled.

However, Priv spec section 3.1.8 write: 
For example, if the supervisor timer interrupt (STI) is delegated to S-mode by setting mideleg[5], STIs  will not be taken when executing in M-mode. By contrast, if mideleg[5] is clear, STIs can be taken  in any mode and regardless of current mode will transfer control to M-mode.

Is it contradictory.

Regards,
Oscar Jupp


Join {tech-privileged@lists.riscv.org to automatically receive all group messages.