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: 853528 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="ci++fgqH"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3z6zcm1SVZz9sRW for ; Fri, 29 Dec 2017 06:02:48 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id BC75DC21DEF; 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-Google-Smtp-Source: ACJfBotuf4ZsehJlNxcAl+qhzIPazYYtUYweKQ4SPZFK5WiKH0Jytv30kM6QPp4rk7zXktEAYBHSzQ== 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; }