summaryrefslogtreecommitdiffstats
path: root/src/arch
diff options
context:
space:
mode:
authorMichael Brown2006-05-02 16:04:21 +0200
committerMichael Brown2006-05-02 16:04:21 +0200
commit5463169c1aedfb2bdf3a4c6ec3ceb7771f5e237f (patch)
tree56f72022e27167749cf6a4332d27d2d6d6976c48 /src/arch
parentThis should be much more elegant: we use flat real mode for the (diff)
downloadipxe-5463169c1aedfb2bdf3a4c6ec3ceb7771f5e237f.tar.gz
ipxe-5463169c1aedfb2bdf3a4c6ec3ceb7771f5e237f.tar.xz
ipxe-5463169c1aedfb2bdf3a4c6ec3ceb7771f5e237f.zip
Verified as working
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/i386/prefix/libprefix.S15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/arch/i386/prefix/libprefix.S b/src/arch/i386/prefix/libprefix.S
index f87ba330..0f7d8a14 100644
--- a/src/arch/i386/prefix/libprefix.S
+++ b/src/arch/i386/prefix/libprefix.S
@@ -79,9 +79,10 @@ install_block:
*/
.section ".prefix.lib"
.code16
+ .globl alloc_basemem
alloc_basemem:
/* FBMS => %ax as segment address */
- movw $40, %ax
+ movw $0x40, %ax
movw %ax, %fs
movw %fs:0x13, %ax
shlw $6, %ax
@@ -120,6 +121,7 @@ alloc_basemem:
*/
.section ".prefix.lib"
.code16
+ .globl install_basemem
install_basemem:
/* Preserve registers */
pushw %es
@@ -137,7 +139,7 @@ install_basemem:
/* Install .data16 */
movw %bx, %es
xorl %edi, %edi
- movl $_data16_load_offset_pgh, %esi
+ movl $_data16_load_offset, %esi
movl $_data16_progbits_size, %ecx
call install_block
@@ -199,7 +201,7 @@ set_segment_limits:
/* Set GDT base and load GDT */
xorl %eax, %eax
movw %cs, %ax
- shrl $4, %eax
+ shll $4, %eax
addl $gdt, %eax
movl %eax, %cs:gdt_base
lgdt %cs:gdt
@@ -235,6 +237,7 @@ set_segment_limits:
*/
.section ".prefix.lib"
.code16
+ .globl install_highmem
install_highmem:
/* Preserve registers and interrupt status */
pushfl
@@ -248,10 +251,10 @@ install_highmem:
call set_segment_limits
/* Install .text and .data to specified address */
- xorw %ax, %ax
- movw %ax, %es
+ xorw %cx, %cx
+ movw %cx, %es
movl $_text_load_offset, %esi
- movl $_text_and_data_progbits_size, %ecx
+ movl $_text_progbits_size, %ecx
call install_block
/* Unflatten real mode */