summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/aim/machdep.c
diff options
context:
space:
mode:
authornwhitehorn <nwhitehorn@FreeBSD.org>2009-05-14 00:34:26 +0000
committernwhitehorn <nwhitehorn@FreeBSD.org>2009-05-14 00:34:26 +0000
commitdc1ac440de95721f8b696146577a51ef7a418f59 (patch)
tree76fac3396a64c911f78e68ca8b02794bc0332825 /sys/powerpc/aim/machdep.c
parentd9c2725c3513aa19672b456422a31a356dccffc5 (diff)
downloadFreeBSD-src-dc1ac440de95721f8b696146577a51ef7a418f59.zip
FreeBSD-src-dc1ac440de95721f8b696146577a51ef7a418f59.tar.gz
Factor out platform dependent things unrelated to device drivers into a
new platform module. These are probed in early boot, and have the responsibility of determining the layout of physical memory, determining the CPU timebase frequency, and handling the zoo of SMP mechanisms found on PowerPC. Reviewed by: marcel, raj Book-E parts by: raj
Diffstat (limited to 'sys/powerpc/aim/machdep.c')
-rw-r--r--sys/powerpc/aim/machdep.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/sys/powerpc/aim/machdep.c b/sys/powerpc/aim/machdep.c
index 4e8909f..590741c 100644
--- a/sys/powerpc/aim/machdep.c
+++ b/sys/powerpc/aim/machdep.c
@@ -114,7 +114,6 @@ __FBSDID("$FreeBSD$");
#include <machine/metadata.h>
#include <machine/mmuvar.h>
#include <machine/pcb.h>
-#include <machine/powerpc.h>
#include <machine/reg.h>
#include <machine/sigframe.h>
#include <machine/spr.h>
@@ -472,14 +471,22 @@ powerpc_init(u_int startkernel, u_int endkernel, u_int basekernel, void *mdp)
*/
mtmsr(msr);
isync();
+
+ /*
+ * Choose a platform module so we can get the physical memory map.
+ */
+
+ platform_probe_and_attach();
/*
- * Initialise virtual memory.
+ * Initialise virtual memory. Use BUS_PROBE_GENERIC priority
+ * in case the platform module had a better idea of what we
+ * should do.
*/
if (ppc64)
- pmap_mmu_install(MMU_TYPE_G5, 0);
+ pmap_mmu_install(MMU_TYPE_G5, BUS_PROBE_GENERIC);
else
- pmap_mmu_install(MMU_TYPE_OEA, 0);
+ pmap_mmu_install(MMU_TYPE_OEA, BUS_PROBE_GENERIC);
pmap_bootstrap(startkernel, endkernel);
mtmsr(mfmsr() | PSL_IR|PSL_DR|PSL_ME|PSL_RI);
OpenPOWER on IntegriCloud