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.
This commit is contained in:
wpaul 1998-07-02 15:36:35 +00:00
parent 32932516db
commit 5ffa52e68e

View File

@ -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