Changeset 84826 in vbox for trunk/include
- Timestamp:
- Jun 15, 2020 8:20:40 AM (5 years ago)
- Location:
- trunk/include/VBox
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/msi.h
r84677 r84826 145 145 * fields but specifies reserved bits. 146 146 */ 147 typedef union 147 typedef union MSIADDR 148 148 { 149 149 struct … … 177 177 178 178 /** 179 * MSI Data Register (PCI + MMIO).179 * MSI Data Register. 180 180 * In accordance to the Intel spec. 181 181 * See Intel spec. 10.11.2 "Message Data Register Format". … … 184 184 * fields but specifies reserved bits. 185 185 */ 186 typedef union 186 typedef union MSIDATA 187 187 { 188 188 struct … … 210 210 * MSI Message (Address and Data Register Pair). 211 211 */ 212 typedef struct 212 typedef struct MSIMSG 213 213 { 214 214 /** The MSI Address Register. */ … … 217 217 MSIDATA Data; 218 218 } MSIMSG; 219 /** Pointer to an MSI message struct. */220 typedef MSIMSG *PMSIMSG;221 /** Pointer to a const MSI message struct. */222 typedef MSIMSG const *PCMSIMSG;223 219 224 220 #endif /* !VBOX_INCLUDED_msi_h */ -
trunk/include/VBox/pci.h
r84799 r84826 469 469 /** Make a device+function number. */ 470 470 #define VBOX_PCI_DEVFN_MAKE(a_uPciDevNo, a_uPciFunNo) (((a_uPciDevNo) << VBOX_PCI_DEVFN_DEV_SHIFT) | (a_uPciFunNo)) 471 /** Make a bus+device+function number. */ 472 #define VBOX_PCI_BUSDEVFN_MAKE(a_uPciBusNo, a_uPciDevFunNo) (((a_uPciBusNo) << VBOX_PCI_BUS_SHIFT) | (a_uPciDevFunNo)) 471 472 /** Checks whether the PCIBDF is valid. */ 473 #define PCIBDF_IS_VALID(a_uBusDevFn) (!((a_uBusDevFn) & PCI_BDF_F_INVALID)) 474 /** Make a PCIBDF given the bus and device:function. */ 475 #define PCIBDF_MAKE(a_uBus, a_uDevFn) (((a_uBus) << VBOX_PCI_BUS_SHIFT) | (a_uDevFn)) 473 476 474 477 -
trunk/include/VBox/types.h
r84458 r84826 1201 1201 1202 1202 1203 /** 1204 * A PCI bus:device:function (BDF) identifier. 1205 * 1206 * All 16 bits of a BDF are valid according to the PCI spec. We need one extra bit 1207 * to determine whether the BDF is valid in interfaces where the BDF may be 1208 * optional. 1209 */ 1210 typedef uint32_t PCIBDF; 1211 /** PCIBDF flag: Invalid. */ 1212 #define PCI_BDF_F_INVALID RT_BIT(31) 1213 /** Nil PCIBDF value. */ 1214 #define NIL_PCIBDF PCI_BDF_F_INVALID 1215 1216 /** Pointer to an MSI message struct. */ 1217 typedef struct MSIMSG *PMSIMSG; 1218 /** Pointer to a const MSI message struct. */ 1219 typedef const struct MSIMSG *PCMSIMSG; 1220 1221 1203 1222 /** @} */ 1204 1223 -
trunk/include/VBox/vmm/pdmapi.h
r84459 r84826 53 53 VMM_INT_DECL(bool) PDMHasIoApic(PVM pVM); 54 54 VMM_INT_DECL(bool) PDMHasApic(PVM pVM); 55 VMM_INT_DECL(int) PDMIoApicSetIrq(PVM pVM, uint8_t u8Irq, uint8_t u8Level, uint32_t uTagSrc);55 VMM_INT_DECL(int) PDMIoApicSetIrq(PVM pVM, PCIBDF uBusDevFn, uint8_t u8Irq, uint8_t u8Level, uint32_t uTagSrc); 56 56 VMM_INT_DECL(VBOXSTRICTRC) PDMIoApicBroadcastEoi(PVM pVM, uint8_t uVector); 57 VMM_INT_DECL(int) PDMIoApicSendMsi(PVM pVM, RTGCPHYS GCAddr, uint32_t uValue, uint32_t uTagSrc);57 VMM_INT_DECL(int) PDMIoApicSendMsi(PVM pVM, PCIBDF uBusDevFn, PCMSIMSG pMsi, uint32_t uTagSrc); 58 58 VMM_INT_DECL(int) PDMVmmDevHeapR3ToGCPhys(PVM pVM, RTR3PTR pv, RTGCPHYS *pGCPhys); 59 59 VMM_INT_DECL(bool) PDMVmmDevHeapIsEnabled(PVM pVM); -
trunk/include/VBox/vmm/pdmdev.h
r84714 r84826 1034 1034 * 1035 1035 * @param pDevIns PCI device instance. 1036 * @param uBusDevFn The bus:device:function of the device initiating the 1037 * IRQ. Pass NIL_PCIBDF when it's not a PCI device or 1038 * interrupt. 1036 1039 * @param iIrq IRQ number to set. 1037 1040 * @param iLevel IRQ level. See the PDM_IRQ_LEVEL_* \#defines. … … 1039 1042 * @thread EMT only. 1040 1043 */ 1041 DECLRCCALLBACKMEMBER(void, pfnIoApicSetIrq,(PPDMDEVINS pDevIns, int iIrq, int iLevel, uint32_t uTagSrc));1044 DECLRCCALLBACKMEMBER(void, pfnIoApicSetIrq,(PPDMDEVINS pDevIns, PCIBDF uBusDevFn, int iIrq, int iLevel, uint32_t uTagSrc)); 1042 1045 1043 1046 /** … … 1045 1048 * 1046 1049 * @param pDevIns PCI device instance. 1047 * @param GCPhys Physical address MSI request was written. 1048 * @param uValue Value written. 1050 * @param uBusDevFn The bus:device:function of the device initiating the 1051 * MSI. Cannot be NIL_PCIBDF. 1052 * @param pMsi The MSI to send. 1049 1053 * @param uTagSrc The IRQ tag and source (for tracing). 1050 1054 * @thread EMT only. 1051 1055 */ 1052 DECLRCCALLBACKMEMBER(void, pfnIoApicSendMsi,(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, uint32_t uValue, uint32_t uTagSrc));1056 DECLRCCALLBACKMEMBER(void, pfnIoApicSendMsi,(PPDMDEVINS pDevIns, PCIBDF uBusDevFn, PCMSIMSG pMsi, uint32_t uTagSrc)); 1053 1057 1054 1058 … … 1088 1092 1089 1093 /** Current PDMPCIHLPRC version number. */ 1090 #define PDM_PCIHLPRC_VERSION PDM_VERSION_MAKE(0xfffd, 3, 0)1094 #define PDM_PCIHLPRC_VERSION PDM_VERSION_MAKE(0xfffd, 4, 0) 1091 1095 1092 1096 … … 1114 1118 * 1115 1119 * @param pDevIns PCI device instance. 1120 * @param uBusDevFn The bus:device:function of the device initiating the 1121 * IRQ. Pass NIL_PCIBDF when it's not a PCI device or 1122 * interrupt. 1116 1123 * @param iIrq IRQ number to set. 1117 1124 * @param iLevel IRQ level. See the PDM_IRQ_LEVEL_* \#defines. … … 1119 1126 * @thread EMT only. 1120 1127 */ 1121 DECLR0CALLBACKMEMBER(void, pfnIoApicSetIrq,(PPDMDEVINS pDevIns, int iIrq, int iLevel, uint32_t uTagSrc));1128 DECLR0CALLBACKMEMBER(void, pfnIoApicSetIrq,(PPDMDEVINS pDevIns, PCIBDF uBusDevFn, int iIrq, int iLevel, uint32_t uTagSrc)); 1122 1129 1123 1130 /** … … 1125 1132 * 1126 1133 * @param pDevIns PCI device instance. 1127 * @param GCPhys Physical address MSI request was written. 1128 * @param uValue Value written. 1134 * @param uBusDevFn The bus:device:function of the device initiating the 1135 * MSI. Cannot be NIL_PCIBDF. 1136 * @param pMsi The MSI to send. 1129 1137 * @param uTagSrc The IRQ tag and source (for tracing). 1130 1138 * @thread EMT only. 1131 1139 */ 1132 DECLR0CALLBACKMEMBER(void, pfnIoApicSendMsi,(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, uint32_t uValue, uint32_t uTagSrc));1140 DECLR0CALLBACKMEMBER(void, pfnIoApicSendMsi,(PPDMDEVINS pDevIns, PCIBDF uBusDevFn, PCMSIMSG pMsi, uint32_t uTagSrc)); 1133 1141 1134 1142 /** … … 1167 1175 1168 1176 /** Current PDMPCIHLPR0 version number. */ 1169 #define PDM_PCIHLPR0_VERSION PDM_VERSION_MAKE(0xfffc, 5, 0)1177 #define PDM_PCIHLPR0_VERSION PDM_VERSION_MAKE(0xfffc, 6, 0) 1170 1178 1171 1179 /** … … 1191 1199 * 1192 1200 * @param pDevIns The PCI device instance. 1201 * @param uBusDevFn The bus:device:function of the device initiating the 1202 * IRQ. Pass NIL_PCIBDF when it's not a PCI device or 1203 * interrupt. 1193 1204 * @param iIrq IRQ number to set. 1194 1205 * @param iLevel IRQ level. See the PDM_IRQ_LEVEL_* \#defines. 1195 1206 * @param uTagSrc The IRQ tag and source (for tracing). 1196 1207 */ 1197 DECLR3CALLBACKMEMBER(void, pfnIoApicSetIrq,(PPDMDEVINS pDevIns, int iIrq, int iLevel, uint32_t uTagSrc));1208 DECLR3CALLBACKMEMBER(void, pfnIoApicSetIrq,(PPDMDEVINS pDevIns, PCIBDF uBusDevFn, int iIrq, int iLevel, uint32_t uTagSrc)); 1198 1209 1199 1210 /** … … 1201 1212 * 1202 1213 * @param pDevIns PCI device instance. 1203 * @param GCPhys Physical address MSI request was written. 1204 * @param uValue Value written. 1214 * @param uBusDevFn The bus:device:function of the device initiating the 1215 * MSI. Cannot be NIL_PCIBDF. 1216 * @param pMsi The MSI to send. 1205 1217 * @param uTagSrc The IRQ tag and source (for tracing). 1206 1218 */ 1207 DECLR3CALLBACKMEMBER(void, pfnIoApicSendMsi,(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, uint32_t uValue, uint32_t uTagSrc));1219 DECLR3CALLBACKMEMBER(void, pfnIoApicSendMsi,(PPDMDEVINS pDevIns, PCIBDF uBusDevFn, PCMSIMSG pMsi, uint32_t uTagSrc)); 1208 1220 1209 1221 /** … … 1242 1254 1243 1255 /** Current PDMPCIHLPR3 version number. */ 1244 #define PDM_PCIHLPR3_VERSION PDM_VERSION_MAKE(0xfffb, 4, 0)1256 #define PDM_PCIHLPR3_VERSION PDM_VERSION_MAKE(0xfffb, 5, 0) 1245 1257 1246 1258 … … 1695 1707 * 1696 1708 * @param pDevIns Device instance of the I/O APIC. 1709 * @param uBusDevFn The bus:device:function of the device initiating the 1710 * IRQ. Can be NIL_PCIBDF. 1697 1711 * @param iIrq IRQ number to set. 1698 1712 * @param iLevel IRQ level. See the PDM_IRQ_LEVEL_* \#defines. … … 1702 1716 * Actually, as per 2018-07-21 this isn't true (bird). 1703 1717 */ 1704 DECLCALLBACKMEMBER(void, pfnSetIrq)(PPDMDEVINS pDevIns, int iIrq, int iLevel, uint32_t uTagSrc);1718 DECLCALLBACKMEMBER(void, pfnSetIrq)(PPDMDEVINS pDevIns, PCIBDF uBusDevFn, int iIrq, int iLevel, uint32_t uTagSrc); 1705 1719 1706 1720 /** … … 1708 1722 * 1709 1723 * @param pDevIns Device instance of the I/O APIC. 1710 * @param GCPhys Request address. 1711 * @param uValue Request value. 1724 * @param uBusDevFn The bus:device:function of the device initiating the 1725 * MSI. Cannot be NIL_PCIBDF. 1726 * @param pMsi The MSI to send. 1712 1727 * @param uTagSrc The IRQ tag and source (for tracing). 1713 1728 * … … 1715 1730 * Actually, as per 2018-07-21 this isn't true (bird). 1716 1731 */ 1717 DECLCALLBACKMEMBER(void, pfnSendMsi)(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, uint32_t uValue, uint32_t uTagSrc);1732 DECLCALLBACKMEMBER(void, pfnSendMsi)(PPDMDEVINS pDevIns, PCIBDF uBusDevFn, PCMSIMSG pMsi, uint32_t uTagSrc); 1718 1733 1719 1734 /** … … 1739 1754 1740 1755 /** Current PDMAPICREG version number. */ 1741 #define PDM_IOAPICREG_VERSION PDM_VERSION_MAKE(0xfff2, 6, 0)1756 #define PDM_IOAPICREG_VERSION PDM_VERSION_MAKE(0xfff2, 7, 0) 1742 1757 1743 1758
Note:
See TracChangeset
for help on using the changeset viewer.