[U-Boot] [PATCH v2 0/7] Add USB boot to HS DRA7xx/AM57xx

Hello all,
This series adds USB boot support to HS DRA7xx/AM57xx platforms.
We start by cleaning up DFU boot in SPL support. What is done in the first patch for DFU, if acceptable, should be done to the other boot modes.
The 4th patch is needed as on HS devices a header is added to the boot image that tells the ROM where to load this image. This only works for block device booting as the ROM can read the header and move the image into memory in steps. For streaming boot modes USB/ UART/NET the image is placed in memory as it is received from the media live. This means the header is ignored and the image has a fixed offset in memory.
For AM47xx we align the boot modes by making the offset for block device booting the same as the fixed offset for streaming boot modes, in this way only one defconfig is needed. For DRA7xx/AM57xx the signing tools will need to be updated to support specifying this address, when this is done the offset in the base HS defconfig can be moved to match the new offset and the defconfigs added here in patch 5 and 6 can be unified back into the base HS defconfig.
The last patch updates the docs for the same above.
Thanks, Andrew
Changes from v1: - Drop explicit UART boot support from DRA7xx as this cannot be tested
Andrew F. Davis (7): spl: Kconfig: Drop the _SUPPORT postfix from SPL_DFU dfu: Make DFU support more SPL friendly dfu: Remove dependency on HUSH parser in SPL ARM: mach-omap2: Kconfig: Allow OMAP5 devices to set entry point defconfigs: Add config for DRA7xx High Security EVM with USB Boot support defconfigs: Add config for AM57xx High Security EVM with USB/UART Boot support doc: ti-secure: Add ULO info for AM57xx/DRA7xx secure devices from TI
MAINTAINERS | 2 + arch/arm/cpu/armv8/zynqmp/spl.c | 2 +- arch/arm/mach-omap2/Kconfig | 13 ++++ arch/arm/mach-omap2/am33xx/Kconfig | 15 ---- arch/arm/mach-omap2/boot-common.c | 2 +- common/Makefile | 3 +- common/cli.c | 2 +- common/spl/Kconfig | 6 +- common/spl/Makefile | 2 +- common/spl/spl_ram.c | 4 +- configs/am57xx_hs_evm_usb_defconfig | 92 ++++++++++++++++++++++++ configs/dra7xx_hs_evm_usb_defconfig | 106 ++++++++++++++++++++++++++++ doc/README.ti-secure | 8 ++- drivers/Makefile | 3 +- drivers/dfu/Makefile | 12 ++-- drivers/usb/gadget/Makefile | 2 +- include/configs/dra7xx_evm.h | 2 +- include/configs/ti_omap5_common.h | 2 +- include/configs/xilinx_zynqmp.h | 4 +- include/dfu.h | 10 +-- 20 files changed, 246 insertions(+), 46 deletions(-) create mode 100644 configs/am57xx_hs_evm_usb_defconfig create mode 100644 configs/dra7xx_hs_evm_usb_defconfig

