Skip to contentSkip to conversation

spl: imx: only use HAB if spl fit signature is not enabled

PATCH New Ricardo Salveti 2 participants 2 messages Sep 2, 2019 – Sep 3, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 spl: imx: only use HAB if spl fit signature is not enabled

There is no need to use HAB for FIT signature validation when SPL_FIT_SIGNATURE is also enabled, as that will be validated via the normal U-Boot signed FIT image flow.

This allows having SPL validated by HAB and the payloads to follow being validated with FIT signatures only.

---
 arch/arm/mach-imx/spl.c | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/mach-imx/spl.c +2 -0
index 1f230aca33..a98fab8f1c 100644
@@ -261,6 +261,7 @@ __weak void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image)
 	}
 }
 
+#if !defined(CONFIG_SPL_FIT_SIGNATURE)
 ulong board_spl_fit_size_align(ulong size)
 {
 	/*
@@ -285,6 +286,7 @@ void board_spl_fit_post_load(ulong load_addr, size_t length)
 		hang();
 	}
 }
+#endif
 
 #endif
 
Signature · 1 line
2.23.0
#1 lore raw

PATCH 1/1 spl: imx: only use HAB if spl fit signature is not enabled

Quoted 27 lines

Subject: [PATCH] spl: imx: only use HAB if spl fit signature is not enabled

There is no need to use HAB for FIT signature validation when SPL_FIT_SIGNATURE is also enabled, as that will be validated via the normal U-Boot signed FIT image flow.

This allows having SPL validated by HAB and the payloads to follow being validated with FIT signatures only.

---
 arch/arm/mach-imx/spl.c | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/mach-imx/spl.c index renamed from arch/arm/mach-imx/spl.c +0 -0

1f230aca33..a98fab8f1c 100644

arch/arm/mach-imx/spl.c +1 -0
@@ -261,6 +261,7 @@ __weak void __noreturn
 jump_to_image_no_args(struct spl_image_info *spl_image)
 	}
 }
 
+#if !defined(CONFIG_SPL_FIT_SIGNATURE)
 ulong board_spl_fit_size_align(ulong size)  {
 	/*

arch/arm/mach-imx/spl.c void board_spl_fit_post_load(ulong load_addr, size_t · line 292

Quoted 7 lines
arch/arm/mach-imx/spl.c +1 -0
@@ -285,6 +286,7 @@ void board_spl_fit_post_load(ulong load_addr, size_t
 length)
 		hang();
 	}
 }
+#endif
 
 #endif
Quoted 3 lines

--
2.23.0