From patchwork Wed Dec 27 12:26:02 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: 122799 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2137419qgn; Wed, 27 Dec 2017 04:49:30 -0800 (PST) X-Google-Smtp-Source: ACJfBouKCn3PVQWzxAbnBhe+MNkYxUYgqS/o0Lb7jEKwXRz/yqu5VK0It9o8zmpTX+fTP+M4GMDF X-Received: by 10.80.179.15 with SMTP id q15mr34202034edd.166.1514378970066; Wed, 27 Dec 2017 04:49:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1514378970; cv=none; d=google.com; s=arc-20160816; b=fWlz3JVHmtmSIb5mbwLxStJgzITSScoWkJcjNo81wsv5CoQXe/hVHXAN+ASvp7p7HB UeDONK2/4XRtTAIaQKMFY5Iw1OeJe6W6MKosML7F58pcfAWFvafUI4ab1u1SVK63UHJP wE/k9Jh+EHxOyj3p11CHDgIjNUY6hOijGDFw7pg2+bVYrDj97f8+WfY//2mJIfiN++lk Mcm/ToBo34+SmltqoamQ5Y9LQssIFxJvKw07N9nyd6X37+NgSim4o0dclC2InyGPRFP6 Qt1/9f/td2TLTreHeLvbAi88bUst3s4knceFZsOGguO3stxG/GGhcbpNu1DTKRqOu4JE Jc4w== 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=eOJ0qwnulYpvUKSEKeeCW/Jg2uSImPZmWhZphak9E+U=; b=Www5HOCxZiOIPTsQqboVy/JAt2vo1FRRi+P5XC/FuprQFI96diIkwJy81609eot00K K0zHuRVQJczJj8FGIv2Q6meim6IXXBQQHBadZsQTSjdbGu7aGUj5w5q2t9txvhiXTqvN Mk2JijNaF4c+umJFwktOE7nwFZihHJNuxnm0FHMQc3VI1xeT5byfeRzLyuWjRsCKlpsi OvcoyZwqdnP4f6MlT7qCdA62w/640Tu00WCXSRbyZxZP276ie+xlBzRKmg2u9dMZn9Pd GZ+s2hmKM+ln3gnQb/5xqq/uCrcJVLD/Ippy4qG5dxfJ+MOulNEJ6hUkmmW6L4EF32gk xciA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=IoqmW+xD; 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 j3si4987457edd.389.2017.12.27.04.49.29; Wed, 27 Dec 2017 04:49:30 -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=IoqmW+xD; 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 95D50C21E64; Wed, 27 Dec 2017 12:39:07 +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 2D6D4C21F0A; Wed, 27 Dec 2017 12:33:17 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 1C64BC21D5D; Wed, 27 Dec 2017 12:26:42 +0000 (UTC) Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by lists.denx.de (Postfix) with ESMTPS id 78148C21D5D for ; Wed, 27 Dec 2017 12:26:42 +0000 (UTC) Received: by mail-wm0-f65.google.com with SMTP id f140so39018385wmd.2 for ; Wed, 27 Dec 2017 04:26:42 -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=1j3Q1chcpOFqbNmdy2DkG6cByiM0FG9+IjTnXfs/zOM=; b=IoqmW+xDsWBQHmZDpbrX9Tb8+uNhc2Il/vpES6cSSzqMbuw8Jw24wtsv0343y1BuXq Oe2cqiPz3xPJ9vXF6W+hVc8C3CwrcxG+3F5DEh4PchtqAI04S9nrL+XlJX0fGvyADIFz z1lnXX6ykcyJejPM0IORRPK5IV1Gx+2O5nUqA= 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=1j3Q1chcpOFqbNmdy2DkG6cByiM0FG9+IjTnXfs/zOM=; b=EHU/NHo5Ew4oyAtC5Gaga2wKy2vrz2x3CyCCjSlP/5F40bzdJHR7IbzdVKRysyK1oi Z0ohS9C6/qYj5T0f+kQ0xb4z4CvEVQckajhF22KiQPZNmECZD3m/VVJtV80GPNpi4SKY o/5MmctHyIOB6XE2dxct3a8fNDo0Xi4UePY0lzZBwxegVHiH4DcvUunmmVnsFM3mqubm HJhXS3uBByRZ+V33L54NC+Ms0Pu1/DqgS0XPLuLd5OaoTFGpdqiVGnViNnExIKin0uty PnrT/kEy4K5LY68gugMg1pP35CrC5/OWBeFMG25NmH280cFXy1U6iVqS0jz3YbzA5ec4 77dA== X-Gm-Message-State: AKGB3mIkhAXl0jq/CPe1+d8f6CEDMa9sW7SCwm2VOu1MAydM7vYMq5ZL kywwx/97xvdRknWS8PgYRcyx4x2K9zs= X-Received: by 10.80.194.74 with SMTP id t10mr35710214edf.116.1514377601875; Wed, 27 Dec 2017 04:26:41 -0800 (PST) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id a5sm28388838edm.47.2017.12.27.04.26.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 27 Dec 2017 04:26:41 -0800 (PST) From: Bryan O'Donoghue To: u-boot@lists.denx.de Date: Wed, 27 Dec 2017 12:26:02 +0000 Message-Id: <1514377566-28512-20-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1514377566-28512-1-git-send-email-bryan.odonoghue@linaro.org> References: <1514377566-28512-1-git-send-email-bryan.odonoghue@linaro.org> X-Mailman-Approved-At: Wed, 27 Dec 2017 12:32:58 +0000 Cc: Fabio Estevam Subject: [U-Boot] [PATCH 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 --- 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 e30e0f0..749dfa1 100644 --- a/arch/arm/mach-imx/hab.c +++ b/arch/arm/mach-imx/hab.c @@ -96,7 +96,7 @@ static 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); #if !defined(CONFIG_SPL_BUILD) @@ -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; }