Changeset 64387 in vbox for trunk/src/VBox/Devices/Bus/MsiCommon.cpp
- Timestamp:
- Oct 24, 2016 2:06:02 PM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 111495
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Bus/MsiCommon.cpp
r64373 r64387 27 27 #include "PciInline.h" 28 28 29 DECLINLINE(uint16_t) msiGetMessageControl(PP CIDEVICEpDev)29 DECLINLINE(uint16_t) msiGetMessageControl(PPDMPCIDEV pDev) 30 30 { 31 31 uint32_t idxMessageControl = pDev->Int.s.u8MsiCapOffset + VBOX_MSI_CAP_MESSAGE_CONTROL; … … 38 38 } 39 39 40 DECLINLINE(bool) msiIs64Bit(PP CIDEVICEpDev)40 DECLINLINE(bool) msiIs64Bit(PPDMPCIDEV pDev) 41 41 { 42 42 return pciDevIsMsi64Capable(pDev); 43 43 } 44 44 45 DECLINLINE(uint32_t*) msiGetMaskBits(PP CIDEVICEpDev)45 DECLINLINE(uint32_t*) msiGetMaskBits(PPDMPCIDEV pDev) 46 46 { 47 47 uint8_t iOff = msiIs64Bit(pDev) ? VBOX_MSI_CAP_MASK_BITS_64 : VBOX_MSI_CAP_MASK_BITS_32; … … 53 53 } 54 54 55 DECLINLINE(uint32_t*) msiGetPendingBits(PP CIDEVICEpDev)55 DECLINLINE(uint32_t*) msiGetPendingBits(PPDMPCIDEV pDev) 56 56 { 57 57 uint8_t iOff = msiIs64Bit(pDev) ? VBOX_MSI_CAP_PENDING_BITS_64 : VBOX_MSI_CAP_PENDING_BITS_32; … … 63 63 } 64 64 65 DECLINLINE(bool) msiIsEnabled(PP CIDEVICEpDev)65 DECLINLINE(bool) msiIsEnabled(PPDMPCIDEV pDev) 66 66 { 67 67 return (msiGetMessageControl(pDev) & VBOX_PCI_MSI_FLAGS_ENABLE) != 0; 68 68 } 69 69 70 DECLINLINE(uint8_t) msiGetMme(PP CIDEVICEpDev)70 DECLINLINE(uint8_t) msiGetMme(PPDMPCIDEV pDev) 71 71 { 72 72 return (msiGetMessageControl(pDev) & VBOX_PCI_MSI_FLAGS_QSIZE) >> 4; 73 73 } 74 74 75 DECLINLINE(RTGCPHYS) msiGetMsiAddress(PP CIDEVICEpDev)75 DECLINLINE(RTGCPHYS) msiGetMsiAddress(PPDMPCIDEV pDev) 76 76 { 77 77 if (msiIs64Bit(pDev)) … … 87 87 } 88 88 89 DECLINLINE(uint32_t) msiGetMsiData(PP CIDEVICEpDev, int32_t iVector)89 DECLINLINE(uint32_t) msiGetMsiData(PPDMPCIDEV pDev, int32_t iVector) 90 90 { 91 91 int16_t iOff = msiIs64Bit(pDev) ? VBOX_MSI_CAP_MESSAGE_DATA_64 : VBOX_MSI_CAP_MESSAGE_DATA_32; … … 117 117 } 118 118 119 void MsiPciConfigWrite(PPDMDEVINS pDevIns, PCPDMPCIHLP pPciHlp, PP CIDEVICEpDev,119 void MsiPciConfigWrite(PPDMDEVINS pDevIns, PCPDMPCIHLP pPciHlp, PPDMPCIDEV pDev, 120 120 uint32_t u32Address, uint32_t val, unsigned len) 121 121 { … … 202 202 } 203 203 204 uint32_t MsiPciConfigRead (PPDMDEVINS pDevIns, PP CIDEVICEpDev, uint32_t u32Address, unsigned len)204 uint32_t MsiPciConfigRead (PPDMDEVINS pDevIns, PPDMPCIDEV pDev, uint32_t u32Address, unsigned len) 205 205 { 206 206 RT_NOREF1(pDevIns); … … 231 231 } 232 232 233 int MsiInit(PP CIDEVICEpDev, PPDMMSIREG pMsiReg)233 int MsiInit(PPDMPCIDEV pDev, PPDMMSIREG pMsiReg) 234 234 { 235 235 if (pMsiReg->cMsiVectors == 0) … … 284 284 285 285 286 bool MsiIsEnabled(PP CIDEVICEpDev)286 bool MsiIsEnabled(PPDMPCIDEV pDev) 287 287 { 288 288 return pciDevIsMsiCapable(pDev) && msiIsEnabled(pDev); 289 289 } 290 290 291 void MsiNotify(PPDMDEVINS pDevIns, PCPDMPCIHLP pPciHlp, PP CIDEVICEpDev, int iVector, int iLevel, uint32_t uTagSrc)291 void MsiNotify(PPDMDEVINS pDevIns, PCPDMPCIHLP pPciHlp, PPDMPCIDEV pDev, int iVector, int iLevel, uint32_t uTagSrc) 292 292 { 293 293 AssertMsg(msiIsEnabled(pDev), ("Must be enabled to use that"));
Note:
See TracChangeset
for help on using the changeset viewer.