Author: marcel
Date: Thu Feb  3 17:35:16 2011
New Revision: 218227
URL: http://svn.freebsd.org/changeset/base/218227

Log:
  Accept r1 as having the metadata pointer argument if r0 is 0.
  This provides backward compatibility with Juniper loaders.
  
  Sponsored by: Juniper Networks

Modified:
  head/sys/arm/arm/locore.S

Modified: head/sys/arm/arm/locore.S
==============================================================================
--- head/sys/arm/arm/locore.S   Thu Feb  3 15:46:54 2011        (r218226)
+++ head/sys/arm/arm/locore.S   Thu Feb  3 17:35:16 2011        (r218227)
@@ -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)
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to