From: Gary Bisson <gary.bisson@boundarydevices.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] imx: bootaux: fix stack and pc assignment on 64-bit platforms
Date: Wed, 14 Nov 2018 17:55:29 +0100 [thread overview]
Message-ID: <20181114165529.6563-3-gary.bisson@boundarydevices.com> (raw)
In-Reply-To: <20181114165529.6563-1-gary.bisson@boundarydevices.com>
Using ulong is wrong as its size depends on the Host CPU architecture
(32-bit vs. 64-bit) although the Cortex-M4 is always 32-bit.
Without this patch, the stack and PC are obviously wrong and it
generates an abort when used on 64-bit processors such as the i.MX8MQ.
Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
---
arch/arm/mach-imx/imx_bootaux.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-imx/imx_bootaux.c b/arch/arm/mach-imx/imx_bootaux.c
index a1ea5c13f1..3103001b7c 100644
--- a/arch/arm/mach-imx/imx_bootaux.c
+++ b/arch/arm/mach-imx/imx_bootaux.c
@@ -17,8 +17,8 @@ int arch_auxiliary_core_up(u32 core_id, ulong boot_private_data)
if (!boot_private_data)
return -EINVAL;
- stack = *(ulong *)boot_private_data;
- pc = *(ulong *)(boot_private_data + 4);
+ stack = *(u32 *)boot_private_data;
+ pc = *(u32 *)(boot_private_data + 4);
/* Set the stack and pc to M4 bootROM */
writel(stack, M4_BOOTROM_BASE_ADDR);
--
2.19.1
next prev parent reply other threads:[~2018-11-14 16:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-14 16:55 [U-Boot] [PATCH 0/2] imx: fix M4 boot on i.MX8MQ processors Gary Bisson
2018-11-14 16:55 ` [U-Boot] [PATCH 1/2] imx: mx8m: add memory mapping for CAAM and TCM Gary Bisson
2018-11-17 10:00 ` Peng Fan
2018-12-08 17:38 ` Stefano Babic
2018-11-14 16:55 ` Gary Bisson [this message]
2018-11-17 10:02 ` [U-Boot] [PATCH 2/2] imx: bootaux: fix stack and pc assignment on 64-bit platforms Peng Fan
2018-12-08 17:38 ` Stefano Babic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181114165529.6563-3-gary.bisson@boundarydevices.com \
--to=gary.bisson@boundarydevices.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox