- Timestamp:
- Oct 19, 2016 5:44:14 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Samples/DevPlayground.cpp
r64115 r64329 90 90 case 2: 91 91 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. */ 92 94 return PDMDevHlpMMIOExMap(pPciDev->pDevIns, iRegion, GCPhysAddress); 93 95 … … 145 147 if (RT_FAILURE(rc)) 146 148 return rc; 149 147 150 /* First region. */ 148 rc = PDMDevHlpPCIIORegionRegister(pDevIns, 0, 8*_1G64, 151 RTGCPHYS const cbFirst = 8*_1G64; 152 rc = PDMDevHlpPCIIORegionRegister(pDevIns, 0, cbFirst, 149 153 (PCIADDRESSSPACE)(PCI_ADDRESS_SPACE_MEM | PCI_ADDRESS_SPACE_BAR64), 150 154 devPlaygroundMap); 151 155 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", 153 157 NULL /*pvUser*/, devPlaygroundMMIOWrite, devPlaygroundMMIORead, NULL /*pfnFill*/, 154 158 NIL_RTR0PTR /*pvUserR0*/, NULL /*pszWriteR0*/, NULL /*pszReadR0*/, NULL /*pszFillR0*/, … … 157 161 158 162 /* Second region. */ 159 rc = PDMDevHlpPCIIORegionRegister(pDevIns, 2, 64*_1G64, 163 RTGCPHYS const cbSecond = 256*_1G64; 164 rc = PDMDevHlpPCIIORegionRegister(pDevIns, 2, cbSecond, 160 165 (PCIADDRESSSPACE)(PCI_ADDRESS_SPACE_MEM | PCI_ADDRESS_SPACE_BAR64), 161 166 devPlaygroundMap); 162 167 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", 164 169 NULL /*pvUser*/, devPlaygroundMMIOWrite, devPlaygroundMMIORead, NULL /*pfnFill*/, 165 170 NIL_RTR0PTR /*pvUserR0*/, NULL /*pszWriteR0*/, NULL /*pszReadR0*/, NULL /*pszFillR0*/,
Note:
See TracChangeset
for help on using the changeset viewer.