diff options
author | andrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-04-13 22:28:14 +0000 |
---|---|---|
committer | andrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-04-13 22:28:14 +0000 |
commit | 65568970764e35c0a08d27bbcb238423a9e01857 (patch) | |
tree | b1f7330a9e1f22b55765e975440a9652a60fbd41 /EmbeddedPkg/Library/PrePiLib | |
parent | bb02cb8071e9df25cbcae15a9afa70d6387320cb (diff) | |
download | edk2-platforms-65568970764e35c0a08d27bbcb238423a9e01857.tar.xz |
Add supported for performance libraries.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10367 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EmbeddedPkg/Library/PrePiLib')
-rw-r--r-- | EmbeddedPkg/Library/PrePiLib/PrePi.h | 2 | ||||
-rw-r--r-- | EmbeddedPkg/Library/PrePiLib/PrePiLib.c | 16 | ||||
-rw-r--r-- | EmbeddedPkg/Library/PrePiLib/PrePiLib.inf | 3 |
3 files changed, 21 insertions, 0 deletions
diff --git a/EmbeddedPkg/Library/PrePiLib/PrePi.h b/EmbeddedPkg/Library/PrePiLib/PrePi.h index dc3ef48614..8cf1a2322b 100644 --- a/EmbeddedPkg/Library/PrePiLib/PrePi.h +++ b/EmbeddedPkg/Library/PrePiLib/PrePi.h @@ -26,6 +26,8 @@ #include <Library/UefiDecompressLib.h> #include <Library/PeCoffLib.h> #include <Library/CacheMaintenanceLib.h> +#include <Library/TimerLib.h> +#include <Library/PerformanceLib.h> #include <Guid/MemoryAllocationHob.h> diff --git a/EmbeddedPkg/Library/PrePiLib/PrePiLib.c b/EmbeddedPkg/Library/PrePiLib/PrePiLib.c index f92be0fea3..a359d5bdb0 100644 --- a/EmbeddedPkg/Library/PrePiLib/PrePiLib.c +++ b/EmbeddedPkg/Library/PrePiLib/PrePiLib.c @@ -115,7 +115,10 @@ LoadDxeCoreFromFfsFile ( VOID *TopOfStack; VOID *Hob; EFI_FV_FILE_INFO FvFileInfo; + UINT64 Tick; + Tick = 0; + PERF_START (NULL, "SEC", NULL, 1); Status = FfsFindSectionData (EFI_SECTION_PE32, FileHandle, &PeCoffImage); if (EFI_ERROR (Status)) { @@ -140,6 +143,13 @@ LoadDxeCoreFromFfsFile ( Hob = GetHobList (); if (StackSize == 0) { // User the current stack + + + if (PerformanceMeasurementEnabled ()) { + Tick = GetPerformanceCounter (); + } + PERF_END (NULL, "SEC", NULL, Tick); + ((DXE_CORE_ENTRY_POINT)(UINTN)EntryPoint) (Hob); } else { @@ -161,6 +171,12 @@ LoadDxeCoreFromFfsFile ( // UpdateStackHob ((EFI_PHYSICAL_ADDRESS)(UINTN) BaseOfStack, StackSize); + + if (PerformanceMeasurementEnabled ()) { + Tick = GetPerformanceCounter (); + } + PERF_END (NULL, "SEC", NULL, Tick); + SwitchStack ( (SWITCH_STACK_ENTRY_POINT)(UINTN)EntryPoint, Hob, diff --git a/EmbeddedPkg/Library/PrePiLib/PrePiLib.inf b/EmbeddedPkg/Library/PrePiLib/PrePiLib.inf index 72e41c999f..e0989b1b2c 100644 --- a/EmbeddedPkg/Library/PrePiLib/PrePiLib.inf +++ b/EmbeddedPkg/Library/PrePiLib/PrePiLib.inf @@ -55,6 +55,9 @@ PrintLib
SerialPortLib
ExtractGuidedSectionLib
+ TimerLib
+ PerformanceLib
+
[Guids]
gEfiHobMemoryAllocModuleGuid
|