mirror of https://github.com/acidanthera/audk.git
MdeModulePkg/UefiBootManagerLib: allow foreign Driver#### images
Allow PE/COFF images that must execute under emulation for Driver#### options, by removing the redundant machine type check from the BDS code. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
This commit is contained in:
parent
615a72400b
commit
26d60374b8
|
@ -1227,10 +1227,8 @@ BmIsLoadOptionPeHeaderValid (
|
|||
// Check PE32 or PE32+ magic, and machine type
|
||||
//
|
||||
OptionalHeader = (EFI_IMAGE_OPTIONAL_HEADER32 *) &PeHeader->Pe32.OptionalHeader;
|
||||
if ((OptionalHeader->Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC ||
|
||||
OptionalHeader->Magic == EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC) &&
|
||||
EFI_IMAGE_MACHINE_TYPE_SUPPORTED (PeHeader->Pe32.FileHeader.Machine)
|
||||
) {
|
||||
if (OptionalHeader->Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC ||
|
||||
OptionalHeader->Magic == EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC) {
|
||||
//
|
||||
// Check the Subsystem:
|
||||
// Driver#### must be of type BootServiceDriver or RuntimeDriver
|
||||
|
|
Loading…
Reference in New Issue