Changeset 70182 in vbox for trunk/src/VBox
- Timestamp:
- Dec 17, 2017 1:49:51 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Bus/DevPciIch9.cpp
r70181 r70182 1788 1788 /* Align starting address to region size. */ 1789 1789 uNew = (uNew + cbRegSize64 - 1) & ~(cbRegSize64 - 1); 1790 /* Unconditionally exclude I/O-APIC/HPET/ROM. Pessimistic, but better than causing a mess. */1790 /* Unconditionally exclude I/O-APIC/HPET/ROM. Pessimistic, but better than causing a mess. Okay for BIOS. */ 1791 1791 if ( !uNew 1792 1792 || (uNew <= UINT32_C(0xffffffff) && uNew + cbRegSize64 - 1 >= UINT32_C(0xfec00000)) 1793 1793 || uNew >= _4G) 1794 1794 { 1795 Log2Func(("region #%u: Rejecting address range: %#x LB %#RX64\n", iRegion, uNew, cbRegSize64)); 1795 1796 Assert(fDryrun); 1796 1797 return true; … … 2274 2275 /* safe, only needs to go to the config space array */ 2275 2276 uint16_t const u16Cmd = PDMPciDevGetWord(pPciDev, VBOX_PCI_COMMAND); 2277 Log4(("devpciR3UpdateMappings: dev %u/%u (%s): u16Cmd=%#x\n", 2278 pPciDev->uDevFn >> VBOX_PCI_DEVFN_DEV_SHIFT, pPciDev->uDevFn & VBOX_PCI_DEVFN_FUN_MASK, pPciDev->pszNameR3, u16Cmd)); 2276 2279 for (unsigned iRegion = 0; iRegion < VBOX_PCI_NUM_REGIONS; iRegion++) 2277 2280 { … … 2304 2307 && uIoBase > 0) 2305 2308 uNew = uIoBase; 2309 else 2310 Log4(("devpciR3UpdateMappings: dev %u/%u (%s): region #%u: Disregarding invalid I/O port range: %#RX32..%#RX64\n", 2311 pPciDev->uDevFn >> VBOX_PCI_DEVFN_DEV_SHIFT, pPciDev->uDevFn & VBOX_PCI_DEVFN_FUN_MASK, 2312 pPciDev->pszNameR3, iRegion, uIoBase, uLast)); 2306 2313 } 2307 2314 } … … 2314 2321 * catch silly OSes which probe 64-bit BARs without disabling the 2315 2322 * corresponding transactions. 2323 * 2324 * Update: The pure paranoia above broke NT 3.51, so it was changed to only 2325 * exclude the 64KB BIOS mapping at the top. NT 3.51 excludes the 2326 * top 256KB, btw. 2316 2327 */ 2328 /** @todo Query upper boundrary from CPUM and PGMPhysRom instead of making 2329 * incorrect assumptions. */ 2317 2330 else if (u16Cmd & VBOX_PCI_COMMAND_MEMORY) 2318 2331 { … … 2332 2345 uint64_t uLast = uMemBase + cbRegion - 1; 2333 2346 if ( uMemBase < uLast 2334 && uMemBase > 0 2335 && !( uMemBase <= UINT32_C(0xffffffff) 2336 && uLast >= UINT32_C(0xfec00000)) 2347 && uMemBase > 0) 2348 { 2349 if ( ( uMemBase > UINT32_C(0xffffffff) 2350 || uLast < UINT32_C(0xffff0000) ) /* UINT32_C(0xfec00000) - breaks NT3.51! */ 2337 2351 && uMemBase < UINT64_C(0xffffffff00000000) ) 2338 2352 uNew = uMemBase; 2353 else 2354 Log(("devpciR3UpdateMappings: dev %u/%u (%s): region #%u: Rejecting address range: %#RX64..%#RX64!\n", 2355 pPciDev->uDevFn >> VBOX_PCI_DEVFN_DEV_SHIFT, pPciDev->uDevFn & VBOX_PCI_DEVFN_FUN_MASK, 2356 pPciDev->pszNameR3, iRegion, uMemBase, uLast)); 2357 } 2358 else 2359 Log2(("devpciR3UpdateMappings: dev %u/%u (%s): region #%u: Disregarding invalid address range: %#RX64..%#RX64\n", 2360 pPciDev->uDevFn >> VBOX_PCI_DEVFN_DEV_SHIFT, pPciDev->uDevFn & VBOX_PCI_DEVFN_FUN_MASK, 2361 pPciDev->pszNameR3, iRegion, uMemBase, uLast)); 2339 2362 } 2340 2363 } … … 2343 2366 * Do real unmapping and/or mapping if the address change. 2344 2367 */ 2368 Log4(("devpciR3UpdateMappings: dev %u/%u (%s): iRegion=%u addr=%#RX64 uNew=%#RX64\n", 2369 pPciDev->uDevFn >> VBOX_PCI_DEVFN_DEV_SHIFT, pPciDev->uDevFn & VBOX_PCI_DEVFN_FUN_MASK, pPciDev->pszNameR3, 2370 iRegion, pRegion->addr, uNew)); 2345 2371 if (uNew != pRegion->addr) 2346 2372 {
Note:
See TracChangeset
for help on using the changeset viewer.