From 02135b7ae8ca3e4515ae3b9ee0940ba212e11676 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Sun, 20 Dec 2020 00:44:23 -0800 Subject: 7359 - boot into 32-bit mode --- apps/bos/32bit.hex | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/bos/32bit.hex b/apps/bos/32bit.hex index 0d7a294c..80852c4c 100644 --- a/apps/bos/32bit.hex +++ b/apps/bos/32bit.hex @@ -20,15 +20,15 @@ # 00: fa 0f 01 16 # lgdt 00/mod/indirect 010/subop 110/rm32/TODO - 2c 7c # *gdt_descriptor + 2d 7c # *gdt_descriptor 0f 20 c0 # eax <- cr0 66 83 c8 01 # eax <- or 0x1 0f 22 c0 # cr0 <- eax - ea 32 7c 08 00 # far jump to CODE_SEG:initialize_32bit_mode (TODO: why the 08? something to do with segment selector; only first 16 bits are used in the jump address) + ea 33 7c 08 00 # far jump to initialize_32bit_mode after setting cs to the record at offset 8 in the gdt (gdt_code) ## GDT: 3 records of 8 bytes each -# 14: +# 15: # gdt_start: # gdt_null: mandatory null descriptor 00 00 00 00 00 00 00 00 @@ -49,14 +49,14 @@ 00 # base[24:32] # gdt_end: -# 2c: +# 2d: # gdt_descriptor: 17 00 # final index of gdt = gdt_end - gdt_start - 1 - 14 7c 00 00 # start = gdt_start + 15 7c 00 00 # start = gdt_start ## 32-bit code from this point (still some instructions not in SubX) -# 32: +# 33: # initialize_32bit_mode: 66 b8 10 00 # ax <- offset 16 from gdt_start 8e d8 # ds <- ax -- cgit 1.4.1-2-gfad0