target/riscv: Add Zicfilp support for Smrnmi
authorFrank Chang <frank.chang@sifive.com>
Mon, 6 Jan 2025 05:43:36 +0000 (13:43 +0800)
committerAlistair Francis <alistair.francis@wdc.com>
Sat, 18 Jan 2025 23:44:35 +0000 (09:44 +1000)
commit0266fd8b56a4de8180cda9b2064ed2e58d17b3d9
tree8028b8491cb0617b6bb095862be744456ac91c3d
parentf9653d4eb2ccaf6fe140e38fb1027a9e829d4062
target/riscv: Add Zicfilp support for Smrnmi

Zicfilp extension introduces the MNPELP (bit 9) in mnstatus.
The MNPELP field holds the previous ELP.

When a RNMI trap is delivered, the MNPELP is set to ELP and ELP set
to NO_LP_EXPECTED. Upon a mnret, if the mnstatus.MNPP holds the
value y, then ELP is set to the value of MNPELP if yLPE is 1;
otherwise, it is set to NO_LP_EXPECTED.

Signed-off-by: Frank Chang <frank.chang@sifive.com>
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20250106054336.1878291-7-frank.chang@sifive.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
target/riscv/cpu_bits.h
target/riscv/cpu_helper.c
target/riscv/op_helper.c