summaryrefslogtreecommitdiff
path: root/core/pxelinux.asm
diff options
context:
space:
mode:
Diffstat (limited to 'core/pxelinux.asm')
-rw-r--r--core/pxelinux.asm30
1 files changed, 19 insertions, 11 deletions
diff --git a/core/pxelinux.asm b/core/pxelinux.asm
index 8884e030..c04da8ee 100644
--- a/core/pxelinux.asm
+++ b/core/pxelinux.asm
@@ -106,12 +106,8 @@ packet_buf resb 2048 ; Transfer packet
packet_buf_size equ $-packet_buf
section .text16
- ;
- ; PXELINUX needs more BSS than the other derivatives;
- ; therefore we relocate it from 7C00h on startup.
- ;
-StackBuf equ $-44 ; Base of stack if we use our own
-StackTop equ StackBuf
+StackBuf equ STACK_TOP-44 ; Base of stack if we use our own
+StackHome equ StackBuf
; PXE loads the whole file, but assume it can't be more
; than (384-31)K in size.
@@ -153,6 +149,21 @@ _start1:
mov ds,ax
mov es,ax
+%if 0 ; debugging code only... not intended for production use
+ ; Clobber the stack segment, to test for specific pathologies
+ mov di,STACK_BASE
+ mov cx,STACK_LEN >> 1
+ mov ax,0xf4f4
+ rep stosw
+
+ ; Clobber the tail of the 64K segment, too
+ extern __bss1_end
+ mov di,__bss1_end
+ sub cx,di ; CX = 0 previously
+ shr cx,1
+ rep stosw
+%endif
+
; That is all pushed onto the PXE stack. Save the pointer
; to it and switch to an internal stack.
mov [InitStack],sp
@@ -536,15 +547,12 @@ exten_table_end:
; Misc initialized (data) variables
;
section .data16
-
- alignz 4
- global BaseStack, KeepPXE
-BaseStack dd StackTop ; ESP of base stack
- dw 0 ; SS of base stack
+ global KeepPXE
KeepPXE db 0 ; Should PXE be kept around?
;
; IP information (initialized to "unknown" values)
+ alignz 4
global MyIP
MyIP dd 0 ; My IP address
;