armv8: lx2160: Add secure boot target and enable distro boot.
authorUdit Agarwal <udit.agarwal@nxp.com>
Fri, 14 Dec 2018 04:43:32 +0000 (04:43 +0000)
committerPrabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Tue, 19 Feb 2019 04:56:44 +0000 (10:26 +0530)
Adds esbc validate command for verification of MC and DPC
firmware, along with secure boot defconfig.

Also enable distro boot.

Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
Signed-off-by: Peng Ma <peng.ma@nxp.com>
[PK: squash "enable DM support for SATA patch" & add maintainer]
Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
board/freescale/lx2160a/MAINTAINERS
configs/lx2160ardb_tfa_SECURE_BOOT_defconfig [new file with mode: 0644]
include/configs/lx2160a_common.h

index aeb7dbc581761f12dd61ce1732d2cfdc3b9778f1..b980fa638c790c4fccfdf17d1a49b072b648b2a7 100644 (file)
@@ -6,3 +6,8 @@ F:      include/configs/lx2160a_common.h
 F:     include/configs/lx2160ardb.h
 F:     configs/lx2160ardb_tfa_defconfig
 F:     arch/arm/dts/fsl-lx2160a-rdb.dts
+
+LX2160ARDB_SECURE_BOOT BOARD
+M:     Udit Agarwal <udit.agarwal@nxp.com>
+S:     Maintained
+F:     configs/lx2160ardb_tfa_SECURE_BOOT_defconfig
diff --git a/configs/lx2160ardb_tfa_SECURE_BOOT_defconfig b/configs/lx2160ardb_tfa_SECURE_BOOT_defconfig
new file mode 100644 (file)
index 0000000..f66882d
--- /dev/null
@@ -0,0 +1,55 @@
+CONFIG_ARM=y
+CONFIG_TARGET_LX2160ARDB=y
+CONFIG_SYS_TEXT_BASE=0x82000000
+CONFIG_SYS_MALLOC_F_LEN=0x6000
+CONFIG_SECURE_BOOT=y
+CONFIG_EMC2305=y
+CONFIG_TFABOOT=y
+CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT=y
+CONFIG_SEC_FIRMWARE_ARMV8_PSCI=y
+CONFIG_AHCI=y
+CONFIG_NR_DRAM_BANKS=3
+CONFIG_FIT_VERBOSE=y
+CONFIG_OF_BOARD_SETUP=y
+CONFIG_OF_STDOUT_VIA_ALIAS=y
+CONFIG_USE_BOOTARGS=y
+CONFIG_BOOTARGS="console=ttyAMA0,115200 root=/dev/ram0 earlycon=pl011,mmio32,0x21c0000 ramdisk_size=0x2000000 default_hugepagesz=1024m hugepagesz=1024m hugepages=2 pci=pcie_bus_perf"
+# CONFIG_USE_BOOTCOMMAND is not set
+CONFIG_CMD_GREPENV=y
+CONFIG_CMD_EEPROM=y
+CONFIG_CMD_GPT=y
+CONFIG_CMD_I2C=y
+CONFIG_CMD_MMC=y
+CONFIG_CMD_SF=y
+CONFIG_CMD_USB=y
+CONFIG_CMD_CACHE=y
+CONFIG_MP=y
+CONFIG_OF_CONTROL=y
+CONFIG_DEFAULT_DEVICE_TREE="fsl-lx2160a-rdb"
+CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_DM=y
+CONFIG_SATA_CEVA=y
+CONFIG_DM_MMC=y
+CONFIG_FSL_ESDHC=y
+CONFIG_DM_SPI_FLASH=y
+CONFIG_SPI_FLASH=y
+CONFIG_SPI_FLASH_SPANSION=y
+CONFIG_SPI_FLASH_STMICRO=y
+# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
+CONFIG_PHYLIB=y
+CONFIG_PHY_AQUANTIA=y
+CONFIG_PHY_ATHEROS=y
+CONFIG_PHY_CORTINA=y
+CONFIG_E1000=y
+CONFIG_DM_SERIAL=y
+CONFIG_SPI=y
+CONFIG_DM_SPI=y
+CONFIG_DM_SCSI=y
+CONFIG_USB=y
+CONFIG_DM_USB=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_DWC3=y
+CONFIG_RSA=y
+CONFIG_SPL_RSA=y
+CONFIG_RSA_SOFTWARE_EXP=y
+CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
index 0e0e72d06baf2ad4c772f9023bad6ec876140399..4b5608b5a3e04ce7e9ebadeff8fb5006788dfbf2 100644 (file)
@@ -194,11 +194,19 @@ unsigned long get_board_ddr_clk(void);
 
 /* Initial environment variables */
 #define XSPI_MC_INIT_CMD                       \
+       "env exists secureboot && "             \
+       "esbc_validate 0x20700000 && "          \
+       "esbc_validate 0x20740000 ;"            \
        "fsl_mc start mc 0x20a00000 0x20e00000\0"
 
 #define SD_MC_INIT_CMD                         \
        "mmc read 0x80000000 0x5000 0x800;"     \
        "mmc read 0x80100000 0x7000 0x800;"     \
+       "env exists secureboot && "             \
+       "mmc read 0x80700000 0x3800 0x10 && "   \
+       "mmc read 0x80740000 0x3A00 0x10 && "   \
+       "esbc_validate 0x80700000 && "          \
+       "esbc_validate 0x80740000 ;"            \
        "fsl_mc start mc 0x80000000 0x80100000\0"
 
 #define EXTRA_ENV_SETTINGS                     \
@@ -209,7 +217,7 @@ unsigned long get_board_ddr_clk(void);
        "initrd_high=0xffffffffffffffff\0"      \
        "fdt_addr=0x64f00000\0"                 \
        "kernel_start=0x1000000\0"              \
-       "kernelheader_start=0x800000\0"         \
+       "kernelheader_start=0x7C0000\0"         \
        "scriptaddr=0x80000000\0"               \
        "scripthdraddr=0x80080000\0"            \
        "fdtheader_addr_r=0x80100000\0"         \
@@ -220,7 +228,9 @@ unsigned long get_board_ddr_clk(void);
        "load_addr=0xa0000000\0"                \
        "kernel_size=0x2800000\0"               \
        "kernel_addr_sd=0x8000\0"               \
+       "kernelhdr_addr_sd=0x3E00\0"            \
        "kernel_size_sd=0x1d000\0"              \
+       "kernelhdr_size_sd=0x10\0"              \
        "console=ttyAMA0,38400n8\0"             \
        BOOTENV                                 \
        "mcmemsize=0x70000000\0"                \