LS2080ARDB: Secure Boot defconfig for QSPI boot.
PATCH 1/3 LS2080ARDB: Secure Boot defconfig for QSPI boot.
Add the secure boot defconfig for QSPI boot on LS2088ARDB platform.
---
https://patchwork.ozlabs.org/patch/756222/
https://patchwork.ozlabs.org/patch/756221/
https://patchwork.ozlabs.org/patch/756250/
configs/ls2088ardb_qspi_SECURE_BOOT_defconfig | 50 +++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 configs/ls2088ardb_qspi_SECURE_BOOT_defconfig
configs/ls2088ardb_qspi_SECURE_BOOT_defconfig new file +50 -0
@@ -0,0 +1,50 @@ +CONFIG_ARM=y +CONFIG_TARGET_LS2080ARDB=y +CONFIG_SECURE_BOOT=y +CONFIG_FSL_LS_PPA=y +CONFIG_QSPI_AHB_INIT=y +CONFIG_DEFAULT_DEVICE_TREE="fsl-ls2088a-rdb-qspi" +# CONFIG_SYS_MALLOC_F is not set +CONFIG_FIT_VERBOSE=y +CONFIG_OF_BOARD_SETUP=y +CONFIG_OF_STDOUT_VIA_ALIAS=y +CONFIG_SYS_EXTRA_OPTIONS="LS2080A" +CONFIG_QSPI_BOOT=y +CONFIG_BOOTDELAY=10 +CONFIG_CMD_GREPENV=y +# CONFIG_CMD_IMLS is not set +CONFIG_CMD_GPT=y +CONFIG_CMD_MMC=y +CONFIG_CMD_SF=y +CONFIG_CMD_I2C=y +CONFIG_CMD_DHCP=y +CONFIG_CMD_MII=y +CONFIG_CMD_PING=y +CONFIG_CMD_CACHE=y +CONFIG_CMD_EXT2=y +CONFIG_CMD_FAT=y +CONFIG_OF_CONTROL=y +CONFIG_NET_RANDOM_ETHADDR=y +CONFIG_DM=y +CONFIG_FSL_CAAM=y +CONFIG_DM_SPI_FLASH=y +CONFIG_NETDEVICES=y +CONFIG_E1000=y +CONFIG_PCI=y +CONFIG_DM_PCI=y +CONFIG_DM_PCI_COMPAT=y +CONFIG_PCIE_LAYERSCAPE=y +CONFIG_SYS_NS16550=y +CONFIG_DM_SPI=y +CONFIG_FSL_QSPI=y +CONFIG_FSL_DSPI=y +CONFIG_CMD_USB=y +CONFIG_RSA=y +CONFIG_RSA_SOFTWARE_EXP=y +# CONFIG_CMD_SETEXPR is not set +CONFIG_USB=y +CONFIG_DM_USB=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_XHCI_DWC3=y +CONFIG_USB_STORAGE=y +CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
Signature · 1 line
1.9.1
PATCH 2/3 LS2080ARDB: QSPI boot: Secure Boot image validation
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.
---
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(-)
arch/arm/cpu/armv8/fsl-layerscape/Kconfig +1 -0
@@ -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
board/freescale/ls2080aqds/ls2080aqds.c +1 -1
@@ -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
board/freescale/ls2080ardb/ls2080ardb.c +4 -3
@@ -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 ; }
include/configs/ls2080ardb.h +22 -0
@@ -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 \
Signature · 1 line
1.9.1
PATCH 3/3 LS2080A: Adjust memory map for secure boot headers for NOR-boot
In reply to Udit AgarwalThis patch adjusts memory map for secure boot headers on LS2080AQDS and LS2080ARDB platforms.
Secure boot headers are placed on NOR flash at offset 0x00600000.
---
https://patchwork.ozlabs.org/patch/756222/
https://patchwork.ozlabs.org/patch/756221/
https://patchwork.ozlabs.org/patch/756250/
board/freescale/ls2080aqds/README | 1 + board/freescale/ls2080ardb/README | 1 + include/configs/ls2080aqds.h | 10 +++++----- include/configs/ls2080ardb.h | 10 +++++----- 4 files changed, 12 insertions(+), 10 deletions(-)
board/freescale/ls2080aqds/README +1 -0
@@ -96,6 +96,7 @@ RCW+PBI 0x00000000 Boot firmware (U-Boot) 0x00100000 Boot firmware Environment 0x00300000 PPA firmware 0x00400000 +Secure Headers 0x00600000 DPAA2 MC 0x00A00000 DPAA2 DPL 0x00D00000 DPAA2 DPC 0x00E00000
board/freescale/ls2080ardb/README +1 -0
@@ -92,6 +92,7 @@ RCW+PBI 0x00000000 Boot firmware (U-Boot) 0x00100000 Boot firmware Environment 0x00300000 PPA firmware 0x00400000 +Secure Headers 0x00600000 Cortina PHY firmware 0x00980000 DPAA2 MC 0x00A00000 DPAA2 DPL 0x00D00000
include/configs/ls2080aqds.h +5 -5
@@ -369,14 +369,14 @@ unsigned long get_board_ddr_clk(void);"ramdisk_size=0x2000000\0" \"fdt_high=0xa0000000\0" \"initrd_high=0xffffffffffffffff\0" \ -"kernel_start=0x581100000\0" \ +"kernel_start=0x581000000\0" \"kernel_load=0xa0000000\0" \"kernel_size=0x2800000\0" \"mcmemsize=0x40000000\0" \ -"mcinitcmd=esbc_validate 0x580c80000;" \ -"esbc_validate 0x580cc0000;" \ -"fsl_mc start mc 0x580300000" \ - " 0x580800000 \0" +"mcinitcmd=esbc_validate 0x580700000;" \ +"esbc_validate 0x580740000;" \ +"fsl_mc start mc 0x580a00000" \ + " 0x580e00000 \0"#else #define CONFIG_EXTRA_ENV_SETTINGS \ "hwconfig=fsl_ddr:bank_intlv=auto\0" \
include/configs/ls2080ardb.h +5 -5
@@ -400,15 +400,15 @@ unsigned long get_board_sys_clk(void);"ramdisk_size=0x2000000\0" \"fdt_high=0xa0000000\0" \"initrd_high=0xffffffffffffffff\0" \ -"kernel_start=0x581100000\0" \ +"kernel_start=0x581000000\0" \"kernel_load=0xa0000000\0" \"kernel_size=0x2800000\0" \"mcmemsize=0x40000000\0" \"fdtfile=fsl-ls2080a-rdb.dtb\0" \ -"mcinitcmd=esbc_validate 0x580c80000;" \ -"esbc_validate 0x580cc0000;" \ -"fsl_mc start mc 0x580300000" \ -" 0x580800000 \0" \ +"mcinitcmd=esbc_validate 0x580700000;" \ +"esbc_validate 0x580740000;" \ +"fsl_mc start mc 0x580a00000" \ +" 0x580e00000 \0" \ BOOTENV#endif #else
Signature · 1 line
1.9.1
PATCH 1/3 LS2080ARDB: Secure Boot defconfig for QSPI boot.
In reply to Udit AgarwalQuoted 20 lines · Udit Agarwal
Add the secure boot defconfig for QSPI boot on LS2088ARDB platform.
Signed-off-by Udit Agarwal <[email protected]>---
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchwork.ozlabs.org%2Fpatch%2F756222%2F&data=01%7C01%7Cyork.sun%40nxp.com%7Cbb4048d4e8f54f7a92f108d49154f10c%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0&sdata=Y%2BHozPqSb6MSs9t3rUXi%2FLbDJ3Yups0eSk876rv2VPE%3D&reserved=0
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchwork.ozlabs.org%2Fpatch%2F756221%2F&data=01%7C01%7Cyork.sun%40nxp.com%7Cbb4048d4e8f54f7a92f108d49154f10c%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0&sdata=vGcpFar3OLsspPz7%2FWlHz45NE2u%2BDuqDriVs%2FTnFrf8%3D&reserved=0
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchwork.ozlabs.org%2Fpatch%2F756250%2F&data=01%7C01%7Cyork.sun%40nxp.com%7Cbb4048d4e8f54f7a92f108d49154f10c%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0&sdata=mmux45TOPLFMRxdP3MdD8a%2FGpQABsulOM%2BJiFMNd3%2FY%3D&reserved=0configs/ls2088ardb_qspi_SECURE_BOOT_defconfig | 50 +++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 configs/ls2088ardb_qspi_SECURE_BOOT_defconfigconfigs/ls2088ardb_qspi_SECURE_BOOT_defconfig new file +1
-0@@ -0,0 +1,50 @@ +CONFIG_ARM=y
configs/ls2088ardb_qspi_SECURE_BOOT_defconfig line 11
Quoted 10 lines
configs/ls2088ardb_qspi_SECURE_BOOT_defconfig new file +10
-0+CONFIG_TARGET_LS2080ARDB=y +CONFIG_SECURE_BOOT=y +CONFIG_FSL_LS_PPA=y +CONFIG_QSPI_AHB_INIT=y +CONFIG_DEFAULT_DEVICE_TREE="fsl-ls2088a-rdb-qspi" +# CONFIG_SYS_MALLOC_F is not set +CONFIG_FIT_VERBOSE=y +CONFIG_OF_BOARD_SETUP=y +CONFIG_OF_STDOUT_VIA_ALIAS=y +CONFIG_SYS_EXTRA_OPTIONS="LS2080A"
This is not needed, and not allowed. Please fix. Make sure you test your patches on the top of latest upstream master branch.
York
PATCH 1/3 LS2080ARDB: Secure Boot defconfig for QSPI boot.
Quoted 26 lines · york sun
Quoted 25 lines · Udit Agarwal
Add the secure boot defconfig for QSPI boot on LS2088ARDB platform.
Signed-off-by Udit Agarwal <[email protected]>---
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchwork.ozlabs.org%2Fpatch%2F756222%2F&data=01%7C01%7Cyork.sun%40nxp.com%7Cbb4048d4e8f54f7a92f108d49154f10c%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0&sdata=Y%2BHozPqSb6MSs9t3rUXi%2FLbDJ3Yups0eSk876rv2VPE%3D&reserved=0
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchwork.ozlabs.org%2Fpatch%2F756221%2F&data=01%7C01%7Cyork.sun%40nxp.com%7Cbb4048d4e8f54f7a92f108d49154f10c%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0&sdata=vGcpFar3OLsspPz7%2FWlHz45NE2u%2BDuqDriVs%2FTnFrf8%3D&reserved=0
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchwork.ozlabs.org%2Fpatch%2F756250%2F&data=01%7C01%7Cyork.sun%40nxp.com%7Cbb4048d4e8f54f7a92f108d49154f10c%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0&sdata=mmux45TOPLFMRxdP3MdD8a%2FGpQABsulOM%2BJiFMNd3%2FY%3D&reserved=0configs/ls2088ardb_qspi_SECURE_BOOT_defconfig | 50 +++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 configs/ls2088ardb_qspi_SECURE_BOOT_defconfigconfigs/ls2088ardb_qspi_SECURE_BOOT_defconfig new file +6
-0@@ -0,0 +1,50 @@ +CONFIG_ARM=y +CONFIG_TARGET_LS2080ARDB=y +CONFIG_SECURE_BOOT=y +CONFIG_FSL_LS_PPA=y +CONFIG_QSPI_AHB_INIT=y +CONFIG_DEFAULT_DEVICE_TREE="fsl-ls2088a-rdb-qspi"
Quoted 9 lines
configs/ls2088ardb_qspi_SECURE_BOOT_defconfig line 11
Quoted 5 lines
configs/ls2088ardb_qspi_SECURE_BOOT_defconfig new file +5
-0+# CONFIG_SYS_MALLOC_F is not set +CONFIG_FIT_VERBOSE=y +CONFIG_OF_BOARD_SETUP=y +CONFIG_OF_STDOUT_VIA_ALIAS=y +CONFIG_SYS_EXTRA_OPTIONS="LS2080A"This is not needed, and not allowed. Please fix. Make sure you test your patches on the top of latest upstream master branch.
Please also update the MAINTAINER file when you respin this patch.
York
PATCH 2/3 LS2080ARDB: QSPI boot: Secure Boot image validation
In reply to Udit AgarwalQuoted 16 lines · Udit Agarwal
Validates the images in the ESBC phase for LS2088ARDB platform and QSPI boot using
esbc_validatecommand. 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_LS2088andQSPI_BOOT.Moves
sec_initprior toppa_initas for validation of PPA sec must be initialised before the PPA is initialised.Signed-off-by Udit Agarwal <[email protected]>---
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchwork.ozlabs.org%2Fpatch%2F756222%2F&data=01%7C01%7Cyork.sun%40nxp.com%7Cefbc55c412914cf4faf808d49154fc09%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0&sdata=%2FeexbUyXknE0uXMdkcdC3tUEcvGo0YS2EENAaUo9%2BhA%3D&reserved=0
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchwork.ozlabs.org%2Fpatch%2F756221%2F&data=01%7C01%7Cyork.sun%40nxp.com%7Cefbc55c412914cf4faf808d49154fc09%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0&sdata=nYyB0OSlm2IYaFUjG9TPf%2BVgth5ElzRl4ZIi8TKNqV0%3D&reserved=0
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchwork.ozlabs.org%2Fpatch%2F756250%2F&data=01%7C01%7Cyork.sun%40nxp.com%7Cefbc55c412914cf4faf808d49154fc09%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0&sdata=9boHaBRQFKflABEDX6KRGO478gAC3AfjdZvtVOYGJco%3D&reserved=0
Quoted 5 lines
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(-)
Shouldn't you put this patch before patch 1/3 in this set? You would need this patch to have secure boot working, wouldn't you?
York
york sun
AppliedPATCH 3/3 LS2080A: Adjust memory map for secure boot headers for NOR-boot
In reply to Udit AgarwalQuoted 11 lines · Udit Agarwal
This patch adjusts memory map for secure boot headers on LS2080AQDS and LS2080ARDB platforms.
Secure boot headers are placed on NOR flash at offset
0x00600000.Signed-off-by Udit Agarwal <[email protected]>---
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchwork.ozlabs.org%2Fpatch%2F756222%2F&data=01%7C01%7Cyork.sun%40nxp.com%7C4e232d5f8dc840678c6508d49154fc6e%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0&sdata=%2F24KZSQmFPgDKMXGn%2FFN1proLxz5jJb0PwBJUa4PbXc%3D&reserved=0
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchwork.ozlabs.org%2Fpatch%2F756221%2F&data=01%7C01%7Cyork.sun%40nxp.com%7C4e232d5f8dc840678c6508d49154fc6e%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0&sdata=KYe3oxt56jKRG3FqIuB%2BVeR59cYj7TEJdHPt%2F1pZLfI%3D&reserved=0
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchwork.ozlabs.org%2Fpatch%2F756250%2F&data=01%7C01%7Cyork.sun%40nxp.com%7C4e232d5f8dc840678c6508d49154fc6e%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0&sdata=4crHHfSCgpHTj3n%2BmyVhyb53ioD5WkQNue4c1wmaDnY%3D&reserved=0
Quoted 6 lines
board/freescale/ls2080aqds/README | 1 + board/freescale/ls2080ardb/README | 1 + include/configs/ls2080aqds.h | 10 +++++----- include/configs/ls2080ardb.h | 10 +++++----- 4 files changed, 12 insertions(+), 10 deletions(-)
Applied to fsl-qoriq master, awaiting upstream. Thanks.
York