Changeset 107123 in vbox
- Timestamp:
- Nov 22, 2024 3:46:26 PM (8 weeks ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/ResourceAssignmentManager.h
r106957 r107123 64 64 HRESULT assignMmioRegion(const char *pszName, RTGCPHYS cbRegion, PRTGCPHYS pGCPhysStart, PRTGCPHYS pcbRegion); 65 65 HRESULT assignMmio32Region(const char *pszName, RTGCPHYS cbRegion, PRTGCPHYS pGCPhysStart, PRTGCPHYS pcbRegion); 66 HRESULT assignMmio64Region(const char *pszName, RTGCPHYS cbRegion, PRTGCPHYS pGCPhysStart, PRTGCPHYS pcbRegion); 66 67 67 68 HRESULT assignInterrupts(const char *pszName, uint32_t cInterrupts, uint32_t *piInterruptFirst); -
trunk/src/VBox/Main/src-client/ConsoleImplConfigArmV8.cpp
r106960 r107123 785 785 hrc = pResMgr->assignMmioRegionAligned("pci-pio", _64K, _64K, &GCPhysMmioStart, &cbMmio, false /*fOnly32Bit*/); H(); 786 786 hrc = pResMgr->assignMmioRegion( "pci-ecam", 16 * _1M, &GCPhysPciMmioEcam, &cbPciMmioEcam); H(); 787 hrc = pResMgr->assignMmio Region("pci-mmio", _2G, &GCPhysPciMmio, &cbPciMmio); H();787 hrc = pResMgr->assignMmio64Region( "pci-mmio", _2G, &GCPhysPciMmio, &cbPciMmio); H(); 788 788 hrc = pResMgr->assignMmio32Region( "pci-mmio32", _256M, &GCPhysPciMmio32, &cbPciMmio32); H(); 789 789 -
trunk/src/VBox/Main/src-client/ResourceAssignmentManager.cpp
r106966 r107123 128 128 RTGCPHYS GCPhysStart, RTGCPHYS GCPhysEnd); 129 129 HRESULT addAddrRange(const char *pszName, RESOURCEREGIONTYPE enmType, RTGCPHYS GCPhysStart, RTGCPHYS GCPhysEnd); 130 HRESULT findNextFreeAddrRange(RTGCPHYS cbRegion, RTGCPHYS cbAlignment, RTGCPHYS GCPhysM ax, RTGCPHYS GCPhysHint,130 HRESULT findNextFreeAddrRange(RTGCPHYS cbRegion, RTGCPHYS cbAlignment, RTGCPHYS GCPhysMin, RTGCPHYS GCPhysMax, RTGCPHYS GCPhysHint, 131 131 PRTGCPHYS pGCPhysStart, PRTGCPHYS pcbRegion); 132 132 … … 256 256 257 257 258 HRESULT ResourceAssignmentManager::State::findNextFreeAddrRange(RTGCPHYS cbRegion, RTGCPHYS cbAlignment, RTGCPHYS GCPhysM ax,258 HRESULT ResourceAssignmentManager::State::findNextFreeAddrRange(RTGCPHYS cbRegion, RTGCPHYS cbAlignment, RTGCPHYS GCPhysMin, RTGCPHYS GCPhysMax, 259 259 RTGCPHYS GCPhysHint, PRTGCPHYS pGCPhysStart, PRTGCPHYS pcbRegion) 260 260 { … … 275 275 if ( pRegion->enmType == kResourceRegionType_Free 276 276 && GCPhysHint >= pRegion->GCPhysEnd 277 && GCPhysMin <= pRegion->GCPhysStart 277 278 && GCPhysMax >= pRegion->GCPhysEnd 278 279 && GCPhysStartAligned >= pRegion->GCPhysStart … … 287 288 } 288 289 } 290 291 while ( iRegion < m_cRegions 292 && GCPhysMin > m_paRegions[iRegion].GCPhysStart) 293 iRegion++; 289 294 290 295 /* Find a free region which satisfies or requirements. */ … … 395 400 RTGCPHYS GCPhysRegionStart; 396 401 RTGCPHYS cbRegionFinal; 397 HRESULT hrc = m_pState->findNextFreeAddrRange(cbRegion, cbAlignment, fOnly32Bit ? _4G : RTGCPHYS_MAX,402 HRESULT hrc = m_pState->findNextFreeAddrRange(cbRegion, cbAlignment, 0 /*GCPhysMin*/, fOnly32Bit ? _4G : RTGCPHYS_MAX, 398 403 m_GCPhysMmioHint, &GCPhysRegionStart, &cbRegionFinal); 399 404 if (SUCCEEDED(hrc)) … … 417 422 { 418 423 return assignMmioRegionAligned(pszName, cbRegion, _4K, pGCPhysStart, pcbRegion, true /*fOnly32Bit*/); 424 } 425 426 427 HRESULT ResourceAssignmentManager::assignMmio64Region(const char *pszName, RTGCPHYS cbRegion, PRTGCPHYS pGCPhysStart, PRTGCPHYS pcbRegion) 428 { 429 RTGCPHYS GCPhysRegionStart; 430 RTGCPHYS cbRegionFinal; 431 HRESULT hrc = m_pState->findNextFreeAddrRange(cbRegion, _4K, _4G /*GCPhysMin*/, RTGCPHYS_MAX, 432 m_GCPhysMmioHint, &GCPhysRegionStart, &cbRegionFinal); 433 if (SUCCEEDED(hrc)) 434 { 435 *pGCPhysStart = GCPhysRegionStart; 436 *pcbRegion = cbRegionFinal; 437 return assignFixedMmioRegion(pszName, GCPhysRegionStart, cbRegion); 438 } 439 440 return hrc; 419 441 } 420 442
Note:
See TracChangeset
for help on using the changeset viewer.