riscv-isa-sim icon indicating copy to clipboard operation
riscv-isa-sim copied to clipboard

add hlvx pmp protect to fix issue 1557

Open xinyuwang-starfive opened this issue 10 months ago • 3 comments

for fix issue #1557, add hlvx check x check for pmp

xinyuwang-starfive avatar Apr 10 '24 09:04 xinyuwang-starfive

i fix it,now i think it's r && x

xinyuwang-starfive avatar Apr 11 '24 02:04 xinyuwang-starfive

use a space before , now and rebase into one fix

xinyuwang-starfive avatar Apr 11 '24 06:04 xinyuwang-starfive

const bool normal_rwx = ((typer && cfgr) && (!hlvx || cfgx)) || (typew && cfgw) || (typex && cfgx); I think hlvx is typer. if hlvx is low , the logic is same with old, and if hlvx is high, it need cfgx is high . if PMP not have the X ,the cfgx ||!hlvx is 0 and the normal_rwx will be 0 and go to access fault. and i run a small case which only have R to test it .

xinyuwang-starfive avatar Apr 12 '24 07:04 xinyuwang-starfive

Can you squash those commits into one commit? Then I think this is ready to go.

aswaterman avatar Apr 24 '24 17:04 aswaterman

Can you squash those commits into one commit? Then I think this is ready to go.

i do it

xinyuwang-starfive avatar Apr 26 '24 06:04 xinyuwang-starfive