From: Patrick Delaunay <patrick.delaunay@st.com>
To: u-boot@lists.denx.de
Subject: [PATCH v4 3/4] arm: set the relocated gd with gd->new_gd
Date: Tue, 10 Mar 2020 10:15:04 +0100 [thread overview]
Message-ID: <20200310091505.24862-4-patrick.delaunay@st.com> (raw)
In-Reply-To: <20200310091505.24862-1-patrick.delaunay@st.com>
Simplify the arm relocation behavior and get gd directly form new_gd,
as it is already done in crt0_64.S:
ldr x18, [x18, #GD_NEW_GD] /* x18 <- gd->new_gd */
This patch avoid assumption on new GD location (new GD is below bd -
with #GD_SIZE offset).
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
---
Changes in v4: None
Changes in v3: None
Changes in v2: None
arch/arm/lib/crt0.S | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/arm/lib/crt0.S b/arch/arm/lib/crt0.S
index fb6c37cf51..df9dd83e40 100644
--- a/arch/arm/lib/crt0.S
+++ b/arch/arm/lib/crt0.S
@@ -127,8 +127,7 @@ ENTRY(_main)
ldr r0, [r9, #GD_START_ADDR_SP] /* sp = gd->start_addr_sp */
bic r0, r0, #7 /* 8-byte alignment for ABI compliance */
mov sp, r0
- ldr r9, [r9, #GD_BD] /* r9 = gd->bd */
- sub r9, r9, #GD_SIZE /* new GD is below bd */
+ ldr r9, [r9, #GD_NEW_GD] /* r9 <- gd->new_gd */
adr lr, here
ldr r0, [r9, #GD_RELOC_OFF] /* r0 = gd->reloc_off */
--
2.17.1
next prev parent reply other threads:[~2020-03-10 9:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-10 9:15 [PATCH v4 0/4] Ensure 16 alignment of reserved memory in board_f.c Patrick Delaunay
2020-03-10 9:15 ` [PATCH v4 1/4] board_f.c: Ensure gd->new_bootstage alignment Patrick Delaunay
2020-04-17 21:08 ` Tom Rini
2020-03-10 9:15 ` [PATCH v4 2/4] Revert "stm32mp1: remove the imply BOOTSTAGE" Patrick Delaunay
2020-04-17 21:08 ` Tom Rini
2020-03-10 9:15 ` Patrick Delaunay [this message]
2020-04-17 21:08 ` [PATCH v4 3/4] arm: set the relocated gd with gd->new_gd Tom Rini
2020-03-10 9:15 ` [PATCH v4 4/4] board_f.c: Ensure 16 alignment of start_addr_sp and reserved memory Patrick Delaunay
2020-04-17 21:08 ` Tom Rini
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=20200310091505.24862-4-patrick.delaunay@st.com \
--to=patrick.delaunay@st.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