]> git.proxmox.com Git - mirror_edk2.git/commit - MdeModulePkg/Core/Pei/Image/Image.c
MdeModulePkg/PeiCore: avoid EFI_IMAGE_MACHINE_TYPE_SUPPORTED to check arch
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 27 Mar 2017 12:22:16 +0000 (13:22 +0100)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 29 Mar 2017 10:54:07 +0000 (11:54 +0100)
commit6e7ec25aaaf0dfc2b4c84ffd4c7ee7cd442aecb6
treed49004c5d642f7a3725074cd7716eeefee33602f
parent9bca00be25c7cb5af5c11fcb1bd4f53f8380b2f3
MdeModulePkg/PeiCore: avoid EFI_IMAGE_MACHINE_TYPE_SUPPORTED to check arch

The EFI_IMAGE_MACHINE_TYPE_SUPPORTED() macro is abused in the PeiCore
code to decide whether the system we are compiling for can deal with
executable code being copied elsewhere and executed from there.

As stated in the comment, this is fundamentally a property of the compiler
target, and so this should be made dependent on MDE_CPU_xxx preprocessor
defines, and not on whether or not the runtime target can deal with
PE/COFF images of a certain machine type.

On X86/IA32, this mostly boils down to the same thing, but not on other
architectures, so let's clean this up.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
MdeModulePkg/Core/Pei/Image/Image.c