memdisk: move temporary variables away from the EDD data block
authorH. Peter Anvin <hpa@zytor.com>
Thu, 30 Jul 2009 19:28:45 +0000 (12:28 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Thu, 30 Jul 2009 19:28:45 +0000 (12:28 -0700)
Move a couple of variables away from the EDD data block.  Without this
change, FreeDOS doesn't boot on Thinkpads.  Unfortunately, this should
have been a null change, so it is really not clear why this happens.
Stack overflows have been ruled out.  Probably need to examine the
FreeDOS kernel in some detail.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
memdisk/memdisk.inc

index 266b08a..2699c34 100644 (file)
@@ -945,6 +945,12 @@ Mover_dst2:        db 0                    ; High 8 bits of source addy
 Mover_dummy2:  dd 0, 0, 0, 0           ; More space for the BIOS
 
                alignb 4, db 0
+Stack          dd 0                    ; Saved SS:ESP on invocation
+               dw 0
+SavedAX                dw 0                    ; AX saved on invocation
+Recursive      dw 0                    ; Recursion counter
+
+               alignb 4, db 0
 MemDisk_Info   equ $                   ; Pointed to by installation check
 MDI_Bytes      dw MDI_Len              ; Total bytes in MDI structure
 MDI_Version    db VERSION_MINOR, VERSION_MAJOR ; MEMDISK version
@@ -1006,12 +1012,6 @@ EDD_DPT:
 %endif
 
                ; End patch area
-               alignb 4, db 0
-Stack          dd 0                    ; Saved SS:ESP on invocation
-               dw 0
-SavedAX                dw 0                    ; AX saved on invocation
-Recursive      dw 0                    ; Recursion counter
-
                alignb 4, db 0          ; We *MUST* end on a dword boundary
 
 E820Table      equ $                   ; The installer loads the E820 table here