diff options
author | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-10-15 11:15:39 +0000 |
---|---|---|
committer | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-10-15 11:15:39 +0000 |
commit | 177aabe660ae3ce78faa3789709619a98017f0a4 (patch) | |
tree | b49b8994001a4b5e39d4b6b4274d5ec59edfde47 /MdeModulePkg/Core/Pei/Dispatcher | |
parent | 96f6af14d68faa2b65368a6f779a1c3af2e7658b (diff) | |
download | edk2-platforms-177aabe660ae3ce78faa3789709619a98017f0a4.tar.xz |
1) add gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxFvSupported and gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxPeimPerFv to replace the MACRO definitions.
2) Fix a bug in Pei dispatcher to suppoprt PEI Apriori file
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4116 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Core/Pei/Dispatcher')
-rw-r--r-- | MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c index 7294d85c6c..6923181475 100644 --- a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c +++ b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c @@ -55,15 +55,15 @@ Returns: {
EFI_STATUS Status;
EFI_PEI_FV_HANDLE FileHandle;
- EFI_PEI_FV_HANDLE AprioriFileHandle;
+ EFI_PEI_FILE_HANDLE AprioriFileHandle;
EFI_GUID *Apriori;
UINTN Index;
UINTN Index2;
UINTN PeimIndex;
UINTN PeimCount;
EFI_GUID *Guid;
- EFI_PEI_FV_HANDLE TempFileHandles[PEI_CORE_MAX_PEIM_PER_FV];
- EFI_GUID FileGuid[PEI_CORE_MAX_PEIM_PER_FV];
+ EFI_PEI_FV_HANDLE TempFileHandles[FixedPcdGet32 (PcdPeiCoreMaxPeimPerFv)];
+ EFI_GUID FileGuid[FixedPcdGet32 (PcdPeiCoreMaxPeimPerFv)];
//
// Walk the FV and find all the PEIMs and the Apriori file.
@@ -84,7 +84,7 @@ Returns: //
// Go ahead to scan this Fv, and cache FileHandles within it.
//
- for (PeimCount = 0; PeimCount < PEI_CORE_MAX_PEIM_PER_FV; PeimCount++) {
+ for (PeimCount = 0; PeimCount < FixedPcdGet32 (PcdPeiCoreMaxPeimPerFv); PeimCount++) {
Status = PeiFindFileEx (
VolumeHandle,
NULL,
@@ -104,7 +104,7 @@ Returns: //
// Read the Apriori file
//
- Status = PeiServicesFfsFindSectionData (EFI_SECTION_RAW, &AprioriFileHandle, (VOID **) &Apriori);
+ Status = PeiServicesFfsFindSectionData (EFI_SECTION_RAW, AprioriFileHandle, (VOID **) &Apriori);
if (!EFI_ERROR (Status)) {
//
// Calculate the number of PEIMs in the A Priori list
@@ -249,7 +249,7 @@ Returns: SaveCurrentFileHandle = Private->CurrentFileHandle;
for (Index1 = 0; Index1 <= SaveCurrentFvCount; Index1++) {
- for (Index2 = 0; (Index2 < PEI_CORE_MAX_PEIM_PER_FV) && (Private->Fv[Index1].FvFileHandles[Index2] != NULL); Index2++) {
+ for (Index2 = 0; (Index2 < FixedPcdGet32 (PcdPeiCoreMaxPeimPerFv)) && (Private->Fv[Index1].FvFileHandles[Index2] != NULL); Index2++) {
if (Private->Fv[Index1].PeimState[Index2] == PEIM_STATE_REGISITER_FOR_SHADOW) {
PeimFileHandle = Private->Fv[Index1].FvFileHandles[Index2];
Status = PeiLoadImage (
@@ -318,7 +318,7 @@ Returns: // Start to dispatch all modules within the current Fv.
//
for (PeimCount = Private->CurrentPeimCount;
- (PeimCount < PEI_CORE_MAX_PEIM_PER_FV) && (Private->CurrentFvFileHandles[PeimCount] != NULL);
+ (PeimCount < FixedPcdGet32 (PcdPeiCoreMaxPeimPerFv)) && (Private->CurrentFvFileHandles[PeimCount] != NULL);
PeimCount++) {
Private->CurrentPeimCount = PeimCount;
PeimFileHandle = Private->CurrentFileHandle = Private->CurrentFvFileHandles[PeimCount];
|