diff options
author | Dandan Bi <dandan.bi@intel.com> | 2018-04-10 13:51:08 +0800 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2018-04-16 14:37:59 +0800 |
commit | d4ee449d1dabee20fc36650545143a5430fa718f (patch) | |
tree | 068993dbd40134662f869b6e19c0ae57f6a59b55 /MdeModulePkg | |
parent | 665bfd41ac32b364201c07dc1c5434432730c034 (diff) | |
download | edk2-d4ee449d1dabee20fc36650545143a5430fa718f.tar.gz edk2-d4ee449d1dabee20fc36650545143a5430fa718f.tar.bz2 edk2-d4ee449d1dabee20fc36650545143a5430fa718f.zip |
MdeModulePkg/FPDT: Add error message for unsupported case
We have updated performance infrastructure in previous commits:
between
https://github.com/tianocore/edk2/commit/73fef64f14d1b97ae9bd4705df3becc022391eba
and
https://github.com/tianocore/edk2/commit/115eae650bfd2be2c2bc37360f4a755065e774c4
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>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.c | 3 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.c | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.c b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.c index e5a38121e9..e719e9e482 100644 --- a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.c +++ b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.c @@ -554,6 +554,9 @@ FpdtStatusCodeListenerDxe ( // Get the Boot performance table and then install it to ACPI table.
//
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 {
//
// Ignore else progress code.
diff --git a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.c b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.c index d4ac849ed0..b011ec1103 100644 --- a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.c +++ b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.c @@ -106,6 +106,11 @@ FpdtStatusCodeListenerSmm ( 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)) &&
(Value != PcdGet32 (PcdProgressCodeS3SuspendEnd))) {
return EFI_UNSUPPORTED;
|