2 * Copyright (C) 2001 Ben. Herrenschmidt (benh@kernel.crashing.org)
4 * Modifications for ppc64:
5 * Copyright (C) 2003 Dave Engebretsen <engebret@us.ibm.com>
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version
10 * 2 of the License, or (at your option) any later version.
13 #include <linux/string.h>
14 #include <linux/sched.h>
15 #include <linux/threads.h>
16 #include <linux/init.h>
17 #include <linux/module.h>
19 #include <asm/oprofile_impl.h>
20 #include <asm/cputable.h>
21 #include <asm/prom.h> /* for PTRRELOC on ARCH=ppc */
23 struct cpu_spec* cur_cpu_spec = NULL;
24 EXPORT_SYMBOL(cur_cpu_spec);
26 /* The platform string corresponding to the real PVR */
27 const char *powerpc_base_platform;
30 * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's
31 * the responsibility of the appropriate CPU save/restore functions to
32 * eventually copy these settings over. Those save/restore aren't yet
33 * part of the cputable though. That has to be fixed for both ppc32
37 extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
38 extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
39 extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
40 extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
41 extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
42 extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec);
43 extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec);
44 extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
45 extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
46 extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
47 extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
48 extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
49 extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
50 extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
51 extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
52 #endif /* CONFIG_PPC32 */
54 extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
55 extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
56 extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
57 extern void __restore_cpu_pa6t(void);
58 extern void __restore_cpu_ppc970(void);
59 extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec);
60 extern void __restore_cpu_power7(void);
61 #endif /* CONFIG_PPC64 */
63 /* This table only contains "desktop" CPUs, it need to be filled with embedded
66 #define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
68 #define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
69 #define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
70 #define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
71 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
72 #define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
73 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
74 #define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
75 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
76 PPC_FEATURE_TRUE_LE | \
77 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
78 #define COMMON_USER_POWER7 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
79 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
80 PPC_FEATURE_TRUE_LE | \
81 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
82 #define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
83 PPC_FEATURE_TRUE_LE | \
84 PPC_FEATURE_HAS_ALTIVEC_COMP)
85 #define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
88 static struct cpu_spec __initdata cpu_specs[] = {
91 .pvr_mask = 0xffff0000,
92 .pvr_value = 0x00400000,
93 .cpu_name = "POWER3 (630)",
94 .cpu_features = CPU_FTRS_POWER3,
95 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
99 .pmc_type = PPC_PMC_IBM,
100 .oprofile_cpu_type = "ppc64/power3",
101 .oprofile_type = PPC_OPROFILE_RS64,
102 .machine_check = machine_check_generic,
103 .platform = "power3",
106 .pvr_mask = 0xffff0000,
107 .pvr_value = 0x00410000,
108 .cpu_name = "POWER3 (630+)",
109 .cpu_features = CPU_FTRS_POWER3,
110 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
114 .pmc_type = PPC_PMC_IBM,
115 .oprofile_cpu_type = "ppc64/power3",
116 .oprofile_type = PPC_OPROFILE_RS64,
117 .machine_check = machine_check_generic,
118 .platform = "power3",
121 .pvr_mask = 0xffff0000,
122 .pvr_value = 0x00330000,
123 .cpu_name = "RS64-II (northstar)",
124 .cpu_features = CPU_FTRS_RS64,
125 .cpu_user_features = COMMON_USER_PPC64,
129 .pmc_type = PPC_PMC_IBM,
130 .oprofile_cpu_type = "ppc64/rs64",
131 .oprofile_type = PPC_OPROFILE_RS64,
132 .machine_check = machine_check_generic,
136 .pvr_mask = 0xffff0000,
137 .pvr_value = 0x00340000,
138 .cpu_name = "RS64-III (pulsar)",
139 .cpu_features = CPU_FTRS_RS64,
140 .cpu_user_features = COMMON_USER_PPC64,
144 .pmc_type = PPC_PMC_IBM,
145 .oprofile_cpu_type = "ppc64/rs64",
146 .oprofile_type = PPC_OPROFILE_RS64,
147 .machine_check = machine_check_generic,
151 .pvr_mask = 0xffff0000,
152 .pvr_value = 0x00360000,
153 .cpu_name = "RS64-III (icestar)",
154 .cpu_features = CPU_FTRS_RS64,
155 .cpu_user_features = COMMON_USER_PPC64,
159 .pmc_type = PPC_PMC_IBM,
160 .oprofile_cpu_type = "ppc64/rs64",
161 .oprofile_type = PPC_OPROFILE_RS64,
162 .machine_check = machine_check_generic,
166 .pvr_mask = 0xffff0000,
167 .pvr_value = 0x00370000,
168 .cpu_name = "RS64-IV (sstar)",
169 .cpu_features = CPU_FTRS_RS64,
170 .cpu_user_features = COMMON_USER_PPC64,
174 .pmc_type = PPC_PMC_IBM,
175 .oprofile_cpu_type = "ppc64/rs64",
176 .oprofile_type = PPC_OPROFILE_RS64,
177 .machine_check = machine_check_generic,
181 .pvr_mask = 0xffff0000,
182 .pvr_value = 0x00350000,
183 .cpu_name = "POWER4 (gp)",
184 .cpu_features = CPU_FTRS_POWER4,
185 .cpu_user_features = COMMON_USER_POWER4,
189 .pmc_type = PPC_PMC_IBM,
190 .oprofile_cpu_type = "ppc64/power4",
191 .oprofile_type = PPC_OPROFILE_POWER4,
192 .machine_check = machine_check_generic,
193 .platform = "power4",
196 .pvr_mask = 0xffff0000,
197 .pvr_value = 0x00380000,
198 .cpu_name = "POWER4+ (gq)",
199 .cpu_features = CPU_FTRS_POWER4,
200 .cpu_user_features = COMMON_USER_POWER4,
204 .pmc_type = PPC_PMC_IBM,
205 .oprofile_cpu_type = "ppc64/power4",
206 .oprofile_type = PPC_OPROFILE_POWER4,
207 .machine_check = machine_check_generic,
208 .platform = "power4",
211 .pvr_mask = 0xffff0000,
212 .pvr_value = 0x00390000,
213 .cpu_name = "PPC970",
214 .cpu_features = CPU_FTRS_PPC970,
215 .cpu_user_features = COMMON_USER_POWER4 |
216 PPC_FEATURE_HAS_ALTIVEC_COMP,
220 .pmc_type = PPC_PMC_IBM,
221 .cpu_setup = __setup_cpu_ppc970,
222 .cpu_restore = __restore_cpu_ppc970,
223 .oprofile_cpu_type = "ppc64/970",
224 .oprofile_type = PPC_OPROFILE_POWER4,
225 .machine_check = machine_check_generic,
226 .platform = "ppc970",
229 .pvr_mask = 0xffff0000,
230 .pvr_value = 0x003c0000,
231 .cpu_name = "PPC970FX",
232 .cpu_features = CPU_FTRS_PPC970,
233 .cpu_user_features = COMMON_USER_POWER4 |
234 PPC_FEATURE_HAS_ALTIVEC_COMP,
238 .pmc_type = PPC_PMC_IBM,
239 .cpu_setup = __setup_cpu_ppc970,
240 .cpu_restore = __restore_cpu_ppc970,
241 .oprofile_cpu_type = "ppc64/970",
242 .oprofile_type = PPC_OPROFILE_POWER4,
243 .machine_check = machine_check_generic,
244 .platform = "ppc970",
246 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
247 .pvr_mask = 0xffffffff,
248 .pvr_value = 0x00440100,
249 .cpu_name = "PPC970MP",
250 .cpu_features = CPU_FTRS_PPC970,
251 .cpu_user_features = COMMON_USER_POWER4 |
252 PPC_FEATURE_HAS_ALTIVEC_COMP,
256 .pmc_type = PPC_PMC_IBM,
257 .cpu_setup = __setup_cpu_ppc970,
258 .cpu_restore = __restore_cpu_ppc970,
259 .oprofile_cpu_type = "ppc64/970MP",
260 .oprofile_type = PPC_OPROFILE_POWER4,
261 .machine_check = machine_check_generic,
262 .platform = "ppc970",
265 .pvr_mask = 0xffff0000,
266 .pvr_value = 0x00440000,
267 .cpu_name = "PPC970MP",
268 .cpu_features = CPU_FTRS_PPC970,
269 .cpu_user_features = COMMON_USER_POWER4 |
270 PPC_FEATURE_HAS_ALTIVEC_COMP,
274 .pmc_type = PPC_PMC_IBM,
275 .cpu_setup = __setup_cpu_ppc970MP,
276 .cpu_restore = __restore_cpu_ppc970,
277 .oprofile_cpu_type = "ppc64/970MP",
278 .oprofile_type = PPC_OPROFILE_POWER4,
279 .machine_check = machine_check_generic,
280 .platform = "ppc970",
283 .pvr_mask = 0xffff0000,
284 .pvr_value = 0x00450000,
285 .cpu_name = "PPC970GX",
286 .cpu_features = CPU_FTRS_PPC970,
287 .cpu_user_features = COMMON_USER_POWER4 |
288 PPC_FEATURE_HAS_ALTIVEC_COMP,
292 .pmc_type = PPC_PMC_IBM,
293 .cpu_setup = __setup_cpu_ppc970,
294 .oprofile_cpu_type = "ppc64/970",
295 .oprofile_type = PPC_OPROFILE_POWER4,
296 .machine_check = machine_check_generic,
297 .platform = "ppc970",
300 .pvr_mask = 0xffff0000,
301 .pvr_value = 0x003a0000,
302 .cpu_name = "POWER5 (gr)",
303 .cpu_features = CPU_FTRS_POWER5,
304 .cpu_user_features = COMMON_USER_POWER5,
308 .pmc_type = PPC_PMC_IBM,
309 .oprofile_cpu_type = "ppc64/power5",
310 .oprofile_type = PPC_OPROFILE_POWER4,
311 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
312 * and above but only works on POWER5 and above
314 .oprofile_mmcra_sihv = MMCRA_SIHV,
315 .oprofile_mmcra_sipr = MMCRA_SIPR,
316 .machine_check = machine_check_generic,
317 .platform = "power5",
320 .pvr_mask = 0xffffff00,
321 .pvr_value = 0x003b0300,
322 .cpu_name = "POWER5+ (gs)",
323 .cpu_features = CPU_FTRS_POWER5,
324 .cpu_user_features = COMMON_USER_POWER5_PLUS,
328 .oprofile_cpu_type = "ppc64/power5++",
329 .oprofile_type = PPC_OPROFILE_POWER4,
330 .oprofile_mmcra_sihv = MMCRA_SIHV,
331 .oprofile_mmcra_sipr = MMCRA_SIPR,
332 .machine_check = machine_check_generic,
333 .platform = "power5+",
336 .pvr_mask = 0xffff0000,
337 .pvr_value = 0x003b0000,
338 .cpu_name = "POWER5+ (gs)",
339 .cpu_features = CPU_FTRS_POWER5,
340 .cpu_user_features = COMMON_USER_POWER5_PLUS,
344 .pmc_type = PPC_PMC_IBM,
345 .oprofile_cpu_type = "ppc64/power5+",
346 .oprofile_type = PPC_OPROFILE_POWER4,
347 .oprofile_mmcra_sihv = MMCRA_SIHV,
348 .oprofile_mmcra_sipr = MMCRA_SIPR,
349 .machine_check = machine_check_generic,
350 .platform = "power5+",
352 { /* POWER6 in P5+ mode; 2.04-compliant processor */
353 .pvr_mask = 0xffffffff,
354 .pvr_value = 0x0f000001,
355 .cpu_name = "POWER5+",
356 .cpu_features = CPU_FTRS_POWER5,
357 .cpu_user_features = COMMON_USER_POWER5_PLUS,
360 .machine_check = machine_check_generic,
361 .oprofile_cpu_type = "ppc64/compat-power5+",
362 .platform = "power5+",
365 .pvr_mask = 0xffff0000,
366 .pvr_value = 0x003e0000,
367 .cpu_name = "POWER6 (raw)",
368 .cpu_features = CPU_FTRS_POWER6,
369 .cpu_user_features = COMMON_USER_POWER6 |
370 PPC_FEATURE_POWER6_EXT,
374 .pmc_type = PPC_PMC_IBM,
375 .oprofile_cpu_type = "ppc64/power6",
376 .oprofile_type = PPC_OPROFILE_POWER4,
377 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
378 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
379 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
381 .machine_check = machine_check_generic,
382 .platform = "power6x",
384 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
385 .pvr_mask = 0xffffffff,
386 .pvr_value = 0x0f000002,
387 .cpu_name = "POWER6 (architected)",
388 .cpu_features = CPU_FTRS_POWER6,
389 .cpu_user_features = COMMON_USER_POWER6,
392 .machine_check = machine_check_generic,
393 .oprofile_cpu_type = "ppc64/compat-power6",
394 .platform = "power6",
396 { /* 2.06-compliant processor, i.e. Power7 "architected" mode */
397 .pvr_mask = 0xffffffff,
398 .pvr_value = 0x0f000003,
399 .cpu_name = "POWER7 (architected)",
400 .cpu_features = CPU_FTRS_POWER7,
401 .cpu_user_features = COMMON_USER_POWER7,
404 .machine_check = machine_check_generic,
405 .oprofile_cpu_type = "ppc64/compat-power7",
406 .platform = "power7",
409 .pvr_mask = 0xffff0000,
410 .pvr_value = 0x003f0000,
411 .cpu_name = "POWER7 (raw)",
412 .cpu_features = CPU_FTRS_POWER7,
413 .cpu_user_features = COMMON_USER_POWER7,
417 .pmc_type = PPC_PMC_IBM,
418 .cpu_setup = __setup_cpu_power7,
419 .cpu_restore = __restore_cpu_power7,
420 .oprofile_cpu_type = "ppc64/power7",
421 .oprofile_type = PPC_OPROFILE_POWER4,
422 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
423 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
424 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
426 .platform = "power7",
428 { /* Cell Broadband Engine */
429 .pvr_mask = 0xffff0000,
430 .pvr_value = 0x00700000,
431 .cpu_name = "Cell Broadband Engine",
432 .cpu_features = CPU_FTRS_CELL,
433 .cpu_user_features = COMMON_USER_PPC64 |
434 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
439 .pmc_type = PPC_PMC_IBM,
440 .oprofile_cpu_type = "ppc64/cell-be",
441 .oprofile_type = PPC_OPROFILE_CELL,
442 .machine_check = machine_check_generic,
443 .platform = "ppc-cell-be",
446 .pvr_mask = 0x7fff0000,
447 .pvr_value = 0x00900000,
449 .cpu_features = CPU_FTRS_PA6T,
450 .cpu_user_features = COMMON_USER_PA6T,
454 .pmc_type = PPC_PMC_PA6T,
455 .cpu_setup = __setup_cpu_pa6t,
456 .cpu_restore = __restore_cpu_pa6t,
457 .oprofile_cpu_type = "ppc64/pa6t",
458 .oprofile_type = PPC_OPROFILE_PA6T,
459 .machine_check = machine_check_generic,
462 { /* default match */
463 .pvr_mask = 0x00000000,
464 .pvr_value = 0x00000000,
465 .cpu_name = "POWER4 (compatible)",
466 .cpu_features = CPU_FTRS_COMPATIBLE,
467 .cpu_user_features = COMMON_USER_PPC64,
471 .pmc_type = PPC_PMC_IBM,
472 .machine_check = machine_check_generic,
473 .platform = "power4",
475 #endif /* CONFIG_PPC64 */
479 .pvr_mask = 0xffff0000,
480 .pvr_value = 0x00010000,
482 .cpu_features = CPU_FTRS_PPC601,
483 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
484 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
487 .machine_check = machine_check_generic,
488 .platform = "ppc601",
491 .pvr_mask = 0xffff0000,
492 .pvr_value = 0x00030000,
494 .cpu_features = CPU_FTRS_603,
495 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
498 .cpu_setup = __setup_cpu_603,
499 .machine_check = machine_check_generic,
500 .platform = "ppc603",
503 .pvr_mask = 0xffff0000,
504 .pvr_value = 0x00060000,
506 .cpu_features = CPU_FTRS_603,
507 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
510 .cpu_setup = __setup_cpu_603,
511 .machine_check = machine_check_generic,
512 .platform = "ppc603",
515 .pvr_mask = 0xffff0000,
516 .pvr_value = 0x00070000,
518 .cpu_features = CPU_FTRS_603,
519 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
522 .cpu_setup = __setup_cpu_603,
523 .machine_check = machine_check_generic,
524 .platform = "ppc603",
527 .pvr_mask = 0xffff0000,
528 .pvr_value = 0x00040000,
530 .cpu_features = CPU_FTRS_604,
531 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
535 .cpu_setup = __setup_cpu_604,
536 .machine_check = machine_check_generic,
537 .platform = "ppc604",
540 .pvr_mask = 0xfffff000,
541 .pvr_value = 0x00090000,
543 .cpu_features = CPU_FTRS_604,
544 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
548 .cpu_setup = __setup_cpu_604,
549 .machine_check = machine_check_generic,
550 .platform = "ppc604",
553 .pvr_mask = 0xffff0000,
554 .pvr_value = 0x00090000,
556 .cpu_features = CPU_FTRS_604,
557 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
561 .cpu_setup = __setup_cpu_604,
562 .machine_check = machine_check_generic,
563 .platform = "ppc604",
566 .pvr_mask = 0xffff0000,
567 .pvr_value = 0x000a0000,
569 .cpu_features = CPU_FTRS_604,
570 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
574 .cpu_setup = __setup_cpu_604,
575 .machine_check = machine_check_generic,
576 .platform = "ppc604",
578 { /* 740/750 (0x4202, don't support TAU ?) */
579 .pvr_mask = 0xffffffff,
580 .pvr_value = 0x00084202,
581 .cpu_name = "740/750",
582 .cpu_features = CPU_FTRS_740_NOTAU,
583 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
587 .cpu_setup = __setup_cpu_750,
588 .machine_check = machine_check_generic,
589 .platform = "ppc750",
591 { /* 750CX (80100 and 8010x?) */
592 .pvr_mask = 0xfffffff0,
593 .pvr_value = 0x00080100,
595 .cpu_features = CPU_FTRS_750,
596 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
600 .cpu_setup = __setup_cpu_750cx,
601 .machine_check = machine_check_generic,
602 .platform = "ppc750",
604 { /* 750CX (82201 and 82202) */
605 .pvr_mask = 0xfffffff0,
606 .pvr_value = 0x00082200,
608 .cpu_features = CPU_FTRS_750,
609 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
613 .pmc_type = PPC_PMC_IBM,
614 .cpu_setup = __setup_cpu_750cx,
615 .machine_check = machine_check_generic,
616 .platform = "ppc750",
618 { /* 750CXe (82214) */
619 .pvr_mask = 0xfffffff0,
620 .pvr_value = 0x00082210,
621 .cpu_name = "750CXe",
622 .cpu_features = CPU_FTRS_750,
623 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
627 .pmc_type = PPC_PMC_IBM,
628 .cpu_setup = __setup_cpu_750cx,
629 .machine_check = machine_check_generic,
630 .platform = "ppc750",
632 { /* 750CXe "Gekko" (83214) */
633 .pvr_mask = 0xffffffff,
634 .pvr_value = 0x00083214,
635 .cpu_name = "750CXe",
636 .cpu_features = CPU_FTRS_750,
637 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
641 .pmc_type = PPC_PMC_IBM,
642 .cpu_setup = __setup_cpu_750cx,
643 .machine_check = machine_check_generic,
644 .platform = "ppc750",
647 .pvr_mask = 0xfffff0f0,
648 .pvr_value = 0x00087010,
650 .cpu_features = CPU_FTRS_750CL,
651 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
655 .pmc_type = PPC_PMC_IBM,
656 .cpu_setup = __setup_cpu_750,
657 .machine_check = machine_check_generic,
658 .platform = "ppc750",
661 .pvr_mask = 0xfffff000,
662 .pvr_value = 0x00083000,
663 .cpu_name = "745/755",
664 .cpu_features = CPU_FTRS_750,
665 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
669 .pmc_type = PPC_PMC_IBM,
670 .cpu_setup = __setup_cpu_750,
671 .machine_check = machine_check_generic,
672 .platform = "ppc750",
674 { /* 750FX rev 1.x */
675 .pvr_mask = 0xffffff00,
676 .pvr_value = 0x70000100,
678 .cpu_features = CPU_FTRS_750FX1,
679 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
683 .pmc_type = PPC_PMC_IBM,
684 .cpu_setup = __setup_cpu_750,
685 .machine_check = machine_check_generic,
686 .platform = "ppc750",
688 { /* 750FX rev 2.0 must disable HID0[DPM] */
689 .pvr_mask = 0xffffffff,
690 .pvr_value = 0x70000200,
692 .cpu_features = CPU_FTRS_750FX2,
693 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
697 .pmc_type = PPC_PMC_IBM,
698 .cpu_setup = __setup_cpu_750,
699 .machine_check = machine_check_generic,
700 .platform = "ppc750",
702 { /* 750FX (All revs except 2.0) */
703 .pvr_mask = 0xffff0000,
704 .pvr_value = 0x70000000,
706 .cpu_features = CPU_FTRS_750FX,
707 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
711 .pmc_type = PPC_PMC_IBM,
712 .cpu_setup = __setup_cpu_750fx,
713 .machine_check = machine_check_generic,
714 .platform = "ppc750",
717 .pvr_mask = 0xffff0000,
718 .pvr_value = 0x70020000,
720 .cpu_features = CPU_FTRS_750GX,
721 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
725 .pmc_type = PPC_PMC_IBM,
726 .cpu_setup = __setup_cpu_750fx,
727 .machine_check = machine_check_generic,
728 .platform = "ppc750",
730 { /* 740/750 (L2CR bit need fixup for 740) */
731 .pvr_mask = 0xffff0000,
732 .pvr_value = 0x00080000,
733 .cpu_name = "740/750",
734 .cpu_features = CPU_FTRS_740,
735 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
739 .pmc_type = PPC_PMC_IBM,
740 .cpu_setup = __setup_cpu_750,
741 .machine_check = machine_check_generic,
742 .platform = "ppc750",
744 { /* 7400 rev 1.1 ? (no TAU) */
745 .pvr_mask = 0xffffffff,
746 .pvr_value = 0x000c1101,
747 .cpu_name = "7400 (1.1)",
748 .cpu_features = CPU_FTRS_7400_NOTAU,
749 .cpu_user_features = COMMON_USER |
750 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
754 .pmc_type = PPC_PMC_G4,
755 .cpu_setup = __setup_cpu_7400,
756 .machine_check = machine_check_generic,
757 .platform = "ppc7400",
760 .pvr_mask = 0xffff0000,
761 .pvr_value = 0x000c0000,
763 .cpu_features = CPU_FTRS_7400,
764 .cpu_user_features = COMMON_USER |
765 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
769 .pmc_type = PPC_PMC_G4,
770 .cpu_setup = __setup_cpu_7400,
771 .machine_check = machine_check_generic,
772 .platform = "ppc7400",
775 .pvr_mask = 0xffff0000,
776 .pvr_value = 0x800c0000,
778 .cpu_features = CPU_FTRS_7400,
779 .cpu_user_features = COMMON_USER |
780 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
784 .pmc_type = PPC_PMC_G4,
785 .cpu_setup = __setup_cpu_7410,
786 .machine_check = machine_check_generic,
787 .platform = "ppc7400",
789 { /* 7450 2.0 - no doze/nap */
790 .pvr_mask = 0xffffffff,
791 .pvr_value = 0x80000200,
793 .cpu_features = CPU_FTRS_7450_20,
794 .cpu_user_features = COMMON_USER |
795 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
799 .pmc_type = PPC_PMC_G4,
800 .cpu_setup = __setup_cpu_745x,
801 .oprofile_cpu_type = "ppc/7450",
802 .oprofile_type = PPC_OPROFILE_G4,
803 .machine_check = machine_check_generic,
804 .platform = "ppc7450",
807 .pvr_mask = 0xffffffff,
808 .pvr_value = 0x80000201,
810 .cpu_features = CPU_FTRS_7450_21,
811 .cpu_user_features = COMMON_USER |
812 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
816 .pmc_type = PPC_PMC_G4,
817 .cpu_setup = __setup_cpu_745x,
818 .oprofile_cpu_type = "ppc/7450",
819 .oprofile_type = PPC_OPROFILE_G4,
820 .machine_check = machine_check_generic,
821 .platform = "ppc7450",
823 { /* 7450 2.3 and newer */
824 .pvr_mask = 0xffff0000,
825 .pvr_value = 0x80000000,
827 .cpu_features = CPU_FTRS_7450_23,
828 .cpu_user_features = COMMON_USER |
829 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
833 .pmc_type = PPC_PMC_G4,
834 .cpu_setup = __setup_cpu_745x,
835 .oprofile_cpu_type = "ppc/7450",
836 .oprofile_type = PPC_OPROFILE_G4,
837 .machine_check = machine_check_generic,
838 .platform = "ppc7450",
841 .pvr_mask = 0xffffff00,
842 .pvr_value = 0x80010100,
844 .cpu_features = CPU_FTRS_7455_1,
845 .cpu_user_features = COMMON_USER |
846 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
850 .pmc_type = PPC_PMC_G4,
851 .cpu_setup = __setup_cpu_745x,
852 .oprofile_cpu_type = "ppc/7450",
853 .oprofile_type = PPC_OPROFILE_G4,
854 .machine_check = machine_check_generic,
855 .platform = "ppc7450",
858 .pvr_mask = 0xffffffff,
859 .pvr_value = 0x80010200,
861 .cpu_features = CPU_FTRS_7455_20,
862 .cpu_user_features = COMMON_USER |
863 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
867 .pmc_type = PPC_PMC_G4,
868 .cpu_setup = __setup_cpu_745x,
869 .oprofile_cpu_type = "ppc/7450",
870 .oprofile_type = PPC_OPROFILE_G4,
871 .machine_check = machine_check_generic,
872 .platform = "ppc7450",
875 .pvr_mask = 0xffff0000,
876 .pvr_value = 0x80010000,
878 .cpu_features = CPU_FTRS_7455,
879 .cpu_user_features = COMMON_USER |
880 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
884 .pmc_type = PPC_PMC_G4,
885 .cpu_setup = __setup_cpu_745x,
886 .oprofile_cpu_type = "ppc/7450",
887 .oprofile_type = PPC_OPROFILE_G4,
888 .machine_check = machine_check_generic,
889 .platform = "ppc7450",
891 { /* 7447/7457 Rev 1.0 */
892 .pvr_mask = 0xffffffff,
893 .pvr_value = 0x80020100,
894 .cpu_name = "7447/7457",
895 .cpu_features = CPU_FTRS_7447_10,
896 .cpu_user_features = COMMON_USER |
897 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
901 .pmc_type = PPC_PMC_G4,
902 .cpu_setup = __setup_cpu_745x,
903 .oprofile_cpu_type = "ppc/7450",
904 .oprofile_type = PPC_OPROFILE_G4,
905 .machine_check = machine_check_generic,
906 .platform = "ppc7450",
908 { /* 7447/7457 Rev 1.1 */
909 .pvr_mask = 0xffffffff,
910 .pvr_value = 0x80020101,
911 .cpu_name = "7447/7457",
912 .cpu_features = CPU_FTRS_7447_10,
913 .cpu_user_features = COMMON_USER |
914 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
918 .pmc_type = PPC_PMC_G4,
919 .cpu_setup = __setup_cpu_745x,
920 .oprofile_cpu_type = "ppc/7450",
921 .oprofile_type = PPC_OPROFILE_G4,
922 .machine_check = machine_check_generic,
923 .platform = "ppc7450",
925 { /* 7447/7457 Rev 1.2 and later */
926 .pvr_mask = 0xffff0000,
927 .pvr_value = 0x80020000,
928 .cpu_name = "7447/7457",
929 .cpu_features = CPU_FTRS_7447,
930 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
934 .pmc_type = PPC_PMC_G4,
935 .cpu_setup = __setup_cpu_745x,
936 .oprofile_cpu_type = "ppc/7450",
937 .oprofile_type = PPC_OPROFILE_G4,
938 .machine_check = machine_check_generic,
939 .platform = "ppc7450",
942 .pvr_mask = 0xffff0000,
943 .pvr_value = 0x80030000,
945 .cpu_features = CPU_FTRS_7447A,
946 .cpu_user_features = COMMON_USER |
947 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
951 .pmc_type = PPC_PMC_G4,
952 .cpu_setup = __setup_cpu_745x,
953 .oprofile_cpu_type = "ppc/7450",
954 .oprofile_type = PPC_OPROFILE_G4,
955 .machine_check = machine_check_generic,
956 .platform = "ppc7450",
959 .pvr_mask = 0xffff0000,
960 .pvr_value = 0x80040000,
962 .cpu_features = CPU_FTRS_7448,
963 .cpu_user_features = COMMON_USER |
964 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
968 .pmc_type = PPC_PMC_G4,
969 .cpu_setup = __setup_cpu_745x,
970 .oprofile_cpu_type = "ppc/7450",
971 .oprofile_type = PPC_OPROFILE_G4,
972 .machine_check = machine_check_generic,
973 .platform = "ppc7450",
975 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
976 .pvr_mask = 0x7fff0000,
977 .pvr_value = 0x00810000,
979 .cpu_features = CPU_FTRS_82XX,
980 .cpu_user_features = COMMON_USER,
983 .cpu_setup = __setup_cpu_603,
984 .machine_check = machine_check_generic,
985 .platform = "ppc603",
987 { /* All G2_LE (603e core, plus some) have the same pvr */
988 .pvr_mask = 0x7fff0000,
989 .pvr_value = 0x00820000,
991 .cpu_features = CPU_FTRS_G2_LE,
992 .cpu_user_features = COMMON_USER,
995 .cpu_setup = __setup_cpu_603,
996 .machine_check = machine_check_generic,
997 .platform = "ppc603",
999 { /* e300c1 (a 603e core, plus some) on 83xx */
1000 .pvr_mask = 0x7fff0000,
1001 .pvr_value = 0x00830000,
1002 .cpu_name = "e300c1",
1003 .cpu_features = CPU_FTRS_E300,
1004 .cpu_user_features = COMMON_USER,
1007 .cpu_setup = __setup_cpu_603,
1008 .machine_check = machine_check_generic,
1009 .platform = "ppc603",
1011 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
1012 .pvr_mask = 0x7fff0000,
1013 .pvr_value = 0x00840000,
1014 .cpu_name = "e300c2",
1015 .cpu_features = CPU_FTRS_E300C2,
1016 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1019 .cpu_setup = __setup_cpu_603,
1020 .machine_check = machine_check_generic,
1021 .platform = "ppc603",
1023 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
1024 .pvr_mask = 0x7fff0000,
1025 .pvr_value = 0x00850000,
1026 .cpu_name = "e300c3",
1027 .cpu_features = CPU_FTRS_E300,
1028 .cpu_user_features = COMMON_USER,
1031 .cpu_setup = __setup_cpu_603,
1033 .oprofile_cpu_type = "ppc/e300",
1034 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1035 .platform = "ppc603",
1037 { /* e300c4 (e300c1, plus one IU) */
1038 .pvr_mask = 0x7fff0000,
1039 .pvr_value = 0x00860000,
1040 .cpu_name = "e300c4",
1041 .cpu_features = CPU_FTRS_E300,
1042 .cpu_user_features = COMMON_USER,
1045 .cpu_setup = __setup_cpu_603,
1046 .machine_check = machine_check_generic,
1048 .oprofile_cpu_type = "ppc/e300",
1049 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1050 .platform = "ppc603",
1052 { /* default match, we assume split I/D cache & TB (non-601)... */
1053 .pvr_mask = 0x00000000,
1054 .pvr_value = 0x00000000,
1055 .cpu_name = "(generic PPC)",
1056 .cpu_features = CPU_FTRS_CLASSIC32,
1057 .cpu_user_features = COMMON_USER,
1060 .machine_check = machine_check_generic,
1061 .platform = "ppc603",
1063 #endif /* CLASSIC_PPC */
1066 .pvr_mask = 0xffff0000,
1067 .pvr_value = 0x00500000,
1069 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1070 * if the 8xx code is there.... */
1071 .cpu_features = CPU_FTRS_8XX,
1072 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1075 .platform = "ppc823",
1077 #endif /* CONFIG_8xx */
1080 .pvr_mask = 0xffffff00,
1081 .pvr_value = 0x00200200,
1082 .cpu_name = "403GC",
1083 .cpu_features = CPU_FTRS_40X,
1084 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1087 .machine_check = machine_check_4xx,
1088 .platform = "ppc403",
1091 .pvr_mask = 0xffffff00,
1092 .pvr_value = 0x00201400,
1093 .cpu_name = "403GCX",
1094 .cpu_features = CPU_FTRS_40X,
1095 .cpu_user_features = PPC_FEATURE_32 |
1096 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
1099 .machine_check = machine_check_4xx,
1100 .platform = "ppc403",
1103 .pvr_mask = 0xffff0000,
1104 .pvr_value = 0x00200000,
1105 .cpu_name = "403G ??",
1106 .cpu_features = CPU_FTRS_40X,
1107 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1110 .machine_check = machine_check_4xx,
1111 .platform = "ppc403",
1114 .pvr_mask = 0xffff0000,
1115 .pvr_value = 0x40110000,
1116 .cpu_name = "405GP",
1117 .cpu_features = CPU_FTRS_40X,
1118 .cpu_user_features = PPC_FEATURE_32 |
1119 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1122 .machine_check = machine_check_4xx,
1123 .platform = "ppc405",
1126 .pvr_mask = 0xffff0000,
1127 .pvr_value = 0x40130000,
1128 .cpu_name = "STB03xxx",
1129 .cpu_features = CPU_FTRS_40X,
1130 .cpu_user_features = PPC_FEATURE_32 |
1131 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1134 .machine_check = machine_check_4xx,
1135 .platform = "ppc405",
1138 .pvr_mask = 0xffff0000,
1139 .pvr_value = 0x41810000,
1140 .cpu_name = "STB04xxx",
1141 .cpu_features = CPU_FTRS_40X,
1142 .cpu_user_features = PPC_FEATURE_32 |
1143 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1146 .machine_check = machine_check_4xx,
1147 .platform = "ppc405",
1150 .pvr_mask = 0xffff0000,
1151 .pvr_value = 0x41610000,
1152 .cpu_name = "NP405L",
1153 .cpu_features = CPU_FTRS_40X,
1154 .cpu_user_features = PPC_FEATURE_32 |
1155 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1158 .machine_check = machine_check_4xx,
1159 .platform = "ppc405",
1162 .pvr_mask = 0xffff0000,
1163 .pvr_value = 0x40B10000,
1164 .cpu_name = "NP4GS3",
1165 .cpu_features = CPU_FTRS_40X,
1166 .cpu_user_features = PPC_FEATURE_32 |
1167 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1170 .machine_check = machine_check_4xx,
1171 .platform = "ppc405",
1174 .pvr_mask = 0xffff0000,
1175 .pvr_value = 0x41410000,
1176 .cpu_name = "NP405H",
1177 .cpu_features = CPU_FTRS_40X,
1178 .cpu_user_features = PPC_FEATURE_32 |
1179 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1182 .machine_check = machine_check_4xx,
1183 .platform = "ppc405",
1186 .pvr_mask = 0xffff0000,
1187 .pvr_value = 0x50910000,
1188 .cpu_name = "405GPr",
1189 .cpu_features = CPU_FTRS_40X,
1190 .cpu_user_features = PPC_FEATURE_32 |
1191 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1194 .machine_check = machine_check_4xx,
1195 .platform = "ppc405",
1198 .pvr_mask = 0xffff0000,
1199 .pvr_value = 0x51510000,
1200 .cpu_name = "STBx25xx",
1201 .cpu_features = CPU_FTRS_40X,
1202 .cpu_user_features = PPC_FEATURE_32 |
1203 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1206 .machine_check = machine_check_4xx,
1207 .platform = "ppc405",
1210 .pvr_mask = 0xffff0000,
1211 .pvr_value = 0x41F10000,
1212 .cpu_name = "405LP",
1213 .cpu_features = CPU_FTRS_40X,
1214 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1217 .machine_check = machine_check_4xx,
1218 .platform = "ppc405",
1220 { /* Xilinx Virtex-II Pro */
1221 .pvr_mask = 0xfffff000,
1222 .pvr_value = 0x20010000,
1223 .cpu_name = "Virtex-II Pro",
1224 .cpu_features = CPU_FTRS_40X,
1225 .cpu_user_features = PPC_FEATURE_32 |
1226 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1229 .machine_check = machine_check_4xx,
1230 .platform = "ppc405",
1232 { /* Xilinx Virtex-4 FX */
1233 .pvr_mask = 0xfffff000,
1234 .pvr_value = 0x20011000,
1235 .cpu_name = "Virtex-4 FX",
1236 .cpu_features = CPU_FTRS_40X,
1237 .cpu_user_features = PPC_FEATURE_32 |
1238 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1241 .machine_check = machine_check_4xx,
1242 .platform = "ppc405",
1245 .pvr_mask = 0xffff0000,
1246 .pvr_value = 0x51210000,
1247 .cpu_name = "405EP",
1248 .cpu_features = CPU_FTRS_40X,
1249 .cpu_user_features = PPC_FEATURE_32 |
1250 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1253 .machine_check = machine_check_4xx,
1254 .platform = "ppc405",
1257 .pvr_mask = 0xffff0004,
1258 .pvr_value = 0x12910004,
1259 .cpu_name = "405EX",
1260 .cpu_features = CPU_FTRS_40X,
1261 .cpu_user_features = PPC_FEATURE_32 |
1262 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1265 .machine_check = machine_check_4xx,
1266 .platform = "ppc405",
1269 .pvr_mask = 0xffff0004,
1270 .pvr_value = 0x12910000,
1271 .cpu_name = "405EXr",
1272 .cpu_features = CPU_FTRS_40X,
1273 .cpu_user_features = PPC_FEATURE_32 |
1274 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1277 .machine_check = machine_check_4xx,
1278 .platform = "ppc405",
1280 { /* default match */
1281 .pvr_mask = 0x00000000,
1282 .pvr_value = 0x00000000,
1283 .cpu_name = "(generic 40x PPC)",
1284 .cpu_features = CPU_FTRS_40X,
1285 .cpu_user_features = PPC_FEATURE_32 |
1286 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1289 .machine_check = machine_check_4xx,
1290 .platform = "ppc405",
1293 #endif /* CONFIG_40x */
1296 .pvr_mask = 0xf0000fff,
1297 .pvr_value = 0x40000850,
1298 .cpu_name = "440GR Rev. A",
1299 .cpu_features = CPU_FTRS_44X,
1300 .cpu_user_features = COMMON_USER_BOOKE,
1303 .machine_check = machine_check_4xx,
1304 .platform = "ppc440",
1306 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1307 .pvr_mask = 0xf0000fff,
1308 .pvr_value = 0x40000858,
1309 .cpu_name = "440EP Rev. A",
1310 .cpu_features = CPU_FTRS_44X,
1311 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1314 .cpu_setup = __setup_cpu_440ep,
1315 .machine_check = machine_check_4xx,
1316 .platform = "ppc440",
1319 .pvr_mask = 0xf0000fff,
1320 .pvr_value = 0x400008d3,
1321 .cpu_name = "440GR Rev. B",
1322 .cpu_features = CPU_FTRS_44X,
1323 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1326 .machine_check = machine_check_4xx,
1327 .platform = "ppc440",
1329 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1330 .pvr_mask = 0xf0000ff7,
1331 .pvr_value = 0x400008d4,
1332 .cpu_name = "440EP Rev. C",
1333 .cpu_features = CPU_FTRS_44X,
1334 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1337 .cpu_setup = __setup_cpu_440ep,
1338 .machine_check = machine_check_4xx,
1339 .platform = "ppc440",
1341 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1342 .pvr_mask = 0xf0000fff,
1343 .pvr_value = 0x400008db,
1344 .cpu_name = "440EP Rev. B",
1345 .cpu_features = CPU_FTRS_44X,
1346 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1349 .cpu_setup = __setup_cpu_440ep,
1350 .machine_check = machine_check_4xx,
1351 .platform = "ppc440",
1354 .pvr_mask = 0xf0000ffb,
1355 .pvr_value = 0x200008D0,
1356 .cpu_name = "440GRX",
1357 .cpu_features = CPU_FTRS_44X,
1358 .cpu_user_features = COMMON_USER_BOOKE,
1361 .cpu_setup = __setup_cpu_440grx,
1362 .machine_check = machine_check_440A,
1363 .platform = "ppc440",
1365 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1366 .pvr_mask = 0xf0000ffb,
1367 .pvr_value = 0x200008D8,
1368 .cpu_name = "440EPX",
1369 .cpu_features = CPU_FTRS_44X,
1370 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1373 .cpu_setup = __setup_cpu_440epx,
1374 .machine_check = machine_check_440A,
1375 .platform = "ppc440",
1377 { /* 440GP Rev. B */
1378 .pvr_mask = 0xf0000fff,
1379 .pvr_value = 0x40000440,
1380 .cpu_name = "440GP Rev. B",
1381 .cpu_features = CPU_FTRS_44X,
1382 .cpu_user_features = COMMON_USER_BOOKE,
1385 .machine_check = machine_check_4xx,
1386 .platform = "ppc440gp",
1388 { /* 440GP Rev. C */
1389 .pvr_mask = 0xf0000fff,
1390 .pvr_value = 0x40000481,
1391 .cpu_name = "440GP Rev. C",
1392 .cpu_features = CPU_FTRS_44X,
1393 .cpu_user_features = COMMON_USER_BOOKE,
1396 .machine_check = machine_check_4xx,
1397 .platform = "ppc440gp",
1399 { /* 440GX Rev. A */
1400 .pvr_mask = 0xf0000fff,
1401 .pvr_value = 0x50000850,
1402 .cpu_name = "440GX Rev. A",
1403 .cpu_features = CPU_FTRS_44X,
1404 .cpu_user_features = COMMON_USER_BOOKE,
1407 .cpu_setup = __setup_cpu_440gx,
1408 .machine_check = machine_check_440A,
1409 .platform = "ppc440",
1411 { /* 440GX Rev. B */
1412 .pvr_mask = 0xf0000fff,
1413 .pvr_value = 0x50000851,
1414 .cpu_name = "440GX Rev. B",
1415 .cpu_features = CPU_FTRS_44X,
1416 .cpu_user_features = COMMON_USER_BOOKE,
1419 .cpu_setup = __setup_cpu_440gx,
1420 .machine_check = machine_check_440A,
1421 .platform = "ppc440",
1423 { /* 440GX Rev. C */
1424 .pvr_mask = 0xf0000fff,
1425 .pvr_value = 0x50000892,
1426 .cpu_name = "440GX Rev. C",
1427 .cpu_features = CPU_FTRS_44X,
1428 .cpu_user_features = COMMON_USER_BOOKE,
1431 .cpu_setup = __setup_cpu_440gx,
1432 .machine_check = machine_check_440A,
1433 .platform = "ppc440",
1435 { /* 440GX Rev. F */
1436 .pvr_mask = 0xf0000fff,
1437 .pvr_value = 0x50000894,
1438 .cpu_name = "440GX Rev. F",
1439 .cpu_features = CPU_FTRS_44X,
1440 .cpu_user_features = COMMON_USER_BOOKE,
1443 .cpu_setup = __setup_cpu_440gx,
1444 .machine_check = machine_check_440A,
1445 .platform = "ppc440",
1447 { /* 440SP Rev. A */
1448 .pvr_mask = 0xfff00fff,
1449 .pvr_value = 0x53200891,
1450 .cpu_name = "440SP Rev. A",
1451 .cpu_features = CPU_FTRS_44X,
1452 .cpu_user_features = COMMON_USER_BOOKE,
1455 .machine_check = machine_check_4xx,
1456 .platform = "ppc440",
1458 { /* 440SPe Rev. A */
1459 .pvr_mask = 0xfff00fff,
1460 .pvr_value = 0x53400890,
1461 .cpu_name = "440SPe Rev. A",
1462 .cpu_features = CPU_FTRS_44X,
1463 .cpu_user_features = COMMON_USER_BOOKE,
1466 .cpu_setup = __setup_cpu_440spe,
1467 .machine_check = machine_check_440A,
1468 .platform = "ppc440",
1470 { /* 440SPe Rev. B */
1471 .pvr_mask = 0xfff00fff,
1472 .pvr_value = 0x53400891,
1473 .cpu_name = "440SPe Rev. B",
1474 .cpu_features = CPU_FTRS_44X,
1475 .cpu_user_features = COMMON_USER_BOOKE,
1478 .cpu_setup = __setup_cpu_440spe,
1479 .machine_check = machine_check_440A,
1480 .platform = "ppc440",
1482 { /* 440 in Xilinx Virtex-5 FXT */
1483 .pvr_mask = 0xfffffff0,
1484 .pvr_value = 0x7ff21910,
1485 .cpu_name = "440 in Virtex-5 FXT",
1486 .cpu_features = CPU_FTRS_44X,
1487 .cpu_user_features = COMMON_USER_BOOKE,
1490 .platform = "ppc440",
1493 .pvr_mask = 0xffff0002,
1494 .pvr_value = 0x13020002,
1495 .cpu_name = "460EX",
1496 .cpu_features = CPU_FTRS_44X,
1497 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1500 .cpu_setup = __setup_cpu_460ex,
1501 .machine_check = machine_check_440A,
1502 .platform = "ppc440",
1505 .pvr_mask = 0xffff0002,
1506 .pvr_value = 0x13020000,
1507 .cpu_name = "460GT",
1508 .cpu_features = CPU_FTRS_44X,
1509 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1512 .cpu_setup = __setup_cpu_460gt,
1513 .machine_check = machine_check_440A,
1514 .platform = "ppc440",
1516 { /* default match */
1517 .pvr_mask = 0x00000000,
1518 .pvr_value = 0x00000000,
1519 .cpu_name = "(generic 44x PPC)",
1520 .cpu_features = CPU_FTRS_44X,
1521 .cpu_user_features = COMMON_USER_BOOKE,
1524 .machine_check = machine_check_4xx,
1525 .platform = "ppc440",
1527 #endif /* CONFIG_44x */
1530 .pvr_mask = 0xfff00000,
1531 .pvr_value = 0x81000000,
1532 .cpu_name = "e200z5",
1533 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1534 .cpu_features = CPU_FTRS_E200,
1535 .cpu_user_features = COMMON_USER_BOOKE |
1536 PPC_FEATURE_HAS_EFP_SINGLE |
1537 PPC_FEATURE_UNIFIED_CACHE,
1539 .machine_check = machine_check_e200,
1540 .platform = "ppc5554",
1543 .pvr_mask = 0xfff00000,
1544 .pvr_value = 0x81100000,
1545 .cpu_name = "e200z6",
1546 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1547 .cpu_features = CPU_FTRS_E200,
1548 .cpu_user_features = COMMON_USER_BOOKE |
1549 PPC_FEATURE_HAS_SPE_COMP |
1550 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1551 PPC_FEATURE_UNIFIED_CACHE,
1553 .machine_check = machine_check_e200,
1554 .platform = "ppc5554",
1556 { /* default match */
1557 .pvr_mask = 0x00000000,
1558 .pvr_value = 0x00000000,
1559 .cpu_name = "(generic E200 PPC)",
1560 .cpu_features = CPU_FTRS_E200,
1561 .cpu_user_features = COMMON_USER_BOOKE |
1562 PPC_FEATURE_HAS_EFP_SINGLE |
1563 PPC_FEATURE_UNIFIED_CACHE,
1565 .machine_check = machine_check_e200,
1566 .platform = "ppc5554",
1568 #endif /* CONFIG_E200 */
1571 .pvr_mask = 0xffff0000,
1572 .pvr_value = 0x80200000,
1574 .cpu_features = CPU_FTRS_E500,
1575 .cpu_user_features = COMMON_USER_BOOKE |
1576 PPC_FEATURE_HAS_SPE_COMP |
1577 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
1581 .oprofile_cpu_type = "ppc/e500",
1582 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1583 .machine_check = machine_check_e500,
1584 .platform = "ppc8540",
1587 .pvr_mask = 0xffff0000,
1588 .pvr_value = 0x80210000,
1589 .cpu_name = "e500v2",
1590 .cpu_features = CPU_FTRS_E500_2,
1591 .cpu_user_features = COMMON_USER_BOOKE |
1592 PPC_FEATURE_HAS_SPE_COMP |
1593 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1594 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
1598 .oprofile_cpu_type = "ppc/e500",
1599 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1600 .machine_check = machine_check_e500,
1601 .platform = "ppc8548",
1604 .pvr_mask = 0xffff0000,
1605 .pvr_value = 0x80230000,
1606 .cpu_name = "e500mc",
1607 .cpu_features = CPU_FTRS_E500MC,
1608 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1612 .oprofile_cpu_type = "ppc/e500", /* xxx - galak, e500mc? */
1613 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1614 .machine_check = machine_check_e500,
1615 .platform = "ppce500mc",
1617 { /* default match */
1618 .pvr_mask = 0x00000000,
1619 .pvr_value = 0x00000000,
1620 .cpu_name = "(generic E500 PPC)",
1621 .cpu_features = CPU_FTRS_E500,
1622 .cpu_user_features = COMMON_USER_BOOKE |
1623 PPC_FEATURE_HAS_SPE_COMP |
1624 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
1627 .machine_check = machine_check_e500,
1628 .platform = "powerpc",
1630 #endif /* CONFIG_E500 */
1631 #endif /* CONFIG_PPC32 */
1634 static struct cpu_spec the_cpu_spec;
1636 struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
1638 struct cpu_spec *s = cpu_specs;
1639 struct cpu_spec *t = &the_cpu_spec;
1645 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
1646 if ((pvr & s->pvr_mask) == s->pvr_value) {
1648 * If we are overriding a previous value derived
1649 * from the real PVR with a new value obtained
1650 * using a logical PVR value, don't modify the
1651 * performance monitor fields.
1653 if (t->num_pmcs && !s->num_pmcs) {
1654 t->cpu_name = s->cpu_name;
1655 t->cpu_features = s->cpu_features;
1656 t->cpu_user_features = s->cpu_user_features;
1657 t->icache_bsize = s->icache_bsize;
1658 t->dcache_bsize = s->dcache_bsize;
1659 t->cpu_setup = s->cpu_setup;
1660 t->cpu_restore = s->cpu_restore;
1661 t->platform = s->platform;
1663 * If we have passed through this logic once
1664 * before and have pulled the default case
1665 * because the real PVR was not found inside
1666 * cpu_specs[], then we are possibly running in
1667 * compatibility mode. In that case, let the
1668 * oprofiler know which set of compatibility
1669 * counters to pull from by making sure the
1670 * oprofile_cpu_type string is set to that of
1671 * compatibility mode. If the oprofile_cpu_type
1672 * already has a value, then we are possibly
1673 * overriding a real PVR with a logical one, and,
1674 * in that case, keep the current value for
1675 * oprofile_cpu_type.
1677 if (t->oprofile_cpu_type == NULL)
1678 t->oprofile_cpu_type = s->oprofile_cpu_type;
1681 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
1684 * Set the base platform string once; assumes
1685 * we're called with real pvr first.
1687 if (*PTRRELOC(&powerpc_base_platform) == NULL)
1688 *PTRRELOC(&powerpc_base_platform) = t->platform;
1690 #if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
1691 /* ppc64 and booke expect identify_cpu to also call
1692 * setup_cpu for that processor. I will consolidate
1693 * that at a later time, for now, just use #ifdef.
1694 * we also don't need to PTRRELOC the function pointer
1695 * on ppc64 and booke as we are running at 0 in real
1696 * mode on ppc64 and reloc_offset is always 0 on booke.
1699 s->cpu_setup(offset, s);
1701 #endif /* CONFIG_PPC64 || CONFIG_BOOKE */