mirror of
https://github.com/lowRISC/ibex.git
synced 2025-04-22 12:57:13 -04:00
[rtl] Clear mprv on mret to non M-mode
This is specification change between the v1.11 and v1.12 privileged architectures. Previously mprv wasn't altered on mret. Now if returning to a privilege level other than M mode mprv must be cleared.
This commit is contained in:
parent
1d0344eb89
commit
423264ce5f
1 changed files with 4 additions and 0 deletions
|
@ -763,6 +763,10 @@ module ibex_cs_registers #(
|
|||
mstatus_en = 1'b1;
|
||||
mstatus_d.mie = mstatus_q.mpie; // re-enable interrupts
|
||||
|
||||
if (mstatus_q.mpp != PRIV_LVL_M) begin
|
||||
mstatus_d.mprv = 1'b0;
|
||||
end
|
||||
|
||||
// SEC_CM: EXCEPTION.CTRL_FLOW.LOCAL_ESC
|
||||
// SEC_CM: EXCEPTION.CTRL_FLOW.GLOBAL_ESC
|
||||
cpuctrl_we = 1'b1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue