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);
27 * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's
28 * the responsibility of the appropriate CPU save/restore functions to
29 * eventually copy these settings over. Those save/restore aren't yet
30 * part of the cputable though. That has to be fixed for both ppc32
34 extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
35 extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
36 extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
37 extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
38 extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
39 extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec);
40 extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec);
41 extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
42 extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
43 extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
44 extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
45 extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
46 extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
47 extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
48 extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
49 #endif /* CONFIG_PPC32 */
51 extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
52 extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
53 extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
54 extern void __restore_cpu_pa6t(void);
55 extern void __restore_cpu_ppc970(void);
56 extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec);
57 extern void __restore_cpu_power7(void);
58 #endif /* CONFIG_PPC64 */
60 /* This table only contains "desktop" CPUs, it need to be filled with embedded
63 #define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
65 #define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
66 #define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
67 #define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
68 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
69 #define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
70 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
71 #define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
72 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
74 #define COMMON_USER_POWER7 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
75 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
77 #define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
78 PPC_FEATURE_TRUE_LE | \
79 PPC_FEATURE_HAS_ALTIVEC_COMP)
80 #define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
83 static struct cpu_spec __initdata cpu_specs[] = {
86 .pvr_mask = 0xffff0000,
87 .pvr_value = 0x00400000,
88 .cpu_name = "POWER3 (630)",
89 .cpu_features = CPU_FTRS_POWER3,
90 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
94 .pmc_type = PPC_PMC_IBM,
95 .oprofile_cpu_type = "ppc64/power3",
96 .oprofile_type = PPC_OPROFILE_RS64,
97 .machine_check = machine_check_generic,
101 .pvr_mask = 0xffff0000,
102 .pvr_value = 0x00410000,
103 .cpu_name = "POWER3 (630+)",
104 .cpu_features = CPU_FTRS_POWER3,
105 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
109 .pmc_type = PPC_PMC_IBM,
110 .oprofile_cpu_type = "ppc64/power3",
111 .oprofile_type = PPC_OPROFILE_RS64,
112 .machine_check = machine_check_generic,
113 .platform = "power3",
116 .pvr_mask = 0xffff0000,
117 .pvr_value = 0x00330000,
118 .cpu_name = "RS64-II (northstar)",
119 .cpu_features = CPU_FTRS_RS64,
120 .cpu_user_features = COMMON_USER_PPC64,
124 .pmc_type = PPC_PMC_IBM,
125 .oprofile_cpu_type = "ppc64/rs64",
126 .oprofile_type = PPC_OPROFILE_RS64,
127 .machine_check = machine_check_generic,
131 .pvr_mask = 0xffff0000,
132 .pvr_value = 0x00340000,
133 .cpu_name = "RS64-III (pulsar)",
134 .cpu_features = CPU_FTRS_RS64,
135 .cpu_user_features = COMMON_USER_PPC64,
139 .pmc_type = PPC_PMC_IBM,
140 .oprofile_cpu_type = "ppc64/rs64",
141 .oprofile_type = PPC_OPROFILE_RS64,
142 .machine_check = machine_check_generic,
146 .pvr_mask = 0xffff0000,
147 .pvr_value = 0x00360000,
148 .cpu_name = "RS64-III (icestar)",
149 .cpu_features = CPU_FTRS_RS64,
150 .cpu_user_features = COMMON_USER_PPC64,
154 .pmc_type = PPC_PMC_IBM,
155 .oprofile_cpu_type = "ppc64/rs64",
156 .oprofile_type = PPC_OPROFILE_RS64,
157 .machine_check = machine_check_generic,
161 .pvr_mask = 0xffff0000,
162 .pvr_value = 0x00370000,
163 .cpu_name = "RS64-IV (sstar)",
164 .cpu_features = CPU_FTRS_RS64,
165 .cpu_user_features = COMMON_USER_PPC64,
169 .pmc_type = PPC_PMC_IBM,
170 .oprofile_cpu_type = "ppc64/rs64",
171 .oprofile_type = PPC_OPROFILE_RS64,
172 .machine_check = machine_check_generic,
176 .pvr_mask = 0xffff0000,
177 .pvr_value = 0x00350000,
178 .cpu_name = "POWER4 (gp)",
179 .cpu_features = CPU_FTRS_POWER4,
180 .cpu_user_features = COMMON_USER_POWER4,
184 .pmc_type = PPC_PMC_IBM,
185 .oprofile_cpu_type = "ppc64/power4",
186 .oprofile_type = PPC_OPROFILE_POWER4,
187 .machine_check = machine_check_generic,
188 .platform = "power4",
191 .pvr_mask = 0xffff0000,
192 .pvr_value = 0x00380000,
193 .cpu_name = "POWER4+ (gq)",
194 .cpu_features = CPU_FTRS_POWER4,
195 .cpu_user_features = COMMON_USER_POWER4,
199 .pmc_type = PPC_PMC_IBM,
200 .oprofile_cpu_type = "ppc64/power4",
201 .oprofile_type = PPC_OPROFILE_POWER4,
202 .machine_check = machine_check_generic,
203 .platform = "power4",
206 .pvr_mask = 0xffff0000,
207 .pvr_value = 0x00390000,
208 .cpu_name = "PPC970",
209 .cpu_features = CPU_FTRS_PPC970,
210 .cpu_user_features = COMMON_USER_POWER4 |
211 PPC_FEATURE_HAS_ALTIVEC_COMP,
215 .pmc_type = PPC_PMC_IBM,
216 .cpu_setup = __setup_cpu_ppc970,
217 .cpu_restore = __restore_cpu_ppc970,
218 .oprofile_cpu_type = "ppc64/970",
219 .oprofile_type = PPC_OPROFILE_POWER4,
220 .machine_check = machine_check_generic,
221 .platform = "ppc970",
224 .pvr_mask = 0xffff0000,
225 .pvr_value = 0x003c0000,
226 .cpu_name = "PPC970FX",
227 .cpu_features = CPU_FTRS_PPC970,
228 .cpu_user_features = COMMON_USER_POWER4 |
229 PPC_FEATURE_HAS_ALTIVEC_COMP,
233 .pmc_type = PPC_PMC_IBM,
234 .cpu_setup = __setup_cpu_ppc970,
235 .cpu_restore = __restore_cpu_ppc970,
236 .oprofile_cpu_type = "ppc64/970",
237 .oprofile_type = PPC_OPROFILE_POWER4,
238 .machine_check = machine_check_generic,
239 .platform = "ppc970",
241 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
242 .pvr_mask = 0xffffffff,
243 .pvr_value = 0x00440100,
244 .cpu_name = "PPC970MP",
245 .cpu_features = CPU_FTRS_PPC970,
246 .cpu_user_features = COMMON_USER_POWER4 |
247 PPC_FEATURE_HAS_ALTIVEC_COMP,
251 .pmc_type = PPC_PMC_IBM,
252 .cpu_setup = __setup_cpu_ppc970,
253 .cpu_restore = __restore_cpu_ppc970,
254 .oprofile_cpu_type = "ppc64/970MP",
255 .oprofile_type = PPC_OPROFILE_POWER4,
256 .machine_check = machine_check_generic,
257 .platform = "ppc970",
260 .pvr_mask = 0xffff0000,
261 .pvr_value = 0x00440000,
262 .cpu_name = "PPC970MP",
263 .cpu_features = CPU_FTRS_PPC970,
264 .cpu_user_features = COMMON_USER_POWER4 |
265 PPC_FEATURE_HAS_ALTIVEC_COMP,
269 .pmc_type = PPC_PMC_IBM,
270 .cpu_setup = __setup_cpu_ppc970MP,
271 .cpu_restore = __restore_cpu_ppc970,
272 .oprofile_cpu_type = "ppc64/970MP",
273 .oprofile_type = PPC_OPROFILE_POWER4,
274 .machine_check = machine_check_generic,
275 .platform = "ppc970",
278 .pvr_mask = 0xffff0000,
279 .pvr_value = 0x00450000,
280 .cpu_name = "PPC970GX",
281 .cpu_features = CPU_FTRS_PPC970,
282 .cpu_user_features = COMMON_USER_POWER4 |
283 PPC_FEATURE_HAS_ALTIVEC_COMP,
287 .pmc_type = PPC_PMC_IBM,
288 .cpu_setup = __setup_cpu_ppc970,
289 .oprofile_cpu_type = "ppc64/970",
290 .oprofile_type = PPC_OPROFILE_POWER4,
291 .machine_check = machine_check_generic,
292 .platform = "ppc970",
295 .pvr_mask = 0xffff0000,
296 .pvr_value = 0x003a0000,
297 .cpu_name = "POWER5 (gr)",
298 .cpu_features = CPU_FTRS_POWER5,
299 .cpu_user_features = COMMON_USER_POWER5,
303 .pmc_type = PPC_PMC_IBM,
304 .oprofile_cpu_type = "ppc64/power5",
305 .oprofile_type = PPC_OPROFILE_POWER4,
306 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
307 * and above but only works on POWER5 and above
309 .oprofile_mmcra_sihv = MMCRA_SIHV,
310 .oprofile_mmcra_sipr = MMCRA_SIPR,
311 .machine_check = machine_check_generic,
312 .platform = "power5",
315 .pvr_mask = 0xffffff00,
316 .pvr_value = 0x003b0300,
317 .cpu_name = "POWER5+ (gs)",
318 .cpu_features = CPU_FTRS_POWER5,
319 .cpu_user_features = COMMON_USER_POWER5_PLUS,
323 .oprofile_cpu_type = "ppc64/power5++",
324 .oprofile_type = PPC_OPROFILE_POWER4,
325 .oprofile_mmcra_sihv = MMCRA_SIHV,
326 .oprofile_mmcra_sipr = MMCRA_SIPR,
327 .machine_check = machine_check_generic,
328 .platform = "power5+",
331 .pvr_mask = 0xffff0000,
332 .pvr_value = 0x003b0000,
333 .cpu_name = "POWER5+ (gs)",
334 .cpu_features = CPU_FTRS_POWER5,
335 .cpu_user_features = COMMON_USER_POWER5_PLUS,
339 .pmc_type = PPC_PMC_IBM,
340 .oprofile_cpu_type = "ppc64/power5+",
341 .oprofile_type = PPC_OPROFILE_POWER4,
342 .oprofile_mmcra_sihv = MMCRA_SIHV,
343 .oprofile_mmcra_sipr = MMCRA_SIPR,
344 .machine_check = machine_check_generic,
345 .platform = "power5+",
347 { /* POWER6 in P5+ mode; 2.04-compliant processor */
348 .pvr_mask = 0xffffffff,
349 .pvr_value = 0x0f000001,
350 .cpu_name = "POWER5+",
351 .cpu_features = CPU_FTRS_POWER5,
352 .cpu_user_features = COMMON_USER_POWER5_PLUS,
355 .machine_check = machine_check_generic,
356 .platform = "power5+",
359 .pvr_mask = 0xffff0000,
360 .pvr_value = 0x003e0000,
361 .cpu_name = "POWER6 (raw)",
362 .cpu_features = CPU_FTRS_POWER6,
363 .cpu_user_features = COMMON_USER_POWER6 |
364 PPC_FEATURE_POWER6_EXT,
368 .pmc_type = PPC_PMC_IBM,
369 .oprofile_cpu_type = "ppc64/power6",
370 .oprofile_type = PPC_OPROFILE_POWER4,
371 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
372 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
373 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
375 .machine_check = machine_check_generic,
376 .platform = "power6x",
378 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
379 .pvr_mask = 0xffffffff,
380 .pvr_value = 0x0f000002,
381 .cpu_name = "POWER6 (architected)",
382 .cpu_features = CPU_FTRS_POWER6,
383 .cpu_user_features = COMMON_USER_POWER6,
386 .machine_check = machine_check_generic,
387 .platform = "power6",
389 { /* 2.06-compliant processor, i.e. Power7 "architected" mode */
390 .pvr_mask = 0xffffffff,
391 .pvr_value = 0x0f000003,
392 .cpu_name = "POWER7 (architected)",
393 .cpu_features = CPU_FTRS_POWER7,
394 .cpu_user_features = COMMON_USER_POWER7,
397 .machine_check = machine_check_generic,
398 .platform = "power7",
401 .pvr_mask = 0xffff0000,
402 .pvr_value = 0x003f0000,
403 .cpu_name = "POWER7 (raw)",
404 .cpu_features = CPU_FTRS_POWER7,
405 .cpu_user_features = COMMON_USER_POWER7,
409 .pmc_type = PPC_PMC_IBM,
410 .cpu_setup = __setup_cpu_power7,
411 .cpu_restore = __restore_cpu_power7,
412 .oprofile_cpu_type = "ppc64/power7",
413 .oprofile_type = PPC_OPROFILE_POWER4,
414 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
415 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
416 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
418 .platform = "power7",
420 { /* Cell Broadband Engine */
421 .pvr_mask = 0xffff0000,
422 .pvr_value = 0x00700000,
423 .cpu_name = "Cell Broadband Engine",
424 .cpu_features = CPU_FTRS_CELL,
425 .cpu_user_features = COMMON_USER_PPC64 |
426 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
431 .pmc_type = PPC_PMC_IBM,
432 .oprofile_cpu_type = "ppc64/cell-be",
433 .oprofile_type = PPC_OPROFILE_CELL,
434 .machine_check = machine_check_generic,
435 .platform = "ppc-cell-be",
438 .pvr_mask = 0x7fff0000,
439 .pvr_value = 0x00900000,
441 .cpu_features = CPU_FTRS_PA6T,
442 .cpu_user_features = COMMON_USER_PA6T,
446 .pmc_type = PPC_PMC_PA6T,
447 .cpu_setup = __setup_cpu_pa6t,
448 .cpu_restore = __restore_cpu_pa6t,
449 .oprofile_cpu_type = "ppc64/pa6t",
450 .oprofile_type = PPC_OPROFILE_PA6T,
451 .machine_check = machine_check_generic,
454 { /* default match */
455 .pvr_mask = 0x00000000,
456 .pvr_value = 0x00000000,
457 .cpu_name = "POWER4 (compatible)",
458 .cpu_features = CPU_FTRS_COMPATIBLE,
459 .cpu_user_features = COMMON_USER_PPC64,
463 .pmc_type = PPC_PMC_IBM,
464 .machine_check = machine_check_generic,
465 .platform = "power4",
467 #endif /* CONFIG_PPC64 */
471 .pvr_mask = 0xffff0000,
472 .pvr_value = 0x00010000,
474 .cpu_features = CPU_FTRS_PPC601,
475 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
476 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
479 .machine_check = machine_check_generic,
480 .platform = "ppc601",
483 .pvr_mask = 0xffff0000,
484 .pvr_value = 0x00030000,
486 .cpu_features = CPU_FTRS_603,
487 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
490 .cpu_setup = __setup_cpu_603,
491 .machine_check = machine_check_generic,
492 .platform = "ppc603",
495 .pvr_mask = 0xffff0000,
496 .pvr_value = 0x00060000,
498 .cpu_features = CPU_FTRS_603,
499 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
502 .cpu_setup = __setup_cpu_603,
503 .machine_check = machine_check_generic,
504 .platform = "ppc603",
507 .pvr_mask = 0xffff0000,
508 .pvr_value = 0x00070000,
510 .cpu_features = CPU_FTRS_603,
511 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
514 .cpu_setup = __setup_cpu_603,
515 .machine_check = machine_check_generic,
516 .platform = "ppc603",
519 .pvr_mask = 0xffff0000,
520 .pvr_value = 0x00040000,
522 .cpu_features = CPU_FTRS_604,
523 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
527 .cpu_setup = __setup_cpu_604,
528 .machine_check = machine_check_generic,
529 .platform = "ppc604",
532 .pvr_mask = 0xfffff000,
533 .pvr_value = 0x00090000,
535 .cpu_features = CPU_FTRS_604,
536 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
540 .cpu_setup = __setup_cpu_604,
541 .machine_check = machine_check_generic,
542 .platform = "ppc604",
545 .pvr_mask = 0xffff0000,
546 .pvr_value = 0x00090000,
548 .cpu_features = CPU_FTRS_604,
549 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
553 .cpu_setup = __setup_cpu_604,
554 .machine_check = machine_check_generic,
555 .platform = "ppc604",
558 .pvr_mask = 0xffff0000,
559 .pvr_value = 0x000a0000,
561 .cpu_features = CPU_FTRS_604,
562 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
566 .cpu_setup = __setup_cpu_604,
567 .machine_check = machine_check_generic,
568 .platform = "ppc604",
570 { /* 740/750 (0x4202, don't support TAU ?) */
571 .pvr_mask = 0xffffffff,
572 .pvr_value = 0x00084202,
573 .cpu_name = "740/750",
574 .cpu_features = CPU_FTRS_740_NOTAU,
575 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
579 .cpu_setup = __setup_cpu_750,
580 .machine_check = machine_check_generic,
581 .platform = "ppc750",
583 { /* 750CX (80100 and 8010x?) */
584 .pvr_mask = 0xfffffff0,
585 .pvr_value = 0x00080100,
587 .cpu_features = CPU_FTRS_750,
588 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
592 .cpu_setup = __setup_cpu_750cx,
593 .machine_check = machine_check_generic,
594 .platform = "ppc750",
596 { /* 750CX (82201 and 82202) */
597 .pvr_mask = 0xfffffff0,
598 .pvr_value = 0x00082200,
600 .cpu_features = CPU_FTRS_750,
601 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
605 .cpu_setup = __setup_cpu_750cx,
606 .machine_check = machine_check_generic,
607 .platform = "ppc750",
609 { /* 750CXe (82214) */
610 .pvr_mask = 0xfffffff0,
611 .pvr_value = 0x00082210,
612 .cpu_name = "750CXe",
613 .cpu_features = CPU_FTRS_750,
614 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
618 .cpu_setup = __setup_cpu_750cx,
619 .machine_check = machine_check_generic,
620 .platform = "ppc750",
622 { /* 750CXe "Gekko" (83214) */
623 .pvr_mask = 0xffffffff,
624 .pvr_value = 0x00083214,
625 .cpu_name = "750CXe",
626 .cpu_features = CPU_FTRS_750,
627 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
631 .cpu_setup = __setup_cpu_750cx,
632 .machine_check = machine_check_generic,
633 .platform = "ppc750",
636 .pvr_mask = 0xfffff0f0,
637 .pvr_value = 0x00087010,
639 .cpu_features = CPU_FTRS_750CL,
640 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
644 .cpu_setup = __setup_cpu_750,
645 .machine_check = machine_check_generic,
646 .platform = "ppc750",
649 .pvr_mask = 0xfffff000,
650 .pvr_value = 0x00083000,
651 .cpu_name = "745/755",
652 .cpu_features = CPU_FTRS_750,
653 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
657 .cpu_setup = __setup_cpu_750,
658 .machine_check = machine_check_generic,
659 .platform = "ppc750",
661 { /* 750FX rev 1.x */
662 .pvr_mask = 0xffffff00,
663 .pvr_value = 0x70000100,
665 .cpu_features = CPU_FTRS_750FX1,
666 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
670 .cpu_setup = __setup_cpu_750,
671 .machine_check = machine_check_generic,
672 .platform = "ppc750",
674 { /* 750FX rev 2.0 must disable HID0[DPM] */
675 .pvr_mask = 0xffffffff,
676 .pvr_value = 0x70000200,
678 .cpu_features = CPU_FTRS_750FX2,
679 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
683 .cpu_setup = __setup_cpu_750,
684 .machine_check = machine_check_generic,
685 .platform = "ppc750",
687 { /* 750FX (All revs except 2.0) */
688 .pvr_mask = 0xffff0000,
689 .pvr_value = 0x70000000,
691 .cpu_features = CPU_FTRS_750FX,
692 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
696 .cpu_setup = __setup_cpu_750fx,
697 .machine_check = machine_check_generic,
698 .platform = "ppc750",
701 .pvr_mask = 0xffff0000,
702 .pvr_value = 0x70020000,
704 .cpu_features = CPU_FTRS_750GX,
705 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
709 .cpu_setup = __setup_cpu_750fx,
710 .machine_check = machine_check_generic,
711 .platform = "ppc750",
713 { /* 740/750 (L2CR bit need fixup for 740) */
714 .pvr_mask = 0xffff0000,
715 .pvr_value = 0x00080000,
716 .cpu_name = "740/750",
717 .cpu_features = CPU_FTRS_740,
718 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
722 .cpu_setup = __setup_cpu_750,
723 .machine_check = machine_check_generic,
724 .platform = "ppc750",
726 { /* 7400 rev 1.1 ? (no TAU) */
727 .pvr_mask = 0xffffffff,
728 .pvr_value = 0x000c1101,
729 .cpu_name = "7400 (1.1)",
730 .cpu_features = CPU_FTRS_7400_NOTAU,
731 .cpu_user_features = COMMON_USER |
732 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
736 .cpu_setup = __setup_cpu_7400,
737 .machine_check = machine_check_generic,
738 .platform = "ppc7400",
741 .pvr_mask = 0xffff0000,
742 .pvr_value = 0x000c0000,
744 .cpu_features = CPU_FTRS_7400,
745 .cpu_user_features = COMMON_USER |
746 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
750 .cpu_setup = __setup_cpu_7400,
751 .machine_check = machine_check_generic,
752 .platform = "ppc7400",
755 .pvr_mask = 0xffff0000,
756 .pvr_value = 0x800c0000,
758 .cpu_features = CPU_FTRS_7400,
759 .cpu_user_features = COMMON_USER |
760 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
764 .cpu_setup = __setup_cpu_7410,
765 .machine_check = machine_check_generic,
766 .platform = "ppc7400",
768 { /* 7450 2.0 - no doze/nap */
769 .pvr_mask = 0xffffffff,
770 .pvr_value = 0x80000200,
772 .cpu_features = CPU_FTRS_7450_20,
773 .cpu_user_features = COMMON_USER |
774 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
778 .cpu_setup = __setup_cpu_745x,
779 .oprofile_cpu_type = "ppc/7450",
780 .oprofile_type = PPC_OPROFILE_G4,
781 .machine_check = machine_check_generic,
782 .platform = "ppc7450",
785 .pvr_mask = 0xffffffff,
786 .pvr_value = 0x80000201,
788 .cpu_features = CPU_FTRS_7450_21,
789 .cpu_user_features = COMMON_USER |
790 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
794 .cpu_setup = __setup_cpu_745x,
795 .oprofile_cpu_type = "ppc/7450",
796 .oprofile_type = PPC_OPROFILE_G4,
797 .machine_check = machine_check_generic,
798 .platform = "ppc7450",
800 { /* 7450 2.3 and newer */
801 .pvr_mask = 0xffff0000,
802 .pvr_value = 0x80000000,
804 .cpu_features = CPU_FTRS_7450_23,
805 .cpu_user_features = COMMON_USER |
806 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
810 .cpu_setup = __setup_cpu_745x,
811 .oprofile_cpu_type = "ppc/7450",
812 .oprofile_type = PPC_OPROFILE_G4,
813 .machine_check = machine_check_generic,
814 .platform = "ppc7450",
817 .pvr_mask = 0xffffff00,
818 .pvr_value = 0x80010100,
820 .cpu_features = CPU_FTRS_7455_1,
821 .cpu_user_features = COMMON_USER |
822 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
826 .cpu_setup = __setup_cpu_745x,
827 .oprofile_cpu_type = "ppc/7450",
828 .oprofile_type = PPC_OPROFILE_G4,
829 .machine_check = machine_check_generic,
830 .platform = "ppc7450",
833 .pvr_mask = 0xffffffff,
834 .pvr_value = 0x80010200,
836 .cpu_features = CPU_FTRS_7455_20,
837 .cpu_user_features = COMMON_USER |
838 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
842 .cpu_setup = __setup_cpu_745x,
843 .oprofile_cpu_type = "ppc/7450",
844 .oprofile_type = PPC_OPROFILE_G4,
845 .machine_check = machine_check_generic,
846 .platform = "ppc7450",
849 .pvr_mask = 0xffff0000,
850 .pvr_value = 0x80010000,
852 .cpu_features = CPU_FTRS_7455,
853 .cpu_user_features = COMMON_USER |
854 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
858 .cpu_setup = __setup_cpu_745x,
859 .oprofile_cpu_type = "ppc/7450",
860 .oprofile_type = PPC_OPROFILE_G4,
861 .machine_check = machine_check_generic,
862 .platform = "ppc7450",
864 { /* 7447/7457 Rev 1.0 */
865 .pvr_mask = 0xffffffff,
866 .pvr_value = 0x80020100,
867 .cpu_name = "7447/7457",
868 .cpu_features = CPU_FTRS_7447_10,
869 .cpu_user_features = COMMON_USER |
870 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
874 .cpu_setup = __setup_cpu_745x,
875 .oprofile_cpu_type = "ppc/7450",
876 .oprofile_type = PPC_OPROFILE_G4,
877 .machine_check = machine_check_generic,
878 .platform = "ppc7450",
880 { /* 7447/7457 Rev 1.1 */
881 .pvr_mask = 0xffffffff,
882 .pvr_value = 0x80020101,
883 .cpu_name = "7447/7457",
884 .cpu_features = CPU_FTRS_7447_10,
885 .cpu_user_features = COMMON_USER |
886 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
890 .cpu_setup = __setup_cpu_745x,
891 .oprofile_cpu_type = "ppc/7450",
892 .oprofile_type = PPC_OPROFILE_G4,
893 .machine_check = machine_check_generic,
894 .platform = "ppc7450",
896 { /* 7447/7457 Rev 1.2 and later */
897 .pvr_mask = 0xffff0000,
898 .pvr_value = 0x80020000,
899 .cpu_name = "7447/7457",
900 .cpu_features = CPU_FTRS_7447,
901 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
905 .cpu_setup = __setup_cpu_745x,
906 .oprofile_cpu_type = "ppc/7450",
907 .oprofile_type = PPC_OPROFILE_G4,
908 .machine_check = machine_check_generic,
909 .platform = "ppc7450",
912 .pvr_mask = 0xffff0000,
913 .pvr_value = 0x80030000,
915 .cpu_features = CPU_FTRS_7447A,
916 .cpu_user_features = COMMON_USER |
917 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
921 .cpu_setup = __setup_cpu_745x,
922 .oprofile_cpu_type = "ppc/7450",
923 .oprofile_type = PPC_OPROFILE_G4,
924 .machine_check = machine_check_generic,
925 .platform = "ppc7450",
928 .pvr_mask = 0xffff0000,
929 .pvr_value = 0x80040000,
931 .cpu_features = CPU_FTRS_7448,
932 .cpu_user_features = COMMON_USER |
933 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
937 .cpu_setup = __setup_cpu_745x,
938 .oprofile_cpu_type = "ppc/7450",
939 .oprofile_type = PPC_OPROFILE_G4,
940 .machine_check = machine_check_generic,
941 .platform = "ppc7450",
943 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
944 .pvr_mask = 0x7fff0000,
945 .pvr_value = 0x00810000,
947 .cpu_features = CPU_FTRS_82XX,
948 .cpu_user_features = COMMON_USER,
951 .cpu_setup = __setup_cpu_603,
952 .machine_check = machine_check_generic,
953 .platform = "ppc603",
955 { /* All G2_LE (603e core, plus some) have the same pvr */
956 .pvr_mask = 0x7fff0000,
957 .pvr_value = 0x00820000,
959 .cpu_features = CPU_FTRS_G2_LE,
960 .cpu_user_features = COMMON_USER,
963 .cpu_setup = __setup_cpu_603,
964 .machine_check = machine_check_generic,
965 .platform = "ppc603",
967 { /* e300c1 (a 603e core, plus some) on 83xx */
968 .pvr_mask = 0x7fff0000,
969 .pvr_value = 0x00830000,
970 .cpu_name = "e300c1",
971 .cpu_features = CPU_FTRS_E300,
972 .cpu_user_features = COMMON_USER,
975 .cpu_setup = __setup_cpu_603,
976 .machine_check = machine_check_generic,
977 .platform = "ppc603",
979 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
980 .pvr_mask = 0x7fff0000,
981 .pvr_value = 0x00840000,
982 .cpu_name = "e300c2",
983 .cpu_features = CPU_FTRS_E300C2,
984 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
987 .cpu_setup = __setup_cpu_603,
988 .machine_check = machine_check_generic,
989 .platform = "ppc603",
991 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
992 .pvr_mask = 0x7fff0000,
993 .pvr_value = 0x00850000,
994 .cpu_name = "e300c3",
995 .cpu_features = CPU_FTRS_E300,
996 .cpu_user_features = COMMON_USER,
999 .cpu_setup = __setup_cpu_603,
1001 .oprofile_cpu_type = "ppc/e300",
1002 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1003 .platform = "ppc603",
1005 { /* e300c4 (e300c1, plus one IU) */
1006 .pvr_mask = 0x7fff0000,
1007 .pvr_value = 0x00860000,
1008 .cpu_name = "e300c4",
1009 .cpu_features = CPU_FTRS_E300,
1010 .cpu_user_features = COMMON_USER,
1013 .cpu_setup = __setup_cpu_603,
1014 .machine_check = machine_check_generic,
1016 .oprofile_cpu_type = "ppc/e300",
1017 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1018 .platform = "ppc603",
1020 { /* default match, we assume split I/D cache & TB (non-601)... */
1021 .pvr_mask = 0x00000000,
1022 .pvr_value = 0x00000000,
1023 .cpu_name = "(generic PPC)",
1024 .cpu_features = CPU_FTRS_CLASSIC32,
1025 .cpu_user_features = COMMON_USER,
1028 .machine_check = machine_check_generic,
1029 .platform = "ppc603",
1031 #endif /* CLASSIC_PPC */
1034 .pvr_mask = 0xffff0000,
1035 .pvr_value = 0x00500000,
1037 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1038 * if the 8xx code is there.... */
1039 .cpu_features = CPU_FTRS_8XX,
1040 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1043 .platform = "ppc823",
1045 #endif /* CONFIG_8xx */
1048 .pvr_mask = 0xffffff00,
1049 .pvr_value = 0x00200200,
1050 .cpu_name = "403GC",
1051 .cpu_features = CPU_FTRS_40X,
1052 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1055 .machine_check = machine_check_4xx,
1056 .platform = "ppc403",
1059 .pvr_mask = 0xffffff00,
1060 .pvr_value = 0x00201400,
1061 .cpu_name = "403GCX",
1062 .cpu_features = CPU_FTRS_40X,
1063 .cpu_user_features = PPC_FEATURE_32 |
1064 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
1067 .machine_check = machine_check_4xx,
1068 .platform = "ppc403",
1071 .pvr_mask = 0xffff0000,
1072 .pvr_value = 0x00200000,
1073 .cpu_name = "403G ??",
1074 .cpu_features = CPU_FTRS_40X,
1075 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1078 .machine_check = machine_check_4xx,
1079 .platform = "ppc403",
1082 .pvr_mask = 0xffff0000,
1083 .pvr_value = 0x40110000,
1084 .cpu_name = "405GP",
1085 .cpu_features = CPU_FTRS_40X,
1086 .cpu_user_features = PPC_FEATURE_32 |
1087 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1090 .machine_check = machine_check_4xx,
1091 .platform = "ppc405",
1094 .pvr_mask = 0xffff0000,
1095 .pvr_value = 0x40130000,
1096 .cpu_name = "STB03xxx",
1097 .cpu_features = CPU_FTRS_40X,
1098 .cpu_user_features = PPC_FEATURE_32 |
1099 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1102 .machine_check = machine_check_4xx,
1103 .platform = "ppc405",
1106 .pvr_mask = 0xffff0000,
1107 .pvr_value = 0x41810000,
1108 .cpu_name = "STB04xxx",
1109 .cpu_features = CPU_FTRS_40X,
1110 .cpu_user_features = PPC_FEATURE_32 |
1111 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1114 .machine_check = machine_check_4xx,
1115 .platform = "ppc405",
1118 .pvr_mask = 0xffff0000,
1119 .pvr_value = 0x41610000,
1120 .cpu_name = "NP405L",
1121 .cpu_features = CPU_FTRS_40X,
1122 .cpu_user_features = PPC_FEATURE_32 |
1123 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1126 .machine_check = machine_check_4xx,
1127 .platform = "ppc405",
1130 .pvr_mask = 0xffff0000,
1131 .pvr_value = 0x40B10000,
1132 .cpu_name = "NP4GS3",
1133 .cpu_features = CPU_FTRS_40X,
1134 .cpu_user_features = PPC_FEATURE_32 |
1135 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1138 .machine_check = machine_check_4xx,
1139 .platform = "ppc405",
1142 .pvr_mask = 0xffff0000,
1143 .pvr_value = 0x41410000,
1144 .cpu_name = "NP405H",
1145 .cpu_features = CPU_FTRS_40X,
1146 .cpu_user_features = PPC_FEATURE_32 |
1147 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1150 .machine_check = machine_check_4xx,
1151 .platform = "ppc405",
1154 .pvr_mask = 0xffff0000,
1155 .pvr_value = 0x50910000,
1156 .cpu_name = "405GPr",
1157 .cpu_features = CPU_FTRS_40X,
1158 .cpu_user_features = PPC_FEATURE_32 |
1159 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1162 .machine_check = machine_check_4xx,
1163 .platform = "ppc405",
1166 .pvr_mask = 0xffff0000,
1167 .pvr_value = 0x51510000,
1168 .cpu_name = "STBx25xx",
1169 .cpu_features = CPU_FTRS_40X,
1170 .cpu_user_features = PPC_FEATURE_32 |
1171 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1174 .machine_check = machine_check_4xx,
1175 .platform = "ppc405",
1178 .pvr_mask = 0xffff0000,
1179 .pvr_value = 0x41F10000,
1180 .cpu_name = "405LP",
1181 .cpu_features = CPU_FTRS_40X,
1182 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1185 .machine_check = machine_check_4xx,
1186 .platform = "ppc405",
1188 { /* Xilinx Virtex-II Pro */
1189 .pvr_mask = 0xfffff000,
1190 .pvr_value = 0x20010000,
1191 .cpu_name = "Virtex-II Pro",
1192 .cpu_features = CPU_FTRS_40X,
1193 .cpu_user_features = PPC_FEATURE_32 |
1194 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1197 .machine_check = machine_check_4xx,
1198 .platform = "ppc405",
1200 { /* Xilinx Virtex-4 FX */
1201 .pvr_mask = 0xfffff000,
1202 .pvr_value = 0x20011000,
1203 .cpu_name = "Virtex-4 FX",
1204 .cpu_features = CPU_FTRS_40X,
1205 .cpu_user_features = PPC_FEATURE_32 |
1206 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1209 .machine_check = machine_check_4xx,
1210 .platform = "ppc405",
1213 .pvr_mask = 0xffff0000,
1214 .pvr_value = 0x51210000,
1215 .cpu_name = "405EP",
1216 .cpu_features = CPU_FTRS_40X,
1217 .cpu_user_features = PPC_FEATURE_32 |
1218 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1221 .machine_check = machine_check_4xx,
1222 .platform = "ppc405",
1225 .pvr_mask = 0xffff0004,
1226 .pvr_value = 0x12910004,
1227 .cpu_name = "405EX",
1228 .cpu_features = CPU_FTRS_40X,
1229 .cpu_user_features = PPC_FEATURE_32 |
1230 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1233 .machine_check = machine_check_4xx,
1234 .platform = "ppc405",
1237 .pvr_mask = 0xffff0004,
1238 .pvr_value = 0x12910000,
1239 .cpu_name = "405EXr",
1240 .cpu_features = CPU_FTRS_40X,
1241 .cpu_user_features = PPC_FEATURE_32 |
1242 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1245 .machine_check = machine_check_4xx,
1246 .platform = "ppc405",
1248 { /* default match */
1249 .pvr_mask = 0x00000000,
1250 .pvr_value = 0x00000000,
1251 .cpu_name = "(generic 40x PPC)",
1252 .cpu_features = CPU_FTRS_40X,
1253 .cpu_user_features = PPC_FEATURE_32 |
1254 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1257 .machine_check = machine_check_4xx,
1258 .platform = "ppc405",
1261 #endif /* CONFIG_40x */
1264 .pvr_mask = 0xf0000fff,
1265 .pvr_value = 0x40000850,
1266 .cpu_name = "440GR Rev. A",
1267 .cpu_features = CPU_FTRS_44X,
1268 .cpu_user_features = COMMON_USER_BOOKE,
1271 .machine_check = machine_check_4xx,
1272 .platform = "ppc440",
1274 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1275 .pvr_mask = 0xf0000fff,
1276 .pvr_value = 0x40000858,
1277 .cpu_name = "440EP Rev. A",
1278 .cpu_features = CPU_FTRS_44X,
1279 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1282 .cpu_setup = __setup_cpu_440ep,
1283 .machine_check = machine_check_4xx,
1284 .platform = "ppc440",
1287 .pvr_mask = 0xf0000fff,
1288 .pvr_value = 0x400008d3,
1289 .cpu_name = "440GR Rev. B",
1290 .cpu_features = CPU_FTRS_44X,
1291 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1294 .machine_check = machine_check_4xx,
1295 .platform = "ppc440",
1297 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1298 .pvr_mask = 0xf0000ff7,
1299 .pvr_value = 0x400008d4,
1300 .cpu_name = "440EP Rev. C",
1301 .cpu_features = CPU_FTRS_44X,
1302 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1305 .cpu_setup = __setup_cpu_440ep,
1306 .machine_check = machine_check_4xx,
1307 .platform = "ppc440",
1309 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1310 .pvr_mask = 0xf0000fff,
1311 .pvr_value = 0x400008db,
1312 .cpu_name = "440EP Rev. B",
1313 .cpu_features = CPU_FTRS_44X,
1314 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1317 .cpu_setup = __setup_cpu_440ep,
1318 .machine_check = machine_check_4xx,
1319 .platform = "ppc440",
1322 .pvr_mask = 0xf0000ffb,
1323 .pvr_value = 0x200008D0,
1324 .cpu_name = "440GRX",
1325 .cpu_features = CPU_FTRS_44X,
1326 .cpu_user_features = COMMON_USER_BOOKE,
1329 .cpu_setup = __setup_cpu_440grx,
1330 .machine_check = machine_check_440A,
1331 .platform = "ppc440",
1333 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1334 .pvr_mask = 0xf0000ffb,
1335 .pvr_value = 0x200008D8,
1336 .cpu_name = "440EPX",
1337 .cpu_features = CPU_FTRS_44X,
1338 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1341 .cpu_setup = __setup_cpu_440epx,
1342 .machine_check = machine_check_440A,
1343 .platform = "ppc440",
1345 { /* 440GP Rev. B */
1346 .pvr_mask = 0xf0000fff,
1347 .pvr_value = 0x40000440,
1348 .cpu_name = "440GP Rev. B",
1349 .cpu_features = CPU_FTRS_44X,
1350 .cpu_user_features = COMMON_USER_BOOKE,
1353 .machine_check = machine_check_4xx,
1354 .platform = "ppc440gp",
1356 { /* 440GP Rev. C */
1357 .pvr_mask = 0xf0000fff,
1358 .pvr_value = 0x40000481,
1359 .cpu_name = "440GP Rev. C",
1360 .cpu_features = CPU_FTRS_44X,
1361 .cpu_user_features = COMMON_USER_BOOKE,
1364 .machine_check = machine_check_4xx,
1365 .platform = "ppc440gp",
1367 { /* 440GX Rev. A */
1368 .pvr_mask = 0xf0000fff,
1369 .pvr_value = 0x50000850,
1370 .cpu_name = "440GX Rev. A",
1371 .cpu_features = CPU_FTRS_44X,
1372 .cpu_user_features = COMMON_USER_BOOKE,
1375 .cpu_setup = __setup_cpu_440gx,
1376 .machine_check = machine_check_440A,
1377 .platform = "ppc440",
1379 { /* 440GX Rev. B */
1380 .pvr_mask = 0xf0000fff,
1381 .pvr_value = 0x50000851,
1382 .cpu_name = "440GX Rev. B",
1383 .cpu_features = CPU_FTRS_44X,
1384 .cpu_user_features = COMMON_USER_BOOKE,
1387 .cpu_setup = __setup_cpu_440gx,
1388 .machine_check = machine_check_440A,
1389 .platform = "ppc440",
1391 { /* 440GX Rev. C */
1392 .pvr_mask = 0xf0000fff,
1393 .pvr_value = 0x50000892,
1394 .cpu_name = "440GX Rev. C",
1395 .cpu_features = CPU_FTRS_44X,
1396 .cpu_user_features = COMMON_USER_BOOKE,
1399 .cpu_setup = __setup_cpu_440gx,
1400 .machine_check = machine_check_440A,
1401 .platform = "ppc440",
1403 { /* 440GX Rev. F */
1404 .pvr_mask = 0xf0000fff,
1405 .pvr_value = 0x50000894,
1406 .cpu_name = "440GX Rev. F",
1407 .cpu_features = CPU_FTRS_44X,
1408 .cpu_user_features = COMMON_USER_BOOKE,
1411 .cpu_setup = __setup_cpu_440gx,
1412 .machine_check = machine_check_440A,
1413 .platform = "ppc440",
1415 { /* 440SP Rev. A */
1416 .pvr_mask = 0xfff00fff,
1417 .pvr_value = 0x53200891,
1418 .cpu_name = "440SP Rev. A",
1419 .cpu_features = CPU_FTRS_44X,
1420 .cpu_user_features = COMMON_USER_BOOKE,
1423 .machine_check = machine_check_4xx,
1424 .platform = "ppc440",
1426 { /* 440SPe Rev. A */
1427 .pvr_mask = 0xfff00fff,
1428 .pvr_value = 0x53400890,
1429 .cpu_name = "440SPe Rev. A",
1430 .cpu_features = CPU_FTRS_44X,
1431 .cpu_user_features = COMMON_USER_BOOKE,
1434 .cpu_setup = __setup_cpu_440spe,
1435 .machine_check = machine_check_440A,
1436 .platform = "ppc440",
1438 { /* 440SPe Rev. B */
1439 .pvr_mask = 0xfff00fff,
1440 .pvr_value = 0x53400891,
1441 .cpu_name = "440SPe Rev. B",
1442 .cpu_features = CPU_FTRS_44X,
1443 .cpu_user_features = COMMON_USER_BOOKE,
1446 .cpu_setup = __setup_cpu_440spe,
1447 .machine_check = machine_check_440A,
1448 .platform = "ppc440",
1450 { /* 440 in Xilinx Virtex-5 FXT */
1451 .pvr_mask = 0xfffffff0,
1452 .pvr_value = 0x7ff21910,
1453 .cpu_name = "440 in Virtex-5 FXT",
1454 .cpu_features = CPU_FTRS_44X,
1455 .cpu_user_features = COMMON_USER_BOOKE,
1458 .platform = "ppc440",
1461 .pvr_mask = 0xffff0002,
1462 .pvr_value = 0x13020002,
1463 .cpu_name = "460EX",
1464 .cpu_features = CPU_FTRS_44X,
1465 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1468 .cpu_setup = __setup_cpu_460ex,
1469 .machine_check = machine_check_440A,
1470 .platform = "ppc440",
1473 .pvr_mask = 0xffff0002,
1474 .pvr_value = 0x13020000,
1475 .cpu_name = "460GT",
1476 .cpu_features = CPU_FTRS_44X,
1477 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1480 .cpu_setup = __setup_cpu_460gt,
1481 .machine_check = machine_check_440A,
1482 .platform = "ppc440",
1484 { /* default match */
1485 .pvr_mask = 0x00000000,
1486 .pvr_value = 0x00000000,
1487 .cpu_name = "(generic 44x PPC)",
1488 .cpu_features = CPU_FTRS_44X,
1489 .cpu_user_features = COMMON_USER_BOOKE,
1492 .machine_check = machine_check_4xx,
1493 .platform = "ppc440",
1495 #endif /* CONFIG_44x */
1498 .pvr_mask = 0xfff00000,
1499 .pvr_value = 0x81000000,
1500 .cpu_name = "e200z5",
1501 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1502 .cpu_features = CPU_FTRS_E200,
1503 .cpu_user_features = COMMON_USER_BOOKE |
1504 PPC_FEATURE_HAS_EFP_SINGLE |
1505 PPC_FEATURE_UNIFIED_CACHE,
1507 .machine_check = machine_check_e200,
1508 .platform = "ppc5554",
1511 .pvr_mask = 0xfff00000,
1512 .pvr_value = 0x81100000,
1513 .cpu_name = "e200z6",
1514 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1515 .cpu_features = CPU_FTRS_E200,
1516 .cpu_user_features = COMMON_USER_BOOKE |
1517 PPC_FEATURE_HAS_SPE_COMP |
1518 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1519 PPC_FEATURE_UNIFIED_CACHE,
1521 .machine_check = machine_check_e200,
1522 .platform = "ppc5554",
1524 { /* default match */
1525 .pvr_mask = 0x00000000,
1526 .pvr_value = 0x00000000,
1527 .cpu_name = "(generic E200 PPC)",
1528 .cpu_features = CPU_FTRS_E200,
1529 .cpu_user_features = COMMON_USER_BOOKE |
1530 PPC_FEATURE_HAS_EFP_SINGLE |
1531 PPC_FEATURE_UNIFIED_CACHE,
1533 .machine_check = machine_check_e200,
1534 .platform = "ppc5554",
1536 #endif /* CONFIG_E200 */
1539 .pvr_mask = 0xffff0000,
1540 .pvr_value = 0x80200000,
1542 .cpu_features = CPU_FTRS_E500,
1543 .cpu_user_features = COMMON_USER_BOOKE |
1544 PPC_FEATURE_HAS_SPE_COMP |
1545 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
1549 .oprofile_cpu_type = "ppc/e500",
1550 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1551 .machine_check = machine_check_e500,
1552 .platform = "ppc8540",
1555 .pvr_mask = 0xffff0000,
1556 .pvr_value = 0x80210000,
1557 .cpu_name = "e500v2",
1558 .cpu_features = CPU_FTRS_E500_2,
1559 .cpu_user_features = COMMON_USER_BOOKE |
1560 PPC_FEATURE_HAS_SPE_COMP |
1561 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1562 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
1566 .oprofile_cpu_type = "ppc/e500",
1567 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1568 .machine_check = machine_check_e500,
1569 .platform = "ppc8548",
1572 .pvr_mask = 0xffff0000,
1573 .pvr_value = 0x80230000,
1574 .cpu_name = "e500mc",
1575 .cpu_features = CPU_FTRS_E500MC,
1576 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1580 .oprofile_cpu_type = "ppc/e500", /* xxx - galak, e500mc? */
1581 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1582 .machine_check = machine_check_e500,
1583 .platform = "ppce500mc",
1585 { /* default match */
1586 .pvr_mask = 0x00000000,
1587 .pvr_value = 0x00000000,
1588 .cpu_name = "(generic E500 PPC)",
1589 .cpu_features = CPU_FTRS_E500,
1590 .cpu_user_features = COMMON_USER_BOOKE |
1591 PPC_FEATURE_HAS_SPE_COMP |
1592 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
1595 .machine_check = machine_check_e500,
1596 .platform = "powerpc",
1598 #endif /* CONFIG_E500 */
1599 #endif /* CONFIG_PPC32 */
1602 static struct cpu_spec the_cpu_spec;
1604 struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
1606 struct cpu_spec *s = cpu_specs;
1607 struct cpu_spec *t = &the_cpu_spec;
1613 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
1614 if ((pvr & s->pvr_mask) == s->pvr_value) {
1616 * If we are overriding a previous value derived
1617 * from the real PVR with a new value obtained
1618 * using a logical PVR value, don't modify the
1619 * performance monitor fields.
1621 if (t->num_pmcs && !s->num_pmcs) {
1622 t->cpu_name = s->cpu_name;
1623 t->cpu_features = s->cpu_features;
1624 t->cpu_user_features = s->cpu_user_features;
1625 t->icache_bsize = s->icache_bsize;
1626 t->dcache_bsize = s->dcache_bsize;
1627 t->cpu_setup = s->cpu_setup;
1628 t->cpu_restore = s->cpu_restore;
1629 t->platform = s->platform;
1632 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
1633 #if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
1634 /* ppc64 and booke expect identify_cpu to also call
1635 * setup_cpu for that processor. I will consolidate
1636 * that at a later time, for now, just use #ifdef.
1637 * we also don't need to PTRRELOC the function pointer
1638 * on ppc64 and booke as we are running at 0 in real
1639 * mode on ppc64 and reloc_offset is always 0 on booke.
1642 s->cpu_setup(offset, s);
1644 #endif /* CONFIG_PPC64 || CONFIG_BOOKE */