/** @file\r
EFI PEI Core dispatch services\r
\r
-Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>\r
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
\r
/**\r
\r
- Discover all Peims and optional Apriori file in one FV. There is at most one\r
+ Discover all PEIMs and optional Apriori file in one FV. There is at most one\r
Apriori file in one FV.\r
\r
\r
Guid = NULL;\r
\r
//\r
- // If the current Fv has been scanned, directly get its cached records.\r
+ // If the current FV has been scanned, directly get its cached records.\r
//\r
if (CoreFileHandle->ScanFv) {\r
Private->CurrentFvFileHandles = CoreFileHandle->FvFileHandles;\r
TempFileGuid = Private->TempFileGuid;\r
\r
//\r
- // Go ahead to scan this Fv, get PeimCount and cache FileHandles within it to TempFileHandles.\r
+ // Go ahead to scan this FV, get PeimCount and cache FileHandles within it to TempFileHandles.\r
//\r
PeimCount = 0;\r
FileHandle = NULL;\r
\r
for (Index = 0; Index < PeimCount; Index++) {\r
//\r
- // Make an array of file name guids that matches the FileHandle array so we can convert\r
+ // Make an array of file name GUIDs that matches the FileHandle array so we can convert\r
// quickly from file name to file handle\r
//\r
Status = FvPpi->GetFileInfo (FvPpi, TempFileHandles[Index], &FileInfo);\r
}\r
\r
//\r
- // Walk through TempFileGuid array to find out who is invalid PEIM guid in Apriori file.\r
+ // Walk through TempFileGuid array to find out who is invalid PEIM GUID in Apriori file.\r
// Add available PEIMs in Apriori file into FvFileHandles array.\r
//\r
Index = 0;\r
}\r
\r
//\r
- // The current Fv File Handles have been cached. So that we don't have to scan the Fv again.\r
- // Instead, we can retrieve the file handles within this Fv from cached records.\r
+ // The current FV File Handles have been cached. So that we don't have to scan the FV again.\r
+ // Instead, we can retrieve the file handles within this FV from cached records.\r
//\r
CoreFileHandle->ScanFv = TRUE;\r
Private->CurrentFvFileHandles = CoreFileHandle->FvFileHandles;\r
DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED INFO: PcdLoadFixAddressPeiCodePageNumber= 0x%x.\n", PcdGet32(PcdLoadFixAddressPeiCodePageNumber)));\r
DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED INFO: Total Reserved Memory Size = 0x%lx.\n", TotalReservedMemorySize));\r
//\r
- // Loop through the system memory typed hob to merge the adjacent memory range\r
+ // Loop through the system memory typed HOB to merge the adjacent memory range\r
//\r
for (Hob.Raw = PrivateData->HobList.Raw; !END_OF_HOB_LIST(Hob); Hob.Raw = GET_NEXT_HOB(Hob)) {\r
//\r
\r
ResourceHob = Hob.ResourceDescriptor;\r
//\r
- // If range described in this hob is not system memory or heigher than MAX_ADDRESS, ignored.\r
+ // If range described in this HOB is not system memory or higher than MAX_ADDRESS, ignored.\r
//\r
if (ResourceHob->ResourceType != EFI_RESOURCE_SYSTEM_MEMORY ||\r
ResourceHob->PhysicalStart + ResourceHob->ResourceLength > MAX_ADDRESS) {\r
if (GET_HOB_TYPE (NextHob) == EFI_HOB_TYPE_RESOURCE_DESCRIPTOR) {\r
NextResourceHob = NextHob.ResourceDescriptor;\r
//\r
- // If range described in this hob is not system memory or heigher than MAX_ADDRESS, ignored.\r
+ // If range described in this HOB is not system memory or higher than MAX_ADDRESS, ignored.\r
//\r
if (NextResourceHob->ResourceType != EFI_RESOURCE_SYSTEM_MEMORY || NextResourceHob->PhysicalStart + NextResourceHob->ResourceLength > MAX_ADDRESS) {\r
continue;\r
}\r
//\r
- // If the range describe in memory allocation HOB belongs to the memroy range described by the resource hob\r
+ // If the range describe in memory allocation HOB belongs to the memory range described by the resource HOB\r
//\r
if (MemoryHob->AllocDescriptor.MemoryBaseAddress >= NextResourceHob->PhysicalStart &&\r
MemoryHob->AllocDescriptor.MemoryBaseAddress + MemoryHob->AllocDescriptor.MemoryLength <= NextResourceHob->PhysicalStart + NextResourceHob->ResourceLength) {\r
//\r
- // Build seperate resource hob for this allocated range\r
+ // Build separate resource HOB for this allocated range\r
//\r
if (MemoryHob->AllocDescriptor.MemoryBaseAddress > NextResourceHob->PhysicalStart) {\r
BuildResourceDescriptorHob (\r
\r
ResourceHob = Hob.ResourceDescriptor;\r
//\r
- // See if this resource descrior HOB describes tested system memory below MAX_ADDRESS\r
+ // See if this resource descriptor HOB describes tested system memory below MAX_ADDRESS\r
//\r
if (ResourceHob->ResourceType == EFI_RESOURCE_SYSTEM_MEMORY &&\r
ResourceHob->PhysicalStart + ResourceHob->ResourceLength <= MAX_ADDRESS) {\r
DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED ERROR:Top Address 0x%lx is invalid \n", TopLoadingAddress));\r
DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED ERROR:The recommended Top Address for the platform is: \n"));\r
//\r
- // Print the recomended Top address range.\r
+ // Print the recommended Top address range.\r
//\r
for (Hob.Raw = PrivateData->HobList.Raw; !END_OF_HOB_LIST(Hob); Hob.Raw = GET_NEXT_HOB(Hob)) {\r
//\r
\r
ResourceHob = Hob.ResourceDescriptor;\r
//\r
- // See if this resource descrior HOB describes tested system memory below MAX_ADDRESS\r
+ // See if this resource descriptor HOB describes tested system memory below MAX_ADDRESS\r
//\r
if (ResourceHob->ResourceType == EFI_RESOURCE_SYSTEM_MEMORY &&\r
ResourceHob->PhysicalStart + ResourceHob->ResourceLength <= MAX_ADDRESS) {\r
\r
ResourceHob = Hob.ResourceDescriptor;\r
//\r
- // See if this resource descrior HOB describes tested system memory below MAX_ADDRESS\r
+ // See if this resource descriptor HOB describes tested system memory below MAX_ADDRESS\r
//\r
if (ResourceHob->ResourceType == EFI_RESOURCE_SYSTEM_MEMORY &&\r
ResourceHob->PhysicalStart + ResourceHob->ResourceLength <= MAX_ADDRESS &&\r
\r
if (CurrentResourceHob != NULL) {\r
//\r
- // rebuild resource HOB for PEI memmory and reserved memory\r
+ // rebuild resource HOB for PEI memory and reserved memory\r
//\r
BuildResourceDescriptorHob (\r
EFI_RESOURCE_SYSTEM_MEMORY,\r
ASSERT (NewStackSize >= SecCoreData->StackSize);\r
\r
//\r
- // Calculate stack offset and heap offset between temporary memory and new permement\r
+ // Calculate stack offset and heap offset between temporary memory and new permanent\r
// memory seperately.\r
//\r
TopOfOldStack = (UINTN)SecCoreData->StackBase + SecCoreData->StackSize;\r
//\r
// This is the main dispatch loop. It will search known FVs for PEIMs and\r
// attempt to dispatch them. If any PEIM gets dispatched through a single\r
- // pass of the dispatcher, it will start over from the Bfv again to see\r
+ // pass of the dispatcher, it will start over from the BFV again to see\r
// if any new PEIMs dependencies got satisfied. With a well ordered\r
// FV where PEIMs are found in the order their dependencies are also\r
- // satisfied, this dipatcher should run only once.\r
+ // satisfied, this dispatcher should run only once.\r
//\r
do {\r
//\r
}\r
\r
//\r
- // Start to dispatch all modules within the current Fv.\r
+ // Start to dispatch all modules within the current FV.\r
//\r
for (PeimCount = Private->CurrentPeimCount;\r
PeimCount < Private->Fv[FvCount].PeimCount;\r
ASSERT_EFI_ERROR (Status);\r
if (FvFileInfo.FileType == EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE) {\r
//\r
- // For Fv type file, Produce new FvInfo PPI and FV hob\r
+ // For FV type file, Produce new FvInfo PPI and FV HOB\r
//\r
Status = ProcessFvFile (Private, &Private->Fv[FvCount], PeimFileHandle);\r
if (Status == EFI_SUCCESS) {\r
\r
if (PeimCount < Private->AprioriCount) {\r
//\r
- // If it's in the Apriori file then we set Depex to TRUE\r
+ // If it's in the Apriori file then we set DEPEX to TRUE\r
//\r
DEBUG ((DEBUG_DISPATCH, " RESULT = TRUE (Apriori)\n"));\r
return TRUE;\r