Re: [PATCH] mach-k3: am62*: am62*_init: Prohibit boot from UDA w/ eMMC boot

2025-07-11 Thread Anshul Dalal
5e36 ("mach-k3: add eMMC FS boot support for am62[ap]") > Fixes: 664593464634 ("arm: mach-k3: am625: Relax emmc boot condition") > Signed-off-by: Judith Mendez Reviewed-by: Anshul Dalal Thanks for the fix, Anshul

[PATCH v5 4/4] board: add call to k3_mem_map_init for all k3 boards

2025-07-03 Thread Anshul Dalal
k3_mem_map_init configures the MMU at runtime by querying the device-tree for DDR size for each bank as well as creating carveouts for OPTEE and ATF in the first bank. Therefore add a call to k3_mem_map_init in dram_init for all k3 vendor boards. Signed-off-by: Anshul Dalal --- board/beagle

[PATCH v5 3/4] mach-k3: add dynamic mmu fixups for SPL stage

2025-07-03 Thread Anshul Dalal
properly allocate the required space for the framebuffer. Therefore this patch adds k3_spl_mem_map_init which adds the required MMU entry by querying the gd after the framebuffer size has been computed in spl_reserve_video_from_ram_top. Signed-off-by: Anshul Dalal --- arch/arm/mach-k3/arm64/arm64

[PATCH v5 2/4] mach-k3: add runtime configuration of MMU table

2025-07-03 Thread Anshul Dalal
sking each call to k3_mem_map_init behind an ifdef CONFIG_ARM64. Signed-off-by: Anshul Dalal --- arch/arm/mach-k3/arm64/arm64-mmu.c | 133 + arch/arm/mach-k3/include/mach/k3-ddr.h | 1 + arch/arm/mach-k3/r5/common.c | 5 + board/ti/common/k3-

[PATCH v5 1/4] mach-k3: use minimal MMU table for all k3

2025-07-03 Thread Anshul Dalal
future use cases such as falcon boot from the A-Core SPL etc. Signed-off-by: Anshul Dalal --- arch/arm/mach-k3/arm64/arm64-mmu.c | 38 -- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git a/arch/arm/mach-k3/arm64/arm64-mmu.c b/arch/arm/mach-k3/arm64/arm64

[PATCH v5 0/4] Add support for dynamic MMU configuration

2025-07-03 Thread Anshul Dalal
ependency to: https://lore.kernel.org/u-boot/20250522150941.563959-1-ansh...@ti.com/ v1: https://lore.kernel.org/u-boot/20250602120054.1466951-1-ansh...@ti.com/ --- Anshul Dalal (4): mach-k3: use minimal MMU table for all k3 mach-k3: add runtime configuration of MMU table mach-k3: add dynam

[PATCH v1] configs: am62x: fix CONFIG_NR_DRAM_BANKS to 1

2025-07-03 Thread Anshul Dalal
nfigs: Add am62x_beagleplay_*_defconfig") Fixes: 2d257d9279e3 ("configs: Add configs for AM62x SK") Fixes: 085cd6459dae ("board: phytec: am62x: Add PHYTEC phyCORE-AM62x SoM") Fixes: 7d1a10659f5b ("board: toradex: add verdin am62 support") S

Re: [PATCH v4 1/2] mach-k3: add runtime memory carveouts for MMU table

2025-06-27 Thread Anshul Dalal
On Sat Jun 28, 2025 at 12:12 AM IST, Andrew Davis wrote: > On 6/27/25 1:09 PM, Tom Rini wrote: >> On Fri, Jun 27, 2025 at 01:06:50PM -0500, Andrew Davis wrote: >>> On 6/18/25 7:42 AM, Anshul Dalal wrote: >>>> In u-boot we only provide a single MMU table for all k3

Re: [RFC PATCH v1 2/4] spl: Kconfig: allow disabling fallback during os boot

2025-06-26 Thread Anshul Dalal
On Fri Jun 27, 2025 at 5:17 AM IST, Tom Rini wrote: > On Thu, Jun 26, 2025 at 05:34:40PM +0530, Anshul Dalal wrote: > >> During falcon boot in FS mode, if the SPL fails to load the payload >> (kernel image and args), the execution fallbacks to standard u-boot boot >> mode.

Re: [RFC PATCH v1 4/4] cmd: Kconfig: disable loading raw images in secure os boot

2025-06-26 Thread Anshul Dalal
On Fri Jun 27, 2025 at 5:17 AM IST, Tom Rini wrote: > On Thu, Jun 26, 2025 at 05:34:42PM +0530, Anshul Dalal wrote: > >> Raw kernel images can not be authenticated so disable loading such >> binaries in secure falcon mode. This change restricts the falcon mode >> SPL to FIT

[RFC PATCH v1 2/4] spl: Kconfig: allow disabling fallback during os boot

2025-06-26 Thread Anshul Dalal
ms. Signed-off-by: Anshul Dalal --- common/spl/Kconfig | 10 + common/spl/spl_mmc.c | 87 2 files changed, 65 insertions(+), 32 deletions(-) diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 8d153c2e9c9..d5d3a41ce61 100644 --- a/com

[RFC PATCH v1 0/4] Add support for secure boot in falcon mode

2025-06-26 Thread Anshul Dalal
been verified on MMC FS boot but I can expand support to other boot media if this is the right direction for achieving secure falcon boot. Happy booting, Anshul --- [1]: https://lore.kernel.org/u-boot/20250603142452.2707171-1-ansh...@ti.com/ --- Anshul Dalal (4): spl: Kconfig: add SPL_SECURE_OS_BOOT c

[RFC PATCH v1 4/4] cmd: Kconfig: disable loading raw images in secure os boot

