aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--benchmarks/pmp/pmp.c6
-rw-r--r--debug/programs/mprv.S6
m---------env10
-rw-r--r--isa/rv32si/dirty.S4
-rw-r--r--isa/rv64si/dirty.S2
5 files changed, 14 insertions, 14 deletions
diff --git a/benchmarks/pmp/pmp.c b/benchmarks/pmp/pmp.c
index c263cfd..195a575 100644
--- a/benchmarks/pmp/pmp.c
+++ b/benchmarks/pmp/pmp.c
@@ -38,12 +38,12 @@ static void init_pt()
l3pt[SCRATCH / RISCV_PGSIZE] = ((uintptr_t)scratch >> RISCV_PGSHIFT << PTE_PPN_SHIFT) | PTE_A | PTE_D | PTE_V | PTE_R | PTE_W;
#if __riscv_xlen == 64
l2pt[0] = ((uintptr_t)l3pt >> RISCV_PGSHIFT << PTE_PPN_SHIFT) | PTE_V;
- uintptr_t vm_choice = SPTBR_MODE_SV39;
+ uintptr_t vm_choice = SATP_MODE_SV39;
#else
- uintptr_t vm_choice = SPTBR_MODE_SV32;
+ uintptr_t vm_choice = SATP_MODE_SV32;
#endif
write_csr(sptbr, ((uintptr_t)l1pt >> RISCV_PGSHIFT) |
- (vm_choice * (SPTBR_MODE & ~(SPTBR_MODE<<1))));
+ (vm_choice * (SATP_MODE & ~(SATP_MODE<<1))));
write_csr(pmpcfg0, (PMP_NAPOT | PMP_R) << 16);
write_csr(pmpaddr2, -1);
}
diff --git a/debug/programs/mprv.S b/debug/programs/mprv.S
index a17852a..8ec261e 100644
--- a/debug/programs/mprv.S
+++ b/debug/programs/mprv.S
@@ -8,14 +8,14 @@ main:
# Set up a page table entry that maps 0x0... to 0x8...
la t0, page_table
srli t0, t0, PGSHIFT
- csrw CSR_SPTBR, t0
+ csrw CSR_SATP, t0
# update mstatus
csrr t1, CSR_MSTATUS
#if XLEN == 32
- li t0, (MSTATUS_MPRV | (SPTBR_MODE_SV32 << 24))
+ li t0, (MSTATUS_MPRV | (SATP_MODE_SV32 << 24))
#else
- li t0, (MSTATUS_MPRV | (SPTBR_MODE_SV39 << 24))
+ li t0, (MSTATUS_MPRV | (SATP_MODE_SV39 << 24))
#endif
#li t0, ((VM_SV39 << 24))
or t1, t0, t1
diff --git a/env b/env
-Subproject db0bfa223142e56b17dae6d92610f195014bbb8
+Subproject 68cad7baf3ed0a4553fffd14726d24519ee1296
diff --git a/isa/rv32si/dirty.S b/isa/rv32si/dirty.S
index 9340a85..bdbc1e4 100644
--- a/isa/rv32si/dirty.S
+++ b/isa/rv32si/dirty.S
@@ -4,7 +4,7 @@
#undef RVTEST_RV64M
#define RVTEST_RV64M RVTEST_RV32M
-#undef SPTBR_MODE_SV39
-#define SPTBR_MODE_SV39 SPTBR_MODE_SV32
+#undef SATP_MODE_SV39
+#define SATP_MODE_SV39 SATP_MODE_SV32
#include "../rv64si/dirty.S"
diff --git a/isa/rv64si/dirty.S b/isa/rv64si/dirty.S
index fa1581f..8444196 100644
--- a/isa/rv64si/dirty.S
+++ b/isa/rv64si/dirty.S
@@ -14,7 +14,7 @@ RVTEST_RV64M
RVTEST_CODE_BEGIN
# Turn on VM
- li a0, (SPTBR_MODE & ~(SPTBR_MODE<<1)) * SPTBR_MODE_SV39
+ li a0, (SATP_MODE & ~(SATP_MODE<<1)) * SATP_MODE_SV39
la a1, page_table_1
srl a1, a1, RISCV_PGSHIFT
or a1, a1, a0