public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ARM: fix the standalone programs
Date: Thu, 12 Dec 2013 11:29:35 +0100	[thread overview]
Message-ID: <20131212112935.1241de7d@lilith> (raw)
In-Reply-To: <1385069571-10554-1-git-send-email-jeroen@myspectrum.nl>

Hi Jeroen,

On Thu, 21 Nov 2013 22:32:51 +0100, Jeroen Hofstee
<jeroen@myspectrum.nl> wrote:

> The standalone programs do not use the api calls, but rely
> directly on u-boot variable gd->jt for the jump table. Commit
> fe1378a - "ARM: use r9 for gd" changed the register holding
> the address of gd, but the assembly code in the standalone
> examples was not updated accordingly. This broke the programs
> on ARM relying on the jumptable in the v2013.10 release.
> This patch unbricks them by using the correct register.
> 
> Cc: Michal Simek <monstr@monstr.eu>
> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
> Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
> ---
>  examples/standalone/stubs.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/examples/standalone/stubs.c b/examples/standalone/stubs.c
> index 8fb1765..5d2ab56 100644
> --- a/examples/standalone/stubs.c
> +++ b/examples/standalone/stubs.c
> @@ -40,14 +40,14 @@ gd_t *global_data;
>  	: : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)) : "r11");
>  #elif defined(CONFIG_ARM)
>  /*
> - * r8 holds the pointer to the global_data, ip is a call-clobbered
> + * r9 holds the pointer to the global_data, ip is a call-clobbered
>   * register
>   */
>  #define EXPORT_FUNC(x) \
>  	asm volatile (			\
>  "	.globl " #x "\n"		\
>  #x ":\n"				\
> -"	ldr	ip, [r8, %0]\n"		\
> +"	ldr	ip, [r9, %0]\n"		\
>  "	ldr	pc, [ip, %1]\n"		\
>  	: : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)) : "ip");
>  #elif defined(CONFIG_MIPS)

Applied to u-boot-arm/master, thanks!

Amicalement,
-- 
Albert.

      reply	other threads:[~2013-12-12 10:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-21 21:32 [U-Boot] [PATCH] ARM: fix the standalone programs Jeroen Hofstee
2013-12-12 10:29 ` Albert ARIBAUD [this message]

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=20131212112935.1241de7d@lilith \
    --to=albert.u.boot@aribaud.net \
    --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