From patchwork Fri Sep 20 06:59:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 1165050 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; dmarc=none (p=none dis=none) header.from=denx.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46ZPjm2rL9z9s4Y for ; Fri, 20 Sep 2019 17:00:12 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 154D5C21D65; Fri, 20 Sep 2019 07:00:10 +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=none 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 BAB0AC21C50; Fri, 20 Sep 2019 07:00:05 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 08AC6C21C50; Fri, 20 Sep 2019 07:00:03 +0000 (UTC) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by lists.denx.de (Postfix) with ESMTPS id 6E9AAC21BE5 for ; Fri, 20 Sep 2019 07:00:03 +0000 (UTC) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 46ZPjb1tw9z1rK4Q; Fri, 20 Sep 2019 09:00:03 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 46ZPjb1jF6z1qqkB; Fri, 20 Sep 2019 09:00:03 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id cwdA4GGlDSJK; Fri, 20 Sep 2019 09:00:00 +0200 (CEST) Received: from babic.homelinux.org (host-88-217-136-221.customer.m-online.net [88.217.136.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Fri, 20 Sep 2019 09:00:00 +0200 (CEST) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id 3140945403BB; Fri, 20 Sep 2019 09:00:00 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([IPv6:::1]) by localhost (mail.babic.homelinux.org [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id Ks5v5zJ-peaa; Fri, 20 Sep 2019 08:59:57 +0200 (CEST) Received: from papero.fritz.box (papero.fritz.box [192.168.178.132]) by babic.homelinux.org (Postfix) with ESMTP id 5B2494540284; Fri, 20 Sep 2019 08:59:57 +0200 (CEST) From: Stefano Babic To: u-boot@lists.denx.de Date: Fri, 20 Sep 2019 08:59:50 +0200 Message-Id: <20190920065950.18024-1-sbabic@denx.de> X-Mailer: git-send-email 2.17.1 Subject: [U-Boot] [PATCH] imx: replace CONFIG_SECURE_BOOT with CONFIG_IMX_HAB 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" CONFIG_SECURE_BOOT is too generic and forbids to use it for cross architecture purposes. If Secure Boot is required for imx, this means to enable and use the HAB processor in the soc. Signed-off-by: Stefano Babic --- Makefile | 4 ++-- arch/arm/include/asm/arch-mx7/clock.h | 2 +- arch/arm/mach-imx/Kconfig | 2 +- arch/arm/mach-imx/Makefile | 4 ++-- arch/arm/mach-imx/imx8m/soc.c | 2 +- arch/arm/mach-imx/mx6/clock.c | 2 +- arch/arm/mach-imx/mx6/soc.c | 2 +- arch/arm/mach-imx/mx7/clock.c | 2 +- arch/arm/mach-imx/mx7/soc.c | 2 +- arch/arm/mach-imx/mx7ulp/clock.c | 2 +- arch/arm/mach-imx/mx7ulp/soc.c | 2 +- arch/arm/mach-imx/spl.c | 2 +- arch/arm/mach-imx/spl_sd.cfg | 2 +- board/boundary/nitrogen6x/nitrogen6dl.cfg | 2 +- board/boundary/nitrogen6x/nitrogen6dl2g.cfg | 2 +- board/boundary/nitrogen6x/nitrogen6q.cfg | 2 +- board/boundary/nitrogen6x/nitrogen6q2g.cfg | 2 +- board/boundary/nitrogen6x/nitrogen6s.cfg | 2 +- board/boundary/nitrogen6x/nitrogen6s1g.cfg | 2 +- board/freescale/mx6slevk/imximage.cfg | 2 +- board/freescale/mx6sllevk/imximage.cfg | 2 +- board/freescale/mx6sxsabresd/imximage.cfg | 2 +- board/freescale/mx6ullevk/imximage.cfg | 2 +- board/freescale/mx7dsabresd/imximage.cfg | 2 +- board/freescale/mx7ulp_evk/imximage.cfg | 2 +- board/toradex/colibri-imx6ull/imximage.cfg | 2 +- board/toradex/colibri_imx7/imximage.cfg | 2 +- board/warp/imximage.cfg | 2 +- board/warp7/imximage.cfg | 2 +- board/warp7/warp7.c | 2 +- common/spl/spl_fit.c | 2 +- configs/colibri_imx7_defconfig | 2 +- configs/colibri_imx7_emmc_defconfig | 2 +- configs/imx6dl_mamoj_defconfig | 2 +- configs/warp7_bl33_defconfig | 2 +- configs/warp7_defconfig | 2 +- doc/imx/habv4/guides/encrypted_boot.txt | 2 +- doc/imx/habv4/guides/mx6_mx7_secure_boot.txt | 6 +++--- doc/imx/habv4/guides/mx6_mx7_spl_secure_boot.txt | 6 +++--- tools/spl_size_limit.c | 2 +- 40 files changed, 46 insertions(+), 46 deletions(-) diff --git a/Makefile b/Makefile index 8575a0512f..6524a27840 100644 --- a/Makefile +++ b/Makefile @@ -830,10 +830,10 @@ ALL-$(CONFIG_RAMBOOT_PBL) += u-boot.pbl endif endif ALL-$(CONFIG_SPL) += spl/u-boot-spl.bin -ifeq ($(CONFIG_MX6)$(CONFIG_SECURE_BOOT), yy) +ifeq ($(CONFIG_MX6)$(CONFIG_IMX_HAB), yy) ALL-$(CONFIG_SPL_FRAMEWORK) += u-boot-ivt.img else -ifeq ($(CONFIG_MX7)$(CONFIG_SECURE_BOOT), yy) +ifeq ($(CONFIG_MX7)$(CONFIG_IMX_HAB), yy) ALL-$(CONFIG_SPL_FRAMEWORK) += u-boot-ivt.img else ALL-$(CONFIG_SPL_FRAMEWORK) += u-boot.img diff --git a/arch/arm/include/asm/arch-mx7/clock.h b/arch/arm/include/asm/arch-mx7/clock.h index 1d07fde543..984bd3f141 100644 --- a/arch/arm/include/asm/arch-mx7/clock.h +++ b/arch/arm/include/asm/arch-mx7/clock.h @@ -357,7 +357,7 @@ int set_clk_nand(void); void enable_ocotp_clk(unsigned char enable); #endif void enable_usboh3_clk(unsigned char enable); -#ifdef CONFIG_SECURE_BOOT +#ifdef CONFIG_IMX_HAB void hab_caam_clock_enable(unsigned char enable); #endif void mxs_set_lcdclk(uint32_t base_addr, uint32_t freq); diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index d44f74e474..9a92a218a3 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -34,7 +34,7 @@ config USE_IMXIMG_PLUGIN i.MX6/7 supports DCD and Plugin. Enable this configuration to use Plugin, otherwise DCD will be used. -config SECURE_BOOT +config SECURE_IMX_HAB bool "Support i.MX HAB features" depends on ARCH_MX7 || ARCH_MX6 || ARCH_MX5 select FSL_CAAM if HAS_CAAM diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile index 17b241ae99..2aa865280f 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile @@ -44,12 +44,12 @@ ifneq ($(CONFIG_SPL_BUILD),y) obj-$(CONFIG_IMX_BOOTAUX) += imx_bootaux.o endif obj-$(CONFIG_SATA) += sata.o -obj-$(CONFIG_SECURE_BOOT) += hab.o +obj-$(CONFIG_IMX_HAB) += hab.o obj-$(CONFIG_SYSCOUNTER_TIMER) += syscounter.o endif ifeq ($(SOC),$(filter $(SOC),mx7ulp)) obj-y += cache.o -obj-$(CONFIG_SECURE_BOOT) += hab.o +obj-$(CONFIG_IMX_HAB) += hab.o endif ifeq ($(SOC),$(filter $(SOC),vf610)) obj-y += ddrmc-vf610.o diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c index 7ec39b3e47..3962cad557 100644 --- a/arch/arm/mach-imx/imx8m/soc.c +++ b/arch/arm/mach-imx/imx8m/soc.c @@ -21,7 +21,7 @@ DECLARE_GLOBAL_DATA_PTR; -#if defined(CONFIG_SECURE_BOOT) +#if defined(CONFIG_IMX_HAB) struct imx_sec_config_fuse_t const imx_sec_config_fuse = { .bank = 1, .word = 3, diff --git a/arch/arm/mach-imx/mx6/clock.c b/arch/arm/mach-imx/mx6/clock.c index 366a4e3c6b..cd3d13b190 100644 --- a/arch/arm/mach-imx/mx6/clock.c +++ b/arch/arm/mach-imx/mx6/clock.c @@ -1152,7 +1152,7 @@ int enable_pcie_clock(void) } #endif -#ifdef CONFIG_SECURE_BOOT +#ifdef CONFIG_IMX_HAB void hab_caam_clock_enable(unsigned char enable) { u32 reg; diff --git a/arch/arm/mach-imx/mx6/soc.c b/arch/arm/mach-imx/mx6/soc.c index d37d3856d3..6dccee484c 100644 --- a/arch/arm/mach-imx/mx6/soc.c +++ b/arch/arm/mach-imx/mx6/soc.c @@ -50,7 +50,7 @@ U_BOOT_DEVICE(imx6_thermal) = { }; #endif -#if defined(CONFIG_SECURE_BOOT) +#if defined(CONFIG_IMX_HAB) struct imx_sec_config_fuse_t const imx_sec_config_fuse = { .bank = 0, .word = 6, diff --git a/arch/arm/mach-imx/mx7/clock.c b/arch/arm/mach-imx/mx7/clock.c index 4f9724cadb..0e08cabb7a 100644 --- a/arch/arm/mach-imx/mx7/clock.c +++ b/arch/arm/mach-imx/mx7/clock.c @@ -1074,7 +1074,7 @@ void clock_init(void) } } -#ifdef CONFIG_SECURE_BOOT +#ifdef CONFIG_IMX_HAB void hab_caam_clock_enable(unsigned char enable) { if (enable) diff --git a/arch/arm/mach-imx/mx7/soc.c b/arch/arm/mach-imx/mx7/soc.c index 3b8e1ba9c3..35160f4b37 100644 --- a/arch/arm/mach-imx/mx7/soc.c +++ b/arch/arm/mach-imx/mx7/soc.c @@ -122,7 +122,7 @@ static void isolate_resource(void) } #endif -#if defined(CONFIG_SECURE_BOOT) +#if defined(CONFIG_IMX_HAB) struct imx_sec_config_fuse_t const imx_sec_config_fuse = { .bank = 1, .word = 3, diff --git a/arch/arm/mach-imx/mx7ulp/clock.c b/arch/arm/mach-imx/mx7ulp/clock.c index 7bf83170eb..d3365dd411 100644 --- a/arch/arm/mach-imx/mx7ulp/clock.c +++ b/arch/arm/mach-imx/mx7ulp/clock.c @@ -314,7 +314,7 @@ void clock_init(void) enable_usboh3_clk(1); } -#ifdef CONFIG_SECURE_BOOT +#ifdef CONFIG_IMX_HAB void hab_caam_clock_enable(unsigned char enable) { if (enable) diff --git a/arch/arm/mach-imx/mx7ulp/soc.c b/arch/arm/mach-imx/mx7ulp/soc.c index 6c53aa106e..127fcfeea1 100644 --- a/arch/arm/mach-imx/mx7ulp/soc.c +++ b/arch/arm/mach-imx/mx7ulp/soc.c @@ -11,7 +11,7 @@ static char *get_reset_cause(char *); -#if defined(CONFIG_SECURE_BOOT) +#if defined(CONFIG_IMX_HAB) struct imx_sec_config_fuse_t const imx_sec_config_fuse = { .bank = 29, .word = 6, diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c index a98fab8f1c..fb04dcf8e0 100644 --- a/arch/arm/mach-imx/spl.c +++ b/arch/arm/mach-imx/spl.c @@ -198,7 +198,7 @@ u32 spl_boot_mode(const u32 boot_device) } #endif -#if defined(CONFIG_SECURE_BOOT) +#if defined(CONFIG_IMX_HAB) /* * +------------+ 0x0 (DDR_UIMAGE_START) - diff --git a/arch/arm/mach-imx/spl_sd.cfg b/arch/arm/mach-imx/spl_sd.cfg index e791debf10..dbaee81535 100644 --- a/arch/arm/mach-imx/spl_sd.cfg +++ b/arch/arm/mach-imx/spl_sd.cfg @@ -12,6 +12,6 @@ BOOT_FROM sd /* * Secure boot support */ -#ifdef CONFIG_SECURE_BOOT +#ifdef CONFIG_IMX_HAB CSF CONFIG_CSF_SIZE #endif diff --git a/board/boundary/nitrogen6x/nitrogen6dl.cfg b/board/boundary/nitrogen6x/nitrogen6dl.cfg index b1e3c0fe45..56b3bcbb2f 100644 --- a/board/boundary/nitrogen6x/nitrogen6dl.cfg +++ b/board/boundary/nitrogen6x/nitrogen6dl.cfg @@ -19,7 +19,7 @@ BOOT_FROM spi #define __ASSEMBLY__ #include -#ifdef CONFIG_SECURE_BOOT +#ifdef CONFIG_IMX_HAB CSF CONFIG_CSF_SIZE #endif #include "asm/arch/mx6-ddr.h" diff --git a/board/boundary/nitrogen6x/nitrogen6dl2g.cfg b/board/boundary/nitrogen6x/nitrogen6dl2g.cfg index 3e7d605bf5..13f7a89232 100644 --- a/board/boundary/nitrogen6x/nitrogen6dl2g.cfg +++ b/board/boundary/nitrogen6x/nitrogen6dl2g.cfg @@ -19,7 +19,7 @@ BOOT_FROM spi #define __ASSEMBLY__ #include -#ifdef CONFIG_SECURE_BOOT +#ifdef CONFIG_IMX_HAB CSF CONFIG_CSF_SIZE #endif #include "asm/arch/mx6-ddr.h" diff --git a/board/boundary/nitrogen6x/nitrogen6q.cfg b/board/boundary/nitrogen6x/nitrogen6q.cfg index 26bb6451a2..1304b52d18 100644 --- a/board/boundary/nitrogen6x/nitrogen6q.cfg +++ b/board/boundary/nitrogen6x/nitrogen6q.cfg @@ -19,7 +19,7 @@ BOOT_FROM spi #define __ASSEMBLY__ #include -#ifdef CONFIG_SECURE_BOOT +#ifdef CONFIG_IMX_HAB CSF CONFIG_CSF_SIZE #endif #include "asm/arch/mx6-ddr.h" diff --git a/board/boundary/nitrogen6x/nitrogen6q2g.cfg b/board/boundary/nitrogen6x/nitrogen6q2g.cfg index 5ff3eedc19..e5e923d3cf 100644 --- a/board/boundary/nitrogen6x/nitrogen6q2g.cfg +++ b/board/boundary/nitrogen6x/nitrogen6q2g.cfg @@ -19,7 +19,7 @@ BOOT_FROM spi #define __ASSEMBLY__ #include -#ifdef CONFIG_SECURE_BOOT +#ifdef CONFIG_IMX_HAB CSF CONFIG_CSF_SIZE #endif #include "asm/arch/mx6-ddr.h" diff --git a/board/boundary/nitrogen6x/nitrogen6s.cfg b/board/boundary/nitrogen6x/nitrogen6s.cfg index 5482656e8f..e5f814b715 100644 --- a/board/boundary/nitrogen6x/nitrogen6s.cfg +++ b/board/boundary/nitrogen6x/nitrogen6s.cfg @@ -19,7 +19,7 @@ BOOT_FROM spi #define __ASSEMBLY__ #include -#ifdef CONFIG_SECURE_BOOT +#ifdef CONFIG_IMX_HAB CSF CONFIG_CSF_SIZE #endif #include "asm/arch/mx6-ddr.h" diff --git a/board/boundary/nitrogen6x/nitrogen6s1g.cfg b/board/boundary/nitrogen6x/nitrogen6s1g.cfg index dd30ca9439..f3d754e23a 100644 --- a/board/boundary/nitrogen6x/nitrogen6s1g.cfg +++ b/board/boundary/nitrogen6x/nitrogen6s1g.cfg @@ -19,7 +19,7 @@ BOOT_FROM spi #define __ASSEMBLY__ #include -#ifdef CONFIG_SECURE_BOOT +#ifdef CONFIG_IMX_HAB CSF CONFIG_CSF_SIZE #endif #include "asm/arch/mx6-ddr.h" diff --git a/board/freescale/mx6slevk/imximage.cfg b/board/freescale/mx6slevk/imximage.cfg index b33bb93f4c..fd71bef286 100644 --- a/board/freescale/mx6slevk/imximage.cfg +++ b/board/freescale/mx6slevk/imximage.cfg @@ -24,7 +24,7 @@ BOOT_FROM sd /* * Secure boot support */ -#ifdef CONFIG_SECURE_BOOT +#ifdef CONFIG_IMX_HAB CSF CONFIG_CSF_SIZE #endif diff --git a/board/freescale/mx6sllevk/imximage.cfg b/board/freescale/mx6sllevk/imximage.cfg index 2dcff0014a..74b3a907bf 100644 --- a/board/freescale/mx6sllevk/imximage.cfg +++ b/board/freescale/mx6sllevk/imximage.cfg @@ -27,7 +27,7 @@ BOOT_FROM sd PLUGIN board/freescale/mx6sllevk/plugin.bin 0x00907000 #else -#ifdef CONFIG_SECURE_BOOT +#ifdef CONFIG_IMX_HAB CSF CONFIG_CSF_SIZE #endif diff --git a/board/freescale/mx6sxsabresd/imximage.cfg b/board/freescale/mx6sxsabresd/imximage.cfg index 0354bb36e2..28ffb2f8bc 100644 --- a/board/freescale/mx6sxsabresd/imximage.cfg +++ b/board/freescale/mx6sxsabresd/imximage.cfg @@ -20,7 +20,7 @@ BOOT_FROM sd /* * Secure boot support */ -#ifdef CONFIG_SECURE_BOOT +#ifdef CONFIG_IMX_HAB CSF CONFIG_CSF_SIZE #endif diff --git a/board/freescale/mx6ullevk/imximage.cfg b/board/freescale/mx6ullevk/imximage.cfg index 39306d4cd1..40818d0a03 100644 --- a/board/freescale/mx6ullevk/imximage.cfg +++ b/board/freescale/mx6ullevk/imximage.cfg @@ -33,7 +33,7 @@ BOOT_FROM sd PLUGIN board/freescale/mx6ullevk/plugin.bin 0x00907000 #else -#ifdef CONFIG_SECURE_BOOT +#ifdef CONFIG_IMX_HAB CSF CONFIG_CSF_SIZE #endif diff --git a/board/freescale/mx7dsabresd/imximage.cfg b/board/freescale/mx7dsabresd/imximage.cfg index b72e0cf47c..a0f39c4062 100644 --- a/board/freescale/mx7dsabresd/imximage.cfg +++ b/board/freescale/mx7dsabresd/imximage.cfg @@ -24,7 +24,7 @@ BOOT_FROM sd /* * Secure boot support */ -#ifdef CONFIG_SECURE_BOOT +#ifdef CONFIG_IMX_HAB CSF CONFIG_CSF_SIZE #endif diff --git a/board/freescale/mx7ulp_evk/imximage.cfg b/board/freescale/mx7ulp_evk/imximage.cfg index 43ebc23091..ec3673040b 100644 --- a/board/freescale/mx7ulp_evk/imximage.cfg +++ b/board/freescale/mx7ulp_evk/imximage.cfg @@ -27,7 +27,7 @@ BOOT_FROM sd PLUGIN board/freescale/mx7ulp_evk/plugin.bin 0x2F020000 #else -#ifdef CONFIG_SECURE_BOOT +#ifdef CONFIG_IMX_HAB CSF CONFIG_CSF_SIZE #endif /* diff --git a/board/toradex/colibri-imx6ull/imximage.cfg b/board/toradex/colibri-imx6ull/imximage.cfg index 2ce55a610a..a11e288c6c 100644 --- a/board/toradex/colibri-imx6ull/imximage.cfg +++ b/board/toradex/colibri-imx6ull/imximage.cfg @@ -25,7 +25,7 @@ BOOT_FROM nand /* * Secure boot support */ -#ifdef CONFIG_SECURE_BOOT +#ifdef CONFIG_IMX_HAB CSF CONFIG_CSF_SIZE #endif diff --git a/board/toradex/colibri_imx7/imximage.cfg b/board/toradex/colibri_imx7/imximage.cfg index 25cfd5c6f8..1b4f272bb6 100644 --- a/board/toradex/colibri_imx7/imximage.cfg +++ b/board/toradex/colibri_imx7/imximage.cfg @@ -25,7 +25,7 @@ BOOT_FROM sd /* * Secure boot support */ -#ifdef CONFIG_SECURE_BOOT +#ifdef CONFIG_IMX_HAB CSF CONFIG_CSF_SIZE #endif diff --git a/board/warp/imximage.cfg b/board/warp/imximage.cfg index 4fb5a84205..dea331cab1 100644 --- a/board/warp/imximage.cfg +++ b/board/warp/imximage.cfg @@ -24,7 +24,7 @@ BOOT_FROM sd /* * Secure boot support */ -#ifdef CONFIG_SECURE_BOOT +#ifdef CONFIG__IMX_HAB CSF CONFIG_CSF_SIZE #endif diff --git a/board/warp7/imximage.cfg b/board/warp7/imximage.cfg index a6edfdacef..a4c2f677a1 100644 --- a/board/warp7/imximage.cfg +++ b/board/warp7/imximage.cfg @@ -12,7 +12,7 @@ #include IMAGE_VERSION 2 -#ifdef CONFIG_SECURE_BOOT +#ifdef CONFIG_IMX_HAB CSF CONFIG_CSF_SIZE #endif diff --git a/board/warp7/warp7.c b/board/warp7/warp7.c index 39ae982257..c423e049cb 100644 --- a/board/warp7/warp7.c +++ b/board/warp7/warp7.c @@ -146,7 +146,7 @@ int board_late_init(void) */ clrsetbits_le16(&wdog->wcr, 0, 0x10); -#ifdef CONFIG_SECURE_BOOT +#ifdef CONFIG_IMX_HAB /* Determine HAB state */ env_set_ulong(HAB_ENABLED_ENVNAME, imx_hab_is_enabled()); #else diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c index b3e3ccd5a2..cbc00a4e7c 100644 --- a/common/spl/spl_fit.c +++ b/common/spl/spl_fit.c @@ -553,7 +553,7 @@ int spl_load_simple_fit(struct spl_image_info *spl_image, spl_image->flags |= SPL_FIT_FOUND; -#ifdef CONFIG_SECURE_BOOT +#ifdef CONFIG_IMX_HAB board_spl_fit_post_load((ulong)fit, size); #endif diff --git a/configs/colibri_imx7_defconfig b/configs/colibri_imx7_defconfig index c1bee450f6..1f7aff1517 100644 --- a/configs/colibri_imx7_defconfig +++ b/configs/colibri_imx7_defconfig @@ -2,7 +2,7 @@ CONFIG_ARM=y CONFIG_SYS_THUMB_BUILD=y CONFIG_ARCH_MX7=y CONFIG_SYS_TEXT_BASE=0x87800000 -CONFIG_SECURE_BOOT=y +CONFIG_IMX_HAB=y CONFIG_TARGET_COLIBRI_IMX7=y CONFIG_NR_DRAM_BANKS=1 CONFIG_IMX_RDC=y diff --git a/configs/colibri_imx7_emmc_defconfig b/configs/colibri_imx7_emmc_defconfig index 1a012d851e..09403541e6 100644 --- a/configs/colibri_imx7_emmc_defconfig +++ b/configs/colibri_imx7_emmc_defconfig @@ -2,7 +2,7 @@ CONFIG_ARM=y CONFIG_SYS_THUMB_BUILD=y CONFIG_ARCH_MX7=y CONFIG_SYS_TEXT_BASE=0x87800000 -CONFIG_SECURE_BOOT=y +CONFIG_IMX_HAB=y CONFIG_TARGET_COLIBRI_IMX7=y CONFIG_TARGET_COLIBRI_IMX7_EMMC=y CONFIG_ARMV7_BOOT_SEC_DEFAULT=y diff --git a/configs/imx6dl_mamoj_defconfig b/configs/imx6dl_mamoj_defconfig index 983d98536c..6b92f942e5 100644 --- a/configs/imx6dl_mamoj_defconfig +++ b/configs/imx6dl_mamoj_defconfig @@ -1,7 +1,7 @@ CONFIG_ARM=y CONFIG_ARCH_MX6=y CONFIG_SYS_TEXT_BASE=0x17800000 -CONFIG_SECURE_BOOT=y +CONFIG_IMX_HAB=y CONFIG_TARGET_MX6DL_MAMOJ=y CONFIG_NR_DRAM_BANKS=1 CONFIG_CSF_SIZE=0x2060 diff --git a/configs/warp7_bl33_defconfig b/configs/warp7_bl33_defconfig index 80accfb509..9d161f3ecb 100644 --- a/configs/warp7_bl33_defconfig +++ b/configs/warp7_bl33_defconfig @@ -1,7 +1,7 @@ CONFIG_ARM=y CONFIG_ARCH_MX7=y CONFIG_SYS_TEXT_BASE=0x87800000 -CONFIG_SECURE_BOOT=y +CONFIG_IMX_HAB=y CONFIG_TARGET_WARP7=y CONFIG_ARMV7_BOOT_SEC_DEFAULT=y CONFIG_FIT=y diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig index a022454976..62e331d985 100644 --- a/configs/warp7_defconfig +++ b/configs/warp7_defconfig @@ -1,7 +1,7 @@ CONFIG_ARM=y CONFIG_ARCH_MX7=y CONFIG_SYS_TEXT_BASE=0x87800000 -CONFIG_SECURE_BOOT=y +CONFIG_IMX_HAB=y CONFIG_TARGET_WARP7=y CONFIG_NR_DRAM_BANKS=1 CONFIG_ARMV7_BOOT_SEC_DEFAULT=y diff --git a/doc/imx/habv4/guides/encrypted_boot.txt b/doc/imx/habv4/guides/encrypted_boot.txt index c59d204d38..e2b435749e 100644 --- a/doc/imx/habv4/guides/encrypted_boot.txt +++ b/doc/imx/habv4/guides/encrypted_boot.txt @@ -16,7 +16,7 @@ The DEK blob is generated by an authenticated U-Boot image with the dek_blob cmd enabled. The image used for DEK blob generation needs to have the following configurations enabled in Kconfig: -CONFIG_SECURE_BOOT=y +CONFIG_IMX_HAB=y CONFIG_CMD_DEKBLOB=y Note: The encrypted boot feature is only supported by HABv4 or diff --git a/doc/imx/habv4/guides/mx6_mx7_secure_boot.txt b/doc/imx/habv4/guides/mx6_mx7_secure_boot.txt index 98e18beecd..20fff937b6 100644 --- a/doc/imx/habv4/guides/mx6_mx7_secure_boot.txt +++ b/doc/imx/habv4/guides/mx6_mx7_secure_boot.txt @@ -17,7 +17,7 @@ introduction_habv4.txt document. The U-Boot provides support to secure boot configuration and also provide access to the HAB APIs exposed by the ROM vector table, the support is -enabled by selecting the CONFIG_SECURE_BOOT option. +enabled by selecting the CONFIG_IMX_HAB option. When built with this configuration, the U-Boot provides extra functions for HAB, such as the HAB status logs retrievement through the hab_status command @@ -57,12 +57,12 @@ The diagram below illustrate a signed u-boot-dtb.imx image layout: ------------------------------------- The first step is to generate an U-Boot image supporting the HAB features -mentioned above, this can be achieved by adding CONFIG_SECURE_BOOT to the +mentioned above, this can be achieved by adding CONFIG_IMX_HAB to the build configuration: - Defconfig: - CONFIG_SECURE_BOOT=y + CONFIG_IMX_HAB=y - Kconfig: diff --git a/doc/imx/habv4/guides/mx6_mx7_spl_secure_boot.txt b/doc/imx/habv4/guides/mx6_mx7_spl_secure_boot.txt index 0d7931aac0..fde0f27efd 100644 --- a/doc/imx/habv4/guides/mx6_mx7_spl_secure_boot.txt +++ b/doc/imx/habv4/guides/mx6_mx7_spl_secure_boot.txt @@ -27,7 +27,7 @@ root of trust. The U-Boot provides support to secure boot configuration and also provide access to the HAB APIs exposed by the ROM vector table, the support is -enabled by selecting the CONFIG_SECURE_BOOT option. +enabled by selecting the CONFIG_IMX_HAB option. When built with this configuration the U-Boot correctly pads the final SPL image by aligning to the next 0xC00 address, so the CSF signature data @@ -82,12 +82,12 @@ The diagram below illustrate a signed u-boot-ivt.img image layout: ------------------------------------- The first step is to generate an U-Boot image supporting the HAB features -mentioned above, this can be achieved by adding CONFIG_SECURE_BOOT to the +mentioned above, this can be achieved by adding CONFIG_IMX_HAB to the build configuration: - Defconfig: - CONFIG_SECURE_BOOT=y + CONFIG_IMX_HAB=y - Kconfig: diff --git a/tools/spl_size_limit.c b/tools/spl_size_limit.c index 8902e30129..c6c139e834 100644 --- a/tools/spl_size_limit.c +++ b/tools/spl_size_limit.c @@ -14,7 +14,7 @@ int main(int argc, char *argv[]) #ifdef CONFIG_SPL_SIZE_LIMIT spl_size_limit = CONFIG_SPL_SIZE_LIMIT; -#if defined(CONFIG_SECURE_BOOT) && defined(CONFIG_CSF_SIZE) +#if defined(CONFIG_IMX_HAB) && defined(CONFIG_CSF_SIZE) spl_size_limit -= CONFIG_CSF_SIZE; #endif #ifdef CONFIG_SPL_SIZE_LIMIT_SUBTRACT_GD