Reviewed-by: Ray Ni <[email protected]> > -----Original Message----- > From: [email protected] [mailto:[email protected]] On Behalf Of > Ard Biesheuvel > Sent: Sunday, April 14, 2019 12:53 PM > To: [email protected] > Cc: Ard Biesheuvel <[email protected]>; Kinney, Michael D > <[email protected]>; Andrew Fish <[email protected]>; Leif > Lindholm <[email protected]>; Zeng, Star <[email protected]>; > Dong, Eric <[email protected]>; Ni, Ray <[email protected]>; Gao, Liming > <[email protected]>; Carsey, Jaben <[email protected]>; Shi, > Steven <[email protected]>; Wang, Jian J <[email protected]>; Wu, > Hao A <[email protected]> > Subject: [edk2-devel] [PATCH v6 4/7] 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 <[email protected]> > Reviewed-by: Michael D Kinney <[email protected]> > --- > MdeModulePkg/Library/UefiBootManagerLib/BmLoadOption.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmLoadOption.c > b/MdeModulePkg/Library/UefiBootManagerLib/BmLoadOption.c > index 7bf96646c690..8e6caaa63548 100644 > --- a/MdeModulePkg/Library/UefiBootManagerLib/BmLoadOption.c > +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmLoadOption.c > @@ -1233,10 +1233,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 > -- > 2.17.1 > > >
-=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#39120): https://edk2.groups.io/g/devel/message/39120 Mute This Topic: https://groups.io/mt/31133143/21656 Group Owner: [email protected] Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
