VirtualBox

Changeset 36138 in vbox for trunk/src/VBox/Devices/Bus


Ignore:
Timestamp:
Mar 3, 2011 10:44:55 AM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
70318
Message:

PCI: some of 64-bit BARs support (many real cards do that)

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

Legend:

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

    r36124 r36138  
    895895     * Validate.
    896896     */
    897     AssertMsgReturn(   enmType == PCI_ADDRESS_SPACE_MEM
    898                     || enmType == PCI_ADDRESS_SPACE_IO
    899                     || enmType == PCI_ADDRESS_SPACE_MEM_PREFETCH,
     897    AssertMsgReturn(   enmType == (PCI_ADDRESS_SPACE_MEM | PCI_ADDRESS_SPACE_BAR32)
     898                    || enmType == (PCI_ADDRESS_SPACE_MEM_PREFETCH | PCI_ADDRESS_SPACE_BAR32)
     899                    || enmType == (PCI_ADDRESS_SPACE_MEM | PCI_ADDRESS_SPACE_BAR64)
     900                    || enmType == (PCI_ADDRESS_SPACE_MEM_PREFETCH | PCI_ADDRESS_SPACE_BAR64)
     901                    || enmType ==  PCI_ADDRESS_SPACE_IO
     902                    ,
    900903                    ("Invalid enmType=%#x? Or was this a bitmask after all...\n", enmType),
    901904                    VERR_INVALID_PARAMETER);
     
    909912                    VERR_INVALID_PARAMETER);
    910913
     914    Log(("ich9pciIORegionRegister: %s region %d size %d type %x\n",
     915         pPciDev->name, iRegion, cbRegion, enmType));
     916
    911917    /*
    912918     * Register the I/O region.
     
    920926    /* Set type in the config space. */
    921927    uint32_t u32Address = ich9pciGetRegionReg(iRegion);
    922     uint32_t u32Value   =   (enmType == PCI_ADDRESS_SPACE_MEM_PREFETCH ? (1 << 3) : 0)
    923                           | (enmType == PCI_ADDRESS_SPACE_IO ? 1 : 0);
     928    uint32_t u32Value   =
     929          (((enmType & PCI_ADDRESS_SPACE_MEM_PREFETCH) != 0) ? (1 << 3) : 0)
     930        | (((enmType & PCI_ADDRESS_SPACE_IO) != 0)  ? 1 : 0);
    924931    PCIDevSetDWord(pPciDev, u32Address, u32Value);
    925932
     
    16001607    uint16_t uDevClass, uVendor, uDevice;
    16011608    uint8_t uCmd;
    1602 
     1609   
    16031610    uDevClass  = ich9pciConfigRead(pGlobals, uBus, uDevFn, VBOX_PCI_CLASS_DEVICE, 2);
    16041611    uVendor    = ich9pciConfigRead(pGlobals, uBus, uDevFn, VBOX_PCI_VENDOR_ID, 2);
     
    25842591                           VBOX_PCI_COMMAND_MEMORY |
    25852592                           VBOX_PCI_COMMAND_MASTER));
    2586        
     2593
    25872594        /* Bridge device reset handlers processed later */
    25882595        if (!pciDevIsPci2PciBridge(pDev))
  • trunk/src/VBox/Devices/Bus/PCIInternal.h

    r36079 r36138  
    2424typedef struct PCIIOREGION
    2525{
    26     /** Current PCI mapping address, 0xffffffff means not mapped.
    27         @todo: make address and size 64-bit. */
    28     uint32_t                        addr;
    29     uint32_t                        size;
     26    /** Current PCI mapping address, 0xffffffff means not mapped. */
     27    uint64_t                        addr;
     28    uint64_t                        size;
    3029    uint8_t                         type; /* PCIADDRESSSPACE */
    3130    uint8_t                         padding[HC_ARCH_BITS == 32 ? 3 : 7];
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