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
,
963 .oprofile_cpu_type
= "ppc/e300",
964 .oprofile_type
= PPC_OPROFILE_FSL_EMB
,
965 .platform
= "ppc603",
967 { /* e300c4 (e300c1, plus one IU) */
968 .pvr_mask
= 0x7fff0000,
969 .pvr_value
= 0x00860000,
970 .cpu_name
= "e300c4",
971 .cpu_features
= CPU_FTRS_E300
,
972 .cpu_user_features
= COMMON_USER
,
975 .cpu_setup
= __setup_cpu_603
,
976 .machine_check
= machine_check_generic
,
978 .oprofile_cpu_type
= "ppc/e300",
979 .oprofile_type
= PPC_OPROFILE_FSL_EMB
,
980 .platform
= "ppc603",
982 { /* default match, we assume split I/D cache & TB (non-601)... */
983 .pvr_mask
= 0x00000000,
984 .pvr_value
= 0x00000000,
985 .cpu_name
= "(generic PPC)",
986 .cpu_features
= CPU_FTRS_CLASSIC32
,
987 .cpu_user_features
= COMMON_USER
,
990 .machine_check
= machine_check_generic
,
991 .platform
= "ppc603",
993 #endif /* CLASSIC_PPC */
996 .pvr_mask
= 0xffff0000,
997 .pvr_value
= 0x00500000,
999 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1000 * if the 8xx code is there.... */
1001 .cpu_features
= CPU_FTRS_8XX
,
1002 .cpu_user_features
= PPC_FEATURE_32
| PPC_FEATURE_HAS_MMU
,
1005 .platform
= "ppc823",
1007 #endif /* CONFIG_8xx */
1010 .pvr_mask
= 0xffffff00,
1011 .pvr_value
= 0x00200200,
1012 .cpu_name
= "403GC",
1013 .cpu_features
= CPU_FTRS_40X
,
1014 .cpu_user_features
= PPC_FEATURE_32
| PPC_FEATURE_HAS_MMU
,
1017 .machine_check
= machine_check_4xx
,
1018 .platform
= "ppc403",
1021 .pvr_mask
= 0xffffff00,
1022 .pvr_value
= 0x00201400,
1023 .cpu_name
= "403GCX",
1024 .cpu_features
= CPU_FTRS_40X
,
1025 .cpu_user_features
= PPC_FEATURE_32
|
1026 PPC_FEATURE_HAS_MMU
| PPC_FEATURE_NO_TB
,
1029 .machine_check
= machine_check_4xx
,
1030 .platform
= "ppc403",
1033 .pvr_mask
= 0xffff0000,
1034 .pvr_value
= 0x00200000,
1035 .cpu_name
= "403G ??",
1036 .cpu_features
= CPU_FTRS_40X
,
1037 .cpu_user_features
= PPC_FEATURE_32
| PPC_FEATURE_HAS_MMU
,
1040 .machine_check
= machine_check_4xx
,
1041 .platform
= "ppc403",
1044 .pvr_mask
= 0xffff0000,
1045 .pvr_value
= 0x40110000,
1046 .cpu_name
= "405GP",
1047 .cpu_features
= CPU_FTRS_40X
,
1048 .cpu_user_features
= PPC_FEATURE_32
|
1049 PPC_FEATURE_HAS_MMU
| PPC_FEATURE_HAS_4xxMAC
,
1052 .machine_check
= machine_check_4xx
,
1053 .platform
= "ppc405",
1056 .pvr_mask
= 0xffff0000,
1057 .pvr_value
= 0x40130000,
1058 .cpu_name
= "STB03xxx",
1059 .cpu_features
= CPU_FTRS_40X
,
1060 .cpu_user_features
= PPC_FEATURE_32
|
1061 PPC_FEATURE_HAS_MMU
| PPC_FEATURE_HAS_4xxMAC
,
1064 .machine_check
= machine_check_4xx
,
1065 .platform
= "ppc405",
1068 .pvr_mask
= 0xffff0000,
1069 .pvr_value
= 0x41810000,
1070 .cpu_name
= "STB04xxx",
1071 .cpu_features
= CPU_FTRS_40X
,
1072 .cpu_user_features
= PPC_FEATURE_32
|
1073 PPC_FEATURE_HAS_MMU
| PPC_FEATURE_HAS_4xxMAC
,
1076 .machine_check
= machine_check_4xx
,
1077 .platform
= "ppc405",
1080 .pvr_mask
= 0xffff0000,
1081 .pvr_value
= 0x41610000,
1082 .cpu_name
= "NP405L",
1083 .cpu_features
= CPU_FTRS_40X
,
1084 .cpu_user_features
= PPC_FEATURE_32
|
1085 PPC_FEATURE_HAS_MMU
| PPC_FEATURE_HAS_4xxMAC
,
1088 .machine_check
= machine_check_4xx
,
1089 .platform
= "ppc405",
1092 .pvr_mask
= 0xffff0000,
1093 .pvr_value
= 0x40B10000,
1094 .cpu_name
= "NP4GS3",
1095 .cpu_features
= CPU_FTRS_40X
,
1096 .cpu_user_features
= PPC_FEATURE_32
|
1097 PPC_FEATURE_HAS_MMU
| PPC_FEATURE_HAS_4xxMAC
,
1100 .machine_check
= machine_check_4xx
,
1101 .platform
= "ppc405",
1104 .pvr_mask
= 0xffff0000,
1105 .pvr_value
= 0x41410000,
1106 .cpu_name
= "NP405H",
1107 .cpu_features
= CPU_FTRS_40X
,
1108 .cpu_user_features
= PPC_FEATURE_32
|
1109 PPC_FEATURE_HAS_MMU
| PPC_FEATURE_HAS_4xxMAC
,
1112 .machine_check
= machine_check_4xx
,
1113 .platform
= "ppc405",
1116 .pvr_mask
= 0xffff0000,
1117 .pvr_value
= 0x50910000,
1118 .cpu_name
= "405GPr",
1119 .cpu_features
= CPU_FTRS_40X
,
1120 .cpu_user_features
= PPC_FEATURE_32
|
1121 PPC_FEATURE_HAS_MMU
| PPC_FEATURE_HAS_4xxMAC
,
1124 .machine_check
= machine_check_4xx
,
1125 .platform
= "ppc405",
1128 .pvr_mask
= 0xffff0000,
1129 .pvr_value
= 0x51510000,
1130 .cpu_name
= "STBx25xx",
1131 .cpu_features
= CPU_FTRS_40X
,
1132 .cpu_user_features
= PPC_FEATURE_32
|
1133 PPC_FEATURE_HAS_MMU
| PPC_FEATURE_HAS_4xxMAC
,
1136 .machine_check
= machine_check_4xx
,
1137 .platform
= "ppc405",
1140 .pvr_mask
= 0xffff0000,
1141 .pvr_value
= 0x41F10000,
1142 .cpu_name
= "405LP",
1143 .cpu_features
= CPU_FTRS_40X
,
1144 .cpu_user_features
= PPC_FEATURE_32
| PPC_FEATURE_HAS_MMU
,
1147 .machine_check
= machine_check_4xx
,
1148 .platform
= "ppc405",
1150 { /* Xilinx Virtex-II Pro */
1151 .pvr_mask
= 0xfffff000,
1152 .pvr_value
= 0x20010000,
1153 .cpu_name
= "Virtex-II Pro",
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",
1162 { /* Xilinx Virtex-4 FX */
1163 .pvr_mask
= 0xfffff000,
1164 .pvr_value
= 0x20011000,
1165 .cpu_name
= "Virtex-4 FX",
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
= 0x51210000,
1177 .cpu_name
= "405EP",
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
= 0xffff0004,
1188 .pvr_value
= 0x12910004,
1189 .cpu_name
= "405EX",
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
= 0xffff0004,
1200 .pvr_value
= 0x12910000,
1201 .cpu_name
= "405EXr",
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 #endif /* CONFIG_40x */
1214 .pvr_mask
= 0xf0000fff,
1215 .pvr_value
= 0x40000850,
1216 .cpu_name
= "440GR Rev. A",
1217 .cpu_features
= CPU_FTRS_44X
,
1218 .cpu_user_features
= COMMON_USER_BOOKE
,
1221 .machine_check
= machine_check_4xx
,
1222 .platform
= "ppc440",
1224 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1225 .pvr_mask
= 0xf0000fff,
1226 .pvr_value
= 0x40000858,
1227 .cpu_name
= "440EP Rev. A",
1228 .cpu_features
= CPU_FTRS_44X
,
1229 .cpu_user_features
= COMMON_USER_BOOKE
| PPC_FEATURE_HAS_FPU
,
1232 .cpu_setup
= __setup_cpu_440ep
,
1233 .machine_check
= machine_check_4xx
,
1234 .platform
= "ppc440",
1237 .pvr_mask
= 0xf0000fff,
1238 .pvr_value
= 0x400008d3,
1239 .cpu_name
= "440GR Rev. B",
1240 .cpu_features
= CPU_FTRS_44X
,
1241 .cpu_user_features
= COMMON_USER_BOOKE
| PPC_FEATURE_HAS_FPU
,
1244 .machine_check
= machine_check_4xx
,
1245 .platform
= "ppc440",
1247 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1248 .pvr_mask
= 0xf0000ff7,
1249 .pvr_value
= 0x400008d4,
1250 .cpu_name
= "440EP Rev. C",
1251 .cpu_features
= CPU_FTRS_44X
,
1252 .cpu_user_features
= COMMON_USER_BOOKE
| PPC_FEATURE_HAS_FPU
,
1255 .cpu_setup
= __setup_cpu_440ep
,
1256 .machine_check
= machine_check_4xx
,
1257 .platform
= "ppc440",
1259 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1260 .pvr_mask
= 0xf0000fff,
1261 .pvr_value
= 0x400008db,
1262 .cpu_name
= "440EP Rev. B",
1263 .cpu_features
= CPU_FTRS_44X
,
1264 .cpu_user_features
= COMMON_USER_BOOKE
| PPC_FEATURE_HAS_FPU
,
1267 .cpu_setup
= __setup_cpu_440ep
,
1268 .machine_check
= machine_check_4xx
,
1269 .platform
= "ppc440",
1272 .pvr_mask
= 0xf0000ffb,
1273 .pvr_value
= 0x200008D0,
1274 .cpu_name
= "440GRX",
1275 .cpu_features
= CPU_FTRS_44X
,
1276 .cpu_user_features
= COMMON_USER_BOOKE
,
1279 .cpu_setup
= __setup_cpu_440grx
,
1280 .machine_check
= machine_check_440A
,
1281 .platform
= "ppc440",
1283 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1284 .pvr_mask
= 0xf0000ffb,
1285 .pvr_value
= 0x200008D8,
1286 .cpu_name
= "440EPX",
1287 .cpu_features
= CPU_FTRS_44X
,
1288 .cpu_user_features
= COMMON_USER_BOOKE
| PPC_FEATURE_HAS_FPU
,
1291 .cpu_setup
= __setup_cpu_440epx
,
1292 .machine_check
= machine_check_440A
,
1293 .platform
= "ppc440",
1295 { /* 440GP Rev. B */
1296 .pvr_mask
= 0xf0000fff,
1297 .pvr_value
= 0x40000440,
1298 .cpu_name
= "440GP Rev. B",
1299 .cpu_features
= CPU_FTRS_44X
,
1300 .cpu_user_features
= COMMON_USER_BOOKE
,
1303 .machine_check
= machine_check_4xx
,
1304 .platform
= "ppc440gp",
1306 { /* 440GP Rev. C */
1307 .pvr_mask
= 0xf0000fff,
1308 .pvr_value
= 0x40000481,
1309 .cpu_name
= "440GP Rev. C",
1310 .cpu_features
= CPU_FTRS_44X
,
1311 .cpu_user_features
= COMMON_USER_BOOKE
,
1314 .machine_check
= machine_check_4xx
,
1315 .platform
= "ppc440gp",
1317 { /* 440GX Rev. A */
1318 .pvr_mask
= 0xf0000fff,
1319 .pvr_value
= 0x50000850,
1320 .cpu_name
= "440GX Rev. A",
1321 .cpu_features
= CPU_FTRS_44X
,
1322 .cpu_user_features
= COMMON_USER_BOOKE
,
1325 .cpu_setup
= __setup_cpu_440gx
,
1326 .machine_check
= machine_check_440A
,
1327 .platform
= "ppc440",
1329 { /* 440GX Rev. B */
1330 .pvr_mask
= 0xf0000fff,
1331 .pvr_value
= 0x50000851,
1332 .cpu_name
= "440GX Rev. B",
1333 .cpu_features
= CPU_FTRS_44X
,
1334 .cpu_user_features
= COMMON_USER_BOOKE
,
1337 .cpu_setup
= __setup_cpu_440gx
,
1338 .machine_check
= machine_check_440A
,
1339 .platform
= "ppc440",
1341 { /* 440GX Rev. C */
1342 .pvr_mask
= 0xf0000fff,
1343 .pvr_value
= 0x50000892,
1344 .cpu_name
= "440GX Rev. C",
1345 .cpu_features
= CPU_FTRS_44X
,
1346 .cpu_user_features
= COMMON_USER_BOOKE
,
1349 .cpu_setup
= __setup_cpu_440gx
,
1350 .machine_check
= machine_check_440A
,
1351 .platform
= "ppc440",
1353 { /* 440GX Rev. F */
1354 .pvr_mask
= 0xf0000fff,
1355 .pvr_value
= 0x50000894,
1356 .cpu_name
= "440GX Rev. F",
1357 .cpu_features
= CPU_FTRS_44X
,
1358 .cpu_user_features
= COMMON_USER_BOOKE
,
1361 .cpu_setup
= __setup_cpu_440gx
,
1362 .machine_check
= machine_check_440A
,
1363 .platform
= "ppc440",
1365 { /* 440SP Rev. A */
1366 .pvr_mask
= 0xfff00fff,
1367 .pvr_value
= 0x53200891,
1368 .cpu_name
= "440SP Rev. A",
1369 .cpu_features
= CPU_FTRS_44X
,
1370 .cpu_user_features
= COMMON_USER_BOOKE
,
1373 .machine_check
= machine_check_4xx
,
1374 .platform
= "ppc440",
1376 { /* 440SPe Rev. A */
1377 .pvr_mask
= 0xfff00fff,
1378 .pvr_value
= 0x53400890,
1379 .cpu_name
= "440SPe Rev. A",
1380 .cpu_features
= CPU_FTRS_44X
,
1381 .cpu_user_features
= COMMON_USER_BOOKE
,
1384 .cpu_setup
= __setup_cpu_440spe
,
1385 .machine_check
= machine_check_440A
,
1386 .platform
= "ppc440",
1388 { /* 440SPe Rev. B */
1389 .pvr_mask
= 0xfff00fff,
1390 .pvr_value
= 0x53400891,
1391 .cpu_name
= "440SPe Rev. B",
1392 .cpu_features
= CPU_FTRS_44X
,
1393 .cpu_user_features
= COMMON_USER_BOOKE
,
1396 .cpu_setup
= __setup_cpu_440spe
,
1397 .machine_check
= machine_check_440A
,
1398 .platform
= "ppc440",
1400 #endif /* CONFIG_44x */
1401 #ifdef CONFIG_FSL_BOOKE
1404 .pvr_mask
= 0xfff00000,
1405 .pvr_value
= 0x81000000,
1406 .cpu_name
= "e200z5",
1407 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1408 .cpu_features
= CPU_FTRS_E200
,
1409 .cpu_user_features
= COMMON_USER_BOOKE
|
1410 PPC_FEATURE_HAS_EFP_SINGLE
|
1411 PPC_FEATURE_UNIFIED_CACHE
,
1413 .machine_check
= machine_check_e200
,
1414 .platform
= "ppc5554",
1417 .pvr_mask
= 0xfff00000,
1418 .pvr_value
= 0x81100000,
1419 .cpu_name
= "e200z6",
1420 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1421 .cpu_features
= CPU_FTRS_E200
,
1422 .cpu_user_features
= COMMON_USER_BOOKE
|
1423 PPC_FEATURE_HAS_SPE_COMP
|
1424 PPC_FEATURE_HAS_EFP_SINGLE_COMP
|
1425 PPC_FEATURE_UNIFIED_CACHE
,
1427 .machine_check
= machine_check_e200
,
1428 .platform
= "ppc5554",
1430 #elif defined(CONFIG_E500)
1432 .pvr_mask
= 0xffff0000,
1433 .pvr_value
= 0x80200000,
1435 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1436 .cpu_features
= CPU_FTRS_E500
,
1437 .cpu_user_features
= COMMON_USER_BOOKE
|
1438 PPC_FEATURE_HAS_SPE_COMP
|
1439 PPC_FEATURE_HAS_EFP_SINGLE_COMP
,
1443 .oprofile_cpu_type
= "ppc/e500",
1444 .oprofile_type
= PPC_OPROFILE_FSL_EMB
,
1445 .machine_check
= machine_check_e500
,
1446 .platform
= "ppc8540",
1449 .pvr_mask
= 0xffff0000,
1450 .pvr_value
= 0x80210000,
1451 .cpu_name
= "e500v2",
1452 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1453 .cpu_features
= CPU_FTRS_E500_2
,
1454 .cpu_user_features
= COMMON_USER_BOOKE
|
1455 PPC_FEATURE_HAS_SPE_COMP
|
1456 PPC_FEATURE_HAS_EFP_SINGLE_COMP
|
1457 PPC_FEATURE_HAS_EFP_DOUBLE_COMP
,
1461 .oprofile_cpu_type
= "ppc/e500",
1462 .oprofile_type
= PPC_OPROFILE_FSL_EMB
,
1463 .machine_check
= machine_check_e500
,
1464 .platform
= "ppc8548",
1469 { /* default match */
1470 .pvr_mask
= 0x00000000,
1471 .pvr_value
= 0x00000000,
1472 .cpu_name
= "(generic PPC)",
1473 .cpu_features
= CPU_FTRS_GENERIC_32
,
1474 .cpu_user_features
= PPC_FEATURE_32
,
1477 .platform
= "powerpc",
1479 #endif /* !CLASSIC_PPC */
1480 #endif /* CONFIG_PPC32 */
1483 static struct cpu_spec the_cpu_spec
;
1485 struct cpu_spec
* __init
identify_cpu(unsigned long offset
, unsigned int pvr
)
1487 struct cpu_spec
*s
= cpu_specs
;
1488 struct cpu_spec
*t
= &the_cpu_spec
;
1494 for (i
= 0; i
< ARRAY_SIZE(cpu_specs
); i
++,s
++)
1495 if ((pvr
& s
->pvr_mask
) == s
->pvr_value
) {
1497 * If we are overriding a previous value derived
1498 * from the real PVR with a new value obtained
1499 * using a logical PVR value, don't modify the
1500 * performance monitor fields.
1502 if (t
->num_pmcs
&& !s
->num_pmcs
) {
1503 t
->cpu_name
= s
->cpu_name
;
1504 t
->cpu_features
= s
->cpu_features
;
1505 t
->cpu_user_features
= s
->cpu_user_features
;
1506 t
->icache_bsize
= s
->icache_bsize
;
1507 t
->dcache_bsize
= s
->dcache_bsize
;
1508 t
->cpu_setup
= s
->cpu_setup
;
1509 t
->cpu_restore
= s
->cpu_restore
;
1510 t
->platform
= s
->platform
;
1513 *PTRRELOC(&cur_cpu_spec
) = &the_cpu_spec
;
1514 #if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
1515 /* ppc64 and booke expect identify_cpu to also call
1516 * setup_cpu for that processor. I will consolidate
1517 * that at a later time, for now, just use #ifdef.
1518 * we also don't need to PTRRELOC the function pointer
1519 * on ppc64 and booke as we are running at 0 in real
1520 * mode on ppc64 and reloc_offset is always 0 on booke.
1523 s
->cpu_setup(offset
, s
);
1525 #endif /* CONFIG_PPC64 || CONFIG_BOOKE */
1532 void do_feature_fixups(unsigned long value
, void *fixup_start
, void *fixup_end
)
1534 struct fixup_entry
{
1536 unsigned long value
;
1544 for (; fcur
< fend
; fcur
++) {
1545 unsigned int *pstart
, *pend
, *p
;
1547 if ((value
& fcur
->mask
) == fcur
->value
)
1550 /* These PTRRELOCs will disappear once the new scheme for
1551 * modules and vdso is implemented
1553 pstart
= ((unsigned int *)fcur
) + (fcur
->start_off
/ 4);
1554 pend
= ((unsigned int *)fcur
) + (fcur
->end_off
/ 4);
1556 for (p
= pstart
; p
< pend
; p
++) {
1558 asm volatile ("dcbst 0, %0" : : "r" (p
));
1560 asm volatile ("sync" : : : "memory");
1561 for (p
= pstart
; p
< pend
; p
++)
1562 asm volatile ("icbi 0,%0" : : "r" (p
));
1563 asm volatile ("sync; isync" : : : "memory");