Changeset 106360 in vbox for trunk/src/VBox/Main/src-client
- Timestamp:
- Oct 16, 2024 12:58:46 PM (5 months ago)
- svn:sync-xref-src-repo-rev:
- 165173
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/ConsoleImplConfigArmV8.cpp
r106061 r106360 68 68 #include "BusAssignmentManager.h" 69 69 #include "ResourceAssignmentManager.h" 70 #include "SystemTableBuilder.h" 70 71 #ifdef VBOX_WITH_EXTPACK 71 72 # include "ExtPackManagerImpl.h" … … 188 189 _1G - (VBOXPLATFORMARMV8_PHYS_ADDR + _1M), /*cbMmio32*/ 189 190 32 /*cInterrupts*/); 191 SystemTableBuilder *pSysTblsBldAcpi = NULL; 192 193 /* 194 * ACPI 195 */ 196 BOOL fACPI; 197 hrc = firmwareSettings->COMGETTER(ACPIEnabled)(&fACPI); H(); 198 if (fACPI) 199 pSysTblsBldAcpi = SystemTableBuilder::createInstance(kSystemTableType_Acpi); 200 190 201 191 202 /* … … 271 282 vrc = RTFdtNodeFinalize(hFdt); 272 283 284 if (pSysTblsBldAcpi) 285 { 286 vrc = pSysTblsBldAcpi->configureClock(); 287 VRC(); 288 } 289 273 290 /* 274 291 * MM values. … … 294 311 vrc = RTFdtNodePropertyAddString( hFdt, "device_type", "memory"); VRC(); 295 312 vrc = RTFdtNodeFinalize(hFdt); VRC(); 313 314 if (pSysTblsBldAcpi) 315 { 316 vrc = pSysTblsBldAcpi->addMemory(GCPhysRam, cbRam); 317 VRC(); 318 } 296 319 297 320 /* Configure the CPUs in the system, only one socket and cluster at the moment. */ … … 325 348 } 326 349 vrc = RTFdtNodeFinalize(hFdt); VRC(); 350 351 if (pSysTblsBldAcpi) 352 { 353 vrc = pSysTblsBldAcpi->addCpu(i); 354 VRC(); 355 } 327 356 } 328 357 … … 441 470 vrc = RTFdtNodePropertyAddU32( hFdt, "#interrupt-cells", 3); VRC(); 442 471 472 if (pSysTblsBldAcpi) 473 { 474 vrc = pSysTblsBldAcpi->configureGic(cCpus, GCPhysIntcDist, cbMmioIntcDist, 475 GCPhysIntcReDist, cbMmioIntcReDist); 476 VRC(); 477 } 478 443 479 #if 0 444 480 vrc = RTFdtNodeAddF(hFdt, "its@%RX32", 0x08080000); VRC(); … … 474 510 vrc = RTFdtNodePropertyAddString( hFdt, "compatible", "qemu,fw-cfg-mmio"); VRC(); 475 511 vrc = RTFdtNodeFinalize(hFdt); VRC(); 512 513 if (pSysTblsBldAcpi) 514 { 515 vrc = pSysTblsBldAcpi->addMmioDeviceNoIrq("qemu-fw-cfg", 0, GCPhysMmioStart, cbMmio); 516 VRC(); 517 } 476 518 } 477 519 … … 530 572 "arm,pl011", "arm,primecell"); VRC(); 531 573 vrc = RTFdtNodeFinalize(hFdt); VRC(); 574 575 if (pSysTblsBldAcpi) 576 { 577 vrc = pSysTblsBldAcpi->addMmioDevice("arm-pl011", ulInstance, GCPhysMmioStart, cbMmio, iIrq); 578 VRC(); 579 } 532 580 533 581 BOOL fServer; … … 588 636 vrc = RTFdtNodePropertyAddCellsU64(hFdt, "reg", 2, GCPhysMmioStart, cbMmio); VRC(); 589 637 vrc = RTFdtNodeFinalize(hFdt); VRC(); 638 639 if (pSysTblsBldAcpi) 640 { 641 vrc = pSysTblsBldAcpi->addMmioDevice("arm-pl061-gpio", 0, GCPhysMmioStart, _4K, iIrq); 642 VRC(); 643 } 590 644 591 645 InsertConfigNode(pInst, "LUN#0", &pLunL0); … … 679 733 vrc = RTFdtNodeFinalize(hFdt); VRC(); 680 734 735 if (pSysTblsBldAcpi) 736 { 737 vrc = pSysTblsBldAcpi->configurePcieRootBus("pci-generic-ecam", aPinIrqs, GCPhysMmioStart, GCPhysPciMmioEcam, 738 cbPciMmioEcam, GCPhysMmioStart, cbMmio, GCPhysPciMmio32, cbPciMmio32); 739 VRC(); 740 } 741 681 742 /* 682 743 * VMSVGA compliant graphics controller. … … 802 863 Assert(SUCCEEDED(hrc)); 803 864 865 RTGCPHYS GCPhysXsdp = NIL_RTGCPHYS; 866 size_t cbAcpiXsdp = 0; 867 size_t cbAcpi = 0; 868 if (pSysTblsBldAcpi) 869 { 870 vrc = pSysTblsBldAcpi->finishTables(VBOXPLATFORMARMV8_PHYS_ADDR + sizeof(ArmV8Platform) + RT_ALIGN_64(cbFdt, _64K), 871 hVfsIosDesc, &GCPhysXsdp, &cbAcpiXsdp, &cbAcpi); 872 AssertRCReturn(vrc, vrc); 873 Assert(GCPhysXsdp > VBOXPLATFORMARMV8_PHYS_ADDR); 874 875 /* Dump the ACPI table for debugging purposes if requested. */ 876 Bstr SysTblsDumpVal; 877 hrc = mMachine->GetExtraData(Bstr("VBoxInternal2/DumpSysTables").raw(), 878 SysTblsDumpVal.asOutParam()); 879 if ( hrc == S_OK 880 && SysTblsDumpVal.isNotEmpty()) 881 { 882 vrc = pSysTblsBldAcpi->dumpTables(Utf8Str(SysTblsDumpVal).c_str()); 883 AssertRCReturn(vrc, vrc); 884 } 885 886 delete pSysTblsBldAcpi; 887 888 vrc = RTVfsIoStrmZeroFill(hVfsIosDesc, (RTFOFF)(RT_ALIGN_64(cbAcpi, _64K) - cbAcpi)); 889 AssertRCReturn(vrc, vrc); 890 } 891 804 892 ArmV8Platform.u32Magic = VBOXPLATFORMARMV8_MAGIC; 805 893 ArmV8Platform.u32Version = VBOXPLATFORMARMV8_VERSION; … … 810 898 ArmV8Platform.i64OffFdt = sizeof(ArmV8Platform); 811 899 ArmV8Platform.cbFdt = RT_ALIGN_64(cbFdt, _64K); 812 ArmV8Platform.i64OffAcpiXsdp = 0; 813 ArmV8Platform.cbAcpiXsdp = 0; 900 if (cbAcpi) 901 { 902 ArmV8Platform.i64OffAcpi = sizeof(ArmV8Platform) + RT_ALIGN_64(cbFdt, _64K); 903 ArmV8Platform.cbAcpi = RT_ALIGN_64(cbAcpi, _64K); 904 ArmV8Platform.i64OffAcpiXsdp = GCPhysXsdp - VBOXPLATFORMARMV8_PHYS_ADDR; 905 ArmV8Platform.cbAcpiXsdp = cbAcpiXsdp; 906 } 814 907 ArmV8Platform.i64OffUefiRom = -128 * _1M; 815 908 ArmV8Platform.cbUefiRom = _64M;
Note:
See TracChangeset
for help on using the changeset viewer.