VirtualBox

Changeset 43441 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Sep 26, 2012 1:07:32 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
80951
Message:

ICH9: Fix PCI bridge initialization

File:
1 edited

Legend:

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

    r41697 r43441  
    17921792}
    17931793
    1794 /* Initializes bridges registers used for routing. */
    1795 static void ich9pciInitBridgeTopology(PICH9PCIGLOBALS pGlobals, PICH9PCIBUS pBus)
     1794/**
     1795 * Initializes bridges registers used for routing.
     1796 *
     1797 * @returns nothing.
     1798 * @param   pGlobals         Global device instance data used to generate unique bus numbers.
     1799 * @param   pBus             The PCI bus to initialize.
     1800 * @param   uBusPrimary      The primary bus number the bus is connected to.
     1801 * @param   uBusSecondary    The secondary bus number, i.e. the bus number behind the bridge.
     1802 */
     1803static void ich9pciInitBridgeTopology(PICH9PCIGLOBALS pGlobals, PICH9PCIBUS pBus, unsigned uBusPrimary,
     1804                                      unsigned uBusSecondary)
    17961805{
    17971806    PPCIDEVICE pBridgeDev = &pBus->aPciDev;
    17981807
    17991808    /* Set only if we are not on the root bus, it has no primary bus attached. */
    1800     if (pGlobals->uBus != 0)
    1801     {
    1802         PCIDevSetByte(pBridgeDev, VBOX_PCI_PRIMARY_BUS, pGlobals->uBus);
    1803         PCIDevSetByte(pBridgeDev, VBOX_PCI_SECONDARY_BUS, pGlobals->uBus);
    1804     }
    1805 
    1806     pGlobals->uBus++;
     1809    if (uBusSecondary != 0)
     1810    {
     1811        PCIDevSetByte(pBridgeDev, VBOX_PCI_PRIMARY_BUS, uBusPrimary);
     1812        PCIDevSetByte(pBridgeDev, VBOX_PCI_SECONDARY_BUS, uBusSecondary);
     1813    }
     1814
    18071815    for (uint32_t iBridge = 0; iBridge < pBus->cBridges; iBridge++)
    18081816    {
     
    18111819                  ("Device is not a PCI bridge but on the list of PCI bridges\n"));
    18121820        PICH9PCIBUS pChildBus = PDMINS_2_DATA(pBridge->pDevIns, PICH9PCIBUS);
    1813         ich9pciInitBridgeTopology(pGlobals, pChildBus);
     1821        pGlobals->uBus++;
     1822        ich9pciInitBridgeTopology(pGlobals, pChildBus, uBusSecondary, pGlobals->uBus);
    18141823    }
    18151824    PCIDevSetByte(pBridgeDev, VBOX_PCI_SUBORDINATE_BUS, pGlobals->uBus);
     
    18401849     */
    18411850    PICH9PCIBUS pBus = &pGlobals->aPciBus;
    1842     ich9pciInitBridgeTopology(pGlobals, pBus);
     1851    ich9pciInitBridgeTopology(pGlobals, pBus, 0, 0);
    18431852
    18441853    /*
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