about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-12-27 22:38:07 -0800
committerKartik Agaram <vc@akkartik.com>2020-12-27 22:38:07 -0800
commit4ffe861a452924b468d0b74ed5e29b7cc374555d (patch)
tree91bada252684485829bbbbbc0d2f168b5561ba14
parent74529e2e62727ea25964c89c79367075dbc2b9c7 (diff)
downloadmu-4ffe861a452924b468d0b74ed5e29b7cc374555d.tar.gz
7432
Bugfix: 32-bit code in 16-bit mode.
Seems like it was benign, maybe.
-rw-r--r--baremetal/boot.hex10
1 files changed, 5 insertions, 5 deletions
diff --git a/baremetal/boot.hex b/baremetal/boot.hex
index 441b59eb..ff7a305a 100644
--- a/baremetal/boot.hex
+++ b/baremetal/boot.hex
@@ -106,11 +106,11 @@
   # mostly just for the address to the linear frame buffer
   b4 4f  # ah <- 4f (VBE)
   b0 01  # al <- 01 (get video mode)
-  b9 07 01 00 00  # ecx <- 0x0107 (mode we requested)
-  bf 40 7d 00 00  # edi <- 0x7d40 (video mode info)
+  b9 07 01  # cx <- 0x0107 (mode we requested)
+  bf 40 7d  # di <- 0x7d40 (video mode info)
   cd 10
 
-# 53:
+# 4f:
   # switch to 32-bit mode
   0f 01 16  # lgdt 00/mod/indirect 010/subop 110/rm/use-disp16
     a0 7c  # *gdt_descriptor
@@ -120,8 +120,8 @@
   ea e0 7c 08 00  # far jump to initialize_32bit_mode after setting cs to the record at offset 8 in the gdt (gdt_code)
 
 # padding
-# 67:
-                     00 00 00 00 00 00 00 00 00
+# 63:
+         00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 
 ## GDT: 3 records of 8 bytes each