pxelinux: allow "localboot -1" to do INT 18h, just like !pxelinux
authorH. Peter Anvin <hpa@zytor.com>
Sun, 28 Feb 2010 23:14:45 +0000 (15:14 -0800)
committerH. Peter Anvin <hpa@zytor.com>
Sun, 28 Feb 2010 23:14:45 +0000 (15:14 -0800)
Allow "localboot -1" to invoke INT 18h, as it does on other
derivatives.  Perhaps that can help track down systems on which the
normal return path just isn't working.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
core/pxelinux.asm

index 9df43bf..5ba3acd 100644 (file)
@@ -277,8 +277,6 @@ ROOT_FS_OPS:
 ; Boot to the local disk by returning the appropriate PXE magic.
 ; AX contains the appropriate return code.
 ;
-%if HAS_LOCALBOOT
-
 local_boot:
                push cs
                pop ds
@@ -296,10 +294,15 @@ local_boot:
                pop ds
                popad
                mov ax,[cs:LocalBootType]
+               cmp ax,-1                       ; localboot -1 == INT 18h
+               je .int18
                popfd
                retf                            ; Return to PXE
-
-%endif
+.int18:
+               popfd
+               int 18h
+               jmp 0F000h:0FFF0h
+               hlt
 
 ;
 ; kaboom: write a message and bail out.  Wait for quite a while,