summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Hofstee <jeroen@myspectrum.nl>2013-11-21 22:32:51 +0100
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2013-12-12 11:27:59 +0100
commita5a42eec8ed64cbc72d2e59199819e48f904e38f (patch)
tree9123ad59ae995d3128260bb555f6a1dc77b1f383
parentbd851c7a26b39309052b2359dc1994127f518534 (diff)
ARM: fix the standalone programs
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>
-rw-r--r--examples/standalone/stubs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/standalone/stubs.c b/examples/standalone/stubs.c
index 8fb17653b0..5d2ab56995 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)