diff options
-rw-r--r-- | sys/powerpc/aim/machdep.c | 10 | ||||
-rw-r--r-- | sys/powerpc/include/spr.h | 1 |
2 files changed, 10 insertions, 1 deletions
diff --git a/sys/powerpc/aim/machdep.c b/sys/powerpc/aim/machdep.c index 1d0736d..b5ead61 100644 --- a/sys/powerpc/aim/machdep.c +++ b/sys/powerpc/aim/machdep.c @@ -257,7 +257,7 @@ powerpc_init(vm_offset_t startkernel, vm_offset_t endkernel, size_t trap_offset; void *kmdp; char *env; - register_t msr, scratch; + register_t msr, scratch, vers; uint8_t *cache_check; int cacheline_warn; #ifndef __powerpc64__ @@ -269,6 +269,14 @@ powerpc_init(vm_offset_t startkernel, vm_offset_t endkernel, cacheline_warn = 0; /* + * The Wii loader doesn't pass us any environment so, mdp + * points to garbage at this point. The Wii CPU is a 750CL. + */ + vers = mfpvr(); + if ((vers & 0xfffff0e0) == (MPC750 << 16 | MPC750CL)) + mdp = NULL; + + /* * Parse metadata if present and fetch parameters. Must be done * before console is inited so cninit gets the right value of * boothowto. diff --git a/sys/powerpc/include/spr.h b/sys/powerpc/include/spr.h index 79fad45..78d241c 100644 --- a/sys/powerpc/include/spr.h +++ b/sys/powerpc/include/spr.h @@ -140,6 +140,7 @@ #define MPC603e 0x0006 #define MPC603ev 0x0007 #define MPC750 0x0008 +#define MPC750CL 0x7000 /* Nintendo Wii's Broadway */ #define MPC604ev 0x0009 #define MPC7400 0x000c #define MPC620 0x0014 |