summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c
diff options
context:
space:
mode:
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2008-07-23 09:15:14 +0000
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2008-07-23 09:15:14 +0000
commit40f26b8f443f271f0b6d9df3c0214df4269b7485 (patch)
tree0905c80642b341efcc480f3afc0346bf7db19f41 /MdeModulePkg/Core/Pei/PeiMain/PeiMain.c
parent11dad244fdcefdd1d381b096b118e2a640580312 (diff)
downloadedk2-platforms-40f26b8f443f271f0b6d9df3c0214df4269b7485.tar.xz
Code scrub for PeiCore module.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5558 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Core/Pei/PeiMain/PeiMain.c')
-rw-r--r--MdeModulePkg/Core/Pei/PeiMain/PeiMain.c24
1 files changed, 19 insertions, 5 deletions
diff --git a/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c b/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c
index 056165e689..1524abf81c 100644
--- a/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c
+++ b/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c
@@ -20,10 +20,10 @@ STATIC EFI_PEI_PPI_DESCRIPTOR mMemoryDiscoveredPpi = {
NULL
};
-//
-// Pei Core Module Variables
-//
-//
+///
+/// Pei Core Module Variables
+///
+///
STATIC EFI_PEI_SERVICES gPs = {
{
PEI_SERVICES_SIGNATURE,
@@ -107,12 +107,20 @@ PeiCore (
mTick = 0;
OldCoreData = (PEI_CORE_INSTANCE *) Data;
+ //
+ // Record the system tick for first entering PeiCore.
+ // This tick is duration of executing platform seccore module.
+ //
if (PerformanceMeasurementEnabled()) {
if (OldCoreData == NULL) {
mTick = GetPerformanceCounter ();
}
}
+ //
+ // PeiCore has been shadowed to memory for first entering, so
+ // just jump to PeiCore in memory here.
+ //
if (OldCoreData != NULL) {
ShadowedPeiCore = (PEI_CORE_ENTRY_POINT) (UINTN) OldCoreData->ShadowedPeiCore;
if (ShadowedPeiCore != NULL) {
@@ -143,7 +151,6 @@ PeiCore (
//
// Initialize libraries that the PeiCore is linked against
- // BUGBUG: The FileHandle is passed in as NULL. Do we look it up or remove it from the lib init?
//
ProcessLibraryConstructorList (NULL, &PrivateData.PS);
@@ -213,6 +220,10 @@ PeiCore (
//
ASSERT(PrivateData.PeiMemoryInstalled == TRUE);
+ //
+ // Till now, PEI phase will be finished, get performace count
+ // for computing duration of PEI phase
+ //
PERF_END (NULL, "PostMem", NULL, 0);
Status = PeiServicesLocatePpi (
@@ -223,6 +234,9 @@ PeiCore (
);
ASSERT_EFI_ERROR (Status);
+ //
+ // Enter DxeIpl to load Dxe core.
+ //
DEBUG ((EFI_D_INFO, "DXE IPL Entry\n"));
Status = TempPtr.DxeIpl->Entry (
TempPtr.DxeIpl,