summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2009-02-23 02:57:46 +0000
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2009-02-23 02:57:46 +0000
commit72aff63a93043ec65d0b1d123a4951aeeae5da1d (patch)
tree66818fecd877e8d612af1ede2540dffdd53aeed1 /MdeModulePkg
parentaa8f4f55ff80d0c1b1efcdae6d45db76849fc265 (diff)
downloadedk2-72aff63a93043ec65d0b1d123a4951aeeae5da1d.zip
edk2-72aff63a93043ec65d0b1d123a4951aeeae5da1d.tar.gz
edk2-72aff63a93043ec65d0b1d123a4951aeeae5da1d.tar.bz2
Merge performance protocol, pei performance hob into a single performance.h in MdeModulePkg\Include\Guid
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7563 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Include/Guid/Performance.h (renamed from MdeModulePkg/Include/Protocol/Performance.h)68
1 files changed, 53 insertions, 15 deletions
diff --git a/MdeModulePkg/Include/Protocol/Performance.h b/MdeModulePkg/Include/Guid/Performance.h
index cddd0a1..14c7c83 100644
--- a/MdeModulePkg/Include/Protocol/Performance.h
+++ b/MdeModulePkg/Include/Guid/Performance.h
@@ -1,7 +1,8 @@
/** @file
- Performance protocol interfaces to support cross module performance logging.
+ This file defines performance related definitions: the format of performance
+ GUID HOB, performance protocol interfaces and performance variable format.
-Copyright (c) 2006 - 2008, Intel Corporation. <BR>
+Copyright (c) 2009, Intel Corporation. <BR>
All rights reserved. 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
@@ -12,27 +13,64 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
-#ifndef __PERFORMANCE_H__
-#define __PERFORMANCE_H__
+#ifndef __PERFORMANCE_DATA_H__
+#define __PERFORMANCE_DATA_H__
+
+//
+// PEI_PERFORMANCE_STRING_SIZE must be a multiple of 8.
+//
+#define PEI_PERFORMANCE_STRING_SIZE 8
+#define PEI_PERFORMANCE_STRING_LENGTH (PEI_PERFORMANCE_STRING_SIZE - 1)
+
+typedef struct {
+ EFI_PHYSICAL_ADDRESS Handle;
+ CHAR8 Token[PEI_PERFORMANCE_STRING_SIZE]; ///> Measured token string name
+ CHAR8 Module[PEI_PERFORMANCE_STRING_SIZE]; ///> Module string name
+ UINT64 StartTimeStamp; ///> Start time point
+ UINT64 EndTimeStamp; ///> End time point
+} PEI_PERFORMANCE_LOG_ENTRY;
+
+//
+// The header must be aligned at 8 bytes.
+//
+typedef struct {
+ UINT32 NumberOfEntries; ///> The number of all performance log entries
+ UINT32 Reserved;
+} PEI_PERFORMANCE_LOG_HEADER;
+
+
+//
+// The data structure for performance data in ACPI memory.
+//
+#define PERFORMANCE_SIGNATURE SIGNATURE_32 ('P', 'e', 'r', 'f')
+#define PERF_TOKEN_SIZE 28
+#define PERF_TOKEN_LENGTH (PERF_TOKEN_SIZE - 1)
+#define PERF_PEI_ENTRY_MAX_NUM 50
+
+typedef struct {
+ CHAR8 Token[PERF_TOKEN_SIZE];
+ UINT32 Duration;
+} PERF_DATA;
+
+typedef struct {
+ UINT64 BootToOs;
+ UINT64 S3Resume;
+ UINT32 S3EntryNum;
+ PERF_DATA S3Entry[PERF_PEI_ENTRY_MAX_NUM];
+ UINT64 CpuFreq;
+ UINT64 BDSRaw;
+ UINT32 Count;
+ UINT32 Signiture;
+} PERF_HEADER;
#define PERFORMANCE_PROTOCOL_GUID \
{ 0x76b6bdfa, 0x2acd, 0x4462, {0x9E, 0x3F, 0xcb, 0x58, 0xC9, 0x69, 0xd9, 0x37 } }
//
-// Forward reference for pure ANSI compatability
+// Forward reference for pure ANSI compatibility
//
typedef struct _PERFORMANCE_PROTOCOL PERFORMANCE_PROTOCOL;
-#define SEC_TOK "SEC"
-#define DXE_TOK "DXE"
-#define SHELL_TOK "SHELL"
-#define PEI_TOK "PEI"
-#define BDS_TOK "BDS"
-#define DRIVERBINDING_START_TOK "DB:Start:"
-#define DRIVERBINDING_SUPPORT_TOK "DB:Support:"
-#define START_IMAGE_TOK "StartImage:"
-#define LOAD_IMAGE_TOK "LoadImage:"
-
//
// DXE_PERFORMANCE_STRING_SIZE must be a multiple of 8.
//