Unlike in the Syslinux 3.x branch, we need to save/restore es around
the PXE EFI CSM localboot hack. This really should be moved to C,
anyway, at the same time USE_PXE_PROVIDED_STACK is finally killed off.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
; if we want to reset", so that chainloading other NBPs will work.
;
efi_csm_workaround:
+ push es
les bp,[InitStack] ; GS:SP -> original stack
les bx,[es:bp+44] ; Return address
cmp word [es:bx],18CDh ; Already pointing to INT 18h?
rep movsb
.skip:
+ pop es ; Restore CS == DS == ES
section .data16
alignz 4