Changeset 81938 in vbox for trunk/include
- Timestamp:
- Nov 18, 2019 12:14:05 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/pdmdev.h
r81928 r81938 1436 1436 1437 1437 /** 1438 * I/O APIC registration structure .1438 * I/O APIC registration structure (all contexts). 1439 1439 */ 1440 1440 typedef struct PDMIOAPICREG … … 1454 1454 * Actually, as per 2018-07-21 this isn't true (bird). 1455 1455 */ 1456 DECLR3CALLBACKMEMBER(void, pfnSetIrqR3,(PPDMDEVINS pDevIns, int iIrq, int iLevel, uint32_t uTagSrc)); 1457 1458 /** The name of the RC SetIrq entry point. */ 1459 const char *pszSetIrqRC; 1460 1461 /** The name of the R0 SetIrq entry point. */ 1462 const char *pszSetIrqR0; 1456 DECLCALLBACKMEMBER(void, pfnSetIrq)(PPDMDEVINS pDevIns, int iIrq, int iLevel, uint32_t uTagSrc); 1463 1457 1464 1458 /** … … 1473 1467 * Actually, as per 2018-07-21 this isn't true (bird). 1474 1468 */ 1475 DECLR3CALLBACKMEMBER(void, pfnSendMsiR3,(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, uint32_t uValue, uint32_t uTagSrc)); 1476 1477 /** The name of the RC SendMsi entry point. */ 1478 const char *pszSendMsiRC; 1479 1480 /** The name of the R0 SendMsi entry point. */ 1481 const char *pszSendMsiR0; 1469 DECLCALLBACKMEMBER(void, pfnSendMsi)(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, uint32_t uValue, uint32_t uTagSrc); 1482 1470 1483 1471 /** … … 1494 1482 * Actually, as per 2018-07-21 this isn't true (bird). 1495 1483 */ 1496 DECLR3CALLBACKMEMBER(int, pfnSetEoiR3,(PPDMDEVINS pDevIns, uint8_t u8Vector)); 1497 1498 /** The name of the RC SetEoi entry point. */ 1499 const char *pszSetEoiRC; 1500 1501 /** The name of the R0 SetEoi entry point. */ 1502 const char *pszSetEoiR0; 1484 DECLCALLBACKMEMBER(int, pfnSetEoi)(PPDMDEVINS pDevIns, uint8_t u8Vector); 1485 1486 /** Just a safety precaution. */ 1487 uint32_t u32TheEnd; 1503 1488 } PDMIOAPICREG; 1504 1489 /** Pointer to an APIC registration structure. */ … … 1506 1491 1507 1492 /** Current PDMAPICREG version number. */ 1508 #define PDM_IOAPICREG_VERSION PDM_VERSION_MAKE(0xfff2, 5, 0)1509 1510 1511 /** 1512 * IOAPIC RC helpers.1513 */ 1514 typedef struct PDMIOAPICHLP RC1515 { 1516 /** Structure version. PDM_IOAPICHLP RC_VERSION defines the current version. */1493 #define PDM_IOAPICREG_VERSION PDM_VERSION_MAKE(0xfff2, 6, 0) 1494 1495 1496 /** 1497 * IOAPIC helpers, same in all contexts. 1498 */ 1499 typedef struct PDMIOAPICHLP 1500 { 1501 /** Structure version. PDM_IOAPICHLP_VERSION defines the current version. */ 1517 1502 uint32_t u32Version; 1518 1503 … … 1532 1517 * @param uTagSrc The IRQ tag and source (for tracing). 1533 1518 */ 1534 DECL RCCALLBACKMEMBER(int, pfnApicBusDeliver,(PPDMDEVINS pDevIns, uint8_t u8Dest, uint8_t u8DestMode, uint8_t u8DeliveryMode,1535 uint8_t uVector, uint8_t u8Polarity, uint8_t u8TriggerMode, uint32_t uTagSrc));1519 DECLCALLBACKMEMBER(int, pfnApicBusDeliver)(PPDMDEVINS pDevIns, uint8_t u8Dest, uint8_t u8DestMode, uint8_t u8DeliveryMode, 1520 uint8_t uVector, uint8_t u8Polarity, uint8_t u8TriggerMode, uint32_t uTagSrc); 1536 1521 1537 1522 /** … … 1543 1528 * @param rc What to return if we fail to acquire the lock. 1544 1529 */ 1545 DECL RCCALLBACKMEMBER(int, pfnLock,(PPDMDEVINS pDevIns, int rc));1530 DECLCALLBACKMEMBER(int, pfnLock)(PPDMDEVINS pDevIns, int rc); 1546 1531 1547 1532 /** … … 1550 1535 * @param pDevIns The IOAPIC device instance. 1551 1536 */ 1552 DECL RCCALLBACKMEMBER(void, pfnUnlock,(PPDMDEVINS pDevIns));1537 DECLCALLBACKMEMBER(void, pfnUnlock)(PPDMDEVINS pDevIns); 1553 1538 1554 1539 /** Just a safety precaution. */ 1555 1540 uint32_t u32TheEnd; 1556 } PDMIOAPICHLP RC;1557 /** Pointer to IOAPIC RChelpers. */1558 typedef RCPTRTYPE(PDMIOAPICHLPRC *) PPDMIOAPICHLPRC;1541 } PDMIOAPICHLP; 1542 /** Pointer to IOAPIC helpers. */ 1543 typedef PDMIOAPICHLP * PPDMIOAPICHLP; 1559 1544 /** Pointer to const IOAPIC helpers. */ 1560 typedef RCPTRTYPE(const PDMIOAPICHLPRC *) PCPDMIOAPICHLPRC; 1561 1562 /** Current PDMIOAPICHLPRC version number. */ 1563 #define PDM_IOAPICHLPRC_VERSION PDM_VERSION_MAKE(0xfff1, 2, 0) 1564 1565 1566 /** 1567 * IOAPIC R0 helpers. 1568 */ 1569 typedef struct PDMIOAPICHLPR0 1570 { 1571 /** Structure version. PDM_IOAPICHLPR0_VERSION defines the current version. */ 1572 uint32_t u32Version; 1573 1574 /** 1575 * Private interface between the IOAPIC and APIC. 1576 * 1577 * See comments about this hack on PDMAPICREG::pfnBusDeliverR3. 1578 * 1579 * @returns status code. 1580 * @param pDevIns Device instance of the IOAPIC. 1581 * @param u8Dest See APIC implementation. 1582 * @param u8DestMode See APIC implementation. 1583 * @param u8DeliveryMode See APIC implementation. 1584 * @param uVector See APIC implementation. 1585 * @param u8Polarity See APIC implementation. 1586 * @param u8TriggerMode See APIC implementation. 1587 * @param uTagSrc The IRQ tag and source (for tracing). 1588 */ 1589 DECLR0CALLBACKMEMBER(int, pfnApicBusDeliver,(PPDMDEVINS pDevIns, uint8_t u8Dest, uint8_t u8DestMode, uint8_t u8DeliveryMode, 1590 uint8_t uVector, uint8_t u8Polarity, uint8_t u8TriggerMode, uint32_t uTagSrc)); 1591 1592 /** 1593 * Acquires the PDM lock. 1594 * 1595 * @returns VINF_SUCCESS on success. 1596 * @returns rc if we failed to acquire the lock. 1597 * @param pDevIns The IOAPIC device instance. 1598 * @param rc What to return if we fail to acquire the lock. 1599 */ 1600 DECLR0CALLBACKMEMBER(int, pfnLock,(PPDMDEVINS pDevIns, int rc)); 1601 1602 /** 1603 * Releases the PDM lock. 1604 * 1605 * @param pDevIns The IOAPIC device instance. 1606 */ 1607 DECLR0CALLBACKMEMBER(void, pfnUnlock,(PPDMDEVINS pDevIns)); 1608 1609 /** Just a safety precaution. */ 1610 uint32_t u32TheEnd; 1611 } PDMIOAPICHLPR0; 1612 /** Pointer to IOAPIC R0 helpers. */ 1613 typedef R0PTRTYPE(PDMIOAPICHLPR0 *) PPDMIOAPICHLPR0; 1614 /** Pointer to const IOAPIC helpers. */ 1615 typedef R0PTRTYPE(const PDMIOAPICHLPR0 *) PCPDMIOAPICHLPR0; 1616 1617 /** Current PDMIOAPICHLPR0 version number. */ 1618 #define PDM_IOAPICHLPR0_VERSION PDM_VERSION_MAKE(0xfff0, 2, 0) 1619 1620 /** 1621 * IOAPIC R3 helpers. 1622 */ 1623 typedef struct PDMIOAPICHLPR3 1624 { 1625 /** Structure version. PDM_IOAPICHLPR3_VERSION defines the current version. */ 1626 uint32_t u32Version; 1627 1628 /** 1629 * Private interface between the IOAPIC and APIC. 1630 * 1631 * See comments about this hack on PDMAPICREG::pfnBusDeliverR3. 1632 * 1633 * @returns status code 1634 * @param pDevIns Device instance of the IOAPIC. 1635 * @param u8Dest See APIC implementation. 1636 * @param u8DestMode See APIC implementation. 1637 * @param u8DeliveryMode See APIC implementation. 1638 * @param uVector See APIC implementation. 1639 * @param u8Polarity See APIC implementation. 1640 * @param u8TriggerMode See APIC implementation. 1641 * @param uTagSrc The IRQ tag and source (for tracing). 1642 */ 1643 DECLR3CALLBACKMEMBER(int, pfnApicBusDeliver,(PPDMDEVINS pDevIns, uint8_t u8Dest, uint8_t u8DestMode, uint8_t u8DeliveryMode, 1644 uint8_t uVector, uint8_t u8Polarity, uint8_t u8TriggerMode, uint32_t uTagSrc)); 1645 1646 /** 1647 * Acquires the PDM lock. 1648 * 1649 * @returns VINF_SUCCESS on success. 1650 * @returns Fatal error on failure. 1651 * @param pDevIns The IOAPIC device instance. 1652 * @param rc Dummy for making the interface identical to the GC and R0 versions. 1653 */ 1654 DECLR3CALLBACKMEMBER(int, pfnLock,(PPDMDEVINS pDevIns, int rc)); 1655 1656 /** 1657 * Releases the PDM lock. 1658 * 1659 * @param pDevIns The IOAPIC device instance. 1660 */ 1661 DECLR3CALLBACKMEMBER(void, pfnUnlock,(PPDMDEVINS pDevIns)); 1662 1663 /** 1664 * Gets the address of the RC IOAPIC helpers. 1665 * 1666 * This should be called at both construction and relocation time 1667 * to obtain the correct address of the RC helpers. 1668 * 1669 * @returns RC pointer to the IOAPIC helpers. 1670 * @param pDevIns Device instance of the IOAPIC. 1671 */ 1672 DECLR3CALLBACKMEMBER(PCPDMIOAPICHLPRC, pfnGetRCHelpers,(PPDMDEVINS pDevIns)); 1673 1674 /** 1675 * Gets the address of the R0 IOAPIC helpers. 1676 * 1677 * This should be called at both construction and relocation time 1678 * to obtain the correct address of the R0 helpers. 1679 * 1680 * @returns R0 pointer to the IOAPIC helpers. 1681 * @param pDevIns Device instance of the IOAPIC. 1682 */ 1683 DECLR3CALLBACKMEMBER(PCPDMIOAPICHLPR0, pfnGetR0Helpers,(PPDMDEVINS pDevIns)); 1684 1685 /** Just a safety precaution. */ 1686 uint32_t u32TheEnd; 1687 } PDMIOAPICHLPR3; 1688 /** Pointer to IOAPIC R3 helpers. */ 1689 typedef R3PTRTYPE(PDMIOAPICHLPR3 *) PPDMIOAPICHLPR3; 1690 /** Pointer to const IOAPIC helpers. */ 1691 typedef R3PTRTYPE(const PDMIOAPICHLPR3 *) PCPDMIOAPICHLPR3; 1692 1693 /** Current PDMIOAPICHLPR3 version number. */ 1694 #define PDM_IOAPICHLPR3_VERSION PDM_VERSION_MAKE(0xffef, 2, 0) 1545 typedef const PDMIOAPICHLP * PCPDMIOAPICHLP; 1546 1547 /** Current PDMIOAPICHLP version number. */ 1548 #define PDM_IOAPICHLP_VERSION PDM_VERSION_MAKE(0xfff0, 2, 0) 1695 1549 1696 1550 … … 2144 1998 2145 1999 /** Current PDMDEVHLPR3 version number. */ 2146 #define PDM_DEVHLPR3_VERSION PDM_VERSION_MAKE_PP(0xffe7, 3 5, 0)2000 #define PDM_DEVHLPR3_VERSION PDM_VERSION_MAKE_PP(0xffe7, 36, 0) 2147 2001 2148 2002 /** … … 3919 3773 * @param pDevIns The device instance. 3920 3774 * @param pIoApicReg Pointer to a I/O APIC registration structure. 3921 * @param ppIoApicHlp R3Where to store the pointer to the IOAPIC3775 * @param ppIoApicHlp Where to store the pointer to the IOAPIC 3922 3776 * helpers. 3923 3777 */ 3924 DECLR3CALLBACKMEMBER(int, pfnI OAPICRegister,(PPDMDEVINS pDevIns, PPDMIOAPICREG pIoApicReg, PCPDMIOAPICHLPR3 *ppIoApicHlpR3));3778 DECLR3CALLBACKMEMBER(int, pfnIoApicRegister,(PPDMDEVINS pDevIns, PPDMIOAPICREG pIoApicReg, PCPDMIOAPICHLP *ppIoApicHlp)); 3925 3779 3926 3780 /** … … 4823 4677 4824 4678 /** 4825 * Sets up the PIC for the r aw-modecontext.4679 * Sets up the PIC for the ring-0 context. 4826 4680 * 4827 4681 * This must be called after ring-3 has registered the PIC using … … 4832 4686 * @param pPicReg The PIC registration information for ring-0, 4833 4687 * considered volatile and copied. 4834 * @param ppPicHlp Where to return the raw-mode PIC helpers. 4835 */ 4836 DECLRCCALLBACKMEMBER(int, pfnPCISetUpContext,(PPDMDEVINS pDevIns, PPDMPICREG pPicReg, PCPDMPICHLP *ppPicHlp)); 4688 * @param ppPicHlp Where to return the ring-0 PIC helpers. 4689 */ 4690 DECLR0CALLBACKMEMBER(int, pfnPICSetUpContext,(PPDMDEVINS pDevIns, PPDMPICREG pPicReg, PCPDMPICHLP *ppPicHlp)); 4691 4692 /** 4693 * Sets up the IOAPIC for the ring-0 context. 4694 * 4695 * This must be called after ring-3 has registered the PIC using 4696 * PDMDevHlpIoApicRegister(). 4697 * 4698 * @returns VBox status code. 4699 * @param pDevIns The device instance. 4700 * @param pIoApicReg The PIC registration information for ring-0, 4701 * considered volatile and copied. 4702 * @param ppIoApicHlp Where to return the ring-0 IOAPIC helpers. 4703 */ 4704 DECLR0CALLBACKMEMBER(int, pfnIoApicSetUpContext,(PPDMDEVINS pDevIns, PPDMIOAPICREG pIoApicReg, PCPDMIOAPICHLP *ppIoApicHlp)); 4837 4705 4838 4706 /** Space reserved for future members. … … 4859 4727 4860 4728 /** Current PDMDEVHLP version number. */ 4861 #define PDM_DEVHLPRC_VERSION PDM_VERSION_MAKE(0xffe6, 1 1, 0)4729 #define PDM_DEVHLPRC_VERSION PDM_VERSION_MAKE(0xffe6, 12, 0) 4862 4730 4863 4731 … … 5315 5183 DECLR0CALLBACKMEMBER(int, pfnPICSetUpContext,(PPDMDEVINS pDevIns, PPDMPICREG pPicReg, PCPDMPICHLP *ppPicHlp)); 5316 5184 5185 /** 5186 * Sets up the IOAPIC for the ring-0 context. 5187 * 5188 * This must be called after ring-3 has registered the PIC using 5189 * PDMDevHlpIoApicRegister(). 5190 * 5191 * @returns VBox status code. 5192 * @param pDevIns The device instance. 5193 * @param pIoApicReg The PIC registration information for ring-0, 5194 * considered volatile and copied. 5195 * @param ppIoApicHlp Where to return the ring-0 IOAPIC helpers. 5196 */ 5197 DECLR0CALLBACKMEMBER(int, pfnIoApicSetUpContext,(PPDMDEVINS pDevIns, PPDMIOAPICREG pIoApicReg, PCPDMIOAPICHLP *ppIoApicHlp)); 5198 5317 5199 /** Space reserved for future members. 5318 5200 * @{ */ … … 5338 5220 5339 5221 /** Current PDMDEVHLP version number. */ 5340 #define PDM_DEVHLPR0_VERSION PDM_VERSION_MAKE(0xffe5, 1 2, 0)5222 #define PDM_DEVHLPR0_VERSION PDM_VERSION_MAKE(0xffe5, 13, 0) 5341 5223 5342 5224 … … 7825 7707 7826 7708 /** 7827 * @copydoc PDMDEVHLPR3::pfnI OAPICRegister7828 */ 7829 DECLINLINE(int) PDMDevHlpI OAPICRegister(PPDMDEVINS pDevIns, PPDMIOAPICREG pIoApicReg, PCPDMIOAPICHLPR3 *ppIoApicHlpR3)7830 { 7831 return pDevIns->pHlpR3->pfnI OAPICRegister(pDevIns, pIoApicReg, ppIoApicHlpR3);7709 * @copydoc PDMDEVHLPR3::pfnIoApicRegister 7710 */ 7711 DECLINLINE(int) PDMDevHlpIoApicRegister(PPDMDEVINS pDevIns, PPDMIOAPICREG pIoApicReg, PCPDMIOAPICHLP *ppIoApicHlp) 7712 { 7713 return pDevIns->pHlpR3->pfnIoApicRegister(pDevIns, pIoApicReg, ppIoApicHlp); 7832 7714 } 7833 7715 … … 7970 7852 { 7971 7853 return pDevIns->CTX_SUFF(pHlp)->pfnPICSetUpContext(pDevIns, pPicReg, ppPicHlp); 7854 } 7855 7856 /** 7857 * @copydoc PDMDEVHLPR0::pfnIoApicSetUpContext 7858 */ 7859 DECLINLINE(int) PDMDevHlpIoApicSetUpContext(PPDMDEVINS pDevIns, PPDMIOAPICREG pIoApicReg, PCPDMIOAPICHLP *ppIoApicHlp) 7860 { 7861 return pDevIns->CTX_SUFF(pHlp)->pfnIoApicSetUpContext(pDevIns, pIoApicReg, ppIoApicHlp); 7972 7862 } 7973 7863
Note:
See TracChangeset
for help on using the changeset viewer.