]> xenbits.xensource.com Git - seabios.git/commitdiff
Use transition32_nmi_off from call32() and call16_back()
authorKevin O'Connor <kevin@koconnor.net>
Fri, 11 Sep 2015 20:19:02 +0000 (16:19 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Mon, 14 Sep 2015 14:12:35 +0000 (10:12 -0400)
The call32() and call16_back() functions will always disable NMI and
enable a20 (via the call32_prep() function) so it is safe to use the
_nmi_off variant of transition32.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
src/romlayout.S
src/stacks.c

index e223cdc8e8c3c23c6a85a99bf8b8ff36363b5eab..fefc212e7f40056b8e0699079e447bdaa4463c3f 100644 (file)
@@ -22,6 +22,7 @@
 // %edx = return location (in 32bit mode)
 // Clobbers: ecx, flags, segment registers, cr0, idt/gdt
         DECLFUNC transition32
+        .global transition32_nmi_off
 transition32:
         // Disable irqs (and clear direction flag)
         cli
index a1b8677c196a04fb25d425e1616f7d6b9ba6a5b5..850a33503f8148162217f6fa90878d451126bb78 100644 (file)
@@ -223,7 +223,7 @@ call32(void *func, u32 eax, u32 errret)
 
         // Transition to 32bit mode, call func, return to 16bit
         "  movl $(" __stringify(BUILD_BIOS_ADDR) " + 1f), %%edx\n"
-        "  jmp transition32\n"
+        "  jmp transition32_nmi_off\n"
         ASM16_SWITCH32
         "1:calll *%3\n"
         "  movl $2f, %%edx\n"
@@ -274,7 +274,7 @@ call16_back(u32 eax, u32 edx, void *func)
         "  calll _cfunc16_call16_helper\n"
         // Return to 32bit and restore esp
         "  movl $2f, %%edx\n"
-        "  jmp transition32\n"
+        "  jmp transition32_nmi_off\n"
         ASM32_BACK32
         "2:addl %2, %%esp\n"
         : "+a" (eax), "+c"(thunk), "+r"(stackseg)