2025-06-26 Thread Anshul Dalal
Raw kernel images can not be authenticated so disable loading such binaries in secure falcon mode. This change restricts the falcon mode SPL to FIT as the only viable boot image which can be authenticated. Signed-off-by: Anshul Dalal --- cmd/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1

[RFC PATCH v1 3/4] spl: Kconfig: disallow loading args in falcon mode

2025-06-26 Thread Anshul Dalal
isabled. Signed-off-by: Anshul Dalal --- common/spl/Kconfig | 10 ++ common/spl/spl_ext.c | 5 + common/spl/spl_fat.c | 5 + 3 files changed, 20 insertions(+) diff --git a/common/spl/Kconfig b/common/spl/Kconfig index d5d3a41ce61..b2dbe2eea65 100644 --- a/common/spl/Kcon

[RFC PATCH v1 1/4] spl: Kconfig: add SPL_SECURE_OS_BOOT config symbol

2025-06-26 Thread Anshul Dalal
This patch adds the new SPL_SECURE_OS_BOOT symbol that enables secure boot flow in falcon mode. Signed-off-by: Anshul Dalal --- common/spl/Kconfig | 7 +++ 1 file changed, 7 insertions(+) diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 880192043c4..8d153c2e9c9 100644 --- a

[RFC] board_f: why is TLB size estimated before board_init_banksize

2025-06-19 Thread Anshul Dalal
Hi all, I was trying to create an MMU table (set as mem_map) at runtime when I encountered an issue with the init sequence for u-boot (defined in initcall_run_f at common/board.f:893). As part of the MMU creation, I am adding entries for all the memory banks as per gd->bd->bi_dram which is set af

Re: [PATCH v3 1/2] mach-k3: add runtime memory carveouts for MMU table

