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);
26 /* The platform string corresponding to the real PVR */
27 const char *powerpc_base_platform;
30 * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's
31 * the responsibility of the appropriate CPU save/restore functions to
32 * eventually copy these settings over. Those save/restore aren't yet
33 * part of the cputable though. That has to be fixed for both ppc32
37 extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
38 extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
39 extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
40 extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
41 extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
42 extern void __setup_cpu_440x5(unsigned long offset, struct cpu_spec* spec);
43 extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec);
44 extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec);
45 extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
46 extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
47 extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
48 extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
49 extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
50 extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
51 extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
52 extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
53 #endif /* CONFIG_PPC32 */
55 extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
56 extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
57 extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
58 extern void __restore_cpu_pa6t(void);
59 extern void __restore_cpu_ppc970(void);
60 extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec);
61 extern void __restore_cpu_power7(void);
62 #endif /* CONFIG_PPC64 */
64 /* This table only contains "desktop" CPUs, it need to be filled with embedded
67 #define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
69 #define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
70 #define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
71 #define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
72 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
73 #define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
74 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
75 #define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
76 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
77 PPC_FEATURE_TRUE_LE | \
78 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
79 #define COMMON_USER_POWER7 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
80 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
81 PPC_FEATURE_TRUE_LE | \
82 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
83 #define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
84 PPC_FEATURE_TRUE_LE | \
85 PPC_FEATURE_HAS_ALTIVEC_COMP)
86 #define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
89 static struct cpu_spec __initdata cpu_specs[] = {
92 .pvr_mask = 0xffff0000,
93 .pvr_value = 0x00400000,
94 .cpu_name = "POWER3 (630)",
95 .cpu_features = CPU_FTRS_POWER3,
96 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
100 .pmc_type = PPC_PMC_IBM,
101 .oprofile_cpu_type = "ppc64/power3",
102 .oprofile_type = PPC_OPROFILE_RS64,
103 .machine_check = machine_check_generic,
104 .platform = "power3",
107 .pvr_mask = 0xffff0000,
108 .pvr_value = 0x00410000,
109 .cpu_name = "POWER3 (630+)",
110 .cpu_features = CPU_FTRS_POWER3,
111 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
115 .pmc_type = PPC_PMC_IBM,
116 .oprofile_cpu_type = "ppc64/power3",
117 .oprofile_type = PPC_OPROFILE_RS64,
118 .machine_check = machine_check_generic,
119 .platform = "power3",
122 .pvr_mask = 0xffff0000,
123 .pvr_value = 0x00330000,
124 .cpu_name = "RS64-II (northstar)",
125 .cpu_features = CPU_FTRS_RS64,
126 .cpu_user_features = COMMON_USER_PPC64,
130 .pmc_type = PPC_PMC_IBM,
131 .oprofile_cpu_type = "ppc64/rs64",
132 .oprofile_type = PPC_OPROFILE_RS64,
133 .machine_check = machine_check_generic,
137 .pvr_mask = 0xffff0000,
138 .pvr_value = 0x00340000,
139 .cpu_name = "RS64-III (pulsar)",
140 .cpu_features = CPU_FTRS_RS64,
141 .cpu_user_features = COMMON_USER_PPC64,
145 .pmc_type = PPC_PMC_IBM,
146 .oprofile_cpu_type = "ppc64/rs64",
147 .oprofile_type = PPC_OPROFILE_RS64,
148 .machine_check = machine_check_generic,
152 .pvr_mask = 0xffff0000,
153 .pvr_value = 0x00360000,
154 .cpu_name = "RS64-III (icestar)",
155 .cpu_features = CPU_FTRS_RS64,
156 .cpu_user_features = COMMON_USER_PPC64,
160 .pmc_type = PPC_PMC_IBM,
161 .oprofile_cpu_type = "ppc64/rs64",
162 .oprofile_type = PPC_OPROFILE_RS64,
163 .machine_check = machine_check_generic,
167 .pvr_mask = 0xffff0000,
168 .pvr_value = 0x00370000,
169 .cpu_name = "RS64-IV (sstar)",
170 .cpu_features = CPU_FTRS_RS64,
171 .cpu_user_features = COMMON_USER_PPC64,
175 .pmc_type = PPC_PMC_IBM,
176 .oprofile_cpu_type = "ppc64/rs64",
177 .oprofile_type = PPC_OPROFILE_RS64,
178 .machine_check = machine_check_generic,
182 .pvr_mask = 0xffff0000,
183 .pvr_value = 0x00350000,
184 .cpu_name = "POWER4 (gp)",
185 .cpu_features = CPU_FTRS_POWER4,
186 .cpu_user_features = COMMON_USER_POWER4,
190 .pmc_type = PPC_PMC_IBM,
191 .oprofile_cpu_type = "ppc64/power4",
192 .oprofile_type = PPC_OPROFILE_POWER4,
193 .machine_check = machine_check_generic,
194 .platform = "power4",
197 .pvr_mask = 0xffff0000,
198 .pvr_value = 0x00380000,
199 .cpu_name = "POWER4+ (gq)",
200 .cpu_features = CPU_FTRS_POWER4,
201 .cpu_user_features = COMMON_USER_POWER4,
205 .pmc_type = PPC_PMC_IBM,
206 .oprofile_cpu_type = "ppc64/power4",
207 .oprofile_type = PPC_OPROFILE_POWER4,
208 .machine_check = machine_check_generic,
209 .platform = "power4",
212 .pvr_mask = 0xffff0000,
213 .pvr_value = 0x00390000,
214 .cpu_name = "PPC970",
215 .cpu_features = CPU_FTRS_PPC970,
216 .cpu_user_features = COMMON_USER_POWER4 |
217 PPC_FEATURE_HAS_ALTIVEC_COMP,
221 .pmc_type = PPC_PMC_IBM,
222 .cpu_setup = __setup_cpu_ppc970,
223 .cpu_restore = __restore_cpu_ppc970,
224 .oprofile_cpu_type = "ppc64/970",
225 .oprofile_type = PPC_OPROFILE_POWER4,
226 .machine_check = machine_check_generic,
227 .platform = "ppc970",
230 .pvr_mask = 0xffff0000,
231 .pvr_value = 0x003c0000,
232 .cpu_name = "PPC970FX",
233 .cpu_features = CPU_FTRS_PPC970,
234 .cpu_user_features = COMMON_USER_POWER4 |
235 PPC_FEATURE_HAS_ALTIVEC_COMP,
239 .pmc_type = PPC_PMC_IBM,
240 .cpu_setup = __setup_cpu_ppc970,
241 .cpu_restore = __restore_cpu_ppc970,
242 .oprofile_cpu_type = "ppc64/970",
243 .oprofile_type = PPC_OPROFILE_POWER4,
244 .machine_check = machine_check_generic,
245 .platform = "ppc970",
247 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
248 .pvr_mask = 0xffffffff,
249 .pvr_value = 0x00440100,
250 .cpu_name = "PPC970MP",
251 .cpu_features = CPU_FTRS_PPC970,
252 .cpu_user_features = COMMON_USER_POWER4 |
253 PPC_FEATURE_HAS_ALTIVEC_COMP,
257 .pmc_type = PPC_PMC_IBM,
258 .cpu_setup = __setup_cpu_ppc970,
259 .cpu_restore = __restore_cpu_ppc970,
260 .oprofile_cpu_type = "ppc64/970MP",
261 .oprofile_type = PPC_OPROFILE_POWER4,
262 .machine_check = machine_check_generic,
263 .platform = "ppc970",
266 .pvr_mask = 0xffff0000,
267 .pvr_value = 0x00440000,
268 .cpu_name = "PPC970MP",
269 .cpu_features = CPU_FTRS_PPC970,
270 .cpu_user_features = COMMON_USER_POWER4 |
271 PPC_FEATURE_HAS_ALTIVEC_COMP,
275 .pmc_type = PPC_PMC_IBM,
276 .cpu_setup = __setup_cpu_ppc970MP,
277 .cpu_restore = __restore_cpu_ppc970,
278 .oprofile_cpu_type = "ppc64/970MP",
279 .oprofile_type = PPC_OPROFILE_POWER4,
280 .machine_check = machine_check_generic,
281 .platform = "ppc970",
284 .pvr_mask = 0xffff0000,
285 .pvr_value = 0x00450000,
286 .cpu_name = "PPC970GX",
287 .cpu_features = CPU_FTRS_PPC970,
288 .cpu_user_features = COMMON_USER_POWER4 |
289 PPC_FEATURE_HAS_ALTIVEC_COMP,
293 .pmc_type = PPC_PMC_IBM,
294 .cpu_setup = __setup_cpu_ppc970,
295 .oprofile_cpu_type = "ppc64/970",
296 .oprofile_type = PPC_OPROFILE_POWER4,
297 .machine_check = machine_check_generic,
298 .platform = "ppc970",
301 .pvr_mask = 0xffff0000,
302 .pvr_value = 0x003a0000,
303 .cpu_name = "POWER5 (gr)",
304 .cpu_features = CPU_FTRS_POWER5,
305 .cpu_user_features = COMMON_USER_POWER5,
309 .pmc_type = PPC_PMC_IBM,
310 .oprofile_cpu_type = "ppc64/power5",
311 .oprofile_type = PPC_OPROFILE_POWER4,
312 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
313 * and above but only works on POWER5 and above
315 .oprofile_mmcra_sihv = MMCRA_SIHV,
316 .oprofile_mmcra_sipr = MMCRA_SIPR,
317 .machine_check = machine_check_generic,
318 .platform = "power5",
321 .pvr_mask = 0xffffff00,
322 .pvr_value = 0x003b0300,
323 .cpu_name = "POWER5+ (gs)",
324 .cpu_features = CPU_FTRS_POWER5,
325 .cpu_user_features = COMMON_USER_POWER5_PLUS,
329 .oprofile_cpu_type = "ppc64/power5++",
330 .oprofile_type = PPC_OPROFILE_POWER4,
331 .oprofile_mmcra_sihv = MMCRA_SIHV,
332 .oprofile_mmcra_sipr = MMCRA_SIPR,
333 .machine_check = machine_check_generic,
334 .platform = "power5+",
337 .pvr_mask = 0xffff0000,
338 .pvr_value = 0x003b0000,
339 .cpu_name = "POWER5+ (gs)",
340 .cpu_features = CPU_FTRS_POWER5,
341 .cpu_user_features = COMMON_USER_POWER5_PLUS,
345 .pmc_type = PPC_PMC_IBM,
346 .oprofile_cpu_type = "ppc64/power5+",
347 .oprofile_type = PPC_OPROFILE_POWER4,
348 .oprofile_mmcra_sihv = MMCRA_SIHV,
349 .oprofile_mmcra_sipr = MMCRA_SIPR,
350 .machine_check = machine_check_generic,
351 .platform = "power5+",
353 { /* POWER6 in P5+ mode; 2.04-compliant processor */
354 .pvr_mask = 0xffffffff,
355 .pvr_value = 0x0f000001,
356 .cpu_name = "POWER5+",
357 .cpu_features = CPU_FTRS_POWER5,
358 .cpu_user_features = COMMON_USER_POWER5_PLUS,
361 .machine_check = machine_check_generic,
362 .oprofile_cpu_type = "ppc64/compat-power5+",
363 .platform = "power5+",
366 .pvr_mask = 0xffff0000,
367 .pvr_value = 0x003e0000,
368 .cpu_name = "POWER6 (raw)",
369 .cpu_features = CPU_FTRS_POWER6,
370 .cpu_user_features = COMMON_USER_POWER6 |
371 PPC_FEATURE_POWER6_EXT,
375 .pmc_type = PPC_PMC_IBM,
376 .oprofile_cpu_type = "ppc64/power6",
377 .oprofile_type = PPC_OPROFILE_POWER4,
378 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
379 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
380 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
382 .machine_check = machine_check_generic,
383 .platform = "power6x",
385 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
386 .pvr_mask = 0xffffffff,
387 .pvr_value = 0x0f000002,
388 .cpu_name = "POWER6 (architected)",
389 .cpu_features = CPU_FTRS_POWER6,
390 .cpu_user_features = COMMON_USER_POWER6,
393 .machine_check = machine_check_generic,
394 .oprofile_cpu_type = "ppc64/compat-power6",
395 .platform = "power6",
397 { /* 2.06-compliant processor, i.e. Power7 "architected" mode */
398 .pvr_mask = 0xffffffff,
399 .pvr_value = 0x0f000003,
400 .cpu_name = "POWER7 (architected)",
401 .cpu_features = CPU_FTRS_POWER7,
402 .cpu_user_features = COMMON_USER_POWER7,
405 .machine_check = machine_check_generic,
406 .oprofile_cpu_type = "ppc64/compat-power7",
407 .platform = "power7",
410 .pvr_mask = 0xffff0000,
411 .pvr_value = 0x003f0000,
412 .cpu_name = "POWER7 (raw)",
413 .cpu_features = CPU_FTRS_POWER7,
414 .cpu_user_features = COMMON_USER_POWER7,
418 .pmc_type = PPC_PMC_IBM,
419 .cpu_setup = __setup_cpu_power7,
420 .cpu_restore = __restore_cpu_power7,
421 .oprofile_cpu_type = "ppc64/power7",
422 .oprofile_type = PPC_OPROFILE_POWER4,
423 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
424 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
425 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
427 .platform = "power7",
429 { /* Cell Broadband Engine */
430 .pvr_mask = 0xffff0000,
431 .pvr_value = 0x00700000,
432 .cpu_name = "Cell Broadband Engine",
433 .cpu_features = CPU_FTRS_CELL,
434 .cpu_user_features = COMMON_USER_PPC64 |
435 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
440 .pmc_type = PPC_PMC_IBM,
441 .oprofile_cpu_type = "ppc64/cell-be",
442 .oprofile_type = PPC_OPROFILE_CELL,
443 .machine_check = machine_check_generic,
444 .platform = "ppc-cell-be",
447 .pvr_mask = 0x7fff0000,
448 .pvr_value = 0x00900000,
450 .cpu_features = CPU_FTRS_PA6T,
451 .cpu_user_features = COMMON_USER_PA6T,
455 .pmc_type = PPC_PMC_PA6T,
456 .cpu_setup = __setup_cpu_pa6t,
457 .cpu_restore = __restore_cpu_pa6t,
458 .oprofile_cpu_type = "ppc64/pa6t",
459 .oprofile_type = PPC_OPROFILE_PA6T,
460 .machine_check = machine_check_generic,
463 { /* default match */
464 .pvr_mask = 0x00000000,
465 .pvr_value = 0x00000000,
466 .cpu_name = "POWER4 (compatible)",
467 .cpu_features = CPU_FTRS_COMPATIBLE,
468 .cpu_user_features = COMMON_USER_PPC64,
472 .pmc_type = PPC_PMC_IBM,
473 .machine_check = machine_check_generic,
474 .platform = "power4",
476 #endif /* CONFIG_PPC64 */
480 .pvr_mask = 0xffff0000,
481 .pvr_value = 0x00010000,
483 .cpu_features = CPU_FTRS_PPC601,
484 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
485 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
488 .machine_check = machine_check_generic,
489 .platform = "ppc601",
492 .pvr_mask = 0xffff0000,
493 .pvr_value = 0x00030000,
495 .cpu_features = CPU_FTRS_603,
496 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
499 .cpu_setup = __setup_cpu_603,
500 .machine_check = machine_check_generic,
501 .platform = "ppc603",
504 .pvr_mask = 0xffff0000,
505 .pvr_value = 0x00060000,
507 .cpu_features = CPU_FTRS_603,
508 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
511 .cpu_setup = __setup_cpu_603,
512 .machine_check = machine_check_generic,
513 .platform = "ppc603",
516 .pvr_mask = 0xffff0000,
517 .pvr_value = 0x00070000,
519 .cpu_features = CPU_FTRS_603,
520 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
523 .cpu_setup = __setup_cpu_603,
524 .machine_check = machine_check_generic,
525 .platform = "ppc603",
528 .pvr_mask = 0xffff0000,
529 .pvr_value = 0x00040000,
531 .cpu_features = CPU_FTRS_604,
532 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
536 .cpu_setup = __setup_cpu_604,
537 .machine_check = machine_check_generic,
538 .platform = "ppc604",
541 .pvr_mask = 0xfffff000,
542 .pvr_value = 0x00090000,
544 .cpu_features = CPU_FTRS_604,
545 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
549 .cpu_setup = __setup_cpu_604,
550 .machine_check = machine_check_generic,
551 .platform = "ppc604",
554 .pvr_mask = 0xffff0000,
555 .pvr_value = 0x00090000,
557 .cpu_features = CPU_FTRS_604,
558 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
562 .cpu_setup = __setup_cpu_604,
563 .machine_check = machine_check_generic,
564 .platform = "ppc604",
567 .pvr_mask = 0xffff0000,
568 .pvr_value = 0x000a0000,
570 .cpu_features = CPU_FTRS_604,
571 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
575 .cpu_setup = __setup_cpu_604,
576 .machine_check = machine_check_generic,
577 .platform = "ppc604",
579 { /* 740/750 (0x4202, don't support TAU ?) */
580 .pvr_mask = 0xffffffff,
581 .pvr_value = 0x00084202,
582 .cpu_name = "740/750",
583 .cpu_features = CPU_FTRS_740_NOTAU,
584 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
588 .cpu_setup = __setup_cpu_750,
589 .machine_check = machine_check_generic,
590 .platform = "ppc750",
592 { /* 750CX (80100 and 8010x?) */
593 .pvr_mask = 0xfffffff0,
594 .pvr_value = 0x00080100,
596 .cpu_features = CPU_FTRS_750,
597 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
601 .cpu_setup = __setup_cpu_750cx,
602 .machine_check = machine_check_generic,
603 .platform = "ppc750",
605 { /* 750CX (82201 and 82202) */
606 .pvr_mask = 0xfffffff0,
607 .pvr_value = 0x00082200,
609 .cpu_features = CPU_FTRS_750,
610 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
614 .pmc_type = PPC_PMC_IBM,
615 .cpu_setup = __setup_cpu_750cx,
616 .machine_check = machine_check_generic,
617 .platform = "ppc750",
619 { /* 750CXe (82214) */
620 .pvr_mask = 0xfffffff0,
621 .pvr_value = 0x00082210,
622 .cpu_name = "750CXe",
623 .cpu_features = CPU_FTRS_750,
624 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
628 .pmc_type = PPC_PMC_IBM,
629 .cpu_setup = __setup_cpu_750cx,
630 .machine_check = machine_check_generic,
631 .platform = "ppc750",
633 { /* 750CXe "Gekko" (83214) */
634 .pvr_mask = 0xffffffff,
635 .pvr_value = 0x00083214,
636 .cpu_name = "750CXe",
637 .cpu_features = CPU_FTRS_750,
638 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
642 .pmc_type = PPC_PMC_IBM,
643 .cpu_setup = __setup_cpu_750cx,
644 .machine_check = machine_check_generic,
645 .platform = "ppc750",
648 .pvr_mask = 0xfffff0f0,
649 .pvr_value = 0x00087010,
651 .cpu_features = CPU_FTRS_750CL,
652 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
656 .pmc_type = PPC_PMC_IBM,
657 .cpu_setup = __setup_cpu_750,
658 .machine_check = machine_check_generic,
659 .platform = "ppc750",
662 .pvr_mask = 0xfffff000,
663 .pvr_value = 0x00083000,
664 .cpu_name = "745/755",
665 .cpu_features = CPU_FTRS_750,
666 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
670 .pmc_type = PPC_PMC_IBM,
671 .cpu_setup = __setup_cpu_750,
672 .machine_check = machine_check_generic,
673 .platform = "ppc750",
675 { /* 750FX rev 1.x */
676 .pvr_mask = 0xffffff00,
677 .pvr_value = 0x70000100,
679 .cpu_features = CPU_FTRS_750FX1,
680 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
684 .pmc_type = PPC_PMC_IBM,
685 .cpu_setup = __setup_cpu_750,
686 .machine_check = machine_check_generic,
687 .platform = "ppc750",
689 { /* 750FX rev 2.0 must disable HID0[DPM] */
690 .pvr_mask = 0xffffffff,
691 .pvr_value = 0x70000200,
693 .cpu_features = CPU_FTRS_750FX2,
694 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
698 .pmc_type = PPC_PMC_IBM,
699 .cpu_setup = __setup_cpu_750,
700 .machine_check = machine_check_generic,
701 .platform = "ppc750",
703 { /* 750FX (All revs except 2.0) */
704 .pvr_mask = 0xffff0000,
705 .pvr_value = 0x70000000,
707 .cpu_features = CPU_FTRS_750FX,
708 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
712 .pmc_type = PPC_PMC_IBM,
713 .cpu_setup = __setup_cpu_750fx,
714 .machine_check = machine_check_generic,
715 .platform = "ppc750",
718 .pvr_mask = 0xffff0000,
719 .pvr_value = 0x70020000,
721 .cpu_features = CPU_FTRS_750GX,
722 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
726 .pmc_type = PPC_PMC_IBM,
727 .cpu_setup = __setup_cpu_750fx,
728 .machine_check = machine_check_generic,
729 .platform = "ppc750",
731 { /* 740/750 (L2CR bit need fixup for 740) */
732 .pvr_mask = 0xffff0000,
733 .pvr_value = 0x00080000,
734 .cpu_name = "740/750",
735 .cpu_features = CPU_FTRS_740,
736 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
740 .pmc_type = PPC_PMC_IBM,
741 .cpu_setup = __setup_cpu_750,
742 .machine_check = machine_check_generic,
743 .platform = "ppc750",
745 { /* 7400 rev 1.1 ? (no TAU) */
746 .pvr_mask = 0xffffffff,
747 .pvr_value = 0x000c1101,
748 .cpu_name = "7400 (1.1)",
749 .cpu_features = CPU_FTRS_7400_NOTAU,
750 .cpu_user_features = COMMON_USER |
751 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
755 .pmc_type = PPC_PMC_G4,
756 .cpu_setup = __setup_cpu_7400,
757 .machine_check = machine_check_generic,
758 .platform = "ppc7400",
761 .pvr_mask = 0xffff0000,
762 .pvr_value = 0x000c0000,
764 .cpu_features = CPU_FTRS_7400,
765 .cpu_user_features = COMMON_USER |
766 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
770 .pmc_type = PPC_PMC_G4,
771 .cpu_setup = __setup_cpu_7400,
772 .machine_check = machine_check_generic,
773 .platform = "ppc7400",
776 .pvr_mask = 0xffff0000,
777 .pvr_value = 0x800c0000,
779 .cpu_features = CPU_FTRS_7400,
780 .cpu_user_features = COMMON_USER |
781 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
785 .pmc_type = PPC_PMC_G4,
786 .cpu_setup = __setup_cpu_7410,
787 .machine_check = machine_check_generic,
788 .platform = "ppc7400",
790 { /* 7450 2.0 - no doze/nap */
791 .pvr_mask = 0xffffffff,
792 .pvr_value = 0x80000200,
794 .cpu_features = CPU_FTRS_7450_20,
795 .cpu_user_features = COMMON_USER |
796 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
800 .pmc_type = PPC_PMC_G4,
801 .cpu_setup = __setup_cpu_745x,
802 .oprofile_cpu_type = "ppc/7450",
803 .oprofile_type = PPC_OPROFILE_G4,
804 .machine_check = machine_check_generic,
805 .platform = "ppc7450",
808 .pvr_mask = 0xffffffff,
809 .pvr_value = 0x80000201,
811 .cpu_features = CPU_FTRS_7450_21,
812 .cpu_user_features = COMMON_USER |
813 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
817 .pmc_type = PPC_PMC_G4,
818 .cpu_setup = __setup_cpu_745x,
819 .oprofile_cpu_type = "ppc/7450",
820 .oprofile_type = PPC_OPROFILE_G4,
821 .machine_check = machine_check_generic,
822 .platform = "ppc7450",
824 { /* 7450 2.3 and newer */
825 .pvr_mask = 0xffff0000,
826 .pvr_value = 0x80000000,
828 .cpu_features = CPU_FTRS_7450_23,
829 .cpu_user_features = COMMON_USER |
830 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
834 .pmc_type = PPC_PMC_G4,
835 .cpu_setup = __setup_cpu_745x,
836 .oprofile_cpu_type = "ppc/7450",
837 .oprofile_type = PPC_OPROFILE_G4,
838 .machine_check = machine_check_generic,
839 .platform = "ppc7450",
842 .pvr_mask = 0xffffff00,
843 .pvr_value = 0x80010100,
845 .cpu_features = CPU_FTRS_7455_1,
846 .cpu_user_features = COMMON_USER |
847 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
851 .pmc_type = PPC_PMC_G4,
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",
859 .pvr_mask = 0xffffffff,
860 .pvr_value = 0x80010200,
862 .cpu_features = CPU_FTRS_7455_20,
863 .cpu_user_features = COMMON_USER |
864 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
868 .pmc_type = PPC_PMC_G4,
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 = 0x80010000,
879 .cpu_features = CPU_FTRS_7455,
880 .cpu_user_features = COMMON_USER |
881 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
885 .pmc_type = PPC_PMC_G4,
886 .cpu_setup = __setup_cpu_745x,
887 .oprofile_cpu_type = "ppc/7450",
888 .oprofile_type = PPC_OPROFILE_G4,
889 .machine_check = machine_check_generic,
890 .platform = "ppc7450",
892 { /* 7447/7457 Rev 1.0 */
893 .pvr_mask = 0xffffffff,
894 .pvr_value = 0x80020100,
895 .cpu_name = "7447/7457",
896 .cpu_features = CPU_FTRS_7447_10,
897 .cpu_user_features = COMMON_USER |
898 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
902 .pmc_type = PPC_PMC_G4,
903 .cpu_setup = __setup_cpu_745x,
904 .oprofile_cpu_type = "ppc/7450",
905 .oprofile_type = PPC_OPROFILE_G4,
906 .machine_check = machine_check_generic,
907 .platform = "ppc7450",
909 { /* 7447/7457 Rev 1.1 */
910 .pvr_mask = 0xffffffff,
911 .pvr_value = 0x80020101,
912 .cpu_name = "7447/7457",
913 .cpu_features = CPU_FTRS_7447_10,
914 .cpu_user_features = COMMON_USER |
915 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
919 .pmc_type = PPC_PMC_G4,
920 .cpu_setup = __setup_cpu_745x,
921 .oprofile_cpu_type = "ppc/7450",
922 .oprofile_type = PPC_OPROFILE_G4,
923 .machine_check = machine_check_generic,
924 .platform = "ppc7450",
926 { /* 7447/7457 Rev 1.2 and later */
927 .pvr_mask = 0xffff0000,
928 .pvr_value = 0x80020000,
929 .cpu_name = "7447/7457",
930 .cpu_features = CPU_FTRS_7447,
931 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
935 .pmc_type = PPC_PMC_G4,
936 .cpu_setup = __setup_cpu_745x,
937 .oprofile_cpu_type = "ppc/7450",
938 .oprofile_type = PPC_OPROFILE_G4,
939 .machine_check = machine_check_generic,
940 .platform = "ppc7450",
943 .pvr_mask = 0xffff0000,
944 .pvr_value = 0x80030000,
946 .cpu_features = CPU_FTRS_7447A,
947 .cpu_user_features = COMMON_USER |
948 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
952 .pmc_type = PPC_PMC_G4,
953 .cpu_setup = __setup_cpu_745x,
954 .oprofile_cpu_type = "ppc/7450",
955 .oprofile_type = PPC_OPROFILE_G4,
956 .machine_check = machine_check_generic,
957 .platform = "ppc7450",
960 .pvr_mask = 0xffff0000,
961 .pvr_value = 0x80040000,
963 .cpu_features = CPU_FTRS_7448,
964 .cpu_user_features = COMMON_USER |
965 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
969 .pmc_type = PPC_PMC_G4,
970 .cpu_setup = __setup_cpu_745x,
971 .oprofile_cpu_type = "ppc/7450",
972 .oprofile_type = PPC_OPROFILE_G4,
973 .machine_check = machine_check_generic,
974 .platform = "ppc7450",
976 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
977 .pvr_mask = 0x7fff0000,
978 .pvr_value = 0x00810000,
980 .cpu_features = CPU_FTRS_82XX,
981 .cpu_user_features = COMMON_USER,
984 .cpu_setup = __setup_cpu_603,
985 .machine_check = machine_check_generic,
986 .platform = "ppc603",
988 { /* All G2_LE (603e core, plus some) have the same pvr */
989 .pvr_mask = 0x7fff0000,
990 .pvr_value = 0x00820000,
992 .cpu_features = CPU_FTRS_G2_LE,
993 .cpu_user_features = COMMON_USER,
996 .cpu_setup = __setup_cpu_603,
997 .machine_check = machine_check_generic,
998 .platform = "ppc603",
1000 { /* e300c1 (a 603e core, plus some) on 83xx */
1001 .pvr_mask = 0x7fff0000,
1002 .pvr_value = 0x00830000,
1003 .cpu_name = "e300c1",
1004 .cpu_features = CPU_FTRS_E300,
1005 .cpu_user_features = COMMON_USER,
1008 .cpu_setup = __setup_cpu_603,
1009 .machine_check = machine_check_generic,
1010 .platform = "ppc603",
1012 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
1013 .pvr_mask = 0x7fff0000,
1014 .pvr_value = 0x00840000,
1015 .cpu_name = "e300c2",
1016 .cpu_features = CPU_FTRS_E300C2,
1017 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1020 .cpu_setup = __setup_cpu_603,
1021 .machine_check = machine_check_generic,
1022 .platform = "ppc603",
1024 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
1025 .pvr_mask = 0x7fff0000,
1026 .pvr_value = 0x00850000,
1027 .cpu_name = "e300c3",
1028 .cpu_features = CPU_FTRS_E300,
1029 .cpu_user_features = COMMON_USER,
1032 .cpu_setup = __setup_cpu_603,
1034 .oprofile_cpu_type = "ppc/e300",
1035 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1036 .platform = "ppc603",
1038 { /* e300c4 (e300c1, plus one IU) */
1039 .pvr_mask = 0x7fff0000,
1040 .pvr_value = 0x00860000,
1041 .cpu_name = "e300c4",
1042 .cpu_features = CPU_FTRS_E300,
1043 .cpu_user_features = COMMON_USER,
1046 .cpu_setup = __setup_cpu_603,
1047 .machine_check = machine_check_generic,
1049 .oprofile_cpu_type = "ppc/e300",
1050 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1051 .platform = "ppc603",
1053 { /* default match, we assume split I/D cache & TB (non-601)... */
1054 .pvr_mask = 0x00000000,
1055 .pvr_value = 0x00000000,
1056 .cpu_name = "(generic PPC)",
1057 .cpu_features = CPU_FTRS_CLASSIC32,
1058 .cpu_user_features = COMMON_USER,
1061 .machine_check = machine_check_generic,
1062 .platform = "ppc603",
1064 #endif /* CLASSIC_PPC */
1067 .pvr_mask = 0xffff0000,
1068 .pvr_value = 0x00500000,
1070 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1071 * if the 8xx code is there.... */
1072 .cpu_features = CPU_FTRS_8XX,
1073 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1076 .platform = "ppc823",
1078 #endif /* CONFIG_8xx */
1081 .pvr_mask = 0xffffff00,
1082 .pvr_value = 0x00200200,
1083 .cpu_name = "403GC",
1084 .cpu_features = CPU_FTRS_40X,
1085 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1088 .machine_check = machine_check_4xx,
1089 .platform = "ppc403",
1092 .pvr_mask = 0xffffff00,
1093 .pvr_value = 0x00201400,
1094 .cpu_name = "403GCX",
1095 .cpu_features = CPU_FTRS_40X,
1096 .cpu_user_features = PPC_FEATURE_32 |
1097 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
1100 .machine_check = machine_check_4xx,
1101 .platform = "ppc403",
1104 .pvr_mask = 0xffff0000,
1105 .pvr_value = 0x00200000,
1106 .cpu_name = "403G ??",
1107 .cpu_features = CPU_FTRS_40X,
1108 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1111 .machine_check = machine_check_4xx,
1112 .platform = "ppc403",
1115 .pvr_mask = 0xffff0000,
1116 .pvr_value = 0x40110000,
1117 .cpu_name = "405GP",
1118 .cpu_features = CPU_FTRS_40X,
1119 .cpu_user_features = PPC_FEATURE_32 |
1120 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1123 .machine_check = machine_check_4xx,
1124 .platform = "ppc405",
1127 .pvr_mask = 0xffff0000,
1128 .pvr_value = 0x40130000,
1129 .cpu_name = "STB03xxx",
1130 .cpu_features = CPU_FTRS_40X,
1131 .cpu_user_features = PPC_FEATURE_32 |
1132 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1135 .machine_check = machine_check_4xx,
1136 .platform = "ppc405",
1139 .pvr_mask = 0xffff0000,
1140 .pvr_value = 0x41810000,
1141 .cpu_name = "STB04xxx",
1142 .cpu_features = CPU_FTRS_40X,
1143 .cpu_user_features = PPC_FEATURE_32 |
1144 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1147 .machine_check = machine_check_4xx,
1148 .platform = "ppc405",
1151 .pvr_mask = 0xffff0000,
1152 .pvr_value = 0x41610000,
1153 .cpu_name = "NP405L",
1154 .cpu_features = CPU_FTRS_40X,
1155 .cpu_user_features = PPC_FEATURE_32 |
1156 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1159 .machine_check = machine_check_4xx,
1160 .platform = "ppc405",
1163 .pvr_mask = 0xffff0000,
1164 .pvr_value = 0x40B10000,
1165 .cpu_name = "NP4GS3",
1166 .cpu_features = CPU_FTRS_40X,
1167 .cpu_user_features = PPC_FEATURE_32 |
1168 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1171 .machine_check = machine_check_4xx,
1172 .platform = "ppc405",
1175 .pvr_mask = 0xffff0000,
1176 .pvr_value = 0x41410000,
1177 .cpu_name = "NP405H",
1178 .cpu_features = CPU_FTRS_40X,
1179 .cpu_user_features = PPC_FEATURE_32 |
1180 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1183 .machine_check = machine_check_4xx,
1184 .platform = "ppc405",
1187 .pvr_mask = 0xffff0000,
1188 .pvr_value = 0x50910000,
1189 .cpu_name = "405GPr",
1190 .cpu_features = CPU_FTRS_40X,
1191 .cpu_user_features = PPC_FEATURE_32 |
1192 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1195 .machine_check = machine_check_4xx,
1196 .platform = "ppc405",
1199 .pvr_mask = 0xffff0000,
1200 .pvr_value = 0x51510000,
1201 .cpu_name = "STBx25xx",
1202 .cpu_features = CPU_FTRS_40X,
1203 .cpu_user_features = PPC_FEATURE_32 |
1204 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1207 .machine_check = machine_check_4xx,
1208 .platform = "ppc405",
1211 .pvr_mask = 0xffff0000,
1212 .pvr_value = 0x41F10000,
1213 .cpu_name = "405LP",
1214 .cpu_features = CPU_FTRS_40X,
1215 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1218 .machine_check = machine_check_4xx,
1219 .platform = "ppc405",
1221 { /* Xilinx Virtex-II Pro */
1222 .pvr_mask = 0xfffff000,
1223 .pvr_value = 0x20010000,
1224 .cpu_name = "Virtex-II Pro",
1225 .cpu_features = CPU_FTRS_40X,
1226 .cpu_user_features = PPC_FEATURE_32 |
1227 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1230 .machine_check = machine_check_4xx,
1231 .platform = "ppc405",
1233 { /* Xilinx Virtex-4 FX */
1234 .pvr_mask = 0xfffff000,
1235 .pvr_value = 0x20011000,
1236 .cpu_name = "Virtex-4 FX",
1237 .cpu_features = CPU_FTRS_40X,
1238 .cpu_user_features = PPC_FEATURE_32 |
1239 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1242 .machine_check = machine_check_4xx,
1243 .platform = "ppc405",
1246 .pvr_mask = 0xffff0000,
1247 .pvr_value = 0x51210000,
1248 .cpu_name = "405EP",
1249 .cpu_features = CPU_FTRS_40X,
1250 .cpu_user_features = PPC_FEATURE_32 |
1251 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1254 .machine_check = machine_check_4xx,
1255 .platform = "ppc405",
1258 .pvr_mask = 0xffff0004,
1259 .pvr_value = 0x12910004,
1260 .cpu_name = "405EX",
1261 .cpu_features = CPU_FTRS_40X,
1262 .cpu_user_features = PPC_FEATURE_32 |
1263 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1266 .machine_check = machine_check_4xx,
1267 .platform = "ppc405",
1270 .pvr_mask = 0xffff0004,
1271 .pvr_value = 0x12910000,
1272 .cpu_name = "405EXr",
1273 .cpu_features = CPU_FTRS_40X,
1274 .cpu_user_features = PPC_FEATURE_32 |
1275 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1278 .machine_check = machine_check_4xx,
1279 .platform = "ppc405",
1283 .pvr_mask = 0xffff0000,
1284 .pvr_value = 0x41510000,
1285 .cpu_name = "405EZ",
1286 .cpu_features = CPU_FTRS_40X,
1287 .cpu_user_features = PPC_FEATURE_32 |
1288 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1291 .machine_check = machine_check_4xx,
1292 .platform = "ppc405",
1294 { /* default match */
1295 .pvr_mask = 0x00000000,
1296 .pvr_value = 0x00000000,
1297 .cpu_name = "(generic 40x PPC)",
1298 .cpu_features = CPU_FTRS_40X,
1299 .cpu_user_features = PPC_FEATURE_32 |
1300 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1303 .machine_check = machine_check_4xx,
1304 .platform = "ppc405",
1307 #endif /* CONFIG_40x */
1310 .pvr_mask = 0xf0000fff,
1311 .pvr_value = 0x40000850,
1312 .cpu_name = "440GR Rev. A",
1313 .cpu_features = CPU_FTRS_44X,
1314 .cpu_user_features = COMMON_USER_BOOKE,
1317 .machine_check = machine_check_4xx,
1318 .platform = "ppc440",
1320 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1321 .pvr_mask = 0xf0000fff,
1322 .pvr_value = 0x40000858,
1323 .cpu_name = "440EP Rev. A",
1324 .cpu_features = CPU_FTRS_44X,
1325 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1328 .cpu_setup = __setup_cpu_440ep,
1329 .machine_check = machine_check_4xx,
1330 .platform = "ppc440",
1333 .pvr_mask = 0xf0000fff,
1334 .pvr_value = 0x400008d3,
1335 .cpu_name = "440GR Rev. B",
1336 .cpu_features = CPU_FTRS_44X,
1337 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1340 .machine_check = machine_check_4xx,
1341 .platform = "ppc440",
1343 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1344 .pvr_mask = 0xf0000ff7,
1345 .pvr_value = 0x400008d4,
1346 .cpu_name = "440EP Rev. C",
1347 .cpu_features = CPU_FTRS_44X,
1348 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1351 .cpu_setup = __setup_cpu_440ep,
1352 .machine_check = machine_check_4xx,
1353 .platform = "ppc440",
1355 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1356 .pvr_mask = 0xf0000fff,
1357 .pvr_value = 0x400008db,
1358 .cpu_name = "440EP Rev. B",
1359 .cpu_features = CPU_FTRS_44X,
1360 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1363 .cpu_setup = __setup_cpu_440ep,
1364 .machine_check = machine_check_4xx,
1365 .platform = "ppc440",
1368 .pvr_mask = 0xf0000ffb,
1369 .pvr_value = 0x200008D0,
1370 .cpu_name = "440GRX",
1371 .cpu_features = CPU_FTRS_44X,
1372 .cpu_user_features = COMMON_USER_BOOKE,
1375 .cpu_setup = __setup_cpu_440grx,
1376 .machine_check = machine_check_440A,
1377 .platform = "ppc440",
1379 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1380 .pvr_mask = 0xf0000ffb,
1381 .pvr_value = 0x200008D8,
1382 .cpu_name = "440EPX",
1383 .cpu_features = CPU_FTRS_44X,
1384 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1387 .cpu_setup = __setup_cpu_440epx,
1388 .machine_check = machine_check_440A,
1389 .platform = "ppc440",
1391 { /* 440GP Rev. B */
1392 .pvr_mask = 0xf0000fff,
1393 .pvr_value = 0x40000440,
1394 .cpu_name = "440GP Rev. B",
1395 .cpu_features = CPU_FTRS_44X,
1396 .cpu_user_features = COMMON_USER_BOOKE,
1399 .machine_check = machine_check_4xx,
1400 .platform = "ppc440gp",
1402 { /* 440GP Rev. C */
1403 .pvr_mask = 0xf0000fff,
1404 .pvr_value = 0x40000481,
1405 .cpu_name = "440GP Rev. C",
1406 .cpu_features = CPU_FTRS_44X,
1407 .cpu_user_features = COMMON_USER_BOOKE,
1410 .machine_check = machine_check_4xx,
1411 .platform = "ppc440gp",
1413 { /* 440GX Rev. A */
1414 .pvr_mask = 0xf0000fff,
1415 .pvr_value = 0x50000850,
1416 .cpu_name = "440GX Rev. A",
1417 .cpu_features = CPU_FTRS_44X,
1418 .cpu_user_features = COMMON_USER_BOOKE,
1421 .cpu_setup = __setup_cpu_440gx,
1422 .machine_check = machine_check_440A,
1423 .platform = "ppc440",
1425 { /* 440GX Rev. B */
1426 .pvr_mask = 0xf0000fff,
1427 .pvr_value = 0x50000851,
1428 .cpu_name = "440GX Rev. B",
1429 .cpu_features = CPU_FTRS_44X,
1430 .cpu_user_features = COMMON_USER_BOOKE,
1433 .cpu_setup = __setup_cpu_440gx,
1434 .machine_check = machine_check_440A,
1435 .platform = "ppc440",
1437 { /* 440GX Rev. C */
1438 .pvr_mask = 0xf0000fff,
1439 .pvr_value = 0x50000892,
1440 .cpu_name = "440GX Rev. C",
1441 .cpu_features = CPU_FTRS_44X,
1442 .cpu_user_features = COMMON_USER_BOOKE,
1445 .cpu_setup = __setup_cpu_440gx,
1446 .machine_check = machine_check_440A,
1447 .platform = "ppc440",
1449 { /* 440GX Rev. F */
1450 .pvr_mask = 0xf0000fff,
1451 .pvr_value = 0x50000894,
1452 .cpu_name = "440GX Rev. F",
1453 .cpu_features = CPU_FTRS_44X,
1454 .cpu_user_features = COMMON_USER_BOOKE,
1457 .cpu_setup = __setup_cpu_440gx,
1458 .machine_check = machine_check_440A,
1459 .platform = "ppc440",
1461 { /* 440SP Rev. A */
1462 .pvr_mask = 0xfff00fff,
1463 .pvr_value = 0x53200891,
1464 .cpu_name = "440SP Rev. A",
1465 .cpu_features = CPU_FTRS_44X,
1466 .cpu_user_features = COMMON_USER_BOOKE,
1469 .machine_check = machine_check_4xx,
1470 .platform = "ppc440",
1472 { /* 440SPe Rev. A */
1473 .pvr_mask = 0xfff00fff,
1474 .pvr_value = 0x53400890,
1475 .cpu_name = "440SPe Rev. A",
1476 .cpu_features = CPU_FTRS_44X,
1477 .cpu_user_features = COMMON_USER_BOOKE,
1480 .cpu_setup = __setup_cpu_440spe,
1481 .machine_check = machine_check_440A,
1482 .platform = "ppc440",
1484 { /* 440SPe Rev. B */
1485 .pvr_mask = 0xfff00fff,
1486 .pvr_value = 0x53400891,
1487 .cpu_name = "440SPe Rev. B",
1488 .cpu_features = CPU_FTRS_44X,
1489 .cpu_user_features = COMMON_USER_BOOKE,
1492 .cpu_setup = __setup_cpu_440spe,
1493 .machine_check = machine_check_440A,
1494 .platform = "ppc440",
1496 { /* 440 in Xilinx Virtex-5 FXT */
1497 .pvr_mask = 0xfffffff0,
1498 .pvr_value = 0x7ff21910,
1499 .cpu_name = "440 in Virtex-5 FXT",
1500 .cpu_features = CPU_FTRS_44X,
1501 .cpu_user_features = COMMON_USER_BOOKE,
1504 .cpu_setup = __setup_cpu_440x5,
1505 .machine_check = machine_check_440A,
1506 .platform = "ppc440",
1509 .pvr_mask = 0xffff0002,
1510 .pvr_value = 0x13020002,
1511 .cpu_name = "460EX",
1512 .cpu_features = CPU_FTRS_44X,
1513 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1516 .cpu_setup = __setup_cpu_460ex,
1517 .machine_check = machine_check_440A,
1518 .platform = "ppc440",
1521 .pvr_mask = 0xffff0002,
1522 .pvr_value = 0x13020000,
1523 .cpu_name = "460GT",
1524 .cpu_features = CPU_FTRS_44X,
1525 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1528 .cpu_setup = __setup_cpu_460gt,
1529 .machine_check = machine_check_440A,
1530 .platform = "ppc440",
1532 { /* default match */
1533 .pvr_mask = 0x00000000,
1534 .pvr_value = 0x00000000,
1535 .cpu_name = "(generic 44x PPC)",
1536 .cpu_features = CPU_FTRS_44X,
1537 .cpu_user_features = COMMON_USER_BOOKE,
1540 .machine_check = machine_check_4xx,
1541 .platform = "ppc440",
1543 #endif /* CONFIG_44x */
1546 .pvr_mask = 0xfff00000,
1547 .pvr_value = 0x81000000,
1548 .cpu_name = "e200z5",
1549 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1550 .cpu_features = CPU_FTRS_E200,
1551 .cpu_user_features = COMMON_USER_BOOKE |
1552 PPC_FEATURE_HAS_EFP_SINGLE |
1553 PPC_FEATURE_UNIFIED_CACHE,
1555 .machine_check = machine_check_e200,
1556 .platform = "ppc5554",
1559 .pvr_mask = 0xfff00000,
1560 .pvr_value = 0x81100000,
1561 .cpu_name = "e200z6",
1562 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1563 .cpu_features = CPU_FTRS_E200,
1564 .cpu_user_features = COMMON_USER_BOOKE |
1565 PPC_FEATURE_HAS_SPE_COMP |
1566 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1567 PPC_FEATURE_UNIFIED_CACHE,
1569 .machine_check = machine_check_e200,
1570 .platform = "ppc5554",
1572 { /* default match */
1573 .pvr_mask = 0x00000000,
1574 .pvr_value = 0x00000000,
1575 .cpu_name = "(generic E200 PPC)",
1576 .cpu_features = CPU_FTRS_E200,
1577 .cpu_user_features = COMMON_USER_BOOKE |
1578 PPC_FEATURE_HAS_EFP_SINGLE |
1579 PPC_FEATURE_UNIFIED_CACHE,
1581 .machine_check = machine_check_e200,
1582 .platform = "ppc5554",
1584 #endif /* CONFIG_E200 */
1587 .pvr_mask = 0xffff0000,
1588 .pvr_value = 0x80200000,
1590 .cpu_features = CPU_FTRS_E500,
1591 .cpu_user_features = COMMON_USER_BOOKE |
1592 PPC_FEATURE_HAS_SPE_COMP |
1593 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
1597 .oprofile_cpu_type = "ppc/e500",
1598 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1599 .machine_check = machine_check_e500,
1600 .platform = "ppc8540",
1603 .pvr_mask = 0xffff0000,
1604 .pvr_value = 0x80210000,
1605 .cpu_name = "e500v2",
1606 .cpu_features = CPU_FTRS_E500_2,
1607 .cpu_user_features = COMMON_USER_BOOKE |
1608 PPC_FEATURE_HAS_SPE_COMP |
1609 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1610 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
1614 .oprofile_cpu_type = "ppc/e500",
1615 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1616 .machine_check = machine_check_e500,
1617 .platform = "ppc8548",
1620 .pvr_mask = 0xffff0000,
1621 .pvr_value = 0x80230000,
1622 .cpu_name = "e500mc",
1623 .cpu_features = CPU_FTRS_E500MC,
1624 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1628 .oprofile_cpu_type = "ppc/e500", /* xxx - galak, e500mc? */
1629 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1630 .machine_check = machine_check_e500,
1631 .platform = "ppce500mc",
1633 { /* default match */
1634 .pvr_mask = 0x00000000,
1635 .pvr_value = 0x00000000,
1636 .cpu_name = "(generic E500 PPC)",
1637 .cpu_features = CPU_FTRS_E500,
1638 .cpu_user_features = COMMON_USER_BOOKE |
1639 PPC_FEATURE_HAS_SPE_COMP |
1640 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
1643 .machine_check = machine_check_e500,
1644 .platform = "powerpc",
1646 #endif /* CONFIG_E500 */
1647 #endif /* CONFIG_PPC32 */
1650 static struct cpu_spec the_cpu_spec;
1652 struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
1654 struct cpu_spec *s = cpu_specs;
1655 struct cpu_spec *t = &the_cpu_spec;
1661 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
1662 if ((pvr & s->pvr_mask) == s->pvr_value) {
1664 * If we are overriding a previous value derived
1665 * from the real PVR with a new value obtained
1666 * using a logical PVR value, don't modify the
1667 * performance monitor fields.
1669 if (t->num_pmcs && !s->num_pmcs) {
1670 t->cpu_name = s->cpu_name;
1671 t->cpu_features = s->cpu_features;
1672 t->cpu_user_features = s->cpu_user_features;
1673 t->icache_bsize = s->icache_bsize;
1674 t->dcache_bsize = s->dcache_bsize;
1675 t->cpu_setup = s->cpu_setup;
1676 t->cpu_restore = s->cpu_restore;
1677 t->platform = s->platform;
1679 * If we have passed through this logic once
1680 * before and have pulled the default case
1681 * because the real PVR was not found inside
1682 * cpu_specs[], then we are possibly running in
1683 * compatibility mode. In that case, let the
1684 * oprofiler know which set of compatibility
1685 * counters to pull from by making sure the
1686 * oprofile_cpu_type string is set to that of
1687 * compatibility mode. If the oprofile_cpu_type
1688 * already has a value, then we are possibly
1689 * overriding a real PVR with a logical one, and,
1690 * in that case, keep the current value for
1691 * oprofile_cpu_type.
1693 if (t->oprofile_cpu_type == NULL)
1694 t->oprofile_cpu_type = s->oprofile_cpu_type;
1697 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
1700 * Set the base platform string once; assumes
1701 * we're called with real pvr first.
1703 if (*PTRRELOC(&powerpc_base_platform) == NULL)
1704 *PTRRELOC(&powerpc_base_platform) = t->platform;
1706 #if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
1707 /* ppc64 and booke expect identify_cpu to also call
1708 * setup_cpu for that processor. I will consolidate
1709 * that at a later time, for now, just use #ifdef.
1710 * we also don't need to PTRRELOC the function pointer
1711 * on ppc64 and booke as we are running at 0 in real
1712 * mode on ppc64 and reloc_offset is always 0 on booke.
1715 s->cpu_setup(offset, s);
1717 #endif /* CONFIG_PPC64 || CONFIG_BOOKE */