Use internal real-mode stack from non-returnable prefixes
authorMichael Brown <mcb30@etherboot.org>
Thu, 28 Jun 2007 20:56:14 +0000 (21:56 +0100)
committerMichael Brown <mcb30@etherboot.org>
Thu, 28 Jun 2007 20:56:14 +0000 (21:56 +0100)
src/arch/i386/core/stack16.S [new file with mode: 0644]
src/arch/i386/prefix/dskprefix.S
src/arch/i386/prefix/romprefix.S

diff --git a/src/arch/i386/core/stack16.S b/src/arch/i386/core/stack16.S
new file mode 100644 (file)
index 0000000..3380a08
--- /dev/null
@@ -0,0 +1,13 @@
+       .arch i386
+
+/****************************************************************************
+ * Internal stack
+ ****************************************************************************
+ */
+       .section ".stack16"
+       .align 8
+       .globl _stack16
+_stack16:
+       .space 4096
+       .globl _estack16
+_estack16:
index 9b1ebaa..1a48716 100644 (file)
@@ -350,6 +350,10 @@ msg1end:
 start_runtime:
        call    install
 
+       /* Set up real-mode stack */
+       movw    %bx, %ss
+       movw    $_estack16, %sp
+
        /* Jump to .text16 segment */
        pushw   %ax
        pushw   $1f
index ced0f49..5200169 100644 (file)
@@ -139,6 +139,10 @@ exec_vector:
 
        call    install
 
+       /* Set up real-mode stack */
+       movw    %bx, %ss
+       movw    $_estack16, %sp
+
        /* Jump to .text16 segment */
        pushw   %ax
        pushw   $1f