aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2015-09-11 16:19:02 -0400
committerKevin O'Connor <kevin@koconnor.net>2015-09-14 10:12:35 -0400
commit423542e5669732ab426fb0bc5798f004cb0bb3d6 (patch)
treecde531ef4f4ad63e79b5437b1aae478da46c1839
parent63766c43f1242b48fcacf616280777fd0388a168 (diff)
downloadseabios-423542e5669732ab426fb0bc5798f004cb0bb3d6.zip
seabios-423542e5669732ab426fb0bc5798f004cb0bb3d6.tar.gz
seabios-423542e5669732ab426fb0bc5798f004cb0bb3d6.tar.bz2
Use transition32_nmi_off from call32() and call16_back()
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>
-rw-r--r--src/romlayout.S1
-rw-r--r--src/stacks.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/src/romlayout.S b/src/romlayout.S
index e223cdc..fefc212 100644
--- a/src/romlayout.S
+++ b/src/romlayout.S
@@ -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
diff --git a/src/stacks.c b/src/stacks.c
index a1b8677..850a335 100644
--- a/src/stacks.c
+++ b/src/stacks.c
@@ -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)