diff options
author | Andrew Waterman <andrew@sifive.com> | 2021-03-29 16:54:09 -0700 |
---|---|---|
committer | Andrew Waterman <andrew@sifive.com> | 2021-03-29 16:58:17 -0700 |
commit | c09d4af850ff8b502b5efd4de1aac39fcbc63618 (patch) | |
tree | 90bec479c44091334db0f5ab46775b84c22d285c | |
parent | fe486e5c8555dd199061ad42f56d748b74704e97 (diff) | |
download | pk-c09d4af850ff8b502b5efd4de1aac39fcbc63618.zip pk-c09d4af850ff8b502b5efd4de1aac39fcbc63618.tar.gz pk-c09d4af850ff8b502b5efd4de1aac39fcbc63618.tar.bz2 |
M-mode code doesn't need access to pk's page table
-rw-r--r-- | machine/minit.c | 1 | ||||
-rw-r--r-- | machine/vm.h | 1 | ||||
-rw-r--r-- | pk/mmap.c | 2 |
3 files changed, 2 insertions, 2 deletions
diff --git a/machine/minit.c b/machine/minit.c index 2fb67a4..cf80a98 100644 --- a/machine/minit.c +++ b/machine/minit.c @@ -14,7 +14,6 @@ #include <string.h> #include <limits.h> -pte_t* root_page_table; uintptr_t mem_size; volatile uint64_t* mtime; volatile uint32_t* plic_priorities; diff --git a/machine/vm.h b/machine/vm.h index 9436ffb..e65b19e 100644 --- a/machine/vm.h +++ b/machine/vm.h @@ -17,7 +17,6 @@ #endif typedef uintptr_t pte_t; -extern pte_t* root_page_table; static inline void flush_tlb() { @@ -24,6 +24,8 @@ typedef struct vmr_t { static vmr_t* vmr_freelist_head; +static pte_t* root_page_table; + #define RISCV_PGLEVELS ((VA_BITS - RISCV_PGSHIFT) / RISCV_PGLEVEL_BITS) static spinlock_t vm_lock = SPINLOCK_INIT; |