mirror of https://github.com/acidanthera/audk.git
ShellPkg/Dp: Allow dp command to work without ACPI
If the system does not have ACPI setup use the configuration table to get the performance info. Signed-off-by: Jeff Brasen <jbrasen@nvidia.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
This commit is contained in:
parent
ee942c5360
commit
778134e491
|
@ -129,17 +129,22 @@ EFI_STATUS
|
|||
GetBootPerformanceTable (
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
FIRMWARE_PERFORMANCE_TABLE *FirmwarePerformanceTable;
|
||||
|
||||
FirmwarePerformanceTable = (FIRMWARE_PERFORMANCE_TABLE *)EfiLocateFirstAcpiTable (
|
||||
EFI_ACPI_5_0_FIRMWARE_PERFORMANCE_DATA_TABLE_SIGNATURE
|
||||
);
|
||||
if (FirmwarePerformanceTable == NULL) {
|
||||
Status = EfiGetSystemConfigurationTable (&gEdkiiFpdtExtendedFirmwarePerformanceGuid, (VOID **)&mBootPerformanceTable);
|
||||
if (EFI_ERROR (Status)) {
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DP_GET_ACPI_FPDT_FAIL), mDpHiiHandle);
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
} else {
|
||||
mBootPerformanceTable = (UINT8 *)(UINTN)FirmwarePerformanceTable->BootPointerRecord.BootPerformanceTablePointer;
|
||||
}
|
||||
|
||||
mBootPerformanceTableSize = ((BOOT_PERFORMANCE_TABLE *)mBootPerformanceTable)->Header.Length;
|
||||
|
||||
return EFI_SUCCESS;
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
|
||||
[Guids]
|
||||
gPerformanceProtocolGuid ## CONSUMES ## SystemTable
|
||||
gEdkiiFpdtExtendedFirmwarePerformanceGuid ## CONSUMES ## SystemTable
|
||||
|
||||
[Protocols]
|
||||
gEfiLoadedImageProtocolGuid ## CONSUMES
|
||||
|
|
|
@ -55,6 +55,7 @@
|
|||
|
||||
[Guids]
|
||||
gPerformanceProtocolGuid ## CONSUMES ## SystemTable
|
||||
gEdkiiFpdtExtendedFirmwarePerformanceGuid ## CONSUMES ## SystemTable
|
||||
|
||||
[Protocols]
|
||||
gEfiLoadedImageProtocolGuid ## CONSUMES
|
||||
|
|
Loading…
Reference in New Issue