Skip to contentSkip to conversation

SECURE_BOOT: Unify memory map for Layerscape based platforms

PATCH New Sumit Garg 2 participants 6 messages Aug 16, 2017 – Sep 13, 2017 Arm (32-bit)

lore
Share & tools
lore

Sumit Garg

author
#0 lore raw

PATCH v3 1/3 SECURE_BOOT: Unify memory map for Layerscape based platforms

Unify memory map for Layerscape based platforms. This patch includes changes in bootscript, bootscript header and PPA header addresses change as per unified memory map.

---

Changes in v3:
Rebasing of the patch on top commit.
This patch supersedes https://patchwork.ozlabs.org/patch/756260/

 arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 12 +++----
 arch/arm/include/asm/fsl_secure_boot.h    | 54 +++++++++++++------------------
 2 files changed, 28 insertions(+), 38 deletions(-)
arch/arm/cpu/armv8/fsl-layerscape/Kconfig +6 -6
index 5825f9b..b7549a0 100644
@@ -194,12 +194,12 @@ config SYS_LS_PPA_FW_ADDR
 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 0x40740000 if SYS_LS_PPA_FW_IN_XIP && ARCH_LS1046A
-	default 0x40480000 if SYS_LS_PPA_FW_IN_XIP && ARCH_LS1012A
-	default 0x580c40000 if SYS_LS_PPA_FW_IN_XIP && FSL_LSCH3
-	default 0x700000 if SYS_LS_PPA_FW_IN_MMC
-	default 0x700000 if SYS_LS_PPA_FW_IN_NAND
+	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 0x680000 if SYS_LS_PPA_FW_IN_MMC
+	default 0x680000 if SYS_LS_PPA_FW_IN_NAND
 	help
 	  If the PPA header firmware locate at XIP flash, such as NOR or
 	  QSPI flash, this address is a directly memory-mapped.
arch/arm/include/asm/fsl_secure_boot.h +22 -32

82 lines not on this page · raw message

Signature · 1 line
1.9.1
author
#1 lore raw

PATCH v3 2/3 LS2080ARDB: QSPI boot: Secure Boot image validation

From: Udit Agarwal <[email protected]>

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.

---

Changes in v3:
Rebasing of the patches on the top commit and removes conflict on CONFIG_EXTRA_ENV_SETTINGS.
This patch supersedes https://patchwork.ozlabs.org/patch/767679/

 arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 3 ++-
 arch/arm/include/asm/fsl_secure_boot.h    | 5 +++++
 board/freescale/ls2080aqds/ls2080aqds.c   | 7 +++----
 board/freescale/ls2080ardb/ls2080ardb.c   | 4 ++++
 4 files changed, 14 insertions(+), 5 deletions(-)
arch/arm/cpu/armv8/fsl-layerscape/Kconfig +2 -1
index b7549a0..f14b1c8 100644
@@ -197,7 +197,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
arch/arm/include/asm/fsl_secure_boot.h +5 -0
index 63845a2..ec6463d 100644
@@ -72,8 +72,13 @@
  * 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
board/freescale/ls2080aqds/ls2080aqds.c +3 -4
index f36fb98..be4e8ee 100644
@@ -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;
 }
 
board/freescale/ls2080ardb/ls2080ardb.c +4 -0
index df2d768..4c42c73 100644
@@ -231,6 +231,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
Signature · 1 line
1.9.1
#2 lore raw

PATCH v3 2/3 LS2080ARDB: QSPI boot: Secure Boot image validation

Quoted 8 lines · Sumit Garg

From: Udit Agarwal <[email protected]>

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.

Quoted 8 lines

---

Changes in v3:
Rebasing of the patches on the top commit and removes conflict on CONFIG_EXTRA_ENV_SETTINGS.
This patch supersedes https://patchwork.ozlabs.org/patch/767679/

Slightly revised commit message. Applied to fsl-qoriq master. Thanks.

York

author
#3 lore raw

PATCH v3 3/3 LS2080ARDB: Secure Boot defconfig for QSPI boot.

In reply to Sumit Garg

From: Udit Agarwal <[email protected]>

Add the secure boot defconfig for QSPI boot on LS2088ARDB platform.

---

Changes in v3:
Rebasing of the patch on top commit.
This patch supersedes https://patchwork.ozlabs.org/patch/767680/

 board/freescale/ls2080ardb/MAINTAINERS        |  5 +++
 configs/ls2088ardb_qspi_SECURE_BOOT_defconfig | 48 +++++++++++++++++++++++++++
 2 files changed, 53 insertions(+)
 create mode 100644 configs/ls2088ardb_qspi_SECURE_BOOT_defconfig
board/freescale/ls2080ardb/MAINTAINERS +5 -0
index 91f13ea..8da1c6d 100644
@@ -21,3 +21,8 @@ LS2080A_SECURE_BOOT BOARD
 M:	Saksham Jain <[email protected]>
 S:	Maintained
 F:	configs/ls2080ardb_SECURE_BOOT_defconfig
+
+LS2088A_QSPI_SECURE_BOOT BOARD
+M:	Udit Agarwal <[email protected]>
+S:	Maintained
+F:	configs/ls2088ardb_qspi_SECURE_BOOT_defconfig
configs/ls2088ardb_qspi_SECURE_BOOT_defconfig new file +48 -0

48 lines not on this page · raw message

Signature · 1 line
1.9.1
Applied
#5 lore raw

PATCH v3 1/3 SECURE_BOOT: Unify memory map for Layerscape based platforms

In reply to Sumit Garg
Quoted 4 lines · Sumit Garg

Unify memory map for Layerscape based platforms. This patch includes changes in bootscript, bootscript header and PPA header addresses change as per unified memory map.

Quoted 8 lines

---

Changes in v3:
Rebasing of the patch on top commit.
This patch supersedes https://patchwork.ozlabs.org/patch/756260/

Applied to fsl-qoriq master. Thanks.

York