Changeset 81909 in vbox for trunk/include
- Timestamp:
- Nov 17, 2019 6:23:56 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/pdmdev.h
r81853 r81909 1254 1254 1255 1255 /** 1256 * Programmable Interrupt Controller registration structure .1256 * Programmable Interrupt Controller registration structure (all contexts). 1257 1257 */ 1258 1258 typedef struct PDMPICREG … … 1270 1270 * @remarks Caller enters the PDM critical section. 1271 1271 */ 1272 DECL R3CALLBACKMEMBER(void, pfnSetIrqR3,(PPDMDEVINS pDevIns, int iIrq, int iLevel, uint32_t uTagSrc));1272 DECLCALLBACKMEMBER(void, pfnSetIrq)(PPDMDEVINS pDevIns, int iIrq, int iLevel, uint32_t uTagSrc); 1273 1273 1274 1274 /** … … 1280 1280 * @remarks Caller enters the PDM critical section. 1281 1281 */ 1282 DECLR3CALLBACKMEMBER(int, pfnGetInterruptR3,(PPDMDEVINS pDevIns, uint32_t *puTagSrc)); 1283 1284 /** The name of the RC SetIrq entry point. */ 1285 const char *pszSetIrqRC; 1286 /** The name of the RC GetInterrupt entry point. */ 1287 const char *pszGetInterruptRC; 1288 1289 /** The name of the R0 SetIrq entry point. */ 1290 const char *pszSetIrqR0; 1291 /** The name of the R0 GetInterrupt entry point. */ 1292 const char *pszGetInterruptR0; 1282 DECLCALLBACKMEMBER(int, pfnGetInterrupt)(PPDMDEVINS pDevIns, uint32_t *puTagSrc); 1283 1284 /** Just a safety precaution. */ 1285 uint32_t u32TheEnd; 1293 1286 } PDMPICREG; 1294 1287 /** Pointer to a PIC registration structure. */ … … 1296 1289 1297 1290 /** Current PDMPICREG version number. */ 1298 #define PDM_PICREG_VERSION PDM_VERSION_MAKE(0xfffa, 2, 0)1299 1300 /** 1301 * PIC RC helpers.1302 */ 1303 typedef struct PDMPICHLP RC1304 { 1305 /** Structure version. PDM_PICHLP RC_VERSION defines the current version. */1291 #define PDM_PICREG_VERSION PDM_VERSION_MAKE(0xfffa, 3, 0) 1292 1293 /** 1294 * PIC helpers, same in all contexts. 1295 */ 1296 typedef struct PDMPICHLP 1297 { 1298 /** Structure version. PDM_PICHLP_VERSION defines the current version. */ 1306 1299 uint32_t u32Version; 1307 1300 … … 1311 1304 * @param pDevIns Device instance of the PIC. 1312 1305 */ 1313 DECL RCCALLBACKMEMBER(void, pfnSetInterruptFF,(PPDMDEVINS pDevIns));1306 DECLCALLBACKMEMBER(void, pfnSetInterruptFF)(PPDMDEVINS pDevIns); 1314 1307 1315 1308 /** … … 1318 1311 * @param pDevIns Device instance of the PIC. 1319 1312 */ 1320 DECL RCCALLBACKMEMBER(void, pfnClearInterruptFF,(PPDMDEVINS pDevIns));1313 DECLCALLBACKMEMBER(void, pfnClearInterruptFF)(PPDMDEVINS pDevIns); 1321 1314 1322 1315 /** … … 1328 1321 * @param rc What to return if we fail to acquire the lock. 1329 1322 */ 1330 DECL RCCALLBACKMEMBER(int, pfnLock,(PPDMDEVINS pDevIns, int rc));1323 DECLCALLBACKMEMBER(int, pfnLock)(PPDMDEVINS pDevIns, int rc); 1331 1324 1332 1325 /** … … 1335 1328 * @param pDevIns The PIC device instance. 1336 1329 */ 1337 DECL RCCALLBACKMEMBER(void, pfnUnlock,(PPDMDEVINS pDevIns));1330 DECLCALLBACKMEMBER(void, pfnUnlock)(PPDMDEVINS pDevIns); 1338 1331 1339 1332 /** Just a safety precaution. */ 1340 1333 uint32_t u32TheEnd; 1341 } PDMPICHLPRC; 1342 1343 /** Pointer to PIC RC helpers. */ 1344 typedef RCPTRTYPE(PDMPICHLPRC *) PPDMPICHLPRC; 1345 /** Pointer to const PIC RC helpers. */ 1346 typedef RCPTRTYPE(const PDMPICHLPRC *) PCPDMPICHLPRC; 1347 1348 /** Current PDMPICHLPRC version number. */ 1349 #define PDM_PICHLPRC_VERSION PDM_VERSION_MAKE(0xfff9, 2, 0) 1350 1351 1352 /** 1353 * PIC R0 helpers. 1354 */ 1355 typedef struct PDMPICHLPR0 1356 { 1357 /** Structure version. PDM_PICHLPR0_VERSION defines the current version. */ 1358 uint32_t u32Version; 1359 1360 /** 1361 * Set the interrupt force action flag. 1362 * 1363 * @param pDevIns Device instance of the PIC. 1364 */ 1365 DECLR0CALLBACKMEMBER(void, pfnSetInterruptFF,(PPDMDEVINS pDevIns)); 1366 1367 /** 1368 * Clear the interrupt force action flag. 1369 * 1370 * @param pDevIns Device instance of the PIC. 1371 */ 1372 DECLR0CALLBACKMEMBER(void, pfnClearInterruptFF,(PPDMDEVINS pDevIns)); 1373 1374 /** 1375 * Acquires the PDM lock. 1376 * 1377 * @returns VINF_SUCCESS on success. 1378 * @returns rc if we failed to acquire the lock. 1379 * @param pDevIns The PIC device instance. 1380 * @param rc What to return if we fail to acquire the lock. 1381 */ 1382 DECLR0CALLBACKMEMBER(int, pfnLock,(PPDMDEVINS pDevIns, int rc)); 1383 1384 /** 1385 * Releases the PDM lock. 1386 * 1387 * @param pDevIns The PCI device instance. 1388 */ 1389 DECLR0CALLBACKMEMBER(void, pfnUnlock,(PPDMDEVINS pDevIns)); 1390 1391 /** Just a safety precaution. */ 1392 uint32_t u32TheEnd; 1393 } PDMPICHLPR0; 1394 1395 /** Pointer to PIC R0 helpers. */ 1396 typedef R0PTRTYPE(PDMPICHLPR0 *) PPDMPICHLPR0; 1397 /** Pointer to const PIC R0 helpers. */ 1398 typedef R0PTRTYPE(const PDMPICHLPR0 *) PCPDMPICHLPR0; 1399 1400 /** Current PDMPICHLPR0 version number. */ 1401 #define PDM_PICHLPR0_VERSION PDM_VERSION_MAKE(0xfff8, 1, 0) 1402 1403 /** 1404 * PIC R3 helpers. 1405 */ 1406 typedef struct PDMPICHLPR3 1407 { 1408 /** Structure version. PDM_PICHLP_VERSION defines the current version. */ 1409 uint32_t u32Version; 1410 1411 /** 1412 * Set the interrupt force action flag. 1413 * 1414 * @param pDevIns Device instance of the PIC. 1415 */ 1416 DECLR3CALLBACKMEMBER(void, pfnSetInterruptFF,(PPDMDEVINS pDevIns)); 1417 1418 /** 1419 * Clear the interrupt force action flag. 1420 * 1421 * @param pDevIns Device instance of the PIC. 1422 */ 1423 DECLR3CALLBACKMEMBER(void, pfnClearInterruptFF,(PPDMDEVINS pDevIns)); 1424 1425 /** 1426 * Acquires the PDM lock. 1427 * 1428 * @returns VINF_SUCCESS on success. 1429 * @returns Fatal error on failure. 1430 * @param pDevIns The PIC device instance. 1431 * @param rc Dummy for making the interface identical to the RC and R0 versions. 1432 */ 1433 DECLR3CALLBACKMEMBER(int, pfnLock,(PPDMDEVINS pDevIns, int rc)); 1434 1435 /** 1436 * Releases the PDM lock. 1437 * 1438 * @param pDevIns The PIC device instance. 1439 */ 1440 DECLR3CALLBACKMEMBER(void, pfnUnlock,(PPDMDEVINS pDevIns)); 1441 1442 /** 1443 * Gets the address of the RC PIC helpers. 1444 * 1445 * This should be called at both construction and relocation time 1446 * to obtain the correct address of the RC helpers. 1447 * 1448 * @returns RC pointer to the PIC helpers. 1449 * @param pDevIns Device instance of the PIC. 1450 */ 1451 DECLR3CALLBACKMEMBER(PCPDMPICHLPRC, pfnGetRCHelpers,(PPDMDEVINS pDevIns)); 1452 1453 /** 1454 * Gets the address of the R0 PIC helpers. 1455 * 1456 * This should be called at both construction and relocation time 1457 * to obtain the correct address of the R0 helpers. 1458 * 1459 * @returns R0 pointer to the PIC helpers. 1460 * @param pDevIns Device instance of the PIC. 1461 */ 1462 DECLR3CALLBACKMEMBER(PCPDMPICHLPR0, pfnGetR0Helpers,(PPDMDEVINS pDevIns)); 1463 1464 /** Just a safety precaution. */ 1465 uint32_t u32TheEnd; 1466 } PDMPICHLPR3; 1467 1468 /** Pointer to PIC R3 helpers. */ 1469 typedef R3PTRTYPE(PDMPICHLPR3 *) PPDMPICHLPR3; 1470 /** Pointer to const PIC R3 helpers. */ 1471 typedef R3PTRTYPE(const PDMPICHLPR3 *) PCPDMPICHLPR3; 1472 1473 /** Current PDMPICHLPR3 version number. */ 1474 #define PDM_PICHLPR3_VERSION PDM_VERSION_MAKE(0xfff7, 1, 0) 1475 1334 } PDMPICHLP; 1335 /** Pointer to PIC helpers. */ 1336 typedef PDMPICHLP *PPDMPICHLP; 1337 /** Pointer to const PIC helpers. */ 1338 typedef const PDMPICHLP *PCPDMPICHLP; 1339 1340 /** Current PDMPICHLP version number. */ 1341 #define PDM_PICHLP_VERSION PDM_VERSION_MAKE(0xfff9, 3, 0) 1476 1342 1477 1343 … … 4033 3899 * @param pDevIns The device instance. 4034 3900 * @param pPicReg Pointer to a PIC registration structure. 4035 * @param ppPicHlp R3 Where to store the pointer to the PIC HC3901 * @param ppPicHlp Where to store the pointer to the ring-3 PIC 4036 3902 * helpers. 4037 */ 4038 DECLR3CALLBACKMEMBER(int, pfnPICRegister,(PPDMDEVINS pDevIns, PPDMPICREG pPicReg, PCPDMPICHLPR3 *ppPicHlpR3)); 3903 * @sa PDMDevHlpPICSetUpContext 3904 */ 3905 DECLR3CALLBACKMEMBER(int, pfnPICRegister,(PPDMDEVINS pDevIns, PPDMPICREG pPicReg, PCPDMPICHLP *ppPicHlp)); 4039 3906 4040 3907 /** … … 4955 4822 DECLRCCALLBACKMEMBER(int, pfnPCIBusSetUpContext,(PPDMDEVINS pDevIns, PPDMPCIBUSREGRC pPciBusReg, PCPDMPCIHLPRC *ppPciHlp)); 4956 4823 4824 /** 4825 * Sets up the PIC for the raw-mode context. 4826 * 4827 * This must be called after ring-3 has registered the PIC using 4828 * PDMDevHlpPICRegister(). 4829 * 4830 * @returns VBox status code. 4831 * @param pDevIns The device instance. 4832 * @param pPicReg The PIC registration information for ring-0, 4833 * considered volatile and copied. 4834 * @param ppPciHlp Where to return the raw-mode PIC helpers. 4835 */ 4836 DECLRCCALLBACKMEMBER(int, pfnPCISetUpContext,(PPDMDEVINS pDevIns, PPDMPICREG pPicReg, PCPDMPICHLP *ppPicHlp)); 4837 4957 4838 /** Space reserved for future members. 4958 4839 * @{ */ … … 4978 4859 4979 4860 /** Current PDMDEVHLP version number. */ 4980 #define PDM_DEVHLPRC_VERSION PDM_VERSION_MAKE(0xffe6, 1 0, 0)4861 #define PDM_DEVHLPRC_VERSION PDM_VERSION_MAKE(0xffe6, 11, 0) 4981 4862 4982 4863 … … 5415 5296 * @param pDevIns The device instance. 5416 5297 * @param pPciBusReg The PCI bus registration information for ring-0, 5417 * considered volatile .5298 * considered volatile and copied. 5418 5299 * @param ppPciHlp Where to return the ring-0 PCI bus helpers. 5419 5300 */ 5420 5301 DECLR0CALLBACKMEMBER(int, pfnPCIBusSetUpContext,(PPDMDEVINS pDevIns, PPDMPCIBUSREGR0 pPciBusReg, PCPDMPCIHLPR0 *ppPciHlp)); 5302 5303 /** 5304 * Sets up the PIC for the ring-0 context. 5305 * 5306 * This must be called after ring-3 has registered the PIC using 5307 * PDMDevHlpPICRegister(). 5308 * 5309 * @returns VBox status code. 5310 * @param pDevIns The device instance. 5311 * @param pPicReg The PIC registration information for ring-0, 5312 * considered volatile and copied. 5313 * @param ppPciHlp Where to return the ring-0 PIC helpers. 5314 */ 5315 DECLR0CALLBACKMEMBER(int, pfnPICSetUpContext,(PPDMDEVINS pDevIns, PPDMPICREG pPicReg, PCPDMPICHLP *ppPicHlp)); 5421 5316 5422 5317 /** Space reserved for future members. … … 5443 5338 5444 5339 /** Current PDMDEVHLP version number. */ 5445 #define PDM_DEVHLPR0_VERSION PDM_VERSION_MAKE(0xffe5, 1 1, 0)5340 #define PDM_DEVHLPR0_VERSION PDM_VERSION_MAKE(0xffe5, 12, 0) 5446 5341 5447 5342 … … 7759 7654 #endif 7760 7655 7761 #if def IN_RING37656 #if defined(IN_RING3) || defined(DOXYGEN_RUNNING) 7762 7657 7763 7658 /** … … 7876 7771 * @copydoc PDMDEVHLPR3::pfnPICRegister 7877 7772 */ 7878 DECLINLINE(int) PDMDevHlpPICRegister(PPDMDEVINS pDevIns, PPDMPICREG pPicReg, PCPDMPICHLP R3 *ppPicHlpR3)7879 { 7880 return pDevIns->pHlpR3->pfnPICRegister(pDevIns, pPicReg, ppPicHlp R3);7773 DECLINLINE(int) PDMDevHlpPICRegister(PPDMDEVINS pDevIns, PPDMPICREG pPicReg, PCPDMPICHLP *ppPicHlp) 7774 { 7775 return pDevIns->pHlpR3->pfnPICRegister(pDevIns, pPicReg, ppPicHlp); 7881 7776 } 7882 7777 … … 8017 7912 } 8018 7913 8019 #else /* !IN_RING3 */ 8020 8021 /** 8022 * @copydoc PDMDEVHLPR0::pfnPCIBusSetUp 7914 #endif /* IN_RING3 || DOXYGEN_RUNNING */ 7915 7916 #if !defined(IN_RING3) || defined(DOXYGEN_RUNNING) 7917 7918 /** 7919 * @copydoc PDMDEVHLPR0::pfnPCIBusSetUpContext 8023 7920 */ 8024 7921 DECLINLINE(int) PDMDevHlpPCIBusSetUpContext(PPDMDEVINS pDevIns, CTX_SUFF(PPDMPCIBUSREG) pPciBusReg, CTX_SUFF(PCPDMPCIHLP) *ppPciHlp) 8025 7922 { 8026 7923 return pDevIns->CTX_SUFF(pHlp)->pfnPCIBusSetUpContext(pDevIns, pPciBusReg, ppPciHlp); 7924 } 7925 7926 /** 7927 * @copydoc PDMDEVHLPR0::pfnPICSetUpContext 7928 */ 7929 DECLINLINE(int) PDMDevHlpPICSetUpContext(PPDMDEVINS pDevIns, PPDMPICREG pPicReg, PCPDMPICHLP *ppPicHlp) 7930 { 7931 return pDevIns->CTX_SUFF(pHlp)->pfnPICSetUpContext(pDevIns, pPicReg, ppPicHlp); 8027 7932 } 8028 7933
Note:
See TracChangeset
for help on using the changeset viewer.