summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg/Library/GenericBdsLib
diff options
context:
space:
mode:
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2009-02-23 03:15:57 +0000
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2009-02-23 03:15:57 +0000
commit6055758f8785e163d090fe42d7cf494c65988132 (patch)
tree31d68b5105f80a492e149fb6ef8055981151ebda /IntelFrameworkModulePkg/Library/GenericBdsLib
parent6aa22a177c32344ff1d5f765183d0da416fcc252 (diff)
downloadedk2-platforms-6055758f8785e163d090fe42d7cf494c65988132.tar.xz
Update for the performance infrastructure changes:
1. Use raw string for performance tokens 2. Reuse gPerformanceProtocolGuid as performance variable paring GUID git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7576 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg/Library/GenericBdsLib')
-rw-r--r--IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c2
-rw-r--r--IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf2
-rw-r--r--IntelFrameworkModulePkg/Library/GenericBdsLib/InternalBdsLib.h24
-rw-r--r--IntelFrameworkModulePkg/Library/GenericBdsLib/Performance.c4
4 files changed, 5 insertions, 27 deletions
diff --git a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c
index bc0904e84e..f80f36ffc8 100644
--- a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c
+++ b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c
@@ -150,7 +150,7 @@ BdsLibBootViaBootOption (
//
// Record the performance data for End of BDS
//
- PERF_END (0, BDS_TOK, NULL, 0);
+ PERF_END (0, "BDS", NULL, 0);
*ExitDataSize = 0;
*ExitData = NULL;
diff --git a/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf b/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf
index 9ed96973b8..4921ab990f 100644
--- a/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf
+++ b/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf
@@ -84,7 +84,7 @@
## SOMETIMES_CONSUMES ## Variable:L"ErrOut" (The device path of error out device)
gEfiFileInfoGuid ## CONSUMES ## GUID
gEfiPcAnsiGuid ## CONSUMES ## GUID (The type of terminal)
- gEfiGenericPlatformVariableGuid ## SOMETIMES_PRODUCES ## Variable:L"PerfDataMemAddr" (The ACPI address of performance data)
+ gPerformanceProtocolGuid ## SOMETIMES_PRODUCES ## Variable:L"PerfDataMemAddr" (The ACPI address of performance data)
gEfiUartDevicePathGuid ## CONSUMES ## GUID (Identify the device path for UARD device)
gEfiSasDevicePathGuid ## CONSUMES ## GUID (Identify the device path for SAS device)
diff --git a/IntelFrameworkModulePkg/Library/GenericBdsLib/InternalBdsLib.h b/IntelFrameworkModulePkg/Library/GenericBdsLib/InternalBdsLib.h
index cb11b6e02d..49a67b21f4 100644
--- a/IntelFrameworkModulePkg/Library/GenericBdsLib/InternalBdsLib.h
+++ b/IntelFrameworkModulePkg/Library/GenericBdsLib/InternalBdsLib.h
@@ -33,7 +33,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Protocol/FirmwareVolume2.h>
#include <Protocol/PciIo.h>
#include <Protocol/AcpiS3Save.h>
-#include <Protocol/Performance.h>
#include <Protocol/FirmwareVolumeDispatch.h>
#include <Protocol/OEMBadging.h>
#include <Protocol/ConsoleControl.h>
@@ -42,14 +41,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Protocol/HiiFont.h>
#include <Protocol/HiiImage.h>
-
#include <Guid/MemoryTypeInformation.h>
#include <Guid/FileInfo.h>
#include <Guid/GlobalVariable.h>
#include <Guid/PcAnsi.h>
#include <Guid/ShellFile.h>
-#include <Guid/GenericPlatformVariable.h>
#include <Guid/Bmp.h>
+#include <Guid/Performance.h>
#include <Library/PrintLib.h>
#include <Library/DebugLib.h>
@@ -71,26 +69,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/PcdLib.h>
#include <Library/DxeServicesLib.h>
-#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;
/**
diff --git a/IntelFrameworkModulePkg/Library/GenericBdsLib/Performance.c b/IntelFrameworkModulePkg/Library/GenericBdsLib/Performance.c
index 0e3f7936cd..6fbb12b7c3 100644
--- a/IntelFrameworkModulePkg/Library/GenericBdsLib/Performance.c
+++ b/IntelFrameworkModulePkg/Library/GenericBdsLib/Performance.c
@@ -166,7 +166,7 @@ WriteBootToOsPerformanceData (
BOOLEAN CountUp;
//
- // Retrive time stamp count as early as possilbe
+ // Retrieve time stamp count as early as possible
//
Ticker = GetPerformanceCounter ();
@@ -306,7 +306,7 @@ Done:
gRT->SetVariable (
L"PerfDataMemAddr",
- &gEfiGenericPlatformVariableGuid,
+ &gPerformanceProtocolGuid,
EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
sizeof (EFI_PHYSICAL_ADDRESS),
&AcpiLowMemoryBase