2025-06-18 Thread Anshul Dalal
On Tue Jun 17, 2025 at 7:28 PM IST, Anshul Dalal wrote: > In u-boot we only provide a single MMU table for all k3 platforms, > this does not scale for devices with reserved memory outside the range > 0x9e78 - 0xa000 (eg j722s[1]) or for devices with < 2GiB of > memory (e

[PATCH v4 2/2] mach-k3: add dynamic mmu fixups for SPL stage

2025-06-18 Thread Anshul Dalal
of the final binary so overall, the spl size is not impacted[1]. [1]: Tested on clang 19.1.7 and gcc 15.1.1 Signed-off-by: Anshul Dalal --- arch/arm/mach-k3/arm64/arm64-mmu.c | 44 ++ arch/arm/mach-k3/common.c | 13 ++-- arch/arm/mach-k3/include/mach

[PATCH v4 1/2] mach-k3: add runtime memory carveouts for MMU table

2025-06-18 Thread Anshul Dalal
res the reserved memory regions that all exist past 0x8808 are non cacheable preventing speculative accesses to those addresses. Signed-off-by: Anshul Dalal --- Changes for v4: - Add call to k3_mem_map_init for beagleplay - Mark reserved regions as non-cacheable - More debug logs v3: ht

Re: [PATCH v3 1/2] mach-k3: add runtime memory carveouts for MMU table

2025-06-18 Thread Anshul Dalal
On Wed Jun 18, 2025 at 3:56 PM IST, Udit Kumar wrote: > > On 6/17/2025 7:28 PM, Anshul Dalal wrote: >> In u-boot we only provide a single MMU table for all k3 platforms, >> this does not scale for devices with reserved memory outside the range >> 0x9e78 - 0xa

[PATCH v3 2/2] mach-k3: add dynamic mmu fixups for SPL stage

2025-06-17 Thread Anshul Dalal
of the final binary so overall, the spl size is not impacted[1]. [1]: Tested on clang 19.1.7 and gcc 15.1.1 Signed-off-by: Anshul Dalal --- arch/arm/mach-k3/arm64/arm64-mmu.c | 44 ++ arch/arm/mach-k3/common.c | 13 ++-- arch/arm/mach-k3/include/mach

[PATCH v3 1/2] mach-k3: add runtime memory carveouts for MMU table

2025-06-17 Thread Anshul Dalal
nge also ensures the reserved memory regions that all exist past 0x8808 are non cacheable preventing speculative accesses to those addresses. [1]: https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/arch/arm/mach-k3/arm64/arm64-mmu.c?h=ti-u-boot-2025.01-next#n54 Signed-off-by: Anshul Da

[PATCH v1] arm: Kconfig: enable LTO for ARCH_K3

2025-06-16 Thread Anshul Dalal
CONFIG_LTO enables Link Time Optimizations that helps in reducing binary size. The config has been validated on all K3 platforms so can be safely enabled. Signed-off-by: Anshul Dalal --- arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig

Re: [PATCH v7 01/10] spl: Kconfig: allow K3 devices to use falcon mode

2025-06-12 Thread Anshul Dalal
On Thu Jun 12, 2025 at 8:35 PM IST, Tom Rini wrote: > On Thu, Jun 12, 2025 at 10:05:38AM +0530, Anshul Dalal wrote: >> On Tue Jun 10, 2025 at 8:14 PM IST, Tom Rini wrote: >> > On Tue, Jun 10, 2025 at 02:01:59PM +0530, Anshul Dalal wrote: >> >> On Mon Jun 9, 2025

Re: [PATCH -next 3/5] binman: add sysfw-inner-cert to missing-blob-help

2025-06-11 Thread Anshul Dalal
oot without this certificate. > + > +Have a look at your board's documentation to find and include the latest > +TIFS certificate blobs and how to include them in the build. > + > +https://docs.u-boot.org/en/latest/board/ti/k3.html Nit: With the entries ordered alphabetically in the 1st patch, the entry `sysfw-inner-cert` should go after `scp-sunxi` instead. Reviewed-by: Anshul Dalal

Re: [PATCH -next 2/5] binman: add ti-dm entry to missing-blob-help

2025-06-11 Thread Anshul Dalal
on on how to obtain the firmware binaries > > Signed-off-by: Bryan Brattlof Reviewed-by: Anshul Dalal

Re: [PATCH -next 1/5] binman: alphabetize missing-blob entries

2025-06-11 Thread Anshul Dalal
On Wed Jun 11, 2025 at 11:47 PM IST, Bryan Brattlof wrote: > As the list of entries grows let's alphabetize the list to make > searching a little easier. No functional changes intended > > Signed-off-by: Bryan Brattlof Reviewed-by: Anshul Dalal

Re: [PATCH v7 01/10] spl: Kconfig: allow K3 devices to use falcon mode

2025-06-11 Thread Anshul Dalal
On Tue Jun 10, 2025 at 8:14 PM IST, Tom Rini wrote: > On Tue, Jun 10, 2025 at 02:01:59PM +0530, Anshul Dalal wrote: >> On Mon Jun 9, 2025 at 8:29 PM IST, Tom Rini wrote: >> > On Mon, Jun 09, 2025 at 05:38:37PM +0530, Anshul Dalal wrote: >> >> On Sat Jun 7, 2025 a

[PATCH v2] mach-k3: mmu: add dynamic carveouts for MMU table

2025-06-10 Thread Anshul Dalal
all exist past 0x8808 are non cacheable preventing speculative accesses to those addresses. [1]: https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/arch/arm/mach-k3/arm64/arm64-mmu.c?h=ti-u-boot-2025.01-next#n54 Signed-off-by: Anshul Dalal --- Changes in v2: - Removed dependency to: ht

Re: [PATCH v7 07/10] board: ti: add default dtb for am62 in falcon mode

2025-06-10 Thread Anshul Dalal
On Tue Jun 10, 2025 at 8:16 PM IST, Tom Rini wrote: > On Tue, Jun 10, 2025 at 03:41:21PM +0530, Anshul Dalal wrote: >> On Mon Jun 9, 2025 at 8:27 PM IST, Tom Rini wrote: >> > On Mon, Jun 09, 2025 at 01:05:36PM +0530, Anshul Dalal wrote: >> >> On Sat Jun 7, 2025 a

Re: [PATCH v7 04/10] arch: arm: k3-binman: add fit for falcon boot

2025-06-10 Thread Anshul Dalal
On Mon Jun 9, 2025 at 8:53 PM IST, Andrew Davis wrote: > On 6/9/25 2:28 AM, Anshul Dalal wrote: >> On Fri Jun 6, 2025 at 5:27 PM IST, Bryan Brattlof wrote: >>> On June 3, 2025 thus sayeth Anshul Dalal: >>>> This adds creation of tispl_falcon.bin for the am62a, 62p a

Re: [PATCH v7 07/10] board: ti: add default dtb for am62 in falcon mode

2025-06-10 Thread Anshul Dalal
On Mon Jun 9, 2025 at 8:27 PM IST, Tom Rini wrote: > On Mon, Jun 09, 2025 at 01:05:36PM +0530, Anshul Dalal wrote: >> On Sat Jun 7, 2025 at 12:39 AM IST, Tom Rini wrote: >> > On Tue, Jun 03, 2025 at 07:54:47PM +0530, Anshul Dalal wrote: >> > >> >> The SPL_F

Re: [PATCH v7 01/10] spl: Kconfig: allow K3 devices to use falcon mode

2025-06-10 Thread Anshul Dalal
On Mon Jun 9, 2025 at 8:29 PM IST, Tom Rini wrote: > On Mon, Jun 09, 2025 at 05:38:37PM +0530, Anshul Dalal wrote: >> On Sat Jun 7, 2025 at 12:36 AM IST, Tom Rini wrote: >> > On Tue, Jun 03, 2025 at 07:54:41PM +0530, Anshul Dalal wrote: >> > >> >> Falcon mo

Re: [PATCH v3 3/3] common/spl: improve error handling in spl_fit

2025-06-09 Thread Anshul Dalal
ever use 0x0 as a s/non/none Everything else looks good to me, thanks for the patch Mikhail. Reviewed-by: Anshul Dalal > + * valid load address. Theoretically some board could use it, > + * but this is extremely unlikely. > + */

Re: [PATCH v7 01/10] spl: Kconfig: allow K3 devices to use falcon mode

2025-06-09 Thread Anshul Dalal
On Sat Jun 7, 2025 at 12:36 AM IST, Tom Rini wrote: > On Tue, Jun 03, 2025 at 07:54:41PM +0530, Anshul Dalal wrote: > >> Falcon mode was disabled for TI_SECURE_DEVICE at commit e95b9b4437bc >> ("ti_armv7_common: Disable Falcon Mode on HS devices") for older 32-bit >

Re: [PATCH v7 08/10] mach-k3: common: enable falcon mode for 62 platform

2025-06-09 Thread Anshul Dalal
On Sat Jun 7, 2025 at 12:45 AM IST, Tom Rini wrote: > On Tue, Jun 03, 2025 at 07:54:48PM +0530, Anshul Dalal wrote: >> We use the spl_board_prepare_for_boot hook to call k3_falcon_prep which >> is ran after tispl is loaded but before jump_to_image. >> >> In here, we f

Re: [PATCH] dtc: Add Kconfig option to pad device tree blob

2025-06-09 Thread Anshul Dalal
On Tue Jun 3, 2025 at 10:36 PM IST, Eric Schikschneit wrote: > This will allow arch(s) that use device tree blobs to pad the end of the > device tree so they can be modified by board files at run time. This will > help prevent errors such as FDT_ERR_NOSPACE from occuring. > > Signed-off-by: Eric Sc

Re: [PATCH 08/12] arm: imx: remove unnecessary volatile qualifiers from "save gd" variables

2025-06-09 Thread Anshul Dalal
On Thu Jun 5, 2025 at 1:26 AM IST, Rasmus Villemoes wrote: > Now that the global gd pointer is no longer volatile-qualified, > there's no reason for the temporary variables used for > saving/restoring it to have that qualifier. > > Signed-off-by: Rasmus Villemoes Tested-by: Anshul Dalal

Re: [PATCH 01/12] arm: drop volatile qualifier from gd pointer

2025-06-09 Thread Anshul Dalal
be done in follow-up patches. > > Signed-off-by: Rasmus Villemoes Tested-by: Anshul Dalal

Re: [PATCH v7 07/10] board: ti: add default dtb for am62 in falcon mode

2025-06-09 Thread Anshul Dalal
On Sat Jun 7, 2025 at 12:39 AM IST, Tom Rini wrote: > On Tue, Jun 03, 2025 at 07:54:47PM +0530, Anshul Dalal wrote: > >> The SPL_FS_LOAD_ARGS_NAME config is used for the arguments to the kernel >> (dtb in our case) in falcon boot. >> >> Setting it in board specific

Re: [PATCH v7 04/10] arch: arm: k3-binman: add fit for falcon boot

2025-06-09 Thread Anshul Dalal
On Fri Jun 6, 2025 at 5:27 PM IST, Bryan Brattlof wrote: > On June 3, 2025 thus sayeth Anshul Dalal: >> This adds creation of tispl_falcon.bin for the am62a, 62p and 62x. >> >> The contents are the same as the existing tispl.bin but A53's spl and >> the fdt h

Re: [PATCH v1] ti: k3: abstract common fdt api for reserved mem fixups

2025-06-04 Thread Anshul Dalal
On Wed Jun 4, 2025 at 11:27 PM IST, Tom Rini wrote: > On Thu, May 22, 2025 at 08:39:40PM +0530, Anshul Dalal wrote: > >> The usage of fdt_fixup_reserved is repeated for ATF and OP-TEE for >> multiple platforms, this patch creates a single fdt API for fixing up >> the r

Re: [PATCH] sandbox: solve undefined reference to pthread_kill symbol

2025-06-04 Thread Anshul Dalal
Hi Raymond, On Wed Jun 4, 2025 at 2:30 AM IST, Raymond Mao wrote: > Hi Tom, > > On Tue, 3 Jun 2025 at 15:23, Tom Rini wrote: >> >> On Tue, Jun 03, 2025 at 02:00:23PM -0400, Raymond Mao wrote: >> > Hi Tom, >> > >> > On Tue, 3 Jun 2025 at 11:47, Tom Rini wrote: >> > > >> > > On Tue, Jun 03, 2025 a

[PATCH v7 10/10] doc: ti: am62: add falcon mode documentation

2025-06-03 Thread Anshul Dalal
reference, one for the modified tispl_falcon.bin and other for the falcon specific fitImage format. Signed-off-by: Anshul Dalal --- doc/board/ti/am62ax_sk.rst| 7 + doc/board/ti/am62px_sk.rst| 7 + doc/board/ti/am62x_sk.rst | 289

[PATCH v7 09/10] Makefile: update tispl regex to also clean falcon spl

2025-06-03 Thread Anshul Dalal
Build for A53 on am62 platforms now generates tispl_falcon.bin alongside tispl.bin, edit the regex for `make clean` so that both files are removed. Signed-off-by: Anshul Dalal --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f88684947ee

[PATCH v7 08/10] mach-k3: common: enable falcon mode for 62 platform

2025-06-03 Thread Anshul Dalal
(PRELOADED_BL33_BASE and K3_HW_CONFIG_BASE). Signed-off-by: Anshul Dalal --- arch/arm/mach-k3/common.c | 107 ++ 1 file changed, 107 insertions(+) diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c index fc230f180d0..70317fec19c 100644 --- a

[PATCH v7 07/10] board: ti: add default dtb for am62 in falcon mode

2025-06-03 Thread Anshul Dalal
The SPL_FS_LOAD_ARGS_NAME config is used for the arguments to the kernel (dtb in our case) in falcon boot. Setting it in board specific Kconfig allows us to reuse the same config fragment 'am62x_r5_falcon.config' for all 3 platforms for enabling falcon boot. Signed-off-by: An

[PATCH v7 06/10] config: add falcon boot config fragment for am62x

2025-06-03 Thread Anshul Dalal
+---+ BL32_BASE in ATF 24MiB | OPTEE | 0xa000 +---+ End of DDR (512MiB) Signed-off-by: Anshul Dalal --- configs/am62x_r5_falcon.config | 38 ++ 1 file changed, 38 insertions(+) create mode 100644 configs

[PATCH v7 05/10] mach-k3: sysfw-loader: update img_hdr for falcon

2025-06-03 Thread Anshul Dalal
The returned legacy_img_hdr is used by booti_setup to compute the load address for the kernel image. This change ensures the kernel load address is CONFIG_SYS_LOAD_ADDR in falcon boot. Signed-off-by: Anshul Dalal --- arch/arm/mach-k3/r5/sysfw-loader.c | 6 +- 1 file changed, 5 insertions

[PATCH v7 04/10] arch: arm: k3-binman: add fit for falcon boot

2025-06-03 Thread Anshul Dalal
cating the spl and fdt in secure boot. Signed-off-by: Anshul Dalal --- arch/arm/dts/k3-am625-sk-binman.dtsi | 64 arch/arm/dts/k3-am62a-sk-binman.dtsi | 64 arch/arm/dts/k3-am62p-sk-binman.dtsi | 51 ++ arch/

[PATCH v7 03/10] mach-k3: fix reading size and addr from fdt on R5

2025-06-03 Thread Anshul Dalal
: Anshul Dalal --- arch/arm/mach-k3/common_fdt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-k3/common_fdt.c b/arch/arm/mach-k3/common_fdt.c index 867ed173142..4824650ac76 100644 --- a/arch/arm/mach-k3/common_fdt.c +++ b/arch/arm/mach-k3/common_fdt.c

[PATCH v7 02/10] spl: make CMD_BOOTZ exclusive with TI_SECURE_DEVICE

2025-06-03 Thread Anshul Dalal
spl_parse_image_header. Signed-off-by: Anshul Dalal --- cmd/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/Kconfig b/cmd/Kconfig index f21d27cb27f..4c23f04c699 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -353,6 +353,7 @@ config BOOTM_ELF config CMD_BOOTZ bool "

[PATCH v7 01/10] spl: Kconfig: allow K3 devices to use falcon mode

2025-06-03 Thread Anshul Dalal
with TIFS keys for authentication. Signed-off-by: Anshul Dalal --- common/spl/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 77cf04d38ed..bc5a334a1c5 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -1190

[PATCH v7 00/10] Add falcon support for am62a, 62p and 62x

2025-06-03 Thread Anshul Dalal
o load the kernel and kernel expects a 2MiB aligned load address, the existing PRELOADED_BL33_BASE has to be changed for ATF to 0x8200 with K3_HW_CONFIG_BASE set to 0x8800 for the DTB. Signed-off-by: Anshul Dalal --- Changes in v7: * Replaced AM62a/p documentation with a hyperlink to AM62x

[RFC PATCH v1] mach-k3: mmu: add dynamic carveouts for MMU table

2025-06-02 Thread Anshul Dalal
tps://lore.kernel.org/u-boot/20250522150941.563959-1-ansh...@ti.com/ Signed-off-by: Anshul Dalal --- arch/arm/mach-k3/arm64/arm64-mmu.c | 222 +++-- arch/arm/mach-k3/include/mach/k3-ddr.h | 9 + board/ti/common/k3-ddr.c | 10 ++ 3 files changed, 228 inserti

Re: [PATCH v6 1/9] spl: Kconfig: allow K3 devices to use falcon mode

2025-05-30 Thread Anshul Dalal
On Thu May 29, 2025 at 7:06 AM IST, Andrew Davis wrote: > On 5/28/25 8:08 PM, Anshul Dalal wrote: >> On Wed May 28, 2025 at 9:09 PM IST, Andrew Davis wrote: >>> On 5/8/25 6:37 AM, Anshul Dalal wrote: >>>> On Thu May 8, 2025 at 9:32 AM IST, Vignesh Raghavendra wrote: &

Re: [PATCH v6 1/9] spl: Kconfig: allow K3 devices to use falcon mode

2025-05-28 Thread Anshul Dalal
On Wed May 28, 2025 at 9:09 PM IST, Andrew Davis wrote: > On 5/8/25 6:37 AM, Anshul Dalal wrote: >> On Thu May 8, 2025 at 9:32 AM IST, Vignesh Raghavendra wrote: >>> >>> >>> On 5/8/2025 8:42 AM, Anshul Dalal wrote: >>>> On Wed May 7, 2025 at 11:36 P

[PATCH v1] ti: k3: abstract common fdt api for reserved mem fixups

2025-05-22 Thread Anshul Dalal
fdt_fixup_reserved_memory function with the required parameters. Signed-off-by: Anshul Dalal --- arch/arm/mach-k3/am62ax/am62a7_fdt.c | 5 + arch/arm/mach-k3/am62px/am62p5_fdt.c | 5 + arch/arm/mach-k3/am62x/am625_fdt.c | 5 + arch/arm/mach-k3/common_fdt.c| 22

[PATCH v1] mach-k3: am62ax: enable caches for the SPL stage

2025-05-22 Thread Anshul Dalal
board_init_f for the am62a is missing the call to spl_enable_cache which exists for all other am62 platforms (check am625_init.c & am62p5_init.c). This allows the usage of caches while loading and parsing the u-boot.img FIT resulting in ~2x speedup in the A53 SPL stage. Signed-off-by: An

Re: [PATCH v2 7/7] arm: mach-k3: r5: common: Add support to boot HSM M4 core

2025-05-08 Thread Anshul Dalal
On Tue May 6, 2025 at 4:12 PM IST, Beleswar Padhi wrote: > The tispl.bin fit image is packed with the HSM firmware image. Populate > the "os" info of the image so that it can be detected and used to load > the HSM core. Further, invoke the load and boot of HSM core at R5 SPL > stage. Boot flow for

Re: [PATCH v2 4/7] arm: dts: k3-{j721s2/j784s4}-binman: Pack HSM firmware inside tispl.bin

2025-05-08 Thread Anshul Dalal
On Wed May 7, 2025 at 8:53 PM IST, Andrew Davis wrote: > On 5/7/25 9:56 AM, Beleswar Prasad Padhi wrote: >> >> On 5/7/2025 3:09 PM, Anshul Dalal wrote: >>> On Tue May 6, 2025 at 4:11 PM IST, Beleswar Padhi wrote: >>>> Pack the HSM firmware in tispl.bin

Re: [PATCH v2 4/7] arm: dts: k3-{j721s2/j784s4}-binman: Pack HSM firmware inside tispl.bin

2025-05-08 Thread Anshul Dalal
On Wed May 7, 2025 at 8:53 PM IST, Andrew Davis wrote: > On 5/7/25 9:56 AM, Beleswar Prasad Padhi wrote: >> >> On 5/7/2025 3:09 PM, Anshul Dalal wrote: >>> On Tue May 6, 2025 at 4:11 PM IST, Beleswar Padhi wrote: >>>> Pack the HSM firmware in tispl.bin

Re: [PATCH v6 1/9] spl: Kconfig: allow K3 devices to use falcon mode

2025-05-08 Thread Anshul Dalal
On Thu May 8, 2025 at 9:32 AM IST, Vignesh Raghavendra wrote: > > > On 5/8/2025 8:42 AM, Anshul Dalal wrote: >> On Wed May 7, 2025 at 11:36 PM IST, Andrew Davis wrote: >>> On 5/6/25 10:33 PM, Anshul Dalal wrote: >>>> On Tue May 6, 2025 at 8:03 PM IST, Andrew D

Re: [PATCH v6 1/9] spl: Kconfig: allow K3 devices to use falcon mode

2025-05-07 Thread Anshul Dalal
On Wed May 7, 2025 at 11:36 PM IST, Andrew Davis wrote: > On 5/6/25 10:33 PM, Anshul Dalal wrote: >> On Tue May 6, 2025 at 8:03 PM IST, Andrew Davis wrote: >>> On 4/28/25 9:12 AM, Anshul Dalal wrote: >>>> Falcon mode was disabled for TI_SECURE_DEVICE at commit e95b9

Re: [PATCH v2 4/7] arm: dts: k3-{j721s2/j784s4}-binman: Pack HSM firmware inside tispl.bin

2025-05-07 Thread Anshul Dalal
On Tue May 6, 2025 at 4:11 PM IST, Beleswar Padhi wrote: > Pack the HSM firmware in tispl.bin fit image so that it can be unloaded > and used by R5 SPL to boot the HSM core. By default, point to the > firmware for HS-SE device type. This needs to be changed to point to > appropriate firmware when u

Re: [PATCH v6 1/9] spl: Kconfig: allow K3 devices to use falcon mode

2025-05-06 Thread Anshul Dalal
On Tue May 6, 2025 at 8:03 PM IST, Andrew Davis wrote: > On 4/28/25 9:12 AM, Anshul Dalal wrote: >> Falcon mode was disabled for TI_SECURE_DEVICE at commit e95b9b4437bc >> ("ti_armv7_common: Disable Falcon Mode on HS devices") for older 32-bit >> HS devices a

Re: Pull request efi-2025-07-rc2

2025-05-01 Thread Anshul Dalal
On Thu May 1, 2025 at 9:46 PM IST, Heinrich Schuchardt wrote: > Dear Tom, > > This pull request fixes the "installing EFI_LOAD_FILE2_PROTOCOL failed" > issue. > > --- > > @Anshul, > > I had to rebase your series because one line which you tried to change > from ..code-block:: to ..prompt:: did no

[PATCH v1] board: ti: common: Kconfig: add CMD_CACHE

2025-05-01 Thread Anshul Dalal
Add CMD_CACHE to list of configs implied by TI_COMMON_CMD_OPTIONS. This allows the usage of cache commands from U-Boot prompt. Signed-off-by: Anshul Dalal --- board/ti/common/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/board/ti/common/Kconfig b/board/ti/common/Kconfig index

Re: [PATCH v1] arm: add call to cleanup_before_linux for go command

2025-04-30 Thread Anshul Dalal
On Wed Apr 30, 2025 at 7:46 PM IST, Tom Rini wrote: > On Wed, Apr 30, 2025 at 07:27:50PM +0530, Anshul Dalal wrote: > >> As discussed here[1], the go command causes undefined behavior when used >> for running custom OSes since the icache might hold outdated data. OSes >>

[PATCH v1] arm: add call to cleanup_before_linux for go command

2025-04-30 Thread Anshul Dalal
rnel.org/u-boot/d9dxl95mtq8i.3euy0c6m2l...@ti.com/ Signed-off-by: Anshul Dalal --- arch/arm/lib/Makefile | 1 + arch/arm/lib/boot.c | 16 2 files changed, 17 insertions(+) create mode 100644 arch/arm/lib/boot.c diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile in

[PATCH v1 2/2] doc: ti: k3: add language for code-block directive

2025-04-29 Thread Anshul Dalal
Signed-off-by: Anshul Dalal --- doc/board/ti/k3.rst | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/board/ti/k3.rst b/doc/board/ti/k3.rst index 0deb4d768f9..b79f1526446 100644 --- a/doc/board/ti/k3.rst +++ b/doc/board/ti/k3.rst @@ -460,7 +460,7 @@ The Kernel FIT

[PATCH v1 1/2] doc: ti: update bash code-block directives to prompt

2025-04-29 Thread Anshul Dalal
ect/sphinx-prompt/ Signed-off-by: Anshul Dalal --- doc/board/ti/am62ax_sk.rst | 20 ++-- doc/board/ti/am62px_sk.rst | 18 +- doc/board/ti/j722s_evm.rst | 14 +++--- doc/board/ti/j784s4_evm.rst | 16 4 files changed, 34 insertions(+), 34

[PATCH v6 9/9] doc: ti: am62: add falcon mode documentation

2025-04-28 Thread Anshul Dalal
reference, one for the modified tispl_falcon.bin and other for the falcon specific fitImage format. Signed-off-by: Anshul Dalal --- doc/board/ti/am62ax_sk.rst| 7 + doc/board/ti/am62px_sk.rst| 7 + doc/board/ti/am62x_sk.rst | 290

[PATCH v6 8/9] Makefile: update tispl regex to also clean falcon spl

2025-04-28 Thread Anshul Dalal
Build for A53 on am62 platforms now generates tispl_falcon.bin alongside tispl.bin, edit the regex for `make clean` so that both files are removed. Signed-off-by: Anshul Dalal --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e83672b1823

[PATCH v6 7/9] mach-k3: common: enable falcon mode for 62 platform

2025-04-28 Thread Anshul Dalal
(PRELOADED_BL33_BASE and K3_HW_CONFIG_BASE). Signed-off-by: Anshul Dalal --- arch/arm/mach-k3/common.c | 107 ++ 1 file changed, 107 insertions(+) diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c index fa8cd93d664..ad5ed92eb03 100644 --- a

[PATCH v6 6/9] board: ti: add default dtb for am62 in falcon mode

2025-04-28 Thread Anshul Dalal
The SPL_FS_LOAD_ARGS_NAME config is used for the arguments to the kernel (dtb in our case) in falcon boot. Setting it in board specific Kconfig allows us to reuse the same config fragment 'am62x_r5_falcon.config' for all 3 platforms for enabling falcon boot. Signed-off-by: An

[PATCH v6 5/9] config: add falcon boot config fragment for am62x

2025-04-28 Thread Anshul Dalal
+---+ BL32_BASE in ATF 24MiB | OPTEE | 0xa000 +---+ End of DDR (512MiB) Signed-off-by: Anshul Dalal --- configs/am62x_r5_falcon.config | 38 ++ 1 file changed, 38 insertions(+) create mode 100644 configs

[PATCH v6 4/9] mach-k3: sysfw-loader: update img_hdr for falcon

2025-04-28 Thread Anshul Dalal
The returned legacy_img_hdr is used by booti_setup to compute the load address for the kernel image. This change ensures the kernel load address is CONFIG_SYS_LOAD_ADDR in falcon boot. Signed-off-by: Anshul Dalal --- arch/arm/mach-k3/r5/sysfw-loader.c | 6 +- 1 file changed, 5 insertions

[PATCH v6 3/9] arch: arm: k3-binman: add fit for falcon boot

2025-04-28 Thread Anshul Dalal
cating the spl and fdt in secure boot. Signed-off-by: Anshul Dalal --- arch/arm/dts/k3-am625-sk-binman.dtsi | 64 arch/arm/dts/k3-am62a-sk-binman.dtsi | 64 arch/arm/dts/k3-am62p-sk-binman.dtsi | 51 ++ arch/

[PATCH v6 2/9] mach-k3: fix reading size and addr from fdt on R5

2025-04-28 Thread Anshul Dalal
: Anshul Dalal --- arch/arm/mach-k3/common_fdt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-k3/common_fdt.c b/arch/arm/mach-k3/common_fdt.c index 361b0c0b31b..c227743f9f8 100644 --- a/arch/arm/mach-k3/common_fdt.c +++ b/arch/arm/mach-k3/common_fdt.c

[PATCH v6 1/9] spl: Kconfig: allow K3 devices to use falcon mode

2025-04-28 Thread Anshul Dalal
with TIFS keys for authentication. Signed-off-by: Anshul Dalal --- common/spl/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/spl/Kconfig b/common/spl/Kconfig index c08045f9c8d..68e900e9b91 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -1165

[PATCH v6 0/9] Add falcon support for am62a, 62p and 62x

2025-04-28 Thread Anshul Dalal
o load the kernel and kernel expects a 2MiB aligned load address, the existing PRELOADED_BL33_BASE has to be changed for ATF to 0x8200 with K3_HW_CONFIG_BASE set to 0x8800 for the DTB. Signed-off-by: Anshul Dalal --- Changes in v6: * Added A53 build steps in docs * Had git add SVGs as te

Re: [PATCH v5 9/9] doc: ti: am62: add falcon mode documentation

2025-04-27 Thread Anshul Dalal
On Fri Apr 25, 2025 at 11:35 PM IST, Tom Rini wrote: > On Fri, Apr 25, 2025 at 08:26:40PM +0530, Anshul Dalal wrote: >> This patch adds user documentation for falcon boot for am62 platforms. >> The main section is added to am62x_sk.rst and other documents just >> include

[PATCH v5 5/9] config: add falcon boot config fragment for am62x

2025-04-25 Thread Anshul Dalal
+---+ BL32_BASE in ATF 24MiB | OPTEE | 0xa000 +---+ End of DDR (512MiB) Signed-off-by: Anshul Dalal --- configs/am62x_r5_falcon.config | 38 ++ 1 file changed, 38 insertions(+) create mode 100644 configs

[PATCH v5 9/9] doc: ti: am62: add falcon mode documentation

2025-04-25 Thread Anshul Dalal
reference, one for the modified tispl_falcon.bin and other for the falcon specific fitImage format. Signed-off-by: Anshul Dalal --- doc/board/ti/am62ax_sk.rst| 7 + doc/board/ti/am62px_sk.rst| 7 + doc/board/ti/am62x_sk.rst | 248

[PATCH v5 8/9] Makefile: update tispl regex to also clean falcon spl

2025-04-25 Thread Anshul Dalal
Build for A53 on am62 platforms now generates tispl_falcon.bin alongside tispl.bin, edit the regex for `make clean` so that both files are removed. Signed-off-by: Anshul Dalal --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e83672b1823

[PATCH v5 7/9] mach-k3: common: enable falcon mode for 62 platform

2025-04-25 Thread Anshul Dalal
(PRELOADED_BL33_BASE and K3_HW_CONFIG_BASE). Signed-off-by: Anshul Dalal --- arch/arm/mach-k3/common.c | 107 ++ 1 file changed, 107 insertions(+) diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c index fa8cd93d664..ad5ed92eb03 100644 --- a

[PATCH v5 3/9] arch: arm: k3-binman: add fit for falcon boot

2025-04-25 Thread Anshul Dalal
cating the spl and fdt in secure boot. Signed-off-by: Anshul Dalal --- arch/arm/dts/k3-am625-sk-binman.dtsi | 64 arch/arm/dts/k3-am62a-sk-binman.dtsi | 64 arch/arm/dts/k3-am62p-sk-binman.dtsi | 51 ++ arch/

[PATCH v5 6/9] board: ti: add default dtb for am62 in falcon mode

2025-04-25 Thread Anshul Dalal
The SPL_FS_LOAD_ARGS_NAME config is used for the arguments to the kernel (dtb in our case) in falcon boot. Setting it in board specific Kconfig allows us to reuse the same config fragment 'am62x_r5_falcon.config' for all 3 platforms for enabling falcon boot. Signed-off-by: An

[PATCH v5 4/9] mach-k3: sysfw-loader: update img_hdr for falcon

2025-04-25 Thread Anshul Dalal
The returned legacy_img_hdr is used by booti_setup to compute the load address for the kernel image. This change ensures the kernel load address is CONFIG_SYS_LOAD_ADDR in falcon boot. Signed-off-by: Anshul Dalal --- arch/arm/mach-k3/r5/sysfw-loader.c | 6 +- 1 file changed, 5 insertions

[PATCH v5 2/9] mach-k3: fix reading size and addr from fdt on R5

2025-04-25 Thread Anshul Dalal
: Anshul Dalal --- arch/arm/mach-k3/common_fdt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-k3/common_fdt.c b/arch/arm/mach-k3/common_fdt.c index 361b0c0b31b..c227743f9f8 100644 --- a/arch/arm/mach-k3/common_fdt.c +++ b/arch/arm/mach-k3/common_fdt.c

[PATCH v5 1/9] spl: Kconfig: allow K3 devices to use falcon mode

2025-04-25 Thread Anshul Dalal
with TIFS keys for authentication. Signed-off-by: Anshul Dalal --- common/spl/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/spl/Kconfig b/common/spl/Kconfig index c08045f9c8d..68e900e9b91 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -1165

[PATCH v5 0/9] Add falcon support for am62a, 62p and 62x

2025-04-25 Thread Anshul Dalal
o load the kernel and kernel expects a 2MiB aligned load address, the existing PRELOADED_BL33_BASE has to be changed for ATF to 0x8200 with K3_HW_CONFIG_BASE set to 0x8800 for the DTB. Signed-off-by: Anshul Dalal --- Changes in v5: * Added documentation * Moved address for kerne

[RFC] Expected behavior of the go command

2025-04-23 Thread Anshul Dalal
Hi all, I was trying to understand how the go command is expected to work when used to load custom OSes. My use case requires getting a proprietary OS to boot using the go command on a TI K3 platform. The OS expects caches to be flushed and the mmu to be disabled before we jump to it. The go comm

Re: [PATCH v1 0/4] k3: migrate SPL_TEXT_BASE to new address

2025-04-17 Thread Anshul Dalal
On Thu Apr 17, 2025 at 1:21 AM IST, Nishanth Menon wrote: > On 11:38-20250416, Andrew Davis wrote: >> > > >How about u-boot documentation? >> > > >> > > I will update that in the next revision along with any feedback I >> > > receive on this patch. >> > >> > IMHO, This change is too intru

Re: [PATCH v4 0/8] Add falcon support for am62a, 62p and 62x

2025-04-17 Thread Anshul Dalal
On Wed Apr 16, 2025 at 1:15 PM IST, Anshul Dalal wrote: > This patch set adds support for falcon boot on AM62a, 62p and 62x by > bypassing A53 SPL and U-boot. > > Existing Boot flow: > R5 SPL -> ATF -> A53 SPL -> U-Boot -> Linux Kernel > > Updated flow: > R5 SPL

Re: [PATCH v1 0/4] k3: migrate SPL_TEXT_BASE to new address

2025-04-16 Thread Anshul Dalal
On Wed Apr 16, 2025 at 4:54 PM IST, Nishanth Menon wrote: > On 13:00-20250416, Anshul Dalal wrote: >> The change to ATF's PRELOADED_BL33_BASE[1] requires respective changes to >> SPL_TEXT_BASE on u-boot side. This is necessary to allow the ATF to jump >> directly to li

[PATCH v4 8/8] Makefile: update tispl regex to also clean falcon spl

2025-04-16 Thread Anshul Dalal
Build for A53 on am62 platforms now generates tispl_falcon.bin alongside tispl.bin, edit the regex for `make clean` so that both files are removed. Signed-off-by: Anshul Dalal --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e83672b1823

[PATCH v4 7/8] mach-k3: common: add falcon support for 62[axp]

2025-04-16 Thread Anshul Dalal
(PRELOADED_BL33_BASE and K3_HW_CONFIG_BASE). Signed-off-by: Anshul Dalal --- arch/arm/mach-k3/common.c | 107 ++ 1 file changed, 107 insertions(+) diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c index fa8cd93d664..ad5ed92eb03 100644 --- a

[PATCH v4 6/8] board: ti: add default dtb for am62[axp] in falcon mode

2025-04-16 Thread Anshul Dalal
The SPL_FS_LOAD_ARGS_NAME config is used for the arguments to the kernel (dtb in our case) in falcon boot. Setting it in board specific Kconfig allows us to reuse the same config fragment 'am62x_r5_falcon.config' for all 3 platforms to enable falcon boot. Signed-off-by: Anshul Dalal

  1   2   >