summaryrefslogtreecommitdiff
path: root/mmu.h
diff options
context:
space:
mode:
authorRobert Morris <[email protected]>2016-08-10 10:51:14 -0400
committerRobert Morris <[email protected]>2016-08-10 10:51:14 -0400
commit858475e4dfabb61dc72ab5b4f105e2a0a636e7e8 (patch)
tree16f960cc7005744d73e50bb55d2eecb8f080dafa /mmu.h
parent0a4a4230a32696ef7f1f6272ca24520826195b7f (diff)
downloadxv6-labs-858475e4dfabb61dc72ab5b4f105e2a0a636e7e8.tar.gz
xv6-labs-858475e4dfabb61dc72ab5b4f105e2a0a636e7e8.tar.bz2
xv6-labs-858475e4dfabb61dc72ab5b4f105e2a0a636e7e8.zip
tiny clarifications to some gdt code.
Diffstat (limited to 'mmu.h')
-rw-r--r--mmu.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/mmu.h b/mmu.h
index 685f51d..310d5de 100644
--- a/mmu.h
+++ b/mmu.h
@@ -39,6 +39,7 @@
#define CR4_PSE 0x00000010 // Page size extension
+// various segment selectors.
#define SEG_KCODE 1 // kernel code
#define SEG_KDATA 2 // kernel data+stack
#define SEG_KCPU 3 // kernel per-cpu data
@@ -46,6 +47,9 @@
#define SEG_UDATA 5 // user data+stack
#define SEG_TSS 6 // this process's task state
+// cpu->gdt[NSEGS] holds the above segments.
+#define NSEGS 7
+
//PAGEBREAK!
#ifndef __ASSEMBLER__
// Segment Descriptor