From mboxrd@z Thu Jan 1 00:00:00 1970 From: York Sun Date: Mon, 15 May 2017 09:16:07 -0700 Subject: [U-Boot] [PATCH v1 7/9] armv8: fsl-layerscape: Enable secure boot valiation for SPL boot In-Reply-To: <1494864969-7374-1-git-send-email-york.sun@nxp.com> References: <1494864969-7374-1-git-send-email-york.sun@nxp.com> Message-ID: <1494864969-7374-8-git-send-email-york.sun@nxp.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Enable validation of PPA image for SPL boot. Signed-off-by: York Sun --- 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 #include #include +#include #include #include @@ -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 +#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 -#endif /* #ifndef CONFIG_SPL_BUILD */ #endif /* #ifdef CONFIG_CHAIN_OF_TRUST */ #endif -- 2.7.4