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_603(unsigned long offset, struct cpu_spec* spec);
41 extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
42 extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
43 extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
44 extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
45 extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
46 extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
47 extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
48 #endif /* CONFIG_PPC32 */
50 extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
51 extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
52 extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
53 extern void __restore_cpu_pa6t(void);
54 extern void __restore_cpu_ppc970(void);
55 #endif /* CONFIG_PPC64 */
57 /* This table only contains "desktop" CPUs, it need to be filled with embedded
60 #define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
62 #define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
63 #define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
64 #define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
65 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
66 #define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
67 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
68 #define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
69 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
71 #define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
72 PPC_FEATURE_TRUE_LE | \
73 PPC_FEATURE_HAS_ALTIVEC_COMP)
74 #define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
77 static struct cpu_spec __initdata cpu_specs[] = {
80 .pvr_mask = 0xffff0000,
81 .pvr_value = 0x00400000,
82 .cpu_name = "POWER3 (630)",
83 .cpu_features = CPU_FTRS_POWER3,
84 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
88 .pmc_type = PPC_PMC_IBM,
89 .oprofile_cpu_type = "ppc64/power3",
90 .oprofile_type = PPC_OPROFILE_RS64,
91 .machine_check = machine_check_generic,
95 .pvr_mask = 0xffff0000,
96 .pvr_value = 0x00410000,
97 .cpu_name = "POWER3 (630+)",
98 .cpu_features = CPU_FTRS_POWER3,
99 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
103 .pmc_type = PPC_PMC_IBM,
104 .oprofile_cpu_type = "ppc64/power3",
105 .oprofile_type = PPC_OPROFILE_RS64,
106 .machine_check = machine_check_generic,
107 .platform = "power3",
110 .pvr_mask = 0xffff0000,
111 .pvr_value = 0x00330000,
112 .cpu_name = "RS64-II (northstar)",
113 .cpu_features = CPU_FTRS_RS64,
114 .cpu_user_features = COMMON_USER_PPC64,
118 .pmc_type = PPC_PMC_IBM,
119 .oprofile_cpu_type = "ppc64/rs64",
120 .oprofile_type = PPC_OPROFILE_RS64,
121 .machine_check = machine_check_generic,
125 .pvr_mask = 0xffff0000,
126 .pvr_value = 0x00340000,
127 .cpu_name = "RS64-III (pulsar)",
128 .cpu_features = CPU_FTRS_RS64,
129 .cpu_user_features = COMMON_USER_PPC64,
133 .pmc_type = PPC_PMC_IBM,
134 .oprofile_cpu_type = "ppc64/rs64",
135 .oprofile_type = PPC_OPROFILE_RS64,
136 .machine_check = machine_check_generic,
140 .pvr_mask = 0xffff0000,
141 .pvr_value = 0x00360000,
142 .cpu_name = "RS64-III (icestar)",
143 .cpu_features = CPU_FTRS_RS64,
144 .cpu_user_features = COMMON_USER_PPC64,
148 .pmc_type = PPC_PMC_IBM,
149 .oprofile_cpu_type = "ppc64/rs64",
150 .oprofile_type = PPC_OPROFILE_RS64,
151 .machine_check = machine_check_generic,
155 .pvr_mask = 0xffff0000,
156 .pvr_value = 0x00370000,
157 .cpu_name = "RS64-IV (sstar)",
158 .cpu_features = CPU_FTRS_RS64,
159 .cpu_user_features = COMMON_USER_PPC64,
163 .pmc_type = PPC_PMC_IBM,
164 .oprofile_cpu_type = "ppc64/rs64",
165 .oprofile_type = PPC_OPROFILE_RS64,
166 .machine_check = machine_check_generic,
170 .pvr_mask = 0xffff0000,
171 .pvr_value = 0x00350000,
172 .cpu_name = "POWER4 (gp)",
173 .cpu_features = CPU_FTRS_POWER4,
174 .cpu_user_features = COMMON_USER_POWER4,
178 .pmc_type = PPC_PMC_IBM,
179 .oprofile_cpu_type = "ppc64/power4",
180 .oprofile_type = PPC_OPROFILE_POWER4,
181 .machine_check = machine_check_generic,
182 .platform = "power4",
185 .pvr_mask = 0xffff0000,
186 .pvr_value = 0x00380000,
187 .cpu_name = "POWER4+ (gq)",
188 .cpu_features = CPU_FTRS_POWER4,
189 .cpu_user_features = COMMON_USER_POWER4,
193 .pmc_type = PPC_PMC_IBM,
194 .oprofile_cpu_type = "ppc64/power4",
195 .oprofile_type = PPC_OPROFILE_POWER4,
196 .machine_check = machine_check_generic,
197 .platform = "power4",
200 .pvr_mask = 0xffff0000,
201 .pvr_value = 0x00390000,
202 .cpu_name = "PPC970",
203 .cpu_features = CPU_FTRS_PPC970,
204 .cpu_user_features = COMMON_USER_POWER4 |
205 PPC_FEATURE_HAS_ALTIVEC_COMP,
209 .pmc_type = PPC_PMC_IBM,
210 .cpu_setup = __setup_cpu_ppc970,
211 .cpu_restore = __restore_cpu_ppc970,
212 .oprofile_cpu_type = "ppc64/970",
213 .oprofile_type = PPC_OPROFILE_POWER4,
214 .machine_check = machine_check_generic,
215 .platform = "ppc970",
218 .pvr_mask = 0xffff0000,
219 .pvr_value = 0x003c0000,
220 .cpu_name = "PPC970FX",
221 .cpu_features = CPU_FTRS_PPC970,
222 .cpu_user_features = COMMON_USER_POWER4 |
223 PPC_FEATURE_HAS_ALTIVEC_COMP,
227 .pmc_type = PPC_PMC_IBM,
228 .cpu_setup = __setup_cpu_ppc970,
229 .cpu_restore = __restore_cpu_ppc970,
230 .oprofile_cpu_type = "ppc64/970",
231 .oprofile_type = PPC_OPROFILE_POWER4,
232 .machine_check = machine_check_generic,
233 .platform = "ppc970",
235 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
236 .pvr_mask = 0xffffffff,
237 .pvr_value = 0x00440100,
238 .cpu_name = "PPC970MP",
239 .cpu_features = CPU_FTRS_PPC970,
240 .cpu_user_features = COMMON_USER_POWER4 |
241 PPC_FEATURE_HAS_ALTIVEC_COMP,
245 .pmc_type = PPC_PMC_IBM,
246 .cpu_setup = __setup_cpu_ppc970,
247 .cpu_restore = __restore_cpu_ppc970,
248 .oprofile_cpu_type = "ppc64/970MP",
249 .oprofile_type = PPC_OPROFILE_POWER4,
250 .machine_check = machine_check_generic,
251 .platform = "ppc970",
254 .pvr_mask = 0xffff0000,
255 .pvr_value = 0x00440000,
256 .cpu_name = "PPC970MP",
257 .cpu_features = CPU_FTRS_PPC970,
258 .cpu_user_features = COMMON_USER_POWER4 |
259 PPC_FEATURE_HAS_ALTIVEC_COMP,
263 .pmc_type = PPC_PMC_IBM,
264 .cpu_setup = __setup_cpu_ppc970MP,
265 .cpu_restore = __restore_cpu_ppc970,
266 .oprofile_cpu_type = "ppc64/970MP",
267 .oprofile_type = PPC_OPROFILE_POWER4,
268 .machine_check = machine_check_generic,
269 .platform = "ppc970",
272 .pvr_mask = 0xffff0000,
273 .pvr_value = 0x00450000,
274 .cpu_name = "PPC970GX",
275 .cpu_features = CPU_FTRS_PPC970,
276 .cpu_user_features = COMMON_USER_POWER4 |
277 PPC_FEATURE_HAS_ALTIVEC_COMP,
281 .pmc_type = PPC_PMC_IBM,
282 .cpu_setup = __setup_cpu_ppc970,
283 .oprofile_cpu_type = "ppc64/970",
284 .oprofile_type = PPC_OPROFILE_POWER4,
285 .machine_check = machine_check_generic,
286 .platform = "ppc970",
289 .pvr_mask = 0xffff0000,
290 .pvr_value = 0x003a0000,
291 .cpu_name = "POWER5 (gr)",
292 .cpu_features = CPU_FTRS_POWER5,
293 .cpu_user_features = COMMON_USER_POWER5,
297 .pmc_type = PPC_PMC_IBM,
298 .oprofile_cpu_type = "ppc64/power5",
299 .oprofile_type = PPC_OPROFILE_POWER4,
300 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
301 * and above but only works on POWER5 and above
303 .oprofile_mmcra_sihv = MMCRA_SIHV,
304 .oprofile_mmcra_sipr = MMCRA_SIPR,
305 .machine_check = machine_check_generic,
306 .platform = "power5",
309 .pvr_mask = 0xffffff00,
310 .pvr_value = 0x003b0300,
311 .cpu_name = "POWER5+ (gs)",
312 .cpu_features = CPU_FTRS_POWER5,
313 .cpu_user_features = COMMON_USER_POWER5_PLUS,
317 .oprofile_cpu_type = "ppc64/power5++",
318 .oprofile_type = PPC_OPROFILE_POWER4,
319 .oprofile_mmcra_sihv = MMCRA_SIHV,
320 .oprofile_mmcra_sipr = MMCRA_SIPR,
321 .machine_check = machine_check_generic,
322 .platform = "power5+",
325 .pvr_mask = 0xffff0000,
326 .pvr_value = 0x003b0000,
327 .cpu_name = "POWER5+ (gs)",
328 .cpu_features = CPU_FTRS_POWER5,
329 .cpu_user_features = COMMON_USER_POWER5_PLUS,
333 .pmc_type = PPC_PMC_IBM,
334 .oprofile_cpu_type = "ppc64/power5+",
335 .oprofile_type = PPC_OPROFILE_POWER4,
336 .oprofile_mmcra_sihv = MMCRA_SIHV,
337 .oprofile_mmcra_sipr = MMCRA_SIPR,
338 .machine_check = machine_check_generic,
339 .platform = "power5+",
341 { /* POWER6 in P5+ mode; 2.04-compliant processor */
342 .pvr_mask = 0xffffffff,
343 .pvr_value = 0x0f000001,
344 .cpu_name = "POWER5+",
345 .cpu_features = CPU_FTRS_POWER5,
346 .cpu_user_features = COMMON_USER_POWER5_PLUS,
349 .machine_check = machine_check_generic,
350 .platform = "power5+",
353 .pvr_mask = 0xffff0000,
354 .pvr_value = 0x003e0000,
355 .cpu_name = "POWER6 (raw)",
356 .cpu_features = CPU_FTRS_POWER6,
357 .cpu_user_features = COMMON_USER_POWER6 |
358 PPC_FEATURE_POWER6_EXT,
362 .pmc_type = PPC_PMC_IBM,
363 .oprofile_cpu_type = "ppc64/power6",
364 .oprofile_type = PPC_OPROFILE_POWER4,
365 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
366 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
367 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
369 .machine_check = machine_check_generic,
370 .platform = "power6x",
372 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
373 .pvr_mask = 0xffffffff,
374 .pvr_value = 0x0f000002,
375 .cpu_name = "POWER6 (architected)",
376 .cpu_features = CPU_FTRS_POWER6,
377 .cpu_user_features = COMMON_USER_POWER6,
380 .machine_check = machine_check_generic,
381 .platform = "power6",
383 { /* Cell Broadband Engine */
384 .pvr_mask = 0xffff0000,
385 .pvr_value = 0x00700000,
386 .cpu_name = "Cell Broadband Engine",
387 .cpu_features = CPU_FTRS_CELL,
388 .cpu_user_features = COMMON_USER_PPC64 |
389 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
394 .pmc_type = PPC_PMC_IBM,
395 .oprofile_cpu_type = "ppc64/cell-be",
396 .oprofile_type = PPC_OPROFILE_CELL,
397 .machine_check = machine_check_generic,
398 .platform = "ppc-cell-be",
401 .pvr_mask = 0x7fff0000,
402 .pvr_value = 0x00900000,
404 .cpu_features = CPU_FTRS_PA6T,
405 .cpu_user_features = COMMON_USER_PA6T,
409 .pmc_type = PPC_PMC_PA6T,
410 .cpu_setup = __setup_cpu_pa6t,
411 .cpu_restore = __restore_cpu_pa6t,
412 .oprofile_cpu_type = "ppc64/pa6t",
413 .oprofile_type = PPC_OPROFILE_PA6T,
414 .machine_check = machine_check_generic,
417 { /* default match */
418 .pvr_mask = 0x00000000,
419 .pvr_value = 0x00000000,
420 .cpu_name = "POWER4 (compatible)",
421 .cpu_features = CPU_FTRS_COMPATIBLE,
422 .cpu_user_features = COMMON_USER_PPC64,
426 .pmc_type = PPC_PMC_IBM,
427 .machine_check = machine_check_generic,
428 .platform = "power4",
430 #endif /* CONFIG_PPC64 */
434 .pvr_mask = 0xffff0000,
435 .pvr_value = 0x00010000,
437 .cpu_features = CPU_FTRS_PPC601,
438 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
439 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
442 .machine_check = machine_check_generic,
443 .platform = "ppc601",
446 .pvr_mask = 0xffff0000,
447 .pvr_value = 0x00030000,
449 .cpu_features = CPU_FTRS_603,
450 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
453 .cpu_setup = __setup_cpu_603,
454 .machine_check = machine_check_generic,
455 .platform = "ppc603",
458 .pvr_mask = 0xffff0000,
459 .pvr_value = 0x00060000,
461 .cpu_features = CPU_FTRS_603,
462 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
465 .cpu_setup = __setup_cpu_603,
466 .machine_check = machine_check_generic,
467 .platform = "ppc603",
470 .pvr_mask = 0xffff0000,
471 .pvr_value = 0x00070000,
473 .cpu_features = CPU_FTRS_603,
474 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
477 .cpu_setup = __setup_cpu_603,
478 .machine_check = machine_check_generic,
479 .platform = "ppc603",
482 .pvr_mask = 0xffff0000,
483 .pvr_value = 0x00040000,
485 .cpu_features = CPU_FTRS_604,
486 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
490 .cpu_setup = __setup_cpu_604,
491 .machine_check = machine_check_generic,
492 .platform = "ppc604",
495 .pvr_mask = 0xfffff000,
496 .pvr_value = 0x00090000,
498 .cpu_features = CPU_FTRS_604,
499 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
503 .cpu_setup = __setup_cpu_604,
504 .machine_check = machine_check_generic,
505 .platform = "ppc604",
508 .pvr_mask = 0xffff0000,
509 .pvr_value = 0x00090000,
511 .cpu_features = CPU_FTRS_604,
512 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
516 .cpu_setup = __setup_cpu_604,
517 .machine_check = machine_check_generic,
518 .platform = "ppc604",
521 .pvr_mask = 0xffff0000,
522 .pvr_value = 0x000a0000,
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",
533 { /* 740/750 (0x4202, don't support TAU ?) */
534 .pvr_mask = 0xffffffff,
535 .pvr_value = 0x00084202,
536 .cpu_name = "740/750",
537 .cpu_features = CPU_FTRS_740_NOTAU,
538 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
542 .cpu_setup = __setup_cpu_750,
543 .machine_check = machine_check_generic,
544 .platform = "ppc750",
546 { /* 750CX (80100 and 8010x?) */
547 .pvr_mask = 0xfffffff0,
548 .pvr_value = 0x00080100,
550 .cpu_features = CPU_FTRS_750,
551 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
555 .cpu_setup = __setup_cpu_750cx,
556 .machine_check = machine_check_generic,
557 .platform = "ppc750",
559 { /* 750CX (82201 and 82202) */
560 .pvr_mask = 0xfffffff0,
561 .pvr_value = 0x00082200,
563 .cpu_features = CPU_FTRS_750,
564 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
568 .cpu_setup = __setup_cpu_750cx,
569 .machine_check = machine_check_generic,
570 .platform = "ppc750",
572 { /* 750CXe (82214) */
573 .pvr_mask = 0xfffffff0,
574 .pvr_value = 0x00082210,
575 .cpu_name = "750CXe",
576 .cpu_features = CPU_FTRS_750,
577 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
581 .cpu_setup = __setup_cpu_750cx,
582 .machine_check = machine_check_generic,
583 .platform = "ppc750",
585 { /* 750CXe "Gekko" (83214) */
586 .pvr_mask = 0xffffffff,
587 .pvr_value = 0x00083214,
588 .cpu_name = "750CXe",
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",
599 .pvr_mask = 0xfffff0f0,
600 .pvr_value = 0x00087010,
602 .cpu_features = CPU_FTRS_750CL,
603 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
607 .cpu_setup = __setup_cpu_750,
608 .machine_check = machine_check_generic,
609 .platform = "ppc750",
612 .pvr_mask = 0xfffff000,
613 .pvr_value = 0x00083000,
614 .cpu_name = "745/755",
615 .cpu_features = CPU_FTRS_750,
616 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
620 .cpu_setup = __setup_cpu_750,
621 .machine_check = machine_check_generic,
622 .platform = "ppc750",
624 { /* 750FX rev 1.x */
625 .pvr_mask = 0xffffff00,
626 .pvr_value = 0x70000100,
628 .cpu_features = CPU_FTRS_750FX1,
629 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
633 .cpu_setup = __setup_cpu_750,
634 .machine_check = machine_check_generic,
635 .platform = "ppc750",
637 { /* 750FX rev 2.0 must disable HID0[DPM] */
638 .pvr_mask = 0xffffffff,
639 .pvr_value = 0x70000200,
641 .cpu_features = CPU_FTRS_750FX2,
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",
650 { /* 750FX (All revs except 2.0) */
651 .pvr_mask = 0xffff0000,
652 .pvr_value = 0x70000000,
654 .cpu_features = CPU_FTRS_750FX,
655 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
659 .cpu_setup = __setup_cpu_750fx,
660 .machine_check = machine_check_generic,
661 .platform = "ppc750",
664 .pvr_mask = 0xffff0000,
665 .pvr_value = 0x70020000,
667 .cpu_features = CPU_FTRS_750GX,
668 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
672 .cpu_setup = __setup_cpu_750fx,
673 .machine_check = machine_check_generic,
674 .platform = "ppc750",
676 { /* 740/750 (L2CR bit need fixup for 740) */
677 .pvr_mask = 0xffff0000,
678 .pvr_value = 0x00080000,
679 .cpu_name = "740/750",
680 .cpu_features = CPU_FTRS_740,
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 { /* 7400 rev 1.1 ? (no TAU) */
690 .pvr_mask = 0xffffffff,
691 .pvr_value = 0x000c1101,
692 .cpu_name = "7400 (1.1)",
693 .cpu_features = CPU_FTRS_7400_NOTAU,
694 .cpu_user_features = COMMON_USER |
695 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
699 .cpu_setup = __setup_cpu_7400,
700 .machine_check = machine_check_generic,
701 .platform = "ppc7400",
704 .pvr_mask = 0xffff0000,
705 .pvr_value = 0x000c0000,
707 .cpu_features = CPU_FTRS_7400,
708 .cpu_user_features = COMMON_USER |
709 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
713 .cpu_setup = __setup_cpu_7400,
714 .machine_check = machine_check_generic,
715 .platform = "ppc7400",
718 .pvr_mask = 0xffff0000,
719 .pvr_value = 0x800c0000,
721 .cpu_features = CPU_FTRS_7400,
722 .cpu_user_features = COMMON_USER |
723 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
727 .cpu_setup = __setup_cpu_7410,
728 .machine_check = machine_check_generic,
729 .platform = "ppc7400",
731 { /* 7450 2.0 - no doze/nap */
732 .pvr_mask = 0xffffffff,
733 .pvr_value = 0x80000200,
735 .cpu_features = CPU_FTRS_7450_20,
736 .cpu_user_features = COMMON_USER |
737 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
741 .cpu_setup = __setup_cpu_745x,
742 .oprofile_cpu_type = "ppc/7450",
743 .oprofile_type = PPC_OPROFILE_G4,
744 .machine_check = machine_check_generic,
745 .platform = "ppc7450",
748 .pvr_mask = 0xffffffff,
749 .pvr_value = 0x80000201,
751 .cpu_features = CPU_FTRS_7450_21,
752 .cpu_user_features = COMMON_USER |
753 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
757 .cpu_setup = __setup_cpu_745x,
758 .oprofile_cpu_type = "ppc/7450",
759 .oprofile_type = PPC_OPROFILE_G4,
760 .machine_check = machine_check_generic,
761 .platform = "ppc7450",
763 { /* 7450 2.3 and newer */
764 .pvr_mask = 0xffff0000,
765 .pvr_value = 0x80000000,
767 .cpu_features = CPU_FTRS_7450_23,
768 .cpu_user_features = COMMON_USER |
769 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
773 .cpu_setup = __setup_cpu_745x,
774 .oprofile_cpu_type = "ppc/7450",
775 .oprofile_type = PPC_OPROFILE_G4,
776 .machine_check = machine_check_generic,
777 .platform = "ppc7450",
780 .pvr_mask = 0xffffff00,
781 .pvr_value = 0x80010100,
783 .cpu_features = CPU_FTRS_7455_1,
784 .cpu_user_features = COMMON_USER |
785 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
789 .cpu_setup = __setup_cpu_745x,
790 .oprofile_cpu_type = "ppc/7450",
791 .oprofile_type = PPC_OPROFILE_G4,
792 .machine_check = machine_check_generic,
793 .platform = "ppc7450",
796 .pvr_mask = 0xffffffff,
797 .pvr_value = 0x80010200,
799 .cpu_features = CPU_FTRS_7455_20,
800 .cpu_user_features = COMMON_USER |
801 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
805 .cpu_setup = __setup_cpu_745x,
806 .oprofile_cpu_type = "ppc/7450",
807 .oprofile_type = PPC_OPROFILE_G4,
808 .machine_check = machine_check_generic,
809 .platform = "ppc7450",
812 .pvr_mask = 0xffff0000,
813 .pvr_value = 0x80010000,
815 .cpu_features = CPU_FTRS_7455,
816 .cpu_user_features = COMMON_USER |
817 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
821 .cpu_setup = __setup_cpu_745x,
822 .oprofile_cpu_type = "ppc/7450",
823 .oprofile_type = PPC_OPROFILE_G4,
824 .machine_check = machine_check_generic,
825 .platform = "ppc7450",
827 { /* 7447/7457 Rev 1.0 */
828 .pvr_mask = 0xffffffff,
829 .pvr_value = 0x80020100,
830 .cpu_name = "7447/7457",
831 .cpu_features = CPU_FTRS_7447_10,
832 .cpu_user_features = COMMON_USER |
833 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
837 .cpu_setup = __setup_cpu_745x,
838 .oprofile_cpu_type = "ppc/7450",
839 .oprofile_type = PPC_OPROFILE_G4,
840 .machine_check = machine_check_generic,
841 .platform = "ppc7450",
843 { /* 7447/7457 Rev 1.1 */
844 .pvr_mask = 0xffffffff,
845 .pvr_value = 0x80020101,
846 .cpu_name = "7447/7457",
847 .cpu_features = CPU_FTRS_7447_10,
848 .cpu_user_features = COMMON_USER |
849 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
853 .cpu_setup = __setup_cpu_745x,
854 .oprofile_cpu_type = "ppc/7450",
855 .oprofile_type = PPC_OPROFILE_G4,
856 .machine_check = machine_check_generic,
857 .platform = "ppc7450",
859 { /* 7447/7457 Rev 1.2 and later */
860 .pvr_mask = 0xffff0000,
861 .pvr_value = 0x80020000,
862 .cpu_name = "7447/7457",
863 .cpu_features = CPU_FTRS_7447,
864 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
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 = 0x80030000,
878 .cpu_features = CPU_FTRS_7447A,
879 .cpu_user_features = COMMON_USER |
880 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
884 .cpu_setup = __setup_cpu_745x,
885 .oprofile_cpu_type = "ppc/7450",
886 .oprofile_type = PPC_OPROFILE_G4,
887 .machine_check = machine_check_generic,
888 .platform = "ppc7450",
891 .pvr_mask = 0xffff0000,
892 .pvr_value = 0x80040000,
894 .cpu_features = CPU_FTRS_7448,
895 .cpu_user_features = COMMON_USER |
896 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
900 .cpu_setup = __setup_cpu_745x,
901 .oprofile_cpu_type = "ppc/7450",
902 .oprofile_type = PPC_OPROFILE_G4,
903 .machine_check = machine_check_generic,
904 .platform = "ppc7450",
906 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
907 .pvr_mask = 0x7fff0000,
908 .pvr_value = 0x00810000,
910 .cpu_features = CPU_FTRS_82XX,
911 .cpu_user_features = COMMON_USER,
914 .cpu_setup = __setup_cpu_603,
915 .machine_check = machine_check_generic,
916 .platform = "ppc603",
918 { /* All G2_LE (603e core, plus some) have the same pvr */
919 .pvr_mask = 0x7fff0000,
920 .pvr_value = 0x00820000,
922 .cpu_features = CPU_FTRS_G2_LE,
923 .cpu_user_features = COMMON_USER,
926 .cpu_setup = __setup_cpu_603,
927 .machine_check = machine_check_generic,
928 .platform = "ppc603",
930 { /* e300c1 (a 603e core, plus some) on 83xx */
931 .pvr_mask = 0x7fff0000,
932 .pvr_value = 0x00830000,
933 .cpu_name = "e300c1",
934 .cpu_features = CPU_FTRS_E300,
935 .cpu_user_features = COMMON_USER,
938 .cpu_setup = __setup_cpu_603,
939 .machine_check = machine_check_generic,
940 .platform = "ppc603",
942 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
943 .pvr_mask = 0x7fff0000,
944 .pvr_value = 0x00840000,
945 .cpu_name = "e300c2",
946 .cpu_features = CPU_FTRS_E300C2,
947 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
950 .cpu_setup = __setup_cpu_603,
951 .machine_check = machine_check_generic,
952 .platform = "ppc603",
954 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
955 .pvr_mask = 0x7fff0000,
956 .pvr_value = 0x00850000,
957 .cpu_name = "e300c3",
958 .cpu_features = CPU_FTRS_E300,
959 .cpu_user_features = COMMON_USER,
962 .cpu_setup = __setup_cpu_603,
964 .oprofile_cpu_type = "ppc/e300",
965 .oprofile_type = PPC_OPROFILE_FSL_EMB,
966 .platform = "ppc603",
968 { /* e300c4 (e300c1, plus one IU) */
969 .pvr_mask = 0x7fff0000,
970 .pvr_value = 0x00860000,
971 .cpu_name = "e300c4",
972 .cpu_features = CPU_FTRS_E300,
973 .cpu_user_features = COMMON_USER,
976 .cpu_setup = __setup_cpu_603,
977 .machine_check = machine_check_generic,
979 .oprofile_cpu_type = "ppc/e300",
980 .oprofile_type = PPC_OPROFILE_FSL_EMB,
981 .platform = "ppc603",
983 { /* default match, we assume split I/D cache & TB (non-601)... */
984 .pvr_mask = 0x00000000,
985 .pvr_value = 0x00000000,
986 .cpu_name = "(generic PPC)",
987 .cpu_features = CPU_FTRS_CLASSIC32,
988 .cpu_user_features = COMMON_USER,
991 .machine_check = machine_check_generic,
992 .platform = "ppc603",
994 #endif /* CLASSIC_PPC */
997 .pvr_mask = 0xffff0000,
998 .pvr_value = 0x00500000,
1000 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1001 * if the 8xx code is there.... */
1002 .cpu_features = CPU_FTRS_8XX,
1003 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1006 .platform = "ppc823",
1008 #endif /* CONFIG_8xx */
1011 .pvr_mask = 0xffffff00,
1012 .pvr_value = 0x00200200,
1013 .cpu_name = "403GC",
1014 .cpu_features = CPU_FTRS_40X,
1015 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1018 .machine_check = machine_check_4xx,
1019 .platform = "ppc403",
1022 .pvr_mask = 0xffffff00,
1023 .pvr_value = 0x00201400,
1024 .cpu_name = "403GCX",
1025 .cpu_features = CPU_FTRS_40X,
1026 .cpu_user_features = PPC_FEATURE_32 |
1027 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
1030 .machine_check = machine_check_4xx,
1031 .platform = "ppc403",
1034 .pvr_mask = 0xffff0000,
1035 .pvr_value = 0x00200000,
1036 .cpu_name = "403G ??",
1037 .cpu_features = CPU_FTRS_40X,
1038 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1041 .machine_check = machine_check_4xx,
1042 .platform = "ppc403",
1045 .pvr_mask = 0xffff0000,
1046 .pvr_value = 0x40110000,
1047 .cpu_name = "405GP",
1048 .cpu_features = CPU_FTRS_40X,
1049 .cpu_user_features = PPC_FEATURE_32 |
1050 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1053 .machine_check = machine_check_4xx,
1054 .platform = "ppc405",
1057 .pvr_mask = 0xffff0000,
1058 .pvr_value = 0x40130000,
1059 .cpu_name = "STB03xxx",
1060 .cpu_features = CPU_FTRS_40X,
1061 .cpu_user_features = PPC_FEATURE_32 |
1062 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1065 .machine_check = machine_check_4xx,
1066 .platform = "ppc405",
1069 .pvr_mask = 0xffff0000,
1070 .pvr_value = 0x41810000,
1071 .cpu_name = "STB04xxx",
1072 .cpu_features = CPU_FTRS_40X,
1073 .cpu_user_features = PPC_FEATURE_32 |
1074 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1077 .machine_check = machine_check_4xx,
1078 .platform = "ppc405",
1081 .pvr_mask = 0xffff0000,
1082 .pvr_value = 0x41610000,
1083 .cpu_name = "NP405L",
1084 .cpu_features = CPU_FTRS_40X,
1085 .cpu_user_features = PPC_FEATURE_32 |
1086 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1089 .machine_check = machine_check_4xx,
1090 .platform = "ppc405",
1093 .pvr_mask = 0xffff0000,
1094 .pvr_value = 0x40B10000,
1095 .cpu_name = "NP4GS3",
1096 .cpu_features = CPU_FTRS_40X,
1097 .cpu_user_features = PPC_FEATURE_32 |
1098 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1101 .machine_check = machine_check_4xx,
1102 .platform = "ppc405",
1105 .pvr_mask = 0xffff0000,
1106 .pvr_value = 0x41410000,
1107 .cpu_name = "NP405H",
1108 .cpu_features = CPU_FTRS_40X,
1109 .cpu_user_features = PPC_FEATURE_32 |
1110 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1113 .machine_check = machine_check_4xx,
1114 .platform = "ppc405",
1117 .pvr_mask = 0xffff0000,
1118 .pvr_value = 0x50910000,
1119 .cpu_name = "405GPr",
1120 .cpu_features = CPU_FTRS_40X,
1121 .cpu_user_features = PPC_FEATURE_32 |
1122 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1125 .machine_check = machine_check_4xx,
1126 .platform = "ppc405",
1129 .pvr_mask = 0xffff0000,
1130 .pvr_value = 0x51510000,
1131 .cpu_name = "STBx25xx",
1132 .cpu_features = CPU_FTRS_40X,
1133 .cpu_user_features = PPC_FEATURE_32 |
1134 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1137 .machine_check = machine_check_4xx,
1138 .platform = "ppc405",
1141 .pvr_mask = 0xffff0000,
1142 .pvr_value = 0x41F10000,
1143 .cpu_name = "405LP",
1144 .cpu_features = CPU_FTRS_40X,
1145 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1148 .machine_check = machine_check_4xx,
1149 .platform = "ppc405",
1151 { /* Xilinx Virtex-II Pro */
1152 .pvr_mask = 0xfffff000,
1153 .pvr_value = 0x20010000,
1154 .cpu_name = "Virtex-II Pro",
1155 .cpu_features = CPU_FTRS_40X,
1156 .cpu_user_features = PPC_FEATURE_32 |
1157 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1160 .machine_check = machine_check_4xx,
1161 .platform = "ppc405",
1163 { /* Xilinx Virtex-4 FX */
1164 .pvr_mask = 0xfffff000,
1165 .pvr_value = 0x20011000,
1166 .cpu_name = "Virtex-4 FX",
1167 .cpu_features = CPU_FTRS_40X,
1168 .cpu_user_features = PPC_FEATURE_32 |
1169 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1172 .machine_check = machine_check_4xx,
1173 .platform = "ppc405",
1176 .pvr_mask = 0xffff0000,
1177 .pvr_value = 0x51210000,
1178 .cpu_name = "405EP",
1179 .cpu_features = CPU_FTRS_40X,
1180 .cpu_user_features = PPC_FEATURE_32 |
1181 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1184 .machine_check = machine_check_4xx,
1185 .platform = "ppc405",
1188 .pvr_mask = 0xffff0004,
1189 .pvr_value = 0x12910004,
1190 .cpu_name = "405EX",
1191 .cpu_features = CPU_FTRS_40X,
1192 .cpu_user_features = PPC_FEATURE_32 |
1193 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1196 .machine_check = machine_check_4xx,
1197 .platform = "ppc405",
1200 .pvr_mask = 0xffff0004,
1201 .pvr_value = 0x12910000,
1202 .cpu_name = "405EXr",
1203 .cpu_features = CPU_FTRS_40X,
1204 .cpu_user_features = PPC_FEATURE_32 |
1205 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1208 .machine_check = machine_check_4xx,
1209 .platform = "ppc405",
1211 { /* default match */
1212 .pvr_mask = 0x00000000,
1213 .pvr_value = 0x00000000,
1214 .cpu_name = "(generic 40x PPC)",
1215 .cpu_features = CPU_FTRS_40X,
1216 .cpu_user_features = PPC_FEATURE_32 |
1217 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1220 .machine_check = machine_check_4xx,
1221 .platform = "ppc405",
1224 #endif /* CONFIG_40x */
1227 .pvr_mask = 0xf0000fff,
1228 .pvr_value = 0x40000850,
1229 .cpu_name = "440GR Rev. A",
1230 .cpu_features = CPU_FTRS_44X,
1231 .cpu_user_features = COMMON_USER_BOOKE,
1234 .machine_check = machine_check_4xx,
1235 .platform = "ppc440",
1237 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1238 .pvr_mask = 0xf0000fff,
1239 .pvr_value = 0x40000858,
1240 .cpu_name = "440EP Rev. A",
1241 .cpu_features = CPU_FTRS_44X,
1242 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1245 .cpu_setup = __setup_cpu_440ep,
1246 .machine_check = machine_check_4xx,
1247 .platform = "ppc440",
1250 .pvr_mask = 0xf0000fff,
1251 .pvr_value = 0x400008d3,
1252 .cpu_name = "440GR Rev. B",
1253 .cpu_features = CPU_FTRS_44X,
1254 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1257 .machine_check = machine_check_4xx,
1258 .platform = "ppc440",
1260 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1261 .pvr_mask = 0xf0000ff7,
1262 .pvr_value = 0x400008d4,
1263 .cpu_name = "440EP Rev. C",
1264 .cpu_features = CPU_FTRS_44X,
1265 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1268 .cpu_setup = __setup_cpu_440ep,
1269 .machine_check = machine_check_4xx,
1270 .platform = "ppc440",
1272 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1273 .pvr_mask = 0xf0000fff,
1274 .pvr_value = 0x400008db,
1275 .cpu_name = "440EP Rev. B",
1276 .cpu_features = CPU_FTRS_44X,
1277 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1280 .cpu_setup = __setup_cpu_440ep,
1281 .machine_check = machine_check_4xx,
1282 .platform = "ppc440",
1285 .pvr_mask = 0xf0000ffb,
1286 .pvr_value = 0x200008D0,
1287 .cpu_name = "440GRX",
1288 .cpu_features = CPU_FTRS_44X,
1289 .cpu_user_features = COMMON_USER_BOOKE,
1292 .cpu_setup = __setup_cpu_440grx,
1293 .machine_check = machine_check_440A,
1294 .platform = "ppc440",
1296 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1297 .pvr_mask = 0xf0000ffb,
1298 .pvr_value = 0x200008D8,
1299 .cpu_name = "440EPX",
1300 .cpu_features = CPU_FTRS_44X,
1301 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1304 .cpu_setup = __setup_cpu_440epx,
1305 .machine_check = machine_check_440A,
1306 .platform = "ppc440",
1308 { /* 440GP Rev. B */
1309 .pvr_mask = 0xf0000fff,
1310 .pvr_value = 0x40000440,
1311 .cpu_name = "440GP Rev. B",
1312 .cpu_features = CPU_FTRS_44X,
1313 .cpu_user_features = COMMON_USER_BOOKE,
1316 .machine_check = machine_check_4xx,
1317 .platform = "ppc440gp",
1319 { /* 440GP Rev. C */
1320 .pvr_mask = 0xf0000fff,
1321 .pvr_value = 0x40000481,
1322 .cpu_name = "440GP Rev. C",
1323 .cpu_features = CPU_FTRS_44X,
1324 .cpu_user_features = COMMON_USER_BOOKE,
1327 .machine_check = machine_check_4xx,
1328 .platform = "ppc440gp",
1330 { /* 440GX Rev. A */
1331 .pvr_mask = 0xf0000fff,
1332 .pvr_value = 0x50000850,
1333 .cpu_name = "440GX Rev. A",
1334 .cpu_features = CPU_FTRS_44X,
1335 .cpu_user_features = COMMON_USER_BOOKE,
1338 .cpu_setup = __setup_cpu_440gx,
1339 .machine_check = machine_check_440A,
1340 .platform = "ppc440",
1342 { /* 440GX Rev. B */
1343 .pvr_mask = 0xf0000fff,
1344 .pvr_value = 0x50000851,
1345 .cpu_name = "440GX Rev. B",
1346 .cpu_features = CPU_FTRS_44X,
1347 .cpu_user_features = COMMON_USER_BOOKE,
1350 .cpu_setup = __setup_cpu_440gx,
1351 .machine_check = machine_check_440A,
1352 .platform = "ppc440",
1354 { /* 440GX Rev. C */
1355 .pvr_mask = 0xf0000fff,
1356 .pvr_value = 0x50000892,
1357 .cpu_name = "440GX Rev. C",
1358 .cpu_features = CPU_FTRS_44X,
1359 .cpu_user_features = COMMON_USER_BOOKE,
1362 .cpu_setup = __setup_cpu_440gx,
1363 .machine_check = machine_check_440A,
1364 .platform = "ppc440",
1366 { /* 440GX Rev. F */
1367 .pvr_mask = 0xf0000fff,
1368 .pvr_value = 0x50000894,
1369 .cpu_name = "440GX Rev. F",
1370 .cpu_features = CPU_FTRS_44X,
1371 .cpu_user_features = COMMON_USER_BOOKE,
1374 .cpu_setup = __setup_cpu_440gx,
1375 .machine_check = machine_check_440A,
1376 .platform = "ppc440",
1378 { /* 440SP Rev. A */
1379 .pvr_mask = 0xfff00fff,
1380 .pvr_value = 0x53200891,
1381 .cpu_name = "440SP Rev. A",
1382 .cpu_features = CPU_FTRS_44X,
1383 .cpu_user_features = COMMON_USER_BOOKE,
1386 .machine_check = machine_check_4xx,
1387 .platform = "ppc440",
1389 { /* 440SPe Rev. A */
1390 .pvr_mask = 0xfff00fff,
1391 .pvr_value = 0x53400890,
1392 .cpu_name = "440SPe Rev. A",
1393 .cpu_features = CPU_FTRS_44X,
1394 .cpu_user_features = COMMON_USER_BOOKE,
1397 .cpu_setup = __setup_cpu_440spe,
1398 .machine_check = machine_check_440A,
1399 .platform = "ppc440",
1401 { /* 440SPe Rev. B */
1402 .pvr_mask = 0xfff00fff,
1403 .pvr_value = 0x53400891,
1404 .cpu_name = "440SPe Rev. B",
1405 .cpu_features = CPU_FTRS_44X,
1406 .cpu_user_features = COMMON_USER_BOOKE,
1409 .cpu_setup = __setup_cpu_440spe,
1410 .machine_check = machine_check_440A,
1411 .platform = "ppc440",
1414 .pvr_mask = 0xffff0002,
1415 .pvr_value = 0x13020002,
1416 .cpu_name = "460EX",
1417 .cpu_features = CPU_FTRS_44X,
1418 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1421 .cpu_setup = __setup_cpu_460ex,
1422 .machine_check = machine_check_440A,
1423 .platform = "ppc440",
1426 .pvr_mask = 0xffff0002,
1427 .pvr_value = 0x13020000,
1428 .cpu_name = "460GT",
1429 .cpu_features = CPU_FTRS_44X,
1430 .cpu_user_features = COMMON_USER_BOOKE,
1433 .machine_check = machine_check_440A,
1434 .platform = "ppc440",
1436 { /* default match */
1437 .pvr_mask = 0x00000000,
1438 .pvr_value = 0x00000000,
1439 .cpu_name = "(generic 44x PPC)",
1440 .cpu_features = CPU_FTRS_44X,
1441 .cpu_user_features = COMMON_USER_BOOKE,
1444 .machine_check = machine_check_4xx,
1445 .platform = "ppc440",
1447 #endif /* CONFIG_44x */
1450 .pvr_mask = 0xfff00000,
1451 .pvr_value = 0x81000000,
1452 .cpu_name = "e200z5",
1453 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1454 .cpu_features = CPU_FTRS_E200,
1455 .cpu_user_features = COMMON_USER_BOOKE |
1456 PPC_FEATURE_HAS_EFP_SINGLE |
1457 PPC_FEATURE_UNIFIED_CACHE,
1459 .machine_check = machine_check_e200,
1460 .platform = "ppc5554",
1463 .pvr_mask = 0xfff00000,
1464 .pvr_value = 0x81100000,
1465 .cpu_name = "e200z6",
1466 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1467 .cpu_features = CPU_FTRS_E200,
1468 .cpu_user_features = COMMON_USER_BOOKE |
1469 PPC_FEATURE_HAS_SPE_COMP |
1470 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1471 PPC_FEATURE_UNIFIED_CACHE,
1473 .machine_check = machine_check_e200,
1474 .platform = "ppc5554",
1476 { /* default match */
1477 .pvr_mask = 0x00000000,
1478 .pvr_value = 0x00000000,
1479 .cpu_name = "(generic E200 PPC)",
1480 .cpu_features = CPU_FTRS_E200,
1481 .cpu_user_features = COMMON_USER_BOOKE |
1482 PPC_FEATURE_HAS_EFP_SINGLE |
1483 PPC_FEATURE_UNIFIED_CACHE,
1485 .machine_check = machine_check_e200,
1486 .platform = "ppc5554",
1488 #endif /* CONFIG_E200 */
1491 .pvr_mask = 0xffff0000,
1492 .pvr_value = 0x80200000,
1494 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1495 .cpu_features = CPU_FTRS_E500,
1496 .cpu_user_features = COMMON_USER_BOOKE |
1497 PPC_FEATURE_HAS_SPE_COMP |
1498 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
1502 .oprofile_cpu_type = "ppc/e500",
1503 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1504 .machine_check = machine_check_e500,
1505 .platform = "ppc8540",
1508 .pvr_mask = 0xffff0000,
1509 .pvr_value = 0x80210000,
1510 .cpu_name = "e500v2",
1511 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1512 .cpu_features = CPU_FTRS_E500_2,
1513 .cpu_user_features = COMMON_USER_BOOKE |
1514 PPC_FEATURE_HAS_SPE_COMP |
1515 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1516 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
1520 .oprofile_cpu_type = "ppc/e500",
1521 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1522 .machine_check = machine_check_e500,
1523 .platform = "ppc8548",
1525 { /* default match */
1526 .pvr_mask = 0x00000000,
1527 .pvr_value = 0x00000000,
1528 .cpu_name = "(generic E500 PPC)",
1529 .cpu_features = CPU_FTRS_E500,
1530 .cpu_user_features = COMMON_USER_BOOKE |
1531 PPC_FEATURE_HAS_SPE_COMP |
1532 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
1535 .machine_check = machine_check_e500,
1536 .platform = "powerpc",
1538 #endif /* CONFIG_E500 */
1539 #endif /* CONFIG_PPC32 */
1542 static struct cpu_spec the_cpu_spec;
1544 struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
1546 struct cpu_spec *s = cpu_specs;
1547 struct cpu_spec *t = &the_cpu_spec;
1553 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
1554 if ((pvr & s->pvr_mask) == s->pvr_value) {
1556 * If we are overriding a previous value derived
1557 * from the real PVR with a new value obtained
1558 * using a logical PVR value, don't modify the
1559 * performance monitor fields.
1561 if (t->num_pmcs && !s->num_pmcs) {
1562 t->cpu_name = s->cpu_name;
1563 t->cpu_features = s->cpu_features;
1564 t->cpu_user_features = s->cpu_user_features;
1565 t->icache_bsize = s->icache_bsize;
1566 t->dcache_bsize = s->dcache_bsize;
1567 t->cpu_setup = s->cpu_setup;
1568 t->cpu_restore = s->cpu_restore;
1569 t->platform = s->platform;
1572 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
1573 #if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
1574 /* ppc64 and booke expect identify_cpu to also call
1575 * setup_cpu for that processor. I will consolidate
1576 * that at a later time, for now, just use #ifdef.
1577 * we also don't need to PTRRELOC the function pointer
1578 * on ppc64 and booke as we are running at 0 in real
1579 * mode on ppc64 and reloc_offset is always 0 on booke.
1582 s->cpu_setup(offset, s);
1584 #endif /* CONFIG_PPC64 || CONFIG_BOOKE */
1591 void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)
1593 struct fixup_entry {
1595 unsigned long value;
1603 for (; fcur < fend; fcur++) {
1604 unsigned int *pstart, *pend, *p;
1606 if ((value & fcur->mask) == fcur->value)
1609 /* These PTRRELOCs will disappear once the new scheme for
1610 * modules and vdso is implemented
1612 pstart = ((unsigned int *)fcur) + (fcur->start_off / 4);
1613 pend = ((unsigned int *)fcur) + (fcur->end_off / 4);
1615 for (p = pstart; p < pend; p++) {
1617 asm volatile ("dcbst 0, %0" : : "r" (p));
1619 asm volatile ("sync" : : : "memory");
1620 for (p = pstart; p < pend; p++)
1621 asm volatile ("icbi 0,%0" : : "r" (p));
1622 asm volatile ("sync; isync" : : : "memory");