From patchwork Fri Mar 9 17:35:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 131181 Delivered-To: patch@linaro.org Received: by 10.80.194.209 with SMTP id u17csp1290869edf; Fri, 9 Mar 2018 09:37:52 -0800 (PST) X-Google-Smtp-Source: AG47ELuq0XehFoSd7xGWDhXICBIxy9irF4NqrEQEN3GMcfc0hI4jHHvVagqF8w4ubKkfyBckTKmU X-Received: by 10.80.196.4 with SMTP id v4mr37508856edf.293.1520617072858; Fri, 09 Mar 2018 09:37:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520617072; cv=none; d=google.com; s=arc-20160816; b=tKPvmVQ3KEN2tKbUld/qVzgN2t5hNO5LKhCKnD7T7Fmoopl+Cml/grNugaJplJCoia UznVNJp97/Lpv+Ra/ZnRxMjlhxvnobZvIL5Ra3rmKf8XJW2MN3xxA8ycjGTqvunjzUAW v8bvBu3+Hrx9Y3UPRjIk8UjPh0tkh+SXjan/IbOHMUXBmZcmfztef43gw47sbNwu+CnV VXLLa0Mzhqq1XdzuZzJo5nmF5VRoiyuBEKIHviqaxZgFFCU+s3NyQqnVYF2LNMjF3dxS nR3y27+MB+7CwyWSeBtOBZS87Y51bqIjvS6UjLLl01cGuZ+ZIzEWmR2IuosHEVu3SpaF li7w== 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 :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=R67ApW8awKKFrsBCxLSiyfmvTY1NuQQW8VlbWL8R9+o=; b=JGLKJtQFkHG1Pkcz+ITwsaKAti6BgUFnA83VUqlNkuF6ak6XerAA2q3h0YnXw9kTEZ LofRgcM6qwmSyNgNINdh9jFl7MZFKh4xM+arnfYeXqli+F4AysPbPdyWj3Pelq0cVWGq iAQ5s9UrMqC6d2AHUqIx85Yi6X3qOseaRAqT9WISfsTSO8AhFOToutzAhb4fsnSmkM+M PhBw+iPECTJmUh77qxaHIQyI8prMbcmjx3blvDamrDavYhAHAOzEJE5mmK6TRD0dtcTt wL1VDG8n0diAGCcGcSHdQus0XHlEIEjH/PBTfmCDHxOTitEMP5GlOxH0oC+dYC1Ke4Lz G3lA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=RfPNhcny; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id a30si1467545ede.391.2018.03.09.09.37.52; Fri, 09 Mar 2018 09:37:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=RfPNhcny; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id 59F93C21DFF; Fri, 9 Mar 2018 17:36:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 46C19C21E12; Fri, 9 Mar 2018 17:36:04 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id C120AC21DED; Fri, 9 Mar 2018 17:35:56 +0000 (UTC) Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by lists.denx.de (Postfix) with ESMTPS id 75420C21D72 for ; Fri, 9 Mar 2018 17:35:53 +0000 (UTC) Received: by mail-wm0-f67.google.com with SMTP id z81so5291314wmb.4 for ; Fri, 09 Mar 2018 09:35:53 -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:in-reply-to:references; bh=xm9C/hqLPuimiZeWgFS0uuGQcvu/c0lsoy/61pZVcRA=; b=RfPNhcnyz7/sR2yJWnWmCHh68sDTYJ4LN8PS+EHllo8HTsw21rNziQwcB5vSiJ7WBA BQpkIYUtGAG0eRCTz/Bm2VKCHQdlVnBrgdsHq0IfosLJMBZaKG60u38ycmWXFdAcCbfu OkOqAG7zLb1xjIxI7x1P2BkCGgg7pTVn1cJxQ= 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:in-reply-to :references; bh=xm9C/hqLPuimiZeWgFS0uuGQcvu/c0lsoy/61pZVcRA=; b=JEyE9IBYLXw9PSaIM0ZfsAZaCYk6VARY6hKuXun6/zegwivkZlsVnUEKbKci5wxIJO KOJEX3h7/czCGDZLvzJMNjlyzSsZgIzT066bUEZ++ynOraBHhb7iwXmxeY7wiXskagqa igrfO1Z0IIMEh9mI7iHToTxRWDh6GvTg6mEkGVpujorSj+ZOj6QwC0bJ3DPm9v5r88MF rqZQY4WiG/P3xMCclVsWs6takIsG0Th7K7bjTlSbv02v7nW7Y55lt7967BAF92sdXvtJ tZc3RQqu/rkHhVR/SoAJfboAsslFzLcNP6doyroYI82/sPmqpynn5en36vrFp3Pl/cIS dEtQ== X-Gm-Message-State: APf1xPDPaTvDrsuf4n2viqDcv9UuxltwsB1MLCkJEI36YgdPLwSEqVy2 H4o4FqQ16I1BFIpG+JHI44T9tesWCxk= X-Received: by 10.80.150.2 with SMTP id y2mr36772517eda.114.1520616952811; Fri, 09 Mar 2018 09:35:52 -0800 (PST) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id a43sm1210126edd.6.2018.03.09.09.35.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 09 Mar 2018 09:35:52 -0800 (PST) From: Bryan O'Donoghue To: U-Boot@lists.denx.de, sbabic@denx.de Date: Fri, 9 Mar 2018 17:35:47 +0000 Message-Id: <1520616949-11879-3-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520616949-11879-1-git-send-email-bryan.odonoghue@linaro.org> References: <1520616949-11879-1-git-send-email-bryan.odonoghue@linaro.org> Cc: breno.lima@nxp.com, fabio.estevam@nxp.com, utkarsh.gupta@nxp.com Subject: [U-Boot] [PATCH 2/4] imx: hab: Encase majority of header in __ASSEMBLY__ declaration X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Subsequent patches will want to include hab.h but in doing so include it on an assembly compile path causing a range of compile errors. Fix the errors pre-emptively by encasing the majority of the declarations in hab.h inside an ifdef __ASSEMBLY__ block. Signed-off-by: Bryan O'Donoghue Cc: Utkarsh Gupta Cc: Breno Lima Cc: Fabio Estevam Tested-by: --- arch/arm/include/asm/mach-imx/hab.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/arm/include/asm/mach-imx/hab.h b/arch/arm/include/asm/mach-imx/hab.h index ce9a44d..1bebdbe 100644 --- a/arch/arm/include/asm/mach-imx/hab.h +++ b/arch/arm/include/asm/mach-imx/hab.h @@ -8,6 +8,7 @@ #ifndef __SECURE_MX6Q_H__ #define __SECURE_MX6Q_H__ +#ifndef __ASSEMBLY__ #include #include @@ -196,13 +197,14 @@ typedef void hapi_clock_init_t(void); #define HAB_CMD_SET 0xB1 /* Set command tag */ #define HAB_PAR_MID 0x01 /* MID parameter value */ -#define IVT_SIZE 0x20 -#define CSF_PAD_SIZE 0x2000 - /* ----------- end of HAB API updates ------------*/ int imx_hab_authenticate_image(uint32_t ddr_start, uint32_t image_size, uint32_t ivt_offset); bool imx_hab_is_enabled(void); +#endif /* __ASSEMBLY__ */ + +#define IVT_SIZE 0x20 +#define CSF_PAD_SIZE 0x2000 #endif