VirtualBox

Changeset 64329 in vbox for trunk/src


Ignore:
Timestamp:
Oct 19, 2016 5:44:14 PM (8 years ago)
Author:
vboxsync
Message:

DevPlayground: Increased the 2nd region to 256GB to make sure that works.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Samples/DevPlayground.cpp

    r64115 r64329  
    9090        case 2:
    9191            Assert(enmType == (PCIADDRESSSPACE)(PCI_ADDRESS_SPACE_MEM | PCI_ADDRESS_SPACE_BAR64));
     92            if (GCPhysAddress == NIL_RTGCPHYS)
     93                return VINF_SUCCESS; /* We ignore the unmap notification. */
    9294            return PDMDevHlpMMIOExMap(pPciDev->pDevIns, iRegion, GCPhysAddress);
    9395
     
    145147    if (RT_FAILURE(rc))
    146148        return rc;
     149
    147150    /* First region. */
    148     rc = PDMDevHlpPCIIORegionRegister(pDevIns, 0, 8*_1G64,
     151    RTGCPHYS const cbFirst = 8*_1G64;
     152    rc = PDMDevHlpPCIIORegionRegister(pDevIns, 0, cbFirst,
    149153                                      (PCIADDRESSSPACE)(PCI_ADDRESS_SPACE_MEM | PCI_ADDRESS_SPACE_BAR64),
    150154                                      devPlaygroundMap);
    151155    AssertLogRelRCReturn(rc, rc);
    152     rc = PDMDevHlpMMIOExPreRegister(pDevIns, 0, 8*_1G64, IOMMMIO_FLAGS_READ_PASSTHRU | IOMMMIO_FLAGS_WRITE_PASSTHRU, "PG-BAR0",
     156    rc = PDMDevHlpMMIOExPreRegister(pDevIns, 0, cbFirst, IOMMMIO_FLAGS_READ_PASSTHRU | IOMMMIO_FLAGS_WRITE_PASSTHRU, "PG-BAR0",
    153157                                    NULL /*pvUser*/,  devPlaygroundMMIOWrite, devPlaygroundMMIORead, NULL /*pfnFill*/,
    154158                                    NIL_RTR0PTR /*pvUserR0*/, NULL /*pszWriteR0*/, NULL /*pszReadR0*/, NULL /*pszFillR0*/,
     
    157161
    158162    /* Second region. */
    159     rc = PDMDevHlpPCIIORegionRegister(pDevIns, 2, 64*_1G64,
     163    RTGCPHYS const cbSecond = 256*_1G64;
     164    rc = PDMDevHlpPCIIORegionRegister(pDevIns, 2, cbSecond,
    160165                                      (PCIADDRESSSPACE)(PCI_ADDRESS_SPACE_MEM | PCI_ADDRESS_SPACE_BAR64),
    161166                                      devPlaygroundMap);
    162167    AssertLogRelRCReturn(rc, rc);
    163     rc = PDMDevHlpMMIOExPreRegister(pDevIns, 2, 64*_1G64, IOMMMIO_FLAGS_READ_PASSTHRU | IOMMMIO_FLAGS_WRITE_PASSTHRU, "PG-BAR2",
     168    rc = PDMDevHlpMMIOExPreRegister(pDevIns, 2, cbSecond, IOMMMIO_FLAGS_READ_PASSTHRU | IOMMMIO_FLAGS_WRITE_PASSTHRU, "PG-BAR2",
    164169                                    NULL /*pvUser*/,  devPlaygroundMMIOWrite, devPlaygroundMMIORead, NULL /*pfnFill*/,
    165170                                    NIL_RTR0PTR /*pvUserR0*/, NULL /*pszWriteR0*/, NULL /*pszReadR0*/, NULL /*pszFillR0*/,
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