From 1afc9d3fcaa7c5992659bb8b69f639b746dda2bc Mon Sep 17 00:00:00 2001 From: Robert Morris Date: Thu, 5 Aug 2010 21:16:55 -0400 Subject: add some comments find out the hard way why user and kernel must have separate segment descriptors --- asm.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'asm.h') 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)), \ -- cgit v1.2.3