summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-02-12 00:32:24 -0800
committerH. Peter Anvin <hpa@zytor.com>2008-02-12 00:32:24 -0800
commit1d557f33960d8439c05024bf1400c7f8f910f784 (patch)
treea725e68cee3defcda290d8d2ede11f5bce7dd4c3
parent8d419fbcb295fcd8ee54cc5c95326a8da9959f80 (diff)
downloadsyslinux-1d557f33960d8439c05024bf1400c7f8f910f784.tar.gz
Remove last users of getcbuf; reclaim the address space
Remove the last few uses of getcbuf (to extend trackbuf for shuffle descriptors, and for temp storage during pxelinux config file search.) As a result, change the way RBFG_brainfuck is handled in pxelinux (at some point it's probably not worth maintaining anymore, as RBFG is no longer widely used); add a .bss2 section for the region between the RBFG zone and the stack.
-rw-r--r--comboot.inc2
-rw-r--r--extlinux.asm3
-rw-r--r--isolinux.asm3
-rw-r--r--layout.inc17
-rw-r--r--ldlinux.asm3
-rw-r--r--pxelinux.asm15
6 files changed, 23 insertions, 20 deletions
diff --git a/comboot.inc b/comboot.inc
index 9d9ca247..3a9b4332 100644
--- a/comboot.inc
+++ b/comboot.inc
@@ -604,7 +604,7 @@ comapi_dnsresolv equ comapi_err
; INT 22h AX=0011h Maximum number of shuffle descriptors
;
comapi_maxshuffle:
- mov P_CX,(2*trackbufsize)/12
+ mov P_CX,trackbufsize/12
ret
;
diff --git a/extlinux.asm b/extlinux.asm
index 9459f568..aa785892 100644
--- a/extlinux.asm
+++ b/extlinux.asm
@@ -109,8 +109,7 @@ file_mode resw 1
section .earlybss
trackbufsize equ 8192
trackbuf resb trackbufsize ; Track buffer goes here
-getcbuf resb trackbufsize
- ; ends at 4800h
+ ; ends at 2800h
section .bss1
SuperBlock resb 1024 ; ext2 superblock
diff --git a/isolinux.asm b/isolinux.asm
index e0c41ea4..e485532d 100644
--- a/isolinux.asm
+++ b/isolinux.asm
@@ -102,8 +102,7 @@ dir_clust resd 1 ; Length in clusters
section .earlybss
trackbufsize equ 8192
trackbuf resb trackbufsize ; Track buffer goes here
-getcbuf resb trackbufsize
-; ends at 4800h
+; ends at 2800h
; Some of these are touched before the whole image
; is loaded. DO NOT move this to .uibss.
diff --git a/layout.inc b/layout.inc
index 4ee78746..ba6b231b 100644
--- a/layout.inc
+++ b/layout.inc
@@ -52,6 +52,23 @@ STACK_START equ TEXT_START-STACK_SIZE
; but are in order to offload .bss
section .bss1 nobits valign=16 vfollows=.config.end
+ ; Warning here: RBFG build 22 randomly overwrites
+ ; memory location [0x5680,0x576c), possibly more. It
+ ; seems that it gets confused and screws up the
+ ; pointer to its own internal packet buffer and starts
+ ; writing a received ARP packet into low memory.
+%if IS_PXELINUX
+ section .rbfg nobits start=0x5680
+RBFG_brainfuck: resb 2048 ; Bigger than an Ethernet packet...
+%endif
+
+ ; For section following .rbfg
+%if IS_PXELINUX
+ section .bss2 nobits valign=16 vfollows=.rbfg
+%else
+ section .bss2 nobits valign=16 vfollows=.bss1
+%endif
+
section .text start=TEXT_START
; NASM BUG: .data always follows .text; can't override
section .data align=16 ; follows=.text
diff --git a/ldlinux.asm b/ldlinux.asm
index 468e2b8e..217fb15d 100644
--- a/ldlinux.asm
+++ b/ldlinux.asm
@@ -108,8 +108,7 @@ file_left resd 1 ; Number of sectors left
section .earlybss
trackbufsize equ 8192
trackbuf resb trackbufsize ; Track buffer goes here
-getcbuf resb trackbufsize
- ; ends at 4800h
+ ; ends at 2800h
section .bss
alignb 8
diff --git a/pxelinux.asm b/pxelinux.asm
index 02f38c02..f9e911cf 100644
--- a/pxelinux.asm
+++ b/pxelinux.asm
@@ -186,12 +186,7 @@ tftp_pktbuf resw 1 ; Packet buffer offset
section .earlybss
trackbufsize equ 8192
trackbuf resb trackbufsize ; Track buffer goes here
-getcbuf resb trackbufsize
- ; ends at 4800h
-
- ; Put some large buffers here, before RBFG_brainfuck,
- ; where we can still carefully control the address
- ; assignments...
+ ; ends at 2800h
alignb open_file_t_size
Files resb MAX_OPEN*open_file_t_size
@@ -204,12 +199,6 @@ IPOption resb 80 ; ip= option buffer
InitStack resd 1 ; Pointer to reset stack (SS:SP)
PXEStack resd 1 ; Saved stack during PXE call
-; Warning here: RBFG build 22 randomly overwrites memory location
-; [0x5680,0x576c), possibly more. It seems that it gets confused and
-; screws up the pointer to its own internal packet buffer and starts
-; writing a received ARP packet into low memory.
-RBFG_brainfuck resb 0E00h
-
section .bss
alignb 4
RebootTime resd 1 ; Reboot timeout, if set by option
@@ -818,7 +807,7 @@ config_scan:
call writestr
call crlf
mov si,di
- mov di,getcbuf
+ mov di,KernelName ; Borrow this buffer for mangled name
call mangle_name
call open
popa