From patchwork Fri Jan 12 12:40:14 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: 124334 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2028129qgn; Fri, 12 Jan 2018 04:57:15 -0800 (PST) X-Google-Smtp-Source: ACJfBotHVXRvOEA6R31x73SwUzPjsxhilLKMPpeMrojdowyFcC1WmqHE6fWN+jOBhsPGtE/Nzd3T X-Received: by 10.80.195.75 with SMTP id q11mr1890409edb.254.1515761835640; Fri, 12 Jan 2018 04:57:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515761835; cv=none; d=google.com; s=arc-20160816; b=JwoFGgjcSrhf/0guZ0uCLtH8HLNQUzk4YjU5ej20xpbXF3jwK6MhyJKsEHsIhxh6Y4 VbnaMGH8gwBJiNQFadmp1JIuIfhcMjZhYkKSKbqnKvUlX3znRYp09t0Pm2QbnW7xZBOq gQ4z1U/WazYCRy+29IR9+TbQnryiZfc3qbfrQtlDHb/ie0rMPwZogk46f43eBh3O1uhD 3n7Zmm9rBOyGLOYJAVNzz/dDwzHPL5rK4HpEz7T1ZpluzptwuoRbrKpTsyOl0vG8Ht7b LXQPuElLds4QwyrkSrkAWQ9QfcJoCsLhrW4YZQ4pJpOOIY0AUIoogKOHfR6XCSYrAvrw sFBA== 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=Jgf8slvtqTFIdFaiT8b8bKVXfibcgTLoAOj+jKYWEqM=; b=eD5f8cusplfxeG9N5OzRQLgyezG+WFnpzwoSrrsGRjm181V2HPGEQbhShR0RBXIwpa sOzNphAWsJDknnW6qR/4CwcCSuuYWiFHVywPEO5n3UjW+yTKzXnq6XkukWjzJ6ZUUFWt 0d/kW/J3+4ysMjPa5uB2+dHMsooWyoSU15fCxts37Ws/Ka3201TCzHsFZyDY4avQoo/y kmrflpUyGaN8CCZn1Wk4MIiD2Sdvjn5rFjoHmUNrVbwonWfUgUdB2hrck/BiRf0FrZHf Vc14kuuOdoZ1havPubK7ztjVw+PdfSYtJ4IqbRmLRZH+2H+JDtxfeXpz3MtcnqONDzvR kUFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ktjjx/1S; 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 y93si377199edy.358.2018.01.12.04.57.15; Fri, 12 Jan 2018 04:57:15 -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=ktjjx/1S; 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 44A91C22208; Fri, 12 Jan 2018 12:45:49 +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 9F844C2220F; Fri, 12 Jan 2018 12:41:27 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 3A143C221FF; Fri, 12 Jan 2018 12:40:51 +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 3CBF9C221D2 for ; Fri, 12 Jan 2018 12:40:47 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id b141so11926206wme.1 for ; Fri, 12 Jan 2018 04:40:47 -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=3kmeRJAcnNLuvoVzlVMyorvtFHmwtBWxwtce5sh4EVM=; b=ktjjx/1S2HVhxakNRmEFDIT3vLKPFJbUtrV5V8R2jZuWCRMkvvlIRWtyoMLnVuYXho G7gaj8u2pVkuM39WqHRiLnu9eyOfjNVvdv3SxOvHoA6W7tho39LItrjecLTG1h2bf47X +7eJuU3hoK9xDD9pTcH4jAeV8izKd50bHXkvM= 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=3kmeRJAcnNLuvoVzlVMyorvtFHmwtBWxwtce5sh4EVM=; b=sjb/ZYpg4AZtTS6WI1J/5ctJMso3JdedYFbyYtmYsT/u+G1FtCvf8jpe+noUW4+yXB FlzdyOkrRNcRCrsmFCroxLmuHls+099TCrkuItI2KfL4skUuN5j/+tQRQDyksSrnoyVJ S2ZBpDkiPHxjFPJlAPx7v1lvYjwd9pVBpRGkQ3H5nwEKWZ5X2rZw5ELy4bz43sG7C0F0 z1p0CSn+zHNKp5Kb5DynUPNc0l6PCDVBZpaSyJKJCmUT65xBH3XjWjYOASJj4ejV8jBq ESiMFNM0O/TG/cvN1IlUcmBkiN3cNbOBsdDUaCzrwG6qicfz59Fw9FytCM3+3VzRUprF GYIA== X-Gm-Message-State: AKwxytcHwMf6CgvNMxtBKTj5taYZ7z4VMEp6QN52fYDchkiBPlyC3OVg AyGHuaKb2MkB2ikkROzBPub1tvjOsso= X-Received: by 10.80.151.22 with SMTP id c22mr11439817edb.225.1515760846748; Fri, 12 Jan 2018 04:40:46 -0800 (PST) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id w2sm13893585edb.4.2018.01.12.04.40.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 12 Jan 2018 04:40:46 -0800 (PST) From: Bryan O'Donoghue To: u-boot@lists.denx.de, brenomatheus@gmail.com Date: Fri, 12 Jan 2018 12:40:14 +0000 Message-Id: <1515760819-15116-21-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515760819-15116-1-git-send-email-bryan.odonoghue@linaro.org> References: <1515760819-15116-1-git-send-email-bryan.odonoghue@linaro.org> Cc: Fabio Estevam Subject: [U-Boot] [PATCH v6 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 Tested-by: Breno Lima Reviewed-by: Fabio Estevam --- 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 7c2f828..d917ac3 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; }