Add supported for performance libraries.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10367 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
andrewfish 2010-04-13 22:28:14 +00:00
parent bb02cb8071
commit 6556897076
5 changed files with 74 additions and 0 deletions

View File

@ -0,0 +1,15 @@
/** @file
File intentionally blank
Copyright (c) 2010, Apple Inc. All rights reserved.
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
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/

View File

@ -0,0 +1,38 @@
#/** @file
# Hob lib that does not contain the APIs as they are already in the PrePiLib
#
# Copyright (c) 2008 - 2010, Apple, Inc.
#
# 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
# http://opensource.org/licenses/bsd-license.php
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
#
#**/
[Defines]
INF_VERSION = 0x00010005
BASE_NAME = PrePiLib
FILE_GUID = 1F3A3278-82EB-4C0D-86F1-5BCDA5846CB2
MODULE_TYPE = BASE
VERSION_STRING = 1.0
LIBRARY_CLASS = PrePiLib
#
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
#
[Sources.common]
Hob.c
[Packages]
MdePkg/MdePkg.dec
[LibraryClasses]

View File

@ -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>

View File

@ -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,

View File

@ -55,6 +55,9 @@
PrintLib
SerialPortLib
ExtractGuidedSectionLib
TimerLib
PerformanceLib
[Guids]
gEfiHobMemoryAllocModuleGuid