aboutsummaryrefslogtreecommitdiff
path: root/pk/vm.h
diff options
context:
space:
mode:
authorAndrew Waterman <waterman@cs.berkeley.edu>2015-03-24 16:38:46 -0700
committerAndrew Waterman <waterman@cs.berkeley.edu>2015-03-24 16:38:46 -0700
commitaedc6165cc28a4a74267eefd5da1862981f5b40f (patch)
tree13c8151d5edccac8745f8ab218107845c902c253 /pk/vm.h
parentf6659f1c764ad5d3d64743567914608ec3ed8b06 (diff)
downloadpk-aedc6165cc28a4a74267eefd5da1862981f5b40f.zip
pk-aedc6165cc28a4a74267eefd5da1862981f5b40f.tar.gz
pk-aedc6165cc28a4a74267eefd5da1862981f5b40f.tar.bz2
New virtual memory implementation (Sv39)
Diffstat (limited to 'pk/vm.h')
-rw-r--r--pk/vm.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/pk/vm.h b/pk/vm.h
index 273d71c..6959a38 100644
--- a/pk/vm.h
+++ b/pk/vm.h
@@ -8,6 +8,9 @@
#include <sys/types.h>
#define SUPERPAGE_SIZE ((uintptr_t)(RISCV_PGSIZE << RISCV_PGLEVEL_BITS))
+#if RISCV_PGLEVELS > 2
+# define MEGAPAGE_SIZE (SUPERPAGE_SIZE << RISCV_PGLEVEL_BITS)
+#endif
#define PROT_READ 1
#define PROT_WRITE 2