summaryrefslogtreecommitdiff
path: root/asm.h
diff options
context:
space:
mode:
authorRobert Morris <[email protected]>2010-08-05 21:16:55 -0400
committerRobert Morris <[email protected]>2010-08-05 21:16:55 -0400
commit1afc9d3fcaa7c5992659bb8b69f639b746dda2bc (patch)
treee60a41707282ba0ef2c1e00b9cba97bb71339284 /asm.h
parentc99599784e950169d85bf1e4446e7dbfb1a40f59 (diff)
downloadxv6-labs-1afc9d3fcaa7c5992659bb8b69f639b746dda2bc.tar.gz
xv6-labs-1afc9d3fcaa7c5992659bb8b69f639b746dda2bc.tar.bz2
xv6-labs-1afc9d3fcaa7c5992659bb8b69f639b746dda2bc.zip
add some comments
find out the hard way why user and kernel must have separate segment descriptors
Diffstat (limited to 'asm.h')
-rw-r--r--asm.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/asm.h b/asm.h
index 0c052db..68210d7 100644
--- a/asm.h
+++ b/asm.h
@@ -6,6 +6,8 @@
.word 0, 0; \
.byte 0, 0, 0, 0
+// The 0xC0 means the limit is in 4096-byte units
+// and (for executable segments) 32-bit mode.
#define SEG_ASM(type,base,lim) \
.word (((lim) >> 12) & 0xffff), ((base) & 0xffff); \
.byte (((base) >> 16) & 0xff), (0x90 | (type)), \