Changeset 63773 in vbox
- Timestamp:
- Sep 9, 2016 9:20:28 AM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 110589
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Bus/DevPciIch9.cpp
r63702 r63773 1628 1628 /* Read memory type first. */ 1629 1629 uint8_t uResourceType = ich9pciConfigRead(pGlobals, uBus, uDevFn, uReg, 1); 1630 1631 Log(("Set region address: %02x:%02x.%d region %d address=%lld\n",1632 uBus, uDevFn >> 3, uDevFn & 7, iRegion, addr)); 1633 1634 bool f64Bit = (uResourceType & PCI_ADDRESS_SPACE_BAR64) != 0;1630 bool f64Bit = (uResourceType & ((uint8_t)(PCI_ADDRESS_SPACE_BAR64 | PCI_ADDRESS_SPACE_IO))) 1631 == PCI_ADDRESS_SPACE_BAR64; 1632 1633 Log(("Set region address: %02x:%02x.%d region %d address=%RX64%s\n", 1634 uBus, uDevFn >> 3, uDevFn & 7, iRegion, addr, f64Bit ? " (64-bit)" : "")); 1635 1635 1636 1636 /* Write address of the device. */ … … 1770 1770 uint8_t u8ResourceType = ich9pciConfigRead(pGlobals, uBus, uDevFn, u32Address, 1); 1771 1771 1772 bool f64 bit = (u8ResourceType & PCI_ADDRESS_SPACE_BAR64) != 0;1772 bool f64Bit = (u8ResourceType & PCI_ADDRESS_SPACE_BAR64) != 0; 1773 1773 bool fIsPio = ((u8ResourceType & PCI_COMMAND_IOACCESS) == PCI_COMMAND_IOACCESS); 1774 1774 uint64_t cbRegSize64 = 0; 1775 1775 1776 if (f64 bit)1776 if (f64Bit) 1777 1777 { 1778 1778 ich9pciConfigWrite(pGlobals, uBus, uDevFn, u32Address, UINT32_C(0xffffffff), 4); … … 1811 1811 cbRegSize64 = cbRegSize32; 1812 1812 } 1813 #if 0 /* bogus for 64-bit regions */ 1813 1814 #ifndef DEBUG_bird /* EFI triggers this for DevAHCI. */ 1814 1815 Assert(cbRegSize64 == (uint32_t)cbRegSize64); 1816 #endif 1815 1817 #endif 1816 1818 Log2(("%s: Size of region %u for device %d on bus %d is %lld\n", __FUNCTION__, iRegion, uDevFn, uBus, cbRegSize64)); … … 1826 1828 uNew &= UINT32_C(0xffff); 1827 1829 /* Unconditionally exclude I/O-APIC/HPET/ROM. Pessimistic, but better than causing a mess. */ 1828 if (!uNew || (uNew <= UINT32_C(0xffffffff) && uNew + cbRegSize64 - 1 >= UINT32_C(0xfec00000))) 1830 if ( f64Bit 1831 || !uNew 1832 || (uNew <= UINT32_C(0xffffffff) && uNew + cbRegSize64 - 1 >= UINT32_C(0xfec00000))) 1829 1833 { 1830 if (f64 bit)1834 if (f64Bit) 1831 1835 { 1832 1836 /* Map a 64-bit region above 4GB. */ … … 1861 1865 } 1862 1866 1863 if (f64 bit)1867 if (f64Bit) 1864 1868 iRegion++; /* skip next region */ 1865 1869 } … … 2473 2477 2474 2478 printIndent(pHlp, iIndent + 2); 2475 pHlp->pfnPrintf(pHlp, "%s region #%d: %x..%x\n", 2476 pszDesc, iRegion, u32Addr, u32Addr+iRegionSize); 2479 pHlp->pfnPrintf(pHlp, "%s region #%d: ",pszDesc, iRegion); 2477 2480 if (f64Bit) 2481 { 2482 uint32_t u32High = ich9pciGetDWord(pPciDev, ich9pciGetRegionReg(iRegion+1)); 2483 uint64_t u64Addr = RT_MAKE_U64(u32Addr, u32High); 2484 pHlp->pfnPrintf(pHlp, "%RX64..%RX64\n", u64Addr, u64Addr+iRegionSize); 2478 2485 iRegion++; 2486 } 2487 else 2488 pHlp->pfnPrintf(pHlp, "%x..%x\n", u32Addr, u32Addr+iRegionSize); 2479 2489 } 2480 2490 }
Note:
See TracChangeset
for help on using the changeset viewer.