Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Feb 2011 17:35:17 +0000 (UTC)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r218227 - head/sys/arm/arm
Message-ID:  <201102031735.p13HZHPI053021@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201102031735.p13HZHPI053021>