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: sha@pengutronix.de, Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH] fixup! ARM64: asm: rewrite ENTRY_FUNCTION(_WITHSTACK) fully in assembly
Date: Mon, 24 Oct 2022 14:11:50 +0200	[thread overview]
Message-ID: <20221024121150.1841826-1-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20221024065716.1215046-6-a.fatoum@pengutronix.de>

We have enough space before the barebox header to set up stack, insert
the optional break point and branch to the board-specific entry point.

Do that instead of jumping over the header and continuing directly
afterwards.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 arch/arm/cpu/head_64.S | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/arch/arm/cpu/head_64.S b/arch/arm/cpu/head_64.S
index 4ed4ffb05250..f934e96c6eaf 100644
--- a/arch/arm/cpu/head_64.S
+++ b/arch/arm/cpu/head_64.S
@@ -9,21 +9,11 @@
 
 .section .text_head_prologue_common, "x"
 ENTRY(__barebox_arm64_head)
-	nop
-	nop
 	nop
 	adr x9, __pbl_board_stack_top
 	ldr w9, [x9]
 	cbz x9, 1f
 	mov sp, x9
-	b 1f
-	.org 0x20
-	.asciz "barebox"
-	.word 0xffffffff
-	.word _barebox_image_size	/* image size to copy */
-	.rept 8
-	.word 0x55555555
-	.endr
 1:
 #ifdef CONFIG_PBL_BREAK
 	brk #17
@@ -33,4 +23,11 @@ ENTRY(__barebox_arm64_head)
 	nop
 #endif
 	b __pbl_board_entry
+	.org 0x20
+	.asciz "barebox"
+	.word 0xffffffff
+	.word _barebox_image_size	/* image size to copy */
+	.rept 8
+	.word 0x55555555
+	.endr
 END(__barebox_arm64_head)
-- 
2.30.2




  parent reply	other threads:[~2022-10-24 12:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-24  6:57 [PATCH 0/8] ARM64: rewrite ENTRY_FUNCTION_WITHSTACK " Ahmad Fatoum
2022-10-24  6:57 ` [PATCH 1/8] ARM64: cpu: select HAVE_PBL_MULTI_IMAGES globally Ahmad Fatoum
2022-10-24  6:57 ` [PATCH 2/8] ARM64: asm: define ENTRY_FUNCTION in terms of ENTRY_FUNCTION_WITHSTACK Ahmad Fatoum
2022-10-24  6:57 ` [PATCH 3/8] pbl: have linker define __pbl_board_entry alias Ahmad Fatoum
2022-10-24  6:57 ` [PATCH 4/8] asm-generic: memory_layout: define __keep_symbolref() Ahmad Fatoum
2022-10-24  6:57 ` [PATCH 5/8] ARM64: asm: rewrite ENTRY_FUNCTION(_WITHSTACK) fully in assembly Ahmad Fatoum
2022-10-24  8:55   ` Sascha Hauer
2022-10-24 10:02     ` Ahmad Fatoum
2022-10-24 12:11   ` Ahmad Fatoum [this message]
2022-10-24  6:57 ` [PATCH 6/8] ARM64: asm: drop __barebox_arm_head Ahmad Fatoum
2022-10-24  6:57 ` [PATCH 7/8] ARM: asm: cleanup 32-bit entry points Ahmad Fatoum
2022-10-24  6:57 ` [PATCH 8/8] Documentation: devel: porting: bring it up-to-date 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=20221024121150.1841826-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=sha@pengutronix.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