svn commit: r198212 - head/sys/powerpc/aim

Nathan Whitehorn nwhitehorn at FreeBSD.org
Sun Oct 18 17:22:09 UTC 2009


Author: nwhitehorn
Date: Sun Oct 18 17:22:08 2009
New Revision: 198212
URL: http://svn.freebsd.org/changeset/base/198212

Log:
  Don't assume that physical addresses are identity mapped. This allows
  the second processor on G5 systems to start. Note that SMP is still
  non-functional on these systems because of IPI delivery problems.

Modified:
  head/sys/powerpc/aim/platform_chrp.c

Modified: head/sys/powerpc/aim/platform_chrp.c
==============================================================================
--- head/sys/powerpc/aim/platform_chrp.c	Sun Oct 18 17:11:16 2009	(r198211)
+++ head/sys/powerpc/aim/platform_chrp.c	Sun Oct 18 17:22:08 2009	(r198212)
@@ -35,11 +35,14 @@ __FBSDID("$FreeBSD$");
 #include <sys/pcpu.h>
 #include <sys/proc.h>
 #include <sys/smp.h>
+#include <vm/vm.h>
+#include <vm/pmap.h>
 
 #include <machine/bus.h>
 #include <machine/cpu.h>
 #include <machine/hid.h>
 #include <machine/platformvar.h>
+#include <machine/pmap.h>
 #include <machine/smp.h>
 #include <machine/spr.h>
 
@@ -220,6 +223,7 @@ chrp_smp_start_cpu(platform_t plat, stru
 #ifdef SMP
 	phandle_t cpu;
 	volatile uint8_t *rstvec;
+	static volatile uint8_t *rstvec_virtbase = NULL;
 	int res, reset, timeout;
 
 	cpu = pc->pc_hwref;
@@ -229,7 +233,10 @@ chrp_smp_start_cpu(platform_t plat, stru
 
 	ap_pcpu = pc;
 
-	rstvec = (uint8_t *)(0x80000000 + reset);
+	if (rstvec_virtbase == NULL)
+		rstvec_virtbase = pmap_mapdev(0x80000000, PAGE_SIZE);
+
+	rstvec = rstvec_virtbase + reset;
 
 	*rstvec = 4;
 	powerpc_sync();


More information about the svn-src-all mailing list