- Timestamp:
- Oct 29, 2019 5:27:30 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/pdmdev.h
r81564 r81575 6770 6770 } 6771 6771 6772 6773 /** 6774 * Combines PDMDevHlpIoPortCreate and PDMDevHlpPCIIORegionRegisterIo, creating 6775 * and registering an I/O port region for the default PCI device. 6776 * 6777 * @returns VBox status code. 6778 * @param pDevIns The device instance to register the ports with. 6779 * @param cbPorts The size of the region in I/O ports. 6780 * @param iPciRegion The PCI device region in the high 16-bit word and 6781 * sub-region in the low 16-bit word. UINT32_MAX if NA. 6782 * @param pfnOut Pointer to function which is gonna handle OUT 6783 * operations. Optional. 6784 * @param pfnIn Pointer to function which is gonna handle IN operations. 6785 * Optional. 6786 * @param pvUser User argument to pass to the callbacks. 6787 * @param pszDesc Pointer to description string. This must not be freed. 6788 * @param paExtDescs Extended per-port descriptions, optional. Partial range 6789 * coverage is allowed. This must not be freed. 6790 * @param phIoPorts Where to return the I/O port range handle. 6791 * 6792 */ 6793 DECLINLINE(int) PDMDevHlpPCIIORegionCreateIo(PPDMDEVINS pDevIns, uint32_t iPciRegion, RTIOPORT cbPorts, 6794 PFNIOMIOPORTNEWOUT pfnOut, PFNIOMIOPORTNEWIN pfnIn, void *pvUser, 6795 const char *pszDesc, PCIOMIOPORTDESC paExtDescs, PIOMIOPORTHANDLE phIoPorts) 6796 6797 { 6798 int rc = pDevIns->pHlpR3->pfnIoPortCreateEx(pDevIns, cbPorts, 0 /*fFlags*/, pDevIns->apPciDevs[0], iPciRegion, 6799 pfnOut, pfnIn, NULL, NULL, pvUser, pszDesc, paExtDescs, phIoPorts); 6800 if (RT_SUCCESS(rc)) 6801 rc = pDevIns->pHlpR3->pfnPCIIORegionRegister(pDevIns, pDevIns->apPciDevs[0], iPciRegion, cbPorts, PCI_ADDRESS_SPACE_IO, 6802 PDMPCIDEV_IORGN_F_IOPORT_HANDLE, *phIoPorts, NULL /*pfnCallback*/); 6803 return rc; 6804 } 6805 6806 6772 6807 /** 6773 6808 * Registers an MMIO region for the default PCI device.
Note:
See TracChangeset
for help on using the changeset viewer.