kuznia-rdzeni / coreblocks

RISC-V out-of-order core for education and research purposes
https://kuznia-rdzeni.github.io/coreblocks/
BSD 3-Clause "New" or "Revised" License
38 stars 16 forks source link

Fix WFI resume on mstatus.MIE disabled #735

Closed piotro888 closed 1 month ago

piotro888 commented 1 month ago

Depends on #729 (see last commit for diff)

WFI should continue to next instruction if interrupt is pending and unmasked via mie, but global interrupt enable mstatus.MIE bit is disabled. [Priv spec 3.3.3]

Previously it only triggers interrupt handler when mstatus.MIE is set, and waits otherwise.

piotro888 commented 1 month ago

rebased