Просмотр исходного кода

Verified as working

tags/v0.9.3
Michael Brown 18 лет назад
Родитель
Сommit
5463169c1a
1 измененных файлов: 9 добавлений и 6 удалений
  1. 9
    6
      src/arch/i386/prefix/libprefix.S

+ 9
- 6
src/arch/i386/prefix/libprefix.S Просмотреть файл

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

Загрузка…
Отмена
Сохранить