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;
|
UINT16 Machine;
|
||||||
PEI_CORE_INSTANCE *Private;
|
PEI_CORE_INSTANCE *Private;
|
||||||
VOID *EntryPointArg;
|
VOID *EntryPointArg;
|
||||||
|
EFI_SECTION_TYPE SearchType1;
|
||||||
|
EFI_SECTION_TYPE SearchType2;
|
||||||
|
|
||||||
*EntryPoint = 0;
|
*EntryPoint = 0;
|
||||||
ImageSize = 0;
|
ImageSize = 0;
|
||||||
*AuthenticationState = 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 (
|
Status = PeiServicesFfsFindSectionData (
|
||||||
EFI_SECTION_TE,
|
SearchType1,
|
||||||
FileHandle,
|
FileHandle,
|
||||||
&Pe32Data
|
&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)) {
|
if (EFI_ERROR (Status)) {
|
||||||
Status = PeiServicesFfsFindSectionData (
|
Status = PeiServicesFfsFindSectionData (
|
||||||
EFI_SECTION_PE32,
|
SearchType2,
|
||||||
FileHandle,
|
FileHandle,
|
||||||
&Pe32Data
|
&Pe32Data
|
||||||
);
|
);
|
||||||
|
|
|
@ -102,6 +102,8 @@
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxFvSupported
|
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxFvSupported
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxPeimPerFv
|
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxPeimPerFv
|
||||||
|
|
||||||
[BuildOptions.common]
|
[FeaturePcd.common]
|
||||||
MSFT:DEBUG_*_IA32_CC_FLAGS = /FAcs
|
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreImageLoaderSearchTeSectionFirst
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -119,6 +119,7 @@
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdUnicodeCollation2Support|TRUE|BOOLEAN|0x00010041
|
gEfiMdeModulePkgTokenSpaceGuid.PcdUnicodeCollation2Support|TRUE|BOOLEAN|0x00010041
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE|BOOLEAN|0x00010042
|
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE|BOOLEAN|0x00010042
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|TRUE|BOOLEAN|0x00010043
|
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|TRUE|BOOLEAN|0x00010043
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreImageLoaderSearchTeSectionFirst|TRUE|BOOLEAN|0x00010044
|
||||||
|
|
||||||
[PcdsFixedAtBuild.common]
|
[PcdsFixedAtBuild.common]
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxPeiPcdCallBackNumberPerPcdEntry|0x08|UINT32|0x0001000f
|
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxPeiPcdCallBackNumberPerPcdEntry|0x08|UINT32|0x0001000f
|
||||||
|
|
Loading…
Reference in New Issue