Changeset 64454 in vbox for trunk/src/VBox
- Timestamp:
- Oct 28, 2016 12:39:30 PM (8 years ago)
- Location:
- trunk/src/VBox/Devices/Bus
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Bus/DevPciIch9.cpp
r64453 r64454 1890 1890 { 1891 1891 NOREF(pDevIns); 1892 1892 1893 uint32_t uValue; 1893 1894 1894 if (uAddress + cb <= 256) 1895 1895 { 1896 /* Check for MSI capabilities - not really necessary, MsiPciConfigRead does the same as below! */1897 if ( pciDevIsMsiCapable(pPciDev)1898 && uAddress - (uint32_t)pPciDev->Int.s.u8MsiCapOffset < (uint32_t)pPciDev->Int.s.u8MsiCapSize )1899 return MsiPciConfigRead(pPciDev->Int.s.CTX_SUFF(pBus)->CTX_SUFF(pDevIns), pPciDev, uAddress, cb);1900 1901 /* Check for MSI-X capabilities - not really necessary, MsixPciConfigRead does the same as below! */1902 if ( pciDevIsMsixCapable(pPciDev)1903 && uAddress - (uint32_t)pPciDev->Int.s.u8MsixCapOffset < (uint32_t)pPciDev->Int.s.u8MsixCapSize)1904 return MsixPciConfigRead(pPciDev->Int.s.CTX_SUFF(pBus)->CTX_SUFF(pDevIns), pPciDev, uAddress, cb);1905 1906 1896 switch (cb) 1907 1897 { … … 1920 1910 break; 1921 1911 } 1912 1913 #ifdef LOG_ENABLED 1914 if ( pciDevIsMsiCapable(pPciDev) 1915 && uAddress - (uint32_t)pPciDev->Int.s.u8MsiCapOffset < (uint32_t)pPciDev->Int.s.u8MsiCapSize ) 1916 Log2(("ich9pciConfigReadDev: MSI CAP: %#x LB %u -> %#x\n", uAddress - (uint32_t)pPciDev->Int.s.u8MsiCapOffset, cb, uValue)); 1917 else if ( pciDevIsMsixCapable(pPciDev) 1918 && uAddress - (uint32_t)pPciDev->Int.s.u8MsixCapOffset < (uint32_t)pPciDev->Int.s.u8MsixCapSize) 1919 Log2(("ich9pciConfigReadDev: MSI-X CAP: %#x LB %u -> %#x\n", uAddress - (uint32_t)pPciDev->Int.s.u8MsiCapOffset, cb, uValue)); 1920 #endif 1922 1921 } 1923 1922 else -
trunk/src/VBox/Devices/Bus/MsiCommon.cpp
r64393 r64454 202 202 } 203 203 204 uint32_t MsiPciConfigRead (PPDMDEVINS pDevIns, PPDMPCIDEV pDev, uint32_t u32Address, unsigned len)205 {206 RT_NOREF1(pDevIns);207 #if defined(LOG_ENABLED) || defined(VBOX_STRICT)208 int32_t off = u32Address - pDev->Int.s.u8MsiCapOffset;209 Assert(off >= 0 && (pciDevIsMsiCapable(pDev) && off < pDev->Int.s.u8MsiCapSize));210 #endif211 uint32_t rv = 0;212 213 switch (len)214 {215 case 1:216 rv = PCIDevGetByte(pDev, u32Address);217 break;218 case 2:219 rv = PCIDevGetWord(pDev, u32Address);220 break;221 case 4:222 rv = PCIDevGetDWord(pDev, u32Address);223 break;224 default:225 Assert(false);226 }227 228 Log2(("MsiPciConfigRead: %d (%d) -> %x\n", off, len, rv));229 230 return rv;231 }232 233 204 int MsiInit(PPDMPCIDEV pDev, PPDMMSIREG pMsiReg) 234 205 { -
trunk/src/VBox/Devices/Bus/MsiCommon.h
r64387 r64454 42 42 /* PCI config space accessors for MSI registers */ 43 43 void MsiPciConfigWrite(PPDMDEVINS pDevIns, PCPDMPCIHLP pPciHlp, PPDMPCIDEV pDev, uint32_t u32Address, uint32_t val, unsigned len); 44 uint32_t MsiPciConfigRead (PPDMDEVINS pDevIns, PPDMPCIDEV pDev, uint32_t u32Address, unsigned len);45 44 #endif 46 45 … … 59 58 /* PCI config space accessors for MSI-X */ 60 59 void MsixPciConfigWrite(PPDMDEVINS pDevIns, PCPDMPCIHLP pPciHlp, PPDMPCIDEV pDev, uint32_t u32Address, uint32_t val, unsigned len); 61 uint32_t MsixPciConfigRead (PPDMDEVINS pDevIns, PPDMPCIDEV pDev, uint32_t u32Address, unsigned len);62 60 #endif -
trunk/src/VBox/Devices/Bus/MsixCommon.cpp
r64393 r64454 329 329 } 330 330 331 332 uint32_t MsixPciConfigRead(PPDMDEVINS pDevIns, PPDMPCIDEV pDev, uint32_t u32Address, unsigned len)333 {334 NOREF(pDevIns);335 #if defined(LOG_ENABLED) || defined(VBOX_STRICT)336 int32_t iOff = u32Address - pDev->Int.s.u8MsixCapOffset;337 Assert(iOff >= 0 && (pciDevIsMsixCapable(pDev) && iOff < pDev->Int.s.u8MsixCapSize));338 #endif339 uint32_t rv;340 switch (len)341 {342 case 1:343 rv = PCIDevGetByte(pDev, u32Address);344 break;345 case 2:346 rv = PCIDevGetWord(pDev, u32Address);347 break;348 case 4:349 rv = PCIDevGetDWord(pDev, u32Address);350 break;351 default:352 AssertFailed();353 rv = 0;354 }355 356 Log2(("MsixPciConfigRead: %d (%d) -> %x\n", iOff, len, rv));357 return rv;358 }359
Note:
See TracChangeset
for help on using the changeset viewer.