Fix the use of MAC handling in pxelinux; fix copy_over_self
authorhpa <hpa>
Fri, 17 Dec 2004 07:57:32 +0000 (07:57 +0000)
committerhpa <hpa>
Fri, 17 Dec 2004 07:57:32 +0000 (07:57 +0000)
bcopy32.inc
pxelinux.asm

index ae4f8d0..3bd2ca9 100644 (file)
@@ -1,7 +1,7 @@
 ;; $Id$
 ;; -----------------------------------------------------------------------
 ;;   
-;;   Copyright 1994-2002 H. Peter Anvin - All Rights Reserved
+;;   Copyright 1994-2004 H. Peter Anvin - All Rights Reserved
 ;;
 ;;   This program is free software; you can redistribute it and/or modify
 ;;   it under the terms of the GNU General Public License as published by
@@ -393,7 +393,7 @@ try_wbinvd:
 ;      ESI, EDI, ECX   - same as bcopy
 ;      On stack        - initial state (fd, ad, ds, es, fs, gs)
 ;
-%define ADJUST (__bcopy_start - $$) - BSS_START
+ADJUST         equ (__bcopy_start - $$) + 7C00h - BSS_START
 
                align 2
 adjlist                dw bcopy_gdt.adj1 - ADJUST
index 1ae05d7..4b1c6b1 100644 (file)
@@ -209,8 +209,6 @@ ConfigName  resb 256                ; Configuration file from DHCP option
 PathPrefix     resb 256                ; Path prefix derived from boot file
 DotQuadBuf     resb 16                 ; Buffer for dotted-quad IP address
 IPOption       resb 80                 ; ip= option buffer
-MAC            resb 16                 ; Actual MAC address
-MACStr         resb 3*17               ; MAC address as a string
                alignb 4
 InitStack      resd 1                  ; Pointer to reset stack
 RebootTime     resd 1                  ; Reboot timeout, if set by option
@@ -221,9 +219,13 @@ IdleTimer  resw 1                  ; Time to check for ARP?
 LocalBootType  resw 1                  ; Local boot return code
 PktTimeout     resw 1                  ; Timeout for current packet
 RealBaseMem    resw 1                  ; Amount of DOS memory after freeing
+OverLoad       resb 1                  ; Set if DHCP packet uses "overloading"
+
+; The relative position of these fields matter!
 MACLen         resb 1                  ; MAC address len
 MACType                resb 1                  ; MAC address type
-OverLoad       resb 1                  ; Set if DHCP packet uses "overloading"
+MAC            resb 16                 ; Actual MAC address
+MACStr         resb 3*17               ; MAC address as a string
 
 ;
 ; PXE packets which don't need static initialization