mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 5/9] ARM64: <asm/barebox-arm-head.h>: mark prologue location
Date: Mon,  8 Nov 2021 08:52:05 +0100	[thread overview]
Message-ID: <20211108075209.2366770-5-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20211108075209.2366770-1-a.fatoum@pengutronix.de>

Unlike with ARM32, barebox prologue on ARM64 starts with the function
prologue, because of the absence of the naked attribute. The code is
written with that in mind (6 branches instead of 8 to account for the
two instructions inserted by the compiler), but it's still suprising.

Add a hint about that in the code.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 arch/arm/include/asm/barebox-arm-head.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/include/asm/barebox-arm-head.h b/arch/arm/include/asm/barebox-arm-head.h
index 8409a77d2e7c..187d12c9fc8d 100644
--- a/arch/arm/include/asm/barebox-arm-head.h
+++ b/arch/arm/include/asm/barebox-arm-head.h
@@ -44,6 +44,8 @@ static inline void __barebox_arm_head(void)
 		"1: b 1b\n"
 #endif
 #else
+		/* two instruction long function prologue */
+		/* only use if stack is initialized! */
 		"b 2f\n"
 		"nop\n"
 		"nop\n"
-- 
2.30.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


  parent reply	other threads:[~2021-11-08  7:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-08  7:52 [PATCH 1/9] fixup! scripts/common: Add write_full() and read_full() Ahmad Fatoum
2021-11-08  7:52 ` [PATCH 2/9] fixup! scripts: Add rk-usb-loader tool Ahmad Fatoum
2021-11-08  7:52 ` [PATCH 3/9] ARM: Rockchip: init: propagate error in init function Ahmad Fatoum
2021-11-08  7:52 ` [PATCH 4/9] ARM: Rockchip: rk3568: make rk3568_lowlevel_init void Ahmad Fatoum
2021-11-08  7:52 ` Ahmad Fatoum [this message]
2021-11-08  8:14   ` [PATCH 5/9] ARM64: <asm/barebox-arm-head.h>: mark prologue location Ahmad Fatoum
2021-11-08  7:52 ` [PATCH 6/9] pinctrl: Rockchip: abort probe on lack of aliases Ahmad Fatoum
2021-11-08  7:52 ` [PATCH 7/9] clk: handle CLK_OF_DECLARE in deep probe Ahmad Fatoum
2021-11-08  7:52 ` [PATCH 8/9] ARM: Rockchip: make rk3568's atf_load_bl31 reusable Ahmad Fatoum
2021-11-08  7:52 ` [PATCH 9/9] ARM: Rockchip: add delimiter between boards and board features Ahmad Fatoum

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=20211108075209.2366770-5-a.fatoum@pengutronix.de \
    --to=a.fatoum@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