Changeset 64466 in vbox
- Timestamp:
- Oct 28, 2016 2:38:01 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Bus/DevPciIch9.cpp
r64465 r64466 1846 1846 static void ich9pciUpdateMappings(PDMPCIDEV* pDev) 1847 1847 { 1848 uint64_t uLast, uNew;1849 1850 1848 uint16_t const u16Cmd = ich9pciGetWord(pDev, VBOX_PCI_COMMAND); 1851 1849 for (unsigned iRegion = 0; iRegion < VBOX_PCI_NUM_REGIONS; iRegion++) … … 1861 1859 == PCI_ADDRESS_SPACE_BAR64; 1862 1860 1861 uint64_t uNew = INVALID_PCI_ADDRESS; 1863 1862 if (pRegion->type & PCI_ADDRESS_SPACE_IO) 1864 1863 { 1865 /* port IO region */ 1864 /* 1865 * Port I/O region. Check if mapped and within 0..65535 range. 1866 */ 1866 1867 if (u16Cmd & PCI_COMMAND_IOACCESS) 1867 1868 { 1868 /* IO access allowed */ 1869 uNew = ich9pciGetDWord(pDev, offCfgReg); 1870 uNew &= ~(cbRegion - 1); 1871 uLast = uNew + cbRegion - 1; 1872 /* only 64K ioports on PC */ 1873 if (uLast <= uNew || uNew == 0 || uLast >= 0x10000) 1874 uNew = INVALID_PCI_ADDRESS; 1875 } else 1876 uNew = INVALID_PCI_ADDRESS; 1869 uint32_t uBase = ich9pciGetDWord(pDev, offCfgReg); 1870 uBase &= ~(uint32_t)(cbRegion - 1); 1871 uint64_t uLast = cbRegion - 1 + uBase; 1872 if ( uLast < _64K 1873 && uBase <= uLast 1874 && uBase > 0) 1875 uNew = uBase; 1876 } 1877 1877 } 1878 1878 else … … 1891 1891 { 1892 1892 uNew &= ~(cbRegion - 1); 1893 u Last = uNew + cbRegion - 1;1893 uint64_t uLast = uNew + cbRegion - 1; 1894 1894 /* NOTE: we do not support wrapping */ 1895 1895 /* XXX: as we cannot support really dynamic
Note:
See TracChangeset
for help on using the changeset viewer.