This library is mainly used by DxeCore to start performance logging to ensure that\r
Performance Protocol is installed at the very beginning of DXE phase.\r
\r
-Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>\r
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
GetGaugeEx\r
};\r
\r
+PERFORMANCE_PROPERTY mPerformanceProperty;\r
+\r
/**\r
Searches in the gauge array with keyword Handle, Token, Module and Identifier.\r
\r
)\r
{\r
EFI_STATUS Status;\r
+ PERFORMANCE_PROPERTY *PerformanceProperty;\r
+\r
\r
if (!PerformanceMeasurementEnabled ()) {\r
//\r
\r
InternalGetPeiPerformance ();\r
\r
- return Status;\r
+ Status = EfiGetSystemConfigurationTable (&gPerformanceProtocolGuid, (VOID **) &PerformanceProperty);\r
+ if (EFI_ERROR (Status)) {\r
+ //\r
+ // Install configuration table for performance property.\r
+ //\r
+ mPerformanceProperty.Revision = PERFORMANCE_PROPERTY_REVISION;\r
+ mPerformanceProperty.Reserved = 0;\r
+ mPerformanceProperty.Frequency = GetPerformanceCounterProperties (\r
+ &mPerformanceProperty.TimerStartValue,\r
+ &mPerformanceProperty.TimerEndValue\r
+ );\r
+ Status = gBS->InstallConfigurationTable (&gPerformanceProtocolGuid, &mPerformanceProperty);\r
+ ASSERT_EFI_ERROR (Status);\r
+ }\r
+\r
+ return EFI_SUCCESS;\r
}\r
\r
/**\r