VirtualBox

Changeset 65847 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Feb 23, 2017 8:49:49 AM (8 years ago)
Author:
vboxsync
Message:

Devices/Bus: use symbolic constant for _4K

Location:
trunk/src/VBox/Devices/Bus
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Bus/DevPCI.cpp

    r65844 r65847  
    615615                 * through the bridge but we want to be compliant to the spec.
    616616                 */
    617                 if ((pGlobals->uPciBiosIo % 4*_1K) != 0)
    618                     pGlobals->uPciBiosIo = RT_ALIGN_32(pGlobals->uPciBiosIo, 4*_1K);
     617                if ((pGlobals->uPciBiosIo % _4K) != 0)
     618                    pGlobals->uPciBiosIo = RT_ALIGN_32(pGlobals->uPciBiosIo, _4K);
    619619                Log(("%s: Aligned I/O start address. New address %#x\n", __FUNCTION__, pGlobals->uPciBiosIo));
    620620                pci_config_writeb(pGlobals, uBus, uDevFn, VBOX_PCI_IO_BASE, (pGlobals->uPciBiosIo >> 8) & 0xf0);
     
    643643                 * interface. Again this doesn't really matter here but we want to be compliant to the spec.
    644644                 */
    645                 if ((u32IoAddressBase != pGlobals->uPciBiosIo) && ((pGlobals->uPciBiosIo % 4*_1K) != 0))
     645                if ((u32IoAddressBase != pGlobals->uPciBiosIo) && ((pGlobals->uPciBiosIo % _4K) != 0))
    646646                {
    647647                    /* The upper boundary must be one byte less than a 4KB boundary. */
    648                     pGlobals->uPciBiosIo = RT_ALIGN_32(pGlobals->uPciBiosIo, 4*_1K);
     648                    pGlobals->uPciBiosIo = RT_ALIGN_32(pGlobals->uPciBiosIo, _4K);
    649649                }
    650650                pci_config_writeb(pGlobals, uBus, uDevFn, VBOX_PCI_IO_LIMIT, ((pGlobals->uPciBiosIo >> 8) & 0xf0) - 1);
  • trunk/src/VBox/Devices/Bus/DevPciIch9.cpp

    r65845 r65847  
    15671567     * through the bridge but we want to be compliant to the spec.
    15681568     */
    1569     if ((pPciRoot->uPciBiosIo % 4*_1K) != 0)
    1570     {
    1571         pPciRoot->uPciBiosIo = RT_ALIGN_32(pPciRoot->uPciBiosIo, 4*_1K);
     1569    if ((pPciRoot->uPciBiosIo % _4K) != 0)
     1570    {
     1571        pPciRoot->uPciBiosIo = RT_ALIGN_32(pPciRoot->uPciBiosIo, _4K);
    15721572        Log(("%s: Aligned I/O start address. New address %#x\n", __FUNCTION__, pPciRoot->uPciBiosIo));
    15731573    }
     
    15971597    {
    15981598        /* Need again alignment to a 4KB boundary. */
    1599         pPciRoot->uPciBiosIo = RT_ALIGN_32(pPciRoot->uPciBiosIo, 4*_1K);
     1599        pPciRoot->uPciBiosIo = RT_ALIGN_32(pPciRoot->uPciBiosIo, _4K);
    16001600        ich9pciBiosInitWriteConfig(pPciRoot, uBus, uDevFn, VBOX_PCI_IO_LIMIT, ((pPciRoot->uPciBiosIo - 1) >> 8) & 0xf0, 1);
    16011601    }
     
    22872287    else
    22882288    {
    2289         if (uAddress + cb < 4*_1K)
     2289        if (uAddress + cb < _4K)
    22902290            LogRel(("PCI: %8s/%u: Read from extended register %d fallen back to generic code\n",
    22912291                    pPciDev->pszNameR3, pPciDev->Int.s.CTX_SUFF(pDevIns)->iInstance, uAddress));
     
    27032703        }
    27042704    }
    2705     else if (uAddress + cb <= 4*_1K)
     2705    else if (uAddress + cb <= _4K)
    27062706        LogRel(("PCI: %8s/%u: Write to extended register %d fallen back to generic code\n",
    27072707                pPciDev->pszNameR3, pPciDev->Int.s.CTX_SUFF(pDevIns)->iInstance, uAddress));
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