Changeset 81567 in vbox
- Timestamp:
- Oct 29, 2019 10:53:14 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DevE1000.cpp
r81514 r81567 1057 1057 PDMCRITSECT csTx; 1058 1058 #endif /* E1K_WITH_TX_CS */ 1059 /** Base address of memory-mapped registers. */1060 RTGCPHYS addrMMReg;1061 1059 /** MAC address obtained from the configuration. */ 1062 1060 RTMAC macConfigured; 1063 /** Base port of I/O space region. */ 1064 RTIOPORT IOPortBase; 1061 uint16_t u16Padding0; 1065 1062 /** EMT: Last time the interrupt was acknowledged. */ 1066 1063 uint64_t u64AckedAt; … … 6353 6350 } 6354 6351 6355 /**6356 * @callback_method_impl{FNPCIIOREGIONMAP}6357 *6358 * @todo Can remove this one later, it's realy just here for taking down6359 * addresses for e1kInfo(), an alignment assertion and sentimentality.6360 */6361 static DECLCALLBACK(int) e1kR3Map(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, uint32_t iRegion,6362 RTGCPHYS GCPhysAddress, RTGCPHYS cb, PCIADDRESSSPACE enmType)6363 {6364 PE1KSTATE pThis = PDMINS_2_DATA(pDevIns, PE1KSTATE);6365 E1kLog(("%s e1kR3Map: iRegion=%u GCPhysAddress=%RGp\n", pThis->szPrf, iRegion, GCPhysAddress));6366 RT_NOREF(pPciDev, iRegion, cb);6367 Assert(pPciDev == pDevIns->apPciDevs[0]);6368 6369 switch (enmType)6370 {6371 case PCI_ADDRESS_SPACE_IO:6372 pThis->IOPortBase = (RTIOPORT)GCPhysAddress;6373 break;6374 6375 case PCI_ADDRESS_SPACE_MEM:6376 pThis->addrMMReg = GCPhysAddress;6377 Assert(!(GCPhysAddress & 7) || GCPhysAddress == NIL_RTGCPHYS);6378 break;6379 6380 default:6381 /* We should never get here */6382 AssertMsgFailedReturn(("Invalid PCI address space param in map callback"), VERR_INTERNAL_ERROR);6383 }6384 return VINF_SUCCESS;6385 }6386 6387 6352 6388 6353 /* -=-=-=-=- PDMINETWORKDOWN -=-=-=-=- */ … … 7296 7261 * Show info. 7297 7262 */ 7298 pHlp->pfnPrintf(pHlp, "E1000 #%d: port=%RTiop mmio=%RGp mac-cfg=%RTmac %s%s%s\n", 7299 pDevIns->iInstance, pThis->IOPortBase, pThis->addrMMReg, 7263 pHlp->pfnPrintf(pHlp, "E1000 #%d: port=%04x mmio=%RGp mac-cfg=%RTmac %s%s%s\n", 7264 pDevIns->iInstance, 7265 PDMDevHlpIoPortGetMappingAddress(pDevIns, pThis->hIoPorts), 7266 PDMDevHlpMmioGetMappingAddress(pDevIns, pThis->hMmioRegion), 7300 7267 &pThis->macConfigured, g_aChips[pThis->eChip].pcszName, 7301 7268 pDevIns->fRCEnabled ? " RC" : "", pDevIns->fR0Enabled ? " R0" : ""); … … 7900 7867 e1kMMIOWrite, e1kMMIORead, NULL /*pfnFill*/, NULL /*pvUser*/, "E1000", &pThis->hMmioRegion); 7901 7868 AssertRCReturn(rc, rc); 7902 rc = PDMDevHlpPCIIORegionRegisterMmio(pDevIns, 0, E1K_MM_SIZE, PCI_ADDRESS_SPACE_MEM, pThis->hMmioRegion, e1kR3Map);7869 rc = PDMDevHlpPCIIORegionRegisterMmio(pDevIns, 0, E1K_MM_SIZE, PCI_ADDRESS_SPACE_MEM, pThis->hMmioRegion, NULL); 7903 7870 AssertRCReturn(rc, rc); 7904 7871 … … 7913 7880 e1kIOPortOut, e1kIOPortIn, NULL /*pvUser*/, "E1000", s_aExtDescs, &pThis->hIoPorts); 7914 7881 AssertRCReturn(rc, rc); 7915 rc = PDMDevHlpPCIIORegionRegisterIo(pDevIns, 2, E1K_IOPORT_SIZE, pThis->hIoPorts, e1kR3Map);7882 rc = PDMDevHlpPCIIORegionRegisterIo(pDevIns, 2, E1K_IOPORT_SIZE, pThis->hIoPorts, NULL); 7916 7883 AssertRCReturn(rc, rc); 7917 7884
Note:
See TracChangeset
for help on using the changeset viewer.