[U-Boot] [PATCH v1 7/9] armv8: fsl-layerscape: Enable secure boot valiation for SPL boot
York Sun
york.sun at nxp.com
Mon May 15 16:16:07 UTC 2017
Enable validation of PPA image for SPL boot.
Signed-off-by: York Sun <york.sun at nxp.com>
---
arch/arm/cpu/armv8/fsl-layerscape/spl.c | 4 ++++
arch/arm/include/asm/fsl_secure_boot.h | 5 +++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/spl.c b/arch/arm/cpu/armv8/fsl-layerscape/spl.c
index 7db1077..3c366c2 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/spl.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/spl.c
@@ -10,6 +10,7 @@
#include <fsl_ifc.h>
#include <i2c.h>
#include <fsl_csu.h>
+#include <fsl_validate.h>
#include <asm/arch/fdt.h>
#include <asm/arch/ppa.h>
@@ -63,6 +64,9 @@ void spl_board_init(void)
#ifdef CONFIG_LAYERSCAPE_NS_ACCESS
enable_layerscape_ns_access();
#endif
+#ifdef CONFIG_SECURE_BOOT
+ sec_init();
+#endif
#ifdef CONFIG_SPL_FSL_LS_PPA
ppa_init();
#endif
diff --git a/arch/arm/include/asm/fsl_secure_boot.h b/arch/arm/include/asm/fsl_secure_boot.h
index b0ca4bc..85b59b8 100644
--- a/arch/arm/include/asm/fsl_secure_boot.h
+++ b/arch/arm/include/asm/fsl_secure_boot.h
@@ -130,6 +130,9 @@
/* BOOTSCRIPT_ADDR is not required */
#endif
+#include <config_fsl_chain_trust.h>
+#endif /* #ifndef CONFIG_SPL_BUILD */
+
#ifdef CONFIG_FSL_LS_PPA
/* Define the key hash here if SRK used for signing PPA image is
* different from SRK hash put in SFP used for U-Boot.
@@ -140,7 +143,5 @@
#define PPA_KEY_HASH NULL
#endif /* ifdef CONFIG_FSL_LS_PPA */
-#include <config_fsl_chain_trust.h>
-#endif /* #ifndef CONFIG_SPL_BUILD */
#endif /* #ifdef CONFIG_CHAIN_OF_TRUST */
#endif
--
2.7.4
More information about the U-Boot
mailing list