From patchwork Sat Dec 30 01:08:54 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: 122998 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp5329171qgn; Fri, 29 Dec 2017 17:31:43 -0800 (PST) X-Google-Smtp-Source: ACJfBou1RSEoar3e5Lbb8W2d+ozVBD4d0WzlrkpYjCDm6P8a+tIer6VxWtoOPunO6T3xQgEbKOlT X-Received: by 10.80.154.67 with SMTP id o61mr17819884edb.291.1514597503356; Fri, 29 Dec 2017 17:31:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1514597503; cv=none; d=google.com; s=arc-20160816; b=thkg+tm5ynS40VnnrfC2Pfp37ZSEDbJQrta3rqjobJk04GmSWIaEg5Tgtvp5XQQ/+F uTLs0cooss9dC4SLQSxFt8z2/xnKcAyFouXPPd7dwdZ1p1RVCVBAJQCKz5Synqs0HQmt 0WESZp2uM5jRbNu1ymxYzMKwbSkeGj1QXsKzAxuwr8IDbJUgsWEzn5HowAcm5RNYFV3z AxouzsfUK2VVviGW9nr/wm9RHWxOnzr+Q8J8u0tCsnuCPc9p9BLWN8ioS6YeOjJgekoK 96vgLVT+iED0dptloVeJ6SVq19XAWCjIqPzR/weXtVy+E6ginG8VC2mclJ1HkMQxiP1z 5JUA== 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=e/Uir0tbjDnb2zO3GcLO1BcvpUYVRXi25MYbO5XUXSU=; b=iI4aIsLIbTzxolPW1aqNPOZPHvIVTOWnziRS9yMS5JRIH0hkxDplaWryWM6H0eUJDG Jey2NgJIXRoP1uI+zDfI4+FzZIS5ockMdLG0K4lfJNBJTtWNSWRSF2SPdeAHdj5GdTPb W9ei5u8xq1nfcfi73YuYnbL9ZldgfKLnvijDSNVwDHH+8pyfySfJDkaQ3JG56iXSp/fl QfzHdZN2JL0PCzW206cnI/PIv6UqEEDr1o0gEoVYNAIkGPJrsop5MZktRIc19sE6cz1+ bDvOjQUA831l9Ew5RJat4STGhz94+eE4irv1ID6QT3pNW+CdqP9e0lOBryNxjCASCb9R CTnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=b7z3HWZW; 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 c31si5209331edd.216.2017.12.29.17.31.43; Fri, 29 Dec 2017 17:31:43 -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=b7z3HWZW; 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 D84C8C21DA2; Sat, 30 Dec 2017 01:24:22 +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 94C43C21DB0; Sat, 30 Dec 2017 01:18:15 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 3FEEBC21DC5; Sat, 30 Dec 2017 01:09:37 +0000 (UTC) Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by lists.denx.de (Postfix) with ESMTPS id 642A7C21E08 for ; Sat, 30 Dec 2017 01:09:33 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id r78so50730952wme.5 for ; Fri, 29 Dec 2017 17:09:33 -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=b7z3HWZW6SSwidCzZ6mIAprXeCCxamVWuJte8LC8aHkSnI7GgnGbfj+ygoSQ1mA6yB A/pozOaLKgZQG5EOTxfbVkwJx8nH66pS8JoV0XrShgXkgXhUN3PfjU1+xjnr8fpouNow shYerHKRzXc4vXEbqM8l3qQdwbUCHGwEQSq/Y= 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=n32Oz+pj5oQUSoKRsh3Rjd6L9gh7fSfT4A/IOtIlszFvLxc9OKkjsC8cnJPL1/ngnv w3+rTebqddsne0VULo39EzQiEeyLxYl6nZ0ZHs/d8eo0iDPO5a/oPAyl2WSo2DjVBXsM HxLCGF8o7+l5KYUL5PewiLyT8wsMMRcIVpZPo/b1qfoSznhzb4lA+eSr2029U9dpej/E C3nskSuPIlaL4vOCTXSjeZgM+JkWufriVuDh1htutf79NzsLngeTI46MymsOHEakW64G Wq63osrhwqBVDnYKqiRXxawtMAU2dqZIMe6rH+QAEXEFnDio8Wxi2ly26YCuQJow2F7d hnDA== X-Gm-Message-State: AKGB3mKVz6SyZ5njZw1Jbuuppvij4Yfr+ChzK1CJrlb6ECGx+GMqicO2 NjeYessPf/4ffxJHCa9MUPs9NjSISL8= X-Received: by 10.80.218.130 with SMTP id q2mr47671318edj.212.1514596172839; Fri, 29 Dec 2017 17:09:32 -0800 (PST) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id f9sm26484148edm.83.2017.12.29.17.09.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Dec 2017 17:09:32 -0800 (PST) From: Bryan O'Donoghue To: u-boot@lists.denx.de, brenomatheus@gmail.com Date: Sat, 30 Dec 2017 01:08:54 +0000 Message-Id: <1514596142-22050-26-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1514596142-22050-1-git-send-email-bryan.odonoghue@linaro.org> References: <1514596142-22050-1-git-send-email-bryan.odonoghue@linaro.org> Cc: Fabio Estevam Subject: [U-Boot] [PATCH v3 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; }