Changeset 99743 in vbox
- Timestamp:
- May 11, 2023 9:59:52 AM (19 months ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/pdmdev.h
r99739 r99743 2430 2430 2431 2431 /** Current PDMDEVHLPR3 version number. */ 2432 #define PDM_DEVHLPR3_VERSION PDM_VERSION_MAKE_PP(0xffe7, 6 5, 0)2432 #define PDM_DEVHLPR3_VERSION PDM_VERSION_MAKE_PP(0xffe7, 66, 0) 2433 2433 2434 2434 /** … … 2516 2516 2517 2517 /** 2518 * Writes toan I/O port register.2518 * Reads from an I/O port register. 2519 2519 * 2520 2520 * @returns Strict VBox status code. Informational status codes other than the one documented … … 2530 2530 * 2531 2531 * @thread EMT 2532 * @todo r=aeichner This is only used by DevPCI.cpp to write the ELCR of the PIC. This shouldn't be done that way 2533 * and removed again as soon as possible (no time right now)... 2532 * 2533 * @note This is required for the ARM platform in order to emulate PIO accesses through a dedicated MMIO region. 2534 */ 2535 DECLR3CALLBACKMEMBER(VBOXSTRICTRC, pfnIoPortRead,(PPDMDEVINS pDevIns, RTIOPORT Port, uint32_t *pu32Value, size_t cbValue)); 2536 2537 /** 2538 * Writes to an I/O port register. 2539 * 2540 * @returns Strict VBox status code. Informational status codes other than the one documented 2541 * here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 2542 * @retval VINF_SUCCESS Success. 2543 * @retval VINF_EM_FIRST-VINF_EM_LAST Success with some exceptions (see IOM_SUCCESS()), the 2544 * status code must be passed on to EM. 2545 * 2546 * @param pDevIns The device instance to register the ports with. 2547 * @param Port The port to write to. 2548 * @param u32Value The value to write. 2549 * @param cbValue The size of the register to read in bytes. 1, 2 or 4 bytes. 2550 * 2551 * @thread EMT 2552 * 2553 * @note This is required for the ARM platform in order to emulate PIO accesses through a dedicated MMIO region. 2534 2554 */ 2535 2555 DECLR3CALLBACKMEMBER(VBOXSTRICTRC, pfnIoPortWrite,(PPDMDEVINS pDevIns, RTIOPORT Port, uint32_t u32Value, size_t cbValue)); … … 6638 6658 } 6639 6659 6660 /** 6661 * @copydoc PDMDEVHLPR3::pfnIoPortRead 6662 */ 6663 DECLINLINE(VBOXSTRICTRC) PDMDevHlpIoPortRead(PPDMDEVINS pDevIns, RTIOPORT Port, uint32_t *pu32Value, size_t cbValue) 6664 { 6665 return pDevIns->pHlpR3->pfnIoPortRead(pDevIns, Port, pu32Value, cbValue); 6666 } 6667 6668 /** 6669 * @copydoc PDMDEVHLPR3::pfnIoPortWrite 6670 */ 6671 DECLINLINE(VBOXSTRICTRC) PDMDevHlpIoPortWrite(PPDMDEVINS pDevIns, RTIOPORT Port, uint32_t u32Value, size_t cbValue) 6672 { 6673 return pDevIns->pHlpR3->pfnIoPortWrite(pDevIns, Port, u32Value, cbValue); 6674 } 6675 6640 6676 6641 6677 #endif /* IN_RING3 */ -
trunk/src/VBox/VMM/Makefile.kmk
r99385 r99743 379 379 VMMR3/IEMR3.cpp \ 380 380 VMMR3/IOM.cpp \ 381 VMMR3/IOMR3IoPort.cpp \ 381 382 VMMR3/IOMR3Mmio.cpp \ 382 383 VMMR3/GMM.cpp \ -
trunk/src/VBox/VMM/VMMR3/PDMDevHlp.cpp
r99051 r99743 90 90 VM_ASSERT_STATE_RETURN(pVM, VMSTATE_CREATING, VERR_VM_INVALID_VM_STATE); 91 91 92 #if defined(VBOX_VMM_TARGET_ARMV8)93 int rc = VERR_NOT_SUPPORTED;94 AssertReleaseFailed();95 #else96 92 int rc = IOMR3IoPortCreate(pVM, pDevIns, cPorts, fFlags, pPciDev, iPciRegion, 97 93 pfnOut, pfnIn, pfnOutStr, pfnInStr, pvUser, pszDesc, paExtDescs, phIoPorts); 98 #endif99 94 100 95 LogFlow(("pdmR3DevHlp_IoPortCreateEx: caller='%s'/%d: returns %Rrc (*phIoPorts=%#x)\n", … … 112 107 VM_ASSERT_EMT_RETURN(pVM, VERR_VM_THREAD_NOT_EMT); 113 108 114 #if defined(VBOX_VMM_TARGET_ARMV8)115 int rc = VERR_NOT_SUPPORTED;116 AssertReleaseFailed();117 #else118 109 int rc = IOMR3IoPortMap(pVM, pDevIns, hIoPorts, Port); 119 #endif120 110 121 111 LogFlow(("pdmR3DevHlp_IoPortMap: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); … … 132 122 VM_ASSERT_EMT_RETURN(pVM, VERR_VM_THREAD_NOT_EMT); 133 123 134 #if defined(VBOX_VMM_TARGET_ARMV8)135 int rc = VERR_NOT_SUPPORTED;136 AssertReleaseFailed();137 #else138 124 int rc = IOMR3IoPortUnmap(pVM, pDevIns, hIoPorts); 139 #endif140 125 141 126 LogFlow(("pdmR3DevHlp_IoPortMap: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); … … 150 135 LogFlow(("pdmR3DevHlp_IoPortGetMappingAddress: caller='%s'/%d: hIoPorts=%#x\n", pDevIns->pReg->szName, pDevIns->iInstance, hIoPorts)); 151 136 152 #if defined(VBOX_VMM_TARGET_ARMV8)153 uint32_t uAddress = UINT32_MAX;154 AssertReleaseFailed();155 #else156 137 uint32_t uAddress = IOMR3IoPortGetMappingAddress(pDevIns->Internal.s.pVMR3, pDevIns, hIoPorts); 157 #endif158 138 159 139 LogFlow(("pdmR3DevHlp_IoPortGetMappingAddress: caller='%s'/%d: returns %#RX32\n", pDevIns->pReg->szName, pDevIns->iInstance, uAddress)); … … 162 142 163 143 144 /** @interface_method_impl{PDMDEVHLPR3,pfnIoPortRead} */ 145 static DECLCALLBACK(VBOXSTRICTRC) pdmR3DevHlp_IoPortRead(PPDMDEVINS pDevIns, RTIOPORT Port, uint32_t *pu32Value, size_t cbValue) 146 { 147 PDMDEV_ASSERT_DEVINS(pDevIns); 148 LogFlow(("pdmR3DevHlp_IoPortRead: caller='%s'/%d:\n", pDevIns->pReg->szName, pDevIns->iInstance)); 149 PVM pVM = pDevIns->Internal.s.pVMR3; 150 VM_ASSERT_EMT_RETURN(pVM, VERR_VM_THREAD_NOT_EMT); 151 152 PVMCPU pVCpu = VMMGetCpu(pVM); 153 AssertPtrReturn(pVCpu, VERR_ACCESS_DENIED); 154 155 VBOXSTRICTRC rcStrict = IOMIOPortRead(pVM, pVCpu, Port, pu32Value, cbValue); 156 157 LogFlow(("pdmR3DevHlp_IoPortRead: caller='%s'/%d: returns %Rrc\n", 158 pDevIns->pReg->szName, pDevIns->iInstance, VBOXSTRICTRC_VAL(rcStrict))); 159 return rcStrict; 160 } 161 162 164 163 /** @interface_method_impl{PDMDEVHLPR3,pfnIoPortWrite} */ 165 164 static DECLCALLBACK(VBOXSTRICTRC) pdmR3DevHlp_IoPortWrite(PPDMDEVINS pDevIns, RTIOPORT Port, uint32_t u32Value, size_t cbValue) … … 170 169 VM_ASSERT_EMT_RETURN(pVM, VERR_VM_THREAD_NOT_EMT); 171 170 172 #if defined(VBOX_VMM_TARGET_ARMV8)173 RT_NOREF(Port, u32Value, cbValue);174 VBOXSTRICTRC rcStrict = VERR_NOT_SUPPORTED;175 AssertReleaseFailed();176 #else177 171 PVMCPU pVCpu = VMMGetCpu(pVM); 178 172 AssertPtrReturn(pVCpu, VERR_ACCESS_DENIED); 179 173 180 174 VBOXSTRICTRC rcStrict = IOMIOPortWrite(pVM, pVCpu, Port, u32Value, cbValue); 181 #endif182 175 183 176 LogFlow(("pdmR3DevHlp_IoPortWrite: caller='%s'/%d: returns %Rrc\n", … … 2120 2113 case PDMPCIDEV_IORGN_F_IOPORT_HANDLE: 2121 2114 AssertReturn(enmType == PCI_ADDRESS_SPACE_IO, VERR_INVALID_FLAGS); 2122 #if defined(VBOX_VMM_TARGET_ARMV8)2123 rc = VERR_NOT_SUPPORTED;2124 AssertReleaseFailed();2125 AssertRCReturn(rc, rc);2126 #else2127 2115 rc = IOMR3IoPortValidateHandle(pVM, pDevIns, (IOMIOPORTHANDLE)hHandle); 2128 2116 AssertRCReturn(rc, rc); 2129 #endif2130 2117 break; 2131 2118 case PDMPCIDEV_IORGN_F_MMIO_HANDLE: … … 4873 4860 pdmR3DevHlp_IoPortUnmap, 4874 4861 pdmR3DevHlp_IoPortGetMappingAddress, 4862 pdmR3DevHlp_IoPortRead, 4875 4863 pdmR3DevHlp_IoPortWrite, 4876 4864 pdmR3DevHlp_MmioCreateEx, … … 5270 5258 pdmR3DevHlpTracing_IoPortUnmap, 5271 5259 pdmR3DevHlp_IoPortGetMappingAddress, 5272 pdmR3DevHlp_IoPortWrite, 5260 pdmR3DevHlp_IoPortRead, /** @todo Needs tracing variants for ARM now. */ 5261 pdmR3DevHlp_IoPortWrite, /** @todo Needs tracing variants for ARM now. */ 5273 5262 pdmR3DevHlpTracing_MmioCreateEx, 5274 5263 pdmR3DevHlpTracing_MmioMap, … … 5987 5976 pdmR3DevHlp_IoPortUnmap, 5988 5977 pdmR3DevHlp_IoPortGetMappingAddress, 5978 pdmR3DevHlp_IoPortRead, 5989 5979 pdmR3DevHlp_IoPortWrite, 5990 5980 pdmR3DevHlp_MmioCreateEx,
Note:
See TracChangeset
for help on using the changeset viewer.