Correct more comments for PeiCore.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5627 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -21,8 +21,7 @@ STATIC EFI_PEI_PPI_DESCRIPTOR mMemoryDiscoveredPpi = {
|
||||
};
|
||||
|
||||
///
|
||||
/// Pei Core Module Variables
|
||||
///
|
||||
/// Pei service instance
|
||||
///
|
||||
STATIC EFI_PEI_SERVICES gPs = {
|
||||
{
|
||||
@ -67,11 +66,10 @@ STATIC EFI_PEI_SERVICES gPs = {
|
||||
|
||||
/**
|
||||
|
||||
The entry routine to Pei Core, invoked by PeiMain during transition
|
||||
This routine is invoked by main entry of PeiMain module during transition
|
||||
from SEC to PEI. After switching stack in the PEI core, it will restart
|
||||
with the old core data.
|
||||
|
||||
|
||||
@param SecCoreData Points to a data structure containing information about the PEI core's operating
|
||||
environment, such as the size and location of temporary RAM, the stack location and
|
||||
the BFV location.
|
||||
@ -83,6 +81,7 @@ STATIC EFI_PEI_SERVICES gPs = {
|
||||
calls and/or code in these early PPIs
|
||||
@param Data Pointer to old core data that is used to initialize the
|
||||
core's data areas.
|
||||
If NULL, it is first PeiCore entering.
|
||||
|
||||
@retval EFI_NOT_FOUND Never reach
|
||||
|
||||
@ -98,13 +97,13 @@ PeiCore (
|
||||
PEI_CORE_INSTANCE PrivateData;
|
||||
EFI_STATUS Status;
|
||||
PEI_CORE_TEMP_POINTERS TempPtr;
|
||||
UINT64 mTick;
|
||||
UINT64 Tick;
|
||||
PEI_CORE_INSTANCE *OldCoreData;
|
||||
EFI_PEI_CPU_IO_PPI *CpuIo;
|
||||
EFI_PEI_PCI_CFG2_PPI *PciCfg;
|
||||
PEICORE_FUNCTION_POINTER ShadowedPeiCore;
|
||||
|
||||
mTick = 0;
|
||||
Tick = 0;
|
||||
OldCoreData = (PEI_CORE_INSTANCE *) Data;
|
||||
|
||||
//
|
||||
@ -113,16 +112,17 @@ PeiCore (
|
||||
//
|
||||
if (PerformanceMeasurementEnabled()) {
|
||||
if (OldCoreData == NULL) {
|
||||
mTick = GetPerformanceCounter ();
|
||||
Tick = GetPerformanceCounter ();
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// PeiCore has been shadowed to memory for first entering, so
|
||||
// just jump to PeiCore in memory here.
|
||||
//
|
||||
if (OldCoreData != NULL) {
|
||||
ShadowedPeiCore = (PEICORE_FUNCTION_POINTER) (UINTN) OldCoreData->ShadowedPeiCore;
|
||||
|
||||
//
|
||||
// PeiCore has been shadowed to memory for first entering, so
|
||||
// just jump to PeiCore in memory here.
|
||||
//
|
||||
if (ShadowedPeiCore != NULL) {
|
||||
OldCoreData->ShadowedPeiCore = NULL;
|
||||
ShadowedPeiCore (
|
||||
@ -142,6 +142,10 @@ PeiCore (
|
||||
PrivateData.ServiceTableShadow.CpuIo = CpuIo;
|
||||
PrivateData.ServiceTableShadow.PciCfg = PciCfg;
|
||||
} else {
|
||||
//
|
||||
// If OldCoreData is NULL, means current is first Peicore's entering.
|
||||
//
|
||||
|
||||
ZeroMem (&PrivateData, sizeof (PEI_CORE_INSTANCE));
|
||||
PrivateData.Signature = PEI_CORE_HANDLE_SIGNATURE;
|
||||
CopyMem (&PrivateData.ServiceTableShadow, &gPs, sizeof (gPs));
|
||||
@ -186,11 +190,11 @@ PeiCore (
|
||||
FixedPcdGet32 (PcdStatusCodeValuePeiCoreEntry)
|
||||
);
|
||||
|
||||
PERF_START (NULL,"PEI", NULL, mTick);
|
||||
PERF_START (NULL,"PEI", NULL, Tick);
|
||||
//
|
||||
// If first pass, start performance measurement.
|
||||
//
|
||||
PERF_START (NULL,"PreMem", NULL, mTick);
|
||||
PERF_START (NULL,"PreMem", NULL, Tick);
|
||||
|
||||
//
|
||||
// If SEC provided any PPI services to PEI, install them.
|
||||
|
Reference in New Issue
Block a user