[U-Boot] [PATCH 2/3] LS2080ARDB: QSPI boot: Secure Boot image validation
Udit Agarwal
udit.agarwal at nxp.com
Tue May 2 12:13:56 UTC 2017
Validates the images in the ESBC phase for LS2088ARDB platform
and QSPI boot using esbc_validate command. Add images validation
in default environment under mcinitcmd prior to MC initialization.
Adds header address for PPA to be validated during ESBC phase for
ARCH_LS2088 and QSPI_BOOT.
Moves sec_init prior to ppa_init as for validation of PPA sec must
be initialised before the PPA is initialised.
Signed-off-by: Udit Agarwal <udit.agarwal at nxp.com>
---
https://patchwork.ozlabs.org/patch/756222/
https://patchwork.ozlabs.org/patch/756221/
https://patchwork.ozlabs.org/patch/756250/
arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 1 +
board/freescale/ls2080aqds/ls2080aqds.c | 2 +-
board/freescale/ls2080ardb/ls2080ardb.c | 7 ++++---
include/configs/ls2080ardb.h | 22 ++++++++++++++++++++++
4 files changed, 28 insertions(+), 4 deletions(-)
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
index 57660e8..8b39e00 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
+++ b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
@@ -216,6 +216,7 @@ config SYS_LS_PPA_ESBC_ADDR
default 0x40680000 if SYS_LS_PPA_FW_IN_XIP && ARCH_LS1046A
default 0x40680000 if SYS_LS_PPA_FW_IN_XIP && ARCH_LS1012A
default 0x20680000 if SYS_LS_PPA_FW_IN_XIP && ARCH_LS1088A
+ default 0x20680000 if SYS_LS_PPA_FW_IN_XIP && QSPI_BOOT && ARCH_LS2080A
default 0x580680000 if SYS_LS_PPA_FW_IN_XIP && ARCH_LS2080A
default 0x680000 if SYS_LS_PPA_FW_IN_MMC
default 0x680000 if SYS_LS_PPA_FW_IN_NAND
diff --git a/board/freescale/ls2080aqds/ls2080aqds.c b/board/freescale/ls2080aqds/ls2080aqds.c
index ba3347b..00f4bb1 100644
--- a/board/freescale/ls2080aqds/ls2080aqds.c
+++ b/board/freescale/ls2080aqds/ls2080aqds.c
@@ -229,7 +229,7 @@ int board_init(void)
select_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT);
rtc_enable_32khz_output();
#ifdef CONFIG_FSL_CAAM
- sec_init();
+ sec_init();
#endif
#ifdef CONFIG_FSL_LS_PPA
diff --git a/board/freescale/ls2080ardb/ls2080ardb.c b/board/freescale/ls2080ardb/ls2080ardb.c
index edb6b33..c25f8ab 100644
--- a/board/freescale/ls2080ardb/ls2080ardb.c
+++ b/board/freescale/ls2080ardb/ls2080ardb.c
@@ -233,6 +233,10 @@ int board_init(void)
#ifdef CONFIG_FSL_QIXIS
QIXIS_WRITE(rst_ctl, QIXIS_RST_CTL_RESET_EN);
#endif
+
+#ifdef CONFIG_FSL_CAAM
+ sec_init();
+#endif
#ifdef CONFIG_FSL_LS_PPA
ppa_init();
#endif
@@ -241,9 +245,6 @@ int board_init(void)
/* invert AQR405 IRQ pins polarity */
out_le32(irq_ccsr + IRQCR_OFFSET / 4, AQR405_IRQ_MASK);
#endif
-#ifdef CONFIG_FSL_CAAM
- sec_init();
-#endif
return 0;
}
diff --git a/include/configs/ls2080ardb.h b/include/configs/ls2080ardb.h
index 711241a..5a1d516 100644
--- a/include/configs/ls2080ardb.h
+++ b/include/configs/ls2080ardb.h
@@ -366,6 +366,27 @@ unsigned long get_board_sys_clk(void);
/* Initial environment variables */
#undef CONFIG_EXTRA_ENV_SETTINGS
#ifdef CONFIG_SECURE_BOOT
+#ifdef CONFIG_QSPI_BOOT
+#define CONFIG_EXTRA_ENV_SETTINGS \
+ "hwconfig=fsl_ddr:bank_intlv=auto\0" \
+ "scriptaddr=0x80800000\0" \
+ "kernel_addr_r=0x81000000\0" \
+ "pxefile_addr_r=0x81000000\0" \
+ "fdt_addr_r=0x88000000\0" \
+ "ramdisk_addr_r=0x89000000\0" \
+ "loadaddr=0x80100000\0" \
+ "kernel_addr=0x100000\0" \
+ "ramdisk_size=0x2000000\0" \
+ "fdt_high=0xa0000000\0" \
+ "initrd_high=0xffffffffffffffff\0" \
+ "kernel_start=0x21000000\0" \
+ "mcmemsize=0x40000000\0" \
+ "mcinitcmd=esbc_validate 0x20700000;" \
+ "esbc_validate 0x20740000;" \
+ "fsl_mc start mc 0x20a00000" \
+ " 0x20e00000 \0" \
+ BOOTENV
+#else /* !(CONFIG_QSPI_BOOT) */
#define CONFIG_EXTRA_ENV_SETTINGS \
"hwconfig=fsl_ddr:bank_intlv=auto\0" \
"scriptaddr=0x80800000\0" \
@@ -389,6 +410,7 @@ unsigned long get_board_sys_clk(void);
"fsl_mc start mc 0x580300000" \
" 0x580800000 \0" \
BOOTENV
+#endif
#else
#ifdef CONFIG_QSPI_BOOT
#define CONFIG_EXTRA_ENV_SETTINGS \
--
1.9.1
More information about the U-Boot
mailing list