VirtualBox

Changeset 5206 in vbox


Ignore:
Timestamp:
Oct 9, 2007 2:36:22 PM (17 years ago)
Author:
vboxsync
Message:

Don't look for 0x55AA signature on floppy boot sectors. There is no
requirement for such signature and UNIX boot floppies rarely or never
have it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/BIOS/rombios.c

    r5196 r5206  
    81788178  // bootchk = 0 : signature check enabled
    81798179  if (bootdrv != 0) bootchk = 0;
     8180#ifdef VBOX
     8181  // Don't check boot sectors on floppies and don't read CMOS - byte
     8182  // 0x38 in CMOS always has the low bit clear.
     8183  // There is *no* requirement whatsoever for a valid boot sector to
     8184  // have a 55AAh signature. UNIX boot floppies typically have no such
     8185  // signature. In general, it is impossible to tell a valid bootsector
     8186  // from an invalid one; some heuristic would be needed - a JMP instruction
     8187  // in one of the first few bytes, absence of long sequences of identical
     8188  // bytes at the start or beginning or boot sector etc.
     8189  // The risk of attempting to boot an invalid floppy is low, certainly
     8190  // lower than the risk of refusing to boot a valid floppy.
     8191  bootchk = 1;
     8192#else
    81808193  else bootchk = inb_cmos(0x38) & 0x01;
     8194#endif
    81818195
    81828196#if BX_ELTORITO_BOOT
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette