audk/MdeModulePkg/Core/Dxe
Ard Biesheuvel d8dd54f071 MdeModulePkg/DxeCore: defer PE/COFF emulator registration to StartImage
EDK2's implementation of the LoadImage() boot service permits non-native
binaries to be loaded (i.e., X64 images on IA32 firmware), but any
attempts to start such an image using StartImage() will return
EFI_UNSUPPORTED.

The integration of the PE/COFF emulator protocol into the DXE core
deviates slightly from this paradigm, given that its IsImageSupported
hook as well as its RegisterImage hook are invoked from LoadImage,
and by the time StartImage is called, no opportunity is given to the
provider of the PE/COFF emulator protocol to prevent an image from
being started if it only supports loading it.

To address this disparity, let's move the invocation of RegisterImage()
to the implementation of the StartImage() boot service, allowing the
emulator to permit LoadImage() but reject StartImage() on images that
turn out not to meet the requirements of the emulator as it is being
started.

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2564
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Liming Gao <liming.gao@intel.com>
2020-03-04 09:26:45 +00:00
..
Dispatcher MdeModulePkg DxeCore: Fix typo in function name 2019-10-17 09:09:02 +08:00
DxeMain MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
Event MdeModulePkg: document workaround for EFI_RUNTIME_EVENT_ENTRY PI spec bug 2019-10-09 09:40:09 +02:00
FwVol MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
FwVolBlock MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
Gcd MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
Hand MdeModulePkg: Make retval in UninstallMultipleProtocol follow Spec 2020-02-19 14:43:25 +00:00
Image MdeModulePkg/DxeCore: defer PE/COFF emulator registration to StartImage 2020-03-04 09:26:45 +00:00
Library MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
Mem MdeModulePkg/Mem: Initialize the variable MapMemory 2019-11-04 08:56:12 +08:00
Misc MdeModulePkg/Core/Dxe: free page 0 after disabling NULL pointer detection 2019-11-09 10:59:57 +08:00
SectionExtraction MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
DxeCore.uni MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
DxeCoreExtra.uni MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
DxeMain.h MdeModulePkg/DxeCore: remove explicit EBC handling 2019-04-14 18:37:39 -07:00
DxeMain.inf MdeModulePkg/Core: Remove PcdFrameworkCompatibilitySupport usage 2019-05-09 09:42:55 +08:00