Date: Sun, 18 Oct 2009 17:22:09 +0000 (UTC) From: Nathan Whitehorn <nwhitehorn@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r198212 - head/sys/powerpc/aim Message-ID: <200910181722.n9IHM9Ll074706@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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();
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910181722.n9IHM9Ll074706>