LS2080ARDB: QSPI boot: Secure Boot image validation
authorUdit Agarwal <udit.agarwal@nxp.com>
Wed, 16 Aug 2017 11:13:29 +0000 (07:13 -0400)
committerYork Sun <york.sun@nxp.com>
Mon, 11 Sep 2017 14:55:36 +0000 (07:55 -0700)
Adds header address for PPA to be validated during ESBC phase for
ARCH_LS2088 and QSPI_BOOT. Moves sec_init prior to ppa_init(). It
must be initialized before the PPA.

Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
[YS: revised commit message]
Reviewed-by: York Sun <york.sun@nxp.com>
arch/arm/cpu/armv8/fsl-layerscape/Kconfig
arch/arm/include/asm/fsl_secure_boot.h
board/freescale/ls2080aqds/ls2080aqds.c
board/freescale/ls2080ardb/ls2080ardb.c

index a77a68d84e4636f15abd3249eeb30c3a72302030..cdadd38a1242dcb7b7158de4f7773e822432711d 100644 (file)
@@ -199,7 +199,8 @@ config SYS_LS_PPA_ESBC_ADDR
        default 0x60680000 if SYS_LS_PPA_FW_IN_XIP && ARCH_LS1043A
        default 0x40680000 if SYS_LS_PPA_FW_IN_XIP && ARCH_LS1046A
        default 0x40680000 if SYS_LS_PPA_FW_IN_XIP && ARCH_LS1012A
-       default 0x580680000 if SYS_LS_PPA_FW_IN_XIP && FSL_LSCH3
+       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
        help
index 63845a2460e58d672cd56d861cc72cab8ef7830d..ec6463dbb86c0e4cda097aed4e4120424f5a9be8 100644 (file)
  * DDR memory map
  */
 #ifdef CONFIG_FSL_LSCH3
+#ifdef CONFIG_QSPI_BOOT
+#define CONFIG_BS_ADDR_DEVICE          0x20600000
+#define CONFIG_BS_HDR_ADDR_DEVICE      0x20640000
+#else /* NOR BOOT */
 #define CONFIG_BS_ADDR_DEVICE          0x580600000
 #define CONFIG_BS_HDR_ADDR_DEVICE      0x580640000
+#endif /*ifdef CONFIG_QSPI_BOOT */
 #define CONFIG_BS_SIZE                 0x00001000
 #define CONFIG_BS_HDR_SIZE             0x00004000
 #define CONFIG_BS_ADDR_RAM             0xa0600000
index 83773d0af5dd1b07f832eba250bf12575836fa2f..1842d14e87e674e65a66ae03c1014ce4f2913974 100644 (file)
@@ -226,15 +226,14 @@ int board_init(void)
 #endif
        select_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT);
        rtc_enable_32khz_output();
+#ifdef CONFIG_FSL_CAAM
+       sec_init();
+#endif
 
 #ifdef CONFIG_FSL_LS_PPA
        ppa_init();
 #endif
 
-#ifdef CONFIG_FSL_CAAM
-       sec_init();
-#endif
-
        return 0;
 }
 
index 07ba0266d57cc64fe761dd488de05b56ea753f49..666562d106b178a16acc1499470f5eb38bd3b72d 100644 (file)
@@ -218,6 +218,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