Skip to content

Commit

Permalink
Use internal real-mode stack from non-returnable prefixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Brown committed Jun 28, 2007
1 parent 00473f0 commit 045fb24
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/arch/i386/core/stack16.S
@@ -0,0 +1,13 @@
.arch i386

/****************************************************************************
* Internal stack
****************************************************************************
*/
.section ".stack16"
.align 8
.globl _stack16
_stack16:
.space 4096
.globl _estack16
_estack16:
4 changes: 4 additions & 0 deletions src/arch/i386/prefix/dskprefix.S
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions src/arch/i386/prefix/romprefix.S
Expand Up @@ -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
Expand Down

0 comments on commit 045fb24

Please sign in to comment.