VirtualBox

Changeset 34169 in vbox for trunk/src/VBox/Devices/PC


Ignore:
Timestamp:
Nov 18, 2010 1:09:35 PM (14 years ago)
Author:
vboxsync
Message:

DevPcBios.cpp: remove no longer needed alignment for net boot images read from a file, and derive the size limit from the start address. Still 56K max.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/DevPcBios.cpp

    r34164 r34169  
    12821282    }
    12831283
    1284     uint64_t cbFileLanBoot, cbFileLanBootAlign;
     1284    uint64_t cbFileLanBoot;
    12851285    const uint8_t *pu8LanBootBinary = NULL;
    12861286    uint64_t cbLanBootBinary;
     
    12991299            if (RT_SUCCESS(rc))
    13001300            {
    1301                 cbFileLanBootAlign = RT_ALIGN(cbFileLanBoot, _4K);
    1302                 if (cbFileLanBootAlign > _64K - (VBOX_LANBOOT_SEG << 4 & 0xffff))
     1301                if (cbFileLanBoot > _64K - (VBOX_LANBOOT_SEG << 4 & 0xffff))
    13031302                    rc = VERR_TOO_MUCH_DATA;
    13041303            }
     
    13251324         * Allocate buffer for the LAN boot ROM data.
    13261325         */
    1327         pThis->pu8LanBoot = (uint8_t *)PDMDevHlpMMHeapAllocZ(pDevIns, cbFileLanBootAlign);
     1326        pThis->pu8LanBoot = (uint8_t *)PDMDevHlpMMHeapAllocZ(pDevIns, cbFileLanBoot);
    13281327        if (pThis->pu8LanBoot)
    13291328        {
     
    13581357    {
    13591358        pu8LanBootBinary = pThis->pu8LanBoot;
    1360         cbLanBootBinary  = cbFileLanBootAlign;
     1359        cbLanBootBinary  = cbFileLanBoot;
    13611360    }
    13621361
     
    13711370        pThis->cbLanBoot = cbLanBootBinary;
    13721371
    1373         rc = PDMDevHlpROMRegister(pDevIns, VBOX_LANBOOT_SEG << 4,  RT_MAX(cbLanBootBinary, 56*_1K),
     1372        rc = PDMDevHlpROMRegister(pDevIns, VBOX_LANBOOT_SEG << 4,  RT_MAX(cbLanBootBinary, _64K - (VBOX_LANBOOT_SEG << 4 & 0xffff)),
    13741373                                  pu8LanBootBinary, cbLanBootBinary,
    13751374                                  PGMPHYS_ROM_FLAGS_SHADOWED, "Net Boot ROM");
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