mirror of https://github.com/acidanthera/audk.git
Add a feature flag to allow platform developer to decide if TE or PE32 section should be searched in PEI dispatcher.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4298 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
8ae0b360f5
commit
3076397e4b
|
@ -326,25 +326,35 @@ Returns:
|
|||
UINT16 Machine;
|
||||
PEI_CORE_INSTANCE *Private;
|
||||
VOID *EntryPointArg;
|
||||
EFI_SECTION_TYPE SearchType1;
|
||||
EFI_SECTION_TYPE SearchType2;
|
||||
|
||||
*EntryPoint = 0;
|
||||
ImageSize = 0;
|
||||
*AuthenticationState = 0;
|
||||
|
||||
if (FeaturePcdGet (PcdPeiCoreImageLoaderSearchTeSectionFirst)) {
|
||||
SearchType1 = EFI_SECTION_TE;
|
||||
SearchType2 = EFI_SECTION_PE32;
|
||||
} else {
|
||||
SearchType1 = EFI_SECTION_PE32;
|
||||
SearchType2 = EFI_SECTION_TE;
|
||||
}
|
||||
//
|
||||
// Try to find a TE section.
|
||||
// Try to find a first exe section (if PcdPeiCoreImageLoaderSearchTeSectionFirst
|
||||
// is true, TE will be searched first).
|
||||
//
|
||||
Status = PeiServicesFfsFindSectionData (
|
||||
EFI_SECTION_TE,
|
||||
SearchType1,
|
||||
FileHandle,
|
||||
&Pe32Data
|
||||
);
|
||||
//
|
||||
// If we didn't find a TE section, try to find a PE32 section.
|
||||
// If we didn't find a first exe section, try to find the second exe section.
|
||||
//
|
||||
if (EFI_ERROR (Status)) {
|
||||
Status = PeiServicesFfsFindSectionData (
|
||||
EFI_SECTION_PE32,
|
||||
SearchType2,
|
||||
FileHandle,
|
||||
&Pe32Data
|
||||
);
|
||||
|
|
|
@ -102,6 +102,8 @@
|
|||
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxFvSupported
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxPeimPerFv
|
||||
|
||||
[BuildOptions.common]
|
||||
MSFT:DEBUG_*_IA32_CC_FLAGS = /FAcs
|
||||
[FeaturePcd.common]
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreImageLoaderSearchTeSectionFirst
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -119,6 +119,7 @@
|
|||
gEfiMdeModulePkgTokenSpaceGuid.PcdUnicodeCollation2Support|TRUE|BOOLEAN|0x00010041
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE|BOOLEAN|0x00010042
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|TRUE|BOOLEAN|0x00010043
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreImageLoaderSearchTeSectionFirst|TRUE|BOOLEAN|0x00010044
|
||||
|
||||
[PcdsFixedAtBuild.common]
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxPeiPcdCallBackNumberPerPcdEntry|0x08|UINT32|0x0001000f
|
||||
|
|
Loading…
Reference in New Issue