diff options
author | Robert Morris <[email protected]> | 2010-08-05 21:16:55 -0400 |
---|---|---|
committer | Robert Morris <[email protected]> | 2010-08-05 21:16:55 -0400 |
commit | 1afc9d3fcaa7c5992659bb8b69f639b746dda2bc (patch) | |
tree | e60a41707282ba0ef2c1e00b9cba97bb71339284 /bootother.S | |
parent | c99599784e950169d85bf1e4446e7dbfb1a40f59 (diff) | |
download | xv6-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 'bootother.S')
-rw-r--r-- | bootother.S | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bootother.S b/bootother.S index 11d32f1..899669a 100644 --- a/bootother.S +++ b/bootother.S @@ -45,8 +45,10 @@ start: orl $CR0_PE, %eax movl %eax, %cr0 - # Jump to next instruction, but in 32-bit code segment. - # Switches processor into 32-bit mode. + # This ljmp is how you load the CS (Code Segment) register. + # SEG_ASM produces segment descriptors with the 32-bit mode + # flag set (the D flag), so addresses and word operands will + # default to 32 bits after this jump. ljmp $(SEG_KCODE<<3), $start32 .code32 # Assemble for 32-bit mode |