VirtualBox

Ticket #19608: virtualbox_disk.patch

File virtualbox_disk.patch, 1.5 KB (added by jlxip, 4 years ago)

Patch file

  • src/VBox/Devices/PC/BIOS/disk.c

    diff -ruN ./VirtualBox-6.1.8{.orig,}/src/VBox/Devices/PC/BIOS/disk.c
    old new  
    140140int edd_fill_dpt(dpt_t __far *dpt, bio_dsk_t __far *bios_dsk, uint8_t device)
    141141{
    142142    uint16_t    ebda_seg = read_word(0x0040,0x000E);
     143    uint16_t    new_dpt_size;
    143144
    144145    /* Check if buffer is large enough. */
    145146    if (dpt->size < 0x1a)
     
    149150    if (dpt->size >= 0x1a) {
    150151        uint64_t    lba;
    151152
    152         dpt->size      = 0x1a;
     153        new_dpt_size   = 0x1a;
    153154        dpt->blksize   = bios_dsk->devices[device].blksize;
    154155
    155156        if (bios_dsk->devices[device].device == DSK_DEVICE_CDROM) {
     
    175176        uint8_t     channel, irq, mode, checksum, i, xlation;
    176177        uint16_t    iobase1, iobase2, options;
    177178
    178         dpt->size = 0x1e;
     179        new_dpt_size      = 0x1e;
    179180        dpt->dpte_segment = ebda_seg;
    180181        dpt->dpte_offset  = (uint16_t)&EbdaData->bdisk.dpte;
    181182
     
    227228        iface   = bios_dsk->channels[channel].iface;
    228229        iobase1 = bios_dsk->channels[channel].iobase1;
    229230
    230         dpt->size       = 0x42;
     231        new_dpt_size    = 0x42;
    231232        dpt->key        = 0xbedd;
    232233        dpt->dpi_length = 0x24;
    233234        dpt->reserved1  = 0;
     
    269270        checksum = -checksum;
    270271        dpt->checksum = checksum;
    271272    }
     273
     274    dpt->size = new_dpt_size;
    272275    return 0;
    273276}
    274277

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