VirtualBox

Changeset 43671 in vbox


Ignore:
Timestamp:
Oct 17, 2012 2:51:11 PM (12 years ago)
Author:
vboxsync
Message:

BIOS: Fixed El Torito skipped byte count calculation.

File:
1 edited

Legend:

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

    r43475 r43671  
    370370    bios_dsk->drqp.sect_sz = 512;
    371371
    372     bios_dsk->drqp.skip_a = 2048 - nbsectors * 512UL % 2048;
     372    bios_dsk->drqp.skip_a = (2048 - nbsectors * 512) % 2048;
    373373
    374374    if (VBOX_IS_AHCI_DEVICE(device))
     
    554554        atapicmd.nsect   = swap_16(elba - slba + 1);
    555555
    556         bios_dsk->drqp.nsect   = elba - slba + 1;
     556        bios_dsk->drqp.nsect   = nbsectors;
    557557        bios_dsk->drqp.sect_sz = 512;
    558558
    559559        bios_dsk->drqp.skip_b = before * 512;
    560         bios_dsk->drqp.skip_a = 2048 - nbsectors * 512UL % 2048 - bios_dsk->drqp.skip_b;
     560        bios_dsk->drqp.skip_a = ((4 - nbsectors % 4 - before) * 512) % 2048;
    561561
    562562        if (VBOX_IS_AHCI_DEVICE(device))
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