The symbol CONFIG_SPL_DFU_SUPPORT in SPL build has the same meaning as CONFIG_DFU in regular U-Boot. Drop the _SUPPORT to allow for cleaner use in code.
Signed-off-by: Andrew F. Davis afd@ti.com --- arch/arm/cpu/armv8/zynqmp/spl.c | 2 +- arch/arm/mach-omap2/boot-common.c | 2 +- common/Makefile | 4 ++-- common/spl/Kconfig | 6 +++--- common/spl/Makefile | 2 +- common/spl/spl_ram.c | 4 ++-- drivers/Makefile | 2 +- drivers/usb/gadget/Makefile | 2 +- include/configs/dra7xx_evm.h | 2 +- include/configs/xilinx_zynqmp.h | 4 ++-- 10 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/arch/arm/cpu/armv8/zynqmp/spl.c b/arch/arm/cpu/armv8/zynqmp/spl.c index 01f31d0f0e..fb3955c93f 100644 --- a/arch/arm/cpu/armv8/zynqmp/spl.c +++ b/arch/arm/cpu/armv8/zynqmp/spl.c @@ -93,7 +93,7 @@ u32 spl_boot_device(void) case EMMC_MODE: return BOOT_DEVICE_MMC1; #endif -#ifdef CONFIG_SPL_DFU_SUPPORT +#ifdef CONFIG_SPL_DFU case USB_MODE: return BOOT_DEVICE_DFU; #endif diff --git a/arch/arm/mach-omap2/boot-common.c b/arch/arm/mach-omap2/boot-common.c index 176d4f67cb..2db19227b9 100644 --- a/arch/arm/mach-omap2/boot-common.c +++ b/arch/arm/mach-omap2/boot-common.c @@ -108,7 +108,7 @@ void save_omap_boot_params(void) sys_boot_device = 1; break; #endif -#if defined(BOOT_DEVICE_DFU) && !defined(CONFIG_SPL_DFU_SUPPORT) +#if defined(BOOT_DEVICE_DFU) && !defined(CONFIG_SPL_DFU) case BOOT_DEVICE_DFU: sys_boot_device = 1; break; diff --git a/common/Makefile b/common/Makefile index 65d89dc62d..69cec69608 100644 --- a/common/Makefile +++ b/common/Makefile @@ -64,10 +64,10 @@ obj-$(CONFIG_$(SPL_TPL_)BOOTSTAGE) += bootstage.o obj-$(CONFIG_$(SPL_TPL_)BLOBLIST) += bloblist.o
ifdef CONFIG_SPL_BUILD -ifdef CONFIG_SPL_DFU_SUPPORT +ifdef CONFIG_SPL_DFU obj-$(CONFIG_DFU_OVER_USB) += dfu.o endif -obj-$(CONFIG_SPL_DFU_SUPPORT) += cli_hush.o +obj-$(CONFIG_SPL_DFU) += cli_hush.o obj-$(CONFIG_SPL_HASH_SUPPORT) += hash.o obj-$(CONFIG_TPL_HASH_SUPPORT) += hash.o obj-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 0ddbffc7d1..8dec080deb 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -790,7 +790,7 @@ config SPL_USB_ETHER since the network stack uses a number of environment variables. See also SPL_NET_SUPPORT and SPL_ETH_SUPPORT.
-config SPL_DFU_SUPPORT +config SPL_DFU bool "Support DFU (Device Firmware Upgrade)" select SPL_HASH_SUPPORT select SPL_DFU_NO_RESET @@ -805,11 +805,11 @@ config SPL_DFU_SUPPORT
choice bool "DFU device selection" - depends on SPL_DFU_SUPPORT + depends on SPL_DFU
config SPL_DFU_RAM bool "RAM device" - depends on SPL_DFU_SUPPORT && SPL_RAM_SUPPORT + depends on SPL_DFU && SPL_RAM_SUPPORT help select RAM/DDR memory device for loading binary images (u-boot/kernel) to the selected device partition using diff --git a/common/spl/Makefile b/common/spl/Makefile index a130a5be4b..6f8d7599ae 100644 --- a/common/spl/Makefile +++ b/common/spl/Makefile @@ -26,7 +26,7 @@ obj-$(CONFIG_$(SPL_TPL_)USB_SUPPORT) += spl_usb.o obj-$(CONFIG_$(SPL_TPL_)FAT_SUPPORT) += spl_fat.o obj-$(CONFIG_$(SPL_TPL_)EXT_SUPPORT) += spl_ext.o obj-$(CONFIG_$(SPL_TPL_)SATA_SUPPORT) += spl_sata.o -obj-$(CONFIG_$(SPL_TPL_)DFU_SUPPORT) += spl_dfu.o +obj-$(CONFIG_$(SPL_TPL_)DFU) += spl_dfu.o obj-$(CONFIG_$(SPL_TPL_)SPI_LOAD) += spl_spi.o obj-$(CONFIG_$(SPL_TPL_)RAM_SUPPORT) += spl_ram.o obj-$(CONFIG_$(SPL_TPL_)USB_SDP_SUPPORT) += spl_sdp.o diff --git a/common/spl/spl_ram.c b/common/spl/spl_ram.c index 5fcc3b1504..954e91a004 100644 --- a/common/spl/spl_ram.c +++ b/common/spl/spl_ram.c @@ -35,7 +35,7 @@ static int spl_ram_load_image(struct spl_image_info *spl_image,
header = (struct image_header *)CONFIG_SPL_LOAD_FIT_ADDRESS;
-#if CONFIG_IS_ENABLED(DFU_SUPPORT) +#if CONFIG_IS_ENABLED(DFU) if (bootdev->boot_device == BOOT_DEVICE_DFU) spl_dfu_cmd(0, "dfu_alt_info_ram", "ram", "0"); #endif @@ -76,7 +76,7 @@ static int spl_ram_load_image(struct spl_image_info *spl_image, #if CONFIG_IS_ENABLED(RAM_DEVICE) SPL_LOAD_IMAGE_METHOD("RAM", 0, BOOT_DEVICE_RAM, spl_ram_load_image); #endif -#if CONFIG_IS_ENABLED(DFU_SUPPORT) +#if CONFIG_IS_ENABLED(DFU) SPL_LOAD_IMAGE_METHOD("DFU", 0, BOOT_DEVICE_DFU, spl_ram_load_image); #endif
diff --git a/drivers/Makefile b/drivers/Makefile index 55de10926e..7fe80b1d72 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -48,7 +48,7 @@ obj-$(CONFIG_SPL_USB_ETHER) += net/phy/ obj-$(CONFIG_SPL_MUSB_NEW_SUPPORT) += usb/musb-new/ obj-$(CONFIG_SPL_USB_GADGET_SUPPORT) += usb/gadget/ obj-$(CONFIG_SPL_USB_GADGET_SUPPORT) += usb/gadget/udc/ -obj-$(CONFIG_SPL_DFU_SUPPORT) += dfu/ +obj-$(CONFIG_SPL_DFU) += dfu/ obj-$(CONFIG_SPL_WATCHDOG_SUPPORT) += watchdog/ obj-$(CONFIG_SPL_USB_HOST_SUPPORT) += usb/host/ obj-$(CONFIG_OMAP_USB_PHY) += usb/phy/ diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile index b74c1fdce9..b5bc59eecb 100644 --- a/drivers/usb/gadget/Makefile +++ b/drivers/usb/gadget/Makefile @@ -8,7 +8,7 @@ obj-$(CONFIG_USB_ETHER) += epautoconf.o config.o usbstring.o
ifdef CONFIG_SPL_BUILD obj-$(CONFIG_SPL_USB_GADGET_SUPPORT) += g_dnl.o -obj-$(CONFIG_SPL_DFU_SUPPORT) += f_dfu.o +obj-$(CONFIG_SPL_DFU) += f_dfu.o obj-$(CONFIG_SPL_USB_SDP_SUPPORT) += f_sdp.o endif
diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h index 2d8758db75..f36a9c3e08 100644 --- a/include/configs/dra7xx_evm.h +++ b/include/configs/dra7xx_evm.h @@ -53,7 +53,7 @@
#ifdef CONFIG_SPL_BUILD #undef CONFIG_CMD_BOOTD -#ifdef CONFIG_SPL_DFU_SUPPORT +#ifdef CONFIG_SPL_DFU #define CONFIG_SPL_LOAD_FIT_ADDRESS 0x80200000 #define DFUARGS \ "dfu_bufsiz=0x10000\0" \ diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h index 0ab32611ce..7a9b06ec4c 100644 --- a/include/configs/xilinx_zynqmp.h +++ b/include/configs/xilinx_zynqmp.h @@ -183,7 +183,7 @@ #endif
/* SPL can't handle all huge variables - define just DFU */ -#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_DFU_SUPPORT) +#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_DFU) #undef CONFIG_EXTRA_ENV_SETTINGS # define CONFIG_EXTRA_ENV_SETTINGS \ "dfu_alt_info_ram=uboot.bin ram 0x8000000 0x1000000;" \ @@ -228,7 +228,7 @@ # define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.img" #endif
-#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_DFU_SUPPORT) +#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_DFU) # undef CONFIG_CMD_BOOTD # define CONFIG_SPL_ENV_SUPPORT # define CONFIG_SPL_HASH_SUPPORT

On Wed, Dec 05, 2018 at 11:51:30AM -0600, Andrew F. Davis wrote:
The symbol CONFIG_SPL_DFU_SUPPORT in SPL build has the same meaning as CONFIG_DFU in regular U-Boot. Drop the _SUPPORT to allow for cleaner use in code.
Signed-off-by: Andrew F. Davis afd@ti.com
Reviewed-by: Tom Rini trini@konsulko.com

Do this by using $(SPL_) in Makefiles and CONFIG_IS_ENABLED in C code. This ensures the files and features are only built into the right build for which they are enabled. Using the macros to simplify this patch was made possible by the config symbol rename done in the last patch.
Signed-off-by: Andrew F. Davis afd@ti.com --- drivers/Makefile | 3 +-- drivers/dfu/Makefile | 12 ++++++------ include/dfu.h | 10 +++++----- 3 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/drivers/Makefile b/drivers/Makefile index 7fe80b1d72..26e4d39df6 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -2,6 +2,7 @@
obj-$(CONFIG_$(SPL_TPL_)CLK) += clk/ obj-$(CONFIG_$(SPL_TPL_)DM) += core/ +obj-$(CONFIG_$(SPL_TPL_)DFU) += dfu/ obj-$(CONFIG_$(SPL_TPL_)GPIO_SUPPORT) += gpio/ obj-$(CONFIG_$(SPL_TPL_)DRIVERS_MISC_SUPPORT) += misc/ sysreset/ firmware/ obj-$(CONFIG_$(SPL_TPL_)I2C_SUPPORT) += i2c/ @@ -48,7 +49,6 @@ obj-$(CONFIG_SPL_USB_ETHER) += net/phy/ obj-$(CONFIG_SPL_MUSB_NEW_SUPPORT) += usb/musb-new/ obj-$(CONFIG_SPL_USB_GADGET_SUPPORT) += usb/gadget/ obj-$(CONFIG_SPL_USB_GADGET_SUPPORT) += usb/gadget/udc/ -obj-$(CONFIG_SPL_DFU) += dfu/ obj-$(CONFIG_SPL_WATCHDOG_SUPPORT) += watchdog/ obj-$(CONFIG_SPL_USB_HOST_SUPPORT) += usb/host/ obj-$(CONFIG_OMAP_USB_PHY) += usb/phy/ @@ -85,7 +85,6 @@ obj-y += misc/ obj-$(CONFIG_MMC) += mmc/ obj-$(CONFIG_NVME) += nvme/ obj-y += pcmcia/ -obj-y += dfu/ obj-$(CONFIG_X86) += pch/ obj-y += phy/allwinner/ obj-y += phy/marvell/ diff --git a/drivers/dfu/Makefile b/drivers/dfu/Makefile index 56f9b0c5f4..4164f342ac 100644 --- a/drivers/dfu/Makefile +++ b/drivers/dfu/Makefile @@ -3,9 +3,9 @@ # Copyright (C) 2012 Samsung Electronics # Lukasz Majewski l.majewski@samsung.com
-obj-$(CONFIG_DFU) += dfu.o -obj-$(CONFIG_DFU_MMC) += dfu_mmc.o -obj-$(CONFIG_DFU_NAND) += dfu_nand.o -obj-$(CONFIG_DFU_RAM) += dfu_ram.o -obj-$(CONFIG_DFU_SF) += dfu_sf.o -obj-$(CONFIG_DFU_TFTP) += dfu_tftp.o +obj-$(CONFIG_$(SPL_)DFU) += dfu.o +obj-$(CONFIG_$(SPL_)DFU_MMC) += dfu_mmc.o +obj-$(CONFIG_$(SPL_)DFU_NAND) += dfu_nand.o +obj-$(CONFIG_$(SPL_)DFU_RAM) += dfu_ram.o +obj-$(CONFIG_$(SPL_)DFU_SF) += dfu_sf.o +obj-$(CONFIG_$(SPL_)DFU_TFTP) += dfu_tftp.o diff --git a/include/dfu.h b/include/dfu.h index fbe978abdc..9340a900a2 100644 --- a/include/dfu.h +++ b/include/dfu.h @@ -202,7 +202,7 @@ static inline void dfu_set_defer_flush(struct dfu_entity *dfu) int dfu_write_from_mem_addr(struct dfu_entity *dfu, void *buf, int size);
/* Device specific */ -#ifdef CONFIG_DFU_MMC +#if CONFIG_IS_ENABLED(DFU_MMC) extern int dfu_fill_entity_mmc(struct dfu_entity *dfu, char *devstr, char *s); #else static inline int dfu_fill_entity_mmc(struct dfu_entity *dfu, char *devstr, @@ -213,7 +213,7 @@ static inline int dfu_fill_entity_mmc(struct dfu_entity *dfu, char *devstr, } #endif
-#ifdef CONFIG_DFU_NAND +#if CONFIG_IS_ENABLED(DFU_NAND) extern int dfu_fill_entity_nand(struct dfu_entity *dfu, char *devstr, char *s); #else static inline int dfu_fill_entity_nand(struct dfu_entity *dfu, char *devstr, @@ -224,7 +224,7 @@ static inline int dfu_fill_entity_nand(struct dfu_entity *dfu, char *devstr, } #endif
-#ifdef CONFIG_DFU_RAM +#if CONFIG_IS_ENABLED(DFU_RAM) extern int dfu_fill_entity_ram(struct dfu_entity *dfu, char *devstr, char *s); #else static inline int dfu_fill_entity_ram(struct dfu_entity *dfu, char *devstr, @@ -235,7 +235,7 @@ static inline int dfu_fill_entity_ram(struct dfu_entity *dfu, char *devstr, } #endif
-#ifdef CONFIG_DFU_SF +#if CONFIG_IS_ENABLED(DFU_SF) extern int dfu_fill_entity_sf(struct dfu_entity *dfu, char *devstr, char *s); #else static inline int dfu_fill_entity_sf(struct dfu_entity *dfu, char *devstr, @@ -259,7 +259,7 @@ static inline int dfu_fill_entity_sf(struct dfu_entity *dfu, char *devstr, * * @return 0 on success, otherwise error code */ -#ifdef CONFIG_DFU_TFTP +#if CONFIG_IS_ENABLED(DFU_TFTP) int dfu_tftp_write(char *dfu_entity_name, unsigned int addr, unsigned int len, char *interface, char *devstring); #else

On Wed, Dec 05, 2018 at 11:51:31AM -0600, Andrew F. Davis wrote:
Do this by using $(SPL_) in Makefiles and CONFIG_IS_ENABLED in C code. This ensures the files and features are only built into the right build for which they are enabled. Using the macros to simplify this patch was made possible by the config symbol rename done in the last patch.
Signed-off-by: Andrew F. Davis afd@ti.com
Reviewed-by: Tom Rini trini@konsulko.com

CLI support with the HUSH parser is not currently SPL safe due to it's use of realloc. That function is not defined for SPLs that use SYS_MALLOC_SIMPLE. CLI support can be built in to SPL and some functions do work, but use of some like run_command() will cause build to fail. When no SPL code calls this function build works as the compiler removes this unreachable code so the unresolved symbols are ignored.
If DFU support is enabled in SPL then MMU DFU support may get brought in also, this code does make a call to run_command() causing build to fail if the HUSH parser is not built-in. To break this odd and unneeded dependency chain we use CONFIG_IS_ENABLED where appropriate to prevent calls into HUSH code from SPL. This also removes our need to pull in the rather unrelated source file when SPL_DFU is defined.
Signed-off-by: Andrew F. Davis afd@ti.com --- common/Makefile | 1 - common/cli.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/common/Makefile b/common/Makefile index 69cec69608..bbb03e1c57 100644 --- a/common/Makefile +++ b/common/Makefile @@ -67,7 +67,6 @@ ifdef CONFIG_SPL_BUILD ifdef CONFIG_SPL_DFU obj-$(CONFIG_DFU_OVER_USB) += dfu.o endif -obj-$(CONFIG_SPL_DFU) += cli_hush.o obj-$(CONFIG_SPL_HASH_SUPPORT) += hash.o obj-$(CONFIG_TPL_HASH_SUPPORT) += hash.o obj-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o diff --git a/common/cli.c b/common/cli.c index 51b8d5f85c..fea8f8004c 100644 --- a/common/cli.c +++ b/common/cli.c @@ -27,7 +27,7 @@ DECLARE_GLOBAL_DATA_PTR; */ int run_command(const char *cmd, int flag) { -#ifndef CONFIG_HUSH_PARSER +#if !CONFIG_IS_ENABLED(HUSH_PARSER) /* * cli_run_command can return 0 or 1 for success, so clean up * its result.

On Wed, Dec 05, 2018 at 11:51:32AM -0600, Andrew F. Davis wrote:
CLI support with the HUSH parser is not currently SPL safe due to it's use of realloc. That function is not defined for SPLs that use SYS_MALLOC_SIMPLE. CLI support can be built in to SPL and some functions do work, but use of some like run_command() will cause build to fail. When no SPL code calls this function build works as the compiler removes this unreachable code so the unresolved symbols are ignored.
If DFU support is enabled in SPL then MMU DFU support may get brought in also, this code does make a call to run_command() causing build to fail if the HUSH parser is not built-in. To break this odd and unneeded dependency chain we use CONFIG_IS_ENABLED where appropriate to prevent calls into HUSH code from SPL. This also removes our need to pull in the rather unrelated source file when SPL_DFU is defined.
Signed-off-by: Andrew F. Davis afd@ti.com
Reviewed-by: Tom Rini trini@konsulko.com

Like AM33xx and AM43xx, DRA7xx and AM57xx devices may need to have an non-standard boot address in memory. This may be due to the device being a high security variant, which place the Initial SoftWare (ISW) after certificates and secure software.
Allow these devices to set this from Kconfig.
Signed-off-by: Andrew F. Davis afd@ti.com --- arch/arm/mach-omap2/Kconfig | 13 +++++++++++++ arch/arm/mach-omap2/am33xx/Kconfig | 15 --------------- include/configs/ti_omap5_common.h | 2 +- 3 files changed, 14 insertions(+), 16 deletions(-)
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 58e545a45b..ebe3c0f39a 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig @@ -167,6 +167,19 @@ config TI_SECURE_EMIF_PROTECTED_REGION_SIZE using hardware memory firewalls. This value must be smaller than the TI_SECURE_EMIF_TOTAL_REGION_SIZE value.
+config ISW_ENTRY_ADDR + hex "Address in memory or XIP address of bootloader entry point" + default 0x402F4000 if AM43XX + default 0x402F0400 if AM33XX + default 0x40301350 if OMAP54XX + help + After any reset, the boot ROM searches the boot media for a valid + boot image. For non-XIP devices, the ROM then copies the image into + internal memory. For all boot modes, after the ROM processes the + boot image it eventually computes the entry point address depending + on the device type (secure/non-secure), boot media (xip/non-xip) and + image headers. + source "arch/arm/mach-omap2/omap3/Kconfig"
source "arch/arm/mach-omap2/omap4/Kconfig" diff --git a/arch/arm/mach-omap2/am33xx/Kconfig b/arch/arm/mach-omap2/am33xx/Kconfig index 3529607479..5f2ee83c27 100644 --- a/arch/arm/mach-omap2/am33xx/Kconfig +++ b/arch/arm/mach-omap2/am33xx/Kconfig @@ -274,21 +274,6 @@ config SPL_RTC_DDR_SUPPORT endif
if AM43XX || AM33XX -config ISW_ENTRY_ADDR - hex "Address in memory or XIP flash of bootloader entry point" - default 0x402F4000 if AM43XX - default 0x402F0400 if AM33XX - help - After any reset, the boot ROM on the AM43XX SOC - searches the boot media for a valid boot image. - For non-XIP devices, the ROM then copies the - image into internal memory. - For all boot modes, after the ROM processes the - boot image it eventually computes the entry - point address depending on the device type - (secure/non-secure), boot media (xip/non-xip) and - image headers. - config PUB_ROM_DATA_SIZE hex "Size in bytes of the L3 SRAM reserved by ROM to store data" default 0x8400 diff --git a/include/configs/ti_omap5_common.h b/include/configs/ti_omap5_common.h index 8bf4a6b7e9..ba57c40182 100644 --- a/include/configs/ti_omap5_common.h +++ b/include/configs/ti_omap5_common.h @@ -81,7 +81,7 @@ * RAM from address 0x40301350 (0x40300000+0x1000(reserved)+0x350(cert)). */ #define TI_OMAP5_SECURE_BOOT_RESV_SRAM_SZ 0x1000 -#define CONFIG_SPL_TEXT_BASE 0x40301350 +#define CONFIG_SPL_TEXT_BASE CONFIG_ISW_ENTRY_ADDR /* If no specific start address is specified then the secure EMIF * region will be placed at the end of the DDR space. In order to prevent * the main u-boot relocation from clobbering that memory and causing a

On Wed, Dec 05, 2018 at 11:51:33AM -0600, Andrew F. Davis wrote:
Like AM33xx and AM43xx, DRA7xx and AM57xx devices may need to have an non-standard boot address in memory. This may be due to the device being a high security variant, which place the Initial SoftWare (ISW) after certificates and secure software.
Allow these devices to set this from Kconfig.
Signed-off-by: Andrew F. Davis afd@ti.com
Reviewed-by: Tom Rini trini@konsulko.com

On Wed, Dec 05, 2018 at 11:51:33AM -0600, Andrew F. Davis wrote:
Like AM33xx and AM43xx, DRA7xx and AM57xx devices may need to have an non-standard boot address in memory. This may be due to the device being a high security variant, which place the Initial SoftWare (ISW) after certificates and secure software.
Allow these devices to set this from Kconfig.
Signed-off-by: Andrew F. Davis afd@ti.com Reviewed-by: Tom Rini trini@konsulko.com
arch/arm/mach-omap2/Kconfig | 13 +++++++++++++ arch/arm/mach-omap2/am33xx/Kconfig | 15 --------------- include/configs/ti_omap5_common.h | 2 +- 3 files changed, 14 insertions(+), 16 deletions(-)
Turns out this breaks OMAP3 among others as the question is asked there now and we have no default value (nor I suspect a reasonable one). Thanks!

On 1/16/19 3:14 PM, Tom Rini wrote:
On Wed, Dec 05, 2018 at 11:51:33AM -0600, Andrew F. Davis wrote:
Like AM33xx and AM43xx, DRA7xx and AM57xx devices may need to have an non-standard boot address in memory. This may be due to the device being a high security variant, which place the Initial SoftWare (ISW) after certificates and secure software.
Allow these devices to set this from Kconfig.
Signed-off-by: Andrew F. Davis afd@ti.com Reviewed-by: Tom Rini trini@konsulko.com
arch/arm/mach-omap2/Kconfig | 13 +++++++++++++ arch/arm/mach-omap2/am33xx/Kconfig | 15 --------------- include/configs/ti_omap5_common.h | 2 +- 3 files changed, 14 insertions(+), 16 deletions(-)
Turns out this breaks OMAP3 among others as the question is asked there now and we have no default value (nor I suspect a reasonable one).
The only thing changed is ti_omap5_common.h, the default provided in that file is 0x40301350, would it be okay to just make that the default for ISW_ENTRY_ADDR for all platforms that included that file?
Andrew
Thanks!

On Thu, Jan 17, 2019 at 08:13:21AM -0600, Andrew F. Davis wrote:
On 1/16/19 3:14 PM, Tom Rini wrote:
On Wed, Dec 05, 2018 at 11:51:33AM -0600, Andrew F. Davis wrote:
Like AM33xx and AM43xx, DRA7xx and AM57xx devices may need to have an non-standard boot address in memory. This may be due to the device being a high security variant, which place the Initial SoftWare (ISW) after certificates and secure software.
Allow these devices to set this from Kconfig.
Signed-off-by: Andrew F. Davis afd@ti.com Reviewed-by: Tom Rini trini@konsulko.com
arch/arm/mach-omap2/Kconfig | 13 +++++++++++++ arch/arm/mach-omap2/am33xx/Kconfig | 15 --------------- include/configs/ti_omap5_common.h | 2 +- 3 files changed, 14 insertions(+), 16 deletions(-)
Turns out this breaks OMAP3 among others as the question is asked there now and we have no default value (nor I suspect a reasonable one).
The only thing changed is ti_omap5_common.h, the default provided in that file is 0x40301350, would it be okay to just make that the default for ISW_ENTRY_ADDR for all platforms that included that file?
Well, ISW_ENTRY_ADDR doesn't make sense for OMAP3, right? I suspect the problem is that in moving it from mach-omap2/am33xx/Kconfig to mach-omap2/Kconfig you need to update the depends on guards so that it doesn't show up where it's not used.

On 1/17/19 8:15 AM, Tom Rini wrote:
On Thu, Jan 17, 2019 at 08:13:21AM -0600, Andrew F. Davis wrote:
On 1/16/19 3:14 PM, Tom Rini wrote:
On Wed, Dec 05, 2018 at 11:51:33AM -0600, Andrew F. Davis wrote:
Like AM33xx and AM43xx, DRA7xx and AM57xx devices may need to have an non-standard boot address in memory. This may be due to the device being a high security variant, which place the Initial SoftWare (ISW) after certificates and secure software.
Allow these devices to set this from Kconfig.
Signed-off-by: Andrew F. Davis afd@ti.com Reviewed-by: Tom Rini trini@konsulko.com
arch/arm/mach-omap2/Kconfig | 13 +++++++++++++ arch/arm/mach-omap2/am33xx/Kconfig | 15 --------------- include/configs/ti_omap5_common.h | 2 +- 3 files changed, 14 insertions(+), 16 deletions(-)
Turns out this breaks OMAP3 among others as the question is asked there now and we have no default value (nor I suspect a reasonable one).
The only thing changed is ti_omap5_common.h, the default provided in that file is 0x40301350, would it be okay to just make that the default for ISW_ENTRY_ADDR for all platforms that included that file?
Well, ISW_ENTRY_ADDR doesn't make sense for OMAP3, right? I suspect the problem is that in moving it from mach-omap2/am33xx/Kconfig to mach-omap2/Kconfig you need to update the depends on guards so that it doesn't show up where it's not used.
CONFIG_SPL_TEXT_BASE should be converted to Kconfig, but cannot be right now due to some other platforms using strange methods for setting it in header files. So we have ISW_ENTRY_ADDR in Kconfig that is used to set CONFIG_SPL_TEXT_BASE. ISW_ENTRY_ADDR can be defined for any platform, I just may not be used depending on what headers it includes and whether they use it to set CONFIG_SPL_TEXT_BASE.
The change here is using it in ti_omap5_common.h, which a lot more platforms use is seems than I noticed. So all these platforms now need ISW_ENTRY_ADDR set to what the header to set them as (0x40301350).
Again, all this goes away when CONFIG_SPL_TEXT_BASE gets converted to Kconfig.
Andrew

On 1/17/19 9:11 AM, Andrew F. Davis wrote:
On 1/17/19 8:15 AM, Tom Rini wrote:
On Thu, Jan 17, 2019 at 08:13:21AM -0600, Andrew F. Davis wrote:
On 1/16/19 3:14 PM, Tom Rini wrote:
On Wed, Dec 05, 2018 at 11:51:33AM -0600, Andrew F. Davis wrote:
Like AM33xx and AM43xx, DRA7xx and AM57xx devices may need to have an non-standard boot address in memory. This may be due to the device being a high security variant, which place the Initial SoftWare (ISW) after certificates and secure software.
Allow these devices to set this from Kconfig.
Signed-off-by: Andrew F. Davis afd@ti.com Reviewed-by: Tom Rini trini@konsulko.com
arch/arm/mach-omap2/Kconfig | 13 +++++++++++++ arch/arm/mach-omap2/am33xx/Kconfig | 15 --------------- include/configs/ti_omap5_common.h | 2 +- 3 files changed, 14 insertions(+), 16 deletions(-)
Turns out this breaks OMAP3 among others as the question is asked there now and we have no default value (nor I suspect a reasonable one).
The only thing changed is ti_omap5_common.h, the default provided in that file is 0x40301350, would it be okay to just make that the default for ISW_ENTRY_ADDR for all platforms that included that file?
Well, ISW_ENTRY_ADDR doesn't make sense for OMAP3, right? I suspect the problem is that in moving it from mach-omap2/am33xx/Kconfig to mach-omap2/Kconfig you need to update the depends on guards so that it doesn't show up where it's not used.
CONFIG_SPL_TEXT_BASE should be converted to Kconfig, but cannot be right now due to some other platforms using strange methods for setting it in header files. So we have ISW_ENTRY_ADDR in Kconfig that is used to set CONFIG_SPL_TEXT_BASE. ISW_ENTRY_ADDR can be defined for any platform, I just may not be used depending on what headers it includes and whether they use it to set CONFIG_SPL_TEXT_BASE.
The change here is using it in ti_omap5_common.h, which a lot more platforms use is seems than I noticed. So all these platforms now need ISW_ENTRY_ADDR set to what the header to set them as (0x40301350).
Again, all this goes away when CONFIG_SPL_TEXT_BASE gets converted to Kconfig.
Scratch that, it's not SPL_TEXT_BASE converted to Kconfig (that's done for some platforms) it looks to be us overwriting it still in many places.
Anyway posted v3 with fix for above.
Andrew
Andrew

Add a new defconfig file for the DRA7xx High Security EVM. This config is specific for the case of USB booting.
Signed-off-by: Andrew F. Davis afd@ti.com --- MAINTAINERS | 1 + configs/dra7xx_hs_evm_usb_defconfig | 106 ++++++++++++++++++++++++++++ 2 files changed, 107 insertions(+) create mode 100644 configs/dra7xx_hs_evm_usb_defconfig
diff --git a/MAINTAINERS b/MAINTAINERS index 8ea8ef9924..e574662d9d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -651,6 +651,7 @@ F: configs/am335x_hs_evm_uart_defconfig F: configs/am43xx_hs_evm_defconfig F: configs/am57xx_hs_evm_defconfig F: configs/dra7xx_hs_evm_defconfig +F: configs/dra7xx_hs_evm_usb_defconfig F: configs/k2hk_hs_evm_defconfig F: configs/k2e_hs_evm_defconfig F: configs/k2g_hs_evm_defconfig diff --git a/configs/dra7xx_hs_evm_usb_defconfig b/configs/dra7xx_hs_evm_usb_defconfig new file mode 100644 index 0000000000..7842851491 --- /dev/null +++ b/configs/dra7xx_hs_evm_usb_defconfig @@ -0,0 +1,106 @@ +CONFIG_ARM=y +CONFIG_ARCH_OMAP2PLUS=y +CONFIG_TI_SECURE_DEVICE=y +CONFIG_TI_COMMON_CMD_OPTIONS=y +CONFIG_SYS_MALLOC_F_LEN=0x2000 +CONFIG_OMAP54XX=y +CONFIG_TI_SECURE_EMIF_REGION_START=0xbdb00000 +CONFIG_TI_SECURE_EMIF_TOTAL_REGION_SIZE=0x02000000 +CONFIG_TI_SECURE_EMIF_PROTECTED_REGION_SIZE=0x01c00000 +CONFIG_ISW_ENTRY_ADDR=0x40306d50 +CONFIG_TARGET_DRA7XX_EVM=y +CONFIG_SPL=y +CONFIG_SPL_SPI_FLASH_SUPPORT=y +CONFIG_SPL_SPI_SUPPORT=y +CONFIG_ARMV7_LPAE=y +CONFIG_AHCI=y +CONFIG_DISTRO_DEFAULTS=y +CONFIG_NR_DRAM_BANKS=2 +CONFIG_FIT_IMAGE_POST_PROCESS=y +CONFIG_SPL_LOAD_FIT=y +CONFIG_SPL_FIT_IMAGE_POST_PROCESS=y +CONFIG_OF_BOARD_SETUP=y +CONFIG_USE_BOOTARGS=y +CONFIG_BOOTARGS="androidboot.serialno=${serial#} console=ttyS0,115200 androidboot.console=ttyS0 androidboot.hardware=jacinto6evmboard" +# CONFIG_USE_BOOTCOMMAND is not set +CONFIG_SYS_CONSOLE_INFO_QUIET=y +# CONFIG_MISC_INIT_R is not set +CONFIG_VERSION_VARIABLE=y +CONFIG_BOARD_EARLY_INIT_F=y +CONFIG_SPL_SYS_MALLOC_SIMPLE=y +CONFIG_SPL_SEPARATE_BSS=y +CONFIG_SPL_DMA_SUPPORT=y +# CONFIG_SPL_NAND_SUPPORT is not set +CONFIG_SPL_RAM_SUPPORT=y +CONFIG_SPL_SPI_LOAD=y +CONFIG_SPL_USB_GADGET_SUPPORT=y +CONFIG_SPL_DFU=y +CONFIG_SPL_YMODEM_SUPPORT=y +# CONFIG_CMD_FLASH is not set +# CONFIG_CMD_SETEXPR is not set +CONFIG_OF_CONTROL=y +CONFIG_SPL_OF_CONTROL=y +CONFIG_DEFAULT_DEVICE_TREE="dra7-evm" +CONFIG_OF_LIST="dra7-evm dra72-evm dra72-evm-revc dra71-evm dra76-evm" +CONFIG_ENV_IS_IN_MMC=y +CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y +CONFIG_DM=y +CONFIG_SPL_DM=y +CONFIG_SPL_REGMAP=y +CONFIG_SPL_SYSCON=y +CONFIG_DWC_AHCI=y +CONFIG_DFU_MMC=y +CONFIG_DFU_RAM=y +CONFIG_DFU_SF=y +CONFIG_USB_FUNCTION_FASTBOOT=y +CONFIG_FASTBOOT_BUF_ADDR=0x82000000 +CONFIG_FASTBOOT_BUF_SIZE=0x2F000000 +CONFIG_FASTBOOT_FLASH=y +CONFIG_FASTBOOT_FLASH_MMC_DEV=1 +CONFIG_FASTBOOT_CMD_OEM_FORMAT=y +CONFIG_DM_GPIO=y +CONFIG_PCF8575_GPIO=y +CONFIG_DM_I2C=y +CONFIG_DM_MMC=y +CONFIG_MMC_IO_VOLTAGE=y +CONFIG_MMC_UHS_SUPPORT=y +CONFIG_MMC_HS200_SUPPORT=y +CONFIG_MMC_OMAP_HS=y +CONFIG_DM_SPI_FLASH=y +CONFIG_SPI_FLASH=y +CONFIG_SPI_FLASH_BAR=y +CONFIG_SPI_FLASH_SPANSION=y +CONFIG_DM_ETH=y +CONFIG_PHY_GIGE=y +CONFIG_MII=y +CONFIG_DRIVER_TI_CPSW=y +CONFIG_SPL_PHY=y +CONFIG_PIPE3_PHY=y +CONFIG_PMIC_PALMAS=y +CONFIG_PMIC_LP873X=y +CONFIG_DM_REGULATOR_FIXED=y +CONFIG_DM_REGULATOR_GPIO=y +CONFIG_DM_REGULATOR_PALMAS=y +CONFIG_DM_REGULATOR_LP873X=y +CONFIG_DM_SCSI=y +CONFIG_DM_SERIAL=y +CONFIG_SPI=y +CONFIG_DM_SPI=y +CONFIG_TI_QSPI=y +CONFIG_TIMER=y +CONFIG_OMAP_TIMER=y +CONFIG_USB=y +CONFIG_DM_USB=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_XHCI_DWC3=y +CONFIG_USB_XHCI_DRA7XX_INDEX=1 +CONFIG_USB_DWC3=y +CONFIG_USB_DWC3_GADGET=y +CONFIG_USB_DWC3_OMAP=y +CONFIG_USB_DWC3_PHY_OMAP=y +CONFIG_OMAP_USB_PHY=y +CONFIG_USB_STORAGE=y +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments" +CONFIG_USB_GADGET_VENDOR_NUM=0x0451 +CONFIG_USB_GADGET_PRODUCT_NUM=0xd022

On Wed, Dec 05, 2018 at 11:51:34AM -0600, Andrew F. Davis wrote:
Add a new defconfig file for the DRA7xx High Security EVM. This config is specific for the case of USB booting.
Signed-off-by: Andrew F. Davis afd@ti.com
Reviewed-by: Tom Rini trini@konsulko.com

Add a new defconfig file for the AM57xx High Security EVM. This config is specific for the case of USB/UART booting.
Signed-off-by: Andrew F. Davis afd@ti.com --- MAINTAINERS | 1 + configs/am57xx_hs_evm_usb_defconfig | 92 +++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+) create mode 100644 configs/am57xx_hs_evm_usb_defconfig
diff --git a/MAINTAINERS b/MAINTAINERS index e574662d9d..c021ec2024 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -650,6 +650,7 @@ F: configs/am335x_hs_evm_defconfig F: configs/am335x_hs_evm_uart_defconfig F: configs/am43xx_hs_evm_defconfig F: configs/am57xx_hs_evm_defconfig +F: configs/am57xx_hs_evm_usb_defconfig F: configs/dra7xx_hs_evm_defconfig F: configs/dra7xx_hs_evm_usb_defconfig F: configs/k2hk_hs_evm_defconfig diff --git a/configs/am57xx_hs_evm_usb_defconfig b/configs/am57xx_hs_evm_usb_defconfig new file mode 100644 index 0000000000..a0c42387ec --- /dev/null +++ b/configs/am57xx_hs_evm_usb_defconfig @@ -0,0 +1,92 @@ +CONFIG_ARM=y +CONFIG_ARCH_OMAP2PLUS=y +CONFIG_TI_SECURE_DEVICE=y +CONFIG_TI_COMMON_CMD_OPTIONS=y +CONFIG_SYS_MALLOC_F_LEN=0x2000 +CONFIG_OMAP54XX=y +CONFIG_TI_SECURE_EMIF_REGION_START=0xbdb00000 +CONFIG_TI_SECURE_EMIF_TOTAL_REGION_SIZE=0x02000000 +CONFIG_TI_SECURE_EMIF_PROTECTED_REGION_SIZE=0x01c00000 +CONFIG_ISW_ENTRY_ADDR=0x40306d50 +CONFIG_TARGET_AM57XX_EVM=y +CONFIG_SPL=y +CONFIG_SPL_SPI_FLASH_SUPPORT=y +CONFIG_SPL_SPI_SUPPORT=y +CONFIG_ARMV7_LPAE=y +CONFIG_DISTRO_DEFAULTS=y +CONFIG_NR_DRAM_BANKS=2 +CONFIG_FIT_IMAGE_POST_PROCESS=y +CONFIG_SPL_LOAD_FIT=y +CONFIG_SPL_FIT_IMAGE_POST_PROCESS=y +CONFIG_OF_BOARD_SETUP=y +CONFIG_USE_BOOTARGS=y +CONFIG_BOOTARGS="androidboot.serialno=${serial#} console=ttyS2,115200 androidboot.console=ttyS2 androidboot.hardware=beagle_x15board" +# CONFIG_USE_BOOTCOMMAND is not set +CONFIG_SYS_CONSOLE_INFO_QUIET=y +# CONFIG_MISC_INIT_R is not set +CONFIG_VERSION_VARIABLE=y +CONFIG_BOARD_EARLY_INIT_F=y +CONFIG_SPL_SYS_MALLOC_SIMPLE=y +CONFIG_SPL_SEPARATE_BSS=y +CONFIG_SPL_DMA_SUPPORT=y +# CONFIG_SPL_NAND_SUPPORT is not set +CONFIG_SPL_RAM_SUPPORT=y +CONFIG_SPL_SPI_LOAD=y +CONFIG_SPL_USB_GADGET_SUPPORT=y +CONFIG_SPL_DFU=y +CONFIG_SPL_YMODEM_SUPPORT=y +# CONFIG_CMD_FLASH is not set +# CONFIG_CMD_SETEXPR is not set +CONFIG_OF_CONTROL=y +CONFIG_SPL_OF_CONTROL=y +CONFIG_DEFAULT_DEVICE_TREE="am57xx-beagle-x15" +CONFIG_OF_LIST="am57xx-beagle-x15 am57xx-beagle-x15-revb1 am57xx-beagle-x15-revc am572x-idk am571x-idk am574x-idk" +CONFIG_ENV_IS_IN_MMC=y +CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y +CONFIG_DM=y +CONFIG_SPL_DM=y +CONFIG_SCSI_AHCI=y +# CONFIG_BLK is not set +CONFIG_DFU_MMC=y +CONFIG_DFU_RAM=y +CONFIG_USB_FUNCTION_FASTBOOT=y +CONFIG_FASTBOOT_BUF_ADDR=0x82000000 +CONFIG_FASTBOOT_BUF_SIZE=0x2F000000 +CONFIG_FASTBOOT_USB_DEV=1 +CONFIG_FASTBOOT_FLASH=y +CONFIG_FASTBOOT_FLASH_MMC_DEV=1 +CONFIG_FASTBOOT_CMD_OEM_FORMAT=y +CONFIG_DM_GPIO=y +CONFIG_DM_I2C=y +CONFIG_DM_MMC=y +CONFIG_MMC_OMAP_HS=y +CONFIG_DM_SPI_FLASH=y +CONFIG_SPI_FLASH=y +CONFIG_SPI_FLASH_BAR=y +CONFIG_SPI_FLASH_SPANSION=y +CONFIG_PHY_MICREL=y +CONFIG_PHY_MICREL_KSZ90X1=y +CONFIG_DM_ETH=y +CONFIG_MII=y +CONFIG_DRIVER_TI_CPSW=y +CONFIG_DM_PMIC=y +CONFIG_PMIC_PALMAS=y +CONFIG_DM_REGULATOR=y +CONFIG_DM_REGULATOR_PALMAS=y +CONFIG_DM_SERIAL=y +CONFIG_SPI=y +CONFIG_DM_SPI=y +CONFIG_TI_QSPI=y +CONFIG_USB=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_XHCI_DWC3=y +CONFIG_USB_DWC3=y +CONFIG_USB_DWC3_GADGET=y +CONFIG_USB_DWC3_OMAP=y +CONFIG_USB_DWC3_PHY_OMAP=y +CONFIG_OMAP_USB_PHY=y +CONFIG_USB_STORAGE=y +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments" +CONFIG_USB_GADGET_VENDOR_NUM=0x0451 +CONFIG_USB_GADGET_PRODUCT_NUM=0xd022

