MdeModulePkg/FPDT: Add error message for unsupported case

We have updated performance infrastructure in previous commits:
between
73fef64f14
and
115eae650b
Update FPDT drivers to collect the performance data reported by
gEdkiiFpdtExtendedFirmwarePerformanceGuid.
The old implementation which collected performance data through
gEfiFirmwarePerformanceGuid is not supported now.
We should add error message to remind user for this unsupported
case in case anyone use it by mistake.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Dandan Bi 2018-04-10 13:51:08 +08:00 committed by Liming Gao
parent 665bfd41ac
commit d4ee449d1d
2 changed files with 8 additions and 0 deletions

View File

@ -554,6 +554,9 @@ FpdtStatusCodeListenerDxe (
// Get the Boot performance table and then install it to ACPI table. // Get the Boot performance table and then install it to ACPI table.
// //
CopyMem (&mReceivedAcpiBootPerformanceTable, Data + 1, Data->Size); CopyMem (&mReceivedAcpiBootPerformanceTable, Data + 1, Data->Size);
} else if (Data != NULL && CompareGuid (&Data->Type, &gEfiFirmwarePerformanceGuid)) {
DEBUG ((DEBUG_ERROR, "FpdtStatusCodeListenerDxe: Performance data reported through gEfiFirmwarePerformanceGuid will not be collected by FirmwarePerformanceDataTableDxe\n"));
Status = EFI_UNSUPPORTED;
} else { } else {
// //
// Ignore else progress code. // Ignore else progress code.

View File

@ -106,6 +106,11 @@ FpdtStatusCodeListenerSmm (
return EFI_SUCCESS; return EFI_SUCCESS;
} }
if (Data != NULL && CompareGuid (&Data->Type, &gEfiFirmwarePerformanceGuid)) {
DEBUG ((DEBUG_ERROR, "FpdtStatusCodeListenerSmm: Performance data reported through gEfiFirmwarePerformanceGuid will not be collected by FirmwarePerformanceDataTableSmm\n"));
return EFI_UNSUPPORTED;
}
if ((Value != PcdGet32 (PcdProgressCodeS3SuspendStart)) && if ((Value != PcdGet32 (PcdProgressCodeS3SuspendStart)) &&
(Value != PcdGet32 (PcdProgressCodeS3SuspendEnd))) { (Value != PcdGet32 (PcdProgressCodeS3SuspendEnd))) {
return EFI_UNSUPPORTED; return EFI_UNSUPPORTED;