- Use cpu_setup() instead of identifycpu().
- Remove identifycpu().
This commit is contained in:
parent
fb954d9d2f
commit
bdfe5c9146
@ -161,8 +161,6 @@ extern int ofmsr;
|
||||
|
||||
struct bat battable[16];
|
||||
|
||||
static void identifycpu(void);
|
||||
|
||||
struct kva_md_info kmi;
|
||||
|
||||
static void
|
||||
@ -185,7 +183,7 @@ cpu_startup(void *dummy)
|
||||
/*
|
||||
* Good {morning,afternoon,evening,night}.
|
||||
*/
|
||||
identifycpu();
|
||||
cpu_setup(PCPU_GET(cpuid));
|
||||
|
||||
/* startrtclock(); */
|
||||
#ifdef PERFMON
|
||||
@ -233,83 +231,6 @@ cpu_startup(void *dummy)
|
||||
#endif /* SMP */
|
||||
}
|
||||
|
||||
void
|
||||
identifycpu()
|
||||
{
|
||||
unsigned int pvr, version, revision;
|
||||
|
||||
/*
|
||||
* Find cpu type (Do it by OpenFirmware?)
|
||||
*/
|
||||
__asm ("mfpvr %0" : "=r"(pvr));
|
||||
version = pvr >> 16;
|
||||
revision = pvr & 0xffff;
|
||||
switch (version) {
|
||||
case 0x0000:
|
||||
sprintf(model, "Simulator (psim)");
|
||||
break;
|
||||
case 0x0001:
|
||||
sprintf(model, "601");
|
||||
break;
|
||||
case 0x0003:
|
||||
sprintf(model, "603 (Wart)");
|
||||
break;
|
||||
case 0x0004:
|
||||
sprintf(model, "604 (Zephyr)");
|
||||
break;
|
||||
case 0x0005:
|
||||
sprintf(model, "602 (Galahad)");
|
||||
break;
|
||||
case 0x0006:
|
||||
sprintf(model, "603e (Stretch)");
|
||||
break;
|
||||
case 0x0007:
|
||||
if ((revision && 0xf000) == 0x0000)
|
||||
sprintf(model, "603ev (Valiant)");
|
||||
else
|
||||
sprintf(model, "603r (Goldeneye)");
|
||||
break;
|
||||
case 0x0008:
|
||||
if ((revision && 0xf000) == 0x0000)
|
||||
sprintf(model, "G3 / 750 (Arthur)");
|
||||
else
|
||||
sprintf(model, "G3 / 755 (Goldfinger)");
|
||||
break;
|
||||
case 0x0009:
|
||||
if ((revision && 0xf000) == 0x0000)
|
||||
sprintf(model, "604e (Sirocco)");
|
||||
else
|
||||
sprintf(model, "604r (Mach V)");
|
||||
break;
|
||||
case 0x000a:
|
||||
sprintf(model, "604r (Mach V)");
|
||||
break;
|
||||
case 0x000c:
|
||||
sprintf(model, "G4 / 7400 (Max)");
|
||||
break;
|
||||
case 0x0014:
|
||||
sprintf(model, "620 (Red October)");
|
||||
break;
|
||||
case 0x0081:
|
||||
sprintf(model, "8240 (Kahlua)");
|
||||
break;
|
||||
case 0x8000:
|
||||
sprintf(model, "G4 / 7450 (V'ger)");
|
||||
break;
|
||||
case 0x800c:
|
||||
sprintf(model, "G4 / 7410 (Nitro)");
|
||||
break;
|
||||
case 0x8081:
|
||||
sprintf(model, "8245 (Kahlua II)");
|
||||
break;
|
||||
default:
|
||||
sprintf(model, "Version %x", version);
|
||||
break;
|
||||
}
|
||||
sprintf(model + strlen(model), " (Revision %x)", revision);
|
||||
printf("CPU: PowerPC %s\n", model);
|
||||
}
|
||||
|
||||
extern char kernel_text[], _end[];
|
||||
|
||||
extern void *trapcode, *trapsize;
|
||||
|
@ -161,8 +161,6 @@ extern int ofmsr;
|
||||
|
||||
struct bat battable[16];
|
||||
|
||||
static void identifycpu(void);
|
||||
|
||||
struct kva_md_info kmi;
|
||||
|
||||
static void
|
||||
@ -185,7 +183,7 @@ cpu_startup(void *dummy)
|
||||
/*
|
||||
* Good {morning,afternoon,evening,night}.
|
||||
*/
|
||||
identifycpu();
|
||||
cpu_setup(PCPU_GET(cpuid));
|
||||
|
||||
/* startrtclock(); */
|
||||
#ifdef PERFMON
|
||||
@ -233,83 +231,6 @@ cpu_startup(void *dummy)
|
||||
#endif /* SMP */
|
||||
}
|
||||
|
||||
void
|
||||
identifycpu()
|
||||
{
|
||||
unsigned int pvr, version, revision;
|
||||
|
||||
/*
|
||||
* Find cpu type (Do it by OpenFirmware?)
|
||||
*/
|
||||
__asm ("mfpvr %0" : "=r"(pvr));
|
||||
version = pvr >> 16;
|
||||
revision = pvr & 0xffff;
|
||||
switch (version) {
|
||||
case 0x0000:
|
||||
sprintf(model, "Simulator (psim)");
|
||||
break;
|
||||
case 0x0001:
|
||||
sprintf(model, "601");
|
||||
break;
|
||||
case 0x0003:
|
||||
sprintf(model, "603 (Wart)");
|
||||
break;
|
||||
case 0x0004:
|
||||
sprintf(model, "604 (Zephyr)");
|
||||
break;
|
||||
case 0x0005:
|
||||
sprintf(model, "602 (Galahad)");
|
||||
break;
|
||||
case 0x0006:
|
||||
sprintf(model, "603e (Stretch)");
|
||||
break;
|
||||
case 0x0007:
|
||||
if ((revision && 0xf000) == 0x0000)
|
||||
sprintf(model, "603ev (Valiant)");
|
||||
else
|
||||
sprintf(model, "603r (Goldeneye)");
|
||||
break;
|
||||
case 0x0008:
|
||||
if ((revision && 0xf000) == 0x0000)
|
||||
sprintf(model, "G3 / 750 (Arthur)");
|
||||
else
|
||||
sprintf(model, "G3 / 755 (Goldfinger)");
|
||||
break;
|
||||
case 0x0009:
|
||||
if ((revision && 0xf000) == 0x0000)
|
||||
sprintf(model, "604e (Sirocco)");
|
||||
else
|
||||
sprintf(model, "604r (Mach V)");
|
||||
break;
|
||||
case 0x000a:
|
||||
sprintf(model, "604r (Mach V)");
|
||||
break;
|
||||
case 0x000c:
|
||||
sprintf(model, "G4 / 7400 (Max)");
|
||||
break;
|
||||
case 0x0014:
|
||||
sprintf(model, "620 (Red October)");
|
||||
break;
|
||||
case 0x0081:
|
||||
sprintf(model, "8240 (Kahlua)");
|
||||
break;
|
||||
case 0x8000:
|
||||
sprintf(model, "G4 / 7450 (V'ger)");
|
||||
break;
|
||||
case 0x800c:
|
||||
sprintf(model, "G4 / 7410 (Nitro)");
|
||||
break;
|
||||
case 0x8081:
|
||||
sprintf(model, "8245 (Kahlua II)");
|
||||
break;
|
||||
default:
|
||||
sprintf(model, "Version %x", version);
|
||||
break;
|
||||
}
|
||||
sprintf(model + strlen(model), " (Revision %x)", revision);
|
||||
printf("CPU: PowerPC %s\n", model);
|
||||
}
|
||||
|
||||
extern char kernel_text[], _end[];
|
||||
|
||||
extern void *trapcode, *trapsize;
|
||||
|
Loading…
Reference in New Issue
Block a user