mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: "barebox@lists.infradead.org" <barebox@lists.infradead.org>,
	Sascha Hauer <s.hauer@pengutronix.de>
Subject: Re: [PATCH 5/9] ARM64: <asm/barebox-arm-head.h>: mark prologue location
Date: Mon, 8 Nov 2021 09:14:29 +0100	[thread overview]
Message-ID: <746b52d4-bdfa-12fb-05fa-1d9b135b460e@pengutronix.de> (raw)
In-Reply-To: <20211108075209.2366770-5-a.fatoum@pengutronix.de>

Hello Sascha,

On 08.11.21 08:52, Ahmad Fatoum wrote:
> 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! */

On the rk3399, the sp points into INTMEM0. When I added a new user to
load_elf64_image_phdr, the function become out-of-line and thus return
from that function broke. Does the rk3568 MaskROM initialize the stack
pointer differently? I want to avoid breaking it when I send out the
remaining rk3399 patches.

>  		"b 2f\n"
>  		"nop\n"
>  		"nop\n"
> 


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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


  reply	other threads:[~2021-11-08  8:15 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 ` [PATCH 5/9] ARM64: <asm/barebox-arm-head.h>: mark prologue location Ahmad Fatoum
2021-11-08  8:14   ` Ahmad Fatoum [this message]
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=746b52d4-bdfa-12fb-05fa-1d9b135b460e@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@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