diff options
author | Andrew Waterman <waterman@cs.berkeley.edu> | 2016-02-12 12:27:17 -0800 |
---|---|---|
committer | Andrew Waterman <waterman@cs.berkeley.edu> | 2016-02-19 13:01:11 -0800 |
commit | 26a9320050305bb131921e3a3f0ace95a53f7877 (patch) | |
tree | 2913e837b45ebf41dd6b27b1941ac1fd007b2226 /pk | |
parent | 3c0620321d6316aaa5559a97dadeba5547171576 (diff) | |
download | pk-26a9320050305bb131921e3a3f0ace95a53f7877.zip pk-26a9320050305bb131921e3a3f0ace95a53f7877.tar.gz pk-26a9320050305bb131921e3a3f0ace95a53f7877.tar.bz2 |
sptbr now holds a PPN, not an address
Diffstat (limited to 'pk')
-rw-r--r-- | pk/minit.c | 2 | ||||
-rw-r--r-- | pk/vm.c | 4 |
2 files changed, 3 insertions, 3 deletions
@@ -117,7 +117,7 @@ void init_other_hart() while (*(pte_t* volatile*)&root_page_table == NULL) ; mb(); - write_csr(sptbr, root_page_table); + write_csr(sptbr, (uintptr_t)root_page_table >> RISCV_PGSHIFT); boot_other_hart(); } @@ -123,7 +123,7 @@ static void __maybe_create_root_page_table() return; root_page_table = (void*)__page_alloc(); if (have_vm) - write_csr(sptbr, root_page_table); + write_csr(sptbr, (uintptr_t)root_page_table >> RISCV_PGSHIFT); } static pte_t* __walk_internal(uintptr_t addr, int create) @@ -477,7 +477,7 @@ void supervisor_vm_init() mb(); root_page_table = root_pt; - write_csr(sptbr, root_pt); + write_csr(sptbr, (uintptr_t)root_pt >> RISCV_PGSHIFT); } uintptr_t pk_vm_init() |