summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1998-07-02 15:36:35 +0000
committerwpaul <wpaul@FreeBSD.org>1998-07-02 15:36:35 +0000
commit5ffa52e68ef1ba043c543d58670cd4235fc2fdc1 (patch)
treeb4bf7da9935282c336817dc633c82931bc28c5a6 /sys
parent32932516db3b98a92b8378b7480130b414d4f70b (diff)
downloadFreeBSD-src-5ffa52e68ef1ba043c543d58670cd4235fc2fdc1.zip
FreeBSD-src-5ffa52e68ef1ba043c543d58670cd4235fc2fdc1.tar.gz
Add workaround to allow the FreeBSD boot block to work on
Kapok Computer Co. notebook with AMI 'WinBIOS' which seems to insist on having a short jump and nop as the first instructions in the boot sector code. The prevailing theory is that the BIOS is doing some sort of boot sector virus detection and refusing to run any boot block that doesn't start with the same instruction sequence as MS-DOG boot sector code. If this is the case, it would be nice if it actually printed an error message to this effect instead of just saying 'FAILED.' This workaround has no effect on the boot sector code other than to increase its size by three bytes.
Diffstat (limited to 'sys')
-rw-r--r--sys/i386/boot/biosboot/start.S14
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/i386/boot/biosboot/start.S b/sys/i386/boot/biosboot/start.S
index ba01cd5..e413391 100644
--- a/sys/i386/boot/biosboot/start.S
+++ b/sys/i386/boot/biosboot/start.S
@@ -24,7 +24,7 @@
* the rights to redistribute these changes.
*
* from: Mach, Revision 2.2 92/04/04 11:36:29 rpd
- * $Id$
+ * $Id: start.S,v 1.10 1997/02/22 09:30:13 peter Exp $
*/
/*
@@ -75,6 +75,18 @@ NAMEBLOCKMAGIC= 0xfadefeed /* value of magicnumebr for block2 */
.text
ENTRY(boot1)
+
+ /*
+ * XXX I have encountered at least one machine (a no-name laptop
+ * with an AMI WinBIOS) that will refuse to run the bootblock
+ * unless this short jump and nop are here. I'm not certain, but
+ * this may be a case of the BIOS performing some kind of simple
+ * virus detection.
+ */
+ jmp pacify_braindead_bios
+ nop
+pacify_braindead_bios:
+
/*
* start (aka boot1) is loaded at 0x0:0x7c00 but we want 0x7c0:0
* ljmp to the next instruction to adjust %cs
OpenPOWER on IntegriCloud