2 * Copyright (C) 2001 Ben. Herrenschmidt (benh@kernel.crashing.org)
4 * Modifications for ppc64:
5 * Copyright (C) 2003 Dave Engebretsen <engebret@us.ibm.com>
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version
10 * 2 of the License, or (at your option) any later version.
13 #include <linux/string.h>
14 #include <linux/sched.h>
15 #include <linux/threads.h>
16 #include <linux/init.h>
17 #include <linux/module.h>
19 #include <asm/oprofile_impl.h>
20 #include <asm/cputable.h>
21 #include <asm/prom.h> /* for PTRRELOC on ARCH=ppc */
23 struct cpu_spec* cur_cpu_spec = NULL;
24 EXPORT_SYMBOL(cur_cpu_spec);
27 * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's
28 * the responsibility of the appropriate CPU save/restore functions to
29 * eventually copy these settings over. Those save/restore aren't yet
30 * part of the cputable though. That has to be fixed for both ppc32
34 extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
35 extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
36 extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
37 extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
38 extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
39 extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec);
40 extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec);
41 extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
42 extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
43 extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
44 extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
45 extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
46 extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
47 extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
48 extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
49 #endif /* CONFIG_PPC32 */
51 extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
52 extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
53 extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
54 extern void __restore_cpu_pa6t(void);
55 extern void __restore_cpu_ppc970(void);
56 extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec);
57 extern void __restore_cpu_power7(void);
58 #endif /* CONFIG_PPC64 */
60 /* This table only contains "desktop" CPUs, it need to be filled with embedded
63 #define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
65 #define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
66 #define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
67 #define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
68 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
69 #define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
70 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
71 #define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
72 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
74 #define COMMON_USER_POWER7 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
75 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
77 #define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
78 PPC_FEATURE_TRUE_LE | \
79 PPC_FEATURE_HAS_ALTIVEC_COMP)
80 #define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
83 static struct cpu_spec __initdata cpu_specs[] = {
86 .pvr_mask = 0xffff0000,
87 .pvr_value = 0x00400000,
88 .cpu_name = "POWER3 (630)",
89 .cpu_features = CPU_FTRS_POWER3,
90 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
94 .pmc_type = PPC_PMC_IBM,
95 .oprofile_cpu_type = "ppc64/power3",
96 .oprofile_type = PPC_OPROFILE_RS64,
97 .machine_check = machine_check_generic,
101 .pvr_mask = 0xffff0000,
102 .pvr_value = 0x00410000,
103 .cpu_name = "POWER3 (630+)",
104 .cpu_features = CPU_FTRS_POWER3,
105 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
109 .pmc_type = PPC_PMC_IBM,
110 .oprofile_cpu_type = "ppc64/power3",
111 .oprofile_type = PPC_OPROFILE_RS64,
112 .machine_check = machine_check_generic,
113 .platform = "power3",
116 .pvr_mask = 0xffff0000,
117 .pvr_value = 0x00330000,
118 .cpu_name = "RS64-II (northstar)",
119 .cpu_features = CPU_FTRS_RS64,
120 .cpu_user_features = COMMON_USER_PPC64,
124 .pmc_type = PPC_PMC_IBM,
125 .oprofile_cpu_type = "ppc64/rs64",
126 .oprofile_type = PPC_OPROFILE_RS64,
127 .machine_check = machine_check_generic,
131 .pvr_mask = 0xffff0000,
132 .pvr_value = 0x00340000,
133 .cpu_name = "RS64-III (pulsar)",
134 .cpu_features = CPU_FTRS_RS64,
135 .cpu_user_features = COMMON_USER_PPC64,
139 .pmc_type = PPC_PMC_IBM,
140 .oprofile_cpu_type = "ppc64/rs64",
141 .oprofile_type = PPC_OPROFILE_RS64,
142 .machine_check = machine_check_generic,
146 .pvr_mask = 0xffff0000,
147 .pvr_value = 0x00360000,
148 .cpu_name = "RS64-III (icestar)",
149 .cpu_features = CPU_FTRS_RS64,
150 .cpu_user_features = COMMON_USER_PPC64,
154 .pmc_type = PPC_PMC_IBM,
155 .oprofile_cpu_type = "ppc64/rs64",
156 .oprofile_type = PPC_OPROFILE_RS64,
157 .machine_check = machine_check_generic,
161 .pvr_mask = 0xffff0000,
162 .pvr_value = 0x00370000,
163 .cpu_name = "RS64-IV (sstar)",
164 .cpu_features = CPU_FTRS_RS64,
165 .cpu_user_features = COMMON_USER_PPC64,
169 .pmc_type = PPC_PMC_IBM,
170 .oprofile_cpu_type = "ppc64/rs64",
171 .oprofile_type = PPC_OPROFILE_RS64,
172 .machine_check = machine_check_generic,
176 .pvr_mask = 0xffff0000,
177 .pvr_value = 0x00350000,
178 .cpu_name = "POWER4 (gp)",
179 .cpu_features = CPU_FTRS_POWER4,
180 .cpu_user_features = COMMON_USER_POWER4,
184 .pmc_type = PPC_PMC_IBM,
185 .oprofile_cpu_type = "ppc64/power4",
186 .oprofile_type = PPC_OPROFILE_POWER4,
187 .machine_check = machine_check_generic,
188 .platform = "power4",
191 .pvr_mask = 0xffff0000,
192 .pvr_value = 0x00380000,
193 .cpu_name = "POWER4+ (gq)",
194 .cpu_features = CPU_FTRS_POWER4,
195 .cpu_user_features = COMMON_USER_POWER4,
199 .pmc_type = PPC_PMC_IBM,
200 .oprofile_cpu_type = "ppc64/power4",
201 .oprofile_type = PPC_OPROFILE_POWER4,
202 .machine_check = machine_check_generic,
203 .platform = "power4",
206 .pvr_mask = 0xffff0000,
207 .pvr_value = 0x00390000,
208 .cpu_name = "PPC970",
209 .cpu_features = CPU_FTRS_PPC970,
210 .cpu_user_features = COMMON_USER_POWER4 |
211 PPC_FEATURE_HAS_ALTIVEC_COMP,
215 .pmc_type = PPC_PMC_IBM,
216 .cpu_setup = __setup_cpu_ppc970,
217 .cpu_restore = __restore_cpu_ppc970,
218 .oprofile_cpu_type = "ppc64/970",
219 .oprofile_type = PPC_OPROFILE_POWER4,
220 .machine_check = machine_check_generic,
221 .platform = "ppc970",
224 .pvr_mask = 0xffff0000,
225 .pvr_value = 0x003c0000,
226 .cpu_name = "PPC970FX",
227 .cpu_features = CPU_FTRS_PPC970,
228 .cpu_user_features = COMMON_USER_POWER4 |
229 PPC_FEATURE_HAS_ALTIVEC_COMP,
233 .pmc_type = PPC_PMC_IBM,
234 .cpu_setup = __setup_cpu_ppc970,
235 .cpu_restore = __restore_cpu_ppc970,
236 .oprofile_cpu_type = "ppc64/970",
237 .oprofile_type = PPC_OPROFILE_POWER4,
238 .machine_check = machine_check_generic,
239 .platform = "ppc970",
241 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
242 .pvr_mask = 0xffffffff,
243 .pvr_value = 0x00440100,
244 .cpu_name = "PPC970MP",
245 .cpu_features = CPU_FTRS_PPC970,
246 .cpu_user_features = COMMON_USER_POWER4 |
247 PPC_FEATURE_HAS_ALTIVEC_COMP,
251 .pmc_type = PPC_PMC_IBM,
252 .cpu_setup = __setup_cpu_ppc970,
253 .cpu_restore = __restore_cpu_ppc970,
254 .oprofile_cpu_type = "ppc64/970MP",
255 .oprofile_type = PPC_OPROFILE_POWER4,
256 .machine_check = machine_check_generic,
257 .platform = "ppc970",
260 .pvr_mask = 0xffff0000,
261 .pvr_value = 0x00440000,
262 .cpu_name = "PPC970MP",
263 .cpu_features = CPU_FTRS_PPC970,
264 .cpu_user_features = COMMON_USER_POWER4 |
265 PPC_FEATURE_HAS_ALTIVEC_COMP,
269 .pmc_type = PPC_PMC_IBM,
270 .cpu_setup = __setup_cpu_ppc970MP,
271 .cpu_restore = __restore_cpu_ppc970,
272 .oprofile_cpu_type = "ppc64/970MP",
273 .oprofile_type = PPC_OPROFILE_POWER4,
274 .machine_check = machine_check_generic,
275 .platform = "ppc970",
278 .pvr_mask = 0xffff0000,
279 .pvr_value = 0x00450000,
280 .cpu_name = "PPC970GX",
281 .cpu_features = CPU_FTRS_PPC970,
282 .cpu_user_features = COMMON_USER_POWER4 |
283 PPC_FEATURE_HAS_ALTIVEC_COMP,
287 .pmc_type = PPC_PMC_IBM,
288 .cpu_setup = __setup_cpu_ppc970,
289 .oprofile_cpu_type = "ppc64/970",
290 .oprofile_type = PPC_OPROFILE_POWER4,
291 .machine_check = machine_check_generic,
292 .platform = "ppc970",
295 .pvr_mask = 0xffff0000,
296 .pvr_value = 0x003a0000,
297 .cpu_name = "POWER5 (gr)",
298 .cpu_features = CPU_FTRS_POWER5,
299 .cpu_user_features = COMMON_USER_POWER5,
303 .pmc_type = PPC_PMC_IBM,
304 .oprofile_cpu_type = "ppc64/power5",
305 .oprofile_type = PPC_OPROFILE_POWER4,
306 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
307 * and above but only works on POWER5 and above
309 .oprofile_mmcra_sihv = MMCRA_SIHV,
310 .oprofile_mmcra_sipr = MMCRA_SIPR,
311 .machine_check = machine_check_generic,
312 .platform = "power5",
315 .pvr_mask = 0xffffff00,
316 .pvr_value = 0x003b0300,
317 .cpu_name = "POWER5+ (gs)",
318 .cpu_features = CPU_FTRS_POWER5,
319 .cpu_user_features = COMMON_USER_POWER5_PLUS,
323 .oprofile_cpu_type = "ppc64/power5++",
324 .oprofile_type = PPC_OPROFILE_POWER4,
325 .oprofile_mmcra_sihv = MMCRA_SIHV,
326 .oprofile_mmcra_sipr = MMCRA_SIPR,
327 .machine_check = machine_check_generic,
328 .platform = "power5+",
331 .pvr_mask = 0xffff0000,
332 .pvr_value = 0x003b0000,
333 .cpu_name = "POWER5+ (gs)",
334 .cpu_features = CPU_FTRS_POWER5,
335 .cpu_user_features = COMMON_USER_POWER5_PLUS,
339 .pmc_type = PPC_PMC_IBM,
340 .oprofile_cpu_type = "ppc64/power5+",
341 .oprofile_type = PPC_OPROFILE_POWER4,
342 .oprofile_mmcra_sihv = MMCRA_SIHV,
343 .oprofile_mmcra_sipr = MMCRA_SIPR,
344 .machine_check = machine_check_generic,
345 .platform = "power5+",
347 { /* POWER6 in P5+ mode; 2.04-compliant processor */
348 .pvr_mask = 0xffffffff,
349 .pvr_value = 0x0f000001,
350 .cpu_name = "POWER5+",
351 .cpu_features = CPU_FTRS_POWER5,
352 .cpu_user_features = COMMON_USER_POWER5_PLUS,
355 .machine_check = machine_check_generic,
356 .platform = "power5+",
359 .pvr_mask = 0xffff0000,
360 .pvr_value = 0x003e0000,
361 .cpu_name = "POWER6 (raw)",
362 .cpu_features = CPU_FTRS_POWER6,
363 .cpu_user_features = COMMON_USER_POWER6 |
364 PPC_FEATURE_POWER6_EXT,
368 .pmc_type = PPC_PMC_IBM,
369 .oprofile_cpu_type = "ppc64/power6",
370 .oprofile_type = PPC_OPROFILE_POWER4,
371 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
372 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
373 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
375 .machine_check = machine_check_generic,
376 .platform = "power6x",
378 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
379 .pvr_mask = 0xffffffff,
380 .pvr_value = 0x0f000002,
381 .cpu_name = "POWER6 (architected)",
382 .cpu_features = CPU_FTRS_POWER6,
383 .cpu_user_features = COMMON_USER_POWER6,
386 .machine_check = machine_check_generic,
387 .platform = "power6",
390 .pvr_mask = 0xffff0000,
391 .pvr_value = 0x003f0000,
392 .cpu_name = "POWER7",
393 .cpu_features = CPU_FTRS_POWER7,
394 .cpu_user_features = COMMON_USER_POWER7,
398 .pmc_type = PPC_PMC_IBM,
399 .cpu_setup = __setup_cpu_power7,
400 .cpu_restore = __restore_cpu_power7,
401 .oprofile_cpu_type = "ppc64/power7",
402 .oprofile_type = PPC_OPROFILE_POWER4,
403 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
404 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
405 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
407 .platform = "power7",
409 { /* Cell Broadband Engine */
410 .pvr_mask = 0xffff0000,
411 .pvr_value = 0x00700000,
412 .cpu_name = "Cell Broadband Engine",
413 .cpu_features = CPU_FTRS_CELL,
414 .cpu_user_features = COMMON_USER_PPC64 |
415 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
420 .pmc_type = PPC_PMC_IBM,
421 .oprofile_cpu_type = "ppc64/cell-be",
422 .oprofile_type = PPC_OPROFILE_CELL,
423 .machine_check = machine_check_generic,
424 .platform = "ppc-cell-be",
427 .pvr_mask = 0x7fff0000,
428 .pvr_value = 0x00900000,
430 .cpu_features = CPU_FTRS_PA6T,
431 .cpu_user_features = COMMON_USER_PA6T,
435 .pmc_type = PPC_PMC_PA6T,
436 .cpu_setup = __setup_cpu_pa6t,
437 .cpu_restore = __restore_cpu_pa6t,
438 .oprofile_cpu_type = "ppc64/pa6t",
439 .oprofile_type = PPC_OPROFILE_PA6T,
440 .machine_check = machine_check_generic,
443 { /* default match */
444 .pvr_mask = 0x00000000,
445 .pvr_value = 0x00000000,
446 .cpu_name = "POWER4 (compatible)",
447 .cpu_features = CPU_FTRS_COMPATIBLE,
448 .cpu_user_features = COMMON_USER_PPC64,
452 .pmc_type = PPC_PMC_IBM,
453 .machine_check = machine_check_generic,
454 .platform = "power4",
456 #endif /* CONFIG_PPC64 */
460 .pvr_mask = 0xffff0000,
461 .pvr_value = 0x00010000,
463 .cpu_features = CPU_FTRS_PPC601,
464 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
465 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
468 .machine_check = machine_check_generic,
469 .platform = "ppc601",
472 .pvr_mask = 0xffff0000,
473 .pvr_value = 0x00030000,
475 .cpu_features = CPU_FTRS_603,
476 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
479 .cpu_setup = __setup_cpu_603,
480 .machine_check = machine_check_generic,
481 .platform = "ppc603",
484 .pvr_mask = 0xffff0000,
485 .pvr_value = 0x00060000,
487 .cpu_features = CPU_FTRS_603,
488 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
491 .cpu_setup = __setup_cpu_603,
492 .machine_check = machine_check_generic,
493 .platform = "ppc603",
496 .pvr_mask = 0xffff0000,
497 .pvr_value = 0x00070000,
499 .cpu_features = CPU_FTRS_603,
500 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
503 .cpu_setup = __setup_cpu_603,
504 .machine_check = machine_check_generic,
505 .platform = "ppc603",
508 .pvr_mask = 0xffff0000,
509 .pvr_value = 0x00040000,
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 = 0xfffff000,
522 .pvr_value = 0x00090000,
524 .cpu_features = CPU_FTRS_604,
525 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
529 .cpu_setup = __setup_cpu_604,
530 .machine_check = machine_check_generic,
531 .platform = "ppc604",
534 .pvr_mask = 0xffff0000,
535 .pvr_value = 0x00090000,
537 .cpu_features = CPU_FTRS_604,
538 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
542 .cpu_setup = __setup_cpu_604,
543 .machine_check = machine_check_generic,
544 .platform = "ppc604",
547 .pvr_mask = 0xffff0000,
548 .pvr_value = 0x000a0000,
550 .cpu_features = CPU_FTRS_604,
551 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
555 .cpu_setup = __setup_cpu_604,
556 .machine_check = machine_check_generic,
557 .platform = "ppc604",
559 { /* 740/750 (0x4202, don't support TAU ?) */
560 .pvr_mask = 0xffffffff,
561 .pvr_value = 0x00084202,
562 .cpu_name = "740/750",
563 .cpu_features = CPU_FTRS_740_NOTAU,
564 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
568 .cpu_setup = __setup_cpu_750,
569 .machine_check = machine_check_generic,
570 .platform = "ppc750",
572 { /* 750CX (80100 and 8010x?) */
573 .pvr_mask = 0xfffffff0,
574 .pvr_value = 0x00080100,
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 { /* 750CX (82201 and 82202) */
586 .pvr_mask = 0xfffffff0,
587 .pvr_value = 0x00082200,
589 .cpu_features = CPU_FTRS_750,
590 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
594 .cpu_setup = __setup_cpu_750cx,
595 .machine_check = machine_check_generic,
596 .platform = "ppc750",
598 { /* 750CXe (82214) */
599 .pvr_mask = 0xfffffff0,
600 .pvr_value = 0x00082210,
601 .cpu_name = "750CXe",
602 .cpu_features = CPU_FTRS_750,
603 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
607 .cpu_setup = __setup_cpu_750cx,
608 .machine_check = machine_check_generic,
609 .platform = "ppc750",
611 { /* 750CXe "Gekko" (83214) */
612 .pvr_mask = 0xffffffff,
613 .pvr_value = 0x00083214,
614 .cpu_name = "750CXe",
615 .cpu_features = CPU_FTRS_750,
616 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
620 .cpu_setup = __setup_cpu_750cx,
621 .machine_check = machine_check_generic,
622 .platform = "ppc750",
625 .pvr_mask = 0xfffff0f0,
626 .pvr_value = 0x00087010,
628 .cpu_features = CPU_FTRS_750CL,
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",
638 .pvr_mask = 0xfffff000,
639 .pvr_value = 0x00083000,
640 .cpu_name = "745/755",
641 .cpu_features = CPU_FTRS_750,
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 rev 1.x */
651 .pvr_mask = 0xffffff00,
652 .pvr_value = 0x70000100,
654 .cpu_features = CPU_FTRS_750FX1,
655 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
659 .cpu_setup = __setup_cpu_750,
660 .machine_check = machine_check_generic,
661 .platform = "ppc750",
663 { /* 750FX rev 2.0 must disable HID0[DPM] */
664 .pvr_mask = 0xffffffff,
665 .pvr_value = 0x70000200,
667 .cpu_features = CPU_FTRS_750FX2,
668 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
672 .cpu_setup = __setup_cpu_750,
673 .machine_check = machine_check_generic,
674 .platform = "ppc750",
676 { /* 750FX (All revs except 2.0) */
677 .pvr_mask = 0xffff0000,
678 .pvr_value = 0x70000000,
680 .cpu_features = CPU_FTRS_750FX,
681 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
685 .cpu_setup = __setup_cpu_750fx,
686 .machine_check = machine_check_generic,
687 .platform = "ppc750",
690 .pvr_mask = 0xffff0000,
691 .pvr_value = 0x70020000,
693 .cpu_features = CPU_FTRS_750GX,
694 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
698 .cpu_setup = __setup_cpu_750fx,
699 .machine_check = machine_check_generic,
700 .platform = "ppc750",
702 { /* 740/750 (L2CR bit need fixup for 740) */
703 .pvr_mask = 0xffff0000,
704 .pvr_value = 0x00080000,
705 .cpu_name = "740/750",
706 .cpu_features = CPU_FTRS_740,
707 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
711 .cpu_setup = __setup_cpu_750,
712 .machine_check = machine_check_generic,
713 .platform = "ppc750",
715 { /* 7400 rev 1.1 ? (no TAU) */
716 .pvr_mask = 0xffffffff,
717 .pvr_value = 0x000c1101,
718 .cpu_name = "7400 (1.1)",
719 .cpu_features = CPU_FTRS_7400_NOTAU,
720 .cpu_user_features = COMMON_USER |
721 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
725 .cpu_setup = __setup_cpu_7400,
726 .machine_check = machine_check_generic,
727 .platform = "ppc7400",
730 .pvr_mask = 0xffff0000,
731 .pvr_value = 0x000c0000,
733 .cpu_features = CPU_FTRS_7400,
734 .cpu_user_features = COMMON_USER |
735 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
739 .cpu_setup = __setup_cpu_7400,
740 .machine_check = machine_check_generic,
741 .platform = "ppc7400",
744 .pvr_mask = 0xffff0000,
745 .pvr_value = 0x800c0000,
747 .cpu_features = CPU_FTRS_7400,
748 .cpu_user_features = COMMON_USER |
749 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
753 .cpu_setup = __setup_cpu_7410,
754 .machine_check = machine_check_generic,
755 .platform = "ppc7400",
757 { /* 7450 2.0 - no doze/nap */
758 .pvr_mask = 0xffffffff,
759 .pvr_value = 0x80000200,
761 .cpu_features = CPU_FTRS_7450_20,
762 .cpu_user_features = COMMON_USER |
763 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
767 .cpu_setup = __setup_cpu_745x,
768 .oprofile_cpu_type = "ppc/7450",
769 .oprofile_type = PPC_OPROFILE_G4,
770 .machine_check = machine_check_generic,
771 .platform = "ppc7450",
774 .pvr_mask = 0xffffffff,
775 .pvr_value = 0x80000201,
777 .cpu_features = CPU_FTRS_7450_21,
778 .cpu_user_features = COMMON_USER |
779 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
783 .cpu_setup = __setup_cpu_745x,
784 .oprofile_cpu_type = "ppc/7450",
785 .oprofile_type = PPC_OPROFILE_G4,
786 .machine_check = machine_check_generic,
787 .platform = "ppc7450",
789 { /* 7450 2.3 and newer */
790 .pvr_mask = 0xffff0000,
791 .pvr_value = 0x80000000,
793 .cpu_features = CPU_FTRS_7450_23,
794 .cpu_user_features = COMMON_USER |
795 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
799 .cpu_setup = __setup_cpu_745x,
800 .oprofile_cpu_type = "ppc/7450",
801 .oprofile_type = PPC_OPROFILE_G4,
802 .machine_check = machine_check_generic,
803 .platform = "ppc7450",
806 .pvr_mask = 0xffffff00,
807 .pvr_value = 0x80010100,
809 .cpu_features = CPU_FTRS_7455_1,
810 .cpu_user_features = COMMON_USER |
811 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
815 .cpu_setup = __setup_cpu_745x,
816 .oprofile_cpu_type = "ppc/7450",
817 .oprofile_type = PPC_OPROFILE_G4,
818 .machine_check = machine_check_generic,
819 .platform = "ppc7450",
822 .pvr_mask = 0xffffffff,
823 .pvr_value = 0x80010200,
825 .cpu_features = CPU_FTRS_7455_20,
826 .cpu_user_features = COMMON_USER |
827 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
831 .cpu_setup = __setup_cpu_745x,
832 .oprofile_cpu_type = "ppc/7450",
833 .oprofile_type = PPC_OPROFILE_G4,
834 .machine_check = machine_check_generic,
835 .platform = "ppc7450",
838 .pvr_mask = 0xffff0000,
839 .pvr_value = 0x80010000,
841 .cpu_features = CPU_FTRS_7455,
842 .cpu_user_features = COMMON_USER |
843 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
847 .cpu_setup = __setup_cpu_745x,
848 .oprofile_cpu_type = "ppc/7450",
849 .oprofile_type = PPC_OPROFILE_G4,
850 .machine_check = machine_check_generic,
851 .platform = "ppc7450",
853 { /* 7447/7457 Rev 1.0 */
854 .pvr_mask = 0xffffffff,
855 .pvr_value = 0x80020100,
856 .cpu_name = "7447/7457",
857 .cpu_features = CPU_FTRS_7447_10,
858 .cpu_user_features = COMMON_USER |
859 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
863 .cpu_setup = __setup_cpu_745x,
864 .oprofile_cpu_type = "ppc/7450",
865 .oprofile_type = PPC_OPROFILE_G4,
866 .machine_check = machine_check_generic,
867 .platform = "ppc7450",
869 { /* 7447/7457 Rev 1.1 */
870 .pvr_mask = 0xffffffff,
871 .pvr_value = 0x80020101,
872 .cpu_name = "7447/7457",
873 .cpu_features = CPU_FTRS_7447_10,
874 .cpu_user_features = COMMON_USER |
875 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
879 .cpu_setup = __setup_cpu_745x,
880 .oprofile_cpu_type = "ppc/7450",
881 .oprofile_type = PPC_OPROFILE_G4,
882 .machine_check = machine_check_generic,
883 .platform = "ppc7450",
885 { /* 7447/7457 Rev 1.2 and later */
886 .pvr_mask = 0xffff0000,
887 .pvr_value = 0x80020000,
888 .cpu_name = "7447/7457",
889 .cpu_features = CPU_FTRS_7447,
890 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
894 .cpu_setup = __setup_cpu_745x,
895 .oprofile_cpu_type = "ppc/7450",
896 .oprofile_type = PPC_OPROFILE_G4,
897 .machine_check = machine_check_generic,
898 .platform = "ppc7450",
901 .pvr_mask = 0xffff0000,
902 .pvr_value = 0x80030000,
904 .cpu_features = CPU_FTRS_7447A,
905 .cpu_user_features = COMMON_USER |
906 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
910 .cpu_setup = __setup_cpu_745x,
911 .oprofile_cpu_type = "ppc/7450",
912 .oprofile_type = PPC_OPROFILE_G4,
913 .machine_check = machine_check_generic,
914 .platform = "ppc7450",
917 .pvr_mask = 0xffff0000,
918 .pvr_value = 0x80040000,
920 .cpu_features = CPU_FTRS_7448,
921 .cpu_user_features = COMMON_USER |
922 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
926 .cpu_setup = __setup_cpu_745x,
927 .oprofile_cpu_type = "ppc/7450",
928 .oprofile_type = PPC_OPROFILE_G4,
929 .machine_check = machine_check_generic,
930 .platform = "ppc7450",
932 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
933 .pvr_mask = 0x7fff0000,
934 .pvr_value = 0x00810000,
936 .cpu_features = CPU_FTRS_82XX,
937 .cpu_user_features = COMMON_USER,
940 .cpu_setup = __setup_cpu_603,
941 .machine_check = machine_check_generic,
942 .platform = "ppc603",
944 { /* All G2_LE (603e core, plus some) have the same pvr */
945 .pvr_mask = 0x7fff0000,
946 .pvr_value = 0x00820000,
948 .cpu_features = CPU_FTRS_G2_LE,
949 .cpu_user_features = COMMON_USER,
952 .cpu_setup = __setup_cpu_603,
953 .machine_check = machine_check_generic,
954 .platform = "ppc603",
956 { /* e300c1 (a 603e core, plus some) on 83xx */
957 .pvr_mask = 0x7fff0000,
958 .pvr_value = 0x00830000,
959 .cpu_name = "e300c1",
960 .cpu_features = CPU_FTRS_E300,
961 .cpu_user_features = COMMON_USER,
964 .cpu_setup = __setup_cpu_603,
965 .machine_check = machine_check_generic,
966 .platform = "ppc603",
968 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
969 .pvr_mask = 0x7fff0000,
970 .pvr_value = 0x00840000,
971 .cpu_name = "e300c2",
972 .cpu_features = CPU_FTRS_E300C2,
973 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
976 .cpu_setup = __setup_cpu_603,
977 .machine_check = machine_check_generic,
978 .platform = "ppc603",
980 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
981 .pvr_mask = 0x7fff0000,
982 .pvr_value = 0x00850000,
983 .cpu_name = "e300c3",
984 .cpu_features = CPU_FTRS_E300,
985 .cpu_user_features = COMMON_USER,
988 .cpu_setup = __setup_cpu_603,
990 .oprofile_cpu_type = "ppc/e300",
991 .oprofile_type = PPC_OPROFILE_FSL_EMB,
992 .platform = "ppc603",
994 { /* e300c4 (e300c1, plus one IU) */
995 .pvr_mask = 0x7fff0000,
996 .pvr_value = 0x00860000,
997 .cpu_name = "e300c4",
998 .cpu_features = CPU_FTRS_E300,
999 .cpu_user_features = COMMON_USER,
1002 .cpu_setup = __setup_cpu_603,
1003 .machine_check = machine_check_generic,
1005 .oprofile_cpu_type = "ppc/e300",
1006 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1007 .platform = "ppc603",
1009 { /* default match, we assume split I/D cache & TB (non-601)... */
1010 .pvr_mask = 0x00000000,
1011 .pvr_value = 0x00000000,
1012 .cpu_name = "(generic PPC)",
1013 .cpu_features = CPU_FTRS_CLASSIC32,
1014 .cpu_user_features = COMMON_USER,
1017 .machine_check = machine_check_generic,
1018 .platform = "ppc603",
1020 #endif /* CLASSIC_PPC */
1023 .pvr_mask = 0xffff0000,
1024 .pvr_value = 0x00500000,
1026 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1027 * if the 8xx code is there.... */
1028 .cpu_features = CPU_FTRS_8XX,
1029 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1032 .platform = "ppc823",
1034 #endif /* CONFIG_8xx */
1037 .pvr_mask = 0xffffff00,
1038 .pvr_value = 0x00200200,
1039 .cpu_name = "403GC",
1040 .cpu_features = CPU_FTRS_40X,
1041 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1044 .machine_check = machine_check_4xx,
1045 .platform = "ppc403",
1048 .pvr_mask = 0xffffff00,
1049 .pvr_value = 0x00201400,
1050 .cpu_name = "403GCX",
1051 .cpu_features = CPU_FTRS_40X,
1052 .cpu_user_features = PPC_FEATURE_32 |
1053 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
1056 .machine_check = machine_check_4xx,
1057 .platform = "ppc403",
1060 .pvr_mask = 0xffff0000,
1061 .pvr_value = 0x00200000,
1062 .cpu_name = "403G ??",
1063 .cpu_features = CPU_FTRS_40X,
1064 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1067 .machine_check = machine_check_4xx,
1068 .platform = "ppc403",
1071 .pvr_mask = 0xffff0000,
1072 .pvr_value = 0x40110000,
1073 .cpu_name = "405GP",
1074 .cpu_features = CPU_FTRS_40X,
1075 .cpu_user_features = PPC_FEATURE_32 |
1076 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1079 .machine_check = machine_check_4xx,
1080 .platform = "ppc405",
1083 .pvr_mask = 0xffff0000,
1084 .pvr_value = 0x40130000,
1085 .cpu_name = "STB03xxx",
1086 .cpu_features = CPU_FTRS_40X,
1087 .cpu_user_features = PPC_FEATURE_32 |
1088 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1091 .machine_check = machine_check_4xx,
1092 .platform = "ppc405",
1095 .pvr_mask = 0xffff0000,
1096 .pvr_value = 0x41810000,
1097 .cpu_name = "STB04xxx",
1098 .cpu_features = CPU_FTRS_40X,
1099 .cpu_user_features = PPC_FEATURE_32 |
1100 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1103 .machine_check = machine_check_4xx,
1104 .platform = "ppc405",
1107 .pvr_mask = 0xffff0000,
1108 .pvr_value = 0x41610000,
1109 .cpu_name = "NP405L",
1110 .cpu_features = CPU_FTRS_40X,
1111 .cpu_user_features = PPC_FEATURE_32 |
1112 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1115 .machine_check = machine_check_4xx,
1116 .platform = "ppc405",
1119 .pvr_mask = 0xffff0000,
1120 .pvr_value = 0x40B10000,
1121 .cpu_name = "NP4GS3",
1122 .cpu_features = CPU_FTRS_40X,
1123 .cpu_user_features = PPC_FEATURE_32 |
1124 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1127 .machine_check = machine_check_4xx,
1128 .platform = "ppc405",
1131 .pvr_mask = 0xffff0000,
1132 .pvr_value = 0x41410000,
1133 .cpu_name = "NP405H",
1134 .cpu_features = CPU_FTRS_40X,
1135 .cpu_user_features = PPC_FEATURE_32 |
1136 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1139 .machine_check = machine_check_4xx,
1140 .platform = "ppc405",
1143 .pvr_mask = 0xffff0000,
1144 .pvr_value = 0x50910000,
1145 .cpu_name = "405GPr",
1146 .cpu_features = CPU_FTRS_40X,
1147 .cpu_user_features = PPC_FEATURE_32 |
1148 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1151 .machine_check = machine_check_4xx,
1152 .platform = "ppc405",
1155 .pvr_mask = 0xffff0000,
1156 .pvr_value = 0x51510000,
1157 .cpu_name = "STBx25xx",
1158 .cpu_features = CPU_FTRS_40X,
1159 .cpu_user_features = PPC_FEATURE_32 |
1160 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1163 .machine_check = machine_check_4xx,
1164 .platform = "ppc405",
1167 .pvr_mask = 0xffff0000,
1168 .pvr_value = 0x41F10000,
1169 .cpu_name = "405LP",
1170 .cpu_features = CPU_FTRS_40X,
1171 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1174 .machine_check = machine_check_4xx,
1175 .platform = "ppc405",
1177 { /* Xilinx Virtex-II Pro */
1178 .pvr_mask = 0xfffff000,
1179 .pvr_value = 0x20010000,
1180 .cpu_name = "Virtex-II Pro",
1181 .cpu_features = CPU_FTRS_40X,
1182 .cpu_user_features = PPC_FEATURE_32 |
1183 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1186 .machine_check = machine_check_4xx,
1187 .platform = "ppc405",
1189 { /* Xilinx Virtex-4 FX */
1190 .pvr_mask = 0xfffff000,
1191 .pvr_value = 0x20011000,
1192 .cpu_name = "Virtex-4 FX",
1193 .cpu_features = CPU_FTRS_40X,
1194 .cpu_user_features = PPC_FEATURE_32 |
1195 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1198 .machine_check = machine_check_4xx,
1199 .platform = "ppc405",
1202 .pvr_mask = 0xffff0000,
1203 .pvr_value = 0x51210000,
1204 .cpu_name = "405EP",
1205 .cpu_features = CPU_FTRS_40X,
1206 .cpu_user_features = PPC_FEATURE_32 |
1207 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1210 .machine_check = machine_check_4xx,
1211 .platform = "ppc405",
1214 .pvr_mask = 0xffff0004,
1215 .pvr_value = 0x12910004,
1216 .cpu_name = "405EX",
1217 .cpu_features = CPU_FTRS_40X,
1218 .cpu_user_features = PPC_FEATURE_32 |
1219 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1222 .machine_check = machine_check_4xx,
1223 .platform = "ppc405",
1226 .pvr_mask = 0xffff0004,
1227 .pvr_value = 0x12910000,
1228 .cpu_name = "405EXr",
1229 .cpu_features = CPU_FTRS_40X,
1230 .cpu_user_features = PPC_FEATURE_32 |
1231 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1234 .machine_check = machine_check_4xx,
1235 .platform = "ppc405",
1237 { /* default match */
1238 .pvr_mask = 0x00000000,
1239 .pvr_value = 0x00000000,
1240 .cpu_name = "(generic 40x PPC)",
1241 .cpu_features = CPU_FTRS_40X,
1242 .cpu_user_features = PPC_FEATURE_32 |
1243 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1246 .machine_check = machine_check_4xx,
1247 .platform = "ppc405",
1250 #endif /* CONFIG_40x */
1253 .pvr_mask = 0xf0000fff,
1254 .pvr_value = 0x40000850,
1255 .cpu_name = "440GR Rev. A",
1256 .cpu_features = CPU_FTRS_44X,
1257 .cpu_user_features = COMMON_USER_BOOKE,
1260 .machine_check = machine_check_4xx,
1261 .platform = "ppc440",
1263 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1264 .pvr_mask = 0xf0000fff,
1265 .pvr_value = 0x40000858,
1266 .cpu_name = "440EP Rev. A",
1267 .cpu_features = CPU_FTRS_44X,
1268 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1271 .cpu_setup = __setup_cpu_440ep,
1272 .machine_check = machine_check_4xx,
1273 .platform = "ppc440",
1276 .pvr_mask = 0xf0000fff,
1277 .pvr_value = 0x400008d3,
1278 .cpu_name = "440GR Rev. B",
1279 .cpu_features = CPU_FTRS_44X,
1280 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1283 .machine_check = machine_check_4xx,
1284 .platform = "ppc440",
1286 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1287 .pvr_mask = 0xf0000ff7,
1288 .pvr_value = 0x400008d4,
1289 .cpu_name = "440EP Rev. C",
1290 .cpu_features = CPU_FTRS_44X,
1291 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1294 .cpu_setup = __setup_cpu_440ep,
1295 .machine_check = machine_check_4xx,
1296 .platform = "ppc440",
1298 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1299 .pvr_mask = 0xf0000fff,
1300 .pvr_value = 0x400008db,
1301 .cpu_name = "440EP Rev. B",
1302 .cpu_features = CPU_FTRS_44X,
1303 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1306 .cpu_setup = __setup_cpu_440ep,
1307 .machine_check = machine_check_4xx,
1308 .platform = "ppc440",
1311 .pvr_mask = 0xf0000ffb,
1312 .pvr_value = 0x200008D0,
1313 .cpu_name = "440GRX",
1314 .cpu_features = CPU_FTRS_44X,
1315 .cpu_user_features = COMMON_USER_BOOKE,
1318 .cpu_setup = __setup_cpu_440grx,
1319 .machine_check = machine_check_440A,
1320 .platform = "ppc440",
1322 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1323 .pvr_mask = 0xf0000ffb,
1324 .pvr_value = 0x200008D8,
1325 .cpu_name = "440EPX",
1326 .cpu_features = CPU_FTRS_44X,
1327 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1330 .cpu_setup = __setup_cpu_440epx,
1331 .machine_check = machine_check_440A,
1332 .platform = "ppc440",
1334 { /* 440GP Rev. B */
1335 .pvr_mask = 0xf0000fff,
1336 .pvr_value = 0x40000440,
1337 .cpu_name = "440GP Rev. B",
1338 .cpu_features = CPU_FTRS_44X,
1339 .cpu_user_features = COMMON_USER_BOOKE,
1342 .machine_check = machine_check_4xx,
1343 .platform = "ppc440gp",
1345 { /* 440GP Rev. C */
1346 .pvr_mask = 0xf0000fff,
1347 .pvr_value = 0x40000481,
1348 .cpu_name = "440GP Rev. C",
1349 .cpu_features = CPU_FTRS_44X,
1350 .cpu_user_features = COMMON_USER_BOOKE,
1353 .machine_check = machine_check_4xx,
1354 .platform = "ppc440gp",
1356 { /* 440GX Rev. A */
1357 .pvr_mask = 0xf0000fff,
1358 .pvr_value = 0x50000850,
1359 .cpu_name = "440GX Rev. A",
1360 .cpu_features = CPU_FTRS_44X,
1361 .cpu_user_features = COMMON_USER_BOOKE,
1364 .cpu_setup = __setup_cpu_440gx,
1365 .machine_check = machine_check_440A,
1366 .platform = "ppc440",
1368 { /* 440GX Rev. B */
1369 .pvr_mask = 0xf0000fff,
1370 .pvr_value = 0x50000851,
1371 .cpu_name = "440GX Rev. B",
1372 .cpu_features = CPU_FTRS_44X,
1373 .cpu_user_features = COMMON_USER_BOOKE,
1376 .cpu_setup = __setup_cpu_440gx,
1377 .machine_check = machine_check_440A,
1378 .platform = "ppc440",
1380 { /* 440GX Rev. C */
1381 .pvr_mask = 0xf0000fff,
1382 .pvr_value = 0x50000892,
1383 .cpu_name = "440GX Rev. C",
1384 .cpu_features = CPU_FTRS_44X,
1385 .cpu_user_features = COMMON_USER_BOOKE,
1388 .cpu_setup = __setup_cpu_440gx,
1389 .machine_check = machine_check_440A,
1390 .platform = "ppc440",
1392 { /* 440GX Rev. F */
1393 .pvr_mask = 0xf0000fff,
1394 .pvr_value = 0x50000894,
1395 .cpu_name = "440GX Rev. F",
1396 .cpu_features = CPU_FTRS_44X,
1397 .cpu_user_features = COMMON_USER_BOOKE,
1400 .cpu_setup = __setup_cpu_440gx,
1401 .machine_check = machine_check_440A,
1402 .platform = "ppc440",
1404 { /* 440SP Rev. A */
1405 .pvr_mask = 0xfff00fff,
1406 .pvr_value = 0x53200891,
1407 .cpu_name = "440SP Rev. A",
1408 .cpu_features = CPU_FTRS_44X,
1409 .cpu_user_features = COMMON_USER_BOOKE,
1412 .machine_check = machine_check_4xx,
1413 .platform = "ppc440",
1415 { /* 440SPe Rev. A */
1416 .pvr_mask = 0xfff00fff,
1417 .pvr_value = 0x53400890,
1418 .cpu_name = "440SPe Rev. A",
1419 .cpu_features = CPU_FTRS_44X,
1420 .cpu_user_features = COMMON_USER_BOOKE,
1423 .cpu_setup = __setup_cpu_440spe,
1424 .machine_check = machine_check_440A,
1425 .platform = "ppc440",
1427 { /* 440SPe Rev. B */
1428 .pvr_mask = 0xfff00fff,
1429 .pvr_value = 0x53400891,
1430 .cpu_name = "440SPe Rev. B",
1431 .cpu_features = CPU_FTRS_44X,
1432 .cpu_user_features = COMMON_USER_BOOKE,
1435 .cpu_setup = __setup_cpu_440spe,
1436 .machine_check = machine_check_440A,
1437 .platform = "ppc440",
1440 .pvr_mask = 0xffff0002,
1441 .pvr_value = 0x13020002,
1442 .cpu_name = "460EX",
1443 .cpu_features = CPU_FTRS_44X,
1444 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1447 .cpu_setup = __setup_cpu_460ex,
1448 .machine_check = machine_check_440A,
1449 .platform = "ppc440",
1452 .pvr_mask = 0xffff0002,
1453 .pvr_value = 0x13020000,
1454 .cpu_name = "460GT",
1455 .cpu_features = CPU_FTRS_44X,
1456 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1459 .cpu_setup = __setup_cpu_460gt,
1460 .machine_check = machine_check_440A,
1461 .platform = "ppc440",
1463 { /* default match */
1464 .pvr_mask = 0x00000000,
1465 .pvr_value = 0x00000000,
1466 .cpu_name = "(generic 44x PPC)",
1467 .cpu_features = CPU_FTRS_44X,
1468 .cpu_user_features = COMMON_USER_BOOKE,
1471 .machine_check = machine_check_4xx,
1472 .platform = "ppc440",
1474 #endif /* CONFIG_44x */
1477 .pvr_mask = 0xfff00000,
1478 .pvr_value = 0x81000000,
1479 .cpu_name = "e200z5",
1480 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1481 .cpu_features = CPU_FTRS_E200,
1482 .cpu_user_features = COMMON_USER_BOOKE |
1483 PPC_FEATURE_HAS_EFP_SINGLE |
1484 PPC_FEATURE_UNIFIED_CACHE,
1486 .machine_check = machine_check_e200,
1487 .platform = "ppc5554",
1490 .pvr_mask = 0xfff00000,
1491 .pvr_value = 0x81100000,
1492 .cpu_name = "e200z6",
1493 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1494 .cpu_features = CPU_FTRS_E200,
1495 .cpu_user_features = COMMON_USER_BOOKE |
1496 PPC_FEATURE_HAS_SPE_COMP |
1497 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1498 PPC_FEATURE_UNIFIED_CACHE,
1500 .machine_check = machine_check_e200,
1501 .platform = "ppc5554",
1503 { /* default match */
1504 .pvr_mask = 0x00000000,
1505 .pvr_value = 0x00000000,
1506 .cpu_name = "(generic E200 PPC)",
1507 .cpu_features = CPU_FTRS_E200,
1508 .cpu_user_features = COMMON_USER_BOOKE |
1509 PPC_FEATURE_HAS_EFP_SINGLE |
1510 PPC_FEATURE_UNIFIED_CACHE,
1512 .machine_check = machine_check_e200,
1513 .platform = "ppc5554",
1515 #endif /* CONFIG_E200 */
1518 .pvr_mask = 0xffff0000,
1519 .pvr_value = 0x80200000,
1521 .cpu_features = CPU_FTRS_E500,
1522 .cpu_user_features = COMMON_USER_BOOKE |
1523 PPC_FEATURE_HAS_SPE_COMP |
1524 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
1528 .oprofile_cpu_type = "ppc/e500",
1529 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1530 .machine_check = machine_check_e500,
1531 .platform = "ppc8540",
1534 .pvr_mask = 0xffff0000,
1535 .pvr_value = 0x80210000,
1536 .cpu_name = "e500v2",
1537 .cpu_features = CPU_FTRS_E500_2,
1538 .cpu_user_features = COMMON_USER_BOOKE |
1539 PPC_FEATURE_HAS_SPE_COMP |
1540 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1541 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
1545 .oprofile_cpu_type = "ppc/e500",
1546 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1547 .machine_check = machine_check_e500,
1548 .platform = "ppc8548",
1551 .pvr_mask = 0xffff0000,
1552 .pvr_value = 0x80230000,
1553 .cpu_name = "e500mc",
1554 .cpu_features = CPU_FTRS_E500MC,
1555 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1559 .oprofile_cpu_type = "ppc/e500", /* xxx - galak, e500mc? */
1560 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1561 .machine_check = machine_check_e500,
1562 .platform = "ppce500mc",
1564 { /* default match */
1565 .pvr_mask = 0x00000000,
1566 .pvr_value = 0x00000000,
1567 .cpu_name = "(generic E500 PPC)",
1568 .cpu_features = CPU_FTRS_E500,
1569 .cpu_user_features = COMMON_USER_BOOKE |
1570 PPC_FEATURE_HAS_SPE_COMP |
1571 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
1574 .machine_check = machine_check_e500,
1575 .platform = "powerpc",
1577 #endif /* CONFIG_E500 */
1578 #endif /* CONFIG_PPC32 */
1581 static struct cpu_spec the_cpu_spec;
1583 struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
1585 struct cpu_spec *s = cpu_specs;
1586 struct cpu_spec *t = &the_cpu_spec;
1592 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
1593 if ((pvr & s->pvr_mask) == s->pvr_value) {
1595 * If we are overriding a previous value derived
1596 * from the real PVR with a new value obtained
1597 * using a logical PVR value, don't modify the
1598 * performance monitor fields.
1600 if (t->num_pmcs && !s->num_pmcs) {
1601 t->cpu_name = s->cpu_name;
1602 t->cpu_features = s->cpu_features;
1603 t->cpu_user_features = s->cpu_user_features;
1604 t->icache_bsize = s->icache_bsize;
1605 t->dcache_bsize = s->dcache_bsize;
1606 t->cpu_setup = s->cpu_setup;
1607 t->cpu_restore = s->cpu_restore;
1608 t->platform = s->platform;
1611 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
1612 #if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
1613 /* ppc64 and booke expect identify_cpu to also call
1614 * setup_cpu for that processor. I will consolidate
1615 * that at a later time, for now, just use #ifdef.
1616 * we also don't need to PTRRELOC the function pointer
1617 * on ppc64 and booke as we are running at 0 in real
1618 * mode on ppc64 and reloc_offset is always 0 on booke.
1621 s->cpu_setup(offset, s);
1623 #endif /* CONFIG_PPC64 || CONFIG_BOOKE */
1630 void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)
1632 struct fixup_entry {
1634 unsigned long value;
1642 for (; fcur < fend; fcur++) {
1643 unsigned int *pstart, *pend, *p;
1645 if ((value & fcur->mask) == fcur->value)
1648 /* These PTRRELOCs will disappear once the new scheme for
1649 * modules and vdso is implemented
1651 pstart = ((unsigned int *)fcur) + (fcur->start_off / 4);
1652 pend = ((unsigned int *)fcur) + (fcur->end_off / 4);
1654 for (p = pstart; p < pend; p++) {
1656 asm volatile ("dcbst 0, %0" : : "r" (p));
1658 asm volatile ("sync" : : : "memory");
1659 for (p = pstart; p < pend; p++)
1660 asm volatile ("icbi 0,%0" : : "r" (p));
1661 asm volatile ("sync; isync" : : : "memory");