diff options
author | jhb <jhb@FreeBSD.org> | 2000-05-24 02:20:34 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2000-05-24 02:20:34 +0000 |
commit | 4b78f2e385cbcaa803f014b38fc332a29d0c41e8 (patch) | |
tree | 3ca394a11ab37767b63551e488ada60f1c96885f /sys | |
parent | e5c660762538c5a9c59aedbfd6c8a2b401019b08 (diff) | |
download | FreeBSD-src-4b78f2e385cbcaa803f014b38fc332a29d0c41e8.zip FreeBSD-src-4b78f2e385cbcaa803f014b38fc332a29d0c41e8.tar.gz |
Convert the short stub of real-mode code into 16-bit assembly.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/boot/i386/btx/btxldr/btxldr.S | 22 | ||||
-rw-r--r-- | sys/boot/i386/btx/btxldr/btxldr.s | 22 |
2 files changed, 22 insertions, 22 deletions
diff --git a/sys/boot/i386/btx/btxldr/btxldr.S b/sys/boot/i386/btx/btxldr/btxldr.S index a1f7ee8..67a986c 100644 --- a/sys/boot/i386/btx/btxldr/btxldr.S +++ b/sys/boot/i386/btx/btxldr/btxldr.S @@ -234,24 +234,24 @@ ifdef(`BTXLDR_VERBOSE',` ') movl $start.8,%esi # Real mode stub movl $MEM_STUB,%edi # Destination - movl $SIZ_STUB,%ecx # Size + movl $start.9-start.8,%ecx # Size rep # Relocate movsb # it ljmp $SEL_RCODE,$MEM_STUB # To 16-bit code -start.8: xorl %eax,%eax # Data + .code16 +start.8: xorw %ax,%ax # Data movb $SEL_RDATA,%al # selector - movl %eax,%ss # Reload SS - movl %eax,%ds # Reset - movl %eax,%es # other - movl %eax,%fs # segment - movl %eax,%gs # limits + movw %ax,%ss # Reload SS + movw %ax,%ds # Reset + movw %ax,%es # other + movw %ax,%fs # segment + movw %ax,%gs # limits movl %cr0,%eax # Switch to - decl %eax # real + decw %ax # real movl %eax,%cr0 # mode - .byte 0xea # Jump to - .word MEM_ENTRY # BTX entry - .word 0x0 # point + ljmp $0,$MEM_ENTRY # Jump to BTX entry point start.9: + .code32 # # Output message [ESI] followed by EAX in hex. # diff --git a/sys/boot/i386/btx/btxldr/btxldr.s b/sys/boot/i386/btx/btxldr/btxldr.s index a1f7ee8..67a986c 100644 --- a/sys/boot/i386/btx/btxldr/btxldr.s +++ b/sys/boot/i386/btx/btxldr/btxldr.s @@ -234,24 +234,24 @@ ifdef(`BTXLDR_VERBOSE',` ') movl $start.8,%esi # Real mode stub movl $MEM_STUB,%edi # Destination - movl $SIZ_STUB,%ecx # Size + movl $start.9-start.8,%ecx # Size rep # Relocate movsb # it ljmp $SEL_RCODE,$MEM_STUB # To 16-bit code -start.8: xorl %eax,%eax # Data + .code16 +start.8: xorw %ax,%ax # Data movb $SEL_RDATA,%al # selector - movl %eax,%ss # Reload SS - movl %eax,%ds # Reset - movl %eax,%es # other - movl %eax,%fs # segment - movl %eax,%gs # limits + movw %ax,%ss # Reload SS + movw %ax,%ds # Reset + movw %ax,%es # other + movw %ax,%fs # segment + movw %ax,%gs # limits movl %cr0,%eax # Switch to - decl %eax # real + decw %ax # real movl %eax,%cr0 # mode - .byte 0xea # Jump to - .word MEM_ENTRY # BTX entry - .word 0x0 # point + ljmp $0,$MEM_ENTRY # Jump to BTX entry point start.9: + .code32 # # Output message [ESI] followed by EAX in hex. # |