]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c
Update the copyright notice format
[mirror_edk2.git] / MdeModulePkg / Library / PeiPerformanceLib / PeiPerformanceLib.c
index 3bfd48614e83c4daf26110a661638c1b98fa24ab..190ffe63a82e0e49c9821cfa77ae4ac04f97f299 100644 (file)
@@ -1,7 +1,13 @@
-/*++\r
+/** @file\r
+  Performance library instance used in PEI phase.\r
 \r
-Copyright (c) 2006, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
+  This file implements all APIs in Performance Library class in MdePkg. It creates\r
+  performance logging GUIDed HOB on the first performance logging and then logs the\r
+  performance data to the GUIDed HOB. Due to the limitation of temporary RAM, the maximum\r
+  number of performance logging entry is specified by PcdMaxPeiPerformanceLogEntries.  \r
+\r
+Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
@@ -9,20 +15,12 @@ http://opensource.org/licenses/bsd-license.php
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
-Module Name:\r
-\r
-  PeiPerformanceLib.c\r
-\r
-Abstract:\r
-\r
-  Performance Library\r
-\r
---*/\r
+**/\r
 \r
 \r
 #include <PiPei.h>\r
 \r
-#include <Guid/PeiPerformanceHob.h>\r
+#include <Guid/Performance.h>\r
 \r
 #include <Library/PerformanceLib.h>\r
 #include <Library/DebugLib.h>\r
@@ -50,7 +48,6 @@ Abstract:
   @retval The index of log entry in the array.\r
 \r
 **/\r
-STATIC\r
 PEI_PERFORMANCE_LOG_HEADER *\r
 InternalGetPerformanceHobLog (\r
   VOID\r
@@ -60,7 +57,7 @@ InternalGetPerformanceHobLog (
   PEI_PERFORMANCE_LOG_HEADER  *PeiPerformanceLog;\r
   UINTN                       PeiPerformanceLogSize;\r
 \r
-  GuidHob = GetFirstGuidHob (&gPeiPerformanceHobGuid);\r
+  GuidHob = GetFirstGuidHob (&gPerformanceProtocolGuid);\r
 \r
   if (GuidHob != NULL) {\r
     //\r
@@ -73,7 +70,7 @@ InternalGetPerformanceHobLog (
     //\r
     PeiPerformanceLogSize = sizeof (PEI_PERFORMANCE_LOG_HEADER) +\r
                             sizeof (PEI_PERFORMANCE_LOG_ENTRY) * PcdGet8 (PcdMaxPeiPerformanceLogEntries);\r
-    PeiPerformanceLog     = BuildGuidHob (&gPeiPerformanceHobGuid, PeiPerformanceLogSize);\r
+    PeiPerformanceLog     = BuildGuidHob (&gPerformanceProtocolGuid, PeiPerformanceLogSize);\r
     PeiPerformanceLog     = ZeroMem (PeiPerformanceLog, PeiPerformanceLogSize);\r
   }\r
 \r
@@ -88,6 +85,8 @@ InternalGetPerformanceHobLog (
   and its end time stamp is zero, then the index of that log entry is returned;\r
   otherwise, the the number of log entries in the array is returned.\r
 \r
+  @param  PeiPerformanceLog       Pointer to the data structure containing PEI \r
+                                  performance data.\r
   @param  Handle                  Pointer to environment specific context used\r
                                   to identify the component being measured.\r
   @param  Token                   Pointer to a Null-terminated ASCII string\r
@@ -98,7 +97,6 @@ InternalGetPerformanceHobLog (
   @retval The index of log entry in the array.\r
 \r
 **/\r
-STATIC\r
 UINT32\r
 InternalSearchForLogEntry (\r
   IN PEI_PERFORMANCE_LOG_HEADER *PeiPerformanceLog,\r