Changeset 63690 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Sep 2, 2016 12:15:07 PM (8 years ago)
- Location:
- trunk/src/VBox/Devices
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevIchAc97.cpp
r63562 r63690 2100 2100 */ 2101 2101 static DECLCALLBACK(int) 2102 ichac97IOPortMap(PPCIDEVICE pPciDev, int iRegion, RTGCPHYS GCPhysAddress, uint32_tcb, PCIADDRESSSPACE enmType)2102 ichac97IOPortMap(PPCIDEVICE pPciDev, int iRegion, RTGCPHYS GCPhysAddress, RTGCPHYS cb, PCIADDRESSSPACE enmType) 2103 2103 { 2104 2104 RT_NOREF(cb, enmType); -
trunk/src/VBox/Devices/Audio/DevIchHda.cpp
r63482 r63690 4768 4768 */ 4769 4769 static DECLCALLBACK(int) 4770 hdaPciIoRegionMap(PPCIDEVICE pPciDev, int iRegion, RTGCPHYS GCPhysAddress, uint32_tcb, PCIADDRESSSPACE enmType)4770 hdaPciIoRegionMap(PPCIDEVICE pPciDev, int iRegion, RTGCPHYS GCPhysAddress, RTGCPHYS cb, PCIADDRESSSPACE enmType) 4771 4771 { 4772 4772 RT_NOREF(iRegion, enmType); -
trunk/src/VBox/Devices/Bus/MsixCommon.cpp
r63562 r63690 149 149 } 150 150 151 static DECLCALLBACK(int) msixMap (PPCIDEVICE pPciDev, int iRegion, 152 RTGCPHYS GCPhysAddress, uint32_t cb, 153 PCIADDRESSSPACE enmType) 151 /** 152 * @callback_method_impl{FNPCIIOREGIONMAP} 153 */ 154 static DECLCALLBACK(int) msixMap(PPCIDEVICE pPciDev, int iRegion, RTGCPHYS GCPhysAddress, RTGCPHYS cb, PCIADDRESSSPACE enmType) 154 155 { 155 156 Assert(enmType == PCI_ADDRESS_SPACE_MEM); … … 198 199 if (!pciDevIsPassthrough(pDev)) 199 200 { 200 rc = PDMDevHlpPCIIORegionRegister 201 rc = PDMDevHlpPCIIORegionRegister(pDev->pDevIns, iBar, 0x1000, PCI_ADDRESS_SPACE_MEM, msixMap); 201 202 if (RT_FAILURE (rc)) 202 203 return rc; -
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA.cpp
r63478 r63690 3773 3773 * @param enmType One of the PCI_ADDRESS_SPACE_* values. 3774 3774 */ 3775 DECLCALLBACK(int) vmsvgaR3IORegionMap(PPCIDEVICE pPciDev, int iRegion, RTGCPHYS GCPhysAddress, uint32_t cb, PCIADDRESSSPACE enmType) 3775 DECLCALLBACK(int) vmsvgaR3IORegionMap(PPCIDEVICE pPciDev, int iRegion, RTGCPHYS GCPhysAddress, RTGCPHYS cb, 3776 PCIADDRESSSPACE enmType) 3776 3777 { 3777 3778 int rc; … … 3779 3780 PVGASTATE pThis = PDMINS_2_DATA(pDevIns, PVGASTATE); 3780 3781 3781 Log(("vgasvgaR3IORegionMap: iRegion=%d GCPhysAddress=%RGp cb=% #xenmType=%d\n", iRegion, GCPhysAddress, cb, enmType));3782 Log(("vgasvgaR3IORegionMap: iRegion=%d GCPhysAddress=%RGp cb=%RGp enmType=%d\n", iRegion, GCPhysAddress, cb, enmType)); 3782 3783 if (enmType == PCI_ADDRESS_SPACE_IO) 3783 3784 { -
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA.h
r62514 r63690 41 41 #define VMSVGA_ACTION_CHANGEMODE RT_BIT(VMSVGA_ACTION_CHANGEMODE_BIT) 42 42 43 DECLCALLBACK(int) vmsvgaR3IORegionMap(PPCIDEVICE pPciDev, int iRegion, RTGCPHYS GCPhysAddress, uint32_tcb, PCIADDRESSSPACE enmType);43 DECLCALLBACK(int) vmsvgaR3IORegionMap(PPCIDEVICE pPciDev, int iRegion, RTGCPHYS GCPhysAddress, RTGCPHYS cb, PCIADDRESSSPACE enmType); 44 44 45 45 DECLCALLBACK(void) vmsvgaPortSetViewport(PPDMIDISPLAYPORT pInterface, uint32_t uScreenId, uint32_t x, uint32_t y, uint32_t cx, uint32_t cy); -
trunk/src/VBox/Devices/Graphics/DevVGA.cpp
r63562 r63690 5408 5408 * @param enmType One of the PCI_ADDRESS_SPACE_* values. 5409 5409 */ 5410 static DECLCALLBACK(int) vgaR3IORegionMap(PPCIDEVICE pPciDev, /*unsigned*/ int iRegion, RTGCPHYS GCPhysAddress, uint32_t cb,5411 PCIADDRESSSPACE enmType)5410 static DECLCALLBACK(int) vgaR3IORegionMap(PPCIDEVICE pPciDev, /*unsigned*/ int iRegion, RTGCPHYS GCPhysAddress, 5411 RTGCPHYS cb, PCIADDRESSSPACE enmType) 5412 5412 { 5413 5413 RT_NOREF1(cb); … … 5415 5415 PPDMDEVINS pDevIns = pPciDev->pDevIns; 5416 5416 PVGASTATE pThis = PDMINS_2_DATA(pDevIns, PVGASTATE); 5417 Log(("vgaR3IORegionMap: iRegion=%d GCPhysAddress=%RGp cb=% #xenmType=%d\n", iRegion, GCPhysAddress, cb, enmType));5417 Log(("vgaR3IORegionMap: iRegion=%d GCPhysAddress=%RGp cb=%RGp enmType=%d\n", iRegion, GCPhysAddress, cb, enmType)); 5418 5418 #ifdef VBOX_WITH_VMSVGA 5419 5419 AssertReturn( (iRegion == ((pThis->fVMSVGAEnabled) ? 1 : 0)) … … 6550 6550 return rc; 6551 6551 /* VMware's MetalKit doesn't like PCI_ADDRESS_SPACE_MEM_PREFETCH */ 6552 rc = PDMDevHlpPCIIORegionRegister(pDevIns, 1 /* iRegion */, pThis->vram_size, PCI_ADDRESS_SPACE_MEM /* PCI_ADDRESS_SPACE_MEM_PREFETCH */, vgaR3IORegionMap); 6552 rc = PDMDevHlpPCIIORegionRegister(pDevIns, 1 /* iRegion */, pThis->vram_size, 6553 PCI_ADDRESS_SPACE_MEM /* PCI_ADDRESS_SPACE_MEM_PREFETCH */, vgaR3IORegionMap); 6553 6554 if (RT_FAILURE(rc)) 6554 6555 return rc; 6555 rc = PDMDevHlpPCIIORegionRegister(pDevIns, 2 /* iRegion */, VMSVGA_FIFO_SIZE, PCI_ADDRESS_SPACE_MEM /* PCI_ADDRESS_SPACE_MEM_PREFETCH */, vmsvgaR3IORegionMap); 6556 rc = PDMDevHlpPCIIORegionRegister(pDevIns, 2 /* iRegion */, VMSVGA_FIFO_SIZE, 6557 PCI_ADDRESS_SPACE_MEM /* PCI_ADDRESS_SPACE_MEM_PREFETCH */, vmsvgaR3IORegionMap); 6556 6558 if (RT_FAILURE(rc)) 6557 6559 return rc; … … 6559 6561 else 6560 6562 #endif /* VBOX_WITH_VMSVGA */ 6561 rc = PDMDevHlpPCIIORegionRegister(pDevIns, iPCIRegionVRAM, pThis->vram_size, PCI_ADDRESS_SPACE_MEM_PREFETCH, vgaR3IORegionMap); 6562 if (RT_FAILURE(rc)) 6563 return rc; 6563 { 6564 rc = PDMDevHlpPCIIORegionRegister(pDevIns, iPCIRegionVRAM, pThis->vram_size, 6565 PCI_ADDRESS_SPACE_MEM_PREFETCH, vgaR3IORegionMap); 6566 if (RT_FAILURE(rc)) 6567 return rc; 6568 } 6564 6569 6565 6570 /* -
trunk/src/VBox/Devices/Network/DevE1000.cpp
r63630 r63690 6085 6085 * @callback_method_impl{FNPCIIOREGIONMAP} 6086 6086 */ 6087 static DECLCALLBACK(int) e1kMap(PPCIDEVICE pPciDev, int iRegion, RTGCPHYS GCPhysAddress, uint32_tcb, PCIADDRESSSPACE enmType)6087 static DECLCALLBACK(int) e1kMap(PPCIDEVICE pPciDev, int iRegion, RTGCPHYS GCPhysAddress, RTGCPHYS cb, PCIADDRESSSPACE enmType) 6088 6088 { 6089 6089 RT_NOREF(iRegion); -
trunk/src/VBox/Devices/Network/DevPCNet.cpp
r63562 r63690 3868 3868 */ 3869 3869 static DECLCALLBACK(int) pcnetIOPortMap(PPCIDEVICE pPciDev, /*unsigned*/ int iRegion, 3870 RTGCPHYS GCPhysAddress, uint32_tcb, PCIADDRESSSPACE enmType)3870 RTGCPHYS GCPhysAddress, RTGCPHYS cb, PCIADDRESSSPACE enmType) 3871 3871 { 3872 3872 RT_NOREF(iRegion, cb, enmType); … … 3920 3920 */ 3921 3921 static DECLCALLBACK(int) pcnetMMIOMap(PPCIDEVICE pPciDev, /*unsigned*/ int iRegion, 3922 RTGCPHYS GCPhysAddress, uint32_tcb, PCIADDRESSSPACE enmType)3922 RTGCPHYS GCPhysAddress, RTGCPHYS cb, PCIADDRESSSPACE enmType) 3923 3923 { 3924 3924 RT_NOREF(iRegion, cb, enmType); -
trunk/src/VBox/Devices/Network/DevVirtioNet.cpp
r63669 r63690 1778 1778 * @callback_method_impl{FNPCIIOREGIONMAP} 1779 1779 */ 1780 static DECLCALLBACK(int) vnetMap(PPCIDEVICE pPciDev, int iRegion, RTGCPHYS GCPhysAddress, uint32_tcb, PCIADDRESSSPACE enmType)1780 static DECLCALLBACK(int) vnetMap(PPCIDEVICE pPciDev, int iRegion, RTGCPHYS GCPhysAddress, RTGCPHYS cb, PCIADDRESSSPACE enmType) 1781 1781 { 1782 1782 RT_NOREF(iRegion); -
trunk/src/VBox/Devices/Serial/DevSerial.cpp
r62906 r63690 1052 1052 */ 1053 1053 static DECLCALLBACK(int) serialIOPortRegionMap(PPCIDEVICE pPciDev, int iRegion, RTGCPHYS GCPhysAddress, 1054 uint32_tcb, PCIADDRESSSPACE enmType)1054 RTGCPHYS cb, PCIADDRESSSPACE enmType) 1055 1055 { 1056 1056 PDEVSERIAL pThis = RT_FROM_MEMBER(pPciDev, DEVSERIAL, PciDev); -
trunk/src/VBox/Devices/Storage/DevAHCI.cpp
r63562 r63690 2549 2549 #ifdef IN_RING3 2550 2550 2551 static DECLCALLBACK(int) 2552 ahciR3MMIOMap(PPCIDEVICE pPciDev, /*unsigned*/ int iRegion, RTGCPHYS GCPhysAddress, uint32_t cb, PCIADDRESSSPACE enmType) 2551 /** 2552 * @callback_method_impl{FNPCIIOREGIONMAP} 2553 */ 2554 static DECLCALLBACK(int) ahciR3MMIOMap(PPCIDEVICE pPciDev, /*unsigned*/ int iRegion, RTGCPHYS GCPhysAddress, 2555 RTGCPHYS cb, PCIADDRESSSPACE enmType) 2556 { 2557 RT_NOREF(iRegion, enmType); 2558 PAHCI pThis = PCIDEV_2_PAHCI(pPciDev); 2559 PPDMDEVINS pDevIns = pPciDev->pDevIns; 2560 2561 Log2(("%s: registering MMIO area at GCPhysAddr=%RGp cb=%RGp\n", __FUNCTION__, GCPhysAddress, cb)); 2562 2563 Assert(enmType == PCI_ADDRESS_SPACE_MEM); 2564 Assert(cb >= 4352); 2565 2566 /* We use the assigned size here, because we currently only support page aligned MMIO ranges. */ 2567 /** @todo change this to IOMMMIO_FLAGS_WRITE_ONLY_DWORD once EM/IOM starts 2568 * handling 2nd DWORD failures on split accesses correctly. */ 2569 int rc = PDMDevHlpMMIORegister(pDevIns, GCPhysAddress, cb, NULL /*pvUser*/, 2570 IOMMMIO_FLAGS_READ_DWORD | IOMMMIO_FLAGS_WRITE_ONLY_DWORD_QWORD, 2571 ahciMMIOWrite, ahciMMIORead, "AHCI"); 2572 if (RT_FAILURE(rc)) 2573 return rc; 2574 2575 if (pThis->fR0Enabled) 2576 { 2577 rc = PDMDevHlpMMIORegisterR0(pDevIns, GCPhysAddress, cb, NIL_RTR0PTR /*pvUser*/, "ahciMMIOWrite", "ahciMMIORead"); 2578 if (RT_FAILURE(rc)) 2579 return rc; 2580 } 2581 2582 if (pThis->fGCEnabled) 2583 { 2584 rc = PDMDevHlpMMIORegisterRC(pDevIns, GCPhysAddress, cb, NIL_RTRCPTR /*pvUser*/, "ahciMMIOWrite", "ahciMMIORead"); 2585 if (RT_FAILURE(rc)) 2586 return rc; 2587 } 2588 2589 pThis->MMIOBase = GCPhysAddress; 2590 return rc; 2591 } 2592 2593 2594 /** 2595 * @callback_method_impl{FNPCIIOREGIONMAP, 2596 * Map the legacy I/O port ranges to make Solaris work with the 2597 * controller.} 2598 */ 2599 static DECLCALLBACK(int) ahciR3LegacyFakeIORangeMap(PPCIDEVICE pPciDev, /*unsigned*/ int iRegion, RTGCPHYS GCPhysAddress, 2600 RTGCPHYS cb, PCIADDRESSSPACE enmType) 2553 2601 { 2554 2602 RT_NOREF(iRegion, enmType); … … 2557 2605 int rc = VINF_SUCCESS; 2558 2606 2559 Log2(("%s: registering MMIO area at GCPhysAddr=%RGp cb=%u\n", __FUNCTION__, GCPhysAddress, cb)); 2560 2561 Assert(enmType == PCI_ADDRESS_SPACE_MEM); 2562 Assert(cb >= 4352); 2563 2564 /* We use the assigned size here, because we currently only support page aligned MMIO ranges. */ 2565 /** @todo change this to IOMMMIO_FLAGS_WRITE_ONLY_DWORD once EM/IOM starts 2566 * handling 2nd DWORD failures on split accesses correctly. */ 2567 rc = PDMDevHlpMMIORegister(pDevIns, GCPhysAddress, cb, NULL /*pvUser*/, 2568 IOMMMIO_FLAGS_READ_DWORD | IOMMMIO_FLAGS_WRITE_ONLY_DWORD_QWORD, 2569 ahciMMIOWrite, ahciMMIORead, "AHCI"); 2570 if (RT_FAILURE(rc)) 2571 return rc; 2572 2573 if (pThis->fR0Enabled) 2574 { 2575 rc = PDMDevHlpMMIORegisterR0(pDevIns, GCPhysAddress, cb, NIL_RTR0PTR /*pvUser*/, "ahciMMIOWrite", "ahciMMIORead"); 2576 if (RT_FAILURE(rc)) 2577 return rc; 2578 } 2579 2580 if (pThis->fGCEnabled) 2581 { 2582 rc = PDMDevHlpMMIORegisterRC(pDevIns, GCPhysAddress, cb, NIL_RTRCPTR /*pvUser*/, "ahciMMIOWrite", "ahciMMIORead"); 2583 if (RT_FAILURE(rc)) 2584 return rc; 2585 } 2586 2587 pThis->MMIOBase = GCPhysAddress; 2588 return rc; 2589 } 2590 2591 /** 2592 * Map the legacy I/O port ranges to make Solaris work with the controller. 2593 */ 2594 static DECLCALLBACK(int) 2595 ahciR3LegacyFakeIORangeMap(PPCIDEVICE pPciDev, /*unsigned*/ int iRegion, RTGCPHYS GCPhysAddress, uint32_t cb, PCIADDRESSSPACE enmType) 2596 { 2597 RT_NOREF(iRegion, enmType); 2598 PAHCI pThis = PCIDEV_2_PAHCI(pPciDev); 2599 PPDMDEVINS pDevIns = pPciDev->pDevIns; 2600 int rc = VINF_SUCCESS; 2601 2602 Log2(("%s: registering fake I/O area at GCPhysAddr=%RGp cb=%u\n", __FUNCTION__, GCPhysAddress, cb)); 2607 Log2(("%s: registering fake I/O area at GCPhysAddr=%RGp cb=%RGp\n", __FUNCTION__, GCPhysAddress, cb)); 2603 2608 2604 2609 Assert(enmType == PCI_ADDRESS_SPACE_IO); … … 2630 2635 2631 2636 /** 2632 * Map the BMDMA I/O port range (used for the Index/Data pair register access) 2633 */ 2634 static DECLCALLBACK(int) 2635 ahciR3IdxDataIORangeMap(PPCIDEVICE pPciDev, /*unsigned*/ int iRegion, RTGCPHYS GCPhysAddress, uint32_t cb, PCIADDRESSSPACE enmType) 2637 * @callback_method_impl{FNPCIIOREGIONMAP, 2638 * Map the BMDMA I/O port range (used for the Index/Data pair register access)} 2639 */ 2640 static DECLCALLBACK(int) ahciR3IdxDataIORangeMap(PPCIDEVICE pPciDev, /*unsigned*/ int iRegion, RTGCPHYS GCPhysAddress, 2641 RTGCPHYS cb, PCIADDRESSSPACE enmType) 2636 2642 { 2637 2643 RT_NOREF(iRegion, enmType); … … 2640 2646 int rc = VINF_SUCCESS; 2641 2647 2642 Log2(("%s: registering fake I/O area at GCPhysAddr=%RGp cb=% u\n", __FUNCTION__, GCPhysAddress, cb));2648 Log2(("%s: registering fake I/O area at GCPhysAddr=%RGp cb=%RGp\n", __FUNCTION__, GCPhysAddress, cb)); 2643 2649 2644 2650 Assert(enmType == PCI_ADDRESS_SPACE_IO); -
trunk/src/VBox/Devices/Storage/DevATA.cpp
r63562 r63690 6123 6123 */ 6124 6124 static DECLCALLBACK(int) ataR3BMDMAIORangeMap(PPCIDEVICE pPciDev, /*unsigned*/ int iRegion, 6125 RTGCPHYS GCPhysAddress, uint32_tcb, PCIADDRESSSPACE enmType)6125 RTGCPHYS GCPhysAddress, RTGCPHYS cb, PCIADDRESSSPACE enmType) 6126 6126 { 6127 6127 RT_NOREF(iRegion, cb, enmType); -
trunk/src/VBox/Devices/Storage/DevBusLogic.cpp
r63478 r63690 2768 2768 2769 2769 2770 /** 2771 * @callback_method_impl{FNPCIIOREGIONMAP} 2772 */ 2770 2773 static DECLCALLBACK(int) buslogicR3MmioMap(PPCIDEVICE pPciDev, /*unsigned*/ int iRegion, 2771 RTGCPHYS GCPhysAddress, uint32_tcb, PCIADDRESSSPACE enmType)2774 RTGCPHYS GCPhysAddress, RTGCPHYS cb, PCIADDRESSSPACE enmType) 2772 2775 { 2773 2776 RT_NOREF(iRegion); … … 2776 2779 int rc = VINF_SUCCESS; 2777 2780 2778 Log2(("%s: registering MMIO area at GCPhysAddr=%RGp cb=% u\n", __FUNCTION__, GCPhysAddress, cb));2781 Log2(("%s: registering MMIO area at GCPhysAddr=%RGp cb=%RGp\n", __FUNCTION__, GCPhysAddress, cb)); 2779 2782 2780 2783 Assert(cb >= 32); -
trunk/src/VBox/Devices/Storage/DevLsiLogicSCSI.cpp
r63562 r63690 3940 3940 */ 3941 3941 static DECLCALLBACK(int) lsilogicR3Map(PPCIDEVICE pPciDev, /*unsigned*/ int iRegion, 3942 RTGCPHYS GCPhysAddress, uint32_tcb,3942 RTGCPHYS GCPhysAddress, RTGCPHYS cb, 3943 3943 PCIADDRESSSPACE enmType) 3944 3944 { … … 3953 3953 : "LsiLogicSasDiag"; 3954 3954 3955 Log2(("%s: registering area at GCPhysAddr=%RGp cb=% u\n", __FUNCTION__, GCPhysAddress, cb));3955 Log2(("%s: registering area at GCPhysAddr=%RGp cb=%RGp\n", __FUNCTION__, GCPhysAddress, cb)); 3956 3956 3957 3957 AssertMsg( (enmType == PCI_ADDRESS_SPACE_MEM && cb >= LSILOGIC_PCI_SPACE_MEM_SIZE) -
trunk/src/VBox/Devices/USB/DevOHCI.cpp
r63562 r63690 5360 5360 * @callback_method_impl{FNPCIIOREGIONMAP} 5361 5361 */ 5362 static DECLCALLBACK(int) ohciR3Map(PPCIDEVICE pPciDev, int iRegion, RTGCPHYS GCPhysAddress, uint32_tcb, PCIADDRESSSPACE enmType)5362 static DECLCALLBACK(int) ohciR3Map(PPCIDEVICE pPciDev, int iRegion, RTGCPHYS GCPhysAddress, RTGCPHYS cb, PCIADDRESSSPACE enmType) 5363 5363 { 5364 5364 RT_NOREF(iRegion, enmType); -
trunk/src/VBox/Devices/VMMDev/VMMDev.cpp
r63016 r63690 2879 2879 */ 2880 2880 static DECLCALLBACK(int) 2881 vmmdevIORAMRegionMap(PPCIDEVICE pPciDev, int iRegion, RTGCPHYS GCPhysAddress, uint32_tcb, PCIADDRESSSPACE enmType)2881 vmmdevIORAMRegionMap(PPCIDEVICE pPciDev, int iRegion, RTGCPHYS GCPhysAddress, RTGCPHYS cb, PCIADDRESSSPACE enmType) 2882 2882 { 2883 2883 RT_NOREF1(cb); 2884 LogFlow(("vmmdevR3IORAMRegionMap: iRegion=%d GCPhysAddress=%RGp cb=% #xenmType=%d\n", iRegion, GCPhysAddress, cb, enmType));2884 LogFlow(("vmmdevR3IORAMRegionMap: iRegion=%d GCPhysAddress=%RGp cb=%RGp enmType=%d\n", iRegion, GCPhysAddress, cb, enmType)); 2885 2885 PVMMDEV pThis = RT_FROM_MEMBER(pPciDev, VMMDEV, PciDev); 2886 2886 int rc; … … 2947 2947 */ 2948 2948 static DECLCALLBACK(int) 2949 vmmdevIOPortRegionMap(PPCIDEVICE pPciDev, int iRegion, RTGCPHYS GCPhysAddress, uint32_tcb, PCIADDRESSSPACE enmType)2949 vmmdevIOPortRegionMap(PPCIDEVICE pPciDev, int iRegion, RTGCPHYS GCPhysAddress, RTGCPHYS cb, PCIADDRESSSPACE enmType) 2950 2950 { 2951 2951 RT_NOREF3(iRegion, cb, enmType);
Note:
See TracChangeset
for help on using the changeset viewer.