Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Jan 2008 08:05:14 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 132691 for review
Message-ID:  <200801070805.m0785ENj036505@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=132691

Change 132691 by imp@imp_paco-paco on 2008/01/07 08:04:55

	Restore CFE and YAMON specific bits to LOCORE.  Also need
	to sort out the mips_init vs platform_init disparity that we
	currently have, but that can wait a bit.

Affected files ...

.. //depot/projects/mips2-jnpr/src/sys/mips/mips/locore.S#6 edit

Differences ...

==== //depot/projects/mips2-jnpr/src/sys/mips/mips/locore.S#6 (text+ko) ====

@@ -71,6 +71,19 @@
 
 #include "assym.s"
 
+	.data
+#ifdef YAMON
+GLOBAL(fenvp)
+	.space 4			# Assumes mips32?  Is that OK?
+#endif
+#ifdef CFE			/* Assumes MIPS32, bad? */
+GLOBAL(cfe_handle)
+	.space 4
+GLOBAL(cfe_vector)
+	.space 4
+#endif
+
+	.text
 	.set	noreorder		# Noreorder is default style!
 
 	.globl	_C_LABEL(_start)
@@ -91,6 +104,20 @@
 	la	gp, _C_LABEL(_gp)
 	sw	zero, START_FRAME - 4(sp)  # Zero out old ra for debugger
 
+#ifdef YAMON
+	/* Save YAMON boot environment pointer */
+	sw	a2, fenvp
+#endif
+#ifdef CFE
+	/*
+	* Save the CFE context passed to us by the loader.
+	*/
+	li	t1, 0x43464531
+	bne	a3, t1, no_cfe		/* Check for "CFE1" signature */
+	sw	a0, cfe_handle		/* Firmware data segment */
+	sw	a2, cfe_vector		/* Firmware entry vector */
+no_cfe:
+#endif
 	/* reset count register to 1 on each CPU */
 	li	a0, 1
 	mtc0	a0, COP_0_COUNT



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