On Wed, Dec 05, 2018 at 11:51:35AM -0600, Andrew F. Davis wrote:
Add a new defconfig file for the AM57xx High Security EVM. This config is specific for the case of USB/UART booting.
Signed-off-by: Andrew F. Davis afd@ti.com
Reviewed-by: Tom Rini trini@konsulko.com

Booting from UART and USB on HS devices is now supported for this platform. Update documentation for the same.
Signed-off-by: Andrew F. Davis afd@ti.com --- doc/README.ti-secure | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/doc/README.ti-secure b/doc/README.ti-secure index 4b5380c0f3..76950253ac 100644 --- a/doc/README.ti-secure +++ b/doc/README.ti-secure @@ -108,7 +108,8 @@ Booting of U-Boot SPL Invoking the script for DRA7xx/AM57xx Secure Devices ====================================================
- create-boot-image.sh <IMAGE_TYPE> <INPUT_FILE> <OUTPUT_FILE> + create-boot-image.sh \ + <IMAGE_TYPE> <INPUT_FILE> <OUTPUT_FILE> <SPL_LOAD_ADDR>
<IMAGE_TYPE> is a value that specifies the type of the image to generate OR the action the image generation tool will take. Valid @@ -116,7 +117,6 @@ Booting of U-Boot SPL X-LOADER - Generates an image for NOR or QSPI boot modes MLO - Generates an image for SD/MMC/eMMC boot modes ULO - Generates an image for USB/UART peripheral boot modes - Note: ULO is not yet used by the u-boot build process
<INPUT_FILE> is the full path and filename of the public world boot loader binary file (for this platform, this is always u-boot-spl.bin). @@ -130,9 +130,13 @@ Booting of U-Boot SPL the device ROM bootloader requires for loading from the FAT partition of an SD card (same as on non-secure devices) + u-boot-spl_HS_ULO - boot image for USB/UART peripheral boot modes u-boot-spl_HS_X-LOADER - boot image for all other flash memories including QSPI and NOR flash
+ <SPL_LOAD_ADDR> is the address at which SOC ROM should load the + <INPUT_FILE> + Invoking the script for Keystone2 Secure Devices =============================================

