- Remove all of the annoying $Id strings
[coreboot.git] / src / arch / ppc / lib / cpuid.c
1 /* Copyright 2000  AG Electronics Ltd. */
2 /* This code is distributed without warranty under the GPL v2 (see COPYING) */
3
4 #include "ppc.h"
5 #include "ppcreg.h"
6 #include <console/console.h>
7
8 void display_cpuid(void)
9 {
10     unsigned type = __getpvr() >> 16;
11     unsigned version = __getpvr() & 0xffff;
12     const char *cpu_string = 0;
13     switch(type) {
14         case 1:
15             cpu_string = "601";
16             break;
17         case 3:
18             cpu_string = "603";
19             break;
20         case 4:
21             cpu_string = "604";
22             break;
23         case 6:
24             cpu_string = "603e";
25             break;
26         case 7:
27             cpu_string = "603ev";
28             break;
29         case 8:
30             cpu_string = "750";
31             break;
32         case 9:
33             cpu_string = "604e";
34             break;
35         case 10:
36             cpu_string = "604ev5 (MachV)";
37             break;
38         case 12:
39             cpu_string = "7400";
40             break;
41         case 50:
42             cpu_string = "821";
43             break;
44         case 80:
45             cpu_string = "860";
46             break;
47         case 0x800c:
48             cpu_string = "7410";
49             break;
50     }
51     if (cpu_string)
52         printk_info("PowerPC %s", cpu_string);       
53     else
54         printk_info("PowerPC unknown (0x%x)", type);
55     printk_info(" CPU, version %d.%d\n", version >> 8, version & 0xff);       
56 }
57