summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhpa <hpa>2004-12-19 07:23:45 +0000
committerhpa <hpa>2004-12-19 07:23:45 +0000
commitad10c6bb4ed8830cd0071fda0ee037cf600a7f49 (patch)
tree9b2d09d5d59bddb36e56fac46653f881b8c465bd
parent67af2ad7bead9bd53a15cd069217a28f02337811 (diff)
downloadsyslinux-ad10c6bb4ed8830cd0071fda0ee037cf600a7f49.tar.gz
Fix some additional common code issues; fix dangling ES in pxelinux
-rw-r--r--extlinux.asm13
-rw-r--r--isolinux.asm13
-rw-r--r--ldlinux.asm13
-rw-r--r--parsecmd.inc3
-rw-r--r--parseconfig.inc2
-rw-r--r--pxelinux.asm15
6 files changed, 5 insertions, 54 deletions
diff --git a/extlinux.asm b/extlinux.asm
index 757609a2..e12edb7a 100644
--- a/extlinux.asm
+++ b/extlinux.asm
@@ -58,13 +58,6 @@ SECTOR_SIZE equ (1 << SECTOR_SHIFT)
; Since there is no room in the bottom 64K for all of these, we
; stick them at vk_seg:0000 and copy them down before we need them.
;
-; Note: this structure can be added to, but it must
-;
-%define vk_power 6 ; log2(max number of vkernels)
-%define max_vk (1 << vk_power) ; Maximum number of vkernels
-%define vk_shift (16-vk_power) ; Number of bits to shift
-%define vk_size (1 << vk_shift) ; Size of a vkernel buffer
-
struc vkernel
vk_vname: resb FILENAME_MAX ; Virtual name **MUST BE FIRST!**
vk_rname: resb FILENAME_MAX ; Real name
@@ -75,12 +68,6 @@ vk_append: resb max_cmd_len+1 ; Command line
vk_end: equ $ ; Should be <= vk_size
endstruc
-%ifndef DEPEND
-%if (vk_end > vk_size) || (vk_size*max_vk > 65536)
-%error "Too many vkernels defined, reduce vk_power"
-%endif
-%endif
-
;
; Segment assignments in the bottom 640K
; Stick to the low 512K in case we're using something like M-systems flash
diff --git a/isolinux.asm b/isolinux.asm
index faab78cd..548811e8 100644
--- a/isolinux.asm
+++ b/isolinux.asm
@@ -56,13 +56,6 @@ SECTOR_SIZE equ (1 << SECTOR_SHIFT)
; Since there is no room in the bottom 64K for all of these, we
; stick them at vk_seg:0000 and copy them down before we need them.
;
-; Note: this structure can be added to, but it must
-;
-%define vk_power 6 ; log2(max number of vkernels)
-%define max_vk (1 << vk_power) ; Maximum number of vkernels
-%define vk_shift (16-vk_power) ; Number of bits to shift
-%define vk_size (1 << vk_shift) ; Size of a vkernel buffer
-
struc vkernel
vk_vname: resb FILENAME_MAX ; Virtual name **MUST BE FIRST!**
vk_rname: resb FILENAME_MAX ; Real name
@@ -73,12 +66,6 @@ vk_append: resb max_cmd_len+1 ; Command line
vk_end: equ $ ; Should be <= vk_size
endstruc
-%ifndef DEPEND
-%if (vk_end > vk_size) || (vk_size*max_vk > 65536)
-%error "Too many vkernels defined, reduce vk_power"
-%endif
-%endif
-
;
; Segment assignments in the bottom 640K
; 0000h - main code/data segment (and BIOS segment)
diff --git a/ldlinux.asm b/ldlinux.asm
index b8f23031..1a1020a7 100644
--- a/ldlinux.asm
+++ b/ldlinux.asm
@@ -64,13 +64,6 @@ SECTOR_SIZE equ (1 << SECTOR_SHIFT)
; Since there is no room in the bottom 64K for all of these, we
; stick them at vk_seg:0000 and copy them down before we need them.
;
-; Note: this structure can be added to, but it must
-;
-%define vk_power 7 ; log2(max number of vkernels)
-%define max_vk (1 << vk_power) ; Maximum number of vkernels
-%define vk_shift (16-vk_power) ; Number of bits to shift
-%define vk_size (1 << vk_shift) ; Size of a vkernel buffer
-
struc vkernel
vk_vname: resb FILENAME_MAX ; Virtual name **MUST BE FIRST!**
vk_rname: resb FILENAME_MAX ; Real name
@@ -81,12 +74,6 @@ vk_append: resb max_cmd_len+1 ; Command line
vk_end: equ $ ; Should be <= vk_size
endstruc
-%ifndef DEPEND
-%if (vk_end > vk_size) || (vk_size*max_vk > 65536)
-%error "Too many vkernels defined, reduce vk_power"
-%endif
-%endif
-
;
; Segment assignments in the bottom 640K
; Stick to the low 512K in case we're using something like M-systems flash
diff --git a/parsecmd.inc b/parsecmd.inc
index 5d1830e5..2aa4144c 100644
--- a/parsecmd.inc
+++ b/parsecmd.inc
@@ -91,7 +91,8 @@ getcommand:
jmp short .skipline
section .bss
- alignb 32
+ alignb 4
+vk_size equ (vk_end + 3) & ~3
VKernelBuf: resb vk_size ; "Current" vkernel
AppendBuf resb max_cmd_len+1 ; append=
Ontimeout resb max_cmd_len+1 ; ontimeout
diff --git a/parseconfig.inc b/parseconfig.inc
index 0a427696..064dc7f4 100644
--- a/parseconfig.inc
+++ b/parseconfig.inc
@@ -240,7 +240,7 @@ pc_fkey: push ax
;
pc_label: call commit_vk ; Commit any current vkernel
mov di,VKernelBuf ; Erase the vkernelbuf for better compression
- mov cx,vk_size >> 1
+ mov cx,(vk_size >> 1)
xor ax,ax
rep stosw
call pc_getline
diff --git a/pxelinux.asm b/pxelinux.asm
index be550a19..c8108d26 100644
--- a/pxelinux.asm
+++ b/pxelinux.asm
@@ -94,13 +94,6 @@ TFTP_EOPTNEG equ htons(8) ; Option negotiation failure
; Since there is no room in the bottom 64K for all of these, we
; stick them at vk_seg:0000 and copy them down before we need them.
;
-; Note: this structure can be added to, but it must
-;
-%define vk_power 6 ; log2(max number of vkernels)
-%define max_vk (1 << vk_power) ; Maximum number of vkernels
-%define vk_shift (16-vk_power) ; Number of bits to shift
-%define vk_size (1 << vk_shift) ; Size of a vkernel buffer
-
struc vkernel
vk_vname: resb FILENAME_MAX ; Virtual name **MUST BE FIRST!**
vk_rname: resb FILENAME_MAX ; Real name
@@ -113,12 +106,6 @@ vk_append: resb max_cmd_len+1 ; Command line
vk_end: equ $ ; Should be <= vk_size
endstruc
-%ifndef DEPEND
-%if (vk_end > vk_size) || (vk_size*max_vk > 65536)
-%error "Too many vkernels defined, reduce vk_power"
-%endif
-%endif
-
;
; Segment assignments in the bottom 640K
; 0000h - main code/data segment (and BIOS segment)
@@ -503,6 +490,8 @@ have_pxe:
call crlf
have_entrypoint:
+ push cs
+ pop es ; Restore CS == DS == ES
;
; Now attempt to get the BOOTP/DHCP packet that brought us life (and an IP