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_603(unsigned long offset, struct cpu_spec* spec);
40 extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
41 extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
42 extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
43 extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
44 extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
45 extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
46 extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
47 #endif /* CONFIG_PPC32 */
49 extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
50 extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
51 extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
52 extern void __restore_cpu_pa6t(void);
53 extern void __restore_cpu_ppc970(void);
54 #endif /* CONFIG_PPC64 */
56 /* This table only contains "desktop" CPUs, it need to be filled with embedded
59 #define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
61 #define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
62 #define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
63 #define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
64 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
65 #define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
66 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
67 #define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
68 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
70 #define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
71 PPC_FEATURE_TRUE_LE | \
72 PPC_FEATURE_HAS_ALTIVEC_COMP)
73 #define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
76 static struct cpu_spec __initdata cpu_specs[] = {
79 .pvr_mask = 0xffff0000,
80 .pvr_value = 0x00400000,
81 .cpu_name = "POWER3 (630)",
82 .cpu_features = CPU_FTRS_POWER3,
83 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
87 .pmc_type = PPC_PMC_IBM,
88 .oprofile_cpu_type = "ppc64/power3",
89 .oprofile_type = PPC_OPROFILE_RS64,
90 .machine_check = machine_check_generic,
94 .pvr_mask = 0xffff0000,
95 .pvr_value = 0x00410000,
96 .cpu_name = "POWER3 (630+)",
97 .cpu_features = CPU_FTRS_POWER3,
98 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
102 .pmc_type = PPC_PMC_IBM,
103 .oprofile_cpu_type = "ppc64/power3",
104 .oprofile_type = PPC_OPROFILE_RS64,
105 .machine_check = machine_check_generic,
106 .platform = "power3",
109 .pvr_mask = 0xffff0000,
110 .pvr_value = 0x00330000,
111 .cpu_name = "RS64-II (northstar)",
112 .cpu_features = CPU_FTRS_RS64,
113 .cpu_user_features = COMMON_USER_PPC64,
117 .pmc_type = PPC_PMC_IBM,
118 .oprofile_cpu_type = "ppc64/rs64",
119 .oprofile_type = PPC_OPROFILE_RS64,
120 .machine_check = machine_check_generic,
124 .pvr_mask = 0xffff0000,
125 .pvr_value = 0x00340000,
126 .cpu_name = "RS64-III (pulsar)",
127 .cpu_features = CPU_FTRS_RS64,
128 .cpu_user_features = COMMON_USER_PPC64,
132 .pmc_type = PPC_PMC_IBM,
133 .oprofile_cpu_type = "ppc64/rs64",
134 .oprofile_type = PPC_OPROFILE_RS64,
135 .machine_check = machine_check_generic,
139 .pvr_mask = 0xffff0000,
140 .pvr_value = 0x00360000,
141 .cpu_name = "RS64-III (icestar)",
142 .cpu_features = CPU_FTRS_RS64,
143 .cpu_user_features = COMMON_USER_PPC64,
147 .pmc_type = PPC_PMC_IBM,
148 .oprofile_cpu_type = "ppc64/rs64",
149 .oprofile_type = PPC_OPROFILE_RS64,
150 .machine_check = machine_check_generic,
154 .pvr_mask = 0xffff0000,
155 .pvr_value = 0x00370000,
156 .cpu_name = "RS64-IV (sstar)",
157 .cpu_features = CPU_FTRS_RS64,
158 .cpu_user_features = COMMON_USER_PPC64,
162 .pmc_type = PPC_PMC_IBM,
163 .oprofile_cpu_type = "ppc64/rs64",
164 .oprofile_type = PPC_OPROFILE_RS64,
165 .machine_check = machine_check_generic,
169 .pvr_mask = 0xffff0000,
170 .pvr_value = 0x00350000,
171 .cpu_name = "POWER4 (gp)",
172 .cpu_features = CPU_FTRS_POWER4,
173 .cpu_user_features = COMMON_USER_POWER4,
177 .pmc_type = PPC_PMC_IBM,
178 .oprofile_cpu_type = "ppc64/power4",
179 .oprofile_type = PPC_OPROFILE_POWER4,
180 .machine_check = machine_check_generic,
181 .platform = "power4",
184 .pvr_mask = 0xffff0000,
185 .pvr_value = 0x00380000,
186 .cpu_name = "POWER4+ (gq)",
187 .cpu_features = CPU_FTRS_POWER4,
188 .cpu_user_features = COMMON_USER_POWER4,
192 .pmc_type = PPC_PMC_IBM,
193 .oprofile_cpu_type = "ppc64/power4",
194 .oprofile_type = PPC_OPROFILE_POWER4,
195 .machine_check = machine_check_generic,
196 .platform = "power4",
199 .pvr_mask = 0xffff0000,
200 .pvr_value = 0x00390000,
201 .cpu_name = "PPC970",
202 .cpu_features = CPU_FTRS_PPC970,
203 .cpu_user_features = COMMON_USER_POWER4 |
204 PPC_FEATURE_HAS_ALTIVEC_COMP,
208 .pmc_type = PPC_PMC_IBM,
209 .cpu_setup = __setup_cpu_ppc970,
210 .cpu_restore = __restore_cpu_ppc970,
211 .oprofile_cpu_type = "ppc64/970",
212 .oprofile_type = PPC_OPROFILE_POWER4,
213 .machine_check = machine_check_generic,
214 .platform = "ppc970",
217 .pvr_mask = 0xffff0000,
218 .pvr_value = 0x003c0000,
219 .cpu_name = "PPC970FX",
220 .cpu_features = CPU_FTRS_PPC970,
221 .cpu_user_features = COMMON_USER_POWER4 |
222 PPC_FEATURE_HAS_ALTIVEC_COMP,
226 .pmc_type = PPC_PMC_IBM,
227 .cpu_setup = __setup_cpu_ppc970,
228 .cpu_restore = __restore_cpu_ppc970,
229 .oprofile_cpu_type = "ppc64/970",
230 .oprofile_type = PPC_OPROFILE_POWER4,
231 .machine_check = machine_check_generic,
232 .platform = "ppc970",
234 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
235 .pvr_mask = 0xffffffff,
236 .pvr_value = 0x00440100,
237 .cpu_name = "PPC970MP",
238 .cpu_features = CPU_FTRS_PPC970,
239 .cpu_user_features = COMMON_USER_POWER4 |
240 PPC_FEATURE_HAS_ALTIVEC_COMP,
244 .pmc_type = PPC_PMC_IBM,
245 .cpu_setup = __setup_cpu_ppc970,
246 .cpu_restore = __restore_cpu_ppc970,
247 .oprofile_cpu_type = "ppc64/970MP",
248 .oprofile_type = PPC_OPROFILE_POWER4,
249 .machine_check = machine_check_generic,
250 .platform = "ppc970",
253 .pvr_mask = 0xffff0000,
254 .pvr_value = 0x00440000,
255 .cpu_name = "PPC970MP",
256 .cpu_features = CPU_FTRS_PPC970,
257 .cpu_user_features = COMMON_USER_POWER4 |
258 PPC_FEATURE_HAS_ALTIVEC_COMP,
262 .pmc_type = PPC_PMC_IBM,
263 .cpu_setup = __setup_cpu_ppc970MP,
264 .cpu_restore = __restore_cpu_ppc970,
265 .oprofile_cpu_type = "ppc64/970MP",
266 .oprofile_type = PPC_OPROFILE_POWER4,
267 .machine_check = machine_check_generic,
268 .platform = "ppc970",
271 .pvr_mask = 0xffff0000,
272 .pvr_value = 0x00450000,
273 .cpu_name = "PPC970GX",
274 .cpu_features = CPU_FTRS_PPC970,
275 .cpu_user_features = COMMON_USER_POWER4 |
276 PPC_FEATURE_HAS_ALTIVEC_COMP,
280 .pmc_type = PPC_PMC_IBM,
281 .cpu_setup = __setup_cpu_ppc970,
282 .oprofile_cpu_type = "ppc64/970",
283 .oprofile_type = PPC_OPROFILE_POWER4,
284 .machine_check = machine_check_generic,
285 .platform = "ppc970",
288 .pvr_mask = 0xffff0000,
289 .pvr_value = 0x003a0000,
290 .cpu_name = "POWER5 (gr)",
291 .cpu_features = CPU_FTRS_POWER5,
292 .cpu_user_features = COMMON_USER_POWER5,
296 .pmc_type = PPC_PMC_IBM,
297 .oprofile_cpu_type = "ppc64/power5",
298 .oprofile_type = PPC_OPROFILE_POWER4,
299 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
300 * and above but only works on POWER5 and above
302 .oprofile_mmcra_sihv = MMCRA_SIHV,
303 .oprofile_mmcra_sipr = MMCRA_SIPR,
304 .machine_check = machine_check_generic,
305 .platform = "power5",
308 .pvr_mask = 0xffffff00,
309 .pvr_value = 0x003b0300,
310 .cpu_name = "POWER5+ (gs)",
311 .cpu_features = CPU_FTRS_POWER5,
312 .cpu_user_features = COMMON_USER_POWER5_PLUS,
316 .oprofile_cpu_type = "ppc64/power5++",
317 .oprofile_type = PPC_OPROFILE_POWER4,
318 .oprofile_mmcra_sihv = MMCRA_SIHV,
319 .oprofile_mmcra_sipr = MMCRA_SIPR,
320 .machine_check = machine_check_generic,
321 .platform = "power5+",
324 .pvr_mask = 0xffff0000,
325 .pvr_value = 0x003b0000,
326 .cpu_name = "POWER5+ (gs)",
327 .cpu_features = CPU_FTRS_POWER5,
328 .cpu_user_features = COMMON_USER_POWER5_PLUS,
332 .pmc_type = PPC_PMC_IBM,
333 .oprofile_cpu_type = "ppc64/power5+",
334 .oprofile_type = PPC_OPROFILE_POWER4,
335 .oprofile_mmcra_sihv = MMCRA_SIHV,
336 .oprofile_mmcra_sipr = MMCRA_SIPR,
337 .machine_check = machine_check_generic,
338 .platform = "power5+",
340 { /* POWER6 in P5+ mode; 2.04-compliant processor */
341 .pvr_mask = 0xffffffff,
342 .pvr_value = 0x0f000001,
343 .cpu_name = "POWER5+",
344 .cpu_features = CPU_FTRS_POWER5,
345 .cpu_user_features = COMMON_USER_POWER5_PLUS,
348 .machine_check = machine_check_generic,
349 .platform = "power5+",
352 .pvr_mask = 0xffff0000,
353 .pvr_value = 0x003e0000,
354 .cpu_name = "POWER6 (raw)",
355 .cpu_features = CPU_FTRS_POWER6,
356 .cpu_user_features = COMMON_USER_POWER6 |
357 PPC_FEATURE_POWER6_EXT,
361 .pmc_type = PPC_PMC_IBM,
362 .oprofile_cpu_type = "ppc64/power6",
363 .oprofile_type = PPC_OPROFILE_POWER4,
364 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
365 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
366 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
368 .machine_check = machine_check_generic,
369 .platform = "power6x",
371 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
372 .pvr_mask = 0xffffffff,
373 .pvr_value = 0x0f000002,
374 .cpu_name = "POWER6 (architected)",
375 .cpu_features = CPU_FTRS_POWER6,
376 .cpu_user_features = COMMON_USER_POWER6,
379 .machine_check = machine_check_generic,
380 .platform = "power6",
382 { /* Cell Broadband Engine */
383 .pvr_mask = 0xffff0000,
384 .pvr_value = 0x00700000,
385 .cpu_name = "Cell Broadband Engine",
386 .cpu_features = CPU_FTRS_CELL,
387 .cpu_user_features = COMMON_USER_PPC64 |
388 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
393 .pmc_type = PPC_PMC_IBM,
394 .oprofile_cpu_type = "ppc64/cell-be",
395 .oprofile_type = PPC_OPROFILE_CELL,
396 .machine_check = machine_check_generic,
397 .platform = "ppc-cell-be",
400 .pvr_mask = 0x7fff0000,
401 .pvr_value = 0x00900000,
403 .cpu_features = CPU_FTRS_PA6T,
404 .cpu_user_features = COMMON_USER_PA6T,
408 .pmc_type = PPC_PMC_PA6T,
409 .cpu_setup = __setup_cpu_pa6t,
410 .cpu_restore = __restore_cpu_pa6t,
411 .oprofile_cpu_type = "ppc64/pa6t",
412 .oprofile_type = PPC_OPROFILE_PA6T,
413 .machine_check = machine_check_generic,
416 { /* default match */
417 .pvr_mask = 0x00000000,
418 .pvr_value = 0x00000000,
419 .cpu_name = "POWER4 (compatible)",
420 .cpu_features = CPU_FTRS_COMPATIBLE,
421 .cpu_user_features = COMMON_USER_PPC64,
425 .pmc_type = PPC_PMC_IBM,
426 .machine_check = machine_check_generic,
427 .platform = "power4",
429 #endif /* CONFIG_PPC64 */
433 .pvr_mask = 0xffff0000,
434 .pvr_value = 0x00010000,
436 .cpu_features = CPU_FTRS_PPC601,
437 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
438 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
441 .machine_check = machine_check_generic,
442 .platform = "ppc601",
445 .pvr_mask = 0xffff0000,
446 .pvr_value = 0x00030000,
448 .cpu_features = CPU_FTRS_603,
449 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
452 .cpu_setup = __setup_cpu_603,
453 .machine_check = machine_check_generic,
454 .platform = "ppc603",
457 .pvr_mask = 0xffff0000,
458 .pvr_value = 0x00060000,
460 .cpu_features = CPU_FTRS_603,
461 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
464 .cpu_setup = __setup_cpu_603,
465 .machine_check = machine_check_generic,
466 .platform = "ppc603",
469 .pvr_mask = 0xffff0000,
470 .pvr_value = 0x00070000,
472 .cpu_features = CPU_FTRS_603,
473 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
476 .cpu_setup = __setup_cpu_603,
477 .machine_check = machine_check_generic,
478 .platform = "ppc603",
481 .pvr_mask = 0xffff0000,
482 .pvr_value = 0x00040000,
484 .cpu_features = CPU_FTRS_604,
485 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
489 .cpu_setup = __setup_cpu_604,
490 .machine_check = machine_check_generic,
491 .platform = "ppc604",
494 .pvr_mask = 0xfffff000,
495 .pvr_value = 0x00090000,
497 .cpu_features = CPU_FTRS_604,
498 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
502 .cpu_setup = __setup_cpu_604,
503 .machine_check = machine_check_generic,
504 .platform = "ppc604",
507 .pvr_mask = 0xffff0000,
508 .pvr_value = 0x00090000,
510 .cpu_features = CPU_FTRS_604,
511 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
515 .cpu_setup = __setup_cpu_604,
516 .machine_check = machine_check_generic,
517 .platform = "ppc604",
520 .pvr_mask = 0xffff0000,
521 .pvr_value = 0x000a0000,
523 .cpu_features = CPU_FTRS_604,
524 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
528 .cpu_setup = __setup_cpu_604,
529 .machine_check = machine_check_generic,
530 .platform = "ppc604",
532 { /* 740/750 (0x4202, don't support TAU ?) */
533 .pvr_mask = 0xffffffff,
534 .pvr_value = 0x00084202,
535 .cpu_name = "740/750",
536 .cpu_features = CPU_FTRS_740_NOTAU,
537 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
541 .cpu_setup = __setup_cpu_750,
542 .machine_check = machine_check_generic,
543 .platform = "ppc750",
545 { /* 750CX (80100 and 8010x?) */
546 .pvr_mask = 0xfffffff0,
547 .pvr_value = 0x00080100,
549 .cpu_features = CPU_FTRS_750,
550 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
554 .cpu_setup = __setup_cpu_750cx,
555 .machine_check = machine_check_generic,
556 .platform = "ppc750",
558 { /* 750CX (82201 and 82202) */
559 .pvr_mask = 0xfffffff0,
560 .pvr_value = 0x00082200,
562 .cpu_features = CPU_FTRS_750,
563 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
567 .cpu_setup = __setup_cpu_750cx,
568 .machine_check = machine_check_generic,
569 .platform = "ppc750",
571 { /* 750CXe (82214) */
572 .pvr_mask = 0xfffffff0,
573 .pvr_value = 0x00082210,
574 .cpu_name = "750CXe",
575 .cpu_features = CPU_FTRS_750,
576 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
580 .cpu_setup = __setup_cpu_750cx,
581 .machine_check = machine_check_generic,
582 .platform = "ppc750",
584 { /* 750CXe "Gekko" (83214) */
585 .pvr_mask = 0xffffffff,
586 .pvr_value = 0x00083214,
587 .cpu_name = "750CXe",
588 .cpu_features = CPU_FTRS_750,
589 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
593 .cpu_setup = __setup_cpu_750cx,
594 .machine_check = machine_check_generic,
595 .platform = "ppc750",
598 .pvr_mask = 0xfffff0f0,
599 .pvr_value = 0x00087010,
601 .cpu_features = CPU_FTRS_750CL,
602 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
606 .cpu_setup = __setup_cpu_750,
607 .machine_check = machine_check_generic,
608 .platform = "ppc750",
611 .pvr_mask = 0xfffff000,
612 .pvr_value = 0x00083000,
613 .cpu_name = "745/755",
614 .cpu_features = CPU_FTRS_750,
615 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
619 .cpu_setup = __setup_cpu_750,
620 .machine_check = machine_check_generic,
621 .platform = "ppc750",
623 { /* 750FX rev 1.x */
624 .pvr_mask = 0xffffff00,
625 .pvr_value = 0x70000100,
627 .cpu_features = CPU_FTRS_750FX1,
628 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
632 .cpu_setup = __setup_cpu_750,
633 .machine_check = machine_check_generic,
634 .platform = "ppc750",
636 { /* 750FX rev 2.0 must disable HID0[DPM] */
637 .pvr_mask = 0xffffffff,
638 .pvr_value = 0x70000200,
640 .cpu_features = CPU_FTRS_750FX2,
641 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
645 .cpu_setup = __setup_cpu_750,
646 .machine_check = machine_check_generic,
647 .platform = "ppc750",
649 { /* 750FX (All revs except 2.0) */
650 .pvr_mask = 0xffff0000,
651 .pvr_value = 0x70000000,
653 .cpu_features = CPU_FTRS_750FX,
654 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
658 .cpu_setup = __setup_cpu_750fx,
659 .machine_check = machine_check_generic,
660 .platform = "ppc750",
663 .pvr_mask = 0xffff0000,
664 .pvr_value = 0x70020000,
666 .cpu_features = CPU_FTRS_750GX,
667 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
671 .cpu_setup = __setup_cpu_750fx,
672 .machine_check = machine_check_generic,
673 .platform = "ppc750",
675 { /* 740/750 (L2CR bit need fixup for 740) */
676 .pvr_mask = 0xffff0000,
677 .pvr_value = 0x00080000,
678 .cpu_name = "740/750",
679 .cpu_features = CPU_FTRS_740,
680 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
684 .cpu_setup = __setup_cpu_750,
685 .machine_check = machine_check_generic,
686 .platform = "ppc750",
688 { /* 7400 rev 1.1 ? (no TAU) */
689 .pvr_mask = 0xffffffff,
690 .pvr_value = 0x000c1101,
691 .cpu_name = "7400 (1.1)",
692 .cpu_features = CPU_FTRS_7400_NOTAU,
693 .cpu_user_features = COMMON_USER |
694 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
698 .cpu_setup = __setup_cpu_7400,
699 .machine_check = machine_check_generic,
700 .platform = "ppc7400",
703 .pvr_mask = 0xffff0000,
704 .pvr_value = 0x000c0000,
706 .cpu_features = CPU_FTRS_7400,
707 .cpu_user_features = COMMON_USER |
708 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
712 .cpu_setup = __setup_cpu_7400,
713 .machine_check = machine_check_generic,
714 .platform = "ppc7400",
717 .pvr_mask = 0xffff0000,
718 .pvr_value = 0x800c0000,
720 .cpu_features = CPU_FTRS_7400,
721 .cpu_user_features = COMMON_USER |
722 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
726 .cpu_setup = __setup_cpu_7410,
727 .machine_check = machine_check_generic,
728 .platform = "ppc7400",
730 { /* 7450 2.0 - no doze/nap */
731 .pvr_mask = 0xffffffff,
732 .pvr_value = 0x80000200,
734 .cpu_features = CPU_FTRS_7450_20,
735 .cpu_user_features = COMMON_USER |
736 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
740 .cpu_setup = __setup_cpu_745x,
741 .oprofile_cpu_type = "ppc/7450",
742 .oprofile_type = PPC_OPROFILE_G4,
743 .machine_check = machine_check_generic,
744 .platform = "ppc7450",
747 .pvr_mask = 0xffffffff,
748 .pvr_value = 0x80000201,
750 .cpu_features = CPU_FTRS_7450_21,
751 .cpu_user_features = COMMON_USER |
752 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
756 .cpu_setup = __setup_cpu_745x,
757 .oprofile_cpu_type = "ppc/7450",
758 .oprofile_type = PPC_OPROFILE_G4,
759 .machine_check = machine_check_generic,
760 .platform = "ppc7450",
762 { /* 7450 2.3 and newer */
763 .pvr_mask = 0xffff0000,
764 .pvr_value = 0x80000000,
766 .cpu_features = CPU_FTRS_7450_23,
767 .cpu_user_features = COMMON_USER |
768 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
772 .cpu_setup = __setup_cpu_745x,
773 .oprofile_cpu_type = "ppc/7450",
774 .oprofile_type = PPC_OPROFILE_G4,
775 .machine_check = machine_check_generic,
776 .platform = "ppc7450",
779 .pvr_mask = 0xffffff00,
780 .pvr_value = 0x80010100,
782 .cpu_features = CPU_FTRS_7455_1,
783 .cpu_user_features = COMMON_USER |
784 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
788 .cpu_setup = __setup_cpu_745x,
789 .oprofile_cpu_type = "ppc/7450",
790 .oprofile_type = PPC_OPROFILE_G4,
791 .machine_check = machine_check_generic,
792 .platform = "ppc7450",
795 .pvr_mask = 0xffffffff,
796 .pvr_value = 0x80010200,
798 .cpu_features = CPU_FTRS_7455_20,
799 .cpu_user_features = COMMON_USER |
800 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
804 .cpu_setup = __setup_cpu_745x,
805 .oprofile_cpu_type = "ppc/7450",
806 .oprofile_type = PPC_OPROFILE_G4,
807 .machine_check = machine_check_generic,
808 .platform = "ppc7450",
811 .pvr_mask = 0xffff0000,
812 .pvr_value = 0x80010000,
814 .cpu_features = CPU_FTRS_7455,
815 .cpu_user_features = COMMON_USER |
816 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
820 .cpu_setup = __setup_cpu_745x,
821 .oprofile_cpu_type = "ppc/7450",
822 .oprofile_type = PPC_OPROFILE_G4,
823 .machine_check = machine_check_generic,
824 .platform = "ppc7450",
826 { /* 7447/7457 Rev 1.0 */
827 .pvr_mask = 0xffffffff,
828 .pvr_value = 0x80020100,
829 .cpu_name = "7447/7457",
830 .cpu_features = CPU_FTRS_7447_10,
831 .cpu_user_features = COMMON_USER |
832 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
836 .cpu_setup = __setup_cpu_745x,
837 .oprofile_cpu_type = "ppc/7450",
838 .oprofile_type = PPC_OPROFILE_G4,
839 .machine_check = machine_check_generic,
840 .platform = "ppc7450",
842 { /* 7447/7457 Rev 1.1 */
843 .pvr_mask = 0xffffffff,
844 .pvr_value = 0x80020101,
845 .cpu_name = "7447/7457",
846 .cpu_features = CPU_FTRS_7447_10,
847 .cpu_user_features = COMMON_USER |
848 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
852 .cpu_setup = __setup_cpu_745x,
853 .oprofile_cpu_type = "ppc/7450",
854 .oprofile_type = PPC_OPROFILE_G4,
855 .machine_check = machine_check_generic,
856 .platform = "ppc7450",
858 { /* 7447/7457 Rev 1.2 and later */
859 .pvr_mask = 0xffff0000,
860 .pvr_value = 0x80020000,
861 .cpu_name = "7447/7457",
862 .cpu_features = CPU_FTRS_7447,
863 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
867 .cpu_setup = __setup_cpu_745x,
868 .oprofile_cpu_type = "ppc/7450",
869 .oprofile_type = PPC_OPROFILE_G4,
870 .machine_check = machine_check_generic,
871 .platform = "ppc7450",
874 .pvr_mask = 0xffff0000,
875 .pvr_value = 0x80030000,
877 .cpu_features = CPU_FTRS_7447A,
878 .cpu_user_features = COMMON_USER |
879 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
883 .cpu_setup = __setup_cpu_745x,
884 .oprofile_cpu_type = "ppc/7450",
885 .oprofile_type = PPC_OPROFILE_G4,
886 .machine_check = machine_check_generic,
887 .platform = "ppc7450",
890 .pvr_mask = 0xffff0000,
891 .pvr_value = 0x80040000,
893 .cpu_features = CPU_FTRS_7448,
894 .cpu_user_features = COMMON_USER |
895 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
899 .cpu_setup = __setup_cpu_745x,
900 .oprofile_cpu_type = "ppc/7450",
901 .oprofile_type = PPC_OPROFILE_G4,
902 .machine_check = machine_check_generic,
903 .platform = "ppc7450",
905 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
906 .pvr_mask = 0x7fff0000,
907 .pvr_value = 0x00810000,
909 .cpu_features = CPU_FTRS_82XX,
910 .cpu_user_features = COMMON_USER,
913 .cpu_setup = __setup_cpu_603,
914 .machine_check = machine_check_generic,
915 .platform = "ppc603",
917 { /* All G2_LE (603e core, plus some) have the same pvr */
918 .pvr_mask = 0x7fff0000,
919 .pvr_value = 0x00820000,
921 .cpu_features = CPU_FTRS_G2_LE,
922 .cpu_user_features = COMMON_USER,
925 .cpu_setup = __setup_cpu_603,
926 .machine_check = machine_check_generic,
927 .platform = "ppc603",
929 { /* e300c1 (a 603e core, plus some) on 83xx */
930 .pvr_mask = 0x7fff0000,
931 .pvr_value = 0x00830000,
932 .cpu_name = "e300c1",
933 .cpu_features = CPU_FTRS_E300,
934 .cpu_user_features = COMMON_USER,
937 .cpu_setup = __setup_cpu_603,
938 .machine_check = machine_check_generic,
939 .platform = "ppc603",
941 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
942 .pvr_mask = 0x7fff0000,
943 .pvr_value = 0x00840000,
944 .cpu_name = "e300c2",
945 .cpu_features = CPU_FTRS_E300C2,
946 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
949 .cpu_setup = __setup_cpu_603,
950 .machine_check = machine_check_generic,
951 .platform = "ppc603",
953 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
954 .pvr_mask = 0x7fff0000,
955 .pvr_value = 0x00850000,
956 .cpu_name = "e300c3",
957 .cpu_features = CPU_FTRS_E300,
958 .cpu_user_features = COMMON_USER,
961 .cpu_setup = __setup_cpu_603,
962 .platform = "ppc603",
964 { /* e300c4 (e300c1, plus one IU) */
965 .pvr_mask = 0x7fff0000,
966 .pvr_value = 0x00860000,
967 .cpu_name = "e300c4",
968 .cpu_features = CPU_FTRS_E300,
969 .cpu_user_features = COMMON_USER,
972 .cpu_setup = __setup_cpu_603,
973 .machine_check = machine_check_generic,
974 .platform = "ppc603",
976 { /* default match, we assume split I/D cache & TB (non-601)... */
977 .pvr_mask = 0x00000000,
978 .pvr_value = 0x00000000,
979 .cpu_name = "(generic PPC)",
980 .cpu_features = CPU_FTRS_CLASSIC32,
981 .cpu_user_features = COMMON_USER,
984 .machine_check = machine_check_generic,
985 .platform = "ppc603",
987 #endif /* CLASSIC_PPC */
990 .pvr_mask = 0xffff0000,
991 .pvr_value = 0x00500000,
993 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
994 * if the 8xx code is there.... */
995 .cpu_features = CPU_FTRS_8XX,
996 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
999 .platform = "ppc823",
1001 #endif /* CONFIG_8xx */
1004 .pvr_mask = 0xffffff00,
1005 .pvr_value = 0x00200200,
1006 .cpu_name = "403GC",
1007 .cpu_features = CPU_FTRS_40X,
1008 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1011 .machine_check = machine_check_4xx,
1012 .platform = "ppc403",
1015 .pvr_mask = 0xffffff00,
1016 .pvr_value = 0x00201400,
1017 .cpu_name = "403GCX",
1018 .cpu_features = CPU_FTRS_40X,
1019 .cpu_user_features = PPC_FEATURE_32 |
1020 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
1023 .machine_check = machine_check_4xx,
1024 .platform = "ppc403",
1027 .pvr_mask = 0xffff0000,
1028 .pvr_value = 0x00200000,
1029 .cpu_name = "403G ??",
1030 .cpu_features = CPU_FTRS_40X,
1031 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1034 .machine_check = machine_check_4xx,
1035 .platform = "ppc403",
1038 .pvr_mask = 0xffff0000,
1039 .pvr_value = 0x40110000,
1040 .cpu_name = "405GP",
1041 .cpu_features = CPU_FTRS_40X,
1042 .cpu_user_features = PPC_FEATURE_32 |
1043 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1046 .machine_check = machine_check_4xx,
1047 .platform = "ppc405",
1050 .pvr_mask = 0xffff0000,
1051 .pvr_value = 0x40130000,
1052 .cpu_name = "STB03xxx",
1053 .cpu_features = CPU_FTRS_40X,
1054 .cpu_user_features = PPC_FEATURE_32 |
1055 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1058 .machine_check = machine_check_4xx,
1059 .platform = "ppc405",
1062 .pvr_mask = 0xffff0000,
1063 .pvr_value = 0x41810000,
1064 .cpu_name = "STB04xxx",
1065 .cpu_features = CPU_FTRS_40X,
1066 .cpu_user_features = PPC_FEATURE_32 |
1067 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1070 .machine_check = machine_check_4xx,
1071 .platform = "ppc405",
1074 .pvr_mask = 0xffff0000,
1075 .pvr_value = 0x41610000,
1076 .cpu_name = "NP405L",
1077 .cpu_features = CPU_FTRS_40X,
1078 .cpu_user_features = PPC_FEATURE_32 |
1079 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1082 .machine_check = machine_check_4xx,
1083 .platform = "ppc405",
1086 .pvr_mask = 0xffff0000,
1087 .pvr_value = 0x40B10000,
1088 .cpu_name = "NP4GS3",
1089 .cpu_features = CPU_FTRS_40X,
1090 .cpu_user_features = PPC_FEATURE_32 |
1091 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1094 .machine_check = machine_check_4xx,
1095 .platform = "ppc405",
1098 .pvr_mask = 0xffff0000,
1099 .pvr_value = 0x41410000,
1100 .cpu_name = "NP405H",
1101 .cpu_features = CPU_FTRS_40X,
1102 .cpu_user_features = PPC_FEATURE_32 |
1103 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1106 .machine_check = machine_check_4xx,
1107 .platform = "ppc405",
1110 .pvr_mask = 0xffff0000,
1111 .pvr_value = 0x50910000,
1112 .cpu_name = "405GPr",
1113 .cpu_features = CPU_FTRS_40X,
1114 .cpu_user_features = PPC_FEATURE_32 |
1115 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1118 .machine_check = machine_check_4xx,
1119 .platform = "ppc405",
1122 .pvr_mask = 0xffff0000,
1123 .pvr_value = 0x51510000,
1124 .cpu_name = "STBx25xx",
1125 .cpu_features = CPU_FTRS_40X,
1126 .cpu_user_features = PPC_FEATURE_32 |
1127 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1130 .machine_check = machine_check_4xx,
1131 .platform = "ppc405",
1134 .pvr_mask = 0xffff0000,
1135 .pvr_value = 0x41F10000,
1136 .cpu_name = "405LP",
1137 .cpu_features = CPU_FTRS_40X,
1138 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1141 .machine_check = machine_check_4xx,
1142 .platform = "ppc405",
1144 { /* Xilinx Virtex-II Pro */
1145 .pvr_mask = 0xfffff000,
1146 .pvr_value = 0x20010000,
1147 .cpu_name = "Virtex-II Pro",
1148 .cpu_features = CPU_FTRS_40X,
1149 .cpu_user_features = PPC_FEATURE_32 |
1150 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1153 .machine_check = machine_check_4xx,
1154 .platform = "ppc405",
1156 { /* Xilinx Virtex-4 FX */
1157 .pvr_mask = 0xfffff000,
1158 .pvr_value = 0x20011000,
1159 .cpu_name = "Virtex-4 FX",
1160 .cpu_features = CPU_FTRS_40X,
1161 .cpu_user_features = PPC_FEATURE_32 |
1162 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1165 .machine_check = machine_check_4xx,
1166 .platform = "ppc405",
1169 .pvr_mask = 0xffff0000,
1170 .pvr_value = 0x51210000,
1171 .cpu_name = "405EP",
1172 .cpu_features = CPU_FTRS_40X,
1173 .cpu_user_features = PPC_FEATURE_32 |
1174 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1177 .machine_check = machine_check_4xx,
1178 .platform = "ppc405",
1181 .pvr_mask = 0xffff0000,
1182 .pvr_value = 0x12910000,
1183 .cpu_name = "405EX",
1184 .cpu_features = CPU_FTRS_40X,
1185 .cpu_user_features = PPC_FEATURE_32 |
1186 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1189 .machine_check = machine_check_4xx,
1190 .platform = "ppc405",
1193 #endif /* CONFIG_40x */
1196 .pvr_mask = 0xf0000fff,
1197 .pvr_value = 0x40000850,
1198 .cpu_name = "440GR Rev. A",
1199 .cpu_features = CPU_FTRS_44X,
1200 .cpu_user_features = COMMON_USER_BOOKE,
1203 .machine_check = machine_check_4xx,
1204 .platform = "ppc440",
1206 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1207 .pvr_mask = 0xf0000fff,
1208 .pvr_value = 0x40000858,
1209 .cpu_name = "440EP Rev. A",
1210 .cpu_features = CPU_FTRS_44X,
1211 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1214 .cpu_setup = __setup_cpu_440ep,
1215 .machine_check = machine_check_4xx,
1216 .platform = "ppc440",
1219 .pvr_mask = 0xf0000fff,
1220 .pvr_value = 0x400008d3,
1221 .cpu_name = "440GR Rev. B",
1222 .cpu_features = CPU_FTRS_44X,
1223 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1226 .machine_check = machine_check_4xx,
1227 .platform = "ppc440",
1229 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1230 .pvr_mask = 0xf0000fff,
1231 .pvr_value = 0x400008db,
1232 .cpu_name = "440EP Rev. B",
1233 .cpu_features = CPU_FTRS_44X,
1234 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1237 .cpu_setup = __setup_cpu_440ep,
1238 .machine_check = machine_check_4xx,
1239 .platform = "ppc440",
1242 .pvr_mask = 0xf0000ffb,
1243 .pvr_value = 0x200008D0,
1244 .cpu_name = "440GRX",
1245 .cpu_features = CPU_FTRS_44X,
1246 .cpu_user_features = COMMON_USER_BOOKE,
1249 .cpu_setup = __setup_cpu_440grx,
1250 .machine_check = machine_check_440A,
1251 .platform = "ppc440",
1253 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1254 .pvr_mask = 0xf0000ffb,
1255 .pvr_value = 0x200008D8,
1256 .cpu_name = "440EPX",
1257 .cpu_features = CPU_FTRS_44X,
1258 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1261 .cpu_setup = __setup_cpu_440epx,
1262 .machine_check = machine_check_440A,
1263 .platform = "ppc440",
1265 { /* 440GP Rev. B */
1266 .pvr_mask = 0xf0000fff,
1267 .pvr_value = 0x40000440,
1268 .cpu_name = "440GP Rev. B",
1269 .cpu_features = CPU_FTRS_44X,
1270 .cpu_user_features = COMMON_USER_BOOKE,
1273 .machine_check = machine_check_4xx,
1274 .platform = "ppc440gp",
1276 { /* 440GP Rev. C */
1277 .pvr_mask = 0xf0000fff,
1278 .pvr_value = 0x40000481,
1279 .cpu_name = "440GP Rev. C",
1280 .cpu_features = CPU_FTRS_44X,
1281 .cpu_user_features = COMMON_USER_BOOKE,
1284 .machine_check = machine_check_4xx,
1285 .platform = "ppc440gp",
1287 { /* 440GX Rev. A */
1288 .pvr_mask = 0xf0000fff,
1289 .pvr_value = 0x50000850,
1290 .cpu_name = "440GX Rev. A",
1291 .cpu_features = CPU_FTRS_44X,
1292 .cpu_user_features = COMMON_USER_BOOKE,
1295 .cpu_setup = __setup_cpu_440gx,
1296 .machine_check = machine_check_440A,
1297 .platform = "ppc440",
1299 { /* 440GX Rev. B */
1300 .pvr_mask = 0xf0000fff,
1301 .pvr_value = 0x50000851,
1302 .cpu_name = "440GX Rev. B",
1303 .cpu_features = CPU_FTRS_44X,
1304 .cpu_user_features = COMMON_USER_BOOKE,
1307 .cpu_setup = __setup_cpu_440gx,
1308 .machine_check = machine_check_440A,
1309 .platform = "ppc440",
1311 { /* 440GX Rev. C */
1312 .pvr_mask = 0xf0000fff,
1313 .pvr_value = 0x50000892,
1314 .cpu_name = "440GX Rev. C",
1315 .cpu_features = CPU_FTRS_44X,
1316 .cpu_user_features = COMMON_USER_BOOKE,
1319 .cpu_setup = __setup_cpu_440gx,
1320 .machine_check = machine_check_440A,
1321 .platform = "ppc440",
1323 { /* 440GX Rev. F */
1324 .pvr_mask = 0xf0000fff,
1325 .pvr_value = 0x50000894,
1326 .cpu_name = "440GX Rev. F",
1327 .cpu_features = CPU_FTRS_44X,
1328 .cpu_user_features = COMMON_USER_BOOKE,
1331 .cpu_setup = __setup_cpu_440gx,
1332 .machine_check = machine_check_440A,
1333 .platform = "ppc440",
1335 { /* 440SP Rev. A */
1336 .pvr_mask = 0xfff00fff,
1337 .pvr_value = 0x53200891,
1338 .cpu_name = "440SP Rev. A",
1339 .cpu_features = CPU_FTRS_44X,
1340 .cpu_user_features = COMMON_USER_BOOKE,
1343 .machine_check = machine_check_4xx,
1344 .platform = "ppc440",
1346 { /* 440SPe Rev. A */
1347 .pvr_mask = 0xfff00fff,
1348 .pvr_value = 0x53400890,
1349 .cpu_name = "440SPe Rev. A",
1350 .cpu_features = CPU_FTRS_44X,
1351 .cpu_user_features = COMMON_USER_BOOKE,
1354 .cpu_setup = __setup_cpu_440spe,
1355 .machine_check = machine_check_440A,
1356 .platform = "ppc440",
1358 { /* 440SPe Rev. B */
1359 .pvr_mask = 0xfff00fff,
1360 .pvr_value = 0x53400891,
1361 .cpu_name = "440SPe Rev. B",
1362 .cpu_features = CPU_FTRS_44X,
1363 .cpu_user_features = COMMON_USER_BOOKE,
1366 .cpu_setup = __setup_cpu_440spe,
1367 .machine_check = machine_check_440A,
1368 .platform = "ppc440",
1370 #endif /* CONFIG_44x */
1371 #ifdef CONFIG_FSL_BOOKE
1374 .pvr_mask = 0xfff00000,
1375 .pvr_value = 0x81000000,
1376 .cpu_name = "e200z5",
1377 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1378 .cpu_features = CPU_FTRS_E200,
1379 .cpu_user_features = COMMON_USER_BOOKE |
1380 PPC_FEATURE_HAS_EFP_SINGLE |
1381 PPC_FEATURE_UNIFIED_CACHE,
1383 .machine_check = machine_check_e200,
1384 .platform = "ppc5554",
1387 .pvr_mask = 0xfff00000,
1388 .pvr_value = 0x81100000,
1389 .cpu_name = "e200z6",
1390 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1391 .cpu_features = CPU_FTRS_E200,
1392 .cpu_user_features = COMMON_USER_BOOKE |
1393 PPC_FEATURE_HAS_SPE_COMP |
1394 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1395 PPC_FEATURE_UNIFIED_CACHE,
1397 .machine_check = machine_check_e200,
1398 .platform = "ppc5554",
1400 #elif defined(CONFIG_E500)
1402 .pvr_mask = 0xffff0000,
1403 .pvr_value = 0x80200000,
1405 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1406 .cpu_features = CPU_FTRS_E500,
1407 .cpu_user_features = COMMON_USER_BOOKE |
1408 PPC_FEATURE_HAS_SPE_COMP |
1409 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
1413 .oprofile_cpu_type = "ppc/e500",
1414 .oprofile_type = PPC_OPROFILE_BOOKE,
1415 .machine_check = machine_check_e500,
1416 .platform = "ppc8540",
1419 .pvr_mask = 0xffff0000,
1420 .pvr_value = 0x80210000,
1421 .cpu_name = "e500v2",
1422 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1423 .cpu_features = CPU_FTRS_E500_2,
1424 .cpu_user_features = COMMON_USER_BOOKE |
1425 PPC_FEATURE_HAS_SPE_COMP |
1426 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1427 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
1431 .oprofile_cpu_type = "ppc/e500",
1432 .oprofile_type = PPC_OPROFILE_BOOKE,
1433 .machine_check = machine_check_e500,
1434 .platform = "ppc8548",
1439 { /* default match */
1440 .pvr_mask = 0x00000000,
1441 .pvr_value = 0x00000000,
1442 .cpu_name = "(generic PPC)",
1443 .cpu_features = CPU_FTRS_GENERIC_32,
1444 .cpu_user_features = PPC_FEATURE_32,
1447 .platform = "powerpc",
1449 #endif /* !CLASSIC_PPC */
1450 #endif /* CONFIG_PPC32 */
1453 static struct cpu_spec the_cpu_spec;
1455 struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
1457 struct cpu_spec *s = cpu_specs;
1458 struct cpu_spec *t = &the_cpu_spec;
1464 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
1465 if ((pvr & s->pvr_mask) == s->pvr_value) {
1467 * If we are overriding a previous value derived
1468 * from the real PVR with a new value obtained
1469 * using a logical PVR value, don't modify the
1470 * performance monitor fields.
1472 if (t->num_pmcs && !s->num_pmcs) {
1473 t->cpu_name = s->cpu_name;
1474 t->cpu_features = s->cpu_features;
1475 t->cpu_user_features = s->cpu_user_features;
1476 t->icache_bsize = s->icache_bsize;
1477 t->dcache_bsize = s->dcache_bsize;
1478 t->cpu_setup = s->cpu_setup;
1479 t->cpu_restore = s->cpu_restore;
1480 t->platform = s->platform;
1483 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
1484 #if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
1485 /* ppc64 and booke expect identify_cpu to also call
1486 * setup_cpu for that processor. I will consolidate
1487 * that at a later time, for now, just use #ifdef.
1488 * we also don't need to PTRRELOC the function pointer
1489 * on ppc64 and booke as we are running at 0 in real
1490 * mode on ppc64 and reloc_offset is always 0 on booke.
1493 s->cpu_setup(offset, s);
1495 #endif /* CONFIG_PPC64 || CONFIG_BOOKE */
1502 void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)
1504 struct fixup_entry {
1506 unsigned long value;
1514 for (; fcur < fend; fcur++) {
1515 unsigned int *pstart, *pend, *p;
1517 if ((value & fcur->mask) == fcur->value)
1520 /* These PTRRELOCs will disappear once the new scheme for
1521 * modules and vdso is implemented
1523 pstart = ((unsigned int *)fcur) + (fcur->start_off / 4);
1524 pend = ((unsigned int *)fcur) + (fcur->end_off / 4);
1526 for (p = pstart; p < pend; p++) {
1528 asm volatile ("dcbst 0, %0" : : "r" (p));
1530 asm volatile ("sync" : : : "memory");
1531 for (p = pstart; p < pend; p++)
1532 asm volatile ("icbi 0,%0" : : "r" (p));
1533 asm volatile ("sync; isync" : : : "memory");