summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan O'Donoghue <[email protected]>2018-01-12 12:40:16 +0000
committerStefano Babic <[email protected]>2018-01-14 17:26:30 +0100
commit07eefaf16e2a7aec35fa3ae8c17c5492cc0af524 (patch)
tree3894f02d95fe988075812d950df4078216341064
parent4467ae6c28aa7eef84d5784f56234472a015d5e2 (diff)
arm: imx: hab: Make imx_hab_is_enabled global
It will be helpful to boot commands to know if the HAB is enabled. Export imx_hab_is_enabled() now to facilitate further work with this data-point in a secure-boot context. Signed-off-by: Bryan O'Donoghue <[email protected]> Cc: Stefano Babic <[email protected]> Cc: Fabio Estevam <[email protected]> Cc: Peng Fan <[email protected]> Cc: Albert Aribaud <[email protected]> Cc: Sven Ebenfeld <[email protected]> Cc: George McCollister <[email protected]> Cc: Breno Matheus Lima <[email protected]> Tested-by: Breno Lima <[email protected]> Reviewed-by: Fabio Estevam <[email protected]>
-rw-r--r--arch/arm/include/asm/mach-imx/hab.h1
-rw-r--r--arch/arm/mach-imx/hab.c4
2 files changed, 2 insertions, 3 deletions
diff --git a/arch/arm/include/asm/mach-imx/hab.h b/arch/arm/include/asm/mach-imx/hab.h
index 98bc1bdc65e..5c13aff1d5b 100644
--- a/arch/arm/include/asm/mach-imx/hab.h
+++ b/arch/arm/include/asm/mach-imx/hab.h
@@ -187,5 +187,6 @@ typedef void hapi_clock_init_t(void);
int imx_hab_authenticate_image(uint32_t ddr_start, uint32_t image_size,
uint32_t ivt_offset);
+bool imx_hab_is_enabled(void);
#endif
diff --git a/arch/arm/mach-imx/hab.c b/arch/arm/mach-imx/hab.c
index 3b19a7e5736..d1c5f696815 100644
--- a/arch/arm/mach-imx/hab.c
+++ b/arch/arm/mach-imx/hab.c
@@ -96,8 +96,6 @@ 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 imx_hab_is_enabled(void);
-
static int ivt_header_error(const char *err_str, struct ivt_header *ivt_hdr)
{
printf("%s magic=0x%x length=0x%02x version=0x%x\n", err_str,
@@ -419,7 +417,7 @@ U_BOOT_CMD(
#endif /* !defined(CONFIG_SPL_BUILD) */
-static bool imx_hab_is_enabled(void)
+bool imx_hab_is_enabled(void)
{
struct imx_sec_config_fuse_t *fuse =
(struct imx_sec_config_fuse_t *)&imx_sec_config_fuse;