Changeset 104842 in vbox for trunk/src/VBox/Main/src-client
- Timestamp:
- Jun 5, 2024 1:02:34 AM (8 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/ConsoleImplConfigX86.cpp
r104702 r104842 433 433 ComPtr<IPlatform> platform; 434 434 pMachine->COMGETTER(Platform)(platform.asOutParam()); H(); 435 436 /* We have to increase the RAM hole if lots of VRAM is assigned. We stupidly 437 have to do this before the MCFG region is subtracted, even if there 438 should be ample space for it after the VRAM due to alignment. See 439 assumptions in ich9pciFakePCIBIOS(). */ 440 ComPtr<IGraphicsAdapter> ptrGraphicsAdapter; 441 hrc = pMachine->COMGETTER(GraphicsAdapter)(ptrGraphicsAdapter.asOutParam()); H(); 442 ULONG cVRamMBs = 0; 443 hrc = ptrGraphicsAdapter->COMGETTER(VRAMSize)(&cVRamMBs); H(); 444 if (cVRamMBs > 256) 445 { 446 uint32_t cVRamMBsPowerOfTwo = RT_MIN(cVRamMBs, 1024); /* 1GB is the absolute max given PCI alignment. */ 447 if (!RT_IS_POWER_OF_TWO(cVRamMBsPowerOfTwo)) 448 cVRamMBsPowerOfTwo = RT_BIT_32(ASMBitFirstSetU32(cVRamMBsPowerOfTwo)); /* returns [1..32] */ 449 if (cbRamHole / _1M < cVRamMBsPowerOfTwo * 2) 450 { 451 cbRamHole = cVRamMBsPowerOfTwo * 2 * _1M; /* We must double the VRAM size due to PCI alignment. */ 452 /** @todo sort out the MCFG placement to better use available physical memory. */ 453 //if (uMcfgBase) 454 // uMcfgBase = _4G - cbRamHole + cVRamMBsPowerOfTwo * _1M; 455 } 456 } 435 457 436 458 ChipsetType_T chipsetType;
Note:
See TracChangeset
for help on using the changeset viewer.