VirtualBox

Changeset 33142 in vbox


Ignore:
Timestamp:
Oct 14, 2010 5:25:09 PM (14 years ago)
Author:
vboxsync
Message:

PCI: new bus implementation can be used with IDE controller too

Location:
trunk/src/VBox/Devices
Files:
3 edited

Legend:

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

    r33127 r33142  
    415415    return VINF_SUCCESS;
    416416}
    417 
    418417
    419418static int ich9pciDataRead(PPCIGLOBALS pGlobals, uint32_t addr, int len, uint32_t *pu32)
     
    13531352static uint32_t ich9pciConfigRead(PPCIGLOBALS pGlobals, uint8_t uBus, uint8_t uDevFn, uint32_t addr, uint32_t len)
    13541353{
    1355     uint32_t u32Val;
     1354    uint32_t   u32Val = 0xffffffff;
    13561355    PciAddress aPciAddr;
    13571356
     
    18621861} PciSlotAssignments[] = {
    18631862    {
    1864         "piix3ide", 1, 1 // do we really need it?
    1865     },
    1866     {
    18671863        "lan",      25, 0 /* LAN controller */
    18681864    },
     
    18731869        "i82801",   30, 0 /* Host Controller */
    18741870    },
     1871    /**
     1872     *  Please note, that for devices being functions, like we do here, device 0
     1873     *  must be multifunction, i.e. have header type 0x80. Our LPC device is.
     1874     *  Alternative approach is to assign separate slot to each device.
     1875     */
    18751876    {
    18761877        "lpc",      31, 0 /* Low Pin Count bus */
    18771878    },
    18781879    {
     1880        "piix3ide", 31, 1 /* IDE controller */
     1881    },
     1882#if 0
     1883    {
    18791884        "ahci",     31, 2 /* SATA controller */
    18801885    },
     1886#endif
    18811887    {
    18821888        "smbus",    31, 3 /* System Management Bus */
     
    19391945     * Find device position
    19401946     */
    1941     if (iDev < 0)
     1947    if (iDev < 0 || !strcmp(pszName, "piix3ide"))
    19421948    {
    19431949        iDev = assignPosition(pBus, pPciDev, pszName);
  • trunk/src/VBox/Devices/PC/DevLPC.cpp

    r32476 r33142  
    236236    PCIDevSetClassSub         (&pThis->dev, 0x01); /* PCI-to-ISA Bridge */
    237237    PCIDevSetClassBase        (&pThis->dev, 0x06); /* Bridge */
    238     PCIDevSetHeaderType       (&pThis->dev, 0x00); /* normal device */
     238    PCIDevSetHeaderType       (&pThis->dev, 0x80); /* normal, multifunction device (so that other devices can be its functions) */
    239239    PCIDevSetSubSystemVendorId(&pThis->dev, 0x8086);
    240240    PCIDevSetSubSystemId      (&pThis->dev, 0x7270);
  • trunk/src/VBox/Devices/Storage/DevATA.cpp

    r32943 r33142  
    67386738        return PDMDEV_SET_ERROR(pDevIns, rc,
    67396739                                N_("PIIX3 cannot register PCI device"));
    6740     AssertMsg(pThis->dev.devfn == 9 || iInstance != 0, ("pThis->dev.devfn=%d\n", pThis->dev.devfn));
     6740    //AssertMsg(pThis->dev.devfn == 9 || iInstance != 0, ("pThis->dev.devfn=%d\n", pThis->dev.devfn));
    67416741    rc = PDMDevHlpPCIIORegionRegister(pDevIns, 4, 0x10, PCI_ADDRESS_SPACE_IO, ataBMDMAIORangeMap);
    67426742    if (RT_FAILURE(rc))
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