From patchwork Fri Dec 8 15:55:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 121188 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp823257qgn; Fri, 8 Dec 2017 07:55:28 -0800 (PST) X-Google-Smtp-Source: AGs4zMa848fm0gbjeGVPxiiAaMXVYtceR3ExRgT0cOAm13749HOShVa1lFDpZhaikOegCqkoGG0P X-Received: by 10.101.72.76 with SMTP id i12mr30058632pgs.436.1512748527938; Fri, 08 Dec 2017 07:55:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512748527; cv=none; d=google.com; s=arc-20160816; b=Uhh3bu4qlpGac1v9UK8HGYOINFrcJRmb9cRJ6sbyKi/w9NUxOGrpTTVi1ohXALo2B4 QzFSj6Hx6nI0uxt+z3QXKNHU5C/Sxq2RiPaVO21U0g1De2/jgLhNH0QOMJB4JP3QNnig XSkh0onC9gpdpCUKnFfBmFSHiHEaa6KGnskU+urSHXYzHKAzlN9Dow2if1kqaTNlppiO FR0gK8k5zpZo6C84WJUzycrVUiHlcoIfA1TBMlcHy3bEO+r1aXoVAUmMy4lWBmERKWfI IqRwtzWvlC7QMusAQY7f0M5SAofSAeVvO86OO2TT3L2oOSCRrEue1BoOPH3oNHG0Wd7m fQ8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=E+vOxq3Q+ic3NA/1u9nH+vujIvHNsw6qvdLZT+qUdaA=; b=ESRGqum1pQz9nFudLxKiZsPSuaweSdsDyTZnQCXDP9xfdb60SrvQc3uKOoO90ESKmq GpGK52CHdfZ4UugBUJ8YZg3Cv59gvfsqakMrM6+tlLek0VhFTC+dzux+uR6LkWexkVLz OF6wbZ4JoJ3CDq5GM2N6BsaK0A93Au8lXBCp+03ZCPoh6J3Rl3JEx2XaZ+g54Y2hc6xm MNbPVOb/+izbncHOZMa977+rN1YBSTxW/tm+YWy/Cz7FJdfvSGTUwZx7eT1/fTmvXQE9 5AX7tm04z9vnf8aCnrnl1Wk/vxzmCdwnkaC62Up9oeIuHDCoSRSym4WFUgRopHwId5wO KP+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=TxKHhxZE; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id 135si5677877pgh.503.2017.12.08.07.55.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Dec 2017 07:55:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=TxKHhxZE; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 08F212217CE56; Fri, 8 Dec 2017 07:50:53 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org 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-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 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: [edk2] [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: , Cc: michael.d.kinney@intel.com, liming.gao@intel.com, leif.lindholm@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" 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(-) -- 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Leif Lindholm Reviewed-by: Liming Gao 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)