diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2009-10-18 17:22:08 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2009-10-18 17:22:08 +0000 |
commit | 0297b355f62af3acb1970515907b40def4ae755d (patch) | |
tree | cfca02f6a121a259e535ed4b49089182dff552f4 | |
parent | 293ef380b87ae1fc6e29c44411db8739bef1a185 (diff) | |
download | FreeBSD-src-0297b355f62af3acb1970515907b40def4ae755d.zip FreeBSD-src-0297b355f62af3acb1970515907b40def4ae755d.tar.gz |
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.
-rw-r--r-- | sys/powerpc/aim/platform_chrp.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/powerpc/aim/platform_chrp.c b/sys/powerpc/aim/platform_chrp.c index 7a8fe3b..03955ab 100644 --- a/sys/powerpc/aim/platform_chrp.c +++ b/sys/powerpc/aim/platform_chrp.c @@ -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, struct pcpu *pc) #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, struct pcpu *pc) 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(); |