From patchwork Thu Dec 28 18:49:38 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: 122867 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp3810141qgn; Thu, 28 Dec 2017 11:04:37 -0800 (PST) X-Google-Smtp-Source: ACJfBouTLpk9Sy1Bijra9q6NHRAxYpHSr5M5FS79EZ5GFMMrtDuON/p9eqBEPFrL4TsVeswlCGy6 X-Received: by 10.80.177.250 with SMTP id n55mr6826453edd.30.1514487877628; Thu, 28 Dec 2017 11:04:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1514487877; cv=none; d=google.com; s=arc-20160816; b=Cil6oySCXaxXlQwLbQ1hTFVRghqoJb6qvCCaagOcVRbz3QxreA3uAeAoFxzHUQC0PU FPTtwiKOBMhexDOHaxR83Q4M5Ch5ufnMh1+bBjiWbexvu7g8vsXJHTR8ImrAwzSYsDWB G0C/tOPwDqk9ejmwQ9h96+iiXfUUS2vOxjjS1sQhdfoMBdqlca7S2nnfD+fftTtrjq2e npq1X2MGyasz6CeG900ACa7jcsiFGyCWjQzAL7IE1X7mP7TB+CqoalThcU/8ufZM6fpb VOv5zIjw4DQa/PwuMclOYeFAEZQYaFZVdaizffm5mVacDWpgnUmuk8I9OKv5rGp1cp4G 0uoQ== 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=EVo73Wlj+gm57KNsgoesLxirdbrL2pHyunGc6CAZTzg=; b=g3Kii6MD8fsaiaBtYsogQHlPvRHHrNGDxXjrgPYSXCSy3lbJ39sUmFu/LdaW820Ps5 +1tjChOyHqzeraJdUYDxpQIZpSMz6ivENGEQvMm7GzIy6RJGffIMqoVYsgoTP4kBJ1fz 9+R3j4aYZab93MVj8+53KumBkBnqZkoXvCEFGF2LByPHQ99yYT3Wi6ubSF33SmagJBeB UZ4/iUgjeg7OGxwjcUNTGaDaBoNXIpVYpfC52nRufk+Xt8VVo4vkHHTeE3RMhwoFeG0F h7rJOP/HtW88vyVWewwvjka9xEoXp3/LH2aA2BQxezHvhlUxyI9str4PvklMsQXsQcvs 1ahQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ci++fgqH; 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 1si2622731edw.324.2017.12.28.11.04.37; Thu, 28 Dec 2017 11:04:37 -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=ci++fgqH; 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 1D364C21C59; Thu, 28 Dec 2017 18:54:42 +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 E6F0FC21DA6; Thu, 28 Dec 2017 18:51:01 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 1020DC21DB2; Thu, 28 Dec 2017 18:50:12 +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 BC068C21DA0 for ; Thu, 28 Dec 2017 18:50:07 +0000 (UTC) Received: by mail-wm0-f67.google.com with SMTP id n138so45237529wmg.2 for ; Thu, 28 Dec 2017 10:50:07 -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=1MDgTJXHB1ycR0bEI+LmGyP/5CwM5VlO+7aFQ9t3QHQ=; b=ci++fgqHHPBUnZEJxNrvBzzOB1W6Euv8t9ehGECpaXWAD51xMbgi8tLCnuMJf8slXY n707WnTrIgrQKQyDXRTlilcVjh2LMNIsJfUtNuk0iDwBYCFovZWbZUp/5Ia3QHDsEDvD xCNKPhyUslXUA9s48yZbk/TS+1R9QPbO3NyFE= 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=1MDgTJXHB1ycR0bEI+LmGyP/5CwM5VlO+7aFQ9t3QHQ=; b=nM3TMo8OMDu32SsBBB/Q6UPsMkQxS1a58CzaHeQ9DUxcpGS62vcT3Fc3lxkTNGF61E RYonR3qsV8ivJzC5WsH68M2qVXR3yg9IeeaBi4AcHU9eWkKufg60HWJRoTtgifHy7ow0 BOzBmgW/vhubbvEWpaAyftBXorAP1kG/jCUE69sMU8ukBBp38RPcr49c6FT1pa53YXe5 zqBK7xh2Dn7l39wvIvPWSplugU+C005DrwjQb73TaAGSGRD1rASHx3fwuoFphndrsC1v tYKVlwhmkWEKxWLkoe29iEWrh4iqcx+NOJ60T5o+CNGpW9ISsAKQR8PVVl62NsnLDyu6 uzBw== X-Gm-Message-State: AKGB3mL7BHnqZAlZtPb8ct7NeUhMjDxBMLaY/JEwJ1o/pLPBcNTFLzYm 4//pK0191w0v4p0ipORKt8Y3iwvqPIo= X-Received: by 10.80.215.218 with SMTP id m26mr41597649edj.27.1514487007193; Thu, 28 Dec 2017 10:50:07 -0800 (PST) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id x28sm35246579edd.0.2017.12.28.10.50.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Dec 2017 10:50:06 -0800 (PST) From: Bryan O'Donoghue To: u-boot@lists.denx.de, brenomatheus@gmail.com Date: Thu, 28 Dec 2017 18:49:38 +0000 Message-Id: <1514486982-19059-20-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1514486982-19059-1-git-send-email-bryan.odonoghue@linaro.org> References: <1514486982-19059-1-git-send-email-bryan.odonoghue@linaro.org> Cc: Fabio Estevam Subject: [U-Boot] [PATCH v2 19/23] 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 5c2d5fd..a1a13d6 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; }