Changeset 65573 in vbox for trunk/src/VBox/Devices/PC
- Timestamp:
- Feb 1, 2017 4:42:40 PM (8 years ago)
- Location:
- trunk/src/VBox/Devices/PC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/DevACPI.cpp
r65101 r65573 171 171 SYSTEM_INFO_INDEX_SERIAL3_IOBASE = 7, 172 172 SYSTEM_INFO_INDEX_SERIAL3_IRQ = 8, 173 SYSTEM_INFO_INDEX_ HIGH_MEMORY_LENGTH= 9,173 SYSTEM_INFO_INDEX_PREF64_MEMORY_START = 9, 174 174 SYSTEM_INFO_INDEX_RTC_STATUS = 10, 175 175 SYSTEM_INFO_INDEX_CPU_LOCKED = 11, /**< Contains a flag indicating whether the CPU is locked or not */ … … 308 308 uint32_t uSystemInfoIndex; 309 309 uint64_t u64RamSize; 310 /** The number of bytes above 4GB. */311 uint64_t cbRamHigh;310 /** Offset of the 64-bit prefetchable memory window. */ 311 uint64_t u64PciPref64; 312 312 /** The number of bytes below 4GB. */ 313 313 uint32_t cbRamLow; … … 360 360 /** If MCFG ACPI table shown to the guest */ 361 361 bool fUseMcfg; 362 /** if the 64-bit prefetchable memory window is shown to the guest */ 363 bool fPciPref64Enabled; 362 364 /** Primary NIC PCI address. */ 363 365 uint32_t u32NicPciAddress; … … 1324 1326 break; 1325 1327 1326 case SYSTEM_INFO_INDEX_ HIGH_MEMORY_LENGTH:1327 *pu32 = pThis-> cbRamHigh>> 16; /* 64KB units */1328 Assert(((uint64_t)*pu32 << 16) == pThis-> cbRamHigh);1328 case SYSTEM_INFO_INDEX_PREF64_MEMORY_START: 1329 *pu32 = pThis->u64PciPref64 >> 16; /* 64KB units */ 1330 Assert(((uint64_t)*pu32 << 16) == pThis->u64PciPref64); 1329 1331 break; 1330 1332 … … 3129 3131 3130 3132 /* 3131 * Calculate the sizes for the high and low regions.3133 * Calculate the sizes for the low region and for the 64-bit prefetchable memory. 3132 3134 */ 3133 3135 const uint64_t offRamHole = _4G - cbRamHole; 3134 pThis->cbRamHigh = offRamHole < pThis->u64RamSize ? pThis->u64RamSize - offRamHole : 0; 3136 if (pThis->fPciPref64Enabled) 3137 pThis->u64PciPref64 = pThis->u64RamSize < _4G ? _4G : pThis->u64RamSize; /* MEM4 */ 3135 3138 uint64_t cbRamLow = offRamHole < pThis->u64RamSize ? offRamHole : pThis->u64RamSize; 3136 3139 if (cbRamLow > UINT32_C(0xffe00000)) /* See MEM3. */ … … 3558 3561 "McfgBase\0" 3559 3562 "McfgLength\0" 3563 "PciPref64Enabled\0" 3560 3564 "SmcEnabled\0" 3561 3565 "FdcEnabled\0" … … 3624 3628 N_("Configuration error: Failed to read \"McfgLength\"")); 3625 3629 pThis->fUseMcfg = (pThis->u64PciConfigMMioAddress != 0) && (pThis->u64PciConfigMMioLength != 0); 3630 3631 /* query whether we are supposed to set up the 64-bit prefetchable memory window */ 3632 rc = CFGMR3QueryBoolDef(pCfg, "PciPref64Enabled", &pThis->fPciPref64Enabled, false); 3633 if (RT_FAILURE(rc)) 3634 return PDMDEV_SET_ERROR(pDevIns, rc, 3635 N_("Configuration error: Failed to read \"PciPref64Enabled\"")); 3626 3636 3627 3637 /* query whether we are supposed to present custom table */ -
trunk/src/VBox/Devices/PC/vbox.dsl
r61677 r65573 347 347 SL3B, 32, // Serial3 base IO address 348 348 SL3I, 32, // Serial3 IRQ 349 MEMH, 32,349 PMEM, 32, 350 350 URTC, 32, // if RTC shown in tables 351 351 CPUL, 32, // flag of CPU lock state … … 389 389 DBG ("UFDC: ") 390 390 HEX4 (UFDC) 391 DBG (" MEMH: ")392 HEX4 ( MEMH)391 DBG ("PMEM: ") 392 HEX4 (PMEM) 393 393 } 394 394 … … 1567 1567 }) 1568 1568 1569 // Name (TOM, ResourceTemplate () // Memory above 4GB (aka high), appended when needed. 1570 //{1571 // QWORDMemory(1572 // ResourceProducer,// bit 0 of general flags is 01573 // PosDecode,// positive Decode1574 // MinFixed,// Range is fixed1575 // MaxFixed,// Range is fixed1576 // Cacheable,1577 //ReadWrite,1578 // 0x0000000000000000,// _GRA: Granularity.1579 // 0 /*0x0000000100000000*/, // _MIN: Min address, 4GB.1580 // 0 /*0x00000fffffffffff*/, // _MAX: Max possible address, 16TB.1581 // 0x0000000000000000,// _TRA: Translation1582 // 0x0000000000000000,// _LEN: Range length (calculated dynamically)1583 // ,// ResourceSourceIndex: Optional field left blank1584 // ,// ResourceSource: Optional field left blank1585 // MEM4// Name declaration for this descriptor.1586 //)1587 //})1569 Name (TOM, ResourceTemplate () 1570 { 1571 QwordMemory( 1572 ResourceProducer, // bit 0 of general flags is 0 1573 PosDecode, // positive Decode 1574 MinFixed, // Range is fixed 1575 MaxFixed, // Range is fixed 1576 Prefetchable, 1577 ReadWrite, 1578 0x0000000000000000, // _GRA: Granularity. 1579 0x0000000100000000, // _MIN: Min address, 4GB, will be overwritten. 1580 0x00000020ffffffff, // _MAX: Max possible address, will be overwritten. 1581 0x0000000000000000, // _TRA: Translation 1582 0x0000002000000000, // _LEN: Range length (calculated dynamically) 1583 , // ResourceSourceIndex: Optional field left blank 1584 , // ResourceSource: Optional field left blank 1585 MEM4 // Name declaration for this descriptor. 1586 ) 1587 }) 1588 1588 1589 1589 Method (_CRS, 0, NotSerialized) … … 1591 1591 CreateDwordField (CRS, \_SB.PCI0.MEM3._MIN, RAMT) 1592 1592 CreateDwordField (CRS, \_SB.PCI0.MEM3._LEN, RAMR) 1593 // CreateQwordField (TOM, \_SB.PCI0.MEM4._LEN, TM4L)1594 // CreateQwordField (TOM, \_SB.PCI0.MEM4._LEN, TM4N)1595 // CreateQwordField (TOM, \_SB.PCI0.MEM4._LEN, TM4X)1593 CreateQwordField (TOM, \_SB.PCI0.MEM4._MIN, TM4N) 1594 CreateQwordField (TOM, \_SB.PCI0.MEM4._MAX, TM4X) 1595 CreateQwordField (TOM, \_SB.PCI0.MEM4._LEN, TM4L) 1596 1596 1597 1597 Store (MEML, RAMT) 1598 1598 Subtract (0xffe00000, RAMT, RAMR) 1599 1599 1600 // If (LNotEqual (MEMH, 0x00000000)) 1601 // { 1602 // // 1603 // // Update the TOM resource template and append it to CRS. 1604 // // This way old < 4GB guest doesn't see anything different. 1605 // // (MEMH is the memory above 4GB specified in 64KB units.) 1606 // // 1607 // // Note: ACPI v2 doesn't do 32-bit integers. IASL may fail on 1608 // // seeing 64-bit constants and the code probably wont work. 1609 // // 1610 // Store (1, TM4N) 1611 // ShiftLeft (TM4N, 32, TM4N) 1612 // 1613 // Store (0x00000fff, TM4X) 1614 // ShiftLeft (TM4X, 32, TM4X) 1615 // Or (TM4X, 0xffffffff, TM4X) 1616 // 1617 // Store (MEMH, TM4L) 1618 // ShiftLeft (TM4L, 16, TM4L) 1619 // 1620 // ConcatenateResTemplate (CRS, TOM, Local2) 1621 // Return (Local2) 1622 // } 1600 if (LNotEqual (PMEM, 0x00000000)) 1601 { 1602 Store (PMEM, TM4N) 1603 ShiftLeft (TM4N, 16, TM4N) 1604 1605 Store (PMEM, TM4X) 1606 Store (0x10000000, TM4L) // Size 16TB 1607 Add (TM4X, TM4L, TM4X) 1608 Subtract (TM4X, 1, TM4X) 1609 ShiftLeft (TM4X, 16, TM4X) // MAX = MIN + LEN - (1 << 16) 1610 // Add (TM4X, 0xffff, TM4X) // For some reason this operation prevents 1611 // at least Linux from determining this 1612 // resource! 1613 ShiftLeft (TM4L, 16, TM4L) 1614 1615 ConcatenateResTemplate (CRS, TOM, Local2) 1616 1617 Return (Local2) 1618 } 1623 1619 1624 1620 Return (CRS)
Note:
See TracChangeset
for help on using the changeset viewer.