mirror of https://github.com/acidanthera/audk.git
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:
parent
bb02cb8071
commit
6556897076
|
@ -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.
|
||||||
|
|
||||||
|
**/
|
||||||
|
|
|
@ -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]
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
#include <Library/UefiDecompressLib.h>
|
#include <Library/UefiDecompressLib.h>
|
||||||
#include <Library/PeCoffLib.h>
|
#include <Library/PeCoffLib.h>
|
||||||
#include <Library/CacheMaintenanceLib.h>
|
#include <Library/CacheMaintenanceLib.h>
|
||||||
|
#include <Library/TimerLib.h>
|
||||||
|
#include <Library/PerformanceLib.h>
|
||||||
|
|
||||||
#include <Guid/MemoryAllocationHob.h>
|
#include <Guid/MemoryAllocationHob.h>
|
||||||
|
|
||||||
|
|
|
@ -115,7 +115,10 @@ LoadDxeCoreFromFfsFile (
|
||||||
VOID *TopOfStack;
|
VOID *TopOfStack;
|
||||||
VOID *Hob;
|
VOID *Hob;
|
||||||
EFI_FV_FILE_INFO FvFileInfo;
|
EFI_FV_FILE_INFO FvFileInfo;
|
||||||
|
UINT64 Tick;
|
||||||
|
|
||||||
|
Tick = 0;
|
||||||
|
PERF_START (NULL, "SEC", NULL, 1);
|
||||||
|
|
||||||
Status = FfsFindSectionData (EFI_SECTION_PE32, FileHandle, &PeCoffImage);
|
Status = FfsFindSectionData (EFI_SECTION_PE32, FileHandle, &PeCoffImage);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
|
@ -140,6 +143,13 @@ LoadDxeCoreFromFfsFile (
|
||||||
Hob = GetHobList ();
|
Hob = GetHobList ();
|
||||||
if (StackSize == 0) {
|
if (StackSize == 0) {
|
||||||
// User the current stack
|
// User the current stack
|
||||||
|
|
||||||
|
|
||||||
|
if (PerformanceMeasurementEnabled ()) {
|
||||||
|
Tick = GetPerformanceCounter ();
|
||||||
|
}
|
||||||
|
PERF_END (NULL, "SEC", NULL, Tick);
|
||||||
|
|
||||||
((DXE_CORE_ENTRY_POINT)(UINTN)EntryPoint) (Hob);
|
((DXE_CORE_ENTRY_POINT)(UINTN)EntryPoint) (Hob);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
@ -161,6 +171,12 @@ LoadDxeCoreFromFfsFile (
|
||||||
//
|
//
|
||||||
UpdateStackHob ((EFI_PHYSICAL_ADDRESS)(UINTN) BaseOfStack, StackSize);
|
UpdateStackHob ((EFI_PHYSICAL_ADDRESS)(UINTN) BaseOfStack, StackSize);
|
||||||
|
|
||||||
|
|
||||||
|
if (PerformanceMeasurementEnabled ()) {
|
||||||
|
Tick = GetPerformanceCounter ();
|
||||||
|
}
|
||||||
|
PERF_END (NULL, "SEC", NULL, Tick);
|
||||||
|
|
||||||
SwitchStack (
|
SwitchStack (
|
||||||
(SWITCH_STACK_ENTRY_POINT)(UINTN)EntryPoint,
|
(SWITCH_STACK_ENTRY_POINT)(UINTN)EntryPoint,
|
||||||
Hob,
|
Hob,
|
||||||
|
|
|
@ -55,6 +55,9 @@
|
||||||
PrintLib
|
PrintLib
|
||||||
SerialPortLib
|
SerialPortLib
|
||||||
ExtractGuidedSectionLib
|
ExtractGuidedSectionLib
|
||||||
|
TimerLib
|
||||||
|
PerformanceLib
|
||||||
|
|
||||||
|
|
||||||
[Guids]
|
[Guids]
|
||||||
gEfiHobMemoryAllocModuleGuid
|
gEfiHobMemoryAllocModuleGuid
|
||||||
|
|
Loading…
Reference in New Issue