Browse Source

M-mode code doesn't need access to pk's page table

pull/237/head
Andrew Waterman 5 years ago
parent
commit
c09d4af850
  1. 1
      machine/minit.c
  2. 1
      machine/vm.h
  3. 2
      pk/mmap.c

1
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;

1
machine/vm.h

@ -17,7 +17,6 @@
#endif
typedef uintptr_t pte_t;
extern pte_t* root_page_table;
static inline void flush_tlb()
{

2
pk/mmap.c

@ -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;

Loading…
Cancel
Save