summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Core/Pei/Dispatcher
diff options
context:
space:
mode:
authorlzeng14 <lzeng14@6f19259b-4bc3-4df7-8a09-765794883524>2011-10-27 09:04:50 +0000
committerlzeng14 <lzeng14@6f19259b-4bc3-4df7-8a09-765794883524>2011-10-27 09:04:50 +0000
commit890e54170e8f85d1357ac3614f7ad1465050ff0c (patch)
treeb4ad74dcc1688119a78816b95c46bca31be923b5 /MdeModulePkg/Core/Pei/Dispatcher
parent30f001ca5f08974c8d5a5483f8b8e1a4f46a1025 (diff)
downloadedk2-platforms-890e54170e8f85d1357ac3614f7ad1465050ff0c.tar.xz
Add core FFS3 support, PeiCore and DxeIpl.
Signed-off-by: lzeng14 Reviewed-by: lgao4 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12583 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Core/Pei/Dispatcher')
-rw-r--r--MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
index c7f0f8afaf..ffeab4e391 100644
--- a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
+++ b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
@@ -41,7 +41,7 @@ DiscoverPeimsAndOrderWithApriori (
)
{
EFI_STATUS Status;
- EFI_PEI_FV_HANDLE FileHandle;
+ EFI_PEI_FILE_HANDLE FileHandle;
EFI_PEI_FILE_HANDLE AprioriFileHandle;
EFI_GUID *Apriori;
UINTN Index;
@@ -49,7 +49,7 @@ DiscoverPeimsAndOrderWithApriori (
UINTN PeimIndex;
UINTN PeimCount;
EFI_GUID *Guid;
- EFI_PEI_FV_HANDLE TempFileHandles[FixedPcdGet32 (PcdPeiCoreMaxPeimPerFv)];
+ EFI_PEI_FILE_HANDLE TempFileHandles[FixedPcdGet32 (PcdPeiCoreMaxPeimPerFv)];
EFI_GUID FileGuid[FixedPcdGet32 (PcdPeiCoreMaxPeimPerFv)];
EFI_PEI_FIRMWARE_VOLUME_PPI *FvPpi;
EFI_FV_FILE_INFO FileInfo;
@@ -106,8 +106,12 @@ DiscoverPeimsAndOrderWithApriori (
//
Status = FvPpi->GetFileInfo (FvPpi, AprioriFileHandle, &FileInfo);
ASSERT_EFI_ERROR (Status);
- Private->AprioriCount = FileInfo.BufferSize & 0x00FFFFFF;
- Private->AprioriCount -= sizeof (EFI_COMMON_SECTION_HEADER);
+ Private->AprioriCount = FileInfo.BufferSize;
+ if (IS_SECTION2 (FileInfo.Buffer)) {
+ Private->AprioriCount -= sizeof (EFI_COMMON_SECTION_HEADER2);
+ } else {
+ Private->AprioriCount -= sizeof (EFI_COMMON_SECTION_HEADER);
+ }
Private->AprioriCount /= sizeof (EFI_GUID);
ZeroMem (FileGuid, sizeof (FileGuid));
@@ -122,7 +126,7 @@ DiscoverPeimsAndOrderWithApriori (
//
// Walk through FileGuid array to find out who is invalid PEIM guid in Apriori file.
- // Add avalible PEIMs in Apriori file into TempFileHandles array at first.
+ // Add available PEIMs in Apriori file into TempFileHandles array at first.
//
Index2 = 0;
for (Index = 0; Index2 < Private->AprioriCount; Index++) {