From patchwork Tue Jan 2 16:44:07 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: 854645 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="iFiuV0Gg"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3zB0h92x3cz9sBZ for ; Wed, 3 Jan 2018 04:01:13 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id C2ABDC21DAB; Tue, 2 Jan 2018 16:51:33 +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 84339C21DA6; Tue, 2 Jan 2018 16:46:46 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 36E4EC21DA9; Tue, 2 Jan 2018 16:44:55 +0000 (UTC) Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by lists.denx.de (Postfix) with ESMTPS id 0D775C21DB9 for ; Tue, 2 Jan 2018 16:44:51 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id b141so15533281wme.1 for ; Tue, 02 Jan 2018 08:44:51 -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=g2HmgnQkl5/bbc105cI9Rm/KxGhxo3DI5aopA73o8EA=; b=iFiuV0GgCgOAN/Nf2AZgNp3Xo4NtirbFZTIX9Qnf6yTNumyPzXdDiIiP9DR62OShTv 2AJ6BtuVqbtinxSGEA+RVLPC0bSznrnWEtU7JY2Z/At/nBfhYUVCcRMfS4FySVphofmX dxKiI92l5r9mNxqJxFRgayAF8cTG6SaHM4AWE= 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=g2HmgnQkl5/bbc105cI9Rm/KxGhxo3DI5aopA73o8EA=; b=Yw8jdbveRB0r1wK5UDV9l39hRb2G2LmHdhtBljv+rCyiP4unFO9qhmZS60WhiSU3xH 4FxNu5ng8jnOVCMV824pOYB4+CIYX1ivOvJaq2vov6J+rJZUDpxpAZ87Ex1v6nNixopN wh8587fJBRSIeinbc4t8Y1bEHgnBP4k0TiCEQ2Bp0U8IfIKy/yjdNiIaz1tHmUErRUSG dSGGk+w0LMCGpHcrPHhAvS/ob1DEo9nGS+ITqEEUlHkBT2HsVd3dtvawozaZ8EO3YY1E EGlPZ30x2F0UKnwLP22M6b2DLk9XUMFyVnZJqbgNiJycH1sZ5CJPgs2AsmUZfHC7/voN hWBA== X-Gm-Message-State: AKGB3mKlgkKjbUNyJUqcqCvKlrlD5nrXCgl5kWBQ9uio3Go3aF1Aabyu +lx0nvT9vKOaDRnQyBgLclyYhx+U7wo= X-Google-Smtp-Source: ACJfBovAThnAcv2okSflvSo7cIwYwbFUxQo3ba26d4wLG1rKUDCZKSbju/i5j8kJ/mo3c73O7x28HQ== X-Received: by 10.80.137.106 with SMTP id f39mr64670871edf.148.1514911490368; Tue, 02 Jan 2018 08:44:50 -0800 (PST) Received: from localhost.localdomain (D4CCACC7.cm-2.dynamic.ziggo.nl. [212.204.172.199]) by smtp.gmail.com with ESMTPSA id z5sm29850584edh.76.2018.01.02.08.44.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 02 Jan 2018 08:44:49 -0800 (PST) From: Bryan O'Donoghue To: u-boot@lists.denx.de, brenomatheus@gmail.com Date: Tue, 2 Jan 2018 16:44:07 +0000 Message-Id: <1514911451-4520-22-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1514911451-4520-1-git-send-email-bryan.odonoghue@linaro.org> References: <1514911451-4520-1-git-send-email-bryan.odonoghue@linaro.org> Cc: Fabio Estevam Subject: [U-Boot] [PATCH v4 21/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 c72508b..f39174d 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; }