diff options
Diffstat (limited to 'include/VBox/vmm/pdmdev.h')
-rw-r--r-- | include/VBox/vmm/pdmdev.h | 42 |
1 files changed, 39 insertions, 3 deletions
diff --git a/include/VBox/vmm/pdmdev.h b/include/VBox/vmm/pdmdev.h index f895eb86f5c..8165d322876 100644 --- a/include/VBox/vmm/pdmdev.h +++ b/include/VBox/vmm/pdmdev.h @@ -2429,7 +2429,7 @@ typedef const PDMRTCHLP *PCPDMRTCHLP; /** @} */ /** Current PDMDEVHLPR3 version number. */ -#define PDM_DEVHLPR3_VERSION PDM_VERSION_MAKE_PP(0xffe7, 65, 0) +#define PDM_DEVHLPR3_VERSION PDM_VERSION_MAKE_PP(0xffe7, 66, 0) /** * PDM Device API. @@ -2515,6 +2515,26 @@ typedef struct PDMDEVHLPR3 DECLR3CALLBACKMEMBER(uint32_t, pfnIoPortGetMappingAddress,(PPDMDEVINS pDevIns, IOMIOPORTHANDLE hIoPorts)); /** + * Reads from an I/O port register. + * + * @returns Strict VBox status code. Informational status codes other than the one documented + * here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. + * @retval VINF_SUCCESS Success. + * @retval VINF_EM_FIRST-VINF_EM_LAST Success with some exceptions (see IOM_SUCCESS()), the + * status code must be passed on to EM. + * + * @param pDevIns The device instance to register the ports with. + * @param Port The port to write to. + * @param u32Value The value to write. + * @param cbValue The size of the register to read in bytes. 1, 2 or 4 bytes. + * + * @thread EMT + * + * @note This is required for the ARM platform in order to emulate PIO accesses through a dedicated MMIO region. + */ + DECLR3CALLBACKMEMBER(VBOXSTRICTRC, pfnIoPortRead,(PPDMDEVINS pDevIns, RTIOPORT Port, uint32_t *pu32Value, size_t cbValue)); + + /** * Writes to an I/O port register. * * @returns Strict VBox status code. Informational status codes other than the one documented @@ -2529,8 +2549,8 @@ typedef struct PDMDEVHLPR3 * @param cbValue The size of the register to read in bytes. 1, 2 or 4 bytes. * * @thread EMT - * @todo r=aeichner This is only used by DevPCI.cpp to write the ELCR of the PIC. This shouldn't be done that way - * and removed again as soon as possible (no time right now)... + * + * @note This is required for the ARM platform in order to emulate PIO accesses through a dedicated MMIO region. */ DECLR3CALLBACKMEMBER(VBOXSTRICTRC, pfnIoPortWrite,(PPDMDEVINS pDevIns, RTIOPORT Port, uint32_t u32Value, size_t cbValue)); /** @} */ @@ -6637,6 +6657,22 @@ DECLINLINE(uint32_t) PDMDevHlpIoPortGetMappingAddress(PPDMDEVINS pDevIns, IOMIOP return pDevIns->pHlpR3->pfnIoPortGetMappingAddress(pDevIns, hIoPorts); } +/** + * @copydoc PDMDEVHLPR3::pfnIoPortRead + */ +DECLINLINE(VBOXSTRICTRC) PDMDevHlpIoPortRead(PPDMDEVINS pDevIns, RTIOPORT Port, uint32_t *pu32Value, size_t cbValue) +{ + return pDevIns->pHlpR3->pfnIoPortRead(pDevIns, Port, pu32Value, cbValue); +} + +/** + * @copydoc PDMDEVHLPR3::pfnIoPortWrite + */ +DECLINLINE(VBOXSTRICTRC) PDMDevHlpIoPortWrite(PPDMDEVINS pDevIns, RTIOPORT Port, uint32_t u32Value, size_t cbValue) +{ + return pDevIns->pHlpR3->pfnIoPortWrite(pDevIns, Port, u32Value, cbValue); +} + #endif /* IN_RING3 */ #if !defined(IN_RING3) || defined(DOXYGEN_RUNNING) |