From 5c391f4d6be5cf383728da36fe6d436ccea6f14a Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Sun, 16 Nov 2003 18:24:23 +0000 Subject: [PATCH] When rebooting the machine jump to 0xf000:0xfff0 instead of 0xffff:0x0. While we end up the same place, we end up with two different CS register values after the jump and 0xf000 is compatible with the hardware reset value. This makes a difference if the BIOS does a near jump before a far jump. Detective work and patch by: Adrian Steinmann --- sys/boot/i386/btx/btx/btx.S | 2 +- sys/boot/i386/btx/btx/btx.s | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/boot/i386/btx/btx/btx.S b/sys/boot/i386/btx/btx/btx.S index e5c8ec494e3b..0215530e1815 100644 --- a/sys/boot/i386/btx/btx/btx.S +++ b/sys/boot/i386/btx/btx/btx.S @@ -296,7 +296,7 @@ exit.2: xor %ax,%ax # Real mode segment testb $0x1,btx_hdr+0x7 # Reboot? exit.3: jz exit.3 # No movw $0x1234, BDA_BOOT # Do a warm boot - ljmp $0xffff,$0x0 # reboot the machine + ljmp $0xf000,$0xfff0 # reboot the machine # # Set IRQ offsets by reprogramming 8259A PICs. # diff --git a/sys/boot/i386/btx/btx/btx.s b/sys/boot/i386/btx/btx/btx.s index e5c8ec494e3b..0215530e1815 100644 --- a/sys/boot/i386/btx/btx/btx.s +++ b/sys/boot/i386/btx/btx/btx.s @@ -296,7 +296,7 @@ exit.2: xor %ax,%ax # Real mode segment testb $0x1,btx_hdr+0x7 # Reboot? exit.3: jz exit.3 # No movw $0x1234, BDA_BOOT # Do a warm boot - ljmp $0xffff,$0x0 # reboot the machine + ljmp $0xf000,$0xfff0 # reboot the machine # # Set IRQ offsets by reprogramming 8259A PICs. #