- Timestamp:
- Jan 31, 2017 5:52:26 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Bus/DevPciIch9.cpp
r65540 r65557 1594 1594 /* Need again alignment to a 4KB boundary. */ 1595 1595 pPciRoot->uPciBiosIo = RT_ALIGN_32(pPciRoot->uPciBiosIo, 4*1024); 1596 ich9pciBiosInitWriteConfig(pPciRoot, uBus, uDevFn, VBOX_PCI_IO_LIMIT, ((pPciRoot->uPciBiosIo >> 8) & 0xf0) - 1, 1);1596 ich9pciBiosInitWriteConfig(pPciRoot, uBus, uDevFn, VBOX_PCI_IO_LIMIT, ((pPciRoot->uPciBiosIo - 1) >> 8) & 0xf0, 1); 1597 1597 } 1598 1598 else … … 1606 1606 { 1607 1607 pPciRoot->uPciBiosMmio = RT_ALIGN_32(pPciRoot->uPciBiosMmio, 1024*1024); 1608 ich9pciBiosInitWriteConfig(pPciRoot, uBus, uDevFn, VBOX_PCI_MEMORY_LIMIT, ((pPciRoot->uPciBiosMmio >> 16) & UINT32_C(0xfff0)) - 1, 2);1608 ich9pciBiosInitWriteConfig(pPciRoot, uBus, uDevFn, VBOX_PCI_MEMORY_LIMIT, ((pPciRoot->uPciBiosMmio - 1) >> 16) & UINT32_C(0xfff0), 2); 1609 1609 } 1610 1610 else … … 1919 1919 uLimit = RT_ALIGN_32(pPciRoot->uPciBiosMmio, 1024*1024) - 1; 1920 1920 } 1921 /*1922 * The bottom 4 bits of both the Prefetchable Memory Base and Prefetchable1923 * Memory Limit are read-only, contain the same value, and encode whether1924 * or not the bridge supports 64-bit addresses. If these four bits have1925 * the value 0h, then the bridge supports only 32-bit addresses. If these1926 * four bits have the value 01h, then the bridge supports 64-bit addresses1927 * and the Prefetchable Base Upper 32 Bits and Prfetchable Limit Upper 321928 * Bits registers hold the rest of the 64-bit prefetchable base and limit1929 * respectively.1930 */1931 uint32_t uSupports64Bit = fUse64Bit ? 0x1 : 0x0;1932 1921 ich9pciBiosInitWriteConfig(pPciRoot, uBus, uDevFn, VBOX_PCI_PREF_BASE_UPPER32, uBase >> 32, 4); 1933 ich9pciBiosInitWriteConfig(pPciRoot, uBus, uDevFn, VBOX_PCI_PREF_MEMORY_BASE, ( (uint32_t)(uBase >> 16) & UINT32_C(0xfff0)) | uSupports64Bit, 2);1922 ich9pciBiosInitWriteConfig(pPciRoot, uBus, uDevFn, VBOX_PCI_PREF_MEMORY_BASE, (uint32_t)(uBase >> 16) & UINT32_C(0xfff0), 2); 1934 1923 ich9pciBiosInitWriteConfig(pPciRoot, uBus, uDevFn, VBOX_PCI_PREF_LIMIT_UPPER32, uLimit >> 32, 4); 1935 ich9pciBiosInitWriteConfig(pPciRoot, uBus, uDevFn, VBOX_PCI_PREF_MEMORY_LIMIT, ( (uint32_t)(uLimit >> 16) & UINT32_C(0xfff0)) | uSupports64Bit, 2);1924 ich9pciBiosInitWriteConfig(pPciRoot, uBus, uDevFn, VBOX_PCI_PREF_MEMORY_LIMIT, (uint32_t)(uLimit >> 16) & UINT32_C(0xfff0), 2); 1936 1925 1937 1926 return false; … … 2671 2660 break; 2672 2661 } 2662 else if ( uAddress == VBOX_PCI_IO_BASE 2663 || uAddress == VBOX_PCI_IO_LIMIT 2664 || uAddress == VBOX_PCI_MEMORY_BASE 2665 || uAddress == VBOX_PCI_MEMORY_LIMIT 2666 || uAddress == VBOX_PCI_PREF_MEMORY_BASE 2667 || uAddress == VBOX_PCI_PREF_MEMORY_LIMIT) 2668 { 2669 /* All bridge address decoders have the low 4 bits 2670 * as readonly, and all but the prefetchable ones 2671 * have the low 4 bits as 0 (the prefetchable have 2672 * it as 1 to show the 64-bit decoder support. */ 2673 bVal &= 0xf0; 2674 if ( uAddress == VBOX_PCI_PREF_MEMORY_BASE 2675 || uAddress == VBOX_PCI_PREF_MEMORY_LIMIT) 2676 bVal |= 0x01; 2677 } 2673 2678 /* fall thru (bridge config space which isn't a BAR) */ 2674 2679 default:
Note:
See TracChangeset
for help on using the changeset viewer.