Changeset 39111 in vbox for trunk/include
- Timestamp:
- Oct 25, 2011 2:47:02 PM (13 years ago)
- Location:
- trunk/include/VBox/vmm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/iom.h
r38677 r39111 79 79 ) \ 80 80 ) 81 82 /** @name IOMMMIO_FLAGS_XXX 83 * @{ */ 84 /** Pass all reads thru unmodified. */ 85 #define IOMMMIO_FLAGS_READ_PASSTHRU UINT32_C(0x00000000) 86 /** All read accesses are DWORD sized (32-bit). */ 87 #define IOMMMIO_FLAGS_READ_DWORD UINT32_C(0x00000001) 88 /** All read accesses are DWORD (32-bit) or QWORD (64-bit) sized. 89 * Only accesses that are both QWORD sized and aligned are performed as QWORD. 90 * All other access will be done DWORD fashion (because it is way simpler). */ 91 #define IOMMMIO_FLAGS_READ_DWORD_QWORD UINT32_C(0x00000002) 92 /** The read access mode mask. */ 93 #define IOMMMIO_FLAGS_READ_MODE UINT32_C(0x00000003) 94 95 /** Pass all writes thru unmodified. */ 96 #define IOMMMIO_FLAGS_WRITE_PASSTHRU UINT32_C(0x00000000) 97 /** All write accesses are DWORD (32-bit) sized and unspecified bytes are 98 * written as zero. */ 99 #define IOMMMIO_FLAGS_WRITE_DWORD_ZEROED UINT32_C(0x00000010) 100 /** All write accesses are either DWORD (32-bit) or QWORD (64-bit) sized, 101 * missing bytes will be written as zero. Only accesses that are both QWORD 102 * sized and aligned are performed as QWORD, all other accesses will be done 103 * DWORD fashion (because it's way simpler). */ 104 #define IOMMMIO_FLAGS_WRITE_DWORD_QWORD_ZEROED UINT32_C(0x00000020) 105 /** All write accesses are DWORD (32-bit) sized and unspecified bytes are 106 * read from the device first as DWORDs. 107 * @remarks This isn't how it happens on real hardware, but it allows 108 * simplifications of devices where reads doesn't change the device 109 * state in any way. */ 110 #define IOMMMIO_FLAGS_WRITE_DWORD_READ_MISSING UINT32_C(0x00000030) 111 /** All write accesses are DWORD (32-bit) or QWORD (64-bit) sized and 112 * unspecified bytes are read from the device first as DWORDs. Only accesses 113 * that are both QWORD sized and aligned are performed as QWORD, all other 114 * accesses will be done DWORD fashion (because it's way simpler). 115 * @remarks This isn't how it happens on real hardware, but it allows 116 * simplifications of devices where reads doesn't change the device 117 * state in any way. */ 118 #define IOMMMIO_FLAGS_WRITE_DWORD_QWORD_READ_MISSING UINT32_C(0x00000040) 119 /** The read access mode mask. */ 120 #define IOMMMIO_FLAGS_WRITE_MODE UINT32_C(0x00000070) 121 122 /** Mask of valid flags. */ 123 #define IOMMMIO_FLAGS_VALID_MASK UINT32_C(0x00000073) 124 /** @} */ 81 125 82 126 … … 228 272 * @{ 229 273 */ 230 VMMR3 DECL(int) IOMR3Init(PVM pVM);231 VMMR3 DECL(void) IOMR3Reset(PVM pVM);232 VMMR3 DECL(void) IOMR3Relocate(PVM pVM, RTGCINTPTR offDelta);233 VMMR3 DECL(int) IOMR3Term(PVM pVM);234 VMMR3 DECL(int) IOMR3IOPortRegisterR3(PVM pVM, PPDMDEVINS pDevIns, RTIOPORT PortStart, RTUINT cPorts, RTHCPTR pvUser,235 R3PTRTYPE(PFNIOMIOPORTOUT) pfnOutCallback, R3PTRTYPE(PFNIOMIOPORTIN) pfnInCallback,236 R3PTRTYPE(PFNIOMIOPORTOUTSTRING) pfnOutStringCallback, R3PTRTYPE(PFNIOMIOPORTINSTRING) pfnInStringCallback,237 const char *pszDesc);238 VMMR3 DECL(int) IOMR3IOPortRegisterRC(PVM pVM, PPDMDEVINS pDevIns, RTIOPORT PortStart, RTUINT cPorts, RTRCPTR pvUser,239 RCPTRTYPE(PFNIOMIOPORTOUT) pfnOutCallback, RCPTRTYPE(PFNIOMIOPORTIN) pfnInCallback,240 RCPTRTYPE(PFNIOMIOPORTOUTSTRING) pfnOutStrCallback, RCPTRTYPE(PFNIOMIOPORTINSTRING) pfnInStrCallback,241 const char *pszDesc);242 VMMR3 DECL(int) IOMR3IOPortRegisterR0(PVM pVM, PPDMDEVINS pDevIns, RTIOPORT PortStart, RTUINT cPorts, RTR0PTR pvUser,243 R0PTRTYPE(PFNIOMIOPORTOUT) pfnOutCallback, R0PTRTYPE(PFNIOMIOPORTIN) pfnInCallback,244 R0PTRTYPE(PFNIOMIOPORTOUTSTRING) pfnOutStrCallback, R0PTRTYPE(PFNIOMIOPORTINSTRING) pfnInStrCallback,245 const char *pszDesc);246 VMMR3 DECL(int) IOMR3IOPortDeregister(PVM pVM, PPDMDEVINS pDevIns, RTIOPORT PortStart, RTUINT cPorts);247 248 VMMR3_INT_DECL(int) IOMR3MmioRegisterR3(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTUINTcbRange, RTHCPTR pvUser,274 VMMR3_INT_DECL(int) IOMR3Init(PVM pVM); 275 VMMR3_INT_DECL(void) IOMR3Reset(PVM pVM); 276 VMMR3_INT_DECL(void) IOMR3Relocate(PVM pVM, RTGCINTPTR offDelta); 277 VMMR3_INT_DECL(int) IOMR3Term(PVM pVM); 278 VMMR3_INT_DECL(int) IOMR3IOPortRegisterR3(PVM pVM, PPDMDEVINS pDevIns, RTIOPORT PortStart, RTUINT cPorts, RTHCPTR pvUser, 279 R3PTRTYPE(PFNIOMIOPORTOUT) pfnOutCallback, R3PTRTYPE(PFNIOMIOPORTIN) pfnInCallback, 280 R3PTRTYPE(PFNIOMIOPORTOUTSTRING) pfnOutStringCallback, R3PTRTYPE(PFNIOMIOPORTINSTRING) pfnInStringCallback, 281 const char *pszDesc); 282 VMMR3_INT_DECL(int) IOMR3IOPortRegisterRC(PVM pVM, PPDMDEVINS pDevIns, RTIOPORT PortStart, RTUINT cPorts, RTRCPTR pvUser, 283 RCPTRTYPE(PFNIOMIOPORTOUT) pfnOutCallback, RCPTRTYPE(PFNIOMIOPORTIN) pfnInCallback, 284 RCPTRTYPE(PFNIOMIOPORTOUTSTRING) pfnOutStrCallback, RCPTRTYPE(PFNIOMIOPORTINSTRING) pfnInStrCallback, 285 const char *pszDesc); 286 VMMR3_INT_DECL(int) IOMR3IOPortRegisterR0(PVM pVM, PPDMDEVINS pDevIns, RTIOPORT PortStart, RTUINT cPorts, RTR0PTR pvUser, 287 R0PTRTYPE(PFNIOMIOPORTOUT) pfnOutCallback, R0PTRTYPE(PFNIOMIOPORTIN) pfnInCallback, 288 R0PTRTYPE(PFNIOMIOPORTOUTSTRING) pfnOutStrCallback, R0PTRTYPE(PFNIOMIOPORTINSTRING) pfnInStrCallback, 289 const char *pszDesc); 290 VMMR3_INT_DECL(int) IOMR3IOPortDeregister(PVM pVM, PPDMDEVINS pDevIns, RTIOPORT PortStart, RTUINT cPorts); 291 292 VMMR3_INT_DECL(int) IOMR3MmioRegisterR3(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, uint32_t cbRange, RTHCPTR pvUser, 249 293 R3PTRTYPE(PFNIOMMMIOWRITE) pfnWriteCallback, 250 294 R3PTRTYPE(PFNIOMMMIOREAD) pfnReadCallback, 251 R3PTRTYPE(PFNIOMMMIOFILL) pfnFillCallback, const char *pszDesc); 252 VMMR3_INT_DECL(int) IOMR3MmioRegisterR0(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTUINT cbRange, RTR0PTR pvUser, 295 R3PTRTYPE(PFNIOMMMIOFILL) pfnFillCallback, 296 uint32_t fFlags, const char *pszDesc); 297 VMMR3_INT_DECL(int) IOMR3MmioRegisterR0(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, uint32_t cbRange, RTR0PTR pvUser, 253 298 R0PTRTYPE(PFNIOMMMIOWRITE) pfnWriteCallback, 254 299 R0PTRTYPE(PFNIOMMMIOREAD) pfnReadCallback, 255 300 R0PTRTYPE(PFNIOMMMIOFILL) pfnFillCallback); 256 VMMR3_INT_DECL(int) IOMR3MmioRegisterRC(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTUINTcbRange, RTGCPTR pvUser,301 VMMR3_INT_DECL(int) IOMR3MmioRegisterRC(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, uint32_t cbRange, RTGCPTR pvUser, 257 302 RCPTRTYPE(PFNIOMMMIOWRITE) pfnWriteCallback, 258 303 RCPTRTYPE(PFNIOMMMIOREAD) pfnReadCallback, 259 304 RCPTRTYPE(PFNIOMMMIOFILL) pfnFillCallback); 260 VMMR3_INT_DECL(int) IOMR3MmioDeregister(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTUINTcbRange);305 VMMR3_INT_DECL(int) IOMR3MmioDeregister(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, uint32_t cbRange); 261 306 262 307 /** @} */ -
trunk/include/VBox/vmm/pdmdev.h
r39078 r39111 2239 2239 * @param pfnRead Pointer to function which is gonna handle Read operations. 2240 2240 * @param pfnFill Pointer to function which is gonna handle Fill/memset operations. (optional) 2241 * @param fFlags Flags, IOMMMIO_FLAGS_XXX. 2241 2242 * @param pszDesc Pointer to description string. This must not be freed. 2242 2243 */ 2243 2244 DECLR3CALLBACKMEMBER(int, pfnMMIORegister,(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTUINT cbRange, RTHCPTR pvUser, 2244 2245 PFNIOMMMIOWRITE pfnWrite, PFNIOMMMIOREAD pfnRead, PFNIOMMMIOFILL pfnFill, 2245 const char *pszDesc));2246 uint32_t fFlags, const char *pszDesc)); 2246 2247 2247 2248 /** … … 4108 4109 const char *pszDesc) 4109 4110 { 4110 return pDevIns->pHlpR3->pfnMMIORegister(pDevIns, GCPhysStart, cbRange, pvUser, pfnWrite, pfnRead, pfnFill, pszDesc); 4111 return pDevIns->pHlpR3->pfnMMIORegister(pDevIns, GCPhysStart, cbRange, pvUser, pfnWrite, pfnRead, pfnFill, 4112 IOMMMIO_FLAGS_WRITE_PASSTHRU | IOMMMIO_FLAGS_READ_PASSTHRU, pszDesc); 4111 4113 } 4112 4114
Note:
See TracChangeset
for help on using the changeset viewer.