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