diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c281b223..b0d381bfa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # CHANGELOG +## [2.4.2] - 2021-04-20 + - changed all occurances of SPTBR to the new name SATP + ## [2.4.1] - 2021-04-01 - updated issue number in TestFormatSpec to be consistent with doc history - adding a contribution guideline diff --git a/riscv-test-env/p/riscv_test.h b/riscv-test-env/p/riscv_test.h index 9b6e63073..e452261c4 100644 --- a/riscv-test-env/p/riscv_test.h +++ b/riscv-test-env/p/riscv_test.h @@ -63,10 +63,10 @@ .align 2; \ 1: -#define INIT_SPTBR \ +#define INIT_SATP \ la t0, 1f; \ csrw mtvec, t0; \ - csrwi sptbr, 0; \ + csrwi satp, 0; \ .align 2; \ 1: @@ -108,8 +108,8 @@ // #if defined(PRIV_MISA_S) # if (PRIV_MISA_S==0) -# undef INIT_SPTBR -# define INIT_SPTBR +# undef INIT_SATP +# define INIT_SATP # undef INIT_PMP # define INIT_PMP # undef DELEGATE_NO_TRAPS @@ -165,7 +165,7 @@ handle_exception: \ j write_tohost; \ reset_vector: \ RISCV_MULTICORE_DISABLE; \ - INIT_SPTBR; \ + INIT_SATP; \ INIT_PMP; \ DELEGATE_NO_TRAPS; \ li TESTNUM, 0; \ diff --git a/riscv-test-env/v/vm.c b/riscv-test-env/v/vm.c index 6ab7fd159..8064b7baf 100644 --- a/riscv-test-env/v/vm.c +++ b/riscv-test-env/v/vm.c @@ -225,13 +225,13 @@ void vm_boot(uintptr_t test_addr) l1pt[PTES_PER_PT-1] = ((pte_t)kernel_l2pt >> PGSHIFT << PTE_PPN_SHIFT) | PTE_V; kernel_l2pt[PTES_PER_PT-1] = (DRAM_BASE/RISCV_PGSIZE << PTE_PPN_SHIFT) | PTE_V | PTE_R | PTE_W | PTE_X | PTE_A | PTE_D; user_l2pt[0] = ((pte_t)user_l3pt >> PGSHIFT << PTE_PPN_SHIFT) | PTE_V; - uintptr_t vm_choice = SPTBR_MODE_SV39; + uintptr_t vm_choice = SATP_MODE_SV39; #else l1pt[PTES_PER_PT-1] = (DRAM_BASE/RISCV_PGSIZE << PTE_PPN_SHIFT) | PTE_V | PTE_R | PTE_W | PTE_X | PTE_A | PTE_D; - uintptr_t vm_choice = SPTBR_MODE_SV32; + uintptr_t vm_choice = SATP_MODE_SV32; #endif - write_csr(sptbr, ((uintptr_t)l1pt >> PGSHIFT) | - (vm_choice * (SPTBR_MODE & ~(SPTBR_MODE<<1)))); + write_csr(satp, ((uintptr_t)l1pt >> PGSHIFT) | + (vm_choice * (SATP_MODE & ~(SATP_MODE<<1)))); // Set up PMPs if present, ignoring illegal instruction trap if not. uintptr_t pmpc = PMP_NAPOT | PMP_R | PMP_W | PMP_X;