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>
// %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
// 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"
" 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)