diff options
author | H. Peter Anvin <hpa@zytor.com> | 2009-05-18 18:34:55 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-05-18 18:34:55 -0700 |
commit | 905cad0bf5201bddb99675687bab9b6666b88f71 (patch) | |
tree | b244863340b648a20015c660423d1bb5f2d639b8 | |
parent | 2b31eb4386fbea9dd44fc0b1d427dfdf20dd90ae (diff) | |
download | syslinux-905cad0bf5201bddb99675687bab9b6666b88f71.tar.gz syslinux-905cad0bf5201bddb99675687bab9b6666b88f71.tar.xz syslinux-905cad0bf5201bddb99675687bab9b6666b88f71.zip |
pxelinux: revert to a separate stack implementation
Return to using a private stack, except immediately around a pxenv
call. The systems on which this broke has been lost in time, and with
more code in 32-bit space there is a risk of deeper stacks (due to
more mode-switch calls.)
It is still a single configuration variable to flip back to the
unified 16-bit stack, however. If most of the code is in 32-bit mode
and there is small likelihood of several transitions, it might still
be the best option in the end.
Note: the PXE stack is 1.5K in size (and we must account for the
possibility of receiving an interrupt.)
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r-- | core/pxelinux.asm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/pxelinux.asm b/core/pxelinux.asm index e1a62c7a..4656e0b1 100644 --- a/core/pxelinux.asm +++ b/core/pxelinux.asm @@ -48,7 +48,11 @@ 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? + +; +; Set to 1 to disable switching to a private stack +; +%assign USE_PXE_PROVIDED_STACK 0 ; Use stack provided by PXE? SECTOR_SHIFT equ TFTP_BLOCKSIZE_LG2 SECTOR_SIZE equ TFTP_BLOCKSIZE @@ -2689,7 +2693,7 @@ gpxe_file_read: section .data16 alignz 4 -BaseStack dd StackBuf ; ESP of base stack +BaseStack dd StackTop ; ESP of base stack dw 0 ; SS of base stack NextSocket dw 49152 ; Counter for allocating socket numbers KeepPXE db 0 ; Should PXE be kept around? |