public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 1/3] mach-imx: bootaux: print stack pointer and reset vector
@ 2019-11-28 13:56 Igor Opaniuk
  2019-11-28 13:56 ` [U-Boot] [PATCH v2 2/3] mach-imx: bootaux: add dcache flushing before enabling M4 Igor Opaniuk
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Igor Opaniuk @ 2019-11-28 13:56 UTC (permalink / raw)
  To: u-boot

From: Igor Opaniuk <igor.opaniuk@toradex.com>

1. Change information printed about loaded M4 binary, print the stack
pointer and reset vector addressed.
2. Add sanity check for the address provided as param.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
---

 arch/arm/mach-imx/imx_bootaux.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-imx/imx_bootaux.c b/arch/arm/mach-imx/imx_bootaux.c
index 3d9422d5a2..ee786f7d06 100644
--- a/arch/arm/mach-imx/imx_bootaux.c
+++ b/arch/arm/mach-imx/imx_bootaux.c
@@ -20,6 +20,9 @@ int arch_auxiliary_core_up(u32 core_id, ulong boot_private_data)
 	stack = *(u32 *)boot_private_data;
 	pc = *(u32 *)(boot_private_data + 4);
 
+	printf("## Starting auxiliary core stack = 0x%08lX, pc = 0x%08lX...\n",
+	       stack, pc);
+
 	/* Set the stack and pc to M4 bootROM */
 	writel(stack, M4_BOOTROM_BASE_ADDR);
 	writel(pc, M4_BOOTROM_BASE_ADDR + 4);
@@ -80,7 +83,8 @@ static int do_bootaux(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 
 	addr = simple_strtoul(argv[1], NULL, 16);
 
-	printf("## Starting auxiliary core at 0x%08lX ...\n", addr);
+	if (!addr)
+		return CMD_RET_FAILURE;
 
 	ret = arch_auxiliary_core_up(0, addr);
 	if (ret)
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-12-30 12:23 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-28 13:56 [U-Boot] [PATCH v2 1/3] mach-imx: bootaux: print stack pointer and reset vector Igor Opaniuk
2019-11-28 13:56 ` [U-Boot] [PATCH v2 2/3] mach-imx: bootaux: add dcache flushing before enabling M4 Igor Opaniuk
2019-12-03 14:32   ` Oleksandr Suvorov
2019-12-29 10:25   ` sbabic at denx.de
2019-11-28 13:56 ` [U-Boot] [PATCH v2 3/3] mach-imx: bootaux: elf firmware support Igor Opaniuk
2019-12-03 14:37   ` Oleksandr Suvorov
2019-12-27 15:45   ` Stefano Babic
2019-12-28 12:33   ` Stefano Babic
2019-12-30 12:04     ` Igor Opaniuk
2019-12-30 12:23       ` Stefano Babic
2019-12-03 14:33 ` [U-Boot] [PATCH v2 1/3] mach-imx: bootaux: print stack pointer and reset vector Oleksandr Suvorov
2019-12-29 10:25 ` sbabic at denx.de

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox