Browse Source

Verified as working

tags/v0.9.3
Michael Brown 18 years ago
parent
commit
5463169c1a
1 changed files with 9 additions and 6 deletions
  1. 9
    6
      src/arch/i386/prefix/libprefix.S

+ 9
- 6
src/arch/i386/prefix/libprefix.S View File

@@ -79,9 +79,10 @@ install_block:
79 79
  */
80 80
 	.section ".prefix.lib"
81 81
 	.code16
82
+	.globl alloc_basemem
82 83
 alloc_basemem:
83 84
 	/* FBMS => %ax as segment address */
84
-	movw	$40, %ax
85
+	movw	$0x40, %ax
85 86
 	movw	%ax, %fs
86 87
 	movw	%fs:0x13, %ax
87 88
 	shlw	$6, %ax
@@ -120,6 +121,7 @@ alloc_basemem:
120 121
  */
121 122
 	.section ".prefix.lib"
122 123
 	.code16
124
+	.globl install_basemem
123 125
 install_basemem:
124 126
 	/* Preserve registers */
125 127
 	pushw	%es
@@ -137,7 +139,7 @@ install_basemem:
137 139
 	/* Install .data16 */
138 140
 	movw	%bx, %es
139 141
 	xorl	%edi, %edi	
140
-	movl	$_data16_load_offset_pgh, %esi
142
+	movl	$_data16_load_offset, %esi
141 143
 	movl	$_data16_progbits_size, %ecx
142 144
 	call	install_block
143 145
 
@@ -199,7 +201,7 @@ set_segment_limits:
199 201
 	/* Set GDT base and load GDT */
200 202
 	xorl	%eax, %eax
201 203
 	movw	%cs, %ax
202
-	shrl	$4, %eax
204
+	shll	$4, %eax
203 205
 	addl	$gdt, %eax
204 206
 	movl	%eax, %cs:gdt_base
205 207
 	lgdt	%cs:gdt
@@ -235,6 +237,7 @@ set_segment_limits:
235 237
  */
236 238
 	.section ".prefix.lib"
237 239
 	.code16
240
+	.globl install_highmem
238 241
 install_highmem:
239 242
 	/* Preserve registers and interrupt status */
240 243
 	pushfl
@@ -248,10 +251,10 @@ install_highmem:
248 251
 	call	set_segment_limits
249 252
 
250 253
 	/* Install .text and .data to specified address */
251
-	xorw	%ax, %ax
252
-	movw	%ax, %es
254
+	xorw	%cx, %cx
255
+	movw	%cx, %es
253 256
 	movl	$_text_load_offset, %esi
254
-	movl	$_text_and_data_progbits_size, %ecx
257
+	movl	$_text_progbits_size, %ecx
255 258
 	call	install_block
256 259
 
257 260
 	/* Unflatten real mode */

Loading…
Cancel
Save