From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH] ARM: rockchip: bootm: move image to 4k alignment
Date: Wed, 3 May 2023 14:26:19 +0200 [thread overview]
Message-ID: <20230503122619.1301236-1-s.hauer@pengutronix.de> (raw)
The new barebox must be 4k aligned which is not always the case when
we skip over the SDRAM initialisation binary. memmove to a suitable
place.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/mach-rockchip/bootm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-rockchip/bootm.c b/arch/arm/mach-rockchip/bootm.c
index 4317fdefd6..6f4aa27808 100644
--- a/arch/arm/mach-rockchip/bootm.c
+++ b/arch/arm/mach-rockchip/bootm.c
@@ -88,7 +88,8 @@ static int do_bootm_rkns_barebox_image(struct image_data *data)
file_type_to_string(filetype));
if (filetype == filetype_arm_barebox) {
- barebox = buf + entry_start;
+ memmove(buf, buf + entry_start, image_size - entry_start);
+ barebox = buf;
goto found;
}
}
--
2.39.2
reply other threads:[~2023-05-03 12:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20230503122619.1301236-1-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/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