summaryrefslogtreecommitdiffstats
path: root/sys/arm
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2011-02-03 17:35:16 +0000
committermarcel <marcel@FreeBSD.org>2011-02-03 17:35:16 +0000
commit59a8457a985f290e1cb2c08328b005b8a5521e11 (patch)
tree36c58152af94088d57e0663139792a449fb6e297 /sys/arm
parentc5d144bf12cb99a1196dcc93ef5e53decadd6b7f (diff)
downloadFreeBSD-src-59a8457a985f290e1cb2c08328b005b8a5521e11.zip
FreeBSD-src-59a8457a985f290e1cb2c08328b005b8a5521e11.tar.gz
Accept r1 as having the metadata pointer argument if r0 is 0.
This provides backward compatibility with Juniper loaders. Sponsored by: Juniper Networks
Diffstat (limited to 'sys/arm')
-rw-r--r--sys/arm/arm/locore.S14
1 files changed, 10 insertions, 4 deletions
diff --git a/sys/arm/arm/locore.S b/sys/arm/arm/locore.S
index ff4494d..3a19733 100644
--- a/sys/arm/arm/locore.S
+++ b/sys/arm/arm/locore.S
@@ -65,14 +65,20 @@ __FBSDID("$FreeBSD$");
ENTRY_NP(btext)
-ASENTRY_NP(_start)
-
/*
- * Move metadata ptr to r12 (ip)
+ * On entry:
+ * r0 - metadata pointer or 0
+ * r1 - if (r0 == 0) then metadata pointer
*/
+ASENTRY_NP(_start)
+ /* Move metadata ptr to r12 (ip) */
mov ip, r0
-
+ ldr r0, =0
+ cmp ip, r0
+ bne 1f
+ mov ip, r1
+1:
/* Make sure interrupts are disabled. */
mrs r7, cpsr
orr r7, r7, #(I32_bit|F32_bit)
OpenPOWER on IntegriCloud