[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Protected Mode



In Setup.S, 
 lmsw ax  (ax=1 ), so we cut into protected mode..
 
Now comes my question ==>
(1). Just after running LMSW, I guess the CPU accessses memory as 8086 (where CS*16+IP.)
      Only After we reload cs by far jmp, then CPU ACTUALLY accesses memoey via GDT.
      And then CPU really work on 32-bit Code ..
      Is my guess right ?
 
(2). Friends on net tell me zImage is put on 0x10000 (ie. 64k  absoloute address),
      But the source reload the CS by  =>
                 db      0x66,0xea       ! prefix + jmpi-opcode
     code32: dd      0x1000          <--------------------- This line is strange. it should be 0x10000 not 0x1000, it should means offset not a segment ???
                                                                                Is anything wrong with my idea ?? 
                  dw      KERNEL_CS
     ( mixed 16-32 bits, by so it can jump to bzImage, too .. I guess)
-------------------------------------------------------------------------------------
            KERNEL_CS  is a index to GDT , which means BASE address is 0x0000
 
       
 

mirror server hosted at Truenetwork, Russian Federation.