]> git.sur5r.net Git - u-boot/commitdiff
armv8: fsl-layerscape: SECURE BOOT: Add header address of PPA in kconfig
authorVinitha Pillai-B57223 <vinitha.pillai@nxp.com>
Thu, 23 Mar 2017 08:18:14 +0000 (13:48 +0530)
committerYork Sun <york.sun@nxp.com>
Mon, 17 Apr 2017 16:03:30 +0000 (09:03 -0700)
The header address of PPA defined in Kconfig.

Signed-off-by: Vinitha Pillai <vinitha.pillai@nxp.com>
Signed-off-by: Sumit Garg <sumit.garg@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
arch/arm/cpu/armv8/fsl-layerscape/Kconfig
arch/arm/cpu/armv8/fsl-layerscape/ppa.c
arch/arm/include/asm/fsl_secure_boot.h

index b24462bede9dec9bfb5c89b7d46fec609331f41a..d587ed3c93ef716205aae0ca6ddd5fb4da5af651 100644 (file)
@@ -171,6 +171,18 @@ config SYS_LS_PPA_FW_ADDR
          QSPI flash, this address is a directly memory-mapped.
          If it is in a serial accessed flash, such as NAND and SD
          card, it is a byte offset.
+
+config SYS_LS_PPA_ESBC_ADDR
+       hex "hdr address of PPA firmware loading from"
+       depends on FSL_LS_PPA && CHAIN_OF_TRUST
+       default 0x600c0000 if SYS_LS_PPA_FW_IN_XIP && ARCH_LS1043A
+       default 0x580c40000 if SYS_LS_PPA_FW_IN_XIP && FSL_LSCH3
+       help
+         If the PPA header firmware locate at XIP flash, such as NOR or
+         QSPI flash, this address is a directly memory-mapped.
+         If it is in a serial accessed flash, such as NAND and SD
+         card, it is a byte offset.
+
 endmenu
 
 config SYS_FSL_ERRATUM_A010315
index b35ad5fb6f07f89d24fe0abe92337d071d250721..7f87bb868971e5bd633ac4fac3acbf6b07fa5903 100644 (file)
@@ -178,7 +178,7 @@ int ppa_init(void)
        ppa_img_addr = (uintptr_t)ppa_fit_addr;
        if (fsl_check_boot_mode_secure() != 0) {
                ret = fsl_secboot_validate(ppa_esbc_hdr,
-                                          CONFIG_PPA_KEY_HASH,
+                                          PPA_KEY_HASH,
                                           &ppa_img_addr);
                if (ret != 0)
                        printf("PPA validation failed\n");
index d98a1e8f89d7eb2f537fc6a2d6620f80c473c7ba..4c36f9dc5e86dfe1b7d3b6f405367bb420255a04 100644 (file)
 #endif
 
 #ifdef CONFIG_FSL_LS_PPA
-#ifdef CONFIG_SYS_LS_PPA_FW_IN_XIP
-#ifdef CONFIG_LS1043A
-#define CONFIG_SYS_LS_PPA_ESBC_ADDR    0x600c0000
-#elif defined(CONFIG_FSL_LSCH3)
-#define CONFIG_SYS_LS_PPA_ESBC_ADDR     0x580c40000
-#endif
-#else
-#error "No CONFIG_SYS_LS_PPA_FW_IN_xxx defined"
-#endif /* ifdef CONFIG_SYS_LS_PPA_FW_IN_XIP */
-
 /* Define the key hash here if SRK used for signing PPA image is
  * different from SRK hash put in SFP used for U-Boot.
  * Example
- * #define CONFIG_PPA_KEY_HASH \
+ * #define PPA_KEY_HASH \
  *     "41066b564c6ffcef40ccbc1e0a5d0d519604000c785d97bbefd25e4d288d1c8b"
  */
-#define CONFIG_PPA_KEY_HASH            NULL
+#define PPA_KEY_HASH           NULL
 #endif /* ifdef CONFIG_FSL_LS_PPA */
 
 #include <config_fsl_chain_trust.h>