On Wed, Dec 05, 2018 at 11:51:36AM -0600, Andrew F. Davis wrote:
Booting from UART and USB on HS devices is now supported for this platform. Update documentation for the same.
Signed-off-by: Andrew F. Davis afd@ti.com
Reviewed-by: Tom Rini trini@konsulko.com

On 12/6/18 3:41 PM, Tom Rini wrote:
On Wed, Dec 05, 2018 at 11:51:36AM -0600, Andrew F. Davis wrote:
Booting from UART and USB on HS devices is now supported for this platform. Update documentation for the same.
Signed-off-by: Andrew F. Davis afd@ti.com
Reviewed-by: Tom Rini trini@konsulko.com
Ping?

On 05/12/18 11:21 PM, Andrew F. Davis wrote:
Hello all,
This series adds USB boot support to HS DRA7xx/AM57xx platforms.
We start by cleaning up DFU boot in SPL support. What is done in the first patch for DFU, if acceptable, should be done to the other boot modes.
The 4th patch is needed as on HS devices a header is added to the boot image that tells the ROM where to load this image. This only works for block device booting as the ROM can read the header and move the image into memory in steps. For streaming boot modes USB/ UART/NET the image is placed in memory as it is received from the media live. This means the header is ignored and the image has a fixed offset in memory.
For AM47xx we align the boot modes by making the offset for block device booting the same as the fixed offset for streaming boot modes, in this way only one defconfig is needed. For DRA7xx/AM57xx the signing tools will need to be updated to support specifying this address, when this is done the offset in the base HS defconfig can be moved to match the new offset and the defconfigs added here in patch 5 and 6 can be unified back into the base HS defconfig.
The last patch updates the docs for the same above.
For the entire series:
Reviewed-by: Lokesh Vutla lokeshvutla@ti.com
Thanks and regards, Lokesh
Thanks, Andrew
Changes from v1:
- Drop explicit UART boot support from DRA7xx as this cannot be tested
Andrew F. Davis (7): spl: Kconfig: Drop the _SUPPORT postfix from SPL_DFU dfu: Make DFU support more SPL friendly dfu: Remove dependency on HUSH parser in SPL ARM: mach-omap2: Kconfig: Allow OMAP5 devices to set entry point defconfigs: Add config for DRA7xx High Security EVM with USB Boot support defconfigs: Add config for AM57xx High Security EVM with USB/UART Boot support doc: ti-secure: Add ULO info for AM57xx/DRA7xx secure devices from TI
MAINTAINERS | 2 + arch/arm/cpu/armv8/zynqmp/spl.c | 2 +- arch/arm/mach-omap2/Kconfig | 13 ++++ arch/arm/mach-omap2/am33xx/Kconfig | 15 ---- arch/arm/mach-omap2/boot-common.c | 2 +- common/Makefile | 3 +- common/cli.c | 2 +- common/spl/Kconfig | 6 +- common/spl/Makefile | 2 +- common/spl/spl_ram.c | 4 +- configs/am57xx_hs_evm_usb_defconfig | 92 ++++++++++++++++++++++++ configs/dra7xx_hs_evm_usb_defconfig | 106 ++++++++++++++++++++++++++++ doc/README.ti-secure | 8 ++- drivers/Makefile | 3 +- drivers/dfu/Makefile | 12 ++-- drivers/usb/gadget/Makefile | 2 +- include/configs/dra7xx_evm.h | 2 +- include/configs/ti_omap5_common.h | 2 +- include/configs/xilinx_zynqmp.h | 4 +- include/dfu.h | 10 +-- 20 files changed, 246 insertions(+), 46 deletions(-) create mode 100644 configs/am57xx_hs_evm_usb_defconfig create mode 100644 configs/dra7xx_hs_evm_usb_defconfig
participants (3)
-
Andrew F. Davis
-
Lokesh Vutla
-
Tom Rini