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/export.h>
18 #include <linux/jump_label.h>
20 #include <asm/oprofile_impl.h>
21 #include <asm/cputable.h>
22 #include <asm/prom.h> /* for PTRRELOC on ARCH=ppc */
24 #include <asm/setup.h>
26 struct cpu_spec* cur_cpu_spec = NULL;
27 EXPORT_SYMBOL(cur_cpu_spec);
29 /* The platform string corresponding to the real PVR */
30 const char *powerpc_base_platform;
33 * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's
34 * the responsibility of the appropriate CPU save/restore functions to
35 * eventually copy these settings over. Those save/restore aren't yet
36 * part of the cputable though. That has to be fixed for both ppc32
40 extern void __setup_cpu_e200(unsigned long offset, struct cpu_spec* spec);
41 extern void __setup_cpu_e500v1(unsigned long offset, struct cpu_spec* spec);
42 extern void __setup_cpu_e500v2(unsigned long offset, struct cpu_spec* spec);
43 extern void __setup_cpu_e500mc(unsigned long offset, struct cpu_spec* spec);
44 extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
45 extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
46 extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
47 extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
48 extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
49 extern void __setup_cpu_440x5(unsigned long offset, struct cpu_spec* spec);
50 extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec);
51 extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec);
52 extern void __setup_cpu_460sx(unsigned long offset, struct cpu_spec *spec);
53 extern void __setup_cpu_apm821xx(unsigned long offset, struct cpu_spec *spec);
54 extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
55 extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
56 extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
57 extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
58 extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
59 extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
60 extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
61 extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
62 #endif /* CONFIG_PPC32 */
64 extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
65 extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
66 extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
67 extern void __restore_cpu_pa6t(void);
68 extern void __restore_cpu_ppc970(void);
69 extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec);
70 extern void __restore_cpu_power7(void);
71 extern void __setup_cpu_power8(unsigned long offset, struct cpu_spec* spec);
72 extern void __restore_cpu_power8(void);
73 extern void __setup_cpu_power9(unsigned long offset, struct cpu_spec* spec);
74 extern void __restore_cpu_power9(void);
75 extern void __flush_tlb_power7(unsigned int action);
76 extern void __flush_tlb_power8(unsigned int action);
77 extern void __flush_tlb_power9(unsigned int action);
78 extern long __machine_check_early_realmode_p7(struct pt_regs *regs);
79 extern long __machine_check_early_realmode_p8(struct pt_regs *regs);
80 #endif /* CONFIG_PPC64 */
81 #if defined(CONFIG_E500)
82 extern void __setup_cpu_e5500(unsigned long offset, struct cpu_spec* spec);
83 extern void __setup_cpu_e6500(unsigned long offset, struct cpu_spec* spec);
84 extern void __restore_cpu_e5500(void);
85 extern void __restore_cpu_e6500(void);
86 #endif /* CONFIG_E500 */
88 /* This table only contains "desktop" CPUs, it need to be filled with embedded
91 #define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
93 #define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
94 #define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
95 #define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
96 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
97 #define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
98 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
99 #define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
100 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
101 PPC_FEATURE_TRUE_LE | \
102 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
103 #define COMMON_USER_POWER7 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
104 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
105 PPC_FEATURE_TRUE_LE | \
106 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
107 #define COMMON_USER2_POWER7 (PPC_FEATURE2_DSCR)
108 #define COMMON_USER_POWER8 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
109 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
110 PPC_FEATURE_TRUE_LE | \
111 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
112 #define COMMON_USER2_POWER8 (PPC_FEATURE2_ARCH_2_07 | \
113 PPC_FEATURE2_HTM_COMP | \
114 PPC_FEATURE2_HTM_NOSC_COMP | \
115 PPC_FEATURE2_DSCR | \
116 PPC_FEATURE2_ISEL | PPC_FEATURE2_TAR | \
117 PPC_FEATURE2_VEC_CRYPTO)
118 #define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
119 PPC_FEATURE_TRUE_LE | \
120 PPC_FEATURE_HAS_ALTIVEC_COMP)
121 #define COMMON_USER_POWER9 COMMON_USER_POWER8
122 #define COMMON_USER2_POWER9 (COMMON_USER2_POWER8 | \
123 PPC_FEATURE2_ARCH_3_00 | \
124 PPC_FEATURE2_HAS_IEEE128)
126 #ifdef CONFIG_PPC_BOOK3E_64
127 #define COMMON_USER_BOOKE (COMMON_USER_PPC64 | PPC_FEATURE_BOOKE)
129 #define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
133 static struct cpu_spec __initdata cpu_specs[] = {
134 #ifdef CONFIG_PPC_BOOK3S_64
136 .pvr_mask = 0xffff0000,
137 .pvr_value = 0x00350000,
138 .cpu_name = "POWER4 (gp)",
139 .cpu_features = CPU_FTRS_POWER4,
140 .cpu_user_features = COMMON_USER_POWER4,
141 .mmu_features = MMU_FTRS_POWER4 | MMU_FTR_TLBIE_CROP_VA,
145 .pmc_type = PPC_PMC_IBM,
146 .oprofile_cpu_type = "ppc64/power4",
147 .oprofile_type = PPC_OPROFILE_POWER4,
148 .platform = "power4",
151 .pvr_mask = 0xffff0000,
152 .pvr_value = 0x00380000,
153 .cpu_name = "POWER4+ (gq)",
154 .cpu_features = CPU_FTRS_POWER4,
155 .cpu_user_features = COMMON_USER_POWER4,
156 .mmu_features = MMU_FTRS_POWER4 | MMU_FTR_TLBIE_CROP_VA,
160 .pmc_type = PPC_PMC_IBM,
161 .oprofile_cpu_type = "ppc64/power4",
162 .oprofile_type = PPC_OPROFILE_POWER4,
163 .platform = "power4",
166 .pvr_mask = 0xffff0000,
167 .pvr_value = 0x00390000,
168 .cpu_name = "PPC970",
169 .cpu_features = CPU_FTRS_PPC970,
170 .cpu_user_features = COMMON_USER_POWER4 |
171 PPC_FEATURE_HAS_ALTIVEC_COMP,
172 .mmu_features = MMU_FTRS_PPC970,
176 .pmc_type = PPC_PMC_IBM,
177 .cpu_setup = __setup_cpu_ppc970,
178 .cpu_restore = __restore_cpu_ppc970,
179 .oprofile_cpu_type = "ppc64/970",
180 .oprofile_type = PPC_OPROFILE_POWER4,
181 .platform = "ppc970",
184 .pvr_mask = 0xffff0000,
185 .pvr_value = 0x003c0000,
186 .cpu_name = "PPC970FX",
187 .cpu_features = CPU_FTRS_PPC970,
188 .cpu_user_features = COMMON_USER_POWER4 |
189 PPC_FEATURE_HAS_ALTIVEC_COMP,
190 .mmu_features = MMU_FTRS_PPC970,
194 .pmc_type = PPC_PMC_IBM,
195 .cpu_setup = __setup_cpu_ppc970,
196 .cpu_restore = __restore_cpu_ppc970,
197 .oprofile_cpu_type = "ppc64/970",
198 .oprofile_type = PPC_OPROFILE_POWER4,
199 .platform = "ppc970",
201 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
202 .pvr_mask = 0xffffffff,
203 .pvr_value = 0x00440100,
204 .cpu_name = "PPC970MP",
205 .cpu_features = CPU_FTRS_PPC970,
206 .cpu_user_features = COMMON_USER_POWER4 |
207 PPC_FEATURE_HAS_ALTIVEC_COMP,
208 .mmu_features = MMU_FTRS_PPC970,
212 .pmc_type = PPC_PMC_IBM,
213 .cpu_setup = __setup_cpu_ppc970,
214 .cpu_restore = __restore_cpu_ppc970,
215 .oprofile_cpu_type = "ppc64/970MP",
216 .oprofile_type = PPC_OPROFILE_POWER4,
217 .platform = "ppc970",
220 .pvr_mask = 0xffff0000,
221 .pvr_value = 0x00440000,
222 .cpu_name = "PPC970MP",
223 .cpu_features = CPU_FTRS_PPC970,
224 .cpu_user_features = COMMON_USER_POWER4 |
225 PPC_FEATURE_HAS_ALTIVEC_COMP,
226 .mmu_features = MMU_FTRS_PPC970,
230 .pmc_type = PPC_PMC_IBM,
231 .cpu_setup = __setup_cpu_ppc970MP,
232 .cpu_restore = __restore_cpu_ppc970,
233 .oprofile_cpu_type = "ppc64/970MP",
234 .oprofile_type = PPC_OPROFILE_POWER4,
235 .platform = "ppc970",
238 .pvr_mask = 0xffff0000,
239 .pvr_value = 0x00450000,
240 .cpu_name = "PPC970GX",
241 .cpu_features = CPU_FTRS_PPC970,
242 .cpu_user_features = COMMON_USER_POWER4 |
243 PPC_FEATURE_HAS_ALTIVEC_COMP,
244 .mmu_features = MMU_FTRS_PPC970,
248 .pmc_type = PPC_PMC_IBM,
249 .cpu_setup = __setup_cpu_ppc970,
250 .oprofile_cpu_type = "ppc64/970",
251 .oprofile_type = PPC_OPROFILE_POWER4,
252 .platform = "ppc970",
255 .pvr_mask = 0xffff0000,
256 .pvr_value = 0x003a0000,
257 .cpu_name = "POWER5 (gr)",
258 .cpu_features = CPU_FTRS_POWER5,
259 .cpu_user_features = COMMON_USER_POWER5,
260 .mmu_features = MMU_FTRS_POWER5,
264 .pmc_type = PPC_PMC_IBM,
265 .oprofile_cpu_type = "ppc64/power5",
266 .oprofile_type = PPC_OPROFILE_POWER4,
267 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
268 * and above but only works on POWER5 and above
270 .oprofile_mmcra_sihv = MMCRA_SIHV,
271 .oprofile_mmcra_sipr = MMCRA_SIPR,
272 .platform = "power5",
275 .pvr_mask = 0xffffff00,
276 .pvr_value = 0x003b0300,
277 .cpu_name = "POWER5+ (gs)",
278 .cpu_features = CPU_FTRS_POWER5,
279 .cpu_user_features = COMMON_USER_POWER5_PLUS,
280 .mmu_features = MMU_FTRS_POWER5,
284 .oprofile_cpu_type = "ppc64/power5++",
285 .oprofile_type = PPC_OPROFILE_POWER4,
286 .oprofile_mmcra_sihv = MMCRA_SIHV,
287 .oprofile_mmcra_sipr = MMCRA_SIPR,
288 .platform = "power5+",
291 .pvr_mask = 0xffff0000,
292 .pvr_value = 0x003b0000,
293 .cpu_name = "POWER5+ (gs)",
294 .cpu_features = CPU_FTRS_POWER5,
295 .cpu_user_features = COMMON_USER_POWER5_PLUS,
296 .mmu_features = MMU_FTRS_POWER5,
300 .pmc_type = PPC_PMC_IBM,
301 .oprofile_cpu_type = "ppc64/power5+",
302 .oprofile_type = PPC_OPROFILE_POWER4,
303 .oprofile_mmcra_sihv = MMCRA_SIHV,
304 .oprofile_mmcra_sipr = MMCRA_SIPR,
305 .platform = "power5+",
307 { /* POWER6 in P5+ mode; 2.04-compliant processor */
308 .pvr_mask = 0xffffffff,
309 .pvr_value = 0x0f000001,
310 .cpu_name = "POWER5+",
311 .cpu_features = CPU_FTRS_POWER5,
312 .cpu_user_features = COMMON_USER_POWER5_PLUS,
313 .mmu_features = MMU_FTRS_POWER5,
316 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
317 .oprofile_type = PPC_OPROFILE_POWER4,
318 .platform = "power5+",
321 .pvr_mask = 0xffff0000,
322 .pvr_value = 0x003e0000,
323 .cpu_name = "POWER6 (raw)",
324 .cpu_features = CPU_FTRS_POWER6,
325 .cpu_user_features = COMMON_USER_POWER6 |
326 PPC_FEATURE_POWER6_EXT,
327 .mmu_features = MMU_FTRS_POWER6,
331 .pmc_type = PPC_PMC_IBM,
332 .oprofile_cpu_type = "ppc64/power6",
333 .oprofile_type = PPC_OPROFILE_POWER4,
334 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
335 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
336 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
338 .platform = "power6x",
340 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
341 .pvr_mask = 0xffffffff,
342 .pvr_value = 0x0f000002,
343 .cpu_name = "POWER6 (architected)",
344 .cpu_features = CPU_FTRS_POWER6,
345 .cpu_user_features = COMMON_USER_POWER6,
346 .mmu_features = MMU_FTRS_POWER6,
349 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
350 .oprofile_type = PPC_OPROFILE_POWER4,
351 .platform = "power6",
353 { /* 2.06-compliant processor, i.e. Power7 "architected" mode */
354 .pvr_mask = 0xffffffff,
355 .pvr_value = 0x0f000003,
356 .cpu_name = "POWER7 (architected)",
357 .cpu_features = CPU_FTRS_POWER7,
358 .cpu_user_features = COMMON_USER_POWER7,
359 .cpu_user_features2 = COMMON_USER2_POWER7,
360 .mmu_features = MMU_FTRS_POWER7,
363 .oprofile_type = PPC_OPROFILE_POWER4,
364 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
365 .cpu_setup = __setup_cpu_power7,
366 .cpu_restore = __restore_cpu_power7,
367 .flush_tlb = __flush_tlb_power7,
368 .machine_check_early = __machine_check_early_realmode_p7,
369 .platform = "power7",
371 { /* 2.07-compliant processor, i.e. Power8 "architected" mode */
372 .pvr_mask = 0xffffffff,
373 .pvr_value = 0x0f000004,
374 .cpu_name = "POWER8 (architected)",
375 .cpu_features = CPU_FTRS_POWER8,
376 .cpu_user_features = COMMON_USER_POWER8,
377 .cpu_user_features2 = COMMON_USER2_POWER8,
378 .mmu_features = MMU_FTRS_POWER8,
381 .oprofile_type = PPC_OPROFILE_INVALID,
382 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
383 .cpu_setup = __setup_cpu_power8,
384 .cpu_restore = __restore_cpu_power8,
385 .flush_tlb = __flush_tlb_power8,
386 .machine_check_early = __machine_check_early_realmode_p8,
387 .platform = "power8",
390 .pvr_mask = 0xffff0000,
391 .pvr_value = 0x003f0000,
392 .cpu_name = "POWER7 (raw)",
393 .cpu_features = CPU_FTRS_POWER7,
394 .cpu_user_features = COMMON_USER_POWER7,
395 .cpu_user_features2 = COMMON_USER2_POWER7,
396 .mmu_features = MMU_FTRS_POWER7,
400 .pmc_type = PPC_PMC_IBM,
401 .oprofile_cpu_type = "ppc64/power7",
402 .oprofile_type = PPC_OPROFILE_POWER4,
403 .cpu_setup = __setup_cpu_power7,
404 .cpu_restore = __restore_cpu_power7,
405 .flush_tlb = __flush_tlb_power7,
406 .machine_check_early = __machine_check_early_realmode_p7,
407 .platform = "power7",
410 .pvr_mask = 0xffff0000,
411 .pvr_value = 0x004A0000,
412 .cpu_name = "POWER7+ (raw)",
413 .cpu_features = CPU_FTRS_POWER7,
414 .cpu_user_features = COMMON_USER_POWER7,
415 .cpu_user_features2 = COMMON_USER2_POWER7,
416 .mmu_features = MMU_FTRS_POWER7,
420 .pmc_type = PPC_PMC_IBM,
421 .oprofile_cpu_type = "ppc64/power7",
422 .oprofile_type = PPC_OPROFILE_POWER4,
423 .cpu_setup = __setup_cpu_power7,
424 .cpu_restore = __restore_cpu_power7,
425 .flush_tlb = __flush_tlb_power7,
426 .machine_check_early = __machine_check_early_realmode_p7,
427 .platform = "power7+",
430 .pvr_mask = 0xffff0000,
431 .pvr_value = 0x004b0000,
432 .cpu_name = "POWER8E (raw)",
433 .cpu_features = CPU_FTRS_POWER8E,
434 .cpu_user_features = COMMON_USER_POWER8,
435 .cpu_user_features2 = COMMON_USER2_POWER8,
436 .mmu_features = MMU_FTRS_POWER8,
440 .pmc_type = PPC_PMC_IBM,
441 .oprofile_cpu_type = "ppc64/power8",
442 .oprofile_type = PPC_OPROFILE_INVALID,
443 .cpu_setup = __setup_cpu_power8,
444 .cpu_restore = __restore_cpu_power8,
445 .flush_tlb = __flush_tlb_power8,
446 .machine_check_early = __machine_check_early_realmode_p8,
447 .platform = "power8",
450 .pvr_mask = 0xffff0000,
451 .pvr_value = 0x004c0000,
452 .cpu_name = "POWER8NVL (raw)",
453 .cpu_features = CPU_FTRS_POWER8,
454 .cpu_user_features = COMMON_USER_POWER8,
455 .cpu_user_features2 = COMMON_USER2_POWER8,
456 .mmu_features = MMU_FTRS_POWER8,
460 .pmc_type = PPC_PMC_IBM,
461 .oprofile_cpu_type = "ppc64/power8",
462 .oprofile_type = PPC_OPROFILE_INVALID,
463 .cpu_setup = __setup_cpu_power8,
464 .cpu_restore = __restore_cpu_power8,
465 .flush_tlb = __flush_tlb_power8,
466 .machine_check_early = __machine_check_early_realmode_p8,
467 .platform = "power8",
469 { /* Power8 DD1: Does not support doorbell IPIs */
470 .pvr_mask = 0xffffff00,
471 .pvr_value = 0x004d0100,
472 .cpu_name = "POWER8 (raw)",
473 .cpu_features = CPU_FTRS_POWER8_DD1,
474 .cpu_user_features = COMMON_USER_POWER8,
475 .cpu_user_features2 = COMMON_USER2_POWER8,
476 .mmu_features = MMU_FTRS_POWER8,
480 .pmc_type = PPC_PMC_IBM,
481 .oprofile_cpu_type = "ppc64/power8",
482 .oprofile_type = PPC_OPROFILE_INVALID,
483 .cpu_setup = __setup_cpu_power8,
484 .cpu_restore = __restore_cpu_power8,
485 .flush_tlb = __flush_tlb_power8,
486 .machine_check_early = __machine_check_early_realmode_p8,
487 .platform = "power8",
490 .pvr_mask = 0xffff0000,
491 .pvr_value = 0x004d0000,
492 .cpu_name = "POWER8 (raw)",
493 .cpu_features = CPU_FTRS_POWER8,
494 .cpu_user_features = COMMON_USER_POWER8,
495 .cpu_user_features2 = COMMON_USER2_POWER8,
496 .mmu_features = MMU_FTRS_POWER8,
500 .pmc_type = PPC_PMC_IBM,
501 .oprofile_cpu_type = "ppc64/power8",
502 .oprofile_type = PPC_OPROFILE_INVALID,
503 .cpu_setup = __setup_cpu_power8,
504 .cpu_restore = __restore_cpu_power8,
505 .flush_tlb = __flush_tlb_power8,
506 .machine_check_early = __machine_check_early_realmode_p8,
507 .platform = "power8",
510 .pvr_mask = 0xffffff00,
511 .pvr_value = 0x004e0100,
512 .cpu_name = "POWER9 (raw)",
513 .cpu_features = CPU_FTRS_POWER9_DD1,
514 .cpu_user_features = COMMON_USER_POWER9,
515 .cpu_user_features2 = COMMON_USER2_POWER9,
516 .mmu_features = MMU_FTRS_POWER9,
520 .pmc_type = PPC_PMC_IBM,
521 .oprofile_cpu_type = "ppc64/power9",
522 .oprofile_type = PPC_OPROFILE_INVALID,
523 .cpu_setup = __setup_cpu_power9,
524 .cpu_restore = __restore_cpu_power9,
525 .flush_tlb = __flush_tlb_power9,
526 .platform = "power9",
529 .pvr_mask = 0xffff0000,
530 .pvr_value = 0x004e0000,
531 .cpu_name = "POWER9 (raw)",
532 .cpu_features = CPU_FTRS_POWER9,
533 .cpu_user_features = COMMON_USER_POWER9,
534 .cpu_user_features2 = COMMON_USER2_POWER9,
535 .mmu_features = MMU_FTRS_POWER9,
539 .pmc_type = PPC_PMC_IBM,
540 .oprofile_cpu_type = "ppc64/power9",
541 .oprofile_type = PPC_OPROFILE_INVALID,
542 .cpu_setup = __setup_cpu_power9,
543 .cpu_restore = __restore_cpu_power9,
544 .flush_tlb = __flush_tlb_power9,
545 .platform = "power9",
547 { /* Cell Broadband Engine */
548 .pvr_mask = 0xffff0000,
549 .pvr_value = 0x00700000,
550 .cpu_name = "Cell Broadband Engine",
551 .cpu_features = CPU_FTRS_CELL,
552 .cpu_user_features = COMMON_USER_PPC64 |
553 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
555 .mmu_features = MMU_FTRS_CELL,
559 .pmc_type = PPC_PMC_IBM,
560 .oprofile_cpu_type = "ppc64/cell-be",
561 .oprofile_type = PPC_OPROFILE_CELL,
562 .platform = "ppc-cell-be",
565 .pvr_mask = 0x7fff0000,
566 .pvr_value = 0x00900000,
568 .cpu_features = CPU_FTRS_PA6T,
569 .cpu_user_features = COMMON_USER_PA6T,
570 .mmu_features = MMU_FTRS_PA6T,
574 .pmc_type = PPC_PMC_PA6T,
575 .cpu_setup = __setup_cpu_pa6t,
576 .cpu_restore = __restore_cpu_pa6t,
577 .oprofile_cpu_type = "ppc64/pa6t",
578 .oprofile_type = PPC_OPROFILE_PA6T,
581 { /* default match */
582 .pvr_mask = 0x00000000,
583 .pvr_value = 0x00000000,
584 .cpu_name = "POWER4 (compatible)",
585 .cpu_features = CPU_FTRS_COMPATIBLE,
586 .cpu_user_features = COMMON_USER_PPC64,
587 .mmu_features = MMU_FTRS_DEFAULT_HPTE_ARCH_V2,
591 .pmc_type = PPC_PMC_IBM,
592 .platform = "power4",
594 #endif /* CONFIG_PPC_BOOK3S_64 */
597 #ifdef CONFIG_PPC_BOOK3S_32
599 .pvr_mask = 0xffff0000,
600 .pvr_value = 0x00010000,
602 .cpu_features = CPU_FTRS_PPC601,
603 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
604 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
605 .mmu_features = MMU_FTR_HPTE_TABLE,
608 .machine_check = machine_check_generic,
609 .platform = "ppc601",
612 .pvr_mask = 0xffff0000,
613 .pvr_value = 0x00030000,
615 .cpu_features = CPU_FTRS_603,
616 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
620 .cpu_setup = __setup_cpu_603,
621 .machine_check = machine_check_generic,
622 .platform = "ppc603",
625 .pvr_mask = 0xffff0000,
626 .pvr_value = 0x00060000,
628 .cpu_features = CPU_FTRS_603,
629 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
633 .cpu_setup = __setup_cpu_603,
634 .machine_check = machine_check_generic,
635 .platform = "ppc603",
638 .pvr_mask = 0xffff0000,
639 .pvr_value = 0x00070000,
641 .cpu_features = CPU_FTRS_603,
642 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
646 .cpu_setup = __setup_cpu_603,
647 .machine_check = machine_check_generic,
648 .platform = "ppc603",
651 .pvr_mask = 0xffff0000,
652 .pvr_value = 0x00040000,
654 .cpu_features = CPU_FTRS_604,
655 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
656 .mmu_features = MMU_FTR_HPTE_TABLE,
660 .cpu_setup = __setup_cpu_604,
661 .machine_check = machine_check_generic,
662 .platform = "ppc604",
665 .pvr_mask = 0xfffff000,
666 .pvr_value = 0x00090000,
668 .cpu_features = CPU_FTRS_604,
669 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
670 .mmu_features = MMU_FTR_HPTE_TABLE,
674 .cpu_setup = __setup_cpu_604,
675 .machine_check = machine_check_generic,
676 .platform = "ppc604",
679 .pvr_mask = 0xffff0000,
680 .pvr_value = 0x00090000,
682 .cpu_features = CPU_FTRS_604,
683 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
684 .mmu_features = MMU_FTR_HPTE_TABLE,
688 .cpu_setup = __setup_cpu_604,
689 .machine_check = machine_check_generic,
690 .platform = "ppc604",
693 .pvr_mask = 0xffff0000,
694 .pvr_value = 0x000a0000,
696 .cpu_features = CPU_FTRS_604,
697 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
698 .mmu_features = MMU_FTR_HPTE_TABLE,
702 .cpu_setup = __setup_cpu_604,
703 .machine_check = machine_check_generic,
704 .platform = "ppc604",
706 { /* 740/750 (0x4202, don't support TAU ?) */
707 .pvr_mask = 0xffffffff,
708 .pvr_value = 0x00084202,
709 .cpu_name = "740/750",
710 .cpu_features = CPU_FTRS_740_NOTAU,
711 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
712 .mmu_features = MMU_FTR_HPTE_TABLE,
716 .cpu_setup = __setup_cpu_750,
717 .machine_check = machine_check_generic,
718 .platform = "ppc750",
720 { /* 750CX (80100 and 8010x?) */
721 .pvr_mask = 0xfffffff0,
722 .pvr_value = 0x00080100,
724 .cpu_features = CPU_FTRS_750,
725 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
726 .mmu_features = MMU_FTR_HPTE_TABLE,
730 .cpu_setup = __setup_cpu_750cx,
731 .machine_check = machine_check_generic,
732 .platform = "ppc750",
734 { /* 750CX (82201 and 82202) */
735 .pvr_mask = 0xfffffff0,
736 .pvr_value = 0x00082200,
738 .cpu_features = CPU_FTRS_750,
739 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
740 .mmu_features = MMU_FTR_HPTE_TABLE,
744 .pmc_type = PPC_PMC_IBM,
745 .cpu_setup = __setup_cpu_750cx,
746 .machine_check = machine_check_generic,
747 .platform = "ppc750",
749 { /* 750CXe (82214) */
750 .pvr_mask = 0xfffffff0,
751 .pvr_value = 0x00082210,
752 .cpu_name = "750CXe",
753 .cpu_features = CPU_FTRS_750,
754 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
755 .mmu_features = MMU_FTR_HPTE_TABLE,
759 .pmc_type = PPC_PMC_IBM,
760 .cpu_setup = __setup_cpu_750cx,
761 .machine_check = machine_check_generic,
762 .platform = "ppc750",
764 { /* 750CXe "Gekko" (83214) */
765 .pvr_mask = 0xffffffff,
766 .pvr_value = 0x00083214,
767 .cpu_name = "750CXe",
768 .cpu_features = CPU_FTRS_750,
769 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
770 .mmu_features = MMU_FTR_HPTE_TABLE,
774 .pmc_type = PPC_PMC_IBM,
775 .cpu_setup = __setup_cpu_750cx,
776 .machine_check = machine_check_generic,
777 .platform = "ppc750",
779 { /* 750CL (and "Broadway") */
780 .pvr_mask = 0xfffff0e0,
781 .pvr_value = 0x00087000,
783 .cpu_features = CPU_FTRS_750CL,
784 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
785 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
789 .pmc_type = PPC_PMC_IBM,
790 .cpu_setup = __setup_cpu_750,
791 .machine_check = machine_check_generic,
792 .platform = "ppc750",
793 .oprofile_cpu_type = "ppc/750",
794 .oprofile_type = PPC_OPROFILE_G4,
797 .pvr_mask = 0xfffff000,
798 .pvr_value = 0x00083000,
799 .cpu_name = "745/755",
800 .cpu_features = CPU_FTRS_750,
801 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
802 .mmu_features = MMU_FTR_HPTE_TABLE,
806 .pmc_type = PPC_PMC_IBM,
807 .cpu_setup = __setup_cpu_750,
808 .machine_check = machine_check_generic,
809 .platform = "ppc750",
811 { /* 750FX rev 1.x */
812 .pvr_mask = 0xffffff00,
813 .pvr_value = 0x70000100,
815 .cpu_features = CPU_FTRS_750FX1,
816 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
817 .mmu_features = MMU_FTR_HPTE_TABLE,
821 .pmc_type = PPC_PMC_IBM,
822 .cpu_setup = __setup_cpu_750,
823 .machine_check = machine_check_generic,
824 .platform = "ppc750",
825 .oprofile_cpu_type = "ppc/750",
826 .oprofile_type = PPC_OPROFILE_G4,
828 { /* 750FX rev 2.0 must disable HID0[DPM] */
829 .pvr_mask = 0xffffffff,
830 .pvr_value = 0x70000200,
832 .cpu_features = CPU_FTRS_750FX2,
833 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
834 .mmu_features = MMU_FTR_HPTE_TABLE,
838 .pmc_type = PPC_PMC_IBM,
839 .cpu_setup = __setup_cpu_750,
840 .machine_check = machine_check_generic,
841 .platform = "ppc750",
842 .oprofile_cpu_type = "ppc/750",
843 .oprofile_type = PPC_OPROFILE_G4,
845 { /* 750FX (All revs except 2.0) */
846 .pvr_mask = 0xffff0000,
847 .pvr_value = 0x70000000,
849 .cpu_features = CPU_FTRS_750FX,
850 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
851 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
855 .pmc_type = PPC_PMC_IBM,
856 .cpu_setup = __setup_cpu_750fx,
857 .machine_check = machine_check_generic,
858 .platform = "ppc750",
859 .oprofile_cpu_type = "ppc/750",
860 .oprofile_type = PPC_OPROFILE_G4,
863 .pvr_mask = 0xffff0000,
864 .pvr_value = 0x70020000,
866 .cpu_features = CPU_FTRS_750GX,
867 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
868 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
872 .pmc_type = PPC_PMC_IBM,
873 .cpu_setup = __setup_cpu_750fx,
874 .machine_check = machine_check_generic,
875 .platform = "ppc750",
876 .oprofile_cpu_type = "ppc/750",
877 .oprofile_type = PPC_OPROFILE_G4,
879 { /* 740/750 (L2CR bit need fixup for 740) */
880 .pvr_mask = 0xffff0000,
881 .pvr_value = 0x00080000,
882 .cpu_name = "740/750",
883 .cpu_features = CPU_FTRS_740,
884 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
885 .mmu_features = MMU_FTR_HPTE_TABLE,
889 .pmc_type = PPC_PMC_IBM,
890 .cpu_setup = __setup_cpu_750,
891 .machine_check = machine_check_generic,
892 .platform = "ppc750",
894 { /* 7400 rev 1.1 ? (no TAU) */
895 .pvr_mask = 0xffffffff,
896 .pvr_value = 0x000c1101,
897 .cpu_name = "7400 (1.1)",
898 .cpu_features = CPU_FTRS_7400_NOTAU,
899 .cpu_user_features = COMMON_USER |
900 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
901 .mmu_features = MMU_FTR_HPTE_TABLE,
905 .pmc_type = PPC_PMC_G4,
906 .cpu_setup = __setup_cpu_7400,
907 .machine_check = machine_check_generic,
908 .platform = "ppc7400",
911 .pvr_mask = 0xffff0000,
912 .pvr_value = 0x000c0000,
914 .cpu_features = CPU_FTRS_7400,
915 .cpu_user_features = COMMON_USER |
916 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
917 .mmu_features = MMU_FTR_HPTE_TABLE,
921 .pmc_type = PPC_PMC_G4,
922 .cpu_setup = __setup_cpu_7400,
923 .machine_check = machine_check_generic,
924 .platform = "ppc7400",
927 .pvr_mask = 0xffff0000,
928 .pvr_value = 0x800c0000,
930 .cpu_features = CPU_FTRS_7400,
931 .cpu_user_features = COMMON_USER |
932 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
933 .mmu_features = MMU_FTR_HPTE_TABLE,
937 .pmc_type = PPC_PMC_G4,
938 .cpu_setup = __setup_cpu_7410,
939 .machine_check = machine_check_generic,
940 .platform = "ppc7400",
942 { /* 7450 2.0 - no doze/nap */
943 .pvr_mask = 0xffffffff,
944 .pvr_value = 0x80000200,
946 .cpu_features = CPU_FTRS_7450_20,
947 .cpu_user_features = COMMON_USER |
948 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
949 .mmu_features = MMU_FTR_HPTE_TABLE,
953 .pmc_type = PPC_PMC_G4,
954 .cpu_setup = __setup_cpu_745x,
955 .oprofile_cpu_type = "ppc/7450",
956 .oprofile_type = PPC_OPROFILE_G4,
957 .machine_check = machine_check_generic,
958 .platform = "ppc7450",
961 .pvr_mask = 0xffffffff,
962 .pvr_value = 0x80000201,
964 .cpu_features = CPU_FTRS_7450_21,
965 .cpu_user_features = COMMON_USER |
966 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
967 .mmu_features = MMU_FTR_HPTE_TABLE,
971 .pmc_type = PPC_PMC_G4,
972 .cpu_setup = __setup_cpu_745x,
973 .oprofile_cpu_type = "ppc/7450",
974 .oprofile_type = PPC_OPROFILE_G4,
975 .machine_check = machine_check_generic,
976 .platform = "ppc7450",
978 { /* 7450 2.3 and newer */
979 .pvr_mask = 0xffff0000,
980 .pvr_value = 0x80000000,
982 .cpu_features = CPU_FTRS_7450_23,
983 .cpu_user_features = COMMON_USER |
984 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
985 .mmu_features = MMU_FTR_HPTE_TABLE,
989 .pmc_type = PPC_PMC_G4,
990 .cpu_setup = __setup_cpu_745x,
991 .oprofile_cpu_type = "ppc/7450",
992 .oprofile_type = PPC_OPROFILE_G4,
993 .machine_check = machine_check_generic,
994 .platform = "ppc7450",
997 .pvr_mask = 0xffffff00,
998 .pvr_value = 0x80010100,
1000 .cpu_features = CPU_FTRS_7455_1,
1001 .cpu_user_features = COMMON_USER |
1002 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
1003 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
1007 .pmc_type = PPC_PMC_G4,
1008 .cpu_setup = __setup_cpu_745x,
1009 .oprofile_cpu_type = "ppc/7450",
1010 .oprofile_type = PPC_OPROFILE_G4,
1011 .machine_check = machine_check_generic,
1012 .platform = "ppc7450",
1014 { /* 7455 rev 2.0 */
1015 .pvr_mask = 0xffffffff,
1016 .pvr_value = 0x80010200,
1018 .cpu_features = CPU_FTRS_7455_20,
1019 .cpu_user_features = COMMON_USER |
1020 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
1021 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
1025 .pmc_type = PPC_PMC_G4,
1026 .cpu_setup = __setup_cpu_745x,
1027 .oprofile_cpu_type = "ppc/7450",
1028 .oprofile_type = PPC_OPROFILE_G4,
1029 .machine_check = machine_check_generic,
1030 .platform = "ppc7450",
1033 .pvr_mask = 0xffff0000,
1034 .pvr_value = 0x80010000,
1036 .cpu_features = CPU_FTRS_7455,
1037 .cpu_user_features = COMMON_USER |
1038 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
1039 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
1043 .pmc_type = PPC_PMC_G4,
1044 .cpu_setup = __setup_cpu_745x,
1045 .oprofile_cpu_type = "ppc/7450",
1046 .oprofile_type = PPC_OPROFILE_G4,
1047 .machine_check = machine_check_generic,
1048 .platform = "ppc7450",
1050 { /* 7447/7457 Rev 1.0 */
1051 .pvr_mask = 0xffffffff,
1052 .pvr_value = 0x80020100,
1053 .cpu_name = "7447/7457",
1054 .cpu_features = CPU_FTRS_7447_10,
1055 .cpu_user_features = COMMON_USER |
1056 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
1057 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
1061 .pmc_type = PPC_PMC_G4,
1062 .cpu_setup = __setup_cpu_745x,
1063 .oprofile_cpu_type = "ppc/7450",
1064 .oprofile_type = PPC_OPROFILE_G4,
1065 .machine_check = machine_check_generic,
1066 .platform = "ppc7450",
1068 { /* 7447/7457 Rev 1.1 */
1069 .pvr_mask = 0xffffffff,
1070 .pvr_value = 0x80020101,
1071 .cpu_name = "7447/7457",
1072 .cpu_features = CPU_FTRS_7447_10,
1073 .cpu_user_features = COMMON_USER |
1074 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
1075 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
1079 .pmc_type = PPC_PMC_G4,
1080 .cpu_setup = __setup_cpu_745x,
1081 .oprofile_cpu_type = "ppc/7450",
1082 .oprofile_type = PPC_OPROFILE_G4,
1083 .machine_check = machine_check_generic,
1084 .platform = "ppc7450",
1086 { /* 7447/7457 Rev 1.2 and later */
1087 .pvr_mask = 0xffff0000,
1088 .pvr_value = 0x80020000,
1089 .cpu_name = "7447/7457",
1090 .cpu_features = CPU_FTRS_7447,
1091 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
1092 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
1096 .pmc_type = PPC_PMC_G4,
1097 .cpu_setup = __setup_cpu_745x,
1098 .oprofile_cpu_type = "ppc/7450",
1099 .oprofile_type = PPC_OPROFILE_G4,
1100 .machine_check = machine_check_generic,
1101 .platform = "ppc7450",
1104 .pvr_mask = 0xffff0000,
1105 .pvr_value = 0x80030000,
1106 .cpu_name = "7447A",
1107 .cpu_features = CPU_FTRS_7447A,
1108 .cpu_user_features = COMMON_USER |
1109 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
1110 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
1114 .pmc_type = PPC_PMC_G4,
1115 .cpu_setup = __setup_cpu_745x,
1116 .oprofile_cpu_type = "ppc/7450",
1117 .oprofile_type = PPC_OPROFILE_G4,
1118 .machine_check = machine_check_generic,
1119 .platform = "ppc7450",
1122 .pvr_mask = 0xffff0000,
1123 .pvr_value = 0x80040000,
1125 .cpu_features = CPU_FTRS_7448,
1126 .cpu_user_features = COMMON_USER |
1127 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
1128 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
1132 .pmc_type = PPC_PMC_G4,
1133 .cpu_setup = __setup_cpu_745x,
1134 .oprofile_cpu_type = "ppc/7450",
1135 .oprofile_type = PPC_OPROFILE_G4,
1136 .machine_check = machine_check_generic,
1137 .platform = "ppc7450",
1139 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
1140 .pvr_mask = 0x7fff0000,
1141 .pvr_value = 0x00810000,
1143 .cpu_features = CPU_FTRS_82XX,
1144 .cpu_user_features = COMMON_USER,
1148 .cpu_setup = __setup_cpu_603,
1149 .machine_check = machine_check_generic,
1150 .platform = "ppc603",
1152 { /* All G2_LE (603e core, plus some) have the same pvr */
1153 .pvr_mask = 0x7fff0000,
1154 .pvr_value = 0x00820000,
1155 .cpu_name = "G2_LE",
1156 .cpu_features = CPU_FTRS_G2_LE,
1157 .cpu_user_features = COMMON_USER,
1158 .mmu_features = MMU_FTR_USE_HIGH_BATS,
1161 .cpu_setup = __setup_cpu_603,
1162 .machine_check = machine_check_generic,
1163 .platform = "ppc603",
1165 #ifdef CONFIG_PPC_83xx
1166 { /* e300c1 (a 603e core, plus some) on 83xx */
1167 .pvr_mask = 0x7fff0000,
1168 .pvr_value = 0x00830000,
1169 .cpu_name = "e300c1",
1170 .cpu_features = CPU_FTRS_E300,
1171 .cpu_user_features = COMMON_USER,
1172 .mmu_features = MMU_FTR_USE_HIGH_BATS,
1175 .cpu_setup = __setup_cpu_603,
1176 .machine_check = machine_check_83xx,
1177 .platform = "ppc603",
1179 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
1180 .pvr_mask = 0x7fff0000,
1181 .pvr_value = 0x00840000,
1182 .cpu_name = "e300c2",
1183 .cpu_features = CPU_FTRS_E300C2,
1184 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1185 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1186 MMU_FTR_NEED_DTLB_SW_LRU,
1189 .cpu_setup = __setup_cpu_603,
1190 .machine_check = machine_check_83xx,
1191 .platform = "ppc603",
1193 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
1194 .pvr_mask = 0x7fff0000,
1195 .pvr_value = 0x00850000,
1196 .cpu_name = "e300c3",
1197 .cpu_features = CPU_FTRS_E300,
1198 .cpu_user_features = COMMON_USER,
1199 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1200 MMU_FTR_NEED_DTLB_SW_LRU,
1203 .cpu_setup = __setup_cpu_603,
1204 .machine_check = machine_check_83xx,
1206 .oprofile_cpu_type = "ppc/e300",
1207 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1208 .platform = "ppc603",
1210 { /* e300c4 (e300c1, plus one IU) */
1211 .pvr_mask = 0x7fff0000,
1212 .pvr_value = 0x00860000,
1213 .cpu_name = "e300c4",
1214 .cpu_features = CPU_FTRS_E300,
1215 .cpu_user_features = COMMON_USER,
1216 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1217 MMU_FTR_NEED_DTLB_SW_LRU,
1220 .cpu_setup = __setup_cpu_603,
1221 .machine_check = machine_check_83xx,
1223 .oprofile_cpu_type = "ppc/e300",
1224 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1225 .platform = "ppc603",
1228 { /* default match, we assume split I/D cache & TB (non-601)... */
1229 .pvr_mask = 0x00000000,
1230 .pvr_value = 0x00000000,
1231 .cpu_name = "(generic PPC)",
1232 .cpu_features = CPU_FTRS_CLASSIC32,
1233 .cpu_user_features = COMMON_USER,
1234 .mmu_features = MMU_FTR_HPTE_TABLE,
1237 .machine_check = machine_check_generic,
1238 .platform = "ppc603",
1240 #endif /* CONFIG_PPC_BOOK3S_32 */
1243 .pvr_mask = 0xffff0000,
1244 .pvr_value = 0x00500000,
1246 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1247 * if the 8xx code is there.... */
1248 .cpu_features = CPU_FTRS_8XX,
1249 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1250 .mmu_features = MMU_FTR_TYPE_8xx,
1253 .machine_check = machine_check_8xx,
1254 .platform = "ppc823",
1256 #endif /* CONFIG_8xx */
1259 .pvr_mask = 0xffffff00,
1260 .pvr_value = 0x00200200,
1261 .cpu_name = "403GC",
1262 .cpu_features = CPU_FTRS_40X,
1263 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1264 .mmu_features = MMU_FTR_TYPE_40x,
1267 .machine_check = machine_check_4xx,
1268 .platform = "ppc403",
1271 .pvr_mask = 0xffffff00,
1272 .pvr_value = 0x00201400,
1273 .cpu_name = "403GCX",
1274 .cpu_features = CPU_FTRS_40X,
1275 .cpu_user_features = PPC_FEATURE_32 |
1276 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
1277 .mmu_features = MMU_FTR_TYPE_40x,
1280 .machine_check = machine_check_4xx,
1281 .platform = "ppc403",
1284 .pvr_mask = 0xffff0000,
1285 .pvr_value = 0x00200000,
1286 .cpu_name = "403G ??",
1287 .cpu_features = CPU_FTRS_40X,
1288 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1289 .mmu_features = MMU_FTR_TYPE_40x,
1292 .machine_check = machine_check_4xx,
1293 .platform = "ppc403",
1296 .pvr_mask = 0xffff0000,
1297 .pvr_value = 0x40110000,
1298 .cpu_name = "405GP",
1299 .cpu_features = CPU_FTRS_40X,
1300 .cpu_user_features = PPC_FEATURE_32 |
1301 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1302 .mmu_features = MMU_FTR_TYPE_40x,
1305 .machine_check = machine_check_4xx,
1306 .platform = "ppc405",
1309 .pvr_mask = 0xffff0000,
1310 .pvr_value = 0x40130000,
1311 .cpu_name = "STB03xxx",
1312 .cpu_features = CPU_FTRS_40X,
1313 .cpu_user_features = PPC_FEATURE_32 |
1314 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1315 .mmu_features = MMU_FTR_TYPE_40x,
1318 .machine_check = machine_check_4xx,
1319 .platform = "ppc405",
1322 .pvr_mask = 0xffff0000,
1323 .pvr_value = 0x41810000,
1324 .cpu_name = "STB04xxx",
1325 .cpu_features = CPU_FTRS_40X,
1326 .cpu_user_features = PPC_FEATURE_32 |
1327 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1328 .mmu_features = MMU_FTR_TYPE_40x,
1331 .machine_check = machine_check_4xx,
1332 .platform = "ppc405",
1335 .pvr_mask = 0xffff0000,
1336 .pvr_value = 0x41610000,
1337 .cpu_name = "NP405L",
1338 .cpu_features = CPU_FTRS_40X,
1339 .cpu_user_features = PPC_FEATURE_32 |
1340 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1341 .mmu_features = MMU_FTR_TYPE_40x,
1344 .machine_check = machine_check_4xx,
1345 .platform = "ppc405",
1348 .pvr_mask = 0xffff0000,
1349 .pvr_value = 0x40B10000,
1350 .cpu_name = "NP4GS3",
1351 .cpu_features = CPU_FTRS_40X,
1352 .cpu_user_features = PPC_FEATURE_32 |
1353 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1354 .mmu_features = MMU_FTR_TYPE_40x,
1357 .machine_check = machine_check_4xx,
1358 .platform = "ppc405",
1361 .pvr_mask = 0xffff0000,
1362 .pvr_value = 0x41410000,
1363 .cpu_name = "NP405H",
1364 .cpu_features = CPU_FTRS_40X,
1365 .cpu_user_features = PPC_FEATURE_32 |
1366 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1367 .mmu_features = MMU_FTR_TYPE_40x,
1370 .machine_check = machine_check_4xx,
1371 .platform = "ppc405",
1374 .pvr_mask = 0xffff0000,
1375 .pvr_value = 0x50910000,
1376 .cpu_name = "405GPr",
1377 .cpu_features = CPU_FTRS_40X,
1378 .cpu_user_features = PPC_FEATURE_32 |
1379 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1380 .mmu_features = MMU_FTR_TYPE_40x,
1383 .machine_check = machine_check_4xx,
1384 .platform = "ppc405",
1387 .pvr_mask = 0xffff0000,
1388 .pvr_value = 0x51510000,
1389 .cpu_name = "STBx25xx",
1390 .cpu_features = CPU_FTRS_40X,
1391 .cpu_user_features = PPC_FEATURE_32 |
1392 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1393 .mmu_features = MMU_FTR_TYPE_40x,
1396 .machine_check = machine_check_4xx,
1397 .platform = "ppc405",
1400 .pvr_mask = 0xffff0000,
1401 .pvr_value = 0x41F10000,
1402 .cpu_name = "405LP",
1403 .cpu_features = CPU_FTRS_40X,
1404 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1405 .mmu_features = MMU_FTR_TYPE_40x,
1408 .machine_check = machine_check_4xx,
1409 .platform = "ppc405",
1411 { /* Xilinx Virtex-II Pro */
1412 .pvr_mask = 0xfffff000,
1413 .pvr_value = 0x20010000,
1414 .cpu_name = "Virtex-II Pro",
1415 .cpu_features = CPU_FTRS_40X,
1416 .cpu_user_features = PPC_FEATURE_32 |
1417 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1418 .mmu_features = MMU_FTR_TYPE_40x,
1421 .machine_check = machine_check_4xx,
1422 .platform = "ppc405",
1424 { /* Xilinx Virtex-4 FX */
1425 .pvr_mask = 0xfffff000,
1426 .pvr_value = 0x20011000,
1427 .cpu_name = "Virtex-4 FX",
1428 .cpu_features = CPU_FTRS_40X,
1429 .cpu_user_features = PPC_FEATURE_32 |
1430 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1431 .mmu_features = MMU_FTR_TYPE_40x,
1434 .machine_check = machine_check_4xx,
1435 .platform = "ppc405",
1438 .pvr_mask = 0xffff0000,
1439 .pvr_value = 0x51210000,
1440 .cpu_name = "405EP",
1441 .cpu_features = CPU_FTRS_40X,
1442 .cpu_user_features = PPC_FEATURE_32 |
1443 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1444 .mmu_features = MMU_FTR_TYPE_40x,
1447 .machine_check = machine_check_4xx,
1448 .platform = "ppc405",
1450 { /* 405EX Rev. A/B with Security */
1451 .pvr_mask = 0xffff000f,
1452 .pvr_value = 0x12910007,
1453 .cpu_name = "405EX Rev. A/B",
1454 .cpu_features = CPU_FTRS_40X,
1455 .cpu_user_features = PPC_FEATURE_32 |
1456 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1457 .mmu_features = MMU_FTR_TYPE_40x,
1460 .machine_check = machine_check_4xx,
1461 .platform = "ppc405",
1463 { /* 405EX Rev. C without Security */
1464 .pvr_mask = 0xffff000f,
1465 .pvr_value = 0x1291000d,
1466 .cpu_name = "405EX Rev. C",
1467 .cpu_features = CPU_FTRS_40X,
1468 .cpu_user_features = PPC_FEATURE_32 |
1469 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1470 .mmu_features = MMU_FTR_TYPE_40x,
1473 .machine_check = machine_check_4xx,
1474 .platform = "ppc405",
1476 { /* 405EX Rev. C with Security */
1477 .pvr_mask = 0xffff000f,
1478 .pvr_value = 0x1291000f,
1479 .cpu_name = "405EX Rev. C",
1480 .cpu_features = CPU_FTRS_40X,
1481 .cpu_user_features = PPC_FEATURE_32 |
1482 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1483 .mmu_features = MMU_FTR_TYPE_40x,
1486 .machine_check = machine_check_4xx,
1487 .platform = "ppc405",
1489 { /* 405EX Rev. D without Security */
1490 .pvr_mask = 0xffff000f,
1491 .pvr_value = 0x12910003,
1492 .cpu_name = "405EX Rev. D",
1493 .cpu_features = CPU_FTRS_40X,
1494 .cpu_user_features = PPC_FEATURE_32 |
1495 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1496 .mmu_features = MMU_FTR_TYPE_40x,
1499 .machine_check = machine_check_4xx,
1500 .platform = "ppc405",
1502 { /* 405EX Rev. D with Security */
1503 .pvr_mask = 0xffff000f,
1504 .pvr_value = 0x12910005,
1505 .cpu_name = "405EX Rev. D",
1506 .cpu_features = CPU_FTRS_40X,
1507 .cpu_user_features = PPC_FEATURE_32 |
1508 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1509 .mmu_features = MMU_FTR_TYPE_40x,
1512 .machine_check = machine_check_4xx,
1513 .platform = "ppc405",
1515 { /* 405EXr Rev. A/B without Security */
1516 .pvr_mask = 0xffff000f,
1517 .pvr_value = 0x12910001,
1518 .cpu_name = "405EXr Rev. A/B",
1519 .cpu_features = CPU_FTRS_40X,
1520 .cpu_user_features = PPC_FEATURE_32 |
1521 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1522 .mmu_features = MMU_FTR_TYPE_40x,
1525 .machine_check = machine_check_4xx,
1526 .platform = "ppc405",
1528 { /* 405EXr Rev. C without Security */
1529 .pvr_mask = 0xffff000f,
1530 .pvr_value = 0x12910009,
1531 .cpu_name = "405EXr Rev. C",
1532 .cpu_features = CPU_FTRS_40X,
1533 .cpu_user_features = PPC_FEATURE_32 |
1534 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1535 .mmu_features = MMU_FTR_TYPE_40x,
1538 .machine_check = machine_check_4xx,
1539 .platform = "ppc405",
1541 { /* 405EXr Rev. C with Security */
1542 .pvr_mask = 0xffff000f,
1543 .pvr_value = 0x1291000b,
1544 .cpu_name = "405EXr Rev. C",
1545 .cpu_features = CPU_FTRS_40X,
1546 .cpu_user_features = PPC_FEATURE_32 |
1547 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1548 .mmu_features = MMU_FTR_TYPE_40x,
1551 .machine_check = machine_check_4xx,
1552 .platform = "ppc405",
1554 { /* 405EXr Rev. D without Security */
1555 .pvr_mask = 0xffff000f,
1556 .pvr_value = 0x12910000,
1557 .cpu_name = "405EXr Rev. D",
1558 .cpu_features = CPU_FTRS_40X,
1559 .cpu_user_features = PPC_FEATURE_32 |
1560 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1561 .mmu_features = MMU_FTR_TYPE_40x,
1564 .machine_check = machine_check_4xx,
1565 .platform = "ppc405",
1567 { /* 405EXr Rev. D with Security */
1568 .pvr_mask = 0xffff000f,
1569 .pvr_value = 0x12910002,
1570 .cpu_name = "405EXr Rev. D",
1571 .cpu_features = CPU_FTRS_40X,
1572 .cpu_user_features = PPC_FEATURE_32 |
1573 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1574 .mmu_features = MMU_FTR_TYPE_40x,
1577 .machine_check = machine_check_4xx,
1578 .platform = "ppc405",
1582 .pvr_mask = 0xffff0000,
1583 .pvr_value = 0x41510000,
1584 .cpu_name = "405EZ",
1585 .cpu_features = CPU_FTRS_40X,
1586 .cpu_user_features = PPC_FEATURE_32 |
1587 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1588 .mmu_features = MMU_FTR_TYPE_40x,
1591 .machine_check = machine_check_4xx,
1592 .platform = "ppc405",
1595 .pvr_mask = 0xffff0000,
1596 .pvr_value = 0x7ff11432,
1597 .cpu_name = "APM8018X",
1598 .cpu_features = CPU_FTRS_40X,
1599 .cpu_user_features = PPC_FEATURE_32 |
1600 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1601 .mmu_features = MMU_FTR_TYPE_40x,
1604 .machine_check = machine_check_4xx,
1605 .platform = "ppc405",
1607 { /* default match */
1608 .pvr_mask = 0x00000000,
1609 .pvr_value = 0x00000000,
1610 .cpu_name = "(generic 40x PPC)",
1611 .cpu_features = CPU_FTRS_40X,
1612 .cpu_user_features = PPC_FEATURE_32 |
1613 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1614 .mmu_features = MMU_FTR_TYPE_40x,
1617 .machine_check = machine_check_4xx,
1618 .platform = "ppc405",
1621 #endif /* CONFIG_40x */
1624 .pvr_mask = 0xf0000fff,
1625 .pvr_value = 0x40000850,
1626 .cpu_name = "440GR Rev. A",
1627 .cpu_features = CPU_FTRS_44X,
1628 .cpu_user_features = COMMON_USER_BOOKE,
1629 .mmu_features = MMU_FTR_TYPE_44x,
1632 .machine_check = machine_check_4xx,
1633 .platform = "ppc440",
1635 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1636 .pvr_mask = 0xf0000fff,
1637 .pvr_value = 0x40000858,
1638 .cpu_name = "440EP Rev. A",
1639 .cpu_features = CPU_FTRS_44X,
1640 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1641 .mmu_features = MMU_FTR_TYPE_44x,
1644 .cpu_setup = __setup_cpu_440ep,
1645 .machine_check = machine_check_4xx,
1646 .platform = "ppc440",
1649 .pvr_mask = 0xf0000fff,
1650 .pvr_value = 0x400008d3,
1651 .cpu_name = "440GR Rev. B",
1652 .cpu_features = CPU_FTRS_44X,
1653 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1654 .mmu_features = MMU_FTR_TYPE_44x,
1657 .machine_check = machine_check_4xx,
1658 .platform = "ppc440",
1660 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1661 .pvr_mask = 0xf0000ff7,
1662 .pvr_value = 0x400008d4,
1663 .cpu_name = "440EP Rev. C",
1664 .cpu_features = CPU_FTRS_44X,
1665 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1666 .mmu_features = MMU_FTR_TYPE_44x,
1669 .cpu_setup = __setup_cpu_440ep,
1670 .machine_check = machine_check_4xx,
1671 .platform = "ppc440",
1673 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1674 .pvr_mask = 0xf0000fff,
1675 .pvr_value = 0x400008db,
1676 .cpu_name = "440EP Rev. B",
1677 .cpu_features = CPU_FTRS_44X,
1678 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1679 .mmu_features = MMU_FTR_TYPE_44x,
1682 .cpu_setup = __setup_cpu_440ep,
1683 .machine_check = machine_check_4xx,
1684 .platform = "ppc440",
1687 .pvr_mask = 0xf0000ffb,
1688 .pvr_value = 0x200008D0,
1689 .cpu_name = "440GRX",
1690 .cpu_features = CPU_FTRS_44X,
1691 .cpu_user_features = COMMON_USER_BOOKE,
1692 .mmu_features = MMU_FTR_TYPE_44x,
1695 .cpu_setup = __setup_cpu_440grx,
1696 .machine_check = machine_check_440A,
1697 .platform = "ppc440",
1699 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1700 .pvr_mask = 0xf0000ffb,
1701 .pvr_value = 0x200008D8,
1702 .cpu_name = "440EPX",
1703 .cpu_features = CPU_FTRS_44X,
1704 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1705 .mmu_features = MMU_FTR_TYPE_44x,
1708 .cpu_setup = __setup_cpu_440epx,
1709 .machine_check = machine_check_440A,
1710 .platform = "ppc440",
1712 { /* 440GP Rev. B */
1713 .pvr_mask = 0xf0000fff,
1714 .pvr_value = 0x40000440,
1715 .cpu_name = "440GP Rev. B",
1716 .cpu_features = CPU_FTRS_44X,
1717 .cpu_user_features = COMMON_USER_BOOKE,
1718 .mmu_features = MMU_FTR_TYPE_44x,
1721 .machine_check = machine_check_4xx,
1722 .platform = "ppc440gp",
1724 { /* 440GP Rev. C */
1725 .pvr_mask = 0xf0000fff,
1726 .pvr_value = 0x40000481,
1727 .cpu_name = "440GP Rev. C",
1728 .cpu_features = CPU_FTRS_44X,
1729 .cpu_user_features = COMMON_USER_BOOKE,
1730 .mmu_features = MMU_FTR_TYPE_44x,
1733 .machine_check = machine_check_4xx,
1734 .platform = "ppc440gp",
1736 { /* 440GX Rev. A */
1737 .pvr_mask = 0xf0000fff,
1738 .pvr_value = 0x50000850,
1739 .cpu_name = "440GX Rev. A",
1740 .cpu_features = CPU_FTRS_44X,
1741 .cpu_user_features = COMMON_USER_BOOKE,
1742 .mmu_features = MMU_FTR_TYPE_44x,
1745 .cpu_setup = __setup_cpu_440gx,
1746 .machine_check = machine_check_440A,
1747 .platform = "ppc440",
1749 { /* 440GX Rev. B */
1750 .pvr_mask = 0xf0000fff,
1751 .pvr_value = 0x50000851,
1752 .cpu_name = "440GX Rev. B",
1753 .cpu_features = CPU_FTRS_44X,
1754 .cpu_user_features = COMMON_USER_BOOKE,
1755 .mmu_features = MMU_FTR_TYPE_44x,
1758 .cpu_setup = __setup_cpu_440gx,
1759 .machine_check = machine_check_440A,
1760 .platform = "ppc440",
1762 { /* 440GX Rev. C */
1763 .pvr_mask = 0xf0000fff,
1764 .pvr_value = 0x50000892,
1765 .cpu_name = "440GX Rev. C",
1766 .cpu_features = CPU_FTRS_44X,
1767 .cpu_user_features = COMMON_USER_BOOKE,
1768 .mmu_features = MMU_FTR_TYPE_44x,
1771 .cpu_setup = __setup_cpu_440gx,
1772 .machine_check = machine_check_440A,
1773 .platform = "ppc440",
1775 { /* 440GX Rev. F */
1776 .pvr_mask = 0xf0000fff,
1777 .pvr_value = 0x50000894,
1778 .cpu_name = "440GX Rev. F",
1779 .cpu_features = CPU_FTRS_44X,
1780 .cpu_user_features = COMMON_USER_BOOKE,
1781 .mmu_features = MMU_FTR_TYPE_44x,
1784 .cpu_setup = __setup_cpu_440gx,
1785 .machine_check = machine_check_440A,
1786 .platform = "ppc440",
1788 { /* 440SP Rev. A */
1789 .pvr_mask = 0xfff00fff,
1790 .pvr_value = 0x53200891,
1791 .cpu_name = "440SP Rev. A",
1792 .cpu_features = CPU_FTRS_44X,
1793 .cpu_user_features = COMMON_USER_BOOKE,
1794 .mmu_features = MMU_FTR_TYPE_44x,
1797 .machine_check = machine_check_4xx,
1798 .platform = "ppc440",
1800 { /* 440SPe Rev. A */
1801 .pvr_mask = 0xfff00fff,
1802 .pvr_value = 0x53400890,
1803 .cpu_name = "440SPe Rev. A",
1804 .cpu_features = CPU_FTRS_44X,
1805 .cpu_user_features = COMMON_USER_BOOKE,
1806 .mmu_features = MMU_FTR_TYPE_44x,
1809 .cpu_setup = __setup_cpu_440spe,
1810 .machine_check = machine_check_440A,
1811 .platform = "ppc440",
1813 { /* 440SPe Rev. B */
1814 .pvr_mask = 0xfff00fff,
1815 .pvr_value = 0x53400891,
1816 .cpu_name = "440SPe Rev. B",
1817 .cpu_features = CPU_FTRS_44X,
1818 .cpu_user_features = COMMON_USER_BOOKE,
1819 .mmu_features = MMU_FTR_TYPE_44x,
1822 .cpu_setup = __setup_cpu_440spe,
1823 .machine_check = machine_check_440A,
1824 .platform = "ppc440",
1826 { /* 440 in Xilinx Virtex-5 FXT */
1827 .pvr_mask = 0xfffffff0,
1828 .pvr_value = 0x7ff21910,
1829 .cpu_name = "440 in Virtex-5 FXT",
1830 .cpu_features = CPU_FTRS_44X,
1831 .cpu_user_features = COMMON_USER_BOOKE,
1832 .mmu_features = MMU_FTR_TYPE_44x,
1835 .cpu_setup = __setup_cpu_440x5,
1836 .machine_check = machine_check_440A,
1837 .platform = "ppc440",
1840 .pvr_mask = 0xffff0006,
1841 .pvr_value = 0x13020002,
1842 .cpu_name = "460EX",
1843 .cpu_features = CPU_FTRS_440x6,
1844 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1845 .mmu_features = MMU_FTR_TYPE_44x,
1848 .cpu_setup = __setup_cpu_460ex,
1849 .machine_check = machine_check_440A,
1850 .platform = "ppc440",
1853 .pvr_mask = 0xffff0007,
1854 .pvr_value = 0x13020004,
1855 .cpu_name = "460EX Rev. B",
1856 .cpu_features = CPU_FTRS_440x6,
1857 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1858 .mmu_features = MMU_FTR_TYPE_44x,
1861 .cpu_setup = __setup_cpu_460ex,
1862 .machine_check = machine_check_440A,
1863 .platform = "ppc440",
1866 .pvr_mask = 0xffff0006,
1867 .pvr_value = 0x13020000,
1868 .cpu_name = "460GT",
1869 .cpu_features = CPU_FTRS_440x6,
1870 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1871 .mmu_features = MMU_FTR_TYPE_44x,
1874 .cpu_setup = __setup_cpu_460gt,
1875 .machine_check = machine_check_440A,
1876 .platform = "ppc440",
1879 .pvr_mask = 0xffff0007,
1880 .pvr_value = 0x13020005,
1881 .cpu_name = "460GT Rev. B",
1882 .cpu_features = CPU_FTRS_440x6,
1883 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1884 .mmu_features = MMU_FTR_TYPE_44x,
1887 .cpu_setup = __setup_cpu_460gt,
1888 .machine_check = machine_check_440A,
1889 .platform = "ppc440",
1892 .pvr_mask = 0xffffff00,
1893 .pvr_value = 0x13541800,
1894 .cpu_name = "460SX",
1895 .cpu_features = CPU_FTRS_44X,
1896 .cpu_user_features = COMMON_USER_BOOKE,
1897 .mmu_features = MMU_FTR_TYPE_44x,
1900 .cpu_setup = __setup_cpu_460sx,
1901 .machine_check = machine_check_440A,
1902 .platform = "ppc440",
1904 { /* 464 in APM821xx */
1905 .pvr_mask = 0xfffffff0,
1906 .pvr_value = 0x12C41C80,
1907 .cpu_name = "APM821XX",
1908 .cpu_features = CPU_FTRS_44X,
1909 .cpu_user_features = COMMON_USER_BOOKE |
1910 PPC_FEATURE_HAS_FPU,
1911 .mmu_features = MMU_FTR_TYPE_44x,
1914 .cpu_setup = __setup_cpu_apm821xx,
1915 .machine_check = machine_check_440A,
1916 .platform = "ppc440",
1918 { /* 476 DD2 core */
1919 .pvr_mask = 0xffffffff,
1920 .pvr_value = 0x11a52080,
1922 .cpu_features = CPU_FTRS_47X | CPU_FTR_476_DD2,
1923 .cpu_user_features = COMMON_USER_BOOKE |
1924 PPC_FEATURE_HAS_FPU,
1925 .mmu_features = MMU_FTR_TYPE_47x |
1926 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1928 .dcache_bsize = 128,
1929 .machine_check = machine_check_47x,
1930 .platform = "ppc470",
1933 .pvr_mask = 0xffff0000,
1934 .pvr_value = 0x7ff50000,
1935 .cpu_name = "476fpe",
1936 .cpu_features = CPU_FTRS_47X | CPU_FTR_476_DD2,
1937 .cpu_user_features = COMMON_USER_BOOKE |
1938 PPC_FEATURE_HAS_FPU,
1939 .mmu_features = MMU_FTR_TYPE_47x |
1940 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1942 .dcache_bsize = 128,
1943 .machine_check = machine_check_47x,
1944 .platform = "ppc470",
1947 .pvr_mask = 0xffff0000,
1948 .pvr_value = 0x00050000,
1950 .cpu_features = CPU_FTRS_47X,
1951 .cpu_user_features = COMMON_USER_BOOKE |
1952 PPC_FEATURE_HAS_FPU,
1953 .mmu_features = MMU_FTR_TYPE_47x |
1954 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1956 .dcache_bsize = 128,
1957 .machine_check = machine_check_47x,
1958 .platform = "ppc470",
1961 .pvr_mask = 0xffff0000,
1962 .pvr_value = 0x11a50000,
1964 .cpu_features = CPU_FTRS_47X,
1965 .cpu_user_features = COMMON_USER_BOOKE |
1966 PPC_FEATURE_HAS_FPU,
1967 .mmu_features = MMU_FTR_TYPE_47x |
1968 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1970 .dcache_bsize = 128,
1971 .machine_check = machine_check_47x,
1972 .platform = "ppc470",
1974 { /* default match */
1975 .pvr_mask = 0x00000000,
1976 .pvr_value = 0x00000000,
1977 .cpu_name = "(generic 44x PPC)",
1978 .cpu_features = CPU_FTRS_44X,
1979 .cpu_user_features = COMMON_USER_BOOKE,
1980 .mmu_features = MMU_FTR_TYPE_44x,
1983 .machine_check = machine_check_4xx,
1984 .platform = "ppc440",
1986 #endif /* CONFIG_44x */
1989 .pvr_mask = 0xfff00000,
1990 .pvr_value = 0x81000000,
1991 .cpu_name = "e200z5",
1992 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1993 .cpu_features = CPU_FTRS_E200,
1994 .cpu_user_features = COMMON_USER_BOOKE |
1995 PPC_FEATURE_HAS_EFP_SINGLE |
1996 PPC_FEATURE_UNIFIED_CACHE,
1997 .mmu_features = MMU_FTR_TYPE_FSL_E,
1999 .machine_check = machine_check_e200,
2000 .platform = "ppc5554",
2003 .pvr_mask = 0xfff00000,
2004 .pvr_value = 0x81100000,
2005 .cpu_name = "e200z6",
2006 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
2007 .cpu_features = CPU_FTRS_E200,
2008 .cpu_user_features = COMMON_USER_BOOKE |
2009 PPC_FEATURE_HAS_SPE_COMP |
2010 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
2011 PPC_FEATURE_UNIFIED_CACHE,
2012 .mmu_features = MMU_FTR_TYPE_FSL_E,
2014 .machine_check = machine_check_e200,
2015 .platform = "ppc5554",
2017 { /* default match */
2018 .pvr_mask = 0x00000000,
2019 .pvr_value = 0x00000000,
2020 .cpu_name = "(generic E200 PPC)",
2021 .cpu_features = CPU_FTRS_E200,
2022 .cpu_user_features = COMMON_USER_BOOKE |
2023 PPC_FEATURE_HAS_EFP_SINGLE |
2024 PPC_FEATURE_UNIFIED_CACHE,
2025 .mmu_features = MMU_FTR_TYPE_FSL_E,
2027 .cpu_setup = __setup_cpu_e200,
2028 .machine_check = machine_check_e200,
2029 .platform = "ppc5554",
2031 #endif /* CONFIG_E200 */
2032 #endif /* CONFIG_PPC32 */
2035 #ifndef CONFIG_PPC_E500MC
2037 .pvr_mask = 0xffff0000,
2038 .pvr_value = 0x80200000,
2040 .cpu_features = CPU_FTRS_E500,
2041 .cpu_user_features = COMMON_USER_BOOKE |
2042 PPC_FEATURE_HAS_SPE_COMP |
2043 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
2044 .cpu_user_features2 = PPC_FEATURE2_ISEL,
2045 .mmu_features = MMU_FTR_TYPE_FSL_E,
2049 .oprofile_cpu_type = "ppc/e500",
2050 .oprofile_type = PPC_OPROFILE_FSL_EMB,
2051 .cpu_setup = __setup_cpu_e500v1,
2052 .machine_check = machine_check_e500,
2053 .platform = "ppc8540",
2056 .pvr_mask = 0xffff0000,
2057 .pvr_value = 0x80210000,
2058 .cpu_name = "e500v2",
2059 .cpu_features = CPU_FTRS_E500_2,
2060 .cpu_user_features = COMMON_USER_BOOKE |
2061 PPC_FEATURE_HAS_SPE_COMP |
2062 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
2063 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
2064 .cpu_user_features2 = PPC_FEATURE2_ISEL,
2065 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS,
2069 .oprofile_cpu_type = "ppc/e500",
2070 .oprofile_type = PPC_OPROFILE_FSL_EMB,
2071 .cpu_setup = __setup_cpu_e500v2,
2072 .machine_check = machine_check_e500,
2073 .platform = "ppc8548",
2074 .cpu_down_flush = cpu_down_flush_e500v2,
2078 .pvr_mask = 0xffff0000,
2079 .pvr_value = 0x80230000,
2080 .cpu_name = "e500mc",
2081 .cpu_features = CPU_FTRS_E500MC,
2082 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
2083 .cpu_user_features2 = PPC_FEATURE2_ISEL,
2084 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
2089 .oprofile_cpu_type = "ppc/e500mc",
2090 .oprofile_type = PPC_OPROFILE_FSL_EMB,
2091 .cpu_setup = __setup_cpu_e500mc,
2092 .machine_check = machine_check_e500mc,
2093 .platform = "ppce500mc",
2094 .cpu_down_flush = cpu_down_flush_e500mc,
2096 #endif /* CONFIG_PPC_E500MC */
2097 #endif /* CONFIG_PPC32 */
2098 #ifdef CONFIG_PPC_E500MC
2100 .pvr_mask = 0xffff0000,
2101 .pvr_value = 0x80240000,
2102 .cpu_name = "e5500",
2103 .cpu_features = CPU_FTRS_E5500,
2104 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
2105 .cpu_user_features2 = PPC_FEATURE2_ISEL,
2106 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
2111 .oprofile_cpu_type = "ppc/e500mc",
2112 .oprofile_type = PPC_OPROFILE_FSL_EMB,
2113 .cpu_setup = __setup_cpu_e5500,
2114 #ifndef CONFIG_PPC32
2115 .cpu_restore = __restore_cpu_e5500,
2117 .machine_check = machine_check_e500mc,
2118 .platform = "ppce5500",
2119 .cpu_down_flush = cpu_down_flush_e5500,
2122 .pvr_mask = 0xffff0000,
2123 .pvr_value = 0x80400000,
2124 .cpu_name = "e6500",
2125 .cpu_features = CPU_FTRS_E6500,
2126 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU |
2127 PPC_FEATURE_HAS_ALTIVEC_COMP,
2128 .cpu_user_features2 = PPC_FEATURE2_ISEL,
2129 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
2134 .oprofile_cpu_type = "ppc/e6500",
2135 .oprofile_type = PPC_OPROFILE_FSL_EMB,
2136 .cpu_setup = __setup_cpu_e6500,
2137 #ifndef CONFIG_PPC32
2138 .cpu_restore = __restore_cpu_e6500,
2140 .machine_check = machine_check_e500mc,
2141 .platform = "ppce6500",
2142 .cpu_down_flush = cpu_down_flush_e6500,
2144 #endif /* CONFIG_PPC_E500MC */
2146 { /* default match */
2147 .pvr_mask = 0x00000000,
2148 .pvr_value = 0x00000000,
2149 .cpu_name = "(generic E500 PPC)",
2150 .cpu_features = CPU_FTRS_E500,
2151 .cpu_user_features = COMMON_USER_BOOKE |
2152 PPC_FEATURE_HAS_SPE_COMP |
2153 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
2154 .mmu_features = MMU_FTR_TYPE_FSL_E,
2157 .machine_check = machine_check_e500,
2158 .platform = "powerpc",
2160 #endif /* CONFIG_PPC32 */
2161 #endif /* CONFIG_E500 */
2164 static struct cpu_spec the_cpu_spec;
2166 static struct cpu_spec * __init setup_cpu_spec(unsigned long offset,
2169 struct cpu_spec *t = &the_cpu_spec;
2170 struct cpu_spec old;
2175 /* Copy everything, then do fixups */
2179 * If we are overriding a previous value derived from the real
2180 * PVR with a new value obtained using a logical PVR value,
2181 * don't modify the performance monitor fields.
2183 if (old.num_pmcs && !s->num_pmcs) {
2184 t->num_pmcs = old.num_pmcs;
2185 t->pmc_type = old.pmc_type;
2186 t->oprofile_type = old.oprofile_type;
2187 t->oprofile_mmcra_sihv = old.oprofile_mmcra_sihv;
2188 t->oprofile_mmcra_sipr = old.oprofile_mmcra_sipr;
2189 t->oprofile_mmcra_clear = old.oprofile_mmcra_clear;
2192 * If we have passed through this logic once before and
2193 * have pulled the default case because the real PVR was
2194 * not found inside cpu_specs[], then we are possibly
2195 * running in compatibility mode. In that case, let the
2196 * oprofiler know which set of compatibility counters to
2197 * pull from by making sure the oprofile_cpu_type string
2198 * is set to that of compatibility mode. If the
2199 * oprofile_cpu_type already has a value, then we are
2200 * possibly overriding a real PVR with a logical one,
2201 * and, in that case, keep the current value for
2202 * oprofile_cpu_type. Futhermore, let's ensure that the
2203 * fix for the PMAO bug is enabled on compatibility mode.
2205 if (old.oprofile_cpu_type != NULL) {
2206 t->oprofile_cpu_type = old.oprofile_cpu_type;
2207 t->oprofile_type = old.oprofile_type;
2208 t->cpu_features |= old.cpu_features & CPU_FTR_PMAO_BUG;
2212 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
2215 * Set the base platform string once; assumes
2216 * we're called with real pvr first.
2218 if (*PTRRELOC(&powerpc_base_platform) == NULL)
2219 *PTRRELOC(&powerpc_base_platform) = t->platform;
2221 #if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
2222 /* ppc64 and booke expect identify_cpu to also call setup_cpu for
2223 * that processor. I will consolidate that at a later time, for now,
2224 * just use #ifdef. We also don't need to PTRRELOC the function
2225 * pointer on ppc64 and booke as we are running at 0 in real mode
2226 * on ppc64 and reloc_offset is always 0 on booke.
2229 t->cpu_setup(offset, t);
2231 #endif /* CONFIG_PPC64 || CONFIG_BOOKE */
2236 struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
2238 struct cpu_spec *s = cpu_specs;
2243 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) {
2244 if ((pvr & s->pvr_mask) == s->pvr_value)
2245 return setup_cpu_spec(offset, s);
2253 #ifdef CONFIG_JUMP_LABEL_FEATURE_CHECKS
2254 struct static_key_true cpu_feature_keys[NUM_CPU_FTR_KEYS] = {
2255 [0 ... NUM_CPU_FTR_KEYS - 1] = STATIC_KEY_TRUE_INIT
2257 EXPORT_SYMBOL_GPL(cpu_feature_keys);
2259 void __init cpu_feature_keys_init(void)
2263 for (i = 0; i < NUM_CPU_FTR_KEYS; i++) {
2264 unsigned long f = 1ul << i;
2266 if (!(cur_cpu_spec->cpu_features & f))
2267 static_branch_disable(&cpu_feature_keys[i]);
2271 struct static_key_true mmu_feature_keys[NUM_MMU_FTR_KEYS] = {
2272 [0 ... NUM_MMU_FTR_KEYS - 1] = STATIC_KEY_TRUE_INIT
2274 EXPORT_SYMBOL_GPL(mmu_feature_keys);
2276 void __init mmu_feature_keys_init(void)
2280 for (i = 0; i < NUM_MMU_FTR_KEYS; i++) {
2281 unsigned long f = 1ul << i;
2283 if (!(cur_cpu_spec->mmu_features & f))
2284 static_branch_disable(&mmu_feature_keys[i]);