diff options
author | grehan <grehan@FreeBSD.org> | 2005-11-08 06:48:08 +0000 |
---|---|---|
committer | grehan <grehan@FreeBSD.org> | 2005-11-08 06:48:08 +0000 |
commit | eff5b98fc40055bf85d38836cdcfebf6486cf0d2 (patch) | |
tree | c090032365f12df1f06212e900d4fe33ca492b60 /sys/powerpc/aim | |
parent | bf6d4253ee61e7325d3cd61086924ae203e9726c (diff) | |
download | FreeBSD-src-eff5b98fc40055bf85d38836cdcfebf6486cf0d2.zip FreeBSD-src-eff5b98fc40055bf85d38836cdcfebf6486cf0d2.tar.gz |
Insert a layer of indirection to the pmap code, using a kobj for
the interface. This allows run-time selection of MMU code, based
on CPU-type detection, or tunable-overrides when testing new code.
Pre-requisite for G5 support.
conf/files.powerpc
- remove pmap.c
- add mmu_if.h, mmu_oea.c, pmap_dispatch.c
powerpc/include/mmuvar.h
- definitions for MMU implementations
powerpc/include/pmap.h
- remove pmap_pte_spill declaration
- add pmap_mmu_install declaration
- size the phys_avail array
- pmap_bootstrapped is now global-scope
powerpc/powerpc/machdep.c
- call kobj_machdep_init early in the boot sequence to allow
kobj usage prior to SI_SUB_LOCK
- install the OEA pmap code. This will be moved to CPU-specific
init code in the future.
powerpc/powerpc/mmu_if.m
- Kobj MMU interface definitions
powerpc/powerpc/pmap_dispatch.c
- central dispatch for pmap calls
- contains the global mmu kobj and the routine to locate the
the mmu implementation and init the kobj
Diffstat (limited to 'sys/powerpc/aim')
-rw-r--r-- | sys/powerpc/aim/machdep.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/powerpc/aim/machdep.c b/sys/powerpc/aim/machdep.c index d27d48f..e7d28b6 100644 --- a/sys/powerpc/aim/machdep.c +++ b/sys/powerpc/aim/machdep.c @@ -110,6 +110,7 @@ __FBSDID("$FreeBSD$"); #include <machine/fpu.h> #include <machine/md_var.h> #include <machine/metadata.h> +#include <machine/mmuvar.h> #include <machine/pcb.h> #include <machine/powerpc.h> #include <machine/reg.h> @@ -317,6 +318,8 @@ powerpc_init(u_int startkernel, u_int endkernel, u_int basekernel, void *mdp) kdb_init(); + kobj_machdep_init(); + /* * XXX: Initialize the interrupt tables. * Disable translation in case the vector area @@ -358,6 +361,7 @@ powerpc_init(u_int startkernel, u_int endkernel, u_int basekernel, void *mdp) /* * Initialise virtual memory. */ + pmap_mmu_install(MMU_TYPE_OEA, 0); /* XXX temporary */ pmap_bootstrap(startkernel, endkernel); /* |