Changeset 40754 in vbox
- Timestamp:
- Apr 3, 2012 10:59:59 AM (13 years ago)
- Location:
- trunk/src/VBox/Devices/PC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/BIOS-new/boot.c
r38699 r40754 297 297 } 298 298 299 // Don't check boot sectors on floppies and don't read CMOS - byte 300 // 0x38 in CMOS always has the low bit clear. 301 // There is *no* requirement whatsoever for a valid boot sector to 302 // have a 55AAh signature. UNIX boot floppies typically have no such 299 // There is *no* requirement whatsoever for a valid floppy boot sector 300 // to have a 55AAh signature. UNIX boot floppies typically have no such 303 301 // signature. In general, it is impossible to tell a valid bootsector 304 302 // from an invalid one. … … 317 315 #endif // BX_ELTORITO_BOOT 318 316 319 if (bootchk == 0) { 320 if (read_word(bootseg,0x1fe) != 0xaa55 || 321 read_word(bootseg,0) == read_word(bootseg,2)) { 322 print_boot_failure(bootcd, bootlan, bootdrv, 0, lastdrive); 323 return 0x00000000; 324 } 317 if (read_word(bootseg,0) == read_word(bootseg,2) 318 || (bootchk == 0 && read_word(bootseg,0x1fe) != 0xaa55)) 319 { 320 print_boot_failure(bootcd, bootlan, bootdrv, 0, lastdrive); 321 return 0x00000000; 325 322 } 326 323 -
trunk/src/VBox/Devices/PC/BIOS/rombios.c
r40648 r40754 8717 8717 8718 8718 #ifdef VBOX 8719 // Don't check boot sectors on floppies and don't read CMOS - byte 8720 // 0x38 in CMOS always has the low bit clear. 8721 // There is *no* requirement whatsoever for a valid boot sector to 8722 // have a 55AAh signature. UNIX boot floppies typically have no such 8719 // There is *no* requirement whatsoever for a valid floppy boot sector 8720 // to have a 55AAh signature. UNIX boot floppies typically have no such 8723 8721 // signature. In general, it is impossible to tell a valid bootsector 8724 8722 // from an invalid one. … … 8745 8743 #endif // BX_ELTORITO_BOOT 8746 8744 8747 if ( bootchk == 0) {8748 if (read_word(bootseg,0x1fe) != 0xaa55 ||8749 read_word(bootseg,0) == read_word(bootseg,2)){8745 if (read_word(bootseg,0) == read_word(bootseg,2) 8746 || (bootchk == 0 && read_word(bootseg,0x1fe) != 0xaa55)) 8747 { 8750 8748 #ifdef VBOX 8751 8749 print_boot_failure(bootcd, bootlan, bootdrv, 0, lastdrive); 8752 8750 #else /* !VBOX */ 8753 8751 print_boot_failure(bootcd, bootdrv, 0, lastdrive); 8754 8752 #endif /* VBOX */ 8755 return 0x00000000; 8756 } 8757 } 8753 return 0x00000000; 8754 } 8758 8755 8759 8756 #if BX_ELTORITO_BOOT
Note:
See TracChangeset
for help on using the changeset viewer.