summaryrefslogtreecommitdiff
path: root/mmu.h
diff options
context:
space:
mode:
authorRobert Morris <[email protected]>2011-09-01 12:03:49 -0400
committerRobert Morris <[email protected]>2011-09-01 12:03:49 -0400
commit62e3b8a92c6f8840cec8a0db13b2bcad10192b4a (patch)
tree6186d2ac5e654ba71f8f45ae9956c560d7251dfc /mmu.h
parent5a236924444db768813d726ae165d263856d8bff (diff)
parentd0f3efca650eccd5179e045cd07f7d723037defc (diff)
downloadxv6-labs-62e3b8a92c6f8840cec8a0db13b2bcad10192b4a.tar.gz
xv6-labs-62e3b8a92c6f8840cec8a0db13b2bcad10192b4a.tar.bz2
xv6-labs-62e3b8a92c6f8840cec8a0db13b2bcad10192b4a.zip
Merge branch 'master' of git+ssh://amsterdam.csail.mit.edu/home/am0/6.828/xv6
Conflicts: vm.c
Diffstat (limited to 'mmu.h')
-rw-r--r--mmu.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/mmu.h b/mmu.h
index 0da30e7..5c9ab60 100644
--- a/mmu.h
+++ b/mmu.h
@@ -118,13 +118,13 @@ struct segdesc {
#define PGADDR(d, t, o) ((uint)((d) << PDXSHIFT | (t) << PTXSHIFT | (o)))
// Page directory and page table constants.
-#define NPDENTRIES 1024 // page directory entries per page directory
-#define NPTENTRIES 1024 // page table entries per page table
-#define PGSIZE 4096 // bytes mapped by a page
+#define NPDENTRIES 1024 // # directory entries per page directory
+#define NPTENTRIES 1024 // # PTEs per page table
+#define PGSIZE 4096 // bytes mapped by a page
-#define PGSHIFT 12 // log2(PGSIZE)
-#define PTXSHIFT 12 // offset of PTX in a linear address
-#define PDXSHIFT 22 // offset of PDX in a linear address
+#define PGSHIFT 12 // log2(PGSIZE)
+#define PTXSHIFT 12 // offset of PTX in a linear address
+#define PDXSHIFT 22 // offset of PDX in a linear address
#define PGROUNDUP(sz) (((sz)+PGSIZE-1) & ~(PGSIZE-1))
#define PGROUNDDOWN(a) (((a)) & ~(PGSIZE-1))