From patchwork Sat Dec 30 01:08:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 123000 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp5331919qgn; Fri, 29 Dec 2017 17:35:39 -0800 (PST) X-Google-Smtp-Source: ACJfBovnOTeAtbfO8e4AMrAfIEiUTSkc5J+RZtZriKT/8HvrUFgxUdAJMT2wZlxpbX0SfkXxUQ6L X-Received: by 10.80.164.241 with SMTP id x46mr47109743edb.247.1514597739104; Fri, 29 Dec 2017 17:35:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1514597739; cv=none; d=google.com; s=arc-20160816; b=QEbQxHYVPvb8ENsXuXen80M2mRZycuIJpHvZUTpN7YG1sVtvkviyuK5cqExttMy1kF FCtwuBmxHyCAz6NGDubvuWrlMJ2fkAxY4oo+CxvicvpteCkKuq2ZpAuKbCTFecZPmbML eXKc5QsTkZUabVCv7uixBijJWfs9zc5TondzQPLQMJSUyG+dxtaklOxh9njBOoX2LeJL hrRR6osQTKwEuWSvCo0H7n+u/w+6Uu5zqQNg+tS3nRjquVFVB3H0ocWvN4oow0QqA1MP T0vY1N6N9iuSRXait/gTE7YXb4dBebotc+tNSUiv80NPWMIdeb2Zw8x7Xfhr8YeDq65q BJ3g== 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=pb4oBQzK1W2oiZ8EDs6fUflUlIRkTvXq8cEgs1OI9Gk=; b=UA+5UXIXoCbGD7UXpUB6ruhLRktwA9H1TCyQSNuI3/8yx92BkzzpMOjE2oE6sW7phE kUgoDQedV/4lzbMWbSS4ql2Y9sftxLWPEN/tVUjB3hszufjnKqzeX5syAjXPK7RqvIAy Lx4wCO1sR1UwlX8XHlHeTo3lUBBLC1gb/qTt+DSFlliXTaTQWhKTJeA9kg+MnpZFT7V7 E0vx/31ja00/y4OIEj+XHjJNsRDj5BkMa5Ccnw/fzA8JJf+td0N7lpV61NNjIbpiM3fY GvArNaE5tw+XkA+kpwUBxchYF4Qr7ZQlU4E9Iyg6LbMw+rhjtMqrGKqZ2y1HcynYcNqi LCHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=CM6EEcSn; 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 y89si1632596eda.212.2017.12.29.17.35.38; Fri, 29 Dec 2017 17:35:39 -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=CM6EEcSn; 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 91307C21DA2; Sat, 30 Dec 2017 01:23:46 +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_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 8264BC21E08; Sat, 30 Dec 2017 01:16:45 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id B9062C21DF0; Sat, 30 Dec 2017 01:09:35 +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 2C506C21DCA for ; Sat, 30 Dec 2017 01:09:31 +0000 (UTC) Received: by mail-wm0-f67.google.com with SMTP id a79so11259549wma.0 for ; Fri, 29 Dec 2017 17:09:31 -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=ULLV4uqROE+pLpHERZABbIZtkf1UgQIv4b4xmKovoeE=; b=CM6EEcSnIS9WcdPqVLEcN5VB5ECK93zbr8H4xJUnpqImENTqCJ70o44eNI9J2Xm18w ARlgC9RJRwZYFVv5JwB3rTK51cyvpREW7gzeAJWzmRACak/+eABg61iIUN9W75GOAZKe zE/eVQc12w808cUFrpMtiK/uPysLC6XVJissY= 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=ULLV4uqROE+pLpHERZABbIZtkf1UgQIv4b4xmKovoeE=; b=k+6p0P8batbC8E7Kze8OIgm/xpi+yoDYAFACtIrqhXTdAwlHyQMNvRy89hg+Zwq3Hx TrUbFQZ4nDMuHIfMKAmg3uB2gr5Ix1KZJ3JW7JE8S5dZIqAWdw0nL1Id+cCCqVF/sp/e srha0OnXRUOWZhxKREQmSAUyT4bkZ7IfF0yoYcTRC41dkPJDv9KJnmuAIet2QhEtD5cO 6ltsA06j8InHrxJ4Hd2aJ+07qbWOYhuRG1ONkzWAHUDhxFHrNt4xJrYh+YbQImzbWDJ4 JuU+MnOjoWvUoZcIUqLb0yJuYMHmTpGu6KxlcwA14ITW5XnDS9GYfPCUMjvEpov/LCZA QJ+g== X-Gm-Message-State: AKGB3mKSuh7sID0GBgmltXYo9zEkQEbvflTauL+Nw6KEEGJXk2vz8+b7 wFXLBM6pRItIt+wNFT7vqNWlJBgQ378= X-Received: by 10.80.140.176 with SMTP id q45mr49196799edq.186.1514596170503; Fri, 29 Dec 2017 17:09:30 -0800 (PST) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id f9sm26484148edm.83.2017.12.29.17.09.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Dec 2017 17:09:29 -0800 (PST) From: Bryan O'Donoghue To: u-boot@lists.denx.de, brenomatheus@gmail.com Date: Sat, 30 Dec 2017 01:08:52 +0000 Message-Id: <1514596142-22050-24-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1514596142-22050-1-git-send-email-bryan.odonoghue@linaro.org> References: <1514596142-22050-1-git-send-email-bryan.odonoghue@linaro.org> Cc: Fabio Estevam Subject: [U-Boot] [PATCH v3 20/25] arm: imx: hab: Rename is_hab_enabled imx_hab_is_enabled 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" Understanding if the HAB is enabled is something that we want to interrogate and report on outside of the HAB layer. First step to that is renaming the relevant function to match the previously introduced external naming convention imx_hab_function() The name imx_hab_is_hab_enabled() is a tautology. A more logical name is imx_hab_is_enabled(). Signed-off-by: Bryan O'Donoghue Cc: Stefano Babic Cc: Fabio Estevam Cc: Peng Fan Cc: Albert Aribaud Cc: Sven Ebenfeld Cc: George McCollister Cc: Breno Matheus Lima --- arch/arm/mach-imx/hab.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-imx/hab.c b/arch/arm/mach-imx/hab.c index edbd464..fc15254 100644 --- a/arch/arm/mach-imx/hab.c +++ b/arch/arm/mach-imx/hab.c @@ -96,7 +96,7 @@ static inline enum hab_status hab_rvt_check_target_new(enum hab_target target, (is_soc_type(MXC_SOC_MX7ULP) ? 0x80000000 : \ (is_soc_type(MXC_SOC_MX7) ? 0x2000000 : 0x2)) -static bool is_hab_enabled(void); +static bool imx_hab_is_enabled(void); static int ivt_header_error(const char *err_str, struct ivt_header *ivt_hdr) { @@ -334,7 +334,7 @@ static int get_hab_status(void) hab_rvt_report_event = hab_rvt_report_event_p; hab_rvt_report_status = hab_rvt_report_status_p; - if (is_hab_enabled()) + if (imx_hab_is_enabled()) puts("\nSecure boot enabled\n"); else puts("\nSecure boot disabled\n"); @@ -419,7 +419,7 @@ U_BOOT_CMD( #endif /* !defined(CONFIG_SPL_BUILD) */ -static bool is_hab_enabled(void) +static bool imx_hab_is_enabled(void) { struct imx_sec_config_fuse_t *fuse = (struct imx_sec_config_fuse_t *)&imx_sec_config_fuse; @@ -456,7 +456,7 @@ int imx_hab_authenticate_image(uint32_t ddr_start, uint32_t image_size, hab_rvt_exit = hab_rvt_exit_p; hab_rvt_check_target = hab_rvt_check_target_p; - if (!is_hab_enabled()) { + if (!imx_hab_is_enabled()) { puts("hab fuse not enabled\n"); return result; }