On Nintendo Wii CPUs, the mdp value will be garbage. Set it to NULL
so as to not confuse things. Submitted by: Margarida Gouveia
This commit is contained in:
parent
9ced87e9cd
commit
2467c62fc6
@ -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__
|
||||
@ -268,6 +268,14 @@ powerpc_init(vm_offset_t startkernel, vm_offset_t endkernel,
|
||||
trap_offset = 0;
|
||||
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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user