From 3b3c009a25543bf709267982b2583dd486d4d24d Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Fri, 8 Dec 2017 15:48:14 +0000 Subject: [PATCH] MdePkg/Uefi ARM: only support native ARM/Thumb images The ARM calling convention is fundamentally incompatible with EBC, and having a cross compatible machine type identical to the native type does not make a lot of sense either. So restrict the compatible machine type for ARM to EFI_IMAGE_MACHINE_ARMTHUMB_MIXED, and remove the cross compatible. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm Reviewed-by: Liming Gao --- MdePkg/Include/Uefi/UefiBaseType.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/MdePkg/Include/Uefi/UefiBaseType.h b/MdePkg/Include/Uefi/UefiBaseType.h index 728a047260..d9556cd2ec 100644 --- a/MdePkg/Include/Uefi/UefiBaseType.h +++ b/MdePkg/Include/Uefi/UefiBaseType.h @@ -270,10 +270,9 @@ typedef union { #elif defined (MDE_CPU_ARM) -#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \ - (((Machine) == EFI_IMAGE_MACHINE_ARMTHUMB_MIXED) || ((Machine) == EFI_IMAGE_MACHINE_EBC)) +#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_ARMTHUMB_MIXED) -#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_ARMTHUMB_MIXED) +#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE) #elif defined (MDE_CPU_AARCH64) -- 2.39.2