From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::241; helo=mail-wm0-x241.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 93E342217CE54 for ; Fri, 8 Dec 2017 07:50:51 -0800 (PST) Received: by mail-wm0-x241.google.com with SMTP id g75so4041536wme.0 for ; Fri, 08 Dec 2017 07:55:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=42RBibdgnhw4uidTEUvFBKNUdGrAAxigo3LGjEn8mgQ=; b=TxKHhxZEX19R9+aDE9TRdytdNMSHIANdNzZW5xGcGvCu67omYKIHIcUhGiYh0GuYOb VR4drHRbqzNVCJOtsw2fmWhXMj9NK/A5a1FTfqdEW0NQiwa+jxs+jlwMmp0i/YmEN0zW e82/xh5CAC/FvCBGNnWTLyc17Nn//Z4OsYHtE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=42RBibdgnhw4uidTEUvFBKNUdGrAAxigo3LGjEn8mgQ=; b=aa9FEfpRkfMzvUF1pXGwcI8cg6ASJfygWfIDsYrRxuI1P5mMy3Ub7nXPZFTyNB6Awq fc6Ny+g/KTMyd5ZaBJyd0WXkef9A1+6himFbYxv7/xV/YT0gLvdjGWA2D6n3K4U+QGez 4ndhUFdAy4RU6IAI/43fCODaEKLTBYpclWXYENwXoIkt6PSFd4V893YAYN5sSTKCAPTx /EzGt0ZTbMgxeiy1pD9h6rTxGptHEti2qQTToSxA16McMd20/crJkdDUET8gDcaFHt0D mnOMJFErmw6qAp+OHiUXo81q5R30KXrOjF6Hc4Hk2G9ULTKYR7Fuk2z95lKOJRsted3g KxGg== X-Gm-Message-State: AKGB3mIMT9nCdR+1PmgNX5fii9sHwR78AdOifVMMWXG1SEZN6wWKUVu5 zV/W3zpZFxS9hmXiA325Au9IDgxRsGU= X-Google-Smtp-Source: AGs4zMbl9smF7nzTmnA52IC1IVcDzDa1RHhrVrEuqEZzPDunNuVobXN085XclOli55FYcJ/uuY5nug== X-Received: by 10.28.11.6 with SMTP id 6mr3922165wml.135.1512748524153; Fri, 08 Dec 2017 07:55:24 -0800 (PST) Received: from localhost.localdomain ([160.171.158.223]) by smtp.gmail.com with ESMTPSA id n32sm9966571wrb.62.2017.12.08.07.55.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Dec 2017 07:55:23 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Cc: leif.lindholm@linaro.org, michael.d.kinney@intel.com, liming.gao@intel.com, Ard Biesheuvel Date: Fri, 8 Dec 2017 15:55:14 +0000 Message-Id: <20171208155514.18926-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 Subject: [PATCH] MdePkg/Uefi ARM: only support native ARM/Thumb images X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 15:50:52 -0000 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 --- 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 728a0472602a..d9556cd2ec4e 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.11.0