Changeset 105670 in vbox for trunk/src/VBox/Devices/EFI/FirmwareNew/MdeModulePkg/Universal/Acpi
- Timestamp:
- Aug 14, 2024 1:16:30 PM (6 months ago)
- Location:
- trunk/src/VBox/Devices/EFI/FirmwareNew
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/FirmwareNew
-
Property svn:mergeinfo
changed from (toggle deleted branches)
to (toggle deleted branches)/vendor/edk2/current 103735-103757,103769-103776,129194-159268 /vendor/edk2/current 103735-103757,103769-103776,129194-164365
-
Property svn:mergeinfo
changed from (toggle deleted branches)
-
trunk/src/VBox/Devices/EFI/FirmwareNew/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
r99404 r105670 69 69 gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultCreatorRevision ## CONSUMES 70 70 gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiExposedTableVersions ## CONSUMES 71 gEfiMdeModulePkgTokenSpaceGuid.PcdNoACPIReclaimMemory ## CONSUMES 71 72 72 73 [Protocols] -
trunk/src/VBox/Devices/EFI/FirmwareNew/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c
r99404 r105670 341 341 EFI_STATUS Status; 342 342 UINT64 CurrentData; 343 EFI_MEMORY_TYPE AcpiAllocateMemoryType; 343 344 344 345 CopyMem (&TempPrivateData, AcpiTableInstance, sizeof (EFI_ACPI_TABLE_INSTANCE)); … … 360 361 } 361 362 363 if (PcdGetBool (PcdNoACPIReclaimMemory)) { 364 AcpiAllocateMemoryType = EfiACPIMemoryNVS; 365 } else { 366 AcpiAllocateMemoryType = EfiACPIReclaimMemory; 367 } 368 362 369 if (mAcpiTableAllocType != AllocateAnyPages) { 363 370 // … … 373 380 Status = gBS->AllocatePages ( 374 381 mAcpiTableAllocType, 375 EfiACPIReclaimMemory,382 AcpiAllocateMemoryType, 376 383 EFI_SIZE_TO_PAGES (TotalSize), 377 384 &PageAddress … … 379 386 } else { 380 387 Status = gBS->AllocatePool ( 381 EfiACPIReclaimMemory,388 AcpiAllocateMemoryType, 382 389 TotalSize, 383 390 (VOID **)&Pointer … … 513 520 UINT64 Buffer64; 514 521 BOOLEAN AddToRsdt; 522 EFI_MEMORY_TYPE AcpiAllocateMemoryType; 515 523 516 524 // … … 550 558 CurrentTableList->TableSize = CurrentTableSize; 551 559 CurrentTableList->PoolAllocation = FALSE; 560 561 if (PcdGetBool (PcdNoACPIReclaimMemory)) { 562 AcpiAllocateMemoryType = EfiACPIMemoryNVS; 563 } else { 564 AcpiAllocateMemoryType = EfiACPIReclaimMemory; 565 } 552 566 553 567 // … … 586 600 // 587 601 Status = gBS->AllocatePool ( 588 EfiACPIReclaimMemory,602 AcpiAllocateMemoryType, 589 603 CurrentTableList->TableSize, 590 604 (VOID **)&CurrentTableList->Table … … 597 611 Status = gBS->AllocatePages ( 598 612 mAcpiTableAllocType, 599 EfiACPIReclaimMemory,613 AcpiAllocateMemoryType, 600 614 EFI_SIZE_TO_PAGES (CurrentTableList->TableSize), 601 615 &AllocPhysAddress … … 1893 1907 } 1894 1908 1895 if (((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE *)ChildTable)->Dsdt != 0) { 1909 // 1910 // First check if xDSDT is available, as that is preferred as per 1911 // ACPI Spec 6.5+ Table 5-9 X_DSDT definition 1912 // 1913 if (((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE *)ChildTable)->XDsdt != 0) { 1914 TableToInstall = (VOID *)(UINTN)((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE *)ChildTable)->XDsdt; 1915 } else if (((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE *)ChildTable)->Dsdt != 0) { 1896 1916 TableToInstall = (VOID *)(UINTN)((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE *)ChildTable)->Dsdt; 1897 Status = AddTableToList (AcpiTableInstance, TableToInstall, TRUE, Version, TRUE, &TableKey); 1898 if (EFI_ERROR (Status)) { 1899 DEBUG ((DEBUG_ERROR, "InstallAcpiTableFromHob: Fail to add ACPI table DSDT\n")); 1900 ASSERT_EFI_ERROR (Status); 1901 break; 1902 } 1917 } else { 1918 DEBUG ((DEBUG_ERROR, "DSDT table not found\n")); 1919 continue; 1920 } 1921 1922 Status = AddTableToList (AcpiTableInstance, TableToInstall, TRUE, Version, TRUE, &TableKey); 1923 if (EFI_ERROR (Status)) { 1924 DEBUG ((DEBUG_ERROR, "InstallAcpiTableFromHob: Fail to add ACPI table DSDT\n")); 1925 ASSERT_EFI_ERROR (Status); 1926 break; 1903 1927 } 1904 1928 } … … 1945 1969 UINT8 *Pointer; 1946 1970 EFI_PHYSICAL_ADDRESS PageAddress; 1971 EFI_MEMORY_TYPE AcpiAllocateMemoryType; 1947 1972 1948 1973 // … … 1979 2004 } 1980 2005 2006 if (PcdGetBool (PcdNoACPIReclaimMemory)) { 2007 AcpiAllocateMemoryType = EfiACPIMemoryNVS; 2008 } else { 2009 AcpiAllocateMemoryType = EfiACPIReclaimMemory; 2010 } 2011 1981 2012 if (mAcpiTableAllocType != AllocateAnyPages) { 1982 2013 PageAddress = 0xFFFFFFFF; 1983 2014 Status = gBS->AllocatePages ( 1984 2015 mAcpiTableAllocType, 1985 EfiACPIReclaimMemory,2016 AcpiAllocateMemoryType, 1986 2017 EFI_SIZE_TO_PAGES (RsdpTableSize), 1987 2018 &PageAddress … … 1989 2020 } else { 1990 2021 Status = gBS->AllocatePool ( 1991 EfiACPIReclaimMemory,2022 AcpiAllocateMemoryType, 1992 2023 RsdpTableSize, 1993 2024 (VOID **)&Pointer … … 2038 2069 Status = gBS->AllocatePages ( 2039 2070 mAcpiTableAllocType, 2040 EfiACPIReclaimMemory,2071 AcpiAllocateMemoryType, 2041 2072 EFI_SIZE_TO_PAGES (TotalSize), 2042 2073 &PageAddress … … 2044 2075 } else { 2045 2076 Status = gBS->AllocatePool ( 2046 EfiACPIReclaimMemory,2077 AcpiAllocateMemoryType, 2047 2078 TotalSize, 2048 2079 (VOID **)&Pointer -
trunk/src/VBox/Devices/EFI/FirmwareNew/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTablePei/FirmwarePerformancePei.c
r99404 r105670 113 113 S3ResumeTotal = MultU64x32 (AcpiS3ResumeRecord->AverageResume, AcpiS3ResumeRecord->ResumeCount); 114 114 AcpiS3ResumeRecord->ResumeCount++; 115 AcpiS3ResumeRecord->AverageResume = DivU64x32 (S3ResumeTotal + AcpiS3ResumeRecord->FullResume, AcpiS3ResumeRecord->ResumeCount); 116 117 DEBUG ((DEBUG_INFO, "FPDT: S3 Resume Performance - ResumeCount = %d\n", AcpiS3ResumeRecord->ResumeCount)); 118 DEBUG ((DEBUG_INFO, "FPDT: S3 Resume Performance - FullResume = %ld\n", AcpiS3ResumeRecord->FullResume)); 119 DEBUG ((DEBUG_INFO, "FPDT: S3 Resume Performance - AverageResume = %ld\n", AcpiS3ResumeRecord->AverageResume)); 115 if (AcpiS3ResumeRecord->ResumeCount > 0) { 116 AcpiS3ResumeRecord->AverageResume = DivU64x32 (S3ResumeTotal + AcpiS3ResumeRecord->FullResume, AcpiS3ResumeRecord->ResumeCount); 117 DEBUG ((DEBUG_INFO, "\nFPDT: S3 Resume Performance - AverageResume = 0x%x\n", AcpiS3ResumeRecord->AverageResume)); 118 } else { 119 DEBUG ((DEBUG_ERROR, "\nFPDT: S3 ResumeCount reaches the MAX_UINT32 value. S3 ResumeCount record reset to Zero.")); 120 } 121 122 DEBUG ((DEBUG_INFO, "FPDT: S3 Resume Performance - ResumeCount = 0x%x\n", AcpiS3ResumeRecord->ResumeCount)); 123 DEBUG ((DEBUG_INFO, "FPDT: S3 Resume Performance - FullResume = 0x%x\n", AcpiS3ResumeRecord->FullResume)); 120 124 121 125 //
Note:
See TracChangeset
for help on using the changeset viewer.