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 #endif /* CONFIG_PPC64 */
58 /* This table only contains "desktop" CPUs, it need to be filled with embedded
61 #define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
63 #define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
64 #define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
65 #define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
66 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
67 #define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
68 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
69 #define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
70 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
72 #define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
73 PPC_FEATURE_TRUE_LE | \
74 PPC_FEATURE_HAS_ALTIVEC_COMP)
75 #define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
78 static struct cpu_spec __initdata cpu_specs[] = {
81 .pvr_mask = 0xffff0000,
82 .pvr_value = 0x00400000,
83 .cpu_name = "POWER3 (630)",
84 .cpu_features = CPU_FTRS_POWER3,
85 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
89 .pmc_type = PPC_PMC_IBM,
90 .oprofile_cpu_type = "ppc64/power3",
91 .oprofile_type = PPC_OPROFILE_RS64,
92 .machine_check = machine_check_generic,
96 .pvr_mask = 0xffff0000,
97 .pvr_value = 0x00410000,
98 .cpu_name = "POWER3 (630+)",
99 .cpu_features = CPU_FTRS_POWER3,
100 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
104 .pmc_type = PPC_PMC_IBM,
105 .oprofile_cpu_type = "ppc64/power3",
106 .oprofile_type = PPC_OPROFILE_RS64,
107 .machine_check = machine_check_generic,
108 .platform = "power3",
111 .pvr_mask = 0xffff0000,
112 .pvr_value = 0x00330000,
113 .cpu_name = "RS64-II (northstar)",
114 .cpu_features = CPU_FTRS_RS64,
115 .cpu_user_features = COMMON_USER_PPC64,
119 .pmc_type = PPC_PMC_IBM,
120 .oprofile_cpu_type = "ppc64/rs64",
121 .oprofile_type = PPC_OPROFILE_RS64,
122 .machine_check = machine_check_generic,
126 .pvr_mask = 0xffff0000,
127 .pvr_value = 0x00340000,
128 .cpu_name = "RS64-III (pulsar)",
129 .cpu_features = CPU_FTRS_RS64,
130 .cpu_user_features = COMMON_USER_PPC64,
134 .pmc_type = PPC_PMC_IBM,
135 .oprofile_cpu_type = "ppc64/rs64",
136 .oprofile_type = PPC_OPROFILE_RS64,
137 .machine_check = machine_check_generic,
141 .pvr_mask = 0xffff0000,
142 .pvr_value = 0x00360000,
143 .cpu_name = "RS64-III (icestar)",
144 .cpu_features = CPU_FTRS_RS64,
145 .cpu_user_features = COMMON_USER_PPC64,
149 .pmc_type = PPC_PMC_IBM,
150 .oprofile_cpu_type = "ppc64/rs64",
151 .oprofile_type = PPC_OPROFILE_RS64,
152 .machine_check = machine_check_generic,
156 .pvr_mask = 0xffff0000,
157 .pvr_value = 0x00370000,
158 .cpu_name = "RS64-IV (sstar)",
159 .cpu_features = CPU_FTRS_RS64,
160 .cpu_user_features = COMMON_USER_PPC64,
164 .pmc_type = PPC_PMC_IBM,
165 .oprofile_cpu_type = "ppc64/rs64",
166 .oprofile_type = PPC_OPROFILE_RS64,
167 .machine_check = machine_check_generic,
171 .pvr_mask = 0xffff0000,
172 .pvr_value = 0x00350000,
173 .cpu_name = "POWER4 (gp)",
174 .cpu_features = CPU_FTRS_POWER4,
175 .cpu_user_features = COMMON_USER_POWER4,
179 .pmc_type = PPC_PMC_IBM,
180 .oprofile_cpu_type = "ppc64/power4",
181 .oprofile_type = PPC_OPROFILE_POWER4,
182 .machine_check = machine_check_generic,
183 .platform = "power4",
186 .pvr_mask = 0xffff0000,
187 .pvr_value = 0x00380000,
188 .cpu_name = "POWER4+ (gq)",
189 .cpu_features = CPU_FTRS_POWER4,
190 .cpu_user_features = COMMON_USER_POWER4,
194 .pmc_type = PPC_PMC_IBM,
195 .oprofile_cpu_type = "ppc64/power4",
196 .oprofile_type = PPC_OPROFILE_POWER4,
197 .machine_check = machine_check_generic,
198 .platform = "power4",
201 .pvr_mask = 0xffff0000,
202 .pvr_value = 0x00390000,
203 .cpu_name = "PPC970",
204 .cpu_features = CPU_FTRS_PPC970,
205 .cpu_user_features = COMMON_USER_POWER4 |
206 PPC_FEATURE_HAS_ALTIVEC_COMP,
210 .pmc_type = PPC_PMC_IBM,
211 .cpu_setup = __setup_cpu_ppc970,
212 .cpu_restore = __restore_cpu_ppc970,
213 .oprofile_cpu_type = "ppc64/970",
214 .oprofile_type = PPC_OPROFILE_POWER4,
215 .machine_check = machine_check_generic,
216 .platform = "ppc970",
219 .pvr_mask = 0xffff0000,
220 .pvr_value = 0x003c0000,
221 .cpu_name = "PPC970FX",
222 .cpu_features = CPU_FTRS_PPC970,
223 .cpu_user_features = COMMON_USER_POWER4 |
224 PPC_FEATURE_HAS_ALTIVEC_COMP,
228 .pmc_type = PPC_PMC_IBM,
229 .cpu_setup = __setup_cpu_ppc970,
230 .cpu_restore = __restore_cpu_ppc970,
231 .oprofile_cpu_type = "ppc64/970",
232 .oprofile_type = PPC_OPROFILE_POWER4,
233 .machine_check = machine_check_generic,
234 .platform = "ppc970",
236 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
237 .pvr_mask = 0xffffffff,
238 .pvr_value = 0x00440100,
239 .cpu_name = "PPC970MP",
240 .cpu_features = CPU_FTRS_PPC970,
241 .cpu_user_features = COMMON_USER_POWER4 |
242 PPC_FEATURE_HAS_ALTIVEC_COMP,
246 .pmc_type = PPC_PMC_IBM,
247 .cpu_setup = __setup_cpu_ppc970,
248 .cpu_restore = __restore_cpu_ppc970,
249 .oprofile_cpu_type = "ppc64/970MP",
250 .oprofile_type = PPC_OPROFILE_POWER4,
251 .machine_check = machine_check_generic,
252 .platform = "ppc970",
255 .pvr_mask = 0xffff0000,
256 .pvr_value = 0x00440000,
257 .cpu_name = "PPC970MP",
258 .cpu_features = CPU_FTRS_PPC970,
259 .cpu_user_features = COMMON_USER_POWER4 |
260 PPC_FEATURE_HAS_ALTIVEC_COMP,
264 .pmc_type = PPC_PMC_IBM,
265 .cpu_setup = __setup_cpu_ppc970MP,
266 .cpu_restore = __restore_cpu_ppc970,
267 .oprofile_cpu_type = "ppc64/970MP",
268 .oprofile_type = PPC_OPROFILE_POWER4,
269 .machine_check = machine_check_generic,
270 .platform = "ppc970",
273 .pvr_mask = 0xffff0000,
274 .pvr_value = 0x00450000,
275 .cpu_name = "PPC970GX",
276 .cpu_features = CPU_FTRS_PPC970,
277 .cpu_user_features = COMMON_USER_POWER4 |
278 PPC_FEATURE_HAS_ALTIVEC_COMP,
282 .pmc_type = PPC_PMC_IBM,
283 .cpu_setup = __setup_cpu_ppc970,
284 .oprofile_cpu_type = "ppc64/970",
285 .oprofile_type = PPC_OPROFILE_POWER4,
286 .machine_check = machine_check_generic,
287 .platform = "ppc970",
290 .pvr_mask = 0xffff0000,
291 .pvr_value = 0x003a0000,
292 .cpu_name = "POWER5 (gr)",
293 .cpu_features = CPU_FTRS_POWER5,
294 .cpu_user_features = COMMON_USER_POWER5,
298 .pmc_type = PPC_PMC_IBM,
299 .oprofile_cpu_type = "ppc64/power5",
300 .oprofile_type = PPC_OPROFILE_POWER4,
301 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
302 * and above but only works on POWER5 and above
304 .oprofile_mmcra_sihv = MMCRA_SIHV,
305 .oprofile_mmcra_sipr = MMCRA_SIPR,
306 .machine_check = machine_check_generic,
307 .platform = "power5",
310 .pvr_mask = 0xffffff00,
311 .pvr_value = 0x003b0300,
312 .cpu_name = "POWER5+ (gs)",
313 .cpu_features = CPU_FTRS_POWER5,
314 .cpu_user_features = COMMON_USER_POWER5_PLUS,
318 .oprofile_cpu_type = "ppc64/power5++",
319 .oprofile_type = PPC_OPROFILE_POWER4,
320 .oprofile_mmcra_sihv = MMCRA_SIHV,
321 .oprofile_mmcra_sipr = MMCRA_SIPR,
322 .machine_check = machine_check_generic,
323 .platform = "power5+",
326 .pvr_mask = 0xffff0000,
327 .pvr_value = 0x003b0000,
328 .cpu_name = "POWER5+ (gs)",
329 .cpu_features = CPU_FTRS_POWER5,
330 .cpu_user_features = COMMON_USER_POWER5_PLUS,
334 .pmc_type = PPC_PMC_IBM,
335 .oprofile_cpu_type = "ppc64/power5+",
336 .oprofile_type = PPC_OPROFILE_POWER4,
337 .oprofile_mmcra_sihv = MMCRA_SIHV,
338 .oprofile_mmcra_sipr = MMCRA_SIPR,
339 .machine_check = machine_check_generic,
340 .platform = "power5+",
342 { /* POWER6 in P5+ mode; 2.04-compliant processor */
343 .pvr_mask = 0xffffffff,
344 .pvr_value = 0x0f000001,
345 .cpu_name = "POWER5+",
346 .cpu_features = CPU_FTRS_POWER5,
347 .cpu_user_features = COMMON_USER_POWER5_PLUS,
350 .machine_check = machine_check_generic,
351 .platform = "power5+",
354 .pvr_mask = 0xffff0000,
355 .pvr_value = 0x003e0000,
356 .cpu_name = "POWER6 (raw)",
357 .cpu_features = CPU_FTRS_POWER6,
358 .cpu_user_features = COMMON_USER_POWER6 |
359 PPC_FEATURE_POWER6_EXT,
363 .pmc_type = PPC_PMC_IBM,
364 .oprofile_cpu_type = "ppc64/power6",
365 .oprofile_type = PPC_OPROFILE_POWER4,
366 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
367 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
368 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
370 .machine_check = machine_check_generic,
371 .platform = "power6x",
373 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
374 .pvr_mask = 0xffffffff,
375 .pvr_value = 0x0f000002,
376 .cpu_name = "POWER6 (architected)",
377 .cpu_features = CPU_FTRS_POWER6,
378 .cpu_user_features = COMMON_USER_POWER6,
381 .machine_check = machine_check_generic,
382 .platform = "power6",
384 { /* Cell Broadband Engine */
385 .pvr_mask = 0xffff0000,
386 .pvr_value = 0x00700000,
387 .cpu_name = "Cell Broadband Engine",
388 .cpu_features = CPU_FTRS_CELL,
389 .cpu_user_features = COMMON_USER_PPC64 |
390 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
395 .pmc_type = PPC_PMC_IBM,
396 .oprofile_cpu_type = "ppc64/cell-be",
397 .oprofile_type = PPC_OPROFILE_CELL,
398 .machine_check = machine_check_generic,
399 .platform = "ppc-cell-be",
402 .pvr_mask = 0x7fff0000,
403 .pvr_value = 0x00900000,
405 .cpu_features = CPU_FTRS_PA6T,
406 .cpu_user_features = COMMON_USER_PA6T,
410 .pmc_type = PPC_PMC_PA6T,
411 .cpu_setup = __setup_cpu_pa6t,
412 .cpu_restore = __restore_cpu_pa6t,
413 .oprofile_cpu_type = "ppc64/pa6t",
414 .oprofile_type = PPC_OPROFILE_PA6T,
415 .machine_check = machine_check_generic,
418 { /* default match */
419 .pvr_mask = 0x00000000,
420 .pvr_value = 0x00000000,
421 .cpu_name = "POWER4 (compatible)",
422 .cpu_features = CPU_FTRS_COMPATIBLE,
423 .cpu_user_features = COMMON_USER_PPC64,
427 .pmc_type = PPC_PMC_IBM,
428 .machine_check = machine_check_generic,
429 .platform = "power4",
431 #endif /* CONFIG_PPC64 */
435 .pvr_mask = 0xffff0000,
436 .pvr_value = 0x00010000,
438 .cpu_features = CPU_FTRS_PPC601,
439 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
440 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
443 .machine_check = machine_check_generic,
444 .platform = "ppc601",
447 .pvr_mask = 0xffff0000,
448 .pvr_value = 0x00030000,
450 .cpu_features = CPU_FTRS_603,
451 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
454 .cpu_setup = __setup_cpu_603,
455 .machine_check = machine_check_generic,
456 .platform = "ppc603",
459 .pvr_mask = 0xffff0000,
460 .pvr_value = 0x00060000,
462 .cpu_features = CPU_FTRS_603,
463 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
466 .cpu_setup = __setup_cpu_603,
467 .machine_check = machine_check_generic,
468 .platform = "ppc603",
471 .pvr_mask = 0xffff0000,
472 .pvr_value = 0x00070000,
474 .cpu_features = CPU_FTRS_603,
475 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
478 .cpu_setup = __setup_cpu_603,
479 .machine_check = machine_check_generic,
480 .platform = "ppc603",
483 .pvr_mask = 0xffff0000,
484 .pvr_value = 0x00040000,
486 .cpu_features = CPU_FTRS_604,
487 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
491 .cpu_setup = __setup_cpu_604,
492 .machine_check = machine_check_generic,
493 .platform = "ppc604",
496 .pvr_mask = 0xfffff000,
497 .pvr_value = 0x00090000,
499 .cpu_features = CPU_FTRS_604,
500 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
504 .cpu_setup = __setup_cpu_604,
505 .machine_check = machine_check_generic,
506 .platform = "ppc604",
509 .pvr_mask = 0xffff0000,
510 .pvr_value = 0x00090000,
512 .cpu_features = CPU_FTRS_604,
513 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
517 .cpu_setup = __setup_cpu_604,
518 .machine_check = machine_check_generic,
519 .platform = "ppc604",
522 .pvr_mask = 0xffff0000,
523 .pvr_value = 0x000a0000,
525 .cpu_features = CPU_FTRS_604,
526 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
530 .cpu_setup = __setup_cpu_604,
531 .machine_check = machine_check_generic,
532 .platform = "ppc604",
534 { /* 740/750 (0x4202, don't support TAU ?) */
535 .pvr_mask = 0xffffffff,
536 .pvr_value = 0x00084202,
537 .cpu_name = "740/750",
538 .cpu_features = CPU_FTRS_740_NOTAU,
539 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
543 .cpu_setup = __setup_cpu_750,
544 .machine_check = machine_check_generic,
545 .platform = "ppc750",
547 { /* 750CX (80100 and 8010x?) */
548 .pvr_mask = 0xfffffff0,
549 .pvr_value = 0x00080100,
551 .cpu_features = CPU_FTRS_750,
552 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
556 .cpu_setup = __setup_cpu_750cx,
557 .machine_check = machine_check_generic,
558 .platform = "ppc750",
560 { /* 750CX (82201 and 82202) */
561 .pvr_mask = 0xfffffff0,
562 .pvr_value = 0x00082200,
564 .cpu_features = CPU_FTRS_750,
565 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
569 .cpu_setup = __setup_cpu_750cx,
570 .machine_check = machine_check_generic,
571 .platform = "ppc750",
573 { /* 750CXe (82214) */
574 .pvr_mask = 0xfffffff0,
575 .pvr_value = 0x00082210,
576 .cpu_name = "750CXe",
577 .cpu_features = CPU_FTRS_750,
578 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
582 .cpu_setup = __setup_cpu_750cx,
583 .machine_check = machine_check_generic,
584 .platform = "ppc750",
586 { /* 750CXe "Gekko" (83214) */
587 .pvr_mask = 0xffffffff,
588 .pvr_value = 0x00083214,
589 .cpu_name = "750CXe",
590 .cpu_features = CPU_FTRS_750,
591 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
595 .cpu_setup = __setup_cpu_750cx,
596 .machine_check = machine_check_generic,
597 .platform = "ppc750",
600 .pvr_mask = 0xfffff0f0,
601 .pvr_value = 0x00087010,
603 .cpu_features = CPU_FTRS_750CL,
604 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
608 .cpu_setup = __setup_cpu_750,
609 .machine_check = machine_check_generic,
610 .platform = "ppc750",
613 .pvr_mask = 0xfffff000,
614 .pvr_value = 0x00083000,
615 .cpu_name = "745/755",
616 .cpu_features = CPU_FTRS_750,
617 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
621 .cpu_setup = __setup_cpu_750,
622 .machine_check = machine_check_generic,
623 .platform = "ppc750",
625 { /* 750FX rev 1.x */
626 .pvr_mask = 0xffffff00,
627 .pvr_value = 0x70000100,
629 .cpu_features = CPU_FTRS_750FX1,
630 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
634 .cpu_setup = __setup_cpu_750,
635 .machine_check = machine_check_generic,
636 .platform = "ppc750",
638 { /* 750FX rev 2.0 must disable HID0[DPM] */
639 .pvr_mask = 0xffffffff,
640 .pvr_value = 0x70000200,
642 .cpu_features = CPU_FTRS_750FX2,
643 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
647 .cpu_setup = __setup_cpu_750,
648 .machine_check = machine_check_generic,
649 .platform = "ppc750",
651 { /* 750FX (All revs except 2.0) */
652 .pvr_mask = 0xffff0000,
653 .pvr_value = 0x70000000,
655 .cpu_features = CPU_FTRS_750FX,
656 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
660 .cpu_setup = __setup_cpu_750fx,
661 .machine_check = machine_check_generic,
662 .platform = "ppc750",
665 .pvr_mask = 0xffff0000,
666 .pvr_value = 0x70020000,
668 .cpu_features = CPU_FTRS_750GX,
669 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
673 .cpu_setup = __setup_cpu_750fx,
674 .machine_check = machine_check_generic,
675 .platform = "ppc750",
677 { /* 740/750 (L2CR bit need fixup for 740) */
678 .pvr_mask = 0xffff0000,
679 .pvr_value = 0x00080000,
680 .cpu_name = "740/750",
681 .cpu_features = CPU_FTRS_740,
682 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
686 .cpu_setup = __setup_cpu_750,
687 .machine_check = machine_check_generic,
688 .platform = "ppc750",
690 { /* 7400 rev 1.1 ? (no TAU) */
691 .pvr_mask = 0xffffffff,
692 .pvr_value = 0x000c1101,
693 .cpu_name = "7400 (1.1)",
694 .cpu_features = CPU_FTRS_7400_NOTAU,
695 .cpu_user_features = COMMON_USER |
696 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
700 .cpu_setup = __setup_cpu_7400,
701 .machine_check = machine_check_generic,
702 .platform = "ppc7400",
705 .pvr_mask = 0xffff0000,
706 .pvr_value = 0x000c0000,
708 .cpu_features = CPU_FTRS_7400,
709 .cpu_user_features = COMMON_USER |
710 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
714 .cpu_setup = __setup_cpu_7400,
715 .machine_check = machine_check_generic,
716 .platform = "ppc7400",
719 .pvr_mask = 0xffff0000,
720 .pvr_value = 0x800c0000,
722 .cpu_features = CPU_FTRS_7400,
723 .cpu_user_features = COMMON_USER |
724 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
728 .cpu_setup = __setup_cpu_7410,
729 .machine_check = machine_check_generic,
730 .platform = "ppc7400",
732 { /* 7450 2.0 - no doze/nap */
733 .pvr_mask = 0xffffffff,
734 .pvr_value = 0x80000200,
736 .cpu_features = CPU_FTRS_7450_20,
737 .cpu_user_features = COMMON_USER |
738 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
742 .cpu_setup = __setup_cpu_745x,
743 .oprofile_cpu_type = "ppc/7450",
744 .oprofile_type = PPC_OPROFILE_G4,
745 .machine_check = machine_check_generic,
746 .platform = "ppc7450",
749 .pvr_mask = 0xffffffff,
750 .pvr_value = 0x80000201,
752 .cpu_features = CPU_FTRS_7450_21,
753 .cpu_user_features = COMMON_USER |
754 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
758 .cpu_setup = __setup_cpu_745x,
759 .oprofile_cpu_type = "ppc/7450",
760 .oprofile_type = PPC_OPROFILE_G4,
761 .machine_check = machine_check_generic,
762 .platform = "ppc7450",
764 { /* 7450 2.3 and newer */
765 .pvr_mask = 0xffff0000,
766 .pvr_value = 0x80000000,
768 .cpu_features = CPU_FTRS_7450_23,
769 .cpu_user_features = COMMON_USER |
770 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
774 .cpu_setup = __setup_cpu_745x,
775 .oprofile_cpu_type = "ppc/7450",
776 .oprofile_type = PPC_OPROFILE_G4,
777 .machine_check = machine_check_generic,
778 .platform = "ppc7450",
781 .pvr_mask = 0xffffff00,
782 .pvr_value = 0x80010100,
784 .cpu_features = CPU_FTRS_7455_1,
785 .cpu_user_features = COMMON_USER |
786 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
790 .cpu_setup = __setup_cpu_745x,
791 .oprofile_cpu_type = "ppc/7450",
792 .oprofile_type = PPC_OPROFILE_G4,
793 .machine_check = machine_check_generic,
794 .platform = "ppc7450",
797 .pvr_mask = 0xffffffff,
798 .pvr_value = 0x80010200,
800 .cpu_features = CPU_FTRS_7455_20,
801 .cpu_user_features = COMMON_USER |
802 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
806 .cpu_setup = __setup_cpu_745x,
807 .oprofile_cpu_type = "ppc/7450",
808 .oprofile_type = PPC_OPROFILE_G4,
809 .machine_check = machine_check_generic,
810 .platform = "ppc7450",
813 .pvr_mask = 0xffff0000,
814 .pvr_value = 0x80010000,
816 .cpu_features = CPU_FTRS_7455,
817 .cpu_user_features = COMMON_USER |
818 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
822 .cpu_setup = __setup_cpu_745x,
823 .oprofile_cpu_type = "ppc/7450",
824 .oprofile_type = PPC_OPROFILE_G4,
825 .machine_check = machine_check_generic,
826 .platform = "ppc7450",
828 { /* 7447/7457 Rev 1.0 */
829 .pvr_mask = 0xffffffff,
830 .pvr_value = 0x80020100,
831 .cpu_name = "7447/7457",
832 .cpu_features = CPU_FTRS_7447_10,
833 .cpu_user_features = COMMON_USER |
834 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
838 .cpu_setup = __setup_cpu_745x,
839 .oprofile_cpu_type = "ppc/7450",
840 .oprofile_type = PPC_OPROFILE_G4,
841 .machine_check = machine_check_generic,
842 .platform = "ppc7450",
844 { /* 7447/7457 Rev 1.1 */
845 .pvr_mask = 0xffffffff,
846 .pvr_value = 0x80020101,
847 .cpu_name = "7447/7457",
848 .cpu_features = CPU_FTRS_7447_10,
849 .cpu_user_features = COMMON_USER |
850 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
854 .cpu_setup = __setup_cpu_745x,
855 .oprofile_cpu_type = "ppc/7450",
856 .oprofile_type = PPC_OPROFILE_G4,
857 .machine_check = machine_check_generic,
858 .platform = "ppc7450",
860 { /* 7447/7457 Rev 1.2 and later */
861 .pvr_mask = 0xffff0000,
862 .pvr_value = 0x80020000,
863 .cpu_name = "7447/7457",
864 .cpu_features = CPU_FTRS_7447,
865 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
869 .cpu_setup = __setup_cpu_745x,
870 .oprofile_cpu_type = "ppc/7450",
871 .oprofile_type = PPC_OPROFILE_G4,
872 .machine_check = machine_check_generic,
873 .platform = "ppc7450",
876 .pvr_mask = 0xffff0000,
877 .pvr_value = 0x80030000,
879 .cpu_features = CPU_FTRS_7447A,
880 .cpu_user_features = COMMON_USER |
881 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
885 .cpu_setup = __setup_cpu_745x,
886 .oprofile_cpu_type = "ppc/7450",
887 .oprofile_type = PPC_OPROFILE_G4,
888 .machine_check = machine_check_generic,
889 .platform = "ppc7450",
892 .pvr_mask = 0xffff0000,
893 .pvr_value = 0x80040000,
895 .cpu_features = CPU_FTRS_7448,
896 .cpu_user_features = COMMON_USER |
897 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
901 .cpu_setup = __setup_cpu_745x,
902 .oprofile_cpu_type = "ppc/7450",
903 .oprofile_type = PPC_OPROFILE_G4,
904 .machine_check = machine_check_generic,
905 .platform = "ppc7450",
907 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
908 .pvr_mask = 0x7fff0000,
909 .pvr_value = 0x00810000,
911 .cpu_features = CPU_FTRS_82XX,
912 .cpu_user_features = COMMON_USER,
915 .cpu_setup = __setup_cpu_603,
916 .machine_check = machine_check_generic,
917 .platform = "ppc603",
919 { /* All G2_LE (603e core, plus some) have the same pvr */
920 .pvr_mask = 0x7fff0000,
921 .pvr_value = 0x00820000,
923 .cpu_features = CPU_FTRS_G2_LE,
924 .cpu_user_features = COMMON_USER,
927 .cpu_setup = __setup_cpu_603,
928 .machine_check = machine_check_generic,
929 .platform = "ppc603",
931 { /* e300c1 (a 603e core, plus some) on 83xx */
932 .pvr_mask = 0x7fff0000,
933 .pvr_value = 0x00830000,
934 .cpu_name = "e300c1",
935 .cpu_features = CPU_FTRS_E300,
936 .cpu_user_features = COMMON_USER,
939 .cpu_setup = __setup_cpu_603,
940 .machine_check = machine_check_generic,
941 .platform = "ppc603",
943 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
944 .pvr_mask = 0x7fff0000,
945 .pvr_value = 0x00840000,
946 .cpu_name = "e300c2",
947 .cpu_features = CPU_FTRS_E300C2,
948 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
951 .cpu_setup = __setup_cpu_603,
952 .machine_check = machine_check_generic,
953 .platform = "ppc603",
955 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
956 .pvr_mask = 0x7fff0000,
957 .pvr_value = 0x00850000,
958 .cpu_name = "e300c3",
959 .cpu_features = CPU_FTRS_E300,
960 .cpu_user_features = COMMON_USER,
963 .cpu_setup = __setup_cpu_603,
965 .oprofile_cpu_type = "ppc/e300",
966 .oprofile_type = PPC_OPROFILE_FSL_EMB,
967 .platform = "ppc603",
969 { /* e300c4 (e300c1, plus one IU) */
970 .pvr_mask = 0x7fff0000,
971 .pvr_value = 0x00860000,
972 .cpu_name = "e300c4",
973 .cpu_features = CPU_FTRS_E300,
974 .cpu_user_features = COMMON_USER,
977 .cpu_setup = __setup_cpu_603,
978 .machine_check = machine_check_generic,
980 .oprofile_cpu_type = "ppc/e300",
981 .oprofile_type = PPC_OPROFILE_FSL_EMB,
982 .platform = "ppc603",
984 { /* default match, we assume split I/D cache & TB (non-601)... */
985 .pvr_mask = 0x00000000,
986 .pvr_value = 0x00000000,
987 .cpu_name = "(generic PPC)",
988 .cpu_features = CPU_FTRS_CLASSIC32,
989 .cpu_user_features = COMMON_USER,
992 .machine_check = machine_check_generic,
993 .platform = "ppc603",
995 #endif /* CLASSIC_PPC */
998 .pvr_mask = 0xffff0000,
999 .pvr_value = 0x00500000,
1001 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1002 * if the 8xx code is there.... */
1003 .cpu_features = CPU_FTRS_8XX,
1004 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1007 .platform = "ppc823",
1009 #endif /* CONFIG_8xx */
1012 .pvr_mask = 0xffffff00,
1013 .pvr_value = 0x00200200,
1014 .cpu_name = "403GC",
1015 .cpu_features = CPU_FTRS_40X,
1016 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1019 .machine_check = machine_check_4xx,
1020 .platform = "ppc403",
1023 .pvr_mask = 0xffffff00,
1024 .pvr_value = 0x00201400,
1025 .cpu_name = "403GCX",
1026 .cpu_features = CPU_FTRS_40X,
1027 .cpu_user_features = PPC_FEATURE_32 |
1028 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
1031 .machine_check = machine_check_4xx,
1032 .platform = "ppc403",
1035 .pvr_mask = 0xffff0000,
1036 .pvr_value = 0x00200000,
1037 .cpu_name = "403G ??",
1038 .cpu_features = CPU_FTRS_40X,
1039 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1042 .machine_check = machine_check_4xx,
1043 .platform = "ppc403",
1046 .pvr_mask = 0xffff0000,
1047 .pvr_value = 0x40110000,
1048 .cpu_name = "405GP",
1049 .cpu_features = CPU_FTRS_40X,
1050 .cpu_user_features = PPC_FEATURE_32 |
1051 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1054 .machine_check = machine_check_4xx,
1055 .platform = "ppc405",
1058 .pvr_mask = 0xffff0000,
1059 .pvr_value = 0x40130000,
1060 .cpu_name = "STB03xxx",
1061 .cpu_features = CPU_FTRS_40X,
1062 .cpu_user_features = PPC_FEATURE_32 |
1063 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1066 .machine_check = machine_check_4xx,
1067 .platform = "ppc405",
1070 .pvr_mask = 0xffff0000,
1071 .pvr_value = 0x41810000,
1072 .cpu_name = "STB04xxx",
1073 .cpu_features = CPU_FTRS_40X,
1074 .cpu_user_features = PPC_FEATURE_32 |
1075 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1078 .machine_check = machine_check_4xx,
1079 .platform = "ppc405",
1082 .pvr_mask = 0xffff0000,
1083 .pvr_value = 0x41610000,
1084 .cpu_name = "NP405L",
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 = 0x40B10000,
1096 .cpu_name = "NP4GS3",
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 = 0x41410000,
1108 .cpu_name = "NP405H",
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 = 0x50910000,
1120 .cpu_name = "405GPr",
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 = 0x51510000,
1132 .cpu_name = "STBx25xx",
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 = 0x41F10000,
1144 .cpu_name = "405LP",
1145 .cpu_features = CPU_FTRS_40X,
1146 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1149 .machine_check = machine_check_4xx,
1150 .platform = "ppc405",
1152 { /* Xilinx Virtex-II Pro */
1153 .pvr_mask = 0xfffff000,
1154 .pvr_value = 0x20010000,
1155 .cpu_name = "Virtex-II Pro",
1156 .cpu_features = CPU_FTRS_40X,
1157 .cpu_user_features = PPC_FEATURE_32 |
1158 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1161 .machine_check = machine_check_4xx,
1162 .platform = "ppc405",
1164 { /* Xilinx Virtex-4 FX */
1165 .pvr_mask = 0xfffff000,
1166 .pvr_value = 0x20011000,
1167 .cpu_name = "Virtex-4 FX",
1168 .cpu_features = CPU_FTRS_40X,
1169 .cpu_user_features = PPC_FEATURE_32 |
1170 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1173 .machine_check = machine_check_4xx,
1174 .platform = "ppc405",
1177 .pvr_mask = 0xffff0000,
1178 .pvr_value = 0x51210000,
1179 .cpu_name = "405EP",
1180 .cpu_features = CPU_FTRS_40X,
1181 .cpu_user_features = PPC_FEATURE_32 |
1182 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1185 .machine_check = machine_check_4xx,
1186 .platform = "ppc405",
1189 .pvr_mask = 0xffff0004,
1190 .pvr_value = 0x12910004,
1191 .cpu_name = "405EX",
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",
1201 .pvr_mask = 0xffff0004,
1202 .pvr_value = 0x12910000,
1203 .cpu_name = "405EXr",
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 #endif /* CONFIG_40x */
1216 .pvr_mask = 0xf0000fff,
1217 .pvr_value = 0x40000850,
1218 .cpu_name = "440GR Rev. A",
1219 .cpu_features = CPU_FTRS_44X,
1220 .cpu_user_features = COMMON_USER_BOOKE,
1223 .machine_check = machine_check_4xx,
1224 .platform = "ppc440",
1226 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1227 .pvr_mask = 0xf0000fff,
1228 .pvr_value = 0x40000858,
1229 .cpu_name = "440EP Rev. A",
1230 .cpu_features = CPU_FTRS_44X,
1231 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1234 .cpu_setup = __setup_cpu_440ep,
1235 .machine_check = machine_check_4xx,
1236 .platform = "ppc440",
1239 .pvr_mask = 0xf0000fff,
1240 .pvr_value = 0x400008d3,
1241 .cpu_name = "440GR Rev. B",
1242 .cpu_features = CPU_FTRS_44X,
1243 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1246 .machine_check = machine_check_4xx,
1247 .platform = "ppc440",
1249 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1250 .pvr_mask = 0xf0000ff7,
1251 .pvr_value = 0x400008d4,
1252 .cpu_name = "440EP Rev. C",
1253 .cpu_features = CPU_FTRS_44X,
1254 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1257 .cpu_setup = __setup_cpu_440ep,
1258 .machine_check = machine_check_4xx,
1259 .platform = "ppc440",
1261 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1262 .pvr_mask = 0xf0000fff,
1263 .pvr_value = 0x400008db,
1264 .cpu_name = "440EP Rev. B",
1265 .cpu_features = CPU_FTRS_44X,
1266 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1269 .cpu_setup = __setup_cpu_440ep,
1270 .machine_check = machine_check_4xx,
1271 .platform = "ppc440",
1274 .pvr_mask = 0xf0000ffb,
1275 .pvr_value = 0x200008D0,
1276 .cpu_name = "440GRX",
1277 .cpu_features = CPU_FTRS_44X,
1278 .cpu_user_features = COMMON_USER_BOOKE,
1281 .cpu_setup = __setup_cpu_440grx,
1282 .machine_check = machine_check_440A,
1283 .platform = "ppc440",
1285 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1286 .pvr_mask = 0xf0000ffb,
1287 .pvr_value = 0x200008D8,
1288 .cpu_name = "440EPX",
1289 .cpu_features = CPU_FTRS_44X,
1290 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1293 .cpu_setup = __setup_cpu_440epx,
1294 .machine_check = machine_check_440A,
1295 .platform = "ppc440",
1297 { /* 440GP Rev. B */
1298 .pvr_mask = 0xf0000fff,
1299 .pvr_value = 0x40000440,
1300 .cpu_name = "440GP Rev. B",
1301 .cpu_features = CPU_FTRS_44X,
1302 .cpu_user_features = COMMON_USER_BOOKE,
1305 .machine_check = machine_check_4xx,
1306 .platform = "ppc440gp",
1308 { /* 440GP Rev. C */
1309 .pvr_mask = 0xf0000fff,
1310 .pvr_value = 0x40000481,
1311 .cpu_name = "440GP Rev. C",
1312 .cpu_features = CPU_FTRS_44X,
1313 .cpu_user_features = COMMON_USER_BOOKE,
1316 .machine_check = machine_check_4xx,
1317 .platform = "ppc440gp",
1319 { /* 440GX Rev. A */
1320 .pvr_mask = 0xf0000fff,
1321 .pvr_value = 0x50000850,
1322 .cpu_name = "440GX Rev. A",
1323 .cpu_features = CPU_FTRS_44X,
1324 .cpu_user_features = COMMON_USER_BOOKE,
1327 .cpu_setup = __setup_cpu_440gx,
1328 .machine_check = machine_check_440A,
1329 .platform = "ppc440",
1331 { /* 440GX Rev. B */
1332 .pvr_mask = 0xf0000fff,
1333 .pvr_value = 0x50000851,
1334 .cpu_name = "440GX Rev. B",
1335 .cpu_features = CPU_FTRS_44X,
1336 .cpu_user_features = COMMON_USER_BOOKE,
1339 .cpu_setup = __setup_cpu_440gx,
1340 .machine_check = machine_check_440A,
1341 .platform = "ppc440",
1343 { /* 440GX Rev. C */
1344 .pvr_mask = 0xf0000fff,
1345 .pvr_value = 0x50000892,
1346 .cpu_name = "440GX Rev. C",
1347 .cpu_features = CPU_FTRS_44X,
1348 .cpu_user_features = COMMON_USER_BOOKE,
1351 .cpu_setup = __setup_cpu_440gx,
1352 .machine_check = machine_check_440A,
1353 .platform = "ppc440",
1355 { /* 440GX Rev. F */
1356 .pvr_mask = 0xf0000fff,
1357 .pvr_value = 0x50000894,
1358 .cpu_name = "440GX Rev. F",
1359 .cpu_features = CPU_FTRS_44X,
1360 .cpu_user_features = COMMON_USER_BOOKE,
1363 .cpu_setup = __setup_cpu_440gx,
1364 .machine_check = machine_check_440A,
1365 .platform = "ppc440",
1367 { /* 440SP Rev. A */
1368 .pvr_mask = 0xfff00fff,
1369 .pvr_value = 0x53200891,
1370 .cpu_name = "440SP Rev. A",
1371 .cpu_features = CPU_FTRS_44X,
1372 .cpu_user_features = COMMON_USER_BOOKE,
1375 .machine_check = machine_check_4xx,
1376 .platform = "ppc440",
1378 { /* 440SPe Rev. A */
1379 .pvr_mask = 0xfff00fff,
1380 .pvr_value = 0x53400890,
1381 .cpu_name = "440SPe Rev. A",
1382 .cpu_features = CPU_FTRS_44X,
1383 .cpu_user_features = COMMON_USER_BOOKE,
1386 .cpu_setup = __setup_cpu_440spe,
1387 .machine_check = machine_check_440A,
1388 .platform = "ppc440",
1390 { /* 440SPe Rev. B */
1391 .pvr_mask = 0xfff00fff,
1392 .pvr_value = 0x53400891,
1393 .cpu_name = "440SPe Rev. B",
1394 .cpu_features = CPU_FTRS_44X,
1395 .cpu_user_features = COMMON_USER_BOOKE,
1398 .cpu_setup = __setup_cpu_440spe,
1399 .machine_check = machine_check_440A,
1400 .platform = "ppc440",
1403 .pvr_mask = 0xffff0002,
1404 .pvr_value = 0x13020002,
1405 .cpu_name = "460EX",
1406 .cpu_features = CPU_FTRS_44X,
1407 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1410 .cpu_setup = __setup_cpu_460ex,
1411 .machine_check = machine_check_440A,
1412 .platform = "ppc440",
1415 .pvr_mask = 0xffff0002,
1416 .pvr_value = 0x13020000,
1417 .cpu_name = "460GT",
1418 .cpu_features = CPU_FTRS_44X,
1419 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1422 .cpu_setup = __setup_cpu_460gt,
1423 .machine_check = machine_check_440A,
1424 .platform = "ppc440",
1426 #endif /* CONFIG_44x */
1427 #ifdef CONFIG_FSL_BOOKE
1430 .pvr_mask = 0xfff00000,
1431 .pvr_value = 0x81000000,
1432 .cpu_name = "e200z5",
1433 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1434 .cpu_features = CPU_FTRS_E200,
1435 .cpu_user_features = COMMON_USER_BOOKE |
1436 PPC_FEATURE_HAS_EFP_SINGLE |
1437 PPC_FEATURE_UNIFIED_CACHE,
1439 .machine_check = machine_check_e200,
1440 .platform = "ppc5554",
1443 .pvr_mask = 0xfff00000,
1444 .pvr_value = 0x81100000,
1445 .cpu_name = "e200z6",
1446 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1447 .cpu_features = CPU_FTRS_E200,
1448 .cpu_user_features = COMMON_USER_BOOKE |
1449 PPC_FEATURE_HAS_SPE_COMP |
1450 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1451 PPC_FEATURE_UNIFIED_CACHE,
1453 .machine_check = machine_check_e200,
1454 .platform = "ppc5554",
1456 #elif defined(CONFIG_E500)
1458 .pvr_mask = 0xffff0000,
1459 .pvr_value = 0x80200000,
1461 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1462 .cpu_features = CPU_FTRS_E500,
1463 .cpu_user_features = COMMON_USER_BOOKE |
1464 PPC_FEATURE_HAS_SPE_COMP |
1465 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
1469 .oprofile_cpu_type = "ppc/e500",
1470 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1471 .machine_check = machine_check_e500,
1472 .platform = "ppc8540",
1475 .pvr_mask = 0xffff0000,
1476 .pvr_value = 0x80210000,
1477 .cpu_name = "e500v2",
1478 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1479 .cpu_features = CPU_FTRS_E500_2,
1480 .cpu_user_features = COMMON_USER_BOOKE |
1481 PPC_FEATURE_HAS_SPE_COMP |
1482 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1483 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
1487 .oprofile_cpu_type = "ppc/e500",
1488 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1489 .machine_check = machine_check_e500,
1490 .platform = "ppc8548",
1495 { /* default match */
1496 .pvr_mask = 0x00000000,
1497 .pvr_value = 0x00000000,
1498 .cpu_name = "(generic PPC)",
1499 .cpu_features = CPU_FTRS_GENERIC_32,
1500 .cpu_user_features = PPC_FEATURE_32,
1503 .platform = "powerpc",
1505 #endif /* !CLASSIC_PPC */
1506 #endif /* CONFIG_PPC32 */
1509 static struct cpu_spec the_cpu_spec;
1511 struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
1513 struct cpu_spec *s = cpu_specs;
1514 struct cpu_spec *t = &the_cpu_spec;
1520 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
1521 if ((pvr & s->pvr_mask) == s->pvr_value) {
1523 * If we are overriding a previous value derived
1524 * from the real PVR with a new value obtained
1525 * using a logical PVR value, don't modify the
1526 * performance monitor fields.
1528 if (t->num_pmcs && !s->num_pmcs) {
1529 t->cpu_name = s->cpu_name;
1530 t->cpu_features = s->cpu_features;
1531 t->cpu_user_features = s->cpu_user_features;
1532 t->icache_bsize = s->icache_bsize;
1533 t->dcache_bsize = s->dcache_bsize;
1534 t->cpu_setup = s->cpu_setup;
1535 t->cpu_restore = s->cpu_restore;
1536 t->platform = s->platform;
1539 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
1540 #if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
1541 /* ppc64 and booke expect identify_cpu to also call
1542 * setup_cpu for that processor. I will consolidate
1543 * that at a later time, for now, just use #ifdef.
1544 * we also don't need to PTRRELOC the function pointer
1545 * on ppc64 and booke as we are running at 0 in real
1546 * mode on ppc64 and reloc_offset is always 0 on booke.
1549 s->cpu_setup(offset, s);
1551 #endif /* CONFIG_PPC64 || CONFIG_BOOKE */
1558 void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)
1560 struct fixup_entry {
1562 unsigned long value;
1570 for (; fcur < fend; fcur++) {
1571 unsigned int *pstart, *pend, *p;
1573 if ((value & fcur->mask) == fcur->value)
1576 /* These PTRRELOCs will disappear once the new scheme for
1577 * modules and vdso is implemented
1579 pstart = ((unsigned int *)fcur) + (fcur->start_off / 4);
1580 pend = ((unsigned int *)fcur) + (fcur->end_off / 4);
1582 for (p = pstart; p < pend; p++) {
1584 asm volatile ("dcbst 0, %0" : : "r" (p));
1586 asm volatile ("sync" : : : "memory");
1587 for (p = pstart; p < pend; p++)
1588 asm volatile ("icbi 0,%0" : : "r" (p));
1589 asm volatile ("sync; isync" : : : "memory");