Revision: 17323
http://sourceforge.net/p/edk2/code/17323
Author: hwu1225
Date: 2015-05-06 03:31:28 +0000 (Wed, 06 May 2015)
Log Message:
-----------
MdeModulePkg: Remove GetBootMode() at FirmwarePerformancePeiEntryPoint
Boot mode maybe changed at any point during the PEI phase, therefore, boot
mode should be checked later rather at entry point.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <[email protected]>
Reviewed-by: Liming Gao <[email protected]>
Modified Paths:
--------------
trunk/edk2/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTablePei/FirmwarePerformancePei.c
Modified:
trunk/edk2/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTablePei/FirmwarePerformancePei.c
===================================================================
---
trunk/edk2/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTablePei/FirmwarePerformancePei.c
2015-05-06 03:30:52 UTC (rev 17322)
+++
trunk/edk2/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTablePei/FirmwarePerformancePei.c
2015-05-06 03:31:28 UTC (rev 17323)
@@ -7,7 +7,7 @@
This module register report status code listener to collect performance data
for S3 Resume Performance Record on S3 resume boot path.
- Copyright (c) 2011 - 2013, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD
License
which accompanies this distribution. The full text of the license may be
found at
@@ -156,58 +156,52 @@
)
{
EFI_STATUS Status;
- EFI_BOOT_MODE BootMode;
EFI_PEI_RSC_HANDLER_PPI *RscHandler;
PEI_SEC_PERFORMANCE_PPI *SecPerf;
FIRMWARE_SEC_PERFORMANCE Performance;
- Status = PeiServicesGetBootMode(&BootMode);
- ASSERT_EFI_ERROR (Status);
-
- if (BootMode == BOOT_ON_S3_RESUME) {
- if (FeaturePcdGet (PcdFirmwarePerformanceDataTableS3Support)) {
- //
- // S3 resume - register status code listener for OS wake vector.
- //
- Status = PeiServicesLocatePpi (
- &gEfiPeiRscHandlerPpiGuid,
- 0,
- NULL,
- (VOID **) &RscHandler
- );
- ASSERT_EFI_ERROR (Status);
-
- Status = RscHandler->Register (FpdtStatusCodeListenerPei);
- ASSERT_EFI_ERROR (Status);
- }
- } else {
+ if (FeaturePcdGet (PcdFirmwarePerformanceDataTableS3Support)) {
//
- // Normal boot - build Hob for SEC performance data.
+ // S3 resume - register status code listener for OS wake vector.
//
Status = PeiServicesLocatePpi (
- &gPeiSecPerformancePpiGuid,
+ &gEfiPeiRscHandlerPpiGuid,
0,
NULL,
- (VOID **) &SecPerf
+ (VOID **) &RscHandler
);
- if (!EFI_ERROR (Status)) {
- Status = SecPerf->GetPerformance (PeiServices, SecPerf, &Performance);
- }
- if (!EFI_ERROR (Status)) {
- BuildGuidDataHob (
- &gEfiFirmwarePerformanceGuid,
- &Performance,
- sizeof (FIRMWARE_SEC_PERFORMANCE)
- );
- DEBUG ((EFI_D_INFO, "FPDT: SEC Performance Hob ResetEnd = %ld\n",
Performance.ResetEnd));
- } else {
- //
- // SEC performance PPI is not installed or fail to get performance data
- // from SEC Performance PPI.
- //
- DEBUG ((EFI_D_ERROR, "FPDT: WARNING: SEC Performance PPI not installed
or failed!\n"));
- }
+ ASSERT_EFI_ERROR (Status);
+
+ Status = RscHandler->Register (FpdtStatusCodeListenerPei);
+ ASSERT_EFI_ERROR (Status);
}
+ //
+ // Normal boot - build Hob for SEC performance data.
+ //
+ Status = PeiServicesLocatePpi (
+ &gPeiSecPerformancePpiGuid,
+ 0,
+ NULL,
+ (VOID **) &SecPerf
+ );
+ if (!EFI_ERROR (Status)) {
+ Status = SecPerf->GetPerformance (PeiServices, SecPerf, &Performance);
+ }
+ if (!EFI_ERROR (Status)) {
+ BuildGuidDataHob (
+ &gEfiFirmwarePerformanceGuid,
+ &Performance,
+ sizeof (FIRMWARE_SEC_PERFORMANCE)
+ );
+ DEBUG ((EFI_D_INFO, "FPDT: SEC Performance Hob ResetEnd = %ld\n",
Performance.ResetEnd));
+ } else {
+ //
+ // SEC performance PPI is not installed or fail to get performance data
+ // from SEC Performance PPI.
+ //
+ DEBUG ((EFI_D_ERROR, "FPDT: WARNING: SEC Performance PPI not installed or
failed!\n"));
+ }
+
return EFI_SUCCESS;
}
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits