]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/riscv: pmp: Clear pmp/smepmp bits on reset
authorMayuresh Chitale <mchitale@ventanamicro.com>
Thu, 19 Oct 2023 06:56:44 +0000 (12:26 +0530)
committerAlistair Francis <alistair.francis@wdc.com>
Tue, 7 Nov 2023 01:06:02 +0000 (11:06 +1000)
commit4bf501dc0118a28699e28c01acb34e28ddeb0acc
treee202e71dfd7cfa5e73efcc35fffc6420acf2932a
parent095fe72a128b34d4f9317c2798c6fa7762a9e3e6
target/riscv: pmp: Clear pmp/smepmp bits on reset

As per the Priv and Smepmp specifications, certain bits such as the 'L'
bit of pmp entries and mseccfg.MML can only be cleared upon reset and it
is necessary to do so to allow 'M' mode firmware to correctly reinitialize
the pmp/smpemp state across reboots. As required by the spec, also clear
the 'A' field of pmp entries.

Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20231019065644.1431798-1-mchitale@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
target/riscv/cpu.c
target/riscv/pmp.c
target/riscv/pmp.h