LS1088A_QSPI: SECURE_BOOT: Images validation
PATCH v3 1/2 LS1088A_QSPI: SECURE_BOOT: Images validation
Validates PPA, MC, DPC, Bootscript, DPL and Kernel images in ESBC phase using esbc_validate command. Add images validation in default environment under mcinitcmd prior to MC initialization.
Add header address for PPA to be validated during ESBC phase for LS1088A platform based on LAyerscape Chasis 3.
Moves sec_init prior to ppa_init as for validation of PPA sec must be initialised before the PPA is initialised.
---
Changes in v3:
Removes CONFIG_FSL_CAAM. Will be enabled via defconfig.
arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 1 + board/freescale/ls1088a/Kconfig | 2 ++ board/freescale/ls1088a/ls1088a.c | 6 +++--- include/configs/ls1088a_common.h | 3 --- include/configs/ls1088aqds.h | 21 +++++++++++++++++++++ include/configs/ls1088ardb.h | 22 +++++++++++++++++++++- 6 files changed, 48 insertions(+), 7 deletions(-)
arch/arm/cpu/armv8/fsl-layerscape/Kconfig +1 -0
@@ -242,6 +242,7 @@ config SYS_LS_PPA_ESBC_ADDR default 0x40680000 if SYS_LS_PPA_FW_IN_XIP && ARCH_LS1012A 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 0x20680000 if SYS_LS_PPA_FW_IN_XIP && ARCH_LS1088A default 0x680000 if SYS_LS_PPA_FW_IN_MMC default 0x680000 if SYS_LS_PPA_FW_IN_NAND help
board/freescale/ls1088a/Kconfig +2 -0
@@ -12,6 +12,7 @@ config SYS_SOC config SYS_CONFIG_NAME default "ls1088aqds" +source "board/freescale/common/Kconfig" endif if TARGET_LS1088ARDB
@@ -28,4 +29,5 @@ config SYS_SOC config SYS_CONFIG_NAME default "ls1088ardb" +source "board/freescale/common/Kconfig" endif
board/freescale/ls1088a/ls1088a.c +3 -3
@@ -315,6 +315,9 @@ int board_init(void)out_le32 (irq_ccsr +IRQCR_OFFSET /4 ,AQR105_IRQ_MASK );#endif +#ifdef CONFIG_FSL_CAAM +sec_init (); +#endif #ifdef CONFIG_FSL_LS_PPA ppa_init ();#endif
@@ -337,9 +340,6 @@ void detail_board_ddr_info(void)#if defined(CONFIG_ARCH_MISC_INIT )int arch_misc_init (void ) { -#ifdef CONFIG_FSL_CAAM -sec_init (); -#endif return 0 ; }#endif
include/configs/ls1088a_common.h +0 -3
@@ -132,9 +132,6 @@ unsigned long long get_qixis_addr(void);#if defined(CONFIG_FSL_MC_ENET )#define CONFIG_SYS_LS_MC_DRAM_BLOCK_MIN_SIZE (512UL * 1024 * 1024)#endif - -#define CONFIG_FSL_CAAM /* Enable SEC/CAAM */ -/* Command line configuration */ #define CONFIG_CMD_GREPENV #define CONFIG_CMD_CACHE
include/configs/ls1088aqds.h +21 -0
@@ -329,6 +329,26 @@ unsigned long get_board_ddr_clk(void); QIXIS_SDID_MASK) != QIXIS_ESDHC_NO_ADAPTER)/* Initial environment variables */ +#ifdef CONFIG_SECURE_BOOT +#undef CONFIG_EXTRA_ENV_SETTINGS +#define CONFIG_EXTRA_ENV_SETTINGS \ + "hwconfig=fsl_ddr:bank_intlv=auto\0" \ + "loadaddr=0x90100000\0" \ + "kernel_addr=0x100000\0" \ + "ramdisk_addr=0x800000\0" \ + "ramdisk_size=0x2000000\0" \ + "fdt_high=0xa0000000\0" \ + "initrd_high=0xffffffffffffffff\0" \ + "kernel_start=0x1000000\0" \ + "kernel_load=0xa0000000\0" \ + "kernel_size=0x2800000\0" \ + "mcinitcmd=sf probe 0:0;sf read 0xa0a00000 0xa00000 0x100000;" \ + "sf read 0xa0700000 0x700000 0x4000; esbc_validate 0xa0700000;" \ + "sf read 0xa0e00000 0xe00000 0x100000;" \ + "sf read 0xa0740000 0x740000 0x4000;esbc_validate 0xa0740000;" \ + "fsl_mc start mc 0xa0a00000 0xa0e00000\0" \ + "mcmemsize=0x70000000 \0" +#else /* if !(CONFIG_SECURE_BOOT) */ #if defined(CONFIG_QSPI_BOOT )#undef CONFIG_EXTRA_ENV_SETTINGS#define CONFIG_EXTRA_ENV_SETTINGS \
@@ -362,6 +382,7 @@ unsigned long get_board_ddr_clk(void);"mcinitcmd=fsl_mc start mc 0x580A00000 0x580E00000\0" \ "mcmemsize=0x70000000 \0"#endif +#endif /* CONFIG_SECURE_BOOT */ #ifdef CONFIG_FSL_MC_ENET #define CONFIG_FSL_MEMAC
include/configs/ls1088ardb.h +21 -1
@@ -251,6 +251,26 @@#define CONFIG_FSL_MEMAC /* Initial environment variables */ +#ifdef CONFIG_SECURE_BOOT +#undef CONFIG_EXTRA_ENV_SETTINGS +#define CONFIG_EXTRA_ENV_SETTINGS \ + "hwconfig=fsl_ddr:bank_intlv=auto\0" \ + "loadaddr=0x90100000\0" \ + "kernel_addr=0x100000\0" \ + "ramdisk_addr=0x800000\0" \ + "ramdisk_size=0x2000000\0" \ + "fdt_high=0xa0000000\0" \ + "initrd_high=0xffffffffffffffff\0" \ + "kernel_start=0x1000000\0" \ + "kernel_load=0xa0000000\0" \ + "kernel_size=0x2800000\0" \ + "mcinitcmd=sf probe 0:0;sf read 0xa0a00000 0xa00000 0x100000;" \ + "sf read 0xa0700000 0x700000 0x4000; esbc_validate 0xa0700000;" \ + "sf read 0xa0e00000 0xe00000 0x100000;" \ + "sf read 0xa0740000 0x740000 0x4000; esbc_validate 0xa0740000;" \ + "fsl_mc start mc 0xa0a00000 0xa0e00000\0" \ + "mcmemsize=0x70000000 \0" +#else /* if !(CONFIG_SECURE_BOOT) */ #if defined(CONFIG_QSPI_BOOT )#undef CONFIG_EXTRA_ENV_SETTINGS#define CONFIG_EXTRA_ENV_SETTINGS \
@@ -270,7 +290,7 @@ "mcmemsize=0x70000000 \0"#endif - +#endif /* CONFIG_SECURE_BOOT */ /* MAC/PHY configuration */ #ifdef CONFIG_FSL_MC_ENET #define CONFIG_PHYLIB_10G
Signature · 1 line
1.9.1
PATCH v3 2/2 LS1088A_QSPI: Add secure boot defconfigs for QSPI boot.
Add the secure boot defconfigs for QSPI boot on LS1088ARDB and LS1088AQDS platforms.
---
Changes in v3:
Keeping defconfig options in sorted manner.
board/freescale/ls1088a/MAINTAINERS | 10 ++++++++ configs/ls1088aqds_qspi_SECURE_BOOT_defconfig | 37 +++++++++++++++++++++++++++ configs/ls1088ardb_qspi_SECURE_BOOT_defconfig | 37 +++++++++++++++++++++++++++ 3 files changed, 84 insertions(+) create mode 100644 configs/ls1088aqds_qspi_SECURE_BOOT_defconfig create mode 100644 configs/ls1088ardb_qspi_SECURE_BOOT_defconfig
board/freescale/ls1088a/MAINTAINERS +10 -0
@@ -13,3 +13,13 @@ S: Maintained F: board/freescale/ls1088a/ F: include/configs/ls1088aqds.h F: configs/ls1088aqds_qspi_defconfig + +LS1088AQDS_QSPI_SECURE_BOOT BOARD +M: Udit Agarwal <[email protected]> +S: Maintained +F: configs/ls1088aqds_qspi_SECURE_BOOT_defconfig + +LS1088ARDB_QSPI_SECURE_BOOT BOARD +M: Udit Agarwal <[email protected]> +S: Maintained +F: configs/ls1088ardb_qspi_SECURE_BOOT_defconfig
configs/ls1088aqds_qspi_SECURE_BOOT_defconfig new file +37 -0
@@ -0,0 +1,37 @@ +CONFIG_ARM=y +# CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_DHCP=y +CONFIG_CMD_I2C=y +CONFIG_CMD_MMC=y +CONFIG_CMD_PING=y +CONFIG_CMD_SF=y +# CONFIG_SYS_MALLOC_F is not set +CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1088a-qds" +CONFIG_DM=y +CONFIG_DM_PCI=y +CONFIG_DM_PCI_COMPAT=y +CONFIG_DM_SPI=y +CONFIG_DM_SPI_FLASH=y +CONFIG_EFI_LOADER_BOUNCE_BUFFER=y +CONFIG_E1000=y +CONFIG_FIT=y +CONFIG_FIT_VERBOSE=y +CONFIG_FSL_CAAM=y +CONFIG_FSL_DSPI=y +CONFIG_FSL_LS_PPA=y +CONFIG_HUSH_PARSER=y +CONFIG_NETDEVICES=y +CONFIG_NET_RANDOM_ETHADDR=y +CONFIG_OF_BOARD_SETUP=y +CONFIG_OF_CONTROL=y +CONFIG_OF_STDOUT_VIA_ALIAS=y +CONFIG_PCI=y +CONFIG_PCIE_LAYERSCAPE=y +CONFIG_RSA=y +CONFIG_RSA_SOFTWARE_EXP=y +CONFIG_SECURE_BOOT=y +CONFIG_SPI_FLASH=y +CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4, QSPI_BOOT" +CONFIG_SYS_NS16550=y +CONFIG_TARGET_LS1088AQDS=y +# CONFIG_DISPLAY_BOARDINFO is not set
configs/ls1088ardb_qspi_SECURE_BOOT_defconfig new file +37 -0
@@ -0,0 +1,37 @@ +CONFIG_ARM=y +# CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_DHCP=y +CONFIG_CMD_I2C=y +CONFIG_CMD_MMC=y +CONFIG_CMD_PING=y +CONFIG_CMD_SF=y +# CONFIG_SYS_MALLOC_F is not set +CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1088a-rdb" +CONFIG_DM=y +CONFIG_DM_PCI=y +CONFIG_DM_PCI_COMPAT=y +CONFIG_DM_SPI=y +CONFIG_DM_SPI_FLASH=y +CONFIG_EFI_LOADER_BOUNCE_BUFFER=y +CONFIG_E1000=y +CONFIG_FIT=y +CONFIG_FIT_VERBOSE=y +CONFIG_FSL_CAAM=y +CONFIG_FSL_DSPI=y +CONFIG_FSL_LS_PPA=y +CONFIG_HUSH_PARSER=y +CONFIG_NETDEVICES=y +CONFIG_NET_RANDOM_ETHADDR=y +CONFIG_OF_BOARD_SETUP=y +CONFIG_OF_CONTROL=y +CONFIG_OF_STDOUT_VIA_ALIAS=y +CONFIG_PCI=y +CONFIG_PCIE_LAYERSCAPE=y +CONFIG_RSA=y +CONFIG_RSA_SOFTWARE_EXP=y +CONFIG_SECURE_BOOT=y +CONFIG_SPI_FLASH=y +CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4, QSPI_BOOT" +CONFIG_SYS_NS16550=y +CONFIG_TARGET_LS1088ARDB=y +# CONFIG_DISPLAY_BOARDINFO is not set
Signature · 1 line
1.9.1
PATCH v2 1/1 LS2080A_SECURE_BOOT: Enable CONFIG_FSL_LS_PPA.
In reply to Udit AgarwalAdds config CONFIG_FSL_LS_PPA and CONFIG_FSL_CAAM in LS2080AQDS and LS2080ARDB secure boot defconfig.
Removes CONFIG_FIT, as not required when CONFIG_FSL_LS_PPA is enabled.
Removes CONFIG_SPL_RSA as in QSPI boot SPL boot is not done.
---
Changes in V2:
Adds information in patch description for other changes.
configs/ls2080aqds_SECURE_BOOT_defconfig | 5 +++-- configs/ls2080ardb_SECURE_BOOT_defconfig | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-)
configs/ls2080aqds_SECURE_BOOT_defconfig +3 -2
@@ -1,12 +1,13 @@ CONFIG_ARM=y CONFIG_TARGET_LS2080AQDS=y +CONFIG_FSL_LS_PPA=y CONFIG_SECURE_BOOT=y CONFIG_DEFAULT_DEVICE_TREE="fsl-ls2080a-qds" # CONFIG_SYS_MALLOC_F is not set -CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_OF_BOARD_SETUP=y CONFIG_OF_STDOUT_VIA_ALIAS=y +CONFIG_ENV_IS_IN_FLASH=y CONFIG_BOOTDELAY=10 CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/ram0 earlycon=uart8250,mmio,0x21c0500 ramdisk_size=0x2000000 default_hugepagesz=2m hugepagesz=2m hugepages=256"
@@ -26,6 +27,7 @@ CONFIG_CMD_DATE=y CONFIG_OF_CONTROL=y CONFIG_NET_RANDOM_ETHADDR=y CONFIG_DM=y +CONFIG_FSL_CAAM=y CONFIG_MTD_NOR_FLASH=y CONFIG_DM_SPI_FLASH=y CONFIG_PHYLIB=y
@@ -45,6 +47,5 @@ CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y CONFIG_USB_STORAGE=y CONFIG_RSA=y -CONFIG_SPL_RSA=y CONFIG_RSA_SOFTWARE_EXP=y CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
configs/ls2080ardb_SECURE_BOOT_defconfig +3 -2
@@ -1,12 +1,13 @@ CONFIG_ARM=y CONFIG_TARGET_LS2080ARDB=y +CONFIG_FSL_LS_PPA=y CONFIG_SECURE_BOOT=y CONFIG_DEFAULT_DEVICE_TREE="fsl-ls2080a-rdb" # CONFIG_SYS_MALLOC_F is not set -CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_OF_BOARD_SETUP=y CONFIG_OF_STDOUT_VIA_ALIAS=y +CONFIG_ENV_IS_IN_FLASH=y CONFIG_BOOTDELAY=10 CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="console=ttyS1,115200 root=/dev/ram0 earlycon=uart8250,mmio,0x21c0600 ramdisk_size=0x2000000 default_hugepagesz=2m hugepagesz=2m hugepages=256"
@@ -25,6 +26,7 @@ CONFIG_CMD_DATE=y CONFIG_OF_CONTROL=y CONFIG_NET_RANDOM_ETHADDR=y CONFIG_DM=y +CONFIG_FSL_CAAM=y CONFIG_MTD_NOR_FLASH=y CONFIG_DM_SPI_FLASH=y CONFIG_PHYLIB=y
@@ -44,6 +46,5 @@ CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y CONFIG_USB_STORAGE=y CONFIG_RSA=y -CONFIG_SPL_RSA=y CONFIG_RSA_SOFTWARE_EXP=y CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
Signature · 1 line
1.9.1
PATCH v2 1/1 LS2080A_SECURE_BOOT: Enable CONFIG_FSL_LS_PPA.
Quoted 5 lines · Udit Agarwal
Adds config
CONFIG_FSL_LS_PPAandCONFIG_FSL_CAAMin LS2080AQDS and LS2080ARDB secure boot defconfig.Removes
CONFIG_FIT, as not required whenCONFIG_FSL_LS_PPAis enabled.
Your reason is wrong. With CONFIG_FSL_LS_PPA enabled, CONFIG_FIT is selected, not "not required".
Quoted 2 lines
Removes
CONFIG_SPL_RSAas in QSPI boot SPL boot is not done.
You are not dealing with QSPI in this patch. These defconfig files are for NOR boot.
Quoted 10 lines
Signed-off-by Udit Agarwal <[email protected]>---
Changes in V2:
Adds information in patch description for other changes.configs/ls2080aqds_SECURE_BOOT_defconfig | 5 +++-- configs/ls2080ardb_SECURE_BOOT_defconfig | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-)
York
PATCH v3 1/2 LS1088A_QSPI: SECURE_BOOT: Images validation
In reply to Udit AgarwalQuoted 163 lines · Udit Agarwal
Validates PPA, MC, DPC, Bootscript, DPL and Kernel images in ESBC phase using
esbc_validatecommand. Add images validation in default environment under mcinitcmd prior to MC initialization.Add header address for PPA to be validated during ESBC phase for LS1088A platform based on LAyerscape Chasis 3.
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]>---
Changes in v3:
RemovesCONFIG_FSL_CAAM. Will be enabled via defconfig.arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 1 + board/freescale/ls1088a/Kconfig | 2 ++ board/freescale/ls1088a/ls1088a.c | 6 +++--- include/configs/ls1088a_common.h | 3 --- include/configs/ls1088aqds.h | 21 +++++++++++++++++++++ include/configs/ls1088ardb.h | 22 +++++++++++++++++++++- 6 files changed, 48 insertions(+), 7 deletions(-)arch/arm/cpu/armv8/fsl-layerscape/Kconfig +1
-0@@ -242,6 +242,7 @@ config SYS_LS_PPA_ESBC_ADDR default 0x40680000 if SYS_LS_PPA_FW_IN_XIP && ARCH_LS1012A 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 0x20680000 if SYS_LS_PPA_FW_IN_XIP && ARCH_LS1088A default 0x680000 if SYS_LS_PPA_FW_IN_MMC default 0x680000 if SYS_LS_PPA_FW_IN_NAND helpboard/freescale/ls1088a/Kconfig +2
-0@@ -12,6 +12,7 @@ config SYS_SOC config SYS_CONFIG_NAME default "ls1088aqds" +source "board/freescale/common/Kconfig" endif if TARGET_LS1088ARDB@@ -28,4 +29,5 @@ config SYS_SOC config SYS_CONFIG_NAME default "ls1088ardb" +source "board/freescale/common/Kconfig" endifboard/freescale/ls1088a/ls1088a.c +3
-3@@ -315,6 +315,9 @@ int board_init(void)out_le32 (irq_ccsr +IRQCR_OFFSET /4 ,AQR105_IRQ_MASK );#endif +#ifdef CONFIG_FSL_CAAM +sec_init (); +#endif #ifdef CONFIG_FSL_LS_PPA ppa_init ();#endif @@ -337,9 +340,6 @@ void detail_board_ddr_info(void)#if defined(CONFIG_ARCH_MISC_INIT )int arch_misc_init (void ) { -#ifdef CONFIG_FSL_CAAM -sec_init (); -#endif return 0 ; }#endif include/configs/ls1088a_common.h +0
-3@@ -132,9 +132,6 @@ unsigned long long get_qixis_addr(void);#if defined(CONFIG_FSL_MC_ENET )#define CONFIG_SYS_LS_MC_DRAM_BLOCK_MIN_SIZE (512UL * 1024 * 1024)#endif - -#define CONFIG_FSL_CAAM /* Enable SEC/CAAM */ -/* Command line configuration */ #define CONFIG_CMD_GREPENV #define CONFIG_CMD_CACHE include/configs/ls1088aqds.h +21
-0@@ -329,6 +329,26 @@ unsigned long get_board_ddr_clk(void); QIXIS_SDID_MASK) != QIXIS_ESDHC_NO_ADAPTER)/* Initial environment variables */ +#ifdef CONFIG_SECURE_BOOT +#undef CONFIG_EXTRA_ENV_SETTINGS +#define CONFIG_EXTRA_ENV_SETTINGS \ + "hwconfig=fsl_ddr:bank_intlv=auto\0" \ + "loadaddr=0x90100000\0" \ + "kernel_addr=0x100000\0" \ + "ramdisk_addr=0x800000\0" \ + "ramdisk_size=0x2000000\0" \ + "fdt_high=0xa0000000\0" \ + "initrd_high=0xffffffffffffffff\0" \ + "kernel_start=0x1000000\0" \ + "kernel_load=0xa0000000\0" \ + "kernel_size=0x2800000\0" \ + "mcinitcmd=sf probe 0:0;sf read 0xa0a00000 0xa00000 0x100000;" \ + "sf read 0xa0700000 0x700000 0x4000; esbc_validate 0xa0700000;" \ + "sf read 0xa0e00000 0xe00000 0x100000;" \ + "sf read 0xa0740000 0x740000 0x4000;esbc_validate 0xa0740000;" \ + "fsl_mc start mc 0xa0a00000 0xa0e00000\0" \ + "mcmemsize=0x70000000 \0" +#else /* if !(CONFIG_SECURE_BOOT) */ #if defined(CONFIG_QSPI_BOOT )#undef CONFIG_EXTRA_ENV_SETTINGS#define CONFIG_EXTRA_ENV_SETTINGS \@@ -362,6 +382,7 @@ unsigned long get_board_ddr_clk(void);"mcinitcmd=fsl_mc start mc 0x580A00000 0x580E00000\0" \ "mcmemsize=0x70000000 \0"#endif +#endif /* CONFIG_SECURE_BOOT */ #ifdef CONFIG_FSL_MC_ENET #define CONFIG_FSL_MEMAC include/configs/ls1088ardb.h +20
-0@@ -251,6 +251,26 @@#define CONFIG_FSL_MEMAC /* Initial environment variables */ +#ifdef CONFIG_SECURE_BOOT +#undef CONFIG_EXTRA_ENV_SETTINGS +#define CONFIG_EXTRA_ENV_SETTINGS \ + "hwconfig=fsl_ddr:bank_intlv=auto\0" \ + "loadaddr=0x90100000\0" \ + "kernel_addr=0x100000\0" \ + "ramdisk_addr=0x800000\0" \ + "ramdisk_size=0x2000000\0" \ + "fdt_high=0xa0000000\0" \ + "initrd_high=0xffffffffffffffff\0" \ + "kernel_start=0x1000000\0" \ + "kernel_load=0xa0000000\0" \ + "kernel_size=0x2800000\0" \ + "mcinitcmd=sf probe 0:0;sf read 0xa0a00000 0xa00000 0x100000;" \ + "sf read 0xa0700000 0x700000 0x4000; esbc_validate 0xa0700000;" \ + "sf read 0xa0e00000 0xe00000 0x100000;" \ + "sf read 0xa0740000 0x740000 0x4000; esbc_validate 0xa0740000;" \ + "fsl_mc start mc 0xa0a00000 0xa0e00000\0" \ + "mcmemsize=0x70000000 \0" +#else /* if !(CONFIG_SECURE_BOOT) */ #if defined(CONFIG_QSPI_BOOT )#undef CONFIG_EXTRA_ENV_SETTINGS#define CONFIG_EXTRA_ENV_SETTINGS \
include/configs/ls1088ardb.h line 296
Quoted 8 lines
include/configs/ls1088ardb.h +1
-1@@ -270,7 +290,7 @@ "mcmemsize=0x70000000 \0"#endif - +#endif /* CONFIG_SECURE_BOOT */ /* MAC/PHY configuration */ #ifdef CONFIG_FSL_MC_ENET #define CONFIG_PHYLIB_10G
Please briefly explain how you define the boot command. I lost track. How do you deal with the failure of mcinitcmd?
York
PATCH v3 1/2 LS1088A_QSPI: SECURE_BOOT: Images validation
Quoted 187 lines
-----Original Message-----
From: York Sun
Sent: Tuesday, October 24, 2017 3:04 AM
To: Udit Agarwal <[email protected]>; u-boot at lists.denx.de
Cc: Ruchika Gupta <[email protected]>; Sumit Garg <[email protected]>; Prabhakar Kushwaha <[email protected]>
Subject: Re: [PATCH v3 1/2]LS1088A_QSPI:SECURE_BOOT: Images validationQuoted 29 lines · Udit Agarwal
Validates PPA, MC, DPC, Bootscript, DPL and Kernel images in ESBC phase using
esbc_validatecommand. Add images validation in default environment under mcinitcmd prior to MC initialization.Add header address for PPA to be validated during ESBC phase for LS1088A platform based on LAyerscape Chasis 3.
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]>---
Changes in v3:
RemovesCONFIG_FSL_CAAM. Will be enabled via defconfig.arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 1 + board/freescale/ls1088a/Kconfig | 2 ++ board/freescale/ls1088a/ls1088a.c | 6 +++--- include/configs/ls1088a_common.h | 3 --- include/configs/ls1088aqds.h | 21 +++++++++++++++++++++ include/configs/ls1088ardb.h | 22 +++++++++++++++++++++- 6 files changed, 48 insertions(+), 7 deletions(-)arch/arm/cpu/armv8/fsl-layerscape/Kconfig +0
-0arch/arm/cpu/armv8/fsl-layerscape/Kconfig config SYS_LS_PPA_ESBC_ADDR · line 243
Quoted 2 lines
arch/arm/cpu/armv8/fsl-layerscape/Kconfig +0
-0@@ -242,6 +242,7 @@ config SYS_LS_PPA_ESBC_ADDR default 0x40680000 if SYS_LS_PPA_FW_IN_XIP && ARCH_LS1012A default 0x20680000 if SYS_LS_PPA_FW_IN_XIP && QSPI_BOOT &&
ARCH_LS2080AQuoted 51 lines
arch/arm/cpu/armv8/fsl-layerscape/Kconfig +1
-0default 0x580680000 if SYS_LS_PPA_FW_IN_XIP && ARCH_LS2080A + default 0x20680000 if SYS_LS_PPA_FW_IN_XIP && ARCH_LS1088A default 0x680000 if SYS_LS_PPA_FW_IN_MMC default 0x680000 if SYS_LS_PPA_FW_IN_NAND help(quoted diff) +0
-0b/board/freescale/ls1088a/Kconfig index 1ada661..4479dd0 100644
board/freescale/ls1088a/Kconfig +2
-0@@ -12,6 +12,7 @@ config SYS_SOC config SYS_CONFIG_NAME default "ls1088aqds" +source "board/freescale/common/Kconfig" endif if TARGET_LS1088ARDB@@ -28,4 +29,5 @@ config SYS_SOC config SYS_CONFIG_NAME default "ls1088ardb" +source "board/freescale/common/Kconfig" endifboard/freescale/ls1088a/ls1088a.c +3
-0@@ -315,6 +315,9 @@ int board_init(void)out_le32 (irq_ccsr +IRQCR_OFFSET /4 ,AQR105_IRQ_MASK );#endif +#ifdef CONFIG_FSL_CAAM +sec_init (); +#endif #ifdef CONFIG_FSL_LS_PPA ppa_init ();#endif @@ -337,9 +340,6 @@ void detail_board_ddr_info(void) #if
defined(CONFIG_ARCH_MISC_INIT)intarch_misc_init(void){ -#ifdefCONFIG_FSL_CAAMboard/freescale/ls1088a/ls1088a.c +0
-2-sec_init (); -#endif return 0; }#endif include/configs/ls1088a_common.h +0
-0include/configs/ls1088a_common.h unsigned long long get_qixis_addr(void); #if · line 133
Quoted 2 lines
include/configs/ls1088a_common.h +0
-0@@ -132,9 +132,6 @@ unsigned long long get_qixis_addr(void); #if defined(CONFIG_FSL_MC_ENET)#define CONFIG_SYS_LS_MC_DRAM_BLOCK_MIN_SIZE (512UL *1024 * 1024)
Quoted 79 lines
include/configs/ls1088a_common.h +0
-3#endif - -#define CONFIG_FSL_CAAM /* Enable SEC/CAAM */ -/* Command line configuration */ #define CONFIG_CMD_GREPENV #define CONFIG_CMD_CACHE (quoted diff) +0
-0
b/include/configs/ls1088aqds.hindex 3547b0b..ff0cb7e 100644include/configs/ls1088aqds.h +21
-0@@ -329,6 +329,26 @@ unsigned long get_board_ddr_clk(void); QIXIS_SDID_MASK) != QIXIS_ESDHC_NO_ADAPTER)/* Initial environment variables */ +#ifdef CONFIG_SECURE_BOOT +#undef CONFIG_EXTRA_ENV_SETTINGS +#define CONFIG_EXTRA_ENV_SETTINGS \ + "hwconfig=fsl_ddr:bank_intlv=auto\0" \ + "loadaddr=0x90100000\0" \ + "kernel_addr=0x100000\0" \ + "ramdisk_addr=0x800000\0" \ + "ramdisk_size=0x2000000\0" \ + "fdt_high=0xa0000000\0" \ + "initrd_high=0xffffffffffffffff\0" \ + "kernel_start=0x1000000\0" \ + "kernel_load=0xa0000000\0" \ + "kernel_size=0x2800000\0" \ + "mcinitcmd=sf probe 0:0;sf read 0xa0a00000 0xa00000 0x100000;" \ + "sf read 0xa0700000 0x700000 0x4000; esbc_validate 0xa0700000;" \ + "sf read 0xa0e00000 0xe00000 0x100000;" \ + "sf read 0xa0740000 0x740000 0x4000;esbc_validate 0xa0740000;" \ + "fsl_mc start mc 0xa0a00000 0xa0e00000\0" \ + "mcmemsize=0x70000000 \0" +#else /* if !(CONFIG_SECURE_BOOT) */ #if defined(CONFIG_QSPI_BOOT )#undef CONFIG_EXTRA_ENV_SETTINGS#define CONFIG_EXTRA_ENV_SETTINGS \@@ -362,6 +382,7 @@ unsigned long get_board_ddr_clk(void);"mcinitcmd=fsl_mc start mc 0x580A00000 0x580E00000\0" \ "mcmemsize=0x70000000 \0"#endif +#endif /* CONFIG_SECURE_BOOT */ #ifdef CONFIG_FSL_MC_ENET #define CONFIG_FSL_MEMAC (quoted diff) +0
-0
b/include/configs/ls1088ardb.hindex 3223278..cb16a27 100644include/configs/ls1088ardb.h +20
-0@@ -251,6 +251,26 @@#define CONFIG_FSL_MEMAC /* Initial environment variables */ +#ifdef CONFIG_SECURE_BOOT +#undef CONFIG_EXTRA_ENV_SETTINGS +#define CONFIG_EXTRA_ENV_SETTINGS \ + "hwconfig=fsl_ddr:bank_intlv=auto\0" \ + "loadaddr=0x90100000\0" \ + "kernel_addr=0x100000\0" \ + "ramdisk_addr=0x800000\0" \ + "ramdisk_size=0x2000000\0" \ + "fdt_high=0xa0000000\0" \ + "initrd_high=0xffffffffffffffff\0" \ + "kernel_start=0x1000000\0" \ + "kernel_load=0xa0000000\0" \ + "kernel_size=0x2800000\0" \ + "mcinitcmd=sf probe 0:0;sf read 0xa0a00000 0xa00000 0x100000;" \ + "sf read 0xa0700000 0x700000 0x4000; esbc_validate 0xa0700000;" \ + "sf read 0xa0e00000 0xe00000 0x100000;" \ + "sf read 0xa0740000 0x740000 0x4000; esbc_validate 0xa0740000;" \ + "fsl_mc start mc 0xa0a00000 0xa0e00000\0" \ + "mcmemsize=0x70000000 \0" +#else /* if !(CONFIG_SECURE_BOOT) */ #if defined(CONFIG_QSPI_BOOT )#undef CONFIG_EXTRA_ENV_SETTINGS#define CONFIG_EXTRA_ENV_SETTINGS \include/configs/ls1088ardb.h line 296
Quoted 8 lines
include/configs/ls1088ardb.h +1
-1@@ -270,7 +290,7 @@ "mcmemsize=0x70000000 \0"#endif - +#endif /* CONFIG_SECURE_BOOT */ /* MAC/PHY configuration */ #ifdef CONFIG_FSL_MC_ENET #define CONFIG_PHYLIB_10G Please briefly explain how you define the boot command. I lost track. How do you deal with the failure of mcinitcmd?
Quoted 1 line
York
These patches are for secure boot in which we add esbc_validate command in mcinitcmd to verify the MC and DPC images. If there is any failure in validation of these images secure boot will fail and SNVS state transition will take place + core will go in spin loop (based on ITS value). No boot command added in these patches as it is same as that of non-secure flow.