pxelinux: stop using the PXE-provided stack
authorH. Peter Anvin <hpa@zytor.com>
Wed, 3 Feb 2010 23:20:19 +0000 (15:20 -0800)
committerH. Peter Anvin <hpa@zytor.com>
Wed, 3 Feb 2010 23:20:19 +0000 (15:20 -0800)
Using the PXE-provided stack complicates things tremendously for gPXE
chainloading support, plus we are hostages to the stack size set up by
the PXE stack (1.5K by spec.)

Use a private stack instead, as the fsc branch already does.

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

index 651dd4c..bf46ff6 100644 (file)
@@ -48,7 +48,7 @@ TFTP_LARGEBLK equ (TFTP_MTU-20-8-4)   ; MTU - IP hdr - UDP hdr - TFTP hdr
 ; Standard TFTP block size
 TFTP_BLOCKSIZE_LG2 equ 9               ; log2(bytes/block)
 TFTP_BLOCKSIZE equ (1 << TFTP_BLOCKSIZE_LG2)
-%assign USE_PXE_PROVIDED_STACK 1       ; Use stack provided by PXE?
+%assign USE_PXE_PROVIDED_STACK 0       ; Use stack provided by PXE?
 
 SECTOR_SHIFT   equ TFTP_BLOCKSIZE_LG2
 SECTOR_SIZE    equ TFTP_BLOCKSIZE
@@ -217,7 +217,7 @@ packet_buf_size     equ $-packet_buf
                ; PXELINUX needs more BSS than the other derivatives;
                ; therefore we relocate it from 7C00h on startup.
                ;
-StackBuf       equ $                   ; Base of stack if we use our own
+StackBuf       equ $-44                ; Base of stack if we use our own
 
 ;
 ; Primary entry point.