PXELINUX: ES:BX -> PXENV+, so we can't have ES:DI -> $PnP.
authorH. Peter Anvin <hpa@zytor.com>
Thu, 8 Feb 2007 17:58:09 +0000 (09:58 -0800)
committerH. Peter Anvin <hpa@zytor.com>
Thu, 8 Feb 2007 17:58:09 +0000 (09:58 -0800)
This broke chainbooting FreeBSD at least.

NEWS
bootsect.inc

diff --git a/NEWS b/NEWS
index 43912b7..c8e472f 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,7 @@ Changes in 3.36:
        * New MBR which can boot from logical partitions.
        * SYSLINUX: Fix bug in detecting special extensions which was
          introduced in 3.35 :(
+       * PXELINUX: Unbreak chainbooting FreeBSD (and possibly others.)
 
 Changes in 3.35:
        * MEMDISK: New "safeint" mode.
index d52aefb..66e1886 100644 (file)
@@ -136,6 +136,11 @@ replace_bootstrap:
                mov [es:di+12],esi      ; New ESI
                mov [es:di+6],bx        ; New DS
 
+%ifndef IS_PXELINUX
+               ; DON'T DO THIS FOR PXELINUX...
+               ; For PXE, ES:BX -> PXENV+, and this would corrupt
+               ; that use.
+
                ; Hunt for $PnP header if one exists
                mov ax,0F000h
                mov fs,ax
@@ -163,6 +168,7 @@ replace_bootstrap:
                ; Found a valid $PnP header, point ES:DI to it
                mov [es:di+8], bx       ; New DI
                mov [es:di+4], fs       ; New ES
+%endif
 
 .donepnp:
                pop ax                  ; Copy list count