]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Include/Guid/Performance.h
MdeModulePkg/S3SmmInitDone.h: Fix copyright coding style error.
[mirror_edk2.git] / MdeModulePkg / Include / Guid / Performance.h
index c40046c878116ec22a398fefbaabe8ee85c0f366..72e39787a6166a9b93b845cca59b663f742b568f 100644 (file)
@@ -2,15 +2,15 @@
   This file defines performance-related definitions, including the format of:\r
   * performance GUID HOB.\r
   * performance protocol interfaces.\r
-  * performance variables.  \r
+  * performance variables.\r
 \r
-Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials are licensed and made available under \r
-the terms and conditions of the BSD License that accompanies this distribution.  \r
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials are licensed and made available under\r
+the terms and conditions of the BSD License that accompanies this distribution.\r
 The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php.                                            \r
+http://opensource.org/licenses/bsd-license.php.\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+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
 **/\r
@@ -18,6 +18,16 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #ifndef __PERFORMANCE_DATA_H__\r
 #define __PERFORMANCE_DATA_H__\r
 \r
+#define PERFORMANCE_PROPERTY_REVISION 0x1\r
+\r
+typedef struct {\r
+  UINT32                Revision;\r
+  UINT32                Reserved;\r
+  UINT64                Frequency;\r
+  UINT64                TimerStartValue;\r
+  UINT64                TimerEndValue;\r
+} PERFORMANCE_PROPERTY;\r
+\r
 //\r
 // PEI_PERFORMANCE_STRING_SIZE must be a multiple of 8.\r
 //\r
@@ -26,7 +36,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 typedef struct {\r
   EFI_PHYSICAL_ADDRESS  Handle;\r
-  CHAR8                 Token[PEI_PERFORMANCE_STRING_SIZE];   ///< Measured token string name. \r
+  CHAR8                 Token[PEI_PERFORMANCE_STRING_SIZE];   ///< Measured token string name.\r
   CHAR8                 Module[PEI_PERFORMANCE_STRING_SIZE];  ///< Module string name.\r
   UINT64                StartTimeStamp;                       ///< Start time point.\r
   UINT64                EndTimeStamp;                         ///< End time point.\r
@@ -34,38 +44,13 @@ typedef struct {
 \r
 //\r
 // The header must be aligned at 8 bytes.\r
-// \r
+//\r
 typedef struct {\r
   UINT32                NumberOfEntries;  ///< The number of all performance log entries.\r
   UINT32                Reserved;\r
 } PEI_PERFORMANCE_LOG_HEADER;\r
 \r
 \r
-//\r
-// The data structure for performance data in ACPI memory.\r
-//\r
-#define PERFORMANCE_SIGNATURE   SIGNATURE_32 ('P', 'e', 'r', 'f')\r
-#define PERF_TOKEN_SIZE         28\r
-#define PERF_TOKEN_LENGTH       (PERF_TOKEN_SIZE - 1)\r
-#define PERF_PEI_ENTRY_MAX_NUM  50\r
-#define PERF_DATA_MAX_LENGTH    0x4000\r
-\r
-typedef struct {\r
-  CHAR8   Token[PERF_TOKEN_SIZE];\r
-  UINT32  Duration;\r
-} PERF_DATA;\r
-\r
-typedef struct {\r
-  UINT64        BootToOs;\r
-  UINT64        S3Resume;\r
-  UINT32        S3EntryNum;\r
-  PERF_DATA     S3Entry[PERF_PEI_ENTRY_MAX_NUM];\r
-  UINT64        CpuFreq;\r
-  UINT64        BDSRaw;\r
-  UINT32        Count;\r
-  UINT32        Signiture;\r
-} PERF_HEADER;\r
-\r
 #define PERFORMANCE_PROTOCOL_GUID \\r
   { 0x76b6bdfa, 0x2acd, 0x4462, { 0x9E, 0x3F, 0xcb, 0x58, 0xC9, 0x69, 0xd9, 0x37 } }\r
 \r
@@ -91,7 +76,7 @@ typedef struct _PERFORMANCE_EX_PROTOCOL PERFORMANCE_EX_PROTOCOL;
 \r
 typedef struct {\r
   EFI_PHYSICAL_ADDRESS  Handle;\r
-  CHAR8                 Token[DXE_PERFORMANCE_STRING_SIZE];  ///< Measured token string name. \r
+  CHAR8                 Token[DXE_PERFORMANCE_STRING_SIZE];  ///< Measured token string name.\r
   CHAR8                 Module[DXE_PERFORMANCE_STRING_SIZE]; ///< Module string name.\r
   UINT64                StartTimeStamp;                      ///< Start time point.\r
   UINT64                EndTimeStamp;                        ///< End time point.\r
@@ -99,7 +84,7 @@ typedef struct {
 \r
 typedef struct {\r
   EFI_PHYSICAL_ADDRESS  Handle;\r
-  CHAR8                 Token[DXE_PERFORMANCE_STRING_SIZE];  ///< Measured token string name. \r
+  CHAR8                 Token[DXE_PERFORMANCE_STRING_SIZE];  ///< Measured token string name.\r
   CHAR8                 Module[DXE_PERFORMANCE_STRING_SIZE]; ///< Module string name.\r
   UINT64                StartTimeStamp;                      ///< Start time point.\r
   UINT64                EndTimeStamp;                        ///< End time point.\r
@@ -230,7 +215,7 @@ EFI_STATUS
   @param  LogEntryKey             The key for the previous performance measurement log entry.\r
                                   If 0, then the first performance measurement log entry is retrieved.\r
   @param  GaugeDataEntry          Out parameter for the indirect pointer to the gauge data entry specified by LogEntryKey.\r
-                                  \r
+\r
   @retval EFI_SUCCESS             The GuageDataEntry is successfully found based on LogEntryKey.\r
   @retval EFI_NOT_FOUND           There is no entry after the measurement referred to by LogEntryKey.\r
   @retval EFI_INVALID_PARAMETER   The LogEntryKey is not a valid entry, or GaugeDataEntry is NULL.\r
@@ -325,7 +310,7 @@ EFI_STATUS
   @param  LogEntryKey             The key for the previous performance measurement log entry.\r
                                   If 0, then the first performance measurement log entry is retrieved.\r
   @param  GaugeDataEntryEx        Out parameter for the indirect pointer to the extented gauge data entry specified by LogEntryKey.\r
-                                  \r
+\r
   @retval EFI_SUCCESS             The GuageDataEntryEx is successfully found based on LogEntryKey.\r
   @retval EFI_NOT_FOUND           There is no entry after the measurement referred to by LogEntryKey.\r
   @retval EFI_INVALID_PARAMETER   The LogEntryKey is not a valid entry, or GaugeDataEntryEx is NULL.\r