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 | \
73 PPC_FEATURE_TRUE_LE | \
74 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
75 #define COMMON_USER_POWER7 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
76 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
77 PPC_FEATURE_TRUE_LE | \
78 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
79 #define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
80 PPC_FEATURE_TRUE_LE | \
81 PPC_FEATURE_HAS_ALTIVEC_COMP)
82 #define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
85 static struct cpu_spec __initdata cpu_specs[] = {
88 .pvr_mask = 0xffff0000,
89 .pvr_value = 0x00400000,
90 .cpu_name = "POWER3 (630)",
91 .cpu_features = CPU_FTRS_POWER3,
92 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
96 .pmc_type = PPC_PMC_IBM,
97 .oprofile_cpu_type = "ppc64/power3",
98 .oprofile_type = PPC_OPROFILE_RS64,
99 .machine_check = machine_check_generic,
100 .platform = "power3",
103 .pvr_mask = 0xffff0000,
104 .pvr_value = 0x00410000,
105 .cpu_name = "POWER3 (630+)",
106 .cpu_features = CPU_FTRS_POWER3,
107 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
111 .pmc_type = PPC_PMC_IBM,
112 .oprofile_cpu_type = "ppc64/power3",
113 .oprofile_type = PPC_OPROFILE_RS64,
114 .machine_check = machine_check_generic,
115 .platform = "power3",
118 .pvr_mask = 0xffff0000,
119 .pvr_value = 0x00330000,
120 .cpu_name = "RS64-II (northstar)",
121 .cpu_features = CPU_FTRS_RS64,
122 .cpu_user_features = COMMON_USER_PPC64,
126 .pmc_type = PPC_PMC_IBM,
127 .oprofile_cpu_type = "ppc64/rs64",
128 .oprofile_type = PPC_OPROFILE_RS64,
129 .machine_check = machine_check_generic,
133 .pvr_mask = 0xffff0000,
134 .pvr_value = 0x00340000,
135 .cpu_name = "RS64-III (pulsar)",
136 .cpu_features = CPU_FTRS_RS64,
137 .cpu_user_features = COMMON_USER_PPC64,
141 .pmc_type = PPC_PMC_IBM,
142 .oprofile_cpu_type = "ppc64/rs64",
143 .oprofile_type = PPC_OPROFILE_RS64,
144 .machine_check = machine_check_generic,
148 .pvr_mask = 0xffff0000,
149 .pvr_value = 0x00360000,
150 .cpu_name = "RS64-III (icestar)",
151 .cpu_features = CPU_FTRS_RS64,
152 .cpu_user_features = COMMON_USER_PPC64,
156 .pmc_type = PPC_PMC_IBM,
157 .oprofile_cpu_type = "ppc64/rs64",
158 .oprofile_type = PPC_OPROFILE_RS64,
159 .machine_check = machine_check_generic,
163 .pvr_mask = 0xffff0000,
164 .pvr_value = 0x00370000,
165 .cpu_name = "RS64-IV (sstar)",
166 .cpu_features = CPU_FTRS_RS64,
167 .cpu_user_features = COMMON_USER_PPC64,
171 .pmc_type = PPC_PMC_IBM,
172 .oprofile_cpu_type = "ppc64/rs64",
173 .oprofile_type = PPC_OPROFILE_RS64,
174 .machine_check = machine_check_generic,
178 .pvr_mask = 0xffff0000,
179 .pvr_value = 0x00350000,
180 .cpu_name = "POWER4 (gp)",
181 .cpu_features = CPU_FTRS_POWER4,
182 .cpu_user_features = COMMON_USER_POWER4,
186 .pmc_type = PPC_PMC_IBM,
187 .oprofile_cpu_type = "ppc64/power4",
188 .oprofile_type = PPC_OPROFILE_POWER4,
189 .machine_check = machine_check_generic,
190 .platform = "power4",
193 .pvr_mask = 0xffff0000,
194 .pvr_value = 0x00380000,
195 .cpu_name = "POWER4+ (gq)",
196 .cpu_features = CPU_FTRS_POWER4,
197 .cpu_user_features = COMMON_USER_POWER4,
201 .pmc_type = PPC_PMC_IBM,
202 .oprofile_cpu_type = "ppc64/power4",
203 .oprofile_type = PPC_OPROFILE_POWER4,
204 .machine_check = machine_check_generic,
205 .platform = "power4",
208 .pvr_mask = 0xffff0000,
209 .pvr_value = 0x00390000,
210 .cpu_name = "PPC970",
211 .cpu_features = CPU_FTRS_PPC970,
212 .cpu_user_features = COMMON_USER_POWER4 |
213 PPC_FEATURE_HAS_ALTIVEC_COMP,
217 .pmc_type = PPC_PMC_IBM,
218 .cpu_setup = __setup_cpu_ppc970,
219 .cpu_restore = __restore_cpu_ppc970,
220 .oprofile_cpu_type = "ppc64/970",
221 .oprofile_type = PPC_OPROFILE_POWER4,
222 .machine_check = machine_check_generic,
223 .platform = "ppc970",
226 .pvr_mask = 0xffff0000,
227 .pvr_value = 0x003c0000,
228 .cpu_name = "PPC970FX",
229 .cpu_features = CPU_FTRS_PPC970,
230 .cpu_user_features = COMMON_USER_POWER4 |
231 PPC_FEATURE_HAS_ALTIVEC_COMP,
235 .pmc_type = PPC_PMC_IBM,
236 .cpu_setup = __setup_cpu_ppc970,
237 .cpu_restore = __restore_cpu_ppc970,
238 .oprofile_cpu_type = "ppc64/970",
239 .oprofile_type = PPC_OPROFILE_POWER4,
240 .machine_check = machine_check_generic,
241 .platform = "ppc970",
243 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
244 .pvr_mask = 0xffffffff,
245 .pvr_value = 0x00440100,
246 .cpu_name = "PPC970MP",
247 .cpu_features = CPU_FTRS_PPC970,
248 .cpu_user_features = COMMON_USER_POWER4 |
249 PPC_FEATURE_HAS_ALTIVEC_COMP,
253 .pmc_type = PPC_PMC_IBM,
254 .cpu_setup = __setup_cpu_ppc970,
255 .cpu_restore = __restore_cpu_ppc970,
256 .oprofile_cpu_type = "ppc64/970MP",
257 .oprofile_type = PPC_OPROFILE_POWER4,
258 .machine_check = machine_check_generic,
259 .platform = "ppc970",
262 .pvr_mask = 0xffff0000,
263 .pvr_value = 0x00440000,
264 .cpu_name = "PPC970MP",
265 .cpu_features = CPU_FTRS_PPC970,
266 .cpu_user_features = COMMON_USER_POWER4 |
267 PPC_FEATURE_HAS_ALTIVEC_COMP,
271 .pmc_type = PPC_PMC_IBM,
272 .cpu_setup = __setup_cpu_ppc970MP,
273 .cpu_restore = __restore_cpu_ppc970,
274 .oprofile_cpu_type = "ppc64/970MP",
275 .oprofile_type = PPC_OPROFILE_POWER4,
276 .machine_check = machine_check_generic,
277 .platform = "ppc970",
280 .pvr_mask = 0xffff0000,
281 .pvr_value = 0x00450000,
282 .cpu_name = "PPC970GX",
283 .cpu_features = CPU_FTRS_PPC970,
284 .cpu_user_features = COMMON_USER_POWER4 |
285 PPC_FEATURE_HAS_ALTIVEC_COMP,
289 .pmc_type = PPC_PMC_IBM,
290 .cpu_setup = __setup_cpu_ppc970,
291 .oprofile_cpu_type = "ppc64/970",
292 .oprofile_type = PPC_OPROFILE_POWER4,
293 .machine_check = machine_check_generic,
294 .platform = "ppc970",
297 .pvr_mask = 0xffff0000,
298 .pvr_value = 0x003a0000,
299 .cpu_name = "POWER5 (gr)",
300 .cpu_features = CPU_FTRS_POWER5,
301 .cpu_user_features = COMMON_USER_POWER5,
305 .pmc_type = PPC_PMC_IBM,
306 .oprofile_cpu_type = "ppc64/power5",
307 .oprofile_type = PPC_OPROFILE_POWER4,
308 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
309 * and above but only works on POWER5 and above
311 .oprofile_mmcra_sihv = MMCRA_SIHV,
312 .oprofile_mmcra_sipr = MMCRA_SIPR,
313 .machine_check = machine_check_generic,
314 .platform = "power5",
317 .pvr_mask = 0xffffff00,
318 .pvr_value = 0x003b0300,
319 .cpu_name = "POWER5+ (gs)",
320 .cpu_features = CPU_FTRS_POWER5,
321 .cpu_user_features = COMMON_USER_POWER5_PLUS,
325 .oprofile_cpu_type = "ppc64/power5++",
326 .oprofile_type = PPC_OPROFILE_POWER4,
327 .oprofile_mmcra_sihv = MMCRA_SIHV,
328 .oprofile_mmcra_sipr = MMCRA_SIPR,
329 .machine_check = machine_check_generic,
330 .platform = "power5+",
333 .pvr_mask = 0xffff0000,
334 .pvr_value = 0x003b0000,
335 .cpu_name = "POWER5+ (gs)",
336 .cpu_features = CPU_FTRS_POWER5,
337 .cpu_user_features = COMMON_USER_POWER5_PLUS,
341 .pmc_type = PPC_PMC_IBM,
342 .oprofile_cpu_type = "ppc64/power5+",
343 .oprofile_type = PPC_OPROFILE_POWER4,
344 .oprofile_mmcra_sihv = MMCRA_SIHV,
345 .oprofile_mmcra_sipr = MMCRA_SIPR,
346 .machine_check = machine_check_generic,
347 .platform = "power5+",
349 { /* POWER6 in P5+ mode; 2.04-compliant processor */
350 .pvr_mask = 0xffffffff,
351 .pvr_value = 0x0f000001,
352 .cpu_name = "POWER5+",
353 .cpu_features = CPU_FTRS_POWER5,
354 .cpu_user_features = COMMON_USER_POWER5_PLUS,
357 .machine_check = machine_check_generic,
358 .platform = "power5+",
361 .pvr_mask = 0xffff0000,
362 .pvr_value = 0x003e0000,
363 .cpu_name = "POWER6 (raw)",
364 .cpu_features = CPU_FTRS_POWER6,
365 .cpu_user_features = COMMON_USER_POWER6 |
366 PPC_FEATURE_POWER6_EXT,
370 .pmc_type = PPC_PMC_IBM,
371 .oprofile_cpu_type = "ppc64/power6",
372 .oprofile_type = PPC_OPROFILE_POWER4,
373 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
374 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
375 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
377 .machine_check = machine_check_generic,
378 .platform = "power6x",
380 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
381 .pvr_mask = 0xffffffff,
382 .pvr_value = 0x0f000002,
383 .cpu_name = "POWER6 (architected)",
384 .cpu_features = CPU_FTRS_POWER6,
385 .cpu_user_features = COMMON_USER_POWER6,
388 .machine_check = machine_check_generic,
389 .platform = "power6",
391 { /* 2.06-compliant processor, i.e. Power7 "architected" mode */
392 .pvr_mask = 0xffffffff,
393 .pvr_value = 0x0f000003,
394 .cpu_name = "POWER7 (architected)",
395 .cpu_features = CPU_FTRS_POWER7,
396 .cpu_user_features = COMMON_USER_POWER7,
399 .machine_check = machine_check_generic,
400 .platform = "power7",
403 .pvr_mask = 0xffff0000,
404 .pvr_value = 0x003f0000,
405 .cpu_name = "POWER7 (raw)",
406 .cpu_features = CPU_FTRS_POWER7,
407 .cpu_user_features = COMMON_USER_POWER7,
411 .pmc_type = PPC_PMC_IBM,
412 .cpu_setup = __setup_cpu_power7,
413 .cpu_restore = __restore_cpu_power7,
414 .oprofile_cpu_type = "ppc64/power7",
415 .oprofile_type = PPC_OPROFILE_POWER4,
416 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
417 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
418 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
420 .platform = "power7",
422 { /* Cell Broadband Engine */
423 .pvr_mask = 0xffff0000,
424 .pvr_value = 0x00700000,
425 .cpu_name = "Cell Broadband Engine",
426 .cpu_features = CPU_FTRS_CELL,
427 .cpu_user_features = COMMON_USER_PPC64 |
428 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
433 .pmc_type = PPC_PMC_IBM,
434 .oprofile_cpu_type = "ppc64/cell-be",
435 .oprofile_type = PPC_OPROFILE_CELL,
436 .machine_check = machine_check_generic,
437 .platform = "ppc-cell-be",
440 .pvr_mask = 0x7fff0000,
441 .pvr_value = 0x00900000,
443 .cpu_features = CPU_FTRS_PA6T,
444 .cpu_user_features = COMMON_USER_PA6T,
448 .pmc_type = PPC_PMC_PA6T,
449 .cpu_setup = __setup_cpu_pa6t,
450 .cpu_restore = __restore_cpu_pa6t,
451 .oprofile_cpu_type = "ppc64/pa6t",
452 .oprofile_type = PPC_OPROFILE_PA6T,
453 .machine_check = machine_check_generic,
456 { /* default match */
457 .pvr_mask = 0x00000000,
458 .pvr_value = 0x00000000,
459 .cpu_name = "POWER4 (compatible)",
460 .cpu_features = CPU_FTRS_COMPATIBLE,
461 .cpu_user_features = COMMON_USER_PPC64,
465 .pmc_type = PPC_PMC_IBM,
466 .machine_check = machine_check_generic,
467 .platform = "power4",
469 #endif /* CONFIG_PPC64 */
473 .pvr_mask = 0xffff0000,
474 .pvr_value = 0x00010000,
476 .cpu_features = CPU_FTRS_PPC601,
477 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
478 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
481 .machine_check = machine_check_generic,
482 .platform = "ppc601",
485 .pvr_mask = 0xffff0000,
486 .pvr_value = 0x00030000,
488 .cpu_features = CPU_FTRS_603,
489 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
492 .cpu_setup = __setup_cpu_603,
493 .machine_check = machine_check_generic,
494 .platform = "ppc603",
497 .pvr_mask = 0xffff0000,
498 .pvr_value = 0x00060000,
500 .cpu_features = CPU_FTRS_603,
501 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
504 .cpu_setup = __setup_cpu_603,
505 .machine_check = machine_check_generic,
506 .platform = "ppc603",
509 .pvr_mask = 0xffff0000,
510 .pvr_value = 0x00070000,
512 .cpu_features = CPU_FTRS_603,
513 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
516 .cpu_setup = __setup_cpu_603,
517 .machine_check = machine_check_generic,
518 .platform = "ppc603",
521 .pvr_mask = 0xffff0000,
522 .pvr_value = 0x00040000,
524 .cpu_features = CPU_FTRS_604,
525 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
529 .cpu_setup = __setup_cpu_604,
530 .machine_check = machine_check_generic,
531 .platform = "ppc604",
534 .pvr_mask = 0xfffff000,
535 .pvr_value = 0x00090000,
537 .cpu_features = CPU_FTRS_604,
538 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
542 .cpu_setup = __setup_cpu_604,
543 .machine_check = machine_check_generic,
544 .platform = "ppc604",
547 .pvr_mask = 0xffff0000,
548 .pvr_value = 0x00090000,
550 .cpu_features = CPU_FTRS_604,
551 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
555 .cpu_setup = __setup_cpu_604,
556 .machine_check = machine_check_generic,
557 .platform = "ppc604",
560 .pvr_mask = 0xffff0000,
561 .pvr_value = 0x000a0000,
563 .cpu_features = CPU_FTRS_604,
564 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
568 .cpu_setup = __setup_cpu_604,
569 .machine_check = machine_check_generic,
570 .platform = "ppc604",
572 { /* 740/750 (0x4202, don't support TAU ?) */
573 .pvr_mask = 0xffffffff,
574 .pvr_value = 0x00084202,
575 .cpu_name = "740/750",
576 .cpu_features = CPU_FTRS_740_NOTAU,
577 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
581 .cpu_setup = __setup_cpu_750,
582 .machine_check = machine_check_generic,
583 .platform = "ppc750",
585 { /* 750CX (80100 and 8010x?) */
586 .pvr_mask = 0xfffffff0,
587 .pvr_value = 0x00080100,
589 .cpu_features = CPU_FTRS_750,
590 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
594 .cpu_setup = __setup_cpu_750cx,
595 .machine_check = machine_check_generic,
596 .platform = "ppc750",
598 { /* 750CX (82201 and 82202) */
599 .pvr_mask = 0xfffffff0,
600 .pvr_value = 0x00082200,
602 .cpu_features = CPU_FTRS_750,
603 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
607 .cpu_setup = __setup_cpu_750cx,
608 .machine_check = machine_check_generic,
609 .platform = "ppc750",
611 { /* 750CXe (82214) */
612 .pvr_mask = 0xfffffff0,
613 .pvr_value = 0x00082210,
614 .cpu_name = "750CXe",
615 .cpu_features = CPU_FTRS_750,
616 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
620 .cpu_setup = __setup_cpu_750cx,
621 .machine_check = machine_check_generic,
622 .platform = "ppc750",
624 { /* 750CXe "Gekko" (83214) */
625 .pvr_mask = 0xffffffff,
626 .pvr_value = 0x00083214,
627 .cpu_name = "750CXe",
628 .cpu_features = CPU_FTRS_750,
629 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
633 .cpu_setup = __setup_cpu_750cx,
634 .machine_check = machine_check_generic,
635 .platform = "ppc750",
638 .pvr_mask = 0xfffff0f0,
639 .pvr_value = 0x00087010,
641 .cpu_features = CPU_FTRS_750CL,
642 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
646 .cpu_setup = __setup_cpu_750,
647 .machine_check = machine_check_generic,
648 .platform = "ppc750",
651 .pvr_mask = 0xfffff000,
652 .pvr_value = 0x00083000,
653 .cpu_name = "745/755",
654 .cpu_features = CPU_FTRS_750,
655 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
659 .cpu_setup = __setup_cpu_750,
660 .machine_check = machine_check_generic,
661 .platform = "ppc750",
663 { /* 750FX rev 1.x */
664 .pvr_mask = 0xffffff00,
665 .pvr_value = 0x70000100,
667 .cpu_features = CPU_FTRS_750FX1,
668 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
672 .cpu_setup = __setup_cpu_750,
673 .machine_check = machine_check_generic,
674 .platform = "ppc750",
676 { /* 750FX rev 2.0 must disable HID0[DPM] */
677 .pvr_mask = 0xffffffff,
678 .pvr_value = 0x70000200,
680 .cpu_features = CPU_FTRS_750FX2,
681 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
685 .cpu_setup = __setup_cpu_750,
686 .machine_check = machine_check_generic,
687 .platform = "ppc750",
689 { /* 750FX (All revs except 2.0) */
690 .pvr_mask = 0xffff0000,
691 .pvr_value = 0x70000000,
693 .cpu_features = CPU_FTRS_750FX,
694 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
698 .cpu_setup = __setup_cpu_750fx,
699 .machine_check = machine_check_generic,
700 .platform = "ppc750",
703 .pvr_mask = 0xffff0000,
704 .pvr_value = 0x70020000,
706 .cpu_features = CPU_FTRS_750GX,
707 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
711 .cpu_setup = __setup_cpu_750fx,
712 .machine_check = machine_check_generic,
713 .platform = "ppc750",
715 { /* 740/750 (L2CR bit need fixup for 740) */
716 .pvr_mask = 0xffff0000,
717 .pvr_value = 0x00080000,
718 .cpu_name = "740/750",
719 .cpu_features = CPU_FTRS_740,
720 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
724 .cpu_setup = __setup_cpu_750,
725 .machine_check = machine_check_generic,
726 .platform = "ppc750",
728 { /* 7400 rev 1.1 ? (no TAU) */
729 .pvr_mask = 0xffffffff,
730 .pvr_value = 0x000c1101,
731 .cpu_name = "7400 (1.1)",
732 .cpu_features = CPU_FTRS_7400_NOTAU,
733 .cpu_user_features = COMMON_USER |
734 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
738 .cpu_setup = __setup_cpu_7400,
739 .machine_check = machine_check_generic,
740 .platform = "ppc7400",
743 .pvr_mask = 0xffff0000,
744 .pvr_value = 0x000c0000,
746 .cpu_features = CPU_FTRS_7400,
747 .cpu_user_features = COMMON_USER |
748 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
752 .cpu_setup = __setup_cpu_7400,
753 .machine_check = machine_check_generic,
754 .platform = "ppc7400",
757 .pvr_mask = 0xffff0000,
758 .pvr_value = 0x800c0000,
760 .cpu_features = CPU_FTRS_7400,
761 .cpu_user_features = COMMON_USER |
762 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
766 .cpu_setup = __setup_cpu_7410,
767 .machine_check = machine_check_generic,
768 .platform = "ppc7400",
770 { /* 7450 2.0 - no doze/nap */
771 .pvr_mask = 0xffffffff,
772 .pvr_value = 0x80000200,
774 .cpu_features = CPU_FTRS_7450_20,
775 .cpu_user_features = COMMON_USER |
776 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
780 .cpu_setup = __setup_cpu_745x,
781 .oprofile_cpu_type = "ppc/7450",
782 .oprofile_type = PPC_OPROFILE_G4,
783 .machine_check = machine_check_generic,
784 .platform = "ppc7450",
787 .pvr_mask = 0xffffffff,
788 .pvr_value = 0x80000201,
790 .cpu_features = CPU_FTRS_7450_21,
791 .cpu_user_features = COMMON_USER |
792 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
796 .cpu_setup = __setup_cpu_745x,
797 .oprofile_cpu_type = "ppc/7450",
798 .oprofile_type = PPC_OPROFILE_G4,
799 .machine_check = machine_check_generic,
800 .platform = "ppc7450",
802 { /* 7450 2.3 and newer */
803 .pvr_mask = 0xffff0000,
804 .pvr_value = 0x80000000,
806 .cpu_features = CPU_FTRS_7450_23,
807 .cpu_user_features = COMMON_USER |
808 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
812 .cpu_setup = __setup_cpu_745x,
813 .oprofile_cpu_type = "ppc/7450",
814 .oprofile_type = PPC_OPROFILE_G4,
815 .machine_check = machine_check_generic,
816 .platform = "ppc7450",
819 .pvr_mask = 0xffffff00,
820 .pvr_value = 0x80010100,
822 .cpu_features = CPU_FTRS_7455_1,
823 .cpu_user_features = COMMON_USER |
824 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
828 .cpu_setup = __setup_cpu_745x,
829 .oprofile_cpu_type = "ppc/7450",
830 .oprofile_type = PPC_OPROFILE_G4,
831 .machine_check = machine_check_generic,
832 .platform = "ppc7450",
835 .pvr_mask = 0xffffffff,
836 .pvr_value = 0x80010200,
838 .cpu_features = CPU_FTRS_7455_20,
839 .cpu_user_features = COMMON_USER |
840 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
844 .cpu_setup = __setup_cpu_745x,
845 .oprofile_cpu_type = "ppc/7450",
846 .oprofile_type = PPC_OPROFILE_G4,
847 .machine_check = machine_check_generic,
848 .platform = "ppc7450",
851 .pvr_mask = 0xffff0000,
852 .pvr_value = 0x80010000,
854 .cpu_features = CPU_FTRS_7455,
855 .cpu_user_features = COMMON_USER |
856 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
860 .cpu_setup = __setup_cpu_745x,
861 .oprofile_cpu_type = "ppc/7450",
862 .oprofile_type = PPC_OPROFILE_G4,
863 .machine_check = machine_check_generic,
864 .platform = "ppc7450",
866 { /* 7447/7457 Rev 1.0 */
867 .pvr_mask = 0xffffffff,
868 .pvr_value = 0x80020100,
869 .cpu_name = "7447/7457",
870 .cpu_features = CPU_FTRS_7447_10,
871 .cpu_user_features = COMMON_USER |
872 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
876 .cpu_setup = __setup_cpu_745x,
877 .oprofile_cpu_type = "ppc/7450",
878 .oprofile_type = PPC_OPROFILE_G4,
879 .machine_check = machine_check_generic,
880 .platform = "ppc7450",
882 { /* 7447/7457 Rev 1.1 */
883 .pvr_mask = 0xffffffff,
884 .pvr_value = 0x80020101,
885 .cpu_name = "7447/7457",
886 .cpu_features = CPU_FTRS_7447_10,
887 .cpu_user_features = COMMON_USER |
888 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
892 .cpu_setup = __setup_cpu_745x,
893 .oprofile_cpu_type = "ppc/7450",
894 .oprofile_type = PPC_OPROFILE_G4,
895 .machine_check = machine_check_generic,
896 .platform = "ppc7450",
898 { /* 7447/7457 Rev 1.2 and later */
899 .pvr_mask = 0xffff0000,
900 .pvr_value = 0x80020000,
901 .cpu_name = "7447/7457",
902 .cpu_features = CPU_FTRS_7447,
903 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
907 .cpu_setup = __setup_cpu_745x,
908 .oprofile_cpu_type = "ppc/7450",
909 .oprofile_type = PPC_OPROFILE_G4,
910 .machine_check = machine_check_generic,
911 .platform = "ppc7450",
914 .pvr_mask = 0xffff0000,
915 .pvr_value = 0x80030000,
917 .cpu_features = CPU_FTRS_7447A,
918 .cpu_user_features = COMMON_USER |
919 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
923 .cpu_setup = __setup_cpu_745x,
924 .oprofile_cpu_type = "ppc/7450",
925 .oprofile_type = PPC_OPROFILE_G4,
926 .machine_check = machine_check_generic,
927 .platform = "ppc7450",
930 .pvr_mask = 0xffff0000,
931 .pvr_value = 0x80040000,
933 .cpu_features = CPU_FTRS_7448,
934 .cpu_user_features = COMMON_USER |
935 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
939 .cpu_setup = __setup_cpu_745x,
940 .oprofile_cpu_type = "ppc/7450",
941 .oprofile_type = PPC_OPROFILE_G4,
942 .machine_check = machine_check_generic,
943 .platform = "ppc7450",
945 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
946 .pvr_mask = 0x7fff0000,
947 .pvr_value = 0x00810000,
949 .cpu_features = CPU_FTRS_82XX,
950 .cpu_user_features = COMMON_USER,
953 .cpu_setup = __setup_cpu_603,
954 .machine_check = machine_check_generic,
955 .platform = "ppc603",
957 { /* All G2_LE (603e core, plus some) have the same pvr */
958 .pvr_mask = 0x7fff0000,
959 .pvr_value = 0x00820000,
961 .cpu_features = CPU_FTRS_G2_LE,
962 .cpu_user_features = COMMON_USER,
965 .cpu_setup = __setup_cpu_603,
966 .machine_check = machine_check_generic,
967 .platform = "ppc603",
969 { /* e300c1 (a 603e core, plus some) on 83xx */
970 .pvr_mask = 0x7fff0000,
971 .pvr_value = 0x00830000,
972 .cpu_name = "e300c1",
973 .cpu_features = CPU_FTRS_E300,
974 .cpu_user_features = COMMON_USER,
977 .cpu_setup = __setup_cpu_603,
978 .machine_check = machine_check_generic,
979 .platform = "ppc603",
981 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
982 .pvr_mask = 0x7fff0000,
983 .pvr_value = 0x00840000,
984 .cpu_name = "e300c2",
985 .cpu_features = CPU_FTRS_E300C2,
986 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
989 .cpu_setup = __setup_cpu_603,
990 .machine_check = machine_check_generic,
991 .platform = "ppc603",
993 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
994 .pvr_mask = 0x7fff0000,
995 .pvr_value = 0x00850000,
996 .cpu_name = "e300c3",
997 .cpu_features = CPU_FTRS_E300,
998 .cpu_user_features = COMMON_USER,
1001 .cpu_setup = __setup_cpu_603,
1003 .oprofile_cpu_type = "ppc/e300",
1004 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1005 .platform = "ppc603",
1007 { /* e300c4 (e300c1, plus one IU) */
1008 .pvr_mask = 0x7fff0000,
1009 .pvr_value = 0x00860000,
1010 .cpu_name = "e300c4",
1011 .cpu_features = CPU_FTRS_E300,
1012 .cpu_user_features = COMMON_USER,
1015 .cpu_setup = __setup_cpu_603,
1016 .machine_check = machine_check_generic,
1018 .oprofile_cpu_type = "ppc/e300",
1019 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1020 .platform = "ppc603",
1022 { /* default match, we assume split I/D cache & TB (non-601)... */
1023 .pvr_mask = 0x00000000,
1024 .pvr_value = 0x00000000,
1025 .cpu_name = "(generic PPC)",
1026 .cpu_features = CPU_FTRS_CLASSIC32,
1027 .cpu_user_features = COMMON_USER,
1030 .machine_check = machine_check_generic,
1031 .platform = "ppc603",
1033 #endif /* CLASSIC_PPC */
1036 .pvr_mask = 0xffff0000,
1037 .pvr_value = 0x00500000,
1039 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1040 * if the 8xx code is there.... */
1041 .cpu_features = CPU_FTRS_8XX,
1042 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1045 .platform = "ppc823",
1047 #endif /* CONFIG_8xx */
1050 .pvr_mask = 0xffffff00,
1051 .pvr_value = 0x00200200,
1052 .cpu_name = "403GC",
1053 .cpu_features = CPU_FTRS_40X,
1054 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1057 .machine_check = machine_check_4xx,
1058 .platform = "ppc403",
1061 .pvr_mask = 0xffffff00,
1062 .pvr_value = 0x00201400,
1063 .cpu_name = "403GCX",
1064 .cpu_features = CPU_FTRS_40X,
1065 .cpu_user_features = PPC_FEATURE_32 |
1066 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
1069 .machine_check = machine_check_4xx,
1070 .platform = "ppc403",
1073 .pvr_mask = 0xffff0000,
1074 .pvr_value = 0x00200000,
1075 .cpu_name = "403G ??",
1076 .cpu_features = CPU_FTRS_40X,
1077 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1080 .machine_check = machine_check_4xx,
1081 .platform = "ppc403",
1084 .pvr_mask = 0xffff0000,
1085 .pvr_value = 0x40110000,
1086 .cpu_name = "405GP",
1087 .cpu_features = CPU_FTRS_40X,
1088 .cpu_user_features = PPC_FEATURE_32 |
1089 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1092 .machine_check = machine_check_4xx,
1093 .platform = "ppc405",
1096 .pvr_mask = 0xffff0000,
1097 .pvr_value = 0x40130000,
1098 .cpu_name = "STB03xxx",
1099 .cpu_features = CPU_FTRS_40X,
1100 .cpu_user_features = PPC_FEATURE_32 |
1101 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1104 .machine_check = machine_check_4xx,
1105 .platform = "ppc405",
1108 .pvr_mask = 0xffff0000,
1109 .pvr_value = 0x41810000,
1110 .cpu_name = "STB04xxx",
1111 .cpu_features = CPU_FTRS_40X,
1112 .cpu_user_features = PPC_FEATURE_32 |
1113 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1116 .machine_check = machine_check_4xx,
1117 .platform = "ppc405",
1120 .pvr_mask = 0xffff0000,
1121 .pvr_value = 0x41610000,
1122 .cpu_name = "NP405L",
1123 .cpu_features = CPU_FTRS_40X,
1124 .cpu_user_features = PPC_FEATURE_32 |
1125 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1128 .machine_check = machine_check_4xx,
1129 .platform = "ppc405",
1132 .pvr_mask = 0xffff0000,
1133 .pvr_value = 0x40B10000,
1134 .cpu_name = "NP4GS3",
1135 .cpu_features = CPU_FTRS_40X,
1136 .cpu_user_features = PPC_FEATURE_32 |
1137 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1140 .machine_check = machine_check_4xx,
1141 .platform = "ppc405",
1144 .pvr_mask = 0xffff0000,
1145 .pvr_value = 0x41410000,
1146 .cpu_name = "NP405H",
1147 .cpu_features = CPU_FTRS_40X,
1148 .cpu_user_features = PPC_FEATURE_32 |
1149 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1152 .machine_check = machine_check_4xx,
1153 .platform = "ppc405",
1156 .pvr_mask = 0xffff0000,
1157 .pvr_value = 0x50910000,
1158 .cpu_name = "405GPr",
1159 .cpu_features = CPU_FTRS_40X,
1160 .cpu_user_features = PPC_FEATURE_32 |
1161 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1164 .machine_check = machine_check_4xx,
1165 .platform = "ppc405",
1168 .pvr_mask = 0xffff0000,
1169 .pvr_value = 0x51510000,
1170 .cpu_name = "STBx25xx",
1171 .cpu_features = CPU_FTRS_40X,
1172 .cpu_user_features = PPC_FEATURE_32 |
1173 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1176 .machine_check = machine_check_4xx,
1177 .platform = "ppc405",
1180 .pvr_mask = 0xffff0000,
1181 .pvr_value = 0x41F10000,
1182 .cpu_name = "405LP",
1183 .cpu_features = CPU_FTRS_40X,
1184 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1187 .machine_check = machine_check_4xx,
1188 .platform = "ppc405",
1190 { /* Xilinx Virtex-II Pro */
1191 .pvr_mask = 0xfffff000,
1192 .pvr_value = 0x20010000,
1193 .cpu_name = "Virtex-II Pro",
1194 .cpu_features = CPU_FTRS_40X,
1195 .cpu_user_features = PPC_FEATURE_32 |
1196 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1199 .machine_check = machine_check_4xx,
1200 .platform = "ppc405",
1202 { /* Xilinx Virtex-4 FX */
1203 .pvr_mask = 0xfffff000,
1204 .pvr_value = 0x20011000,
1205 .cpu_name = "Virtex-4 FX",
1206 .cpu_features = CPU_FTRS_40X,
1207 .cpu_user_features = PPC_FEATURE_32 |
1208 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1211 .machine_check = machine_check_4xx,
1212 .platform = "ppc405",
1215 .pvr_mask = 0xffff0000,
1216 .pvr_value = 0x51210000,
1217 .cpu_name = "405EP",
1218 .cpu_features = CPU_FTRS_40X,
1219 .cpu_user_features = PPC_FEATURE_32 |
1220 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1223 .machine_check = machine_check_4xx,
1224 .platform = "ppc405",
1227 .pvr_mask = 0xffff0004,
1228 .pvr_value = 0x12910004,
1229 .cpu_name = "405EX",
1230 .cpu_features = CPU_FTRS_40X,
1231 .cpu_user_features = PPC_FEATURE_32 |
1232 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1235 .machine_check = machine_check_4xx,
1236 .platform = "ppc405",
1239 .pvr_mask = 0xffff0004,
1240 .pvr_value = 0x12910000,
1241 .cpu_name = "405EXr",
1242 .cpu_features = CPU_FTRS_40X,
1243 .cpu_user_features = PPC_FEATURE_32 |
1244 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1247 .machine_check = machine_check_4xx,
1248 .platform = "ppc405",
1250 { /* default match */
1251 .pvr_mask = 0x00000000,
1252 .pvr_value = 0x00000000,
1253 .cpu_name = "(generic 40x PPC)",
1254 .cpu_features = CPU_FTRS_40X,
1255 .cpu_user_features = PPC_FEATURE_32 |
1256 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1259 .machine_check = machine_check_4xx,
1260 .platform = "ppc405",
1263 #endif /* CONFIG_40x */
1266 .pvr_mask = 0xf0000fff,
1267 .pvr_value = 0x40000850,
1268 .cpu_name = "440GR Rev. A",
1269 .cpu_features = CPU_FTRS_44X,
1270 .cpu_user_features = COMMON_USER_BOOKE,
1273 .machine_check = machine_check_4xx,
1274 .platform = "ppc440",
1276 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1277 .pvr_mask = 0xf0000fff,
1278 .pvr_value = 0x40000858,
1279 .cpu_name = "440EP Rev. A",
1280 .cpu_features = CPU_FTRS_44X,
1281 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1284 .cpu_setup = __setup_cpu_440ep,
1285 .machine_check = machine_check_4xx,
1286 .platform = "ppc440",
1289 .pvr_mask = 0xf0000fff,
1290 .pvr_value = 0x400008d3,
1291 .cpu_name = "440GR Rev. B",
1292 .cpu_features = CPU_FTRS_44X,
1293 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1296 .machine_check = machine_check_4xx,
1297 .platform = "ppc440",
1299 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1300 .pvr_mask = 0xf0000ff7,
1301 .pvr_value = 0x400008d4,
1302 .cpu_name = "440EP Rev. C",
1303 .cpu_features = CPU_FTRS_44X,
1304 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1307 .cpu_setup = __setup_cpu_440ep,
1308 .machine_check = machine_check_4xx,
1309 .platform = "ppc440",
1311 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1312 .pvr_mask = 0xf0000fff,
1313 .pvr_value = 0x400008db,
1314 .cpu_name = "440EP Rev. B",
1315 .cpu_features = CPU_FTRS_44X,
1316 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1319 .cpu_setup = __setup_cpu_440ep,
1320 .machine_check = machine_check_4xx,
1321 .platform = "ppc440",
1324 .pvr_mask = 0xf0000ffb,
1325 .pvr_value = 0x200008D0,
1326 .cpu_name = "440GRX",
1327 .cpu_features = CPU_FTRS_44X,
1328 .cpu_user_features = COMMON_USER_BOOKE,
1331 .cpu_setup = __setup_cpu_440grx,
1332 .machine_check = machine_check_440A,
1333 .platform = "ppc440",
1335 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1336 .pvr_mask = 0xf0000ffb,
1337 .pvr_value = 0x200008D8,
1338 .cpu_name = "440EPX",
1339 .cpu_features = CPU_FTRS_44X,
1340 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1343 .cpu_setup = __setup_cpu_440epx,
1344 .machine_check = machine_check_440A,
1345 .platform = "ppc440",
1347 { /* 440GP Rev. B */
1348 .pvr_mask = 0xf0000fff,
1349 .pvr_value = 0x40000440,
1350 .cpu_name = "440GP Rev. B",
1351 .cpu_features = CPU_FTRS_44X,
1352 .cpu_user_features = COMMON_USER_BOOKE,
1355 .machine_check = machine_check_4xx,
1356 .platform = "ppc440gp",
1358 { /* 440GP Rev. C */
1359 .pvr_mask = 0xf0000fff,
1360 .pvr_value = 0x40000481,
1361 .cpu_name = "440GP Rev. C",
1362 .cpu_features = CPU_FTRS_44X,
1363 .cpu_user_features = COMMON_USER_BOOKE,
1366 .machine_check = machine_check_4xx,
1367 .platform = "ppc440gp",
1369 { /* 440GX Rev. A */
1370 .pvr_mask = 0xf0000fff,
1371 .pvr_value = 0x50000850,
1372 .cpu_name = "440GX Rev. A",
1373 .cpu_features = CPU_FTRS_44X,
1374 .cpu_user_features = COMMON_USER_BOOKE,
1377 .cpu_setup = __setup_cpu_440gx,
1378 .machine_check = machine_check_440A,
1379 .platform = "ppc440",
1381 { /* 440GX Rev. B */
1382 .pvr_mask = 0xf0000fff,
1383 .pvr_value = 0x50000851,
1384 .cpu_name = "440GX Rev. B",
1385 .cpu_features = CPU_FTRS_44X,
1386 .cpu_user_features = COMMON_USER_BOOKE,
1389 .cpu_setup = __setup_cpu_440gx,
1390 .machine_check = machine_check_440A,
1391 .platform = "ppc440",
1393 { /* 440GX Rev. C */
1394 .pvr_mask = 0xf0000fff,
1395 .pvr_value = 0x50000892,
1396 .cpu_name = "440GX Rev. C",
1397 .cpu_features = CPU_FTRS_44X,
1398 .cpu_user_features = COMMON_USER_BOOKE,
1401 .cpu_setup = __setup_cpu_440gx,
1402 .machine_check = machine_check_440A,
1403 .platform = "ppc440",
1405 { /* 440GX Rev. F */
1406 .pvr_mask = 0xf0000fff,
1407 .pvr_value = 0x50000894,
1408 .cpu_name = "440GX Rev. F",
1409 .cpu_features = CPU_FTRS_44X,
1410 .cpu_user_features = COMMON_USER_BOOKE,
1413 .cpu_setup = __setup_cpu_440gx,
1414 .machine_check = machine_check_440A,
1415 .platform = "ppc440",
1417 { /* 440SP Rev. A */
1418 .pvr_mask = 0xfff00fff,
1419 .pvr_value = 0x53200891,
1420 .cpu_name = "440SP Rev. A",
1421 .cpu_features = CPU_FTRS_44X,
1422 .cpu_user_features = COMMON_USER_BOOKE,
1425 .machine_check = machine_check_4xx,
1426 .platform = "ppc440",
1428 { /* 440SPe Rev. A */
1429 .pvr_mask = 0xfff00fff,
1430 .pvr_value = 0x53400890,
1431 .cpu_name = "440SPe Rev. A",
1432 .cpu_features = CPU_FTRS_44X,
1433 .cpu_user_features = COMMON_USER_BOOKE,
1436 .cpu_setup = __setup_cpu_440spe,
1437 .machine_check = machine_check_440A,
1438 .platform = "ppc440",
1440 { /* 440SPe Rev. B */
1441 .pvr_mask = 0xfff00fff,
1442 .pvr_value = 0x53400891,
1443 .cpu_name = "440SPe Rev. B",
1444 .cpu_features = CPU_FTRS_44X,
1445 .cpu_user_features = COMMON_USER_BOOKE,
1448 .cpu_setup = __setup_cpu_440spe,
1449 .machine_check = machine_check_440A,
1450 .platform = "ppc440",
1452 { /* 440 in Xilinx Virtex-5 FXT */
1453 .pvr_mask = 0xfffffff0,
1454 .pvr_value = 0x7ff21910,
1455 .cpu_name = "440 in Virtex-5 FXT",
1456 .cpu_features = CPU_FTRS_44X,
1457 .cpu_user_features = COMMON_USER_BOOKE,
1460 .platform = "ppc440",
1463 .pvr_mask = 0xffff0002,
1464 .pvr_value = 0x13020002,
1465 .cpu_name = "460EX",
1466 .cpu_features = CPU_FTRS_44X,
1467 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1470 .cpu_setup = __setup_cpu_460ex,
1471 .machine_check = machine_check_440A,
1472 .platform = "ppc440",
1475 .pvr_mask = 0xffff0002,
1476 .pvr_value = 0x13020000,
1477 .cpu_name = "460GT",
1478 .cpu_features = CPU_FTRS_44X,
1479 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1482 .cpu_setup = __setup_cpu_460gt,
1483 .machine_check = machine_check_440A,
1484 .platform = "ppc440",
1486 { /* default match */
1487 .pvr_mask = 0x00000000,
1488 .pvr_value = 0x00000000,
1489 .cpu_name = "(generic 44x PPC)",
1490 .cpu_features = CPU_FTRS_44X,
1491 .cpu_user_features = COMMON_USER_BOOKE,
1494 .machine_check = machine_check_4xx,
1495 .platform = "ppc440",
1497 #endif /* CONFIG_44x */
1500 .pvr_mask = 0xfff00000,
1501 .pvr_value = 0x81000000,
1502 .cpu_name = "e200z5",
1503 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1504 .cpu_features = CPU_FTRS_E200,
1505 .cpu_user_features = COMMON_USER_BOOKE |
1506 PPC_FEATURE_HAS_EFP_SINGLE |
1507 PPC_FEATURE_UNIFIED_CACHE,
1509 .machine_check = machine_check_e200,
1510 .platform = "ppc5554",
1513 .pvr_mask = 0xfff00000,
1514 .pvr_value = 0x81100000,
1515 .cpu_name = "e200z6",
1516 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1517 .cpu_features = CPU_FTRS_E200,
1518 .cpu_user_features = COMMON_USER_BOOKE |
1519 PPC_FEATURE_HAS_SPE_COMP |
1520 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1521 PPC_FEATURE_UNIFIED_CACHE,
1523 .machine_check = machine_check_e200,
1524 .platform = "ppc5554",
1526 { /* default match */
1527 .pvr_mask = 0x00000000,
1528 .pvr_value = 0x00000000,
1529 .cpu_name = "(generic E200 PPC)",
1530 .cpu_features = CPU_FTRS_E200,
1531 .cpu_user_features = COMMON_USER_BOOKE |
1532 PPC_FEATURE_HAS_EFP_SINGLE |
1533 PPC_FEATURE_UNIFIED_CACHE,
1535 .machine_check = machine_check_e200,
1536 .platform = "ppc5554",
1538 #endif /* CONFIG_E200 */
1541 .pvr_mask = 0xffff0000,
1542 .pvr_value = 0x80200000,
1544 .cpu_features = CPU_FTRS_E500,
1545 .cpu_user_features = COMMON_USER_BOOKE |
1546 PPC_FEATURE_HAS_SPE_COMP |
1547 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
1551 .oprofile_cpu_type = "ppc/e500",
1552 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1553 .machine_check = machine_check_e500,
1554 .platform = "ppc8540",
1557 .pvr_mask = 0xffff0000,
1558 .pvr_value = 0x80210000,
1559 .cpu_name = "e500v2",
1560 .cpu_features = CPU_FTRS_E500_2,
1561 .cpu_user_features = COMMON_USER_BOOKE |
1562 PPC_FEATURE_HAS_SPE_COMP |
1563 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1564 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
1568 .oprofile_cpu_type = "ppc/e500",
1569 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1570 .machine_check = machine_check_e500,
1571 .platform = "ppc8548",
1574 .pvr_mask = 0xffff0000,
1575 .pvr_value = 0x80230000,
1576 .cpu_name = "e500mc",
1577 .cpu_features = CPU_FTRS_E500MC,
1578 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1582 .oprofile_cpu_type = "ppc/e500", /* xxx - galak, e500mc? */
1583 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1584 .machine_check = machine_check_e500,
1585 .platform = "ppce500mc",
1587 { /* default match */
1588 .pvr_mask = 0x00000000,
1589 .pvr_value = 0x00000000,
1590 .cpu_name = "(generic E500 PPC)",
1591 .cpu_features = CPU_FTRS_E500,
1592 .cpu_user_features = COMMON_USER_BOOKE |
1593 PPC_FEATURE_HAS_SPE_COMP |
1594 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
1597 .machine_check = machine_check_e500,
1598 .platform = "powerpc",
1600 #endif /* CONFIG_E500 */
1601 #endif /* CONFIG_PPC32 */
1604 static struct cpu_spec the_cpu_spec;
1606 struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
1608 struct cpu_spec *s = cpu_specs;
1609 struct cpu_spec *t = &the_cpu_spec;
1615 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
1616 if ((pvr & s->pvr_mask) == s->pvr_value) {
1618 * If we are overriding a previous value derived
1619 * from the real PVR with a new value obtained
1620 * using a logical PVR value, don't modify the
1621 * performance monitor fields.
1623 if (t->num_pmcs && !s->num_pmcs) {
1624 t->cpu_name = s->cpu_name;
1625 t->cpu_features = s->cpu_features;
1626 t->cpu_user_features = s->cpu_user_features;
1627 t->icache_bsize = s->icache_bsize;
1628 t->dcache_bsize = s->dcache_bsize;
1629 t->cpu_setup = s->cpu_setup;
1630 t->cpu_restore = s->cpu_restore;
1631 t->platform = s->platform;
1634 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
1635 #if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
1636 /* ppc64 and booke expect identify_cpu to also call
1637 * setup_cpu for that processor. I will consolidate
1638 * that at a later time, for now, just use #ifdef.
1639 * we also don't need to PTRRELOC the function pointer
1640 * on ppc64 and booke as we are running at 0 in real
1641 * mode on ppc64 and reloc_offset is always 0 on booke.
1644 s->cpu_setup(offset, s);
1646 #endif /* CONFIG_PPC64 || CONFIG_BOOKE */