* [PATCH] ARM: i.MX8M: atf: add debug messages just before TF-A jump
@ 2026-01-16 13:49 Ahmad Fatoum
2026-01-16 15:25 ` Marco Felsch
2026-01-19 7:44 ` Sascha Hauer
0 siblings, 2 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2026-01-16 13:49 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum, Holger Assmann, Fabian Pflug
The handoff to TF-A has been a frequent source of hangs during board
bringup in the past for various reasons.
Add a debug print just before branching to TF-A and add a comment
explaining some possible issues to aid with future debugging.
Cc: Holger Assmann <h.assmann@pengutronix.de>
Cc: Fabian Pflug <f.pflug@pengutronix.de>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
arch/arm/mach-imx/atf.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/arch/arm/mach-imx/atf.c b/arch/arm/mach-imx/atf.c
index 5a8a7a7fd541..773ebfad0be3 100644
--- a/arch/arm/mach-imx/atf.c
+++ b/arch/arm/mach-imx/atf.c
@@ -53,8 +53,23 @@ static __noreturn void imx8m_tfa_start_bl31(const void *tfa_bin, size_t tfa_size
pr_debug("CAAM early init successful\n");
}
+ pr_debug("Loading BL31 to %p ", tfa_bin);
+
memcpy(bl31, tfa_bin, tfa_size);
+ /*
+ * If all works fine (and TF-A has debug output enabled), the next
+ * serial output should start with:
+ *
+ * NOTICE: BL31:
+ *
+ * If not, set IMX_BOOT_UART_BASE=auto when building TF-A if supported,
+ * check if DRAM configuration is correct and that the PMIC correctly
+ * configured the DRAM rails. For very old TF-A versions, also compare
+ * barebox tfa_dest against whatever value your TF-A hardcodes.
+ */
+ pr_debug("and jumping with SP: %p\n", tfa_dest - 16);
+
asm volatile("msr sp_el2, %0" : :
"r" (tfa_dest - 16) :
"cc");
--
2.47.3
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] ARM: i.MX8M: atf: add debug messages just before TF-A jump
2026-01-16 13:49 [PATCH] ARM: i.MX8M: atf: add debug messages just before TF-A jump Ahmad Fatoum
@ 2026-01-16 15:25 ` Marco Felsch
2026-01-19 7:44 ` Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Marco Felsch @ 2026-01-16 15:25 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: barebox, Holger Assmann, Fabian Pflug
On 26-01-16, Ahmad Fatoum wrote:
> The handoff to TF-A has been a frequent source of hangs during board
> bringup in the past for various reasons.
> Add a debug print just before branching to TF-A and add a comment
> explaining some possible issues to aid with future debugging.
>
> Cc: Holger Assmann <h.assmann@pengutronix.de>
> Cc: Fabian Pflug <f.pflug@pengutronix.de>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ARM: i.MX8M: atf: add debug messages just before TF-A jump
2026-01-16 13:49 [PATCH] ARM: i.MX8M: atf: add debug messages just before TF-A jump Ahmad Fatoum
2026-01-16 15:25 ` Marco Felsch
@ 2026-01-19 7:44 ` Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2026-01-19 7:44 UTC (permalink / raw)
To: barebox, Ahmad Fatoum; +Cc: Holger Assmann, Fabian Pflug
On Fri, 16 Jan 2026 14:49:46 +0100, Ahmad Fatoum wrote:
> The handoff to TF-A has been a frequent source of hangs during board
> bringup in the past for various reasons.
> Add a debug print just before branching to TF-A and add a comment
> explaining some possible issues to aid with future debugging.
>
>
Applied, thanks!
[1/1] ARM: i.MX8M: atf: add debug messages just before TF-A jump
https://git.pengutronix.de/cgit/barebox/commit/?id=11db05a5527d (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer@pengutronix.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-01-19 7:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-16 13:49 [PATCH] ARM: i.MX8M: atf: add debug messages just before TF-A jump Ahmad Fatoum
2026-01-16 15:25 ` Marco Felsch
2026-01-19 7:44 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox