diff mbox series

[31/42] imx9: allow to bootaux Mcore with input address

Message ID 20230428040847.10841-32-peng.fan@oss.nxp.com
State Accepted
Commit a702ae7a015fc0944ce5b5cc2d9779c6ba4ca9e4
Delegated to: Stefano Babic
Headers show
Series imx: i.MX9 update | expand

Commit Message

Peng Fan (OSS) April 28, 2023, 4:08 a.m. UTC
From: Ye Li <ye.li@nxp.com>

Currently bootaux only supports to boot M33 core from TCM. Since ATF
has changed to use x2 parameter for M33 image address, update the
bootaux command to use input address, so we can support boot from
any possilbe address like TCM, DDR, Flexspi NOR.

Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 arch/arm/mach-imx/imx9/imx_bootaux.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

Comments

Stefano Babic May 21, 2023, 4:55 p.m. UTC | #1
> From: Ye Li <ye.li@nxp.com>
> Currently bootaux only supports to boot M33 core from TCM. Since ATF
> has changed to use x2 parameter for M33 image address, update the
> bootaux command to use input address, so we can support boot from
> any possilbe address like TCM, DDR, Flexspi NOR.
> Reviewed-by: Peng Fan <peng.fan@nxp.com>
> Signed-off-by: Ye Li <ye.li@nxp.com>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/arch/arm/mach-imx/imx9/imx_bootaux.c b/arch/arm/mach-imx/imx9/imx_bootaux.c
index 3b6662aeb81..256e6fa1c54 100644
--- a/arch/arm/mach-imx/imx9/imx_bootaux.c
+++ b/arch/arm/mach-imx/imx9/imx_bootaux.c
@@ -34,17 +34,13 @@  int arch_auxiliary_core_down(u32 core_id)
 int arch_auxiliary_core_up(u32 core_id, ulong addr)
 {
 	struct arm_smccc_res res;
-	u32 stack, pc;
 
 	if (!addr)
 		return -EINVAL;
 
-	stack = *(u32 *)addr;
-	pc = *(u32 *)(addr + 4);
+	printf("## Starting auxiliary core addr = 0x%08lX...\n", addr);
 
-	printf("## Starting auxiliary core stack = 0x%08X, pc = 0x%08X...\n", stack, pc);
-
-	arm_smccc_smc(IMX_SIP_SRC, IMX_SIP_SRC_M4_START, 0, 0,
+	arm_smccc_smc(IMX_SIP_SRC, IMX_SIP_SRC_M4_START, addr, 0,
 		      0, 0, 0, 0, &res);
 
 	return 0;
@@ -129,5 +125,5 @@  U_BOOT_CMD(
 	"Start auxiliary core",
 	"<address> [<core>]\n"
 	"   - start auxiliary core [<core>] (default 0),\n"
-	"     at address <address>\n"
+	"     at address <address> of auxiliary core view\n"
 );