J721E HS Fixes
Subsystems (2)
v5 cover J721E HS Fixes
This series fixes the support for J721E board along with some maintainance for it.
v5:
- change the memory map to list-table
v4:
- Fix docs
- applied reviewed-by
v3:
- drop fixes related to other boards ( make series j721e specific )
- memory map added in docs
- applied reviewed-by
v2:
- Merge two series
- Include some more commits that fix the gp builds when merging defconfigs
- Update MAINTAINERS to remove hs related defconfigs
- applied Acks
Andrew Davis (1):
arm: k3: config.mk: Add missing dependencies on tispl.bin HS
Dave Gerlach (1):
arm: mach-k3: Increase SYSFW max image size
Manorit Chawdhry (2):
configs: j721e: Merge the HS and non-HS defconfigs
Kconfig: j721e: Change K3_MCU_SCRATCHPAD_BASE to non firewalled region
MAINTAINERS | 2 - arch/arm/mach-k3/Kconfig | 6 +- arch/arm/mach-k3/config.mk | 2 + configs/j721e_evm_a72_defconfig | 3 +- configs/j721e_evm_r5_defconfig | 11 +- configs/j721e_hs_evm_a72_defconfig | 208 ----------------------------- configs/j721e_hs_evm_r5_defconfig | 176 ------------------------ doc/board/ti/j721e_evm.rst | 43 ++++++ 8 files changed, 59 insertions(+), 392 deletions(-) delete mode 100644 configs/j721e_hs_evm_a72_defconfig delete mode 100644 configs/j721e_hs_evm_r5_defconfig
Signature · 1 line
2.34.1
PATCH v5 1/4 arm: k3: config.mk: Add missing dependencies on tispl.bin HS
From: Andrew Davis <[email protected]>
When building for secure devices using non-buildman based image generation the signed tispl.bin file is called tispl.bin_HS. Also build the unsigned tispl.bin file as expected.
--- arch/arm/mach-k3/config.mk | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/mach-k3/config.mk +2 -0
@@ -68,6 +68,8 @@ ifeq ($(CONFIG_TI_SECURE_DEVICE),y) SPL_ITS := u-boot-spl-k3_HS.its $(SPL_ITS): export IS_HS=1 INPUTS-y += tispl.bin_HS +INPUTS-y += tispl.bin +tispl.bin: $(obj)/u-boot-spl-nodtb.bin_HS $(patsubst %,$(obj)/dts/%.dtb_HS,$(subst ",,$(CONFIG_SPL_OF_LIST))) else SPL_ITS := u-boot-spl-k3.its INPUTS-y += tispl.bin
Signature · 1 line
2.34.1
PATCH v5 2/4 configs: j721e: Merge the HS and non-HS defconfigs
In reply to Manorit ChawdhryK3 devices have runtime type board detection. Make the default defconfig include the secure configuration. Then remove the HS specific config.
Non-HS devices will continue to boot due to runtime device type detection. If TI_SECURE_DEV_PKG is not set the build will emit warnings, for non-HS devices these can be ignored.
--- MAINTAINERS | 2 - configs/j721e_evm_a72_defconfig | 3 +- configs/j721e_evm_r5_defconfig | 1 + configs/j721e_hs_evm_a72_defconfig | 208 ----------------------------- configs/j721e_hs_evm_r5_defconfig | 176 ------------------------ 5 files changed, 3 insertions(+), 387 deletions(-) delete mode 100644 configs/j721e_hs_evm_a72_defconfig delete mode 100644 configs/j721e_hs_evm_r5_defconfig
MAINTAINERS +0 -2
@@ -1462,8 +1462,6 @@ F: configs/am65x_hs_evm_r5_defconfig F: configs/am65x_hs_evm_a53_defconfig F: configs/j7200_hs_evm_a72_defconfig F: configs/j7200_hs_evm_r5_defconfig -F: configs/j721e_hs_evm_a72_defconfig -F: configs/j721e_hs_evm_r5_defconfig F: configs/j721s2_hs_evm_a72_defconfig F: configs/j721s2_hs_evm_r5_defconfig
configs/j721e_evm_a72_defconfig +2 -1
@@ -1,5 +1,6 @@ CONFIG_ARM=y CONFIG_ARCH_K3=y +CONFIG_TI_SECURE_DEVICE=y CONFIG_SYS_MALLOC_LEN=0x2000000 CONFIG_SYS_MALLOC_F_LEN=0x8000 CONFIG_SPL_GPIO=y
@@ -30,7 +31,7 @@ CONFIG_DISTRO_DEFAULTS=y CONFIG_SPL_LOAD_FIT=y CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000 CONFIG_OF_BOARD_SETUP=y -CONFIG_BOOTCOMMAND="run findfdt; run distro_bootcmd; run init_${boot}; run main_cpsw0_qsgmii_phyinit; run boot_rprocs; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern" +CONFIG_BOOTCOMMAND="run findfdt; run envboot; run init_${boot}; run main_cpsw0_qsgmii_phyinit; run boot_rprocs; if test ${boot_fit} -eq 1; then run get_fit_${boot}; run get_overlaystring; run run_fit; else; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern; fi;" CONFIG_LOGLEVEL=7 CONFIG_SPL_MAX_SIZE=0xc0000 CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
configs/j721e_evm_r5_defconfig +1 -0
@@ -1,5 +1,6 @@ CONFIG_ARM=y CONFIG_ARCH_K3=y +CONFIG_TI_SECURE_DEVICE=y CONFIG_SYS_MALLOC_LEN=0x2000000 CONFIG_SYS_MALLOC_F_LEN=0x70000 CONFIG_SPL_GPIO=y
configs/j721e_hs_evm_a72_defconfig deleted +0 -208
208 lines not on this page · raw message
configs/j721e_hs_evm_r5_defconfig deleted +0 -176
176 lines not on this page · raw message
Signature · 1 line
2.34.1
Re: [PATCH v5 2/4] configs: j721e: Merge the HS and non-HS defconfigs
Hi Manorit!
On March 15, 2023 thus sayeth Manorit Chawdhry:
Quoted 19 lines
K3 devices have runtime type board detection. Make the default defconfig include the secure configuration. Then remove the HS specific config.
Non-HS devices will continue to boot due to runtime device type detection. If
TI_SECURE_DEV_PKGis not set the build will emit warnings, for non-HS devices these can be ignored.Signed-off-by Manorit Chawdhry <[email protected]>Acked-by Andrew Davis <[email protected]>--- MAINTAINERS | 2 - configs/j721e_evm_a72_defconfig | 3 +- configs/j721e_evm_r5_defconfig | 1 + configs/j721e_hs_evm_a72_defconfig | 208 ----------------------------- configs/j721e_hs_evm_r5_defconfig | 176 ------------------------ 5 files changed, 3 insertions(+), 387 deletions(-) delete mode 100644 configs/j721e_hs_evm_a72_defconfig delete mode 100644 configs/j721e_hs_evm_r5_defconfig
...
configs/j721e_evm_a72_defconfig CONFIG_DISTRO_DEFAULTS=y · line 34
Quoted 3 lines
CONFIG_OF_BOARD_SETUP=yconfigs/j721e_evm_a72_defconfig +1
-1-CONFIG_BOOTCOMMAND="run findfdt; run distro_bootcmd; run init_${boot}; run main_cpsw0_qsgmii_phyinit; run boot_rprocs; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern" +CONFIG_BOOTCOMMAND="run findfdt; run envboot; run init_${boot}; run main_cpsw0_qsgmii_phyinit; run boot_rprocs; if test ${boot_fit} -eq 1; then run get_fit_${boot}; run get_overlaystring; run run_fit; else; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern; fi;"
I'm curious, do we need to drop the distro_bootcmd step?
~Bryan
Re: [PATCH v5 2/4] configs: j721e: Merge the HS and non-HS defconfigs
Quoted 23 lines · Bryan Brattlof
Hi Manorit!
On March 15, 2023 thus sayeth Manorit Chawdhry:
Quoted 9 lines
K3 devices have runtime type board detection. Make the default defconfig include the secure configuration. Then remove the HS specific config.
Non-HS devices will continue to boot due to runtime device type detection. If
TI_SECURE_DEV_PKGis not set the build will emit warnings, for non-HS devices these can be ignored.Signed-off-by Manorit Chawdhry <[email protected]>Acked-by Andrew Davis <[email protected]>Quoted 10 lines
--- MAINTAINERS | 2 - configs/j721e_evm_a72_defconfig | 3 +- configs/j721e_evm_r5_defconfig | 1 + configs/j721e_hs_evm_a72_defconfig | 208 ----------------------------- configs/j721e_hs_evm_r5_defconfig | 176 ------------------------ 5 files changed, 3 insertions(+), 387 deletions(-) delete mode 100644 configs/j721e_hs_evm_a72_defconfig delete mode 100644 configs/j721e_hs_evm_r5_defconfig
Quoted 8 lines
...
configs/j721e_evm_a72_defconfig CONFIG_DISTRO_DEFAULTS=y · line 34
Quoted 3 lines
CONFIG_OF_BOARD_SETUP=yconfigs/j721e_evm_a72_defconfig +1
-1-CONFIG_BOOTCOMMAND="run findfdt; run distro_bootcmd; run init_${boot}; run main_cpsw0_qsgmii_phyinit; run boot_rprocs; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern" +CONFIG_BOOTCOMMAND="run findfdt; run envboot; run init_${boot}; run main_cpsw0_qsgmii_phyinit; run boot_rprocs; if test ${boot_fit} -eq 1; then run get_fit_${boot}; run get_overlaystring; run run_fit; else; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern; fi;"I'm curious, do we need to drop the
distro_bootcmdstep?
Hi Bryan,
I believe that was a mistake on my part, need to fix it. Thanks for noticing!
Regards,
Manorit
Quoted 2 lines
~Bryan
PATCH v5 3/4 Kconfig: j721e: Change K3_MCU_SCRATCHPAD_BASE to non firewalled region
In reply to Manorit ChawdhryIn non-combined boot flow for K3, all the firewalls are locked by default until sysfw comes up. Rom configures some of the firewall for its usage along with the SRAM for R5 but the PSRAM region is still locked.
The K3 MCU Scratchpad for j721e was set to a PSRAM region triggering the firewall exception before sysfw came up. The exception started happening after adding multi dtb support that accesses the scratchpad for reading EEPROM contents.
The commit changes R5 MCU scratchpad for j721e to an SRAM region.
Old Map:
┌─────────────────────────────────────┐ 0x41c00000 │ SPL │ ├─────────────────────────────────────┤ 0x41c40000 (approx) │ STACK │ ├─────────────────────────────────────┤ 0x41c85b20 │ Global data │ │ sizeof(struct global_data) = 0xd8 │ ├─────────────────────────────────────┤ gd->malloc_base = 0x41c85bfc │ HEAP │ │ CONFIG_SYS_MALLOC_F_LEN = 0x70000 │ ├─────────────────────────────────────┤ CONFIG_SPL_BSS_START_ADDR │ SPL BSS │ (0x41cf5bfc) │ CONFIG_SPL_BSS_MAX_SIZE = 0xA000 │ └─────────────────────────────────────┘ CONFIG_SYS_K3_BOOT_PARAM_TABLE_INDEX (0x41cffbfc)
New Map:
┌─────────────────────────────────────┐ 0x41c00000 │ SPL │ ├─────────────────────────────────────┤ 0x41c40000 (approx) │ EMPTY │ ├─────────────────────────────────────┤ 0x41c81920 │ STACK │ │ SPL_SIZE_LIMIT_PROVIDE_STACK=0x4000 │ ├─────────────────────────────────────┤ 0x41c85920 │ Global data │ │ sizeof(struct global_data) = 0xd8 │ ├─────────────────────────────────────┤ gd->malloc_base = 0x41c859f0 │ HEAP │ │ CONFIG_SYS_MALLOC_F_LEN = 0x70000 │ ├─────────────────────────────────────┤ CONFIG_SPL_BSS_START_ADDR │ SPL BSS │ (0x41cf59f0) │ CONFIG_SPL_BSS_MAX_SIZE = 0xA000 │ ├─────────────────────────────────────┤ 0x41cff9fc │ NEW MCU SCRATCHPAD │ │ SYS_K3_MCU_SCRATCHPAD_SIZE = 0x200 │ └─────────────────────────────────────┘ CONFIG_SYS_K3_BOOT_PARAM_TABLE_INDEX (0x41cffbfc)
--- arch/arm/mach-k3/Kconfig | 3 ++- configs/j721e_evm_r5_defconfig | 10 ++++++-- doc/board/ti/j721e_evm.rst | 43 ++++++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 3 deletions(-)
arch/arm/mach-k3/Kconfig +2 -1
@@ -52,7 +52,8 @@ config SYS_K3_MAX_DOWNLODABLE_IMAGE_SIZE config SYS_K3_MCU_SCRATCHPAD_BASE hex default 0x40280000 if SOC_K3_AM654 - default 0x40280000 if SOC_K3_J721E || SOC_K3_J721S2 + default 0x40280000 if SOC_K3_J721S2 + default 0x41cff9fc if SOC_K3_J721E help Describes the base address of MCU Scratchpad RAM.
configs/j721e_evm_r5_defconfig +8 -2
@@ -21,10 +21,16 @@ CONFIG_SPL_MMC=y CONFIG_SPL_SERIAL=y CONFIG_SPL_DRIVERS_MISC=y CONFIG_SPL_STACK_R_ADDR=0x82000000 +CONFIG_SPL_SIZE_LIMIT=0xf59f0 +CONFIG_SPL_SIZE_LIMIT_SUBTRACT_GD=y +CONFIG_SPL_SIZE_LIMIT_SUBTRACT_MALLOC=y +CONFIG_SPL_SIZE_LIMIT_PROVIDE_STACK=0x4000 CONFIG_SPL_FS_FAT=y CONFIG_SPL_LIBDISK_SUPPORT=y CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI=y +CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y +CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x41cf59f0 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL_LOAD_FIT=y CONFIG_SPL_LOAD_FIT_ADDRESS=0x80080000
@@ -32,9 +38,9 @@ CONFIG_SPL_FIT_IMAGE_POST_PROCESS=y CONFIG_OF_BOARD_SETUP=y CONFIG_USE_BOOTCOMMAND=y # CONFIG_DISPLAY_CPUINFO is not set -CONFIG_SPL_MAX_SIZE=0xc0000 +CONFIG_SPL_MAX_SIZE=0xf59f0 CONFIG_SPL_HAS_BSS_LINKER_SECTION=y -CONFIG_SPL_BSS_START_ADDR=0x41cf5bfc +CONFIG_SPL_BSS_START_ADDR=0x41cf59f0 CONFIG_SPL_BSS_MAX_SIZE=0xa000 CONFIG_SPL_BOARD_INIT=y CONFIG_SPL_STACK_R=y
doc/board/ti/j721e_evm.rst +43 -0
49 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH v5 4/4 arm: mach-k3: Increase SYSFW max image size
In reply to Manorit ChawdhryFrom: Dave Gerlach <[email protected]>
When booting with HS silicon, the system firmware image is 278270, which is slightly larger than currently allocated amount.
This can cause unexpected behavior if this overlap interferes with other things in memory, so increase this with a slightly margin added as well to avoid any boot issues that can appear after system firmware gets loaded.
--- arch/arm/mach-k3/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
arch/arm/mach-k3/Kconfig +1 -2
@@ -141,8 +141,7 @@ config K3_SYSFW_IMAGE_MMCSD_RAW_MODE_PART config K3_SYSFW_IMAGE_SIZE_MAX int "Amount of memory dynamically allocated for loading SYSFW blob" depends on K3_LOAD_SYSFW - default 163840 if SOC_K3_AM625 || SOC_K3_AM62A7 - default 278000 + default 280000 help Amount of memory (in bytes) reserved through dynamic allocation at runtime for loading the combined System Firmware and configuration image
Signature · 1 line
2.34.1