Skip to content

Commit

Permalink
target/riscv: Update the ePMP CSR address
Browse files Browse the repository at this point in the history
Update the ePMP CSRs to match the 0.9.3 ePMP spec
https://github.com/riscv/riscv-tee/blob/61455747230a26002d741f64879dd78cc9689323/Smepmp/Smepmp.pdf

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Message-id: 28c908de60b9b04fa20e63d113885c98586053f3.1630543194.git.alistair.francis@wdc.com
  • Loading branch information
alistair23 committed Sep 16, 2021
1 parent d1fe593 commit 23e6071
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions target/riscv/cpu.c
Expand Up @@ -599,6 +599,7 @@ static Property riscv_cpu_properties[] = {
DEFINE_PROP_UINT16("elen", RISCVCPU, cfg.elen, 64),
DEFINE_PROP_BOOL("mmu", RISCVCPU, cfg.mmu, true),
DEFINE_PROP_BOOL("pmp", RISCVCPU, cfg.pmp, true),
/* ePMP 0.9.3 */
DEFINE_PROP_BOOL("x-epmp", RISCVCPU, cfg.epmp, false),

DEFINE_PROP_UINT64("resetvec", RISCVCPU, cfg.resetvec, DEFAULT_RSTVEC),
Expand Down
4 changes: 2 additions & 2 deletions target/riscv/cpu_bits.h
Expand Up @@ -210,8 +210,8 @@
#define CSR_MTVAL2 0x34b

/* Enhanced Physical Memory Protection (ePMP) */
#define CSR_MSECCFG 0x390
#define CSR_MSECCFGH 0x391
#define CSR_MSECCFG 0x747
#define CSR_MSECCFGH 0x757
/* Physical Memory Protection */
#define CSR_PMPCFG0 0x3a0
#define CSR_PMPCFG1 0x3a1
Expand Down

0 comments on commit 23e6071

Please sign in to comment.