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 { /* e300c1 (a 603e core, plus some) on 83xx */
1166 .pvr_mask = 0x7fff0000,
1167 .pvr_value = 0x00830000,
1168 .cpu_name = "e300c1",
1169 .cpu_features = CPU_FTRS_E300,
1170 .cpu_user_features = COMMON_USER,
1171 .mmu_features = MMU_FTR_USE_HIGH_BATS,
1174 .cpu_setup = __setup_cpu_603,
1175 .machine_check = machine_check_generic,
1176 .platform = "ppc603",
1178 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
1179 .pvr_mask = 0x7fff0000,
1180 .pvr_value = 0x00840000,
1181 .cpu_name = "e300c2",
1182 .cpu_features = CPU_FTRS_E300C2,
1183 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1184 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1185 MMU_FTR_NEED_DTLB_SW_LRU,
1188 .cpu_setup = __setup_cpu_603,
1189 .machine_check = machine_check_generic,
1190 .platform = "ppc603",
1192 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
1193 .pvr_mask = 0x7fff0000,
1194 .pvr_value = 0x00850000,
1195 .cpu_name = "e300c3",
1196 .cpu_features = CPU_FTRS_E300,
1197 .cpu_user_features = COMMON_USER,
1198 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1199 MMU_FTR_NEED_DTLB_SW_LRU,
1202 .cpu_setup = __setup_cpu_603,
1203 .machine_check = machine_check_generic,
1205 .oprofile_cpu_type = "ppc/e300",
1206 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1207 .platform = "ppc603",
1209 { /* e300c4 (e300c1, plus one IU) */
1210 .pvr_mask = 0x7fff0000,
1211 .pvr_value = 0x00860000,
1212 .cpu_name = "e300c4",
1213 .cpu_features = CPU_FTRS_E300,
1214 .cpu_user_features = COMMON_USER,
1215 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1216 MMU_FTR_NEED_DTLB_SW_LRU,
1219 .cpu_setup = __setup_cpu_603,
1220 .machine_check = machine_check_generic,
1222 .oprofile_cpu_type = "ppc/e300",
1223 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1224 .platform = "ppc603",
1226 { /* default match, we assume split I/D cache & TB (non-601)... */
1227 .pvr_mask = 0x00000000,
1228 .pvr_value = 0x00000000,
1229 .cpu_name = "(generic PPC)",
1230 .cpu_features = CPU_FTRS_CLASSIC32,
1231 .cpu_user_features = COMMON_USER,
1232 .mmu_features = MMU_FTR_HPTE_TABLE,
1235 .machine_check = machine_check_generic,
1236 .platform = "ppc603",
1238 #endif /* CONFIG_PPC_BOOK3S_32 */
1241 .pvr_mask = 0xffff0000,
1242 .pvr_value = 0x00500000,
1244 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1245 * if the 8xx code is there.... */
1246 .cpu_features = CPU_FTRS_8XX,
1247 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1248 .mmu_features = MMU_FTR_TYPE_8xx,
1251 .platform = "ppc823",
1253 #endif /* CONFIG_8xx */
1256 .pvr_mask = 0xffffff00,
1257 .pvr_value = 0x00200200,
1258 .cpu_name = "403GC",
1259 .cpu_features = CPU_FTRS_40X,
1260 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1261 .mmu_features = MMU_FTR_TYPE_40x,
1264 .machine_check = machine_check_4xx,
1265 .platform = "ppc403",
1268 .pvr_mask = 0xffffff00,
1269 .pvr_value = 0x00201400,
1270 .cpu_name = "403GCX",
1271 .cpu_features = CPU_FTRS_40X,
1272 .cpu_user_features = PPC_FEATURE_32 |
1273 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
1274 .mmu_features = MMU_FTR_TYPE_40x,
1277 .machine_check = machine_check_4xx,
1278 .platform = "ppc403",
1281 .pvr_mask = 0xffff0000,
1282 .pvr_value = 0x00200000,
1283 .cpu_name = "403G ??",
1284 .cpu_features = CPU_FTRS_40X,
1285 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1286 .mmu_features = MMU_FTR_TYPE_40x,
1289 .machine_check = machine_check_4xx,
1290 .platform = "ppc403",
1293 .pvr_mask = 0xffff0000,
1294 .pvr_value = 0x40110000,
1295 .cpu_name = "405GP",
1296 .cpu_features = CPU_FTRS_40X,
1297 .cpu_user_features = PPC_FEATURE_32 |
1298 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1299 .mmu_features = MMU_FTR_TYPE_40x,
1302 .machine_check = machine_check_4xx,
1303 .platform = "ppc405",
1306 .pvr_mask = 0xffff0000,
1307 .pvr_value = 0x40130000,
1308 .cpu_name = "STB03xxx",
1309 .cpu_features = CPU_FTRS_40X,
1310 .cpu_user_features = PPC_FEATURE_32 |
1311 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1312 .mmu_features = MMU_FTR_TYPE_40x,
1315 .machine_check = machine_check_4xx,
1316 .platform = "ppc405",
1319 .pvr_mask = 0xffff0000,
1320 .pvr_value = 0x41810000,
1321 .cpu_name = "STB04xxx",
1322 .cpu_features = CPU_FTRS_40X,
1323 .cpu_user_features = PPC_FEATURE_32 |
1324 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1325 .mmu_features = MMU_FTR_TYPE_40x,
1328 .machine_check = machine_check_4xx,
1329 .platform = "ppc405",
1332 .pvr_mask = 0xffff0000,
1333 .pvr_value = 0x41610000,
1334 .cpu_name = "NP405L",
1335 .cpu_features = CPU_FTRS_40X,
1336 .cpu_user_features = PPC_FEATURE_32 |
1337 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1338 .mmu_features = MMU_FTR_TYPE_40x,
1341 .machine_check = machine_check_4xx,
1342 .platform = "ppc405",
1345 .pvr_mask = 0xffff0000,
1346 .pvr_value = 0x40B10000,
1347 .cpu_name = "NP4GS3",
1348 .cpu_features = CPU_FTRS_40X,
1349 .cpu_user_features = PPC_FEATURE_32 |
1350 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1351 .mmu_features = MMU_FTR_TYPE_40x,
1354 .machine_check = machine_check_4xx,
1355 .platform = "ppc405",
1358 .pvr_mask = 0xffff0000,
1359 .pvr_value = 0x41410000,
1360 .cpu_name = "NP405H",
1361 .cpu_features = CPU_FTRS_40X,
1362 .cpu_user_features = PPC_FEATURE_32 |
1363 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1364 .mmu_features = MMU_FTR_TYPE_40x,
1367 .machine_check = machine_check_4xx,
1368 .platform = "ppc405",
1371 .pvr_mask = 0xffff0000,
1372 .pvr_value = 0x50910000,
1373 .cpu_name = "405GPr",
1374 .cpu_features = CPU_FTRS_40X,
1375 .cpu_user_features = PPC_FEATURE_32 |
1376 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1377 .mmu_features = MMU_FTR_TYPE_40x,
1380 .machine_check = machine_check_4xx,
1381 .platform = "ppc405",
1384 .pvr_mask = 0xffff0000,
1385 .pvr_value = 0x51510000,
1386 .cpu_name = "STBx25xx",
1387 .cpu_features = CPU_FTRS_40X,
1388 .cpu_user_features = PPC_FEATURE_32 |
1389 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1390 .mmu_features = MMU_FTR_TYPE_40x,
1393 .machine_check = machine_check_4xx,
1394 .platform = "ppc405",
1397 .pvr_mask = 0xffff0000,
1398 .pvr_value = 0x41F10000,
1399 .cpu_name = "405LP",
1400 .cpu_features = CPU_FTRS_40X,
1401 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1402 .mmu_features = MMU_FTR_TYPE_40x,
1405 .machine_check = machine_check_4xx,
1406 .platform = "ppc405",
1408 { /* Xilinx Virtex-II Pro */
1409 .pvr_mask = 0xfffff000,
1410 .pvr_value = 0x20010000,
1411 .cpu_name = "Virtex-II Pro",
1412 .cpu_features = CPU_FTRS_40X,
1413 .cpu_user_features = PPC_FEATURE_32 |
1414 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1415 .mmu_features = MMU_FTR_TYPE_40x,
1418 .machine_check = machine_check_4xx,
1419 .platform = "ppc405",
1421 { /* Xilinx Virtex-4 FX */
1422 .pvr_mask = 0xfffff000,
1423 .pvr_value = 0x20011000,
1424 .cpu_name = "Virtex-4 FX",
1425 .cpu_features = CPU_FTRS_40X,
1426 .cpu_user_features = PPC_FEATURE_32 |
1427 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1428 .mmu_features = MMU_FTR_TYPE_40x,
1431 .machine_check = machine_check_4xx,
1432 .platform = "ppc405",
1435 .pvr_mask = 0xffff0000,
1436 .pvr_value = 0x51210000,
1437 .cpu_name = "405EP",
1438 .cpu_features = CPU_FTRS_40X,
1439 .cpu_user_features = PPC_FEATURE_32 |
1440 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1441 .mmu_features = MMU_FTR_TYPE_40x,
1444 .machine_check = machine_check_4xx,
1445 .platform = "ppc405",
1447 { /* 405EX Rev. A/B with Security */
1448 .pvr_mask = 0xffff000f,
1449 .pvr_value = 0x12910007,
1450 .cpu_name = "405EX Rev. A/B",
1451 .cpu_features = CPU_FTRS_40X,
1452 .cpu_user_features = PPC_FEATURE_32 |
1453 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1454 .mmu_features = MMU_FTR_TYPE_40x,
1457 .machine_check = machine_check_4xx,
1458 .platform = "ppc405",
1460 { /* 405EX Rev. C without Security */
1461 .pvr_mask = 0xffff000f,
1462 .pvr_value = 0x1291000d,
1463 .cpu_name = "405EX Rev. C",
1464 .cpu_features = CPU_FTRS_40X,
1465 .cpu_user_features = PPC_FEATURE_32 |
1466 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1467 .mmu_features = MMU_FTR_TYPE_40x,
1470 .machine_check = machine_check_4xx,
1471 .platform = "ppc405",
1473 { /* 405EX Rev. C with Security */
1474 .pvr_mask = 0xffff000f,
1475 .pvr_value = 0x1291000f,
1476 .cpu_name = "405EX Rev. C",
1477 .cpu_features = CPU_FTRS_40X,
1478 .cpu_user_features = PPC_FEATURE_32 |
1479 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1480 .mmu_features = MMU_FTR_TYPE_40x,
1483 .machine_check = machine_check_4xx,
1484 .platform = "ppc405",
1486 { /* 405EX Rev. D without Security */
1487 .pvr_mask = 0xffff000f,
1488 .pvr_value = 0x12910003,
1489 .cpu_name = "405EX Rev. D",
1490 .cpu_features = CPU_FTRS_40X,
1491 .cpu_user_features = PPC_FEATURE_32 |
1492 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1493 .mmu_features = MMU_FTR_TYPE_40x,
1496 .machine_check = machine_check_4xx,
1497 .platform = "ppc405",
1499 { /* 405EX Rev. D with Security */
1500 .pvr_mask = 0xffff000f,
1501 .pvr_value = 0x12910005,
1502 .cpu_name = "405EX Rev. D",
1503 .cpu_features = CPU_FTRS_40X,
1504 .cpu_user_features = PPC_FEATURE_32 |
1505 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1506 .mmu_features = MMU_FTR_TYPE_40x,
1509 .machine_check = machine_check_4xx,
1510 .platform = "ppc405",
1512 { /* 405EXr Rev. A/B without Security */
1513 .pvr_mask = 0xffff000f,
1514 .pvr_value = 0x12910001,
1515 .cpu_name = "405EXr Rev. A/B",
1516 .cpu_features = CPU_FTRS_40X,
1517 .cpu_user_features = PPC_FEATURE_32 |
1518 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1519 .mmu_features = MMU_FTR_TYPE_40x,
1522 .machine_check = machine_check_4xx,
1523 .platform = "ppc405",
1525 { /* 405EXr Rev. C without Security */
1526 .pvr_mask = 0xffff000f,
1527 .pvr_value = 0x12910009,
1528 .cpu_name = "405EXr Rev. C",
1529 .cpu_features = CPU_FTRS_40X,
1530 .cpu_user_features = PPC_FEATURE_32 |
1531 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1532 .mmu_features = MMU_FTR_TYPE_40x,
1535 .machine_check = machine_check_4xx,
1536 .platform = "ppc405",
1538 { /* 405EXr Rev. C with Security */
1539 .pvr_mask = 0xffff000f,
1540 .pvr_value = 0x1291000b,
1541 .cpu_name = "405EXr Rev. C",
1542 .cpu_features = CPU_FTRS_40X,
1543 .cpu_user_features = PPC_FEATURE_32 |
1544 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1545 .mmu_features = MMU_FTR_TYPE_40x,
1548 .machine_check = machine_check_4xx,
1549 .platform = "ppc405",
1551 { /* 405EXr Rev. D without Security */
1552 .pvr_mask = 0xffff000f,
1553 .pvr_value = 0x12910000,
1554 .cpu_name = "405EXr Rev. D",
1555 .cpu_features = CPU_FTRS_40X,
1556 .cpu_user_features = PPC_FEATURE_32 |
1557 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1558 .mmu_features = MMU_FTR_TYPE_40x,
1561 .machine_check = machine_check_4xx,
1562 .platform = "ppc405",
1564 { /* 405EXr Rev. D with Security */
1565 .pvr_mask = 0xffff000f,
1566 .pvr_value = 0x12910002,
1567 .cpu_name = "405EXr Rev. D",
1568 .cpu_features = CPU_FTRS_40X,
1569 .cpu_user_features = PPC_FEATURE_32 |
1570 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1571 .mmu_features = MMU_FTR_TYPE_40x,
1574 .machine_check = machine_check_4xx,
1575 .platform = "ppc405",
1579 .pvr_mask = 0xffff0000,
1580 .pvr_value = 0x41510000,
1581 .cpu_name = "405EZ",
1582 .cpu_features = CPU_FTRS_40X,
1583 .cpu_user_features = PPC_FEATURE_32 |
1584 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1585 .mmu_features = MMU_FTR_TYPE_40x,
1588 .machine_check = machine_check_4xx,
1589 .platform = "ppc405",
1592 .pvr_mask = 0xffff0000,
1593 .pvr_value = 0x7ff11432,
1594 .cpu_name = "APM8018X",
1595 .cpu_features = CPU_FTRS_40X,
1596 .cpu_user_features = PPC_FEATURE_32 |
1597 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1598 .mmu_features = MMU_FTR_TYPE_40x,
1601 .machine_check = machine_check_4xx,
1602 .platform = "ppc405",
1604 { /* default match */
1605 .pvr_mask = 0x00000000,
1606 .pvr_value = 0x00000000,
1607 .cpu_name = "(generic 40x PPC)",
1608 .cpu_features = CPU_FTRS_40X,
1609 .cpu_user_features = PPC_FEATURE_32 |
1610 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1611 .mmu_features = MMU_FTR_TYPE_40x,
1614 .machine_check = machine_check_4xx,
1615 .platform = "ppc405",
1618 #endif /* CONFIG_40x */
1621 .pvr_mask = 0xf0000fff,
1622 .pvr_value = 0x40000850,
1623 .cpu_name = "440GR Rev. A",
1624 .cpu_features = CPU_FTRS_44X,
1625 .cpu_user_features = COMMON_USER_BOOKE,
1626 .mmu_features = MMU_FTR_TYPE_44x,
1629 .machine_check = machine_check_4xx,
1630 .platform = "ppc440",
1632 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1633 .pvr_mask = 0xf0000fff,
1634 .pvr_value = 0x40000858,
1635 .cpu_name = "440EP Rev. A",
1636 .cpu_features = CPU_FTRS_44X,
1637 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1638 .mmu_features = MMU_FTR_TYPE_44x,
1641 .cpu_setup = __setup_cpu_440ep,
1642 .machine_check = machine_check_4xx,
1643 .platform = "ppc440",
1646 .pvr_mask = 0xf0000fff,
1647 .pvr_value = 0x400008d3,
1648 .cpu_name = "440GR Rev. B",
1649 .cpu_features = CPU_FTRS_44X,
1650 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1651 .mmu_features = MMU_FTR_TYPE_44x,
1654 .machine_check = machine_check_4xx,
1655 .platform = "ppc440",
1657 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1658 .pvr_mask = 0xf0000ff7,
1659 .pvr_value = 0x400008d4,
1660 .cpu_name = "440EP Rev. C",
1661 .cpu_features = CPU_FTRS_44X,
1662 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1663 .mmu_features = MMU_FTR_TYPE_44x,
1666 .cpu_setup = __setup_cpu_440ep,
1667 .machine_check = machine_check_4xx,
1668 .platform = "ppc440",
1670 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1671 .pvr_mask = 0xf0000fff,
1672 .pvr_value = 0x400008db,
1673 .cpu_name = "440EP Rev. B",
1674 .cpu_features = CPU_FTRS_44X,
1675 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1676 .mmu_features = MMU_FTR_TYPE_44x,
1679 .cpu_setup = __setup_cpu_440ep,
1680 .machine_check = machine_check_4xx,
1681 .platform = "ppc440",
1684 .pvr_mask = 0xf0000ffb,
1685 .pvr_value = 0x200008D0,
1686 .cpu_name = "440GRX",
1687 .cpu_features = CPU_FTRS_44X,
1688 .cpu_user_features = COMMON_USER_BOOKE,
1689 .mmu_features = MMU_FTR_TYPE_44x,
1692 .cpu_setup = __setup_cpu_440grx,
1693 .machine_check = machine_check_440A,
1694 .platform = "ppc440",
1696 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1697 .pvr_mask = 0xf0000ffb,
1698 .pvr_value = 0x200008D8,
1699 .cpu_name = "440EPX",
1700 .cpu_features = CPU_FTRS_44X,
1701 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1702 .mmu_features = MMU_FTR_TYPE_44x,
1705 .cpu_setup = __setup_cpu_440epx,
1706 .machine_check = machine_check_440A,
1707 .platform = "ppc440",
1709 { /* 440GP Rev. B */
1710 .pvr_mask = 0xf0000fff,
1711 .pvr_value = 0x40000440,
1712 .cpu_name = "440GP Rev. B",
1713 .cpu_features = CPU_FTRS_44X,
1714 .cpu_user_features = COMMON_USER_BOOKE,
1715 .mmu_features = MMU_FTR_TYPE_44x,
1718 .machine_check = machine_check_4xx,
1719 .platform = "ppc440gp",
1721 { /* 440GP Rev. C */
1722 .pvr_mask = 0xf0000fff,
1723 .pvr_value = 0x40000481,
1724 .cpu_name = "440GP Rev. C",
1725 .cpu_features = CPU_FTRS_44X,
1726 .cpu_user_features = COMMON_USER_BOOKE,
1727 .mmu_features = MMU_FTR_TYPE_44x,
1730 .machine_check = machine_check_4xx,
1731 .platform = "ppc440gp",
1733 { /* 440GX Rev. A */
1734 .pvr_mask = 0xf0000fff,
1735 .pvr_value = 0x50000850,
1736 .cpu_name = "440GX Rev. A",
1737 .cpu_features = CPU_FTRS_44X,
1738 .cpu_user_features = COMMON_USER_BOOKE,
1739 .mmu_features = MMU_FTR_TYPE_44x,
1742 .cpu_setup = __setup_cpu_440gx,
1743 .machine_check = machine_check_440A,
1744 .platform = "ppc440",
1746 { /* 440GX Rev. B */
1747 .pvr_mask = 0xf0000fff,
1748 .pvr_value = 0x50000851,
1749 .cpu_name = "440GX Rev. B",
1750 .cpu_features = CPU_FTRS_44X,
1751 .cpu_user_features = COMMON_USER_BOOKE,
1752 .mmu_features = MMU_FTR_TYPE_44x,
1755 .cpu_setup = __setup_cpu_440gx,
1756 .machine_check = machine_check_440A,
1757 .platform = "ppc440",
1759 { /* 440GX Rev. C */
1760 .pvr_mask = 0xf0000fff,
1761 .pvr_value = 0x50000892,
1762 .cpu_name = "440GX Rev. C",
1763 .cpu_features = CPU_FTRS_44X,
1764 .cpu_user_features = COMMON_USER_BOOKE,
1765 .mmu_features = MMU_FTR_TYPE_44x,
1768 .cpu_setup = __setup_cpu_440gx,
1769 .machine_check = machine_check_440A,
1770 .platform = "ppc440",
1772 { /* 440GX Rev. F */
1773 .pvr_mask = 0xf0000fff,
1774 .pvr_value = 0x50000894,
1775 .cpu_name = "440GX Rev. F",
1776 .cpu_features = CPU_FTRS_44X,
1777 .cpu_user_features = COMMON_USER_BOOKE,
1778 .mmu_features = MMU_FTR_TYPE_44x,
1781 .cpu_setup = __setup_cpu_440gx,
1782 .machine_check = machine_check_440A,
1783 .platform = "ppc440",
1785 { /* 440SP Rev. A */
1786 .pvr_mask = 0xfff00fff,
1787 .pvr_value = 0x53200891,
1788 .cpu_name = "440SP Rev. A",
1789 .cpu_features = CPU_FTRS_44X,
1790 .cpu_user_features = COMMON_USER_BOOKE,
1791 .mmu_features = MMU_FTR_TYPE_44x,
1794 .machine_check = machine_check_4xx,
1795 .platform = "ppc440",
1797 { /* 440SPe Rev. A */
1798 .pvr_mask = 0xfff00fff,
1799 .pvr_value = 0x53400890,
1800 .cpu_name = "440SPe Rev. A",
1801 .cpu_features = CPU_FTRS_44X,
1802 .cpu_user_features = COMMON_USER_BOOKE,
1803 .mmu_features = MMU_FTR_TYPE_44x,
1806 .cpu_setup = __setup_cpu_440spe,
1807 .machine_check = machine_check_440A,
1808 .platform = "ppc440",
1810 { /* 440SPe Rev. B */
1811 .pvr_mask = 0xfff00fff,
1812 .pvr_value = 0x53400891,
1813 .cpu_name = "440SPe Rev. B",
1814 .cpu_features = CPU_FTRS_44X,
1815 .cpu_user_features = COMMON_USER_BOOKE,
1816 .mmu_features = MMU_FTR_TYPE_44x,
1819 .cpu_setup = __setup_cpu_440spe,
1820 .machine_check = machine_check_440A,
1821 .platform = "ppc440",
1823 { /* 440 in Xilinx Virtex-5 FXT */
1824 .pvr_mask = 0xfffffff0,
1825 .pvr_value = 0x7ff21910,
1826 .cpu_name = "440 in Virtex-5 FXT",
1827 .cpu_features = CPU_FTRS_44X,
1828 .cpu_user_features = COMMON_USER_BOOKE,
1829 .mmu_features = MMU_FTR_TYPE_44x,
1832 .cpu_setup = __setup_cpu_440x5,
1833 .machine_check = machine_check_440A,
1834 .platform = "ppc440",
1837 .pvr_mask = 0xffff0006,
1838 .pvr_value = 0x13020002,
1839 .cpu_name = "460EX",
1840 .cpu_features = CPU_FTRS_440x6,
1841 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1842 .mmu_features = MMU_FTR_TYPE_44x,
1845 .cpu_setup = __setup_cpu_460ex,
1846 .machine_check = machine_check_440A,
1847 .platform = "ppc440",
1850 .pvr_mask = 0xffff0007,
1851 .pvr_value = 0x13020004,
1852 .cpu_name = "460EX Rev. B",
1853 .cpu_features = CPU_FTRS_440x6,
1854 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1855 .mmu_features = MMU_FTR_TYPE_44x,
1858 .cpu_setup = __setup_cpu_460ex,
1859 .machine_check = machine_check_440A,
1860 .platform = "ppc440",
1863 .pvr_mask = 0xffff0006,
1864 .pvr_value = 0x13020000,
1865 .cpu_name = "460GT",
1866 .cpu_features = CPU_FTRS_440x6,
1867 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1868 .mmu_features = MMU_FTR_TYPE_44x,
1871 .cpu_setup = __setup_cpu_460gt,
1872 .machine_check = machine_check_440A,
1873 .platform = "ppc440",
1876 .pvr_mask = 0xffff0007,
1877 .pvr_value = 0x13020005,
1878 .cpu_name = "460GT Rev. B",
1879 .cpu_features = CPU_FTRS_440x6,
1880 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1881 .mmu_features = MMU_FTR_TYPE_44x,
1884 .cpu_setup = __setup_cpu_460gt,
1885 .machine_check = machine_check_440A,
1886 .platform = "ppc440",
1889 .pvr_mask = 0xffffff00,
1890 .pvr_value = 0x13541800,
1891 .cpu_name = "460SX",
1892 .cpu_features = CPU_FTRS_44X,
1893 .cpu_user_features = COMMON_USER_BOOKE,
1894 .mmu_features = MMU_FTR_TYPE_44x,
1897 .cpu_setup = __setup_cpu_460sx,
1898 .machine_check = machine_check_440A,
1899 .platform = "ppc440",
1901 { /* 464 in APM821xx */
1902 .pvr_mask = 0xfffffff0,
1903 .pvr_value = 0x12C41C80,
1904 .cpu_name = "APM821XX",
1905 .cpu_features = CPU_FTRS_44X,
1906 .cpu_user_features = COMMON_USER_BOOKE |
1907 PPC_FEATURE_HAS_FPU,
1908 .mmu_features = MMU_FTR_TYPE_44x,
1911 .cpu_setup = __setup_cpu_apm821xx,
1912 .machine_check = machine_check_440A,
1913 .platform = "ppc440",
1915 { /* 476 DD2 core */
1916 .pvr_mask = 0xffffffff,
1917 .pvr_value = 0x11a52080,
1919 .cpu_features = CPU_FTRS_47X | CPU_FTR_476_DD2,
1920 .cpu_user_features = COMMON_USER_BOOKE |
1921 PPC_FEATURE_HAS_FPU,
1922 .mmu_features = MMU_FTR_TYPE_47x |
1923 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1925 .dcache_bsize = 128,
1926 .machine_check = machine_check_47x,
1927 .platform = "ppc470",
1930 .pvr_mask = 0xffff0000,
1931 .pvr_value = 0x7ff50000,
1932 .cpu_name = "476fpe",
1933 .cpu_features = CPU_FTRS_47X | CPU_FTR_476_DD2,
1934 .cpu_user_features = COMMON_USER_BOOKE |
1935 PPC_FEATURE_HAS_FPU,
1936 .mmu_features = MMU_FTR_TYPE_47x |
1937 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1939 .dcache_bsize = 128,
1940 .machine_check = machine_check_47x,
1941 .platform = "ppc470",
1944 .pvr_mask = 0xffff0000,
1945 .pvr_value = 0x00050000,
1947 .cpu_features = CPU_FTRS_47X,
1948 .cpu_user_features = COMMON_USER_BOOKE |
1949 PPC_FEATURE_HAS_FPU,
1950 .mmu_features = MMU_FTR_TYPE_47x |
1951 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1953 .dcache_bsize = 128,
1954 .machine_check = machine_check_47x,
1955 .platform = "ppc470",
1958 .pvr_mask = 0xffff0000,
1959 .pvr_value = 0x11a50000,
1961 .cpu_features = CPU_FTRS_47X,
1962 .cpu_user_features = COMMON_USER_BOOKE |
1963 PPC_FEATURE_HAS_FPU,
1964 .mmu_features = MMU_FTR_TYPE_47x |
1965 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1967 .dcache_bsize = 128,
1968 .machine_check = machine_check_47x,
1969 .platform = "ppc470",
1971 { /* default match */
1972 .pvr_mask = 0x00000000,
1973 .pvr_value = 0x00000000,
1974 .cpu_name = "(generic 44x PPC)",
1975 .cpu_features = CPU_FTRS_44X,
1976 .cpu_user_features = COMMON_USER_BOOKE,
1977 .mmu_features = MMU_FTR_TYPE_44x,
1980 .machine_check = machine_check_4xx,
1981 .platform = "ppc440",
1983 #endif /* CONFIG_44x */
1986 .pvr_mask = 0xfff00000,
1987 .pvr_value = 0x81000000,
1988 .cpu_name = "e200z5",
1989 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1990 .cpu_features = CPU_FTRS_E200,
1991 .cpu_user_features = COMMON_USER_BOOKE |
1992 PPC_FEATURE_HAS_EFP_SINGLE |
1993 PPC_FEATURE_UNIFIED_CACHE,
1994 .mmu_features = MMU_FTR_TYPE_FSL_E,
1996 .machine_check = machine_check_e200,
1997 .platform = "ppc5554",
2000 .pvr_mask = 0xfff00000,
2001 .pvr_value = 0x81100000,
2002 .cpu_name = "e200z6",
2003 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
2004 .cpu_features = CPU_FTRS_E200,
2005 .cpu_user_features = COMMON_USER_BOOKE |
2006 PPC_FEATURE_HAS_SPE_COMP |
2007 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
2008 PPC_FEATURE_UNIFIED_CACHE,
2009 .mmu_features = MMU_FTR_TYPE_FSL_E,
2011 .machine_check = machine_check_e200,
2012 .platform = "ppc5554",
2014 { /* default match */
2015 .pvr_mask = 0x00000000,
2016 .pvr_value = 0x00000000,
2017 .cpu_name = "(generic E200 PPC)",
2018 .cpu_features = CPU_FTRS_E200,
2019 .cpu_user_features = COMMON_USER_BOOKE |
2020 PPC_FEATURE_HAS_EFP_SINGLE |
2021 PPC_FEATURE_UNIFIED_CACHE,
2022 .mmu_features = MMU_FTR_TYPE_FSL_E,
2024 .cpu_setup = __setup_cpu_e200,
2025 .machine_check = machine_check_e200,
2026 .platform = "ppc5554",
2028 #endif /* CONFIG_E200 */
2029 #endif /* CONFIG_PPC32 */
2032 #ifndef CONFIG_PPC_E500MC
2034 .pvr_mask = 0xffff0000,
2035 .pvr_value = 0x80200000,
2037 .cpu_features = CPU_FTRS_E500,
2038 .cpu_user_features = COMMON_USER_BOOKE |
2039 PPC_FEATURE_HAS_SPE_COMP |
2040 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
2041 .cpu_user_features2 = PPC_FEATURE2_ISEL,
2042 .mmu_features = MMU_FTR_TYPE_FSL_E,
2046 .oprofile_cpu_type = "ppc/e500",
2047 .oprofile_type = PPC_OPROFILE_FSL_EMB,
2048 .cpu_setup = __setup_cpu_e500v1,
2049 .machine_check = machine_check_e500,
2050 .platform = "ppc8540",
2053 .pvr_mask = 0xffff0000,
2054 .pvr_value = 0x80210000,
2055 .cpu_name = "e500v2",
2056 .cpu_features = CPU_FTRS_E500_2,
2057 .cpu_user_features = COMMON_USER_BOOKE |
2058 PPC_FEATURE_HAS_SPE_COMP |
2059 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
2060 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
2061 .cpu_user_features2 = PPC_FEATURE2_ISEL,
2062 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS,
2066 .oprofile_cpu_type = "ppc/e500",
2067 .oprofile_type = PPC_OPROFILE_FSL_EMB,
2068 .cpu_setup = __setup_cpu_e500v2,
2069 .machine_check = machine_check_e500,
2070 .platform = "ppc8548",
2071 .cpu_down_flush = cpu_down_flush_e500v2,
2075 .pvr_mask = 0xffff0000,
2076 .pvr_value = 0x80230000,
2077 .cpu_name = "e500mc",
2078 .cpu_features = CPU_FTRS_E500MC,
2079 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
2080 .cpu_user_features2 = PPC_FEATURE2_ISEL,
2081 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
2086 .oprofile_cpu_type = "ppc/e500mc",
2087 .oprofile_type = PPC_OPROFILE_FSL_EMB,
2088 .cpu_setup = __setup_cpu_e500mc,
2089 .machine_check = machine_check_e500mc,
2090 .platform = "ppce500mc",
2091 .cpu_down_flush = cpu_down_flush_e500mc,
2093 #endif /* CONFIG_PPC_E500MC */
2094 #endif /* CONFIG_PPC32 */
2095 #ifdef CONFIG_PPC_E500MC
2097 .pvr_mask = 0xffff0000,
2098 .pvr_value = 0x80240000,
2099 .cpu_name = "e5500",
2100 .cpu_features = CPU_FTRS_E5500,
2101 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
2102 .cpu_user_features2 = PPC_FEATURE2_ISEL,
2103 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
2108 .oprofile_cpu_type = "ppc/e500mc",
2109 .oprofile_type = PPC_OPROFILE_FSL_EMB,
2110 .cpu_setup = __setup_cpu_e5500,
2111 #ifndef CONFIG_PPC32
2112 .cpu_restore = __restore_cpu_e5500,
2114 .machine_check = machine_check_e500mc,
2115 .platform = "ppce5500",
2116 .cpu_down_flush = cpu_down_flush_e5500,
2119 .pvr_mask = 0xffff0000,
2120 .pvr_value = 0x80400000,
2121 .cpu_name = "e6500",
2122 .cpu_features = CPU_FTRS_E6500,
2123 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU |
2124 PPC_FEATURE_HAS_ALTIVEC_COMP,
2125 .cpu_user_features2 = PPC_FEATURE2_ISEL,
2126 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
2131 .oprofile_cpu_type = "ppc/e6500",
2132 .oprofile_type = PPC_OPROFILE_FSL_EMB,
2133 .cpu_setup = __setup_cpu_e6500,
2134 #ifndef CONFIG_PPC32
2135 .cpu_restore = __restore_cpu_e6500,
2137 .machine_check = machine_check_e500mc,
2138 .platform = "ppce6500",
2139 .cpu_down_flush = cpu_down_flush_e6500,
2141 #endif /* CONFIG_PPC_E500MC */
2143 { /* default match */
2144 .pvr_mask = 0x00000000,
2145 .pvr_value = 0x00000000,
2146 .cpu_name = "(generic E500 PPC)",
2147 .cpu_features = CPU_FTRS_E500,
2148 .cpu_user_features = COMMON_USER_BOOKE |
2149 PPC_FEATURE_HAS_SPE_COMP |
2150 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
2151 .mmu_features = MMU_FTR_TYPE_FSL_E,
2154 .machine_check = machine_check_e500,
2155 .platform = "powerpc",
2157 #endif /* CONFIG_PPC32 */
2158 #endif /* CONFIG_E500 */
2161 static struct cpu_spec the_cpu_spec;
2163 static struct cpu_spec * __init setup_cpu_spec(unsigned long offset,
2166 struct cpu_spec *t = &the_cpu_spec;
2167 struct cpu_spec old;
2172 /* Copy everything, then do fixups */
2176 * If we are overriding a previous value derived from the real
2177 * PVR with a new value obtained using a logical PVR value,
2178 * don't modify the performance monitor fields.
2180 if (old.num_pmcs && !s->num_pmcs) {
2181 t->num_pmcs = old.num_pmcs;
2182 t->pmc_type = old.pmc_type;
2183 t->oprofile_type = old.oprofile_type;
2184 t->oprofile_mmcra_sihv = old.oprofile_mmcra_sihv;
2185 t->oprofile_mmcra_sipr = old.oprofile_mmcra_sipr;
2186 t->oprofile_mmcra_clear = old.oprofile_mmcra_clear;
2189 * If we have passed through this logic once before and
2190 * have pulled the default case because the real PVR was
2191 * not found inside cpu_specs[], then we are possibly
2192 * running in compatibility mode. In that case, let the
2193 * oprofiler know which set of compatibility counters to
2194 * pull from by making sure the oprofile_cpu_type string
2195 * is set to that of compatibility mode. If the
2196 * oprofile_cpu_type already has a value, then we are
2197 * possibly overriding a real PVR with a logical one,
2198 * and, in that case, keep the current value for
2199 * oprofile_cpu_type.
2201 if (old.oprofile_cpu_type != NULL) {
2202 t->oprofile_cpu_type = old.oprofile_cpu_type;
2203 t->oprofile_type = old.oprofile_type;
2207 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
2210 * Set the base platform string once; assumes
2211 * we're called with real pvr first.
2213 if (*PTRRELOC(&powerpc_base_platform) == NULL)
2214 *PTRRELOC(&powerpc_base_platform) = t->platform;
2216 #if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
2217 /* ppc64 and booke expect identify_cpu to also call setup_cpu for
2218 * that processor. I will consolidate that at a later time, for now,
2219 * just use #ifdef. We also don't need to PTRRELOC the function
2220 * pointer on ppc64 and booke as we are running at 0 in real mode
2221 * on ppc64 and reloc_offset is always 0 on booke.
2224 t->cpu_setup(offset, t);
2226 #endif /* CONFIG_PPC64 || CONFIG_BOOKE */
2231 struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
2233 struct cpu_spec *s = cpu_specs;
2238 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) {
2239 if ((pvr & s->pvr_mask) == s->pvr_value)
2240 return setup_cpu_spec(offset, s);
2248 #ifdef CONFIG_JUMP_LABEL_FEATURE_CHECKS
2249 struct static_key_true cpu_feature_keys[NUM_CPU_FTR_KEYS] = {
2250 [0 ... NUM_CPU_FTR_KEYS - 1] = STATIC_KEY_TRUE_INIT
2252 EXPORT_SYMBOL_GPL(cpu_feature_keys);
2254 void __init cpu_feature_keys_init(void)
2258 for (i = 0; i < NUM_CPU_FTR_KEYS; i++) {
2259 unsigned long f = 1ul << i;
2261 if (!(cur_cpu_spec->cpu_features & f))
2262 static_branch_disable(&cpu_feature_keys[i]);
2266 struct static_key_true mmu_feature_keys[NUM_MMU_FTR_KEYS] = {
2267 [0 ... NUM_MMU_FTR_KEYS - 1] = STATIC_KEY_TRUE_INIT
2269 EXPORT_SYMBOL_GPL(mmu_feature_keys);
2271 void __init mmu_feature_keys_init(void)
2275 for (i = 0; i < NUM_MMU_FTR_KEYS; i++) {
2276 unsigned long f = 1ul << i;
2278 if (!(cur_cpu_spec->mmu_features & f))
2279 static_branch_disable(&mmu_feature_keys[i]);