:: commit 43c89389e10c5a9af08f5d19b8ba2f64b54cfa12

Mintsuki <mintsuki@protonmail.com> — 2026-02-08 17:13

parents: 704d7fe861

protos/multiboot: Write IDTR within allocated stack frame

diff --git a/common/protos/multiboot_32.asm_x86 b/common/protos/multiboot_32.asm_x86
index e2349d32..89e4f174 100644
--- a/common/protos/multiboot_32.asm_x86
+++ b/common/protos/multiboot_32.asm_x86
@@ -4,9 +4,9 @@ section .text
 global multiboot_spinup_32:
 multiboot_spinup_32:
     sub esp, 6
-    mov word [esp-2], 0x3ff
-    mov dword [esp], 0
-    lidt [esp-2]
+    mov word [esp], 0x3ff
+    mov dword [esp+2], 0
+    lidt [esp]
     add esp, 6
 
     add esp, 4 ; return address
tab: 248 wrap: offon