Actually come up with stack-switch code which has a prayer of working
authorhpa <hpa>
Sat, 5 Apr 2003 00:38:00 +0000 (00:38 +0000)
committerhpa <hpa>
Sat, 5 Apr 2003 00:38:00 +0000 (00:38 +0000)
comboot.inc
pxelinux.asm
syslinux.doc

index 4646369..c7efe82 100644 (file)
@@ -1,7 +1,7 @@
 ;; $Id$
 ;; -----------------------------------------------------------------------
 ;;   
-;;   Copyright 1994-2002 H. Peter Anvin - All Rights Reserved
+;;   Copyright 1994-2003 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
index 793134e..2c25b01 100644 (file)
@@ -1662,21 +1662,36 @@ unload_pxe:
                ; We need to switch to our local stack here...
                pusha
                pushf
+               push gs
 
                mov si,sp
+               mov ax,ss
+               mov gs,ax
+               sub ax,[BaseStack+4]            ; Are we using the base stack
+                                               ; (as opposed to the COMBOOT stack)?
+               je .is_base_stack
+
+               lgs si,[SavedSSSP]              ; COMBOOT stack
+.is_base_stack:
+
                mov cx,[InitStack]
                mov di,StackBuf
                mov [BaseStack],di
                mov [BaseStack+4],es
                sub cx,si
                sub di,cx
-               mov dx,cx                       ; New SP
-               ss rep movsb
+               mov [SavedSSSP],cx              ; New SP
+               mov [SavedSSSP+2],es
+               gs rep movsb
 
-               cli
-               mov ss,cx                       ; CX == 0 here
-               mov sp,dx
+               and ax,ax                       ; Remeber which stack
+               jne .combootstack
+
+               ; Update the base stack pointer since it's in use
+               lss sp,[SavedSSSP]
                
+.combootstack:
+               pop gs
                popf
                popa
 %endif
index d6e579b..f685958 100644 (file)
@@ -623,5 +623,6 @@ archive, go to:
 
    http://www.zytor.com/mailman/listinfo/syslinux
 
-The mailing list changed in early 2002.  The old mailing list at
-kernel.org is no longer in use.
+Please DO NOT send HTML messages or attachments to the mailing list
+(including multipart/alternative or similar.)  All such messages will
+be bounced.