Browse Source

Use internal real-mode stack from non-returnable prefixes

tags/v0.9.3
Michael Brown 17 years ago
parent
commit
045fb24557
3 changed files with 21 additions and 0 deletions
  1. 13
    0
      src/arch/i386/core/stack16.S
  2. 4
    0
      src/arch/i386/prefix/dskprefix.S
  3. 4
    0
      src/arch/i386/prefix/romprefix.S

+ 13
- 0
src/arch/i386/core/stack16.S View File

@@ -0,0 +1,13 @@
1
+	.arch i386
2
+
3
+/****************************************************************************
4
+ * Internal stack
5
+ ****************************************************************************
6
+ */
7
+	.section ".stack16"
8
+	.align 8
9
+	.globl _stack16
10
+_stack16:
11
+	.space 4096
12
+	.globl _estack16
13
+_estack16:

+ 4
- 0
src/arch/i386/prefix/dskprefix.S View File

@@ -350,6 +350,10 @@ msg1end:
350 350
 start_runtime:
351 351
 	call	install
352 352
 
353
+	/* Set up real-mode stack */
354
+	movw	%bx, %ss
355
+	movw	$_estack16, %sp
356
+
353 357
 	/* Jump to .text16 segment */
354 358
 	pushw	%ax
355 359
 	pushw	$1f

+ 4
- 0
src/arch/i386/prefix/romprefix.S View File

@@ -139,6 +139,10 @@ exec_vector:
139 139
 
140 140
 	call	install
141 141
 
142
+	/* Set up real-mode stack */
143
+	movw	%bx, %ss
144
+	movw	$_estack16, %sp
145
+
142 146
 	/* Jump to .text16 segment */
143 147
 	pushw	%ax
144 148
 	pushw	$1f

Loading…
Cancel
Save