blob: e745abc5457a0bb5f0560a695f00a7925ff29386 [file] [log] [blame]
Thomas Gleixner2874c5f2019-05-27 08:55:01 +02001// SPDX-License-Identifier: GPL-2.0-or-later
Linus Torvalds1da177e2005-04-16 15:20:36 -07002/*
Linus Torvalds1da177e2005-04-16 15:20:36 -07003 * Copyright (C) 2001 Ben. Herrenschmidt (benh@kernel.crashing.org)
4 *
Stephen Rothwell49209602005-10-12 15:55:09 +10005 * Modifications for ppc64:
6 * Copyright (C) 2003 Dave Engebretsen <engebret@us.ibm.com>
Linus Torvalds1da177e2005-04-16 15:20:36 -07007 */
8
Linus Torvalds1da177e2005-04-16 15:20:36 -07009#include <linux/string.h>
10#include <linux/sched.h>
11#include <linux/threads.h>
12#include <linux/init.h>
Paul Gortmaker4b16f8e2011-07-22 18:24:23 -040013#include <linux/export.h>
Kevin Hao4db73272016-07-23 14:42:41 +053014#include <linux/jump_label.h>
Kumar Gala400d2212005-09-27 15:13:12 -050015
16#include <asm/oprofile_impl.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070017#include <asm/cputable.h>
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +100018#include <asm/prom.h> /* for PTRRELOC on ARCH=ppc */
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +000019#include <asm/mmu.h>
David Howellsae3a1972012-03-28 18:30:02 +010020#include <asm/setup.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070021
Nicholas Piggin5a61ef72017-05-09 13:16:52 +100022static struct cpu_spec the_cpu_spec __read_mostly;
23
24struct cpu_spec* cur_cpu_spec __read_mostly = NULL;
Stephen Rothwell49209602005-10-12 15:55:09 +100025EXPORT_SYMBOL(cur_cpu_spec);
Linus Torvalds1da177e2005-04-16 15:20:36 -070026
Nathan Lynch9115d132008-07-16 09:58:51 +100027/* The platform string corresponding to the real PVR */
28const char *powerpc_base_platform;
29
Stephen Rothwell49209602005-10-12 15:55:09 +100030/* NOTE:
31 * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's
32 * the responsibility of the appropriate CPU save/restore functions to
33 * eventually copy these settings over. Those save/restore aren't yet
34 * part of the cputable though. That has to be fixed for both ppc32
35 * and ppc64
36 */
Geoff Levandb26f1002006-05-19 14:24:18 +100037#ifdef CONFIG_PPC32
Kumar Gala105c31d2009-01-08 08:31:20 -060038extern void __setup_cpu_e200(unsigned long offset, struct cpu_spec* spec);
39extern void __setup_cpu_e500v1(unsigned long offset, struct cpu_spec* spec);
40extern void __setup_cpu_e500v2(unsigned long offset, struct cpu_spec* spec);
41extern void __setup_cpu_e500mc(unsigned long offset, struct cpu_spec* spec);
Valentine Barshak81127532007-09-22 00:46:57 +100042extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
43extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110044extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
Valentine Barshak340ffd22007-09-22 00:50:09 +100045extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110046extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
Grant Likely640d17d2008-12-04 05:39:55 +000047extern void __setup_cpu_440x5(unsigned long offset, struct cpu_spec* spec);
Stefan Roese464076a2008-02-24 08:07:41 +110048extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec);
Josh Boyer939e6222008-06-11 07:52:40 -040049extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec);
Madhulika Madishetty6c712092009-02-05 13:31:36 +000050extern void __setup_cpu_460sx(unsigned long offset, struct cpu_spec *spec);
Tirumala Marri6edc3232010-09-13 13:26:11 +000051extern void __setup_cpu_apm821xx(unsigned long offset, struct cpu_spec *spec);
Kumar Gala400d2212005-09-27 15:13:12 -050052extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
53extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
54extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
55extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
56extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
57extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
58extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
59extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell49209602005-10-12 15:55:09 +100060#endif /* CONFIG_PPC32 */
Olof Johanssonf39b7a52006-08-11 00:07:08 -050061#ifdef CONFIG_PPC64
Kumar Gala400d2212005-09-27 15:13:12 -050062extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
Olof Johansson5b43d202006-10-04 23:41:41 -050063extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
Olof Johansson11999192007-02-04 16:36:51 -060064extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell40d244d2007-02-12 22:10:48 +110065extern void __restore_cpu_pa6t(void);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050066extern void __restore_cpu_ppc970(void);
Michael Neulinge952e6c2008-06-18 10:47:26 +100067extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec);
68extern void __restore_cpu_power7(void);
Michael Neulingaec937b2012-10-30 19:34:14 +000069extern void __setup_cpu_power8(unsigned long offset, struct cpu_spec* spec);
70extern void __restore_cpu_power8(void);
Michael Neulingc3ab3002016-02-19 11:16:24 +110071extern void __setup_cpu_power9(unsigned long offset, struct cpu_spec* spec);
72extern void __restore_cpu_power9(void);
Mahesh Salgaonkare22a2272013-10-30 20:05:11 +053073extern long __machine_check_early_realmode_p7(struct pt_regs *regs);
Mahesh Salgaonkarae744f32013-10-30 20:05:26 +053074extern long __machine_check_early_realmode_p8(struct pt_regs *regs);
Nicholas Piggin7b9f71f92017-02-28 12:00:48 +100075extern long __machine_check_early_realmode_p9(struct pt_regs *regs);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050076#endif /* CONFIG_PPC64 */
Kumar Gala4490c062010-10-08 08:32:11 -050077#if defined(CONFIG_E500)
78extern void __setup_cpu_e5500(unsigned long offset, struct cpu_spec* spec);
Kumar Galacd66cc22012-09-07 15:57:17 -050079extern void __setup_cpu_e6500(unsigned long offset, struct cpu_spec* spec);
Kumar Gala4490c062010-10-08 08:32:11 -050080extern void __restore_cpu_e5500(void);
Kumar Galacd66cc22012-09-07 15:57:17 -050081extern void __restore_cpu_e6500(void);
Kumar Gala4490c062010-10-08 08:32:11 -050082#endif /* CONFIG_E500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070083
Linus Torvalds1da177e2005-04-16 15:20:36 -070084/* This table only contains "desktop" CPUs, it need to be filled with embedded
85 * ones as well...
86 */
Stephen Rothwell49209602005-10-12 15:55:09 +100087#define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
88 PPC_FEATURE_HAS_MMU)
89#define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +110090#define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
Benjamin Herrenschmidtaa5cb0212006-03-01 15:07:07 +110091#define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
92 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
93#define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
94 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
Anton Blanchard03054d52006-04-29 09:51:06 +100095#define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
Paul Mackerrasfab5db92006-06-07 16:14:40 +100096 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
Nathan Lynch0f473312008-07-10 01:06:57 +100097 PPC_FEATURE_TRUE_LE | \
98 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Michael Neulinge952e6c2008-06-18 10:47:26 +100099#define COMMON_USER_POWER7 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
100 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
Nathan Lynch0f473312008-07-10 01:06:57 +1000101 PPC_FEATURE_TRUE_LE | \
102 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Nishanth Aravamudan4a1ae4f2013-05-03 14:48:38 +0000103#define COMMON_USER2_POWER7 (PPC_FEATURE2_DSCR)
Michael Neuling71e18492012-10-30 19:34:15 +0000104#define COMMON_USER_POWER8 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
105 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
106 PPC_FEATURE_TRUE_LE | \
107 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Nishanth Aravamudan748645b2013-05-03 14:49:59 +0000108#define COMMON_USER2_POWER8 (PPC_FEATURE2_ARCH_2_07 | \
Sam bobroffb4b56f92015-06-12 11:06:32 +1000109 PPC_FEATURE2_HTM_COMP | \
110 PPC_FEATURE2_HTM_NOSC_COMP | \
111 PPC_FEATURE2_DSCR | \
Benjamin Herrenschmidtdd58a092014-06-10 15:04:40 +1000112 PPC_FEATURE2_ISEL | PPC_FEATURE2_TAR | \
113 PPC_FEATURE2_VEC_CRYPTO)
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500114#define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
115 PPC_FEATURE_TRUE_LE | \
116 PPC_FEATURE_HAS_ALTIVEC_COMP)
Michael Neulingc3ab3002016-02-19 11:16:24 +1100117#define COMMON_USER_POWER9 COMMON_USER_POWER8
118#define COMMON_USER2_POWER9 (COMMON_USER2_POWER8 | \
119 PPC_FEATURE2_ARCH_3_00 | \
Nicholas Piggina4700a22017-05-20 14:29:49 +1000120 PPC_FEATURE2_HAS_IEEE128 | \
121 PPC_FEATURE2_DARN )
Michael Neulingc3ab3002016-02-19 11:16:24 +1100122
Kumar Galaf45c4482009-08-18 19:08:30 +0000123#ifdef CONFIG_PPC_BOOK3E_64
124#define COMMON_USER_BOOKE (COMMON_USER_PPC64 | PPC_FEATURE_BOOKE)
125#else
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100126#define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
127 PPC_FEATURE_BOOKE)
Kumar Galaf45c4482009-08-18 19:08:30 +0000128#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -0700129
Paul Mackerras87a72f92007-10-04 14:18:01 +1000130static struct cpu_spec __initdata cpu_specs[] = {
Benjamin Herrenschmidt2d27cfd2009-07-23 23:15:59 +0000131#ifdef CONFIG_PPC_BOOK3S_64
Stephen Rothwell49209602005-10-12 15:55:09 +1000132 { /* PPC970 */
133 .pvr_mask = 0xffff0000,
134 .pvr_value = 0x00390000,
135 .cpu_name = "PPC970",
136 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100137 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000138 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000139 .mmu_features = MMU_FTRS_PPC970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000140 .icache_bsize = 128,
141 .dcache_bsize = 128,
142 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600143 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000144 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500145 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000146 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000147 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100148 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000149 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000150 { /* PPC970FX */
151 .pvr_mask = 0xffff0000,
152 .pvr_value = 0x003c0000,
153 .cpu_name = "PPC970FX",
Stephen Rothwell49209602005-10-12 15:55:09 +1000154 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100155 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000156 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000157 .mmu_features = MMU_FTRS_PPC970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000158 .icache_bsize = 128,
159 .dcache_bsize = 128,
160 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600161 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000162 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500163 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000164 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000165 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100166 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000167 },
Olof Johansson3546e812007-02-26 00:35:14 -0600168 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
169 .pvr_mask = 0xffffffff,
170 .pvr_value = 0x00440100,
171 .cpu_name = "PPC970MP",
172 .cpu_features = CPU_FTRS_PPC970,
173 .cpu_user_features = COMMON_USER_POWER4 |
174 PPC_FEATURE_HAS_ALTIVEC_COMP,
Benjamin Herrenschmidtd63ac5f2013-03-13 09:55:02 +1100175 .mmu_features = MMU_FTRS_PPC970,
Olof Johansson3546e812007-02-26 00:35:14 -0600176 .icache_bsize = 128,
177 .dcache_bsize = 128,
178 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000179 .pmc_type = PPC_PMC_IBM,
Olof Johansson3546e812007-02-26 00:35:14 -0600180 .cpu_setup = __setup_cpu_ppc970,
181 .cpu_restore = __restore_cpu_ppc970,
182 .oprofile_cpu_type = "ppc64/970MP",
183 .oprofile_type = PPC_OPROFILE_POWER4,
184 .platform = "ppc970",
185 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000186 { /* PPC970MP */
187 .pvr_mask = 0xffff0000,
188 .pvr_value = 0x00440000,
189 .cpu_name = "PPC970MP",
190 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100191 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000192 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000193 .mmu_features = MMU_FTRS_PPC970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000194 .icache_bsize = 128,
195 .dcache_bsize = 128,
Anton Blanchard87af41b2006-05-05 05:44:26 +1000196 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000197 .pmc_type = PPC_PMC_IBM,
Olof Johansson5b43d202006-10-04 23:41:41 -0500198 .cpu_setup = __setup_cpu_ppc970MP,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500199 .cpu_restore = __restore_cpu_ppc970,
Mike Wolffecb3522006-11-21 14:41:54 -0600200 .oprofile_cpu_type = "ppc64/970MP",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000201 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100202 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000203 },
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500204 { /* PPC970GX */
205 .pvr_mask = 0xffff0000,
206 .pvr_value = 0x00450000,
207 .cpu_name = "PPC970GX",
208 .cpu_features = CPU_FTRS_PPC970,
209 .cpu_user_features = COMMON_USER_POWER4 |
210 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000211 .mmu_features = MMU_FTRS_PPC970,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500212 .icache_bsize = 128,
213 .dcache_bsize = 128,
214 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600215 .pmc_type = PPC_PMC_IBM,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500216 .cpu_setup = __setup_cpu_ppc970,
217 .oprofile_cpu_type = "ppc64/970",
218 .oprofile_type = PPC_OPROFILE_POWER4,
219 .platform = "ppc970",
220 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100221 { /* Power5 GR */
Stephen Rothwell49209602005-10-12 15:55:09 +1000222 .pvr_mask = 0xffff0000,
223 .pvr_value = 0x003a0000,
224 .cpu_name = "POWER5 (gr)",
225 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100226 .cpu_user_features = COMMON_USER_POWER5,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000227 .mmu_features = MMU_FTRS_POWER5,
Stephen Rothwell49209602005-10-12 15:55:09 +1000228 .icache_bsize = 128,
229 .dcache_bsize = 128,
230 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600231 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000232 .oprofile_cpu_type = "ppc64/power5",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000233 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000234 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
235 * and above but only works on POWER5 and above
236 */
237 .oprofile_mmcra_sihv = MMCRA_SIHV,
238 .oprofile_mmcra_sipr = MMCRA_SIPR,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100239 .platform = "power5",
Stephen Rothwell49209602005-10-12 15:55:09 +1000240 },
Mike Wolf31a12ce2007-07-10 13:13:47 -0500241 { /* Power5++ */
242 .pvr_mask = 0xffffff00,
243 .pvr_value = 0x003b0300,
244 .cpu_name = "POWER5+ (gs)",
245 .cpu_features = CPU_FTRS_POWER5,
246 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000247 .mmu_features = MMU_FTRS_POWER5,
Mike Wolf31a12ce2007-07-10 13:13:47 -0500248 .icache_bsize = 128,
249 .dcache_bsize = 128,
250 .num_pmcs = 6,
251 .oprofile_cpu_type = "ppc64/power5++",
252 .oprofile_type = PPC_OPROFILE_POWER4,
253 .oprofile_mmcra_sihv = MMCRA_SIHV,
254 .oprofile_mmcra_sipr = MMCRA_SIPR,
255 .platform = "power5+",
256 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100257 { /* Power5 GS */
Stephen Rothwell49209602005-10-12 15:55:09 +1000258 .pvr_mask = 0xffff0000,
259 .pvr_value = 0x003b0000,
Anton Blanchard834608f2006-01-09 15:42:30 +1100260 .cpu_name = "POWER5+ (gs)",
Stephen Rothwell49209602005-10-12 15:55:09 +1000261 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100262 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000263 .mmu_features = MMU_FTRS_POWER5,
Stephen Rothwell49209602005-10-12 15:55:09 +1000264 .icache_bsize = 128,
265 .dcache_bsize = 128,
266 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600267 .pmc_type = PPC_PMC_IBM,
Anton Blanchard834608f2006-01-09 15:42:30 +1100268 .oprofile_cpu_type = "ppc64/power5+",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000269 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000270 .oprofile_mmcra_sihv = MMCRA_SIHV,
271 .oprofile_mmcra_sipr = MMCRA_SIPR,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100272 .platform = "power5+",
Stephen Rothwell49209602005-10-12 15:55:09 +1000273 },
Paul Mackerras974a76f2006-11-10 20:38:53 +1100274 { /* POWER6 in P5+ mode; 2.04-compliant processor */
275 .pvr_mask = 0xffffffff,
276 .pvr_value = 0x0f000001,
277 .cpu_name = "POWER5+",
278 .cpu_features = CPU_FTRS_POWER5,
279 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000280 .mmu_features = MMU_FTRS_POWER5,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100281 .icache_bsize = 128,
282 .dcache_bsize = 128,
Michael Wolf79af6c42009-04-27 06:17:54 +0000283 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
284 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100285 .platform = "power5+",
286 },
Anton Blanchard03054d52006-04-29 09:51:06 +1000287 { /* Power6 */
288 .pvr_mask = 0xffff0000,
289 .pvr_value = 0x003e0000,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100290 .cpu_name = "POWER6 (raw)",
291 .cpu_features = CPU_FTRS_POWER6,
292 .cpu_user_features = COMMON_USER_POWER6 |
293 PPC_FEATURE_POWER6_EXT,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000294 .mmu_features = MMU_FTRS_POWER6,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100295 .icache_bsize = 128,
296 .dcache_bsize = 128,
297 .num_pmcs = 6,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000298 .pmc_type = PPC_PMC_IBM,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100299 .oprofile_cpu_type = "ppc64/power6",
300 .oprofile_type = PPC_OPROFILE_POWER4,
301 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
302 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
303 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
304 POWER6_MMCRA_OTHER,
305 .platform = "power6x",
306 },
307 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
308 .pvr_mask = 0xffffffff,
309 .pvr_value = 0x0f000002,
310 .cpu_name = "POWER6 (architected)",
Anton Blanchard03054d52006-04-29 09:51:06 +1000311 .cpu_features = CPU_FTRS_POWER6,
312 .cpu_user_features = COMMON_USER_POWER6,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000313 .mmu_features = MMU_FTRS_POWER6,
Anton Blanchard03054d52006-04-29 09:51:06 +1000314 .icache_bsize = 128,
315 .dcache_bsize = 128,
Michael Wolf79af6c42009-04-27 06:17:54 +0000316 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
317 .oprofile_type = PPC_OPROFILE_POWER4,
Anton Blanchard03054d52006-04-29 09:51:06 +1000318 .platform = "power6",
319 },
Joel Schopp635f5a62008-06-19 06:18:21 +1000320 { /* 2.06-compliant processor, i.e. Power7 "architected" mode */
321 .pvr_mask = 0xffffffff,
322 .pvr_value = 0x0f000003,
323 .cpu_name = "POWER7 (architected)",
324 .cpu_features = CPU_FTRS_POWER7,
325 .cpu_user_features = COMMON_USER_POWER7,
Nishanth Aravamudan4a1ae4f2013-05-03 14:48:38 +0000326 .cpu_user_features2 = COMMON_USER2_POWER7,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000327 .mmu_features = MMU_FTRS_POWER7,
Joel Schopp635f5a62008-06-19 06:18:21 +1000328 .icache_bsize = 128,
329 .dcache_bsize = 128,
Michael Wolf79af6c42009-04-27 06:17:54 +0000330 .oprofile_type = PPC_OPROFILE_POWER4,
331 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
Benjamin Herrenschmidt24cc67d2011-01-20 18:50:55 +1100332 .cpu_setup = __setup_cpu_power7,
333 .cpu_restore = __restore_cpu_power7,
Mahesh Salgaonkare22a2272013-10-30 20:05:11 +0530334 .machine_check_early = __machine_check_early_realmode_p7,
Joel Schopp635f5a62008-06-19 06:18:21 +1000335 .platform = "power7",
336 },
Michael Neulingc674e702012-11-08 20:26:42 +0000337 { /* 2.07-compliant processor, i.e. Power8 "architected" mode */
338 .pvr_mask = 0xffffffff,
339 .pvr_value = 0x0f000004,
340 .cpu_name = "POWER8 (architected)",
341 .cpu_features = CPU_FTRS_POWER8,
342 .cpu_user_features = COMMON_USER_POWER8,
Nishanth Aravamudan748645b2013-05-03 14:49:59 +0000343 .cpu_user_features2 = COMMON_USER2_POWER8,
Michael Neulingc674e702012-11-08 20:26:42 +0000344 .mmu_features = MMU_FTRS_POWER8,
345 .icache_bsize = 128,
346 .dcache_bsize = 128,
Michael Neuling6a60f9e2013-06-04 19:38:54 +0000347 .oprofile_type = PPC_OPROFILE_INVALID,
348 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
Michael Neulingc674e702012-11-08 20:26:42 +0000349 .cpu_setup = __setup_cpu_power8,
350 .cpu_restore = __restore_cpu_power8,
Mahesh Salgaonkarae744f32013-10-30 20:05:26 +0530351 .machine_check_early = __machine_check_early_realmode_p8,
Michael Neulingc674e702012-11-08 20:26:42 +0000352 .platform = "power8",
353 },
Russell Currey6ae3f8a2017-02-17 13:01:35 +1100354 { /* 3.00-compliant processor, i.e. Power9 "architected" mode */
355 .pvr_mask = 0xffffffff,
356 .pvr_value = 0x0f000005,
357 .cpu_name = "POWER9 (architected)",
358 .cpu_features = CPU_FTRS_POWER9,
359 .cpu_user_features = COMMON_USER_POWER9,
360 .cpu_user_features2 = COMMON_USER2_POWER9,
361 .mmu_features = MMU_FTRS_POWER9,
362 .icache_bsize = 128,
363 .dcache_bsize = 128,
364 .oprofile_type = PPC_OPROFILE_INVALID,
365 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
366 .cpu_setup = __setup_cpu_power9,
367 .cpu_restore = __restore_cpu_power9,
Russell Currey6ae3f8a2017-02-17 13:01:35 +1100368 .platform = "power9",
369 },
Michael Neulinge952e6c2008-06-18 10:47:26 +1000370 { /* Power7 */
371 .pvr_mask = 0xffff0000,
372 .pvr_value = 0x003f0000,
Joel Schopp635f5a62008-06-19 06:18:21 +1000373 .cpu_name = "POWER7 (raw)",
Michael Neulinge952e6c2008-06-18 10:47:26 +1000374 .cpu_features = CPU_FTRS_POWER7,
375 .cpu_user_features = COMMON_USER_POWER7,
Nishanth Aravamudan4a1ae4f2013-05-03 14:48:38 +0000376 .cpu_user_features2 = COMMON_USER2_POWER7,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000377 .mmu_features = MMU_FTRS_POWER7,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000378 .icache_bsize = 128,
379 .dcache_bsize = 128,
380 .num_pmcs = 6,
381 .pmc_type = PPC_PMC_IBM,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000382 .oprofile_cpu_type = "ppc64/power7",
383 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt24cc67d2011-01-20 18:50:55 +1100384 .cpu_setup = __setup_cpu_power7,
385 .cpu_restore = __restore_cpu_power7,
Mahesh Salgaonkare22a2272013-10-30 20:05:11 +0530386 .machine_check_early = __machine_check_early_realmode_p7,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000387 .platform = "power7",
388 },
Michael Neuling6f08cb32010-11-17 18:52:44 +0000389 { /* Power7+ */
390 .pvr_mask = 0xffff0000,
391 .pvr_value = 0x004A0000,
392 .cpu_name = "POWER7+ (raw)",
393 .cpu_features = CPU_FTRS_POWER7,
394 .cpu_user_features = COMMON_USER_POWER7,
Will Schmidtbadec112013-05-20 05:04:18 +0000395 .cpu_user_features2 = COMMON_USER2_POWER7,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000396 .mmu_features = MMU_FTRS_POWER7,
Michael Neuling6f08cb32010-11-17 18:52:44 +0000397 .icache_bsize = 128,
398 .dcache_bsize = 128,
399 .num_pmcs = 6,
400 .pmc_type = PPC_PMC_IBM,
401 .oprofile_cpu_type = "ppc64/power7",
402 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt24cc67d2011-01-20 18:50:55 +1100403 .cpu_setup = __setup_cpu_power7,
404 .cpu_restore = __restore_cpu_power7,
Mahesh Salgaonkare22a2272013-10-30 20:05:11 +0530405 .machine_check_early = __machine_check_early_realmode_p7,
Michael Neuling6f08cb32010-11-17 18:52:44 +0000406 .platform = "power7+",
407 },
Michael Neuling33959f82013-07-18 11:31:51 +1000408 { /* Power8E */
Michael Neuling71e18492012-10-30 19:34:15 +0000409 .pvr_mask = 0xffff0000,
410 .pvr_value = 0x004b0000,
Michael Neuling33959f82013-07-18 11:31:51 +1000411 .cpu_name = "POWER8E (raw)",
Michael Ellerman68f2f0d2014-03-14 16:00:28 +1100412 .cpu_features = CPU_FTRS_POWER8E,
Michael Neuling33959f82013-07-18 11:31:51 +1000413 .cpu_user_features = COMMON_USER_POWER8,
414 .cpu_user_features2 = COMMON_USER2_POWER8,
415 .mmu_features = MMU_FTRS_POWER8,
416 .icache_bsize = 128,
417 .dcache_bsize = 128,
418 .num_pmcs = 6,
419 .pmc_type = PPC_PMC_IBM,
420 .oprofile_cpu_type = "ppc64/power8",
421 .oprofile_type = PPC_OPROFILE_INVALID,
422 .cpu_setup = __setup_cpu_power8,
423 .cpu_restore = __restore_cpu_power8,
Mahesh Salgaonkarae744f32013-10-30 20:05:26 +0530424 .machine_check_early = __machine_check_early_realmode_p8,
Michael Neuling33959f82013-07-18 11:31:51 +1000425 .platform = "power8",
426 },
Benjamin Herrenschmidtddee09c2015-03-19 14:12:06 +1100427 { /* Power8NVL */
428 .pvr_mask = 0xffff0000,
429 .pvr_value = 0x004c0000,
430 .cpu_name = "POWER8NVL (raw)",
431 .cpu_features = CPU_FTRS_POWER8,
432 .cpu_user_features = COMMON_USER_POWER8,
433 .cpu_user_features2 = COMMON_USER2_POWER8,
434 .mmu_features = MMU_FTRS_POWER8,
435 .icache_bsize = 128,
436 .dcache_bsize = 128,
437 .num_pmcs = 6,
438 .pmc_type = PPC_PMC_IBM,
439 .oprofile_cpu_type = "ppc64/power8",
440 .oprofile_type = PPC_OPROFILE_INVALID,
441 .cpu_setup = __setup_cpu_power8,
442 .cpu_restore = __restore_cpu_power8,
Benjamin Herrenschmidtddee09c2015-03-19 14:12:06 +1100443 .machine_check_early = __machine_check_early_realmode_p8,
444 .platform = "power8",
445 },
Michael Neuling33959f82013-07-18 11:31:51 +1000446 { /* Power8 */
447 .pvr_mask = 0xffff0000,
448 .pvr_value = 0x004d0000,
Michael Neuling71e18492012-10-30 19:34:15 +0000449 .cpu_name = "POWER8 (raw)",
450 .cpu_features = CPU_FTRS_POWER8,
451 .cpu_user_features = COMMON_USER_POWER8,
Nishanth Aravamudan748645b2013-05-03 14:49:59 +0000452 .cpu_user_features2 = COMMON_USER2_POWER8,
Michael Neuling71e18492012-10-30 19:34:15 +0000453 .mmu_features = MMU_FTRS_POWER8,
454 .icache_bsize = 128,
455 .dcache_bsize = 128,
456 .num_pmcs = 6,
457 .pmc_type = PPC_PMC_IBM,
Michael Neuling6a60f9e2013-06-04 19:38:54 +0000458 .oprofile_cpu_type = "ppc64/power8",
459 .oprofile_type = PPC_OPROFILE_INVALID,
Michael Neuling71e18492012-10-30 19:34:15 +0000460 .cpu_setup = __setup_cpu_power8,
461 .cpu_restore = __restore_cpu_power8,
Mahesh Salgaonkarae744f32013-10-30 20:05:26 +0530462 .machine_check_early = __machine_check_early_realmode_p8,
Michael Neuling71e18492012-10-30 19:34:15 +0000463 .platform = "power8",
464 },
Nicholas Pigginb6b37552017-11-03 15:13:19 +1100465 { /* Power9 DD2.0 */
466 .pvr_mask = 0xffffefff,
467 .pvr_value = 0x004e0200,
468 .cpu_name = "POWER9 (raw)",
Michael Ellerman3ffa9d92017-11-15 14:25:42 +1100469 .cpu_features = CPU_FTRS_POWER9_DD2_0,
Nicholas Pigginb6b37552017-11-03 15:13:19 +1100470 .cpu_user_features = COMMON_USER_POWER9,
471 .cpu_user_features2 = COMMON_USER2_POWER9,
472 .mmu_features = MMU_FTRS_POWER9,
473 .icache_bsize = 128,
474 .dcache_bsize = 128,
475 .num_pmcs = 6,
476 .pmc_type = PPC_PMC_IBM,
477 .oprofile_cpu_type = "ppc64/power9",
478 .oprofile_type = PPC_OPROFILE_INVALID,
479 .cpu_setup = __setup_cpu_power9,
480 .cpu_restore = __restore_cpu_power9,
Nicholas Pigginb6b37552017-11-03 15:13:19 +1100481 .machine_check_early = __machine_check_early_realmode_p9,
482 .platform = "power9",
483 },
Paul Mackerrasb5af4f22018-03-21 21:31:59 +1100484 { /* Power9 DD 2.1 */
485 .pvr_mask = 0xffffefff,
486 .pvr_value = 0x004e0201,
487 .cpu_name = "POWER9 (raw)",
488 .cpu_features = CPU_FTRS_POWER9_DD2_1,
489 .cpu_user_features = COMMON_USER_POWER9,
490 .cpu_user_features2 = COMMON_USER2_POWER9,
491 .mmu_features = MMU_FTRS_POWER9,
492 .icache_bsize = 128,
493 .dcache_bsize = 128,
494 .num_pmcs = 6,
495 .pmc_type = PPC_PMC_IBM,
496 .oprofile_cpu_type = "ppc64/power9",
497 .oprofile_type = PPC_OPROFILE_INVALID,
498 .cpu_setup = __setup_cpu_power9,
499 .cpu_restore = __restore_cpu_power9,
Paul Mackerrasb5af4f22018-03-21 21:31:59 +1100500 .machine_check_early = __machine_check_early_realmode_p9,
501 .platform = "power9",
502 },
503 { /* Power9 DD2.2 or later */
Michael Neulingc3ab3002016-02-19 11:16:24 +1100504 .pvr_mask = 0xffff0000,
505 .pvr_value = 0x004e0000,
506 .cpu_name = "POWER9 (raw)",
Paul Mackerrasb5af4f22018-03-21 21:31:59 +1100507 .cpu_features = CPU_FTRS_POWER9_DD2_2,
Michael Neulingc3ab3002016-02-19 11:16:24 +1100508 .cpu_user_features = COMMON_USER_POWER9,
509 .cpu_user_features2 = COMMON_USER2_POWER9,
510 .mmu_features = MMU_FTRS_POWER9,
511 .icache_bsize = 128,
512 .dcache_bsize = 128,
513 .num_pmcs = 6,
514 .pmc_type = PPC_PMC_IBM,
515 .oprofile_cpu_type = "ppc64/power9",
516 .oprofile_type = PPC_OPROFILE_INVALID,
517 .cpu_setup = __setup_cpu_power9,
518 .cpu_restore = __restore_cpu_power9,
Nicholas Piggin7b9f71f92017-02-28 12:00:48 +1000519 .machine_check_early = __machine_check_early_realmode_p9,
Michael Neulingc3ab3002016-02-19 11:16:24 +1100520 .platform = "power9",
521 },
Arnd Bergmannc902be72006-01-04 19:55:53 +0000522 { /* Cell Broadband Engine */
Stephen Rothwell49209602005-10-12 15:55:09 +1000523 .pvr_mask = 0xffff0000,
524 .pvr_value = 0x00700000,
525 .cpu_name = "Cell Broadband Engine",
526 .cpu_features = CPU_FTRS_CELL,
527 .cpu_user_features = COMMON_USER_PPC64 |
Benjamin Herrenschmidtaa5cb0212006-03-01 15:07:07 +1100528 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
529 PPC_FEATURE_SMT,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000530 .mmu_features = MMU_FTRS_CELL,
Stephen Rothwell49209602005-10-12 15:55:09 +1000531 .icache_bsize = 128,
532 .dcache_bsize = 128,
Maynard Johnson18f21902006-11-20 18:45:16 +0100533 .num_pmcs = 4,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600534 .pmc_type = PPC_PMC_IBM,
Maynard Johnson18f21902006-11-20 18:45:16 +0100535 .oprofile_cpu_type = "ppc64/cell-be",
536 .oprofile_type = PPC_OPROFILE_CELL,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100537 .platform = "ppc-cell-be",
Stephen Rothwell49209602005-10-12 15:55:09 +1000538 },
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500539 { /* PA Semi PA6T */
540 .pvr_mask = 0x7fff0000,
541 .pvr_value = 0x00900000,
542 .cpu_name = "PA6T",
543 .cpu_features = CPU_FTRS_PA6T,
544 .cpu_user_features = COMMON_USER_PA6T,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000545 .mmu_features = MMU_FTRS_PA6T,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500546 .icache_bsize = 64,
547 .dcache_bsize = 64,
548 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600549 .pmc_type = PPC_PMC_PA6T,
Olof Johansson11999192007-02-04 16:36:51 -0600550 .cpu_setup = __setup_cpu_pa6t,
551 .cpu_restore = __restore_cpu_pa6t,
Olof Johansson25fc5302007-04-18 16:38:21 +1000552 .oprofile_cpu_type = "ppc64/pa6t",
553 .oprofile_type = PPC_OPROFILE_PA6T,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500554 .platform = "pa6t",
555 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000556 { /* default match */
557 .pvr_mask = 0x00000000,
558 .pvr_value = 0x00000000,
Nicholas Piggin471d7ff2018-02-21 05:08:29 +1000559 .cpu_name = "POWER5 (compatible)",
Stephen Rothwell49209602005-10-12 15:55:09 +1000560 .cpu_features = CPU_FTRS_COMPATIBLE,
561 .cpu_user_features = COMMON_USER_PPC64,
Nicholas Piggin471d7ff2018-02-21 05:08:29 +1000562 .mmu_features = MMU_FTRS_POWER,
Stephen Rothwell49209602005-10-12 15:55:09 +1000563 .icache_bsize = 128,
564 .dcache_bsize = 128,
565 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600566 .pmc_type = PPC_PMC_IBM,
Nicholas Piggin471d7ff2018-02-21 05:08:29 +1000567 .platform = "power5",
Stephen Rothwell49209602005-10-12 15:55:09 +1000568 }
Benjamin Herrenschmidt2d27cfd2009-07-23 23:15:59 +0000569#endif /* CONFIG_PPC_BOOK3S_64 */
Benjamin Herrenschmidt2d27cfd2009-07-23 23:15:59 +0000570
Stephen Rothwell49209602005-10-12 15:55:09 +1000571#ifdef CONFIG_PPC32
Christophe Leroy12c3f1f2019-08-26 15:52:14 +0000572#ifdef CONFIG_PPC_BOOK3S_601
Stephen Rothwell49209602005-10-12 15:55:09 +1000573 { /* 601 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700574 .pvr_mask = 0xffff0000,
575 .pvr_value = 0x00010000,
576 .cpu_name = "601",
Kumar Gala10b35d92005-09-23 14:08:58 -0500577 .cpu_features = CPU_FTRS_PPC601,
Stephen Rothwell49209602005-10-12 15:55:09 +1000578 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
Paul Mackerras98599012005-10-22 16:51:34 +1000579 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000580 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700581 .icache_bsize = 32,
582 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100583 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100584 .platform = "ppc601",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700585 },
Christophe Leroy12c3f1f2019-08-26 15:52:14 +0000586#endif /* CONFIG_PPC_BOOK3S_601 */
587#ifdef CONFIG_PPC_BOOK3S_6xx
Linus Torvalds1da177e2005-04-16 15:20:36 -0700588 { /* 603 */
589 .pvr_mask = 0xffff0000,
590 .pvr_value = 0x00030000,
591 .cpu_name = "603",
Kumar Gala10b35d92005-09-23 14:08:58 -0500592 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000593 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000594 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700595 .icache_bsize = 32,
596 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100597 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100598 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100599 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700600 },
601 { /* 603e */
602 .pvr_mask = 0xffff0000,
603 .pvr_value = 0x00060000,
604 .cpu_name = "603e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500605 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000606 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000607 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700608 .icache_bsize = 32,
609 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100610 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100611 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100612 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700613 },
614 { /* 603ev */
615 .pvr_mask = 0xffff0000,
616 .pvr_value = 0x00070000,
617 .cpu_name = "603ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500618 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000619 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000620 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700621 .icache_bsize = 32,
622 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100623 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100624 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100625 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700626 },
627 { /* 604 */
628 .pvr_mask = 0xffff0000,
629 .pvr_value = 0x00040000,
630 .cpu_name = "604",
Kumar Gala10b35d92005-09-23 14:08:58 -0500631 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000632 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000633 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700634 .icache_bsize = 32,
635 .dcache_bsize = 32,
636 .num_pmcs = 2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100637 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100638 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100639 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700640 },
641 { /* 604e */
642 .pvr_mask = 0xfffff000,
643 .pvr_value = 0x00090000,
644 .cpu_name = "604e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500645 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000646 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000647 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700648 .icache_bsize = 32,
649 .dcache_bsize = 32,
650 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100651 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100652 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100653 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700654 },
655 { /* 604r */
656 .pvr_mask = 0xffff0000,
657 .pvr_value = 0x00090000,
658 .cpu_name = "604r",
Kumar Gala10b35d92005-09-23 14:08:58 -0500659 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000660 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000661 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700662 .icache_bsize = 32,
663 .dcache_bsize = 32,
664 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100665 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100666 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100667 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700668 },
669 { /* 604ev */
670 .pvr_mask = 0xffff0000,
671 .pvr_value = 0x000a0000,
672 .cpu_name = "604ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500673 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000674 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000675 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700676 .icache_bsize = 32,
677 .dcache_bsize = 32,
678 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100679 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100680 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100681 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700682 },
683 { /* 740/750 (0x4202, don't support TAU ?) */
684 .pvr_mask = 0xffffffff,
685 .pvr_value = 0x00084202,
686 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500687 .cpu_features = CPU_FTRS_740_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000688 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000689 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700690 .icache_bsize = 32,
691 .dcache_bsize = 32,
692 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100693 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100694 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100695 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700696 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700697 { /* 750CX (80100 and 8010x?) */
698 .pvr_mask = 0xfffffff0,
699 .pvr_value = 0x00080100,
700 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500701 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000702 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000703 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700704 .icache_bsize = 32,
705 .dcache_bsize = 32,
706 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100707 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100708 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100709 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700710 },
711 { /* 750CX (82201 and 82202) */
712 .pvr_mask = 0xfffffff0,
713 .pvr_value = 0x00082200,
714 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500715 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000716 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000717 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700718 .icache_bsize = 32,
719 .dcache_bsize = 32,
720 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000721 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100722 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100723 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100724 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700725 },
726 { /* 750CXe (82214) */
727 .pvr_mask = 0xfffffff0,
728 .pvr_value = 0x00082210,
729 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500730 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000731 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000732 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700733 .icache_bsize = 32,
734 .dcache_bsize = 32,
735 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000736 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100737 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100738 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100739 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700740 },
Arthur Othieno7c316252005-09-03 15:55:52 -0700741 { /* 750CXe "Gekko" (83214) */
742 .pvr_mask = 0xffffffff,
743 .pvr_value = 0x00083214,
744 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500745 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000746 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000747 .mmu_features = MMU_FTR_HPTE_TABLE,
Arthur Othieno7c316252005-09-03 15:55:52 -0700748 .icache_bsize = 32,
749 .dcache_bsize = 32,
750 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000751 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100752 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100753 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100754 .platform = "ppc750",
Arthur Othieno7c316252005-09-03 15:55:52 -0700755 },
Albert Herranz45158dc2009-12-12 06:31:46 +0000756 { /* 750CL (and "Broadway") */
757 .pvr_mask = 0xfffff0e0,
758 .pvr_value = 0x00087000,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500759 .cpu_name = "750CL",
Josh Boyera14c4502007-04-13 04:33:25 +1000760 .cpu_features = CPU_FTRS_750CL,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500761 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000762 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500763 .icache_bsize = 32,
764 .dcache_bsize = 32,
765 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000766 .pmc_type = PPC_PMC_IBM,
Josh Boyera14c4502007-04-13 04:33:25 +1000767 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100768 .machine_check = machine_check_generic,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500769 .platform = "ppc750",
Dragos Tatulea04f56534772009-09-16 11:58:15 +0300770 .oprofile_cpu_type = "ppc/750",
771 .oprofile_type = PPC_OPROFILE_G4,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500772 },
Arthur Othienoac1ff042005-09-03 15:55:51 -0700773 { /* 745/755 */
774 .pvr_mask = 0xfffff000,
775 .pvr_value = 0x00083000,
776 .cpu_name = "745/755",
Kumar Gala10b35d92005-09-23 14:08:58 -0500777 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000778 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000779 .mmu_features = MMU_FTR_HPTE_TABLE,
Arthur Othienoac1ff042005-09-03 15:55:51 -0700780 .icache_bsize = 32,
781 .dcache_bsize = 32,
782 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000783 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100784 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100785 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100786 .platform = "ppc750",
Arthur Othienoac1ff042005-09-03 15:55:51 -0700787 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700788 { /* 750FX rev 1.x */
789 .pvr_mask = 0xffffff00,
790 .pvr_value = 0x70000100,
791 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500792 .cpu_features = CPU_FTRS_750FX1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000793 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000794 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700795 .icache_bsize = 32,
796 .dcache_bsize = 32,
797 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000798 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100799 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100800 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100801 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000802 .oprofile_cpu_type = "ppc/750",
803 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700804 },
805 { /* 750FX rev 2.0 must disable HID0[DPM] */
806 .pvr_mask = 0xffffffff,
807 .pvr_value = 0x70000200,
808 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500809 .cpu_features = CPU_FTRS_750FX2,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000810 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000811 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700812 .icache_bsize = 32,
813 .dcache_bsize = 32,
814 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000815 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100816 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100817 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100818 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000819 .oprofile_cpu_type = "ppc/750",
820 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700821 },
822 { /* 750FX (All revs except 2.0) */
823 .pvr_mask = 0xffff0000,
824 .pvr_value = 0x70000000,
825 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500826 .cpu_features = CPU_FTRS_750FX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000827 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000828 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700829 .icache_bsize = 32,
830 .dcache_bsize = 32,
831 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000832 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100833 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100834 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100835 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000836 .oprofile_cpu_type = "ppc/750",
837 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700838 },
839 { /* 750GX */
840 .pvr_mask = 0xffff0000,
841 .pvr_value = 0x70020000,
842 .cpu_name = "750GX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500843 .cpu_features = CPU_FTRS_750GX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000844 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000845 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700846 .icache_bsize = 32,
847 .dcache_bsize = 32,
848 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000849 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100850 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100851 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100852 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000853 .oprofile_cpu_type = "ppc/750",
854 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700855 },
856 { /* 740/750 (L2CR bit need fixup for 740) */
857 .pvr_mask = 0xffff0000,
858 .pvr_value = 0x00080000,
859 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500860 .cpu_features = CPU_FTRS_740,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000861 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000862 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700863 .icache_bsize = 32,
864 .dcache_bsize = 32,
865 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000866 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100867 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100868 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100869 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700870 },
871 { /* 7400 rev 1.1 ? (no TAU) */
872 .pvr_mask = 0xffffffff,
873 .pvr_value = 0x000c1101,
874 .cpu_name = "7400 (1.1)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500875 .cpu_features = CPU_FTRS_7400_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000876 .cpu_user_features = COMMON_USER |
877 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000878 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700879 .icache_bsize = 32,
880 .dcache_bsize = 32,
881 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000882 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100883 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100884 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100885 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700886 },
887 { /* 7400 */
888 .pvr_mask = 0xffff0000,
889 .pvr_value = 0x000c0000,
890 .cpu_name = "7400",
Kumar Gala10b35d92005-09-23 14:08:58 -0500891 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000892 .cpu_user_features = COMMON_USER |
893 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000894 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700895 .icache_bsize = 32,
896 .dcache_bsize = 32,
897 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000898 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100899 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100900 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100901 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700902 },
903 { /* 7410 */
904 .pvr_mask = 0xffff0000,
905 .pvr_value = 0x800c0000,
906 .cpu_name = "7410",
Kumar Gala10b35d92005-09-23 14:08:58 -0500907 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000908 .cpu_user_features = COMMON_USER |
909 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000910 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700911 .icache_bsize = 32,
912 .dcache_bsize = 32,
913 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000914 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100915 .cpu_setup = __setup_cpu_7410,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100916 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100917 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700918 },
919 { /* 7450 2.0 - no doze/nap */
920 .pvr_mask = 0xffffffff,
921 .pvr_value = 0x80000200,
922 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500923 .cpu_features = CPU_FTRS_7450_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000924 .cpu_user_features = COMMON_USER |
925 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000926 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700927 .icache_bsize = 32,
928 .dcache_bsize = 32,
929 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000930 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600931 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600932 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000933 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100934 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100935 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700936 },
937 { /* 7450 2.1 */
938 .pvr_mask = 0xffffffff,
939 .pvr_value = 0x80000201,
940 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500941 .cpu_features = CPU_FTRS_7450_21,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000942 .cpu_user_features = COMMON_USER |
943 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000944 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700945 .icache_bsize = 32,
946 .dcache_bsize = 32,
947 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000948 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600949 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600950 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000951 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100952 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100953 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700954 },
955 { /* 7450 2.3 and newer */
956 .pvr_mask = 0xffff0000,
957 .pvr_value = 0x80000000,
958 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500959 .cpu_features = CPU_FTRS_7450_23,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000960 .cpu_user_features = COMMON_USER |
961 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000962 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700963 .icache_bsize = 32,
964 .dcache_bsize = 32,
965 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000966 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600967 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600968 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000969 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100970 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100971 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700972 },
973 { /* 7455 rev 1.x */
974 .pvr_mask = 0xffffff00,
975 .pvr_value = 0x80010100,
976 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500977 .cpu_features = CPU_FTRS_7455_1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000978 .cpu_user_features = COMMON_USER |
979 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000980 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700981 .icache_bsize = 32,
982 .dcache_bsize = 32,
983 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000984 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600985 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600986 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000987 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100988 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100989 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700990 },
991 { /* 7455 rev 2.0 */
992 .pvr_mask = 0xffffffff,
993 .pvr_value = 0x80010200,
994 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500995 .cpu_features = CPU_FTRS_7455_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000996 .cpu_user_features = COMMON_USER |
997 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000998 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700999 .icache_bsize = 32,
1000 .dcache_bsize = 32,
1001 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001002 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001003 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001004 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001005 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001006 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001007 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001008 },
1009 { /* 7455 others */
1010 .pvr_mask = 0xffff0000,
1011 .pvr_value = 0x80010000,
1012 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -05001013 .cpu_features = CPU_FTRS_7455,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001014 .cpu_user_features = COMMON_USER |
1015 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001016 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001017 .icache_bsize = 32,
1018 .dcache_bsize = 32,
1019 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001020 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001021 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001022 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001023 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001024 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001025 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001026 },
1027 { /* 7447/7457 Rev 1.0 */
1028 .pvr_mask = 0xffffffff,
1029 .pvr_value = 0x80020100,
1030 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -05001031 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001032 .cpu_user_features = COMMON_USER |
1033 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001034 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001035 .icache_bsize = 32,
1036 .dcache_bsize = 32,
1037 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001038 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001039 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001040 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001041 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001042 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001043 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001044 },
1045 { /* 7447/7457 Rev 1.1 */
1046 .pvr_mask = 0xffffffff,
1047 .pvr_value = 0x80020101,
1048 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -05001049 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001050 .cpu_user_features = COMMON_USER |
1051 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001052 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001053 .icache_bsize = 32,
1054 .dcache_bsize = 32,
1055 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001056 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001057 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001058 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001059 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001060 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001061 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001062 },
1063 { /* 7447/7457 Rev 1.2 and later */
1064 .pvr_mask = 0xffff0000,
1065 .pvr_value = 0x80020000,
1066 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -05001067 .cpu_features = CPU_FTRS_7447,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001068 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001069 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001070 .icache_bsize = 32,
1071 .dcache_bsize = 32,
1072 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001073 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001074 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001075 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001076 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001077 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001078 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001079 },
1080 { /* 7447A */
1081 .pvr_mask = 0xffff0000,
1082 .pvr_value = 0x80030000,
1083 .cpu_name = "7447A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001084 .cpu_features = CPU_FTRS_7447A,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001085 .cpu_user_features = COMMON_USER |
1086 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001087 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001088 .icache_bsize = 32,
1089 .dcache_bsize = 32,
1090 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001091 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001092 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001093 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001094 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001095 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001096 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001097 },
Kumar Galabbde6302005-09-03 15:55:55 -07001098 { /* 7448 */
1099 .pvr_mask = 0xffff0000,
1100 .pvr_value = 0x80040000,
1101 .cpu_name = "7448",
James.Yang3d372542007-05-02 16:34:43 -05001102 .cpu_features = CPU_FTRS_7448,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001103 .cpu_user_features = COMMON_USER |
1104 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001105 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Kumar Galabbde6302005-09-03 15:55:55 -07001106 .icache_bsize = 32,
1107 .dcache_bsize = 32,
1108 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001109 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001110 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001111 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001112 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001113 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001114 .platform = "ppc7450",
Kumar Galabbde6302005-09-03 15:55:55 -07001115 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001116 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
1117 .pvr_mask = 0x7fff0000,
1118 .pvr_value = 0x00810000,
1119 .cpu_name = "82xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001120 .cpu_features = CPU_FTRS_82XX,
Stephen Rothwell49209602005-10-12 15:55:09 +10001121 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001122 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001123 .icache_bsize = 32,
1124 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001125 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001126 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001127 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001128 },
1129 { /* All G2_LE (603e core, plus some) have the same pvr */
1130 .pvr_mask = 0x7fff0000,
1131 .pvr_value = 0x00820000,
1132 .cpu_name = "G2_LE",
Kumar Gala10b35d92005-09-23 14:08:58 -05001133 .cpu_features = CPU_FTRS_G2_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +10001134 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001135 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001136 .icache_bsize = 32,
1137 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001138 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001139 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001140 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001141 },
Christophe Leroy0deae392018-12-10 11:41:29 +00001142#ifdef CONFIG_PPC_83xx
Kim Phillips6c4a2502006-10-02 20:10:24 -05001143 { /* e300c1 (a 603e core, plus some) on 83xx */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001144 .pvr_mask = 0x7fff0000,
1145 .pvr_value = 0x00830000,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001146 .cpu_name = "e300c1",
Kumar Gala10b35d92005-09-23 14:08:58 -05001147 .cpu_features = CPU_FTRS_E300,
Stephen Rothwell49209602005-10-12 15:55:09 +10001148 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001149 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001150 .icache_bsize = 32,
1151 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001152 .cpu_setup = __setup_cpu_603,
Christophe Leroy0deae392018-12-10 11:41:29 +00001153 .machine_check = machine_check_83xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001154 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001155 },
Kim Phillips6c4a2502006-10-02 20:10:24 -05001156 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
1157 .pvr_mask = 0x7fff0000,
1158 .pvr_value = 0x00840000,
1159 .cpu_name = "e300c2",
Kim Phillipsaa42c692006-12-08 02:43:30 -06001160 .cpu_features = CPU_FTRS_E300C2,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001161 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Kumar Gala2319f122009-03-19 03:55:41 +00001162 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1163 MMU_FTR_NEED_DTLB_SW_LRU,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001164 .icache_bsize = 32,
1165 .dcache_bsize = 32,
1166 .cpu_setup = __setup_cpu_603,
Christophe Leroy0deae392018-12-10 11:41:29 +00001167 .machine_check = machine_check_83xx,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001168 .platform = "ppc603",
1169 },
Li Yanga58d5242007-10-19 19:38:42 +08001170 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
Scott Wood57933f82006-12-01 12:57:05 -06001171 .pvr_mask = 0x7fff0000,
1172 .pvr_value = 0x00850000,
1173 .cpu_name = "e300c3",
1174 .cpu_features = CPU_FTRS_E300,
1175 .cpu_user_features = COMMON_USER,
Kumar Gala2319f122009-03-19 03:55:41 +00001176 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1177 MMU_FTR_NEED_DTLB_SW_LRU,
Scott Wood57933f82006-12-01 12:57:05 -06001178 .icache_bsize = 32,
1179 .dcache_bsize = 32,
1180 .cpu_setup = __setup_cpu_603,
Christophe Leroy0deae392018-12-10 11:41:29 +00001181 .machine_check = machine_check_83xx,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001182 .num_pmcs = 4,
1183 .oprofile_cpu_type = "ppc/e300",
1184 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Scott Wood57933f82006-12-01 12:57:05 -06001185 .platform = "ppc603",
1186 },
Li Yanga58d5242007-10-19 19:38:42 +08001187 { /* e300c4 (e300c1, plus one IU) */
1188 .pvr_mask = 0x7fff0000,
1189 .pvr_value = 0x00860000,
1190 .cpu_name = "e300c4",
1191 .cpu_features = CPU_FTRS_E300,
1192 .cpu_user_features = COMMON_USER,
Kumar Gala2319f122009-03-19 03:55:41 +00001193 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1194 MMU_FTR_NEED_DTLB_SW_LRU,
Li Yanga58d5242007-10-19 19:38:42 +08001195 .icache_bsize = 32,
1196 .dcache_bsize = 32,
1197 .cpu_setup = __setup_cpu_603,
Christophe Leroy0deae392018-12-10 11:41:29 +00001198 .machine_check = machine_check_83xx,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001199 .num_pmcs = 4,
1200 .oprofile_cpu_type = "ppc/e300",
1201 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Li Yanga58d5242007-10-19 19:38:42 +08001202 .platform = "ppc603",
1203 },
Christophe Leroy0deae392018-12-10 11:41:29 +00001204#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -07001205 { /* default match, we assume split I/D cache & TB (non-601)... */
1206 .pvr_mask = 0x00000000,
1207 .pvr_value = 0x00000000,
1208 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -05001209 .cpu_features = CPU_FTRS_CLASSIC32,
Stephen Rothwell49209602005-10-12 15:55:09 +10001210 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001211 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001212 .icache_bsize = 32,
1213 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001214 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001215 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001216 },
Christophe Leroy12c3f1f2019-08-26 15:52:14 +00001217#endif /* CONFIG_PPC_BOOK3S_6xx */
Christophe Leroy968159c2017-08-08 13:58:54 +02001218#ifdef CONFIG_PPC_8xx
Linus Torvalds1da177e2005-04-16 15:20:36 -07001219 { /* 8xx */
1220 .pvr_mask = 0xffff0000,
Christophe Leroy3ee87672017-08-08 13:58:58 +02001221 .pvr_value = PVR_8xx,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001222 .cpu_name = "8xx",
1223 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1224 * if the 8xx code is there.... */
Kumar Gala10b35d92005-09-23 14:08:58 -05001225 .cpu_features = CPU_FTRS_8XX,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001226 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001227 .mmu_features = MMU_FTR_TYPE_8xx,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001228 .icache_bsize = 16,
1229 .dcache_bsize = 16,
Christophe Leroye627f8d2016-09-16 10:23:11 +02001230 .machine_check = machine_check_8xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001231 .platform = "ppc823",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001232 },
Christophe Leroy968159c2017-08-08 13:58:54 +02001233#endif /* CONFIG_PPC_8xx */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001234#ifdef CONFIG_40x
1235 { /* 403GC */
1236 .pvr_mask = 0xffffff00,
1237 .pvr_value = 0x00200200,
1238 .cpu_name = "403GC",
Kumar Gala10b35d92005-09-23 14:08:58 -05001239 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001240 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001241 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001242 .icache_bsize = 16,
1243 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001244 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001245 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001246 },
1247 { /* 403GCX */
1248 .pvr_mask = 0xffffff00,
1249 .pvr_value = 0x00201400,
1250 .cpu_name = "403GCX",
Kumar Gala10b35d92005-09-23 14:08:58 -05001251 .cpu_features = CPU_FTRS_40X,
Paul Mackerras98599012005-10-22 16:51:34 +10001252 .cpu_user_features = PPC_FEATURE_32 |
1253 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001254 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001255 .icache_bsize = 16,
1256 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001257 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001258 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001259 },
1260 { /* 403G ?? */
1261 .pvr_mask = 0xffff0000,
1262 .pvr_value = 0x00200000,
1263 .cpu_name = "403G ??",
Kumar Gala10b35d92005-09-23 14:08:58 -05001264 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001265 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001266 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001267 .icache_bsize = 16,
1268 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001269 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001270 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001271 },
1272 { /* 405GP */
1273 .pvr_mask = 0xffff0000,
1274 .pvr_value = 0x40110000,
1275 .cpu_name = "405GP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001276 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001277 .cpu_user_features = PPC_FEATURE_32 |
1278 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001279 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001280 .icache_bsize = 32,
1281 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001282 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001283 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001284 },
1285 { /* STB 03xxx */
1286 .pvr_mask = 0xffff0000,
1287 .pvr_value = 0x40130000,
1288 .cpu_name = "STB03xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001289 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001290 .cpu_user_features = PPC_FEATURE_32 |
1291 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001292 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001293 .icache_bsize = 32,
1294 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001295 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001296 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001297 },
1298 { /* STB 04xxx */
1299 .pvr_mask = 0xffff0000,
1300 .pvr_value = 0x41810000,
1301 .cpu_name = "STB04xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001302 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001303 .cpu_user_features = PPC_FEATURE_32 |
1304 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001305 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001306 .icache_bsize = 32,
1307 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001308 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001309 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001310 },
1311 { /* NP405L */
1312 .pvr_mask = 0xffff0000,
1313 .pvr_value = 0x41610000,
1314 .cpu_name = "NP405L",
Kumar Gala10b35d92005-09-23 14:08:58 -05001315 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001316 .cpu_user_features = PPC_FEATURE_32 |
1317 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001318 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001319 .icache_bsize = 32,
1320 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001321 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001322 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001323 },
1324 { /* NP4GS3 */
1325 .pvr_mask = 0xffff0000,
1326 .pvr_value = 0x40B10000,
1327 .cpu_name = "NP4GS3",
Kumar Gala10b35d92005-09-23 14:08:58 -05001328 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001329 .cpu_user_features = PPC_FEATURE_32 |
1330 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001331 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001332 .icache_bsize = 32,
1333 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001334 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001335 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001336 },
1337 { /* NP405H */
1338 .pvr_mask = 0xffff0000,
1339 .pvr_value = 0x41410000,
1340 .cpu_name = "NP405H",
Kumar Gala10b35d92005-09-23 14:08:58 -05001341 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001342 .cpu_user_features = PPC_FEATURE_32 |
1343 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001344 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001345 .icache_bsize = 32,
1346 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001347 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001348 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001349 },
1350 { /* 405GPr */
1351 .pvr_mask = 0xffff0000,
1352 .pvr_value = 0x50910000,
1353 .cpu_name = "405GPr",
Kumar Gala10b35d92005-09-23 14:08:58 -05001354 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001355 .cpu_user_features = PPC_FEATURE_32 |
1356 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001357 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001358 .icache_bsize = 32,
1359 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001360 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001361 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001362 },
1363 { /* STBx25xx */
1364 .pvr_mask = 0xffff0000,
1365 .pvr_value = 0x51510000,
1366 .cpu_name = "STBx25xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001367 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001368 .cpu_user_features = PPC_FEATURE_32 |
1369 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001370 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001371 .icache_bsize = 32,
1372 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001373 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001374 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001375 },
1376 { /* 405LP */
1377 .pvr_mask = 0xffff0000,
1378 .pvr_value = 0x41F10000,
1379 .cpu_name = "405LP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001380 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001381 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001382 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001383 .icache_bsize = 32,
1384 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001385 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001386 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001387 },
1388 { /* Xilinx Virtex-II Pro */
Grant C. Likely72646c72006-01-19 01:13:20 -07001389 .pvr_mask = 0xfffff000,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001390 .pvr_value = 0x20010000,
1391 .cpu_name = "Virtex-II Pro",
Kumar Gala10b35d92005-09-23 14:08:58 -05001392 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001393 .cpu_user_features = PPC_FEATURE_32 |
1394 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001395 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001396 .icache_bsize = 32,
1397 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001398 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001399 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001400 },
Grant C. Likely72646c72006-01-19 01:13:20 -07001401 { /* Xilinx Virtex-4 FX */
1402 .pvr_mask = 0xfffff000,
1403 .pvr_value = 0x20011000,
1404 .cpu_name = "Virtex-4 FX",
1405 .cpu_features = CPU_FTRS_40X,
1406 .cpu_user_features = PPC_FEATURE_32 |
1407 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001408 .mmu_features = MMU_FTR_TYPE_40x,
Grant C. Likely72646c72006-01-19 01:13:20 -07001409 .icache_bsize = 32,
1410 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001411 .machine_check = machine_check_4xx,
Peter Bergner838fdb42006-09-14 14:18:38 -05001412 .platform = "ppc405",
Grant C. Likely72646c72006-01-19 01:13:20 -07001413 },
Eugene Suroveginad95d602005-06-07 13:22:09 -07001414 { /* 405EP */
1415 .pvr_mask = 0xffff0000,
1416 .pvr_value = 0x51210000,
1417 .cpu_name = "405EP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001418 .cpu_features = CPU_FTRS_40X,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001419 .cpu_user_features = PPC_FEATURE_32 |
1420 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001421 .mmu_features = MMU_FTR_TYPE_40x,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001422 .icache_bsize = 32,
1423 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001424 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001425 .platform = "ppc405",
Eugene Suroveginad95d602005-06-07 13:22:09 -07001426 },
Lee Nipperff349102010-07-09 01:17:16 +00001427 { /* 405EX Rev. A/B with Security */
1428 .pvr_mask = 0xffff000f,
1429 .pvr_value = 0x12910007,
1430 .cpu_name = "405EX Rev. A/B",
Stefan Roese5d8476c2007-10-11 22:08:14 +10001431 .cpu_features = CPU_FTRS_40X,
1432 .cpu_user_features = PPC_FEATURE_32 |
1433 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001434 .mmu_features = MMU_FTR_TYPE_40x,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001435 .icache_bsize = 32,
1436 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001437 .machine_check = machine_check_4xx,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001438 .platform = "ppc405",
1439 },
Lee Nipperff349102010-07-09 01:17:16 +00001440 { /* 405EX Rev. C without Security */
1441 .pvr_mask = 0xffff000f,
1442 .pvr_value = 0x1291000d,
1443 .cpu_name = "405EX Rev. C",
1444 .cpu_features = CPU_FTRS_40X,
1445 .cpu_user_features = PPC_FEATURE_32 |
1446 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1447 .mmu_features = MMU_FTR_TYPE_40x,
1448 .icache_bsize = 32,
1449 .dcache_bsize = 32,
1450 .machine_check = machine_check_4xx,
1451 .platform = "ppc405",
1452 },
1453 { /* 405EX Rev. C with Security */
1454 .pvr_mask = 0xffff000f,
1455 .pvr_value = 0x1291000f,
1456 .cpu_name = "405EX Rev. C",
1457 .cpu_features = CPU_FTRS_40X,
1458 .cpu_user_features = PPC_FEATURE_32 |
1459 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1460 .mmu_features = MMU_FTR_TYPE_40x,
1461 .icache_bsize = 32,
1462 .dcache_bsize = 32,
1463 .machine_check = machine_check_4xx,
1464 .platform = "ppc405",
1465 },
1466 { /* 405EX Rev. D without Security */
1467 .pvr_mask = 0xffff000f,
1468 .pvr_value = 0x12910003,
1469 .cpu_name = "405EX Rev. D",
1470 .cpu_features = CPU_FTRS_40X,
1471 .cpu_user_features = PPC_FEATURE_32 |
1472 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1473 .mmu_features = MMU_FTR_TYPE_40x,
1474 .icache_bsize = 32,
1475 .dcache_bsize = 32,
1476 .machine_check = machine_check_4xx,
1477 .platform = "ppc405",
1478 },
1479 { /* 405EX Rev. D with Security */
1480 .pvr_mask = 0xffff000f,
1481 .pvr_value = 0x12910005,
1482 .cpu_name = "405EX Rev. D",
1483 .cpu_features = CPU_FTRS_40X,
1484 .cpu_user_features = PPC_FEATURE_32 |
1485 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1486 .mmu_features = MMU_FTR_TYPE_40x,
1487 .icache_bsize = 32,
1488 .dcache_bsize = 32,
1489 .machine_check = machine_check_4xx,
1490 .platform = "ppc405",
1491 },
1492 { /* 405EXr Rev. A/B without Security */
1493 .pvr_mask = 0xffff000f,
1494 .pvr_value = 0x12910001,
1495 .cpu_name = "405EXr Rev. A/B",
1496 .cpu_features = CPU_FTRS_40X,
1497 .cpu_user_features = PPC_FEATURE_32 |
1498 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1499 .mmu_features = MMU_FTR_TYPE_40x,
1500 .icache_bsize = 32,
1501 .dcache_bsize = 32,
1502 .machine_check = machine_check_4xx,
1503 .platform = "ppc405",
1504 },
1505 { /* 405EXr Rev. C without Security */
1506 .pvr_mask = 0xffff000f,
1507 .pvr_value = 0x12910009,
1508 .cpu_name = "405EXr Rev. C",
1509 .cpu_features = CPU_FTRS_40X,
1510 .cpu_user_features = PPC_FEATURE_32 |
1511 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1512 .mmu_features = MMU_FTR_TYPE_40x,
1513 .icache_bsize = 32,
1514 .dcache_bsize = 32,
1515 .machine_check = machine_check_4xx,
1516 .platform = "ppc405",
1517 },
1518 { /* 405EXr Rev. C with Security */
1519 .pvr_mask = 0xffff000f,
1520 .pvr_value = 0x1291000b,
1521 .cpu_name = "405EXr Rev. C",
1522 .cpu_features = CPU_FTRS_40X,
1523 .cpu_user_features = PPC_FEATURE_32 |
1524 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1525 .mmu_features = MMU_FTR_TYPE_40x,
1526 .icache_bsize = 32,
1527 .dcache_bsize = 32,
1528 .machine_check = machine_check_4xx,
1529 .platform = "ppc405",
1530 },
1531 { /* 405EXr Rev. D without Security */
1532 .pvr_mask = 0xffff000f,
Stefan Roeseb676d842008-01-15 18:09:15 +11001533 .pvr_value = 0x12910000,
Lee Nipperff349102010-07-09 01:17:16 +00001534 .cpu_name = "405EXr Rev. D",
1535 .cpu_features = CPU_FTRS_40X,
1536 .cpu_user_features = PPC_FEATURE_32 |
1537 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1538 .mmu_features = MMU_FTR_TYPE_40x,
1539 .icache_bsize = 32,
1540 .dcache_bsize = 32,
1541 .machine_check = machine_check_4xx,
1542 .platform = "ppc405",
1543 },
1544 { /* 405EXr Rev. D with Security */
1545 .pvr_mask = 0xffff000f,
1546 .pvr_value = 0x12910002,
1547 .cpu_name = "405EXr Rev. D",
Stefan Roeseb676d842008-01-15 18:09:15 +11001548 .cpu_features = CPU_FTRS_40X,
1549 .cpu_user_features = PPC_FEATURE_32 |
1550 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001551 .mmu_features = MMU_FTR_TYPE_40x,
Stefan Roeseb676d842008-01-15 18:09:15 +11001552 .icache_bsize = 32,
1553 .dcache_bsize = 32,
1554 .machine_check = machine_check_4xx,
1555 .platform = "ppc405",
1556 },
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001557 {
1558 /* 405EZ */
1559 .pvr_mask = 0xffff0000,
1560 .pvr_value = 0x41510000,
1561 .cpu_name = "405EZ",
1562 .cpu_features = CPU_FTRS_40X,
1563 .cpu_user_features = PPC_FEATURE_32 |
1564 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001565 .mmu_features = MMU_FTR_TYPE_40x,
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001566 .icache_bsize = 32,
1567 .dcache_bsize = 32,
1568 .machine_check = machine_check_4xx,
1569 .platform = "ppc405",
1570 },
Tanmay Inamdard5b9ee72011-11-28 21:01:41 +00001571 { /* APM8018X */
1572 .pvr_mask = 0xffff0000,
1573 .pvr_value = 0x7ff11432,
1574 .cpu_name = "APM8018X",
1575 .cpu_features = CPU_FTRS_40X,
1576 .cpu_user_features = PPC_FEATURE_32 |
1577 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1578 .mmu_features = MMU_FTR_TYPE_40x,
1579 .icache_bsize = 32,
1580 .dcache_bsize = 32,
1581 .machine_check = machine_check_4xx,
1582 .platform = "ppc405",
1583 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001584 { /* default match */
1585 .pvr_mask = 0x00000000,
1586 .pvr_value = 0x00000000,
1587 .cpu_name = "(generic 40x PPC)",
1588 .cpu_features = CPU_FTRS_40X,
1589 .cpu_user_features = PPC_FEATURE_32 |
1590 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001591 .mmu_features = MMU_FTR_TYPE_40x,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001592 .icache_bsize = 32,
1593 .dcache_bsize = 32,
1594 .machine_check = machine_check_4xx,
1595 .platform = "ppc405",
1596 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001597
1598#endif /* CONFIG_40x */
1599#ifdef CONFIG_44x
Matt Porterc9cf73a2005-07-31 22:34:52 -07001600 {
1601 .pvr_mask = 0xf0000fff,
1602 .pvr_value = 0x40000850,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001603 .cpu_name = "440GR Rev. A",
1604 .cpu_features = CPU_FTRS_44X,
1605 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001606 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001607 .icache_bsize = 32,
1608 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001609 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001610 .platform = "ppc440",
1611 },
1612 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1613 .pvr_mask = 0xf0000fff,
1614 .pvr_value = 0x40000858,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001615 .cpu_name = "440EP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001616 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001617 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001618 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001619 .icache_bsize = 32,
1620 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001621 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001622 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001623 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001624 },
1625 {
1626 .pvr_mask = 0xf0000fff,
1627 .pvr_value = 0x400008d3,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001628 .cpu_name = "440GR Rev. B",
1629 .cpu_features = CPU_FTRS_44X,
1630 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001631 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001632 .icache_bsize = 32,
1633 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001634 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001635 .platform = "ppc440",
1636 },
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001637 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1638 .pvr_mask = 0xf0000ff7,
1639 .pvr_value = 0x400008d4,
1640 .cpu_name = "440EP Rev. C",
1641 .cpu_features = CPU_FTRS_44X,
1642 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001643 .mmu_features = MMU_FTR_TYPE_44x,
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001644 .icache_bsize = 32,
1645 .dcache_bsize = 32,
1646 .cpu_setup = __setup_cpu_440ep,
1647 .machine_check = machine_check_4xx,
1648 .platform = "ppc440",
1649 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001650 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1651 .pvr_mask = 0xf0000fff,
1652 .pvr_value = 0x400008db,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001653 .cpu_name = "440EP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001654 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001655 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001656 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001657 .icache_bsize = 32,
1658 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001659 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001660 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001661 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001662 },
Valentine Barshak15fc9932007-08-29 17:40:30 +04001663 { /* 440GRX */
1664 .pvr_mask = 0xf0000ffb,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001665 .pvr_value = 0x200008D0,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001666 .cpu_name = "440GRX",
1667 .cpu_features = CPU_FTRS_44X,
1668 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001669 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001670 .icache_bsize = 32,
1671 .dcache_bsize = 32,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001672 .cpu_setup = __setup_cpu_440grx,
Valentine Barshakb2be3b12007-12-22 03:22:23 +11001673 .machine_check = machine_check_440A,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001674 .platform = "ppc440",
Valentine Barshak15fc9932007-08-29 17:40:30 +04001675 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001676 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1677 .pvr_mask = 0xf0000ffb,
1678 .pvr_value = 0x200008D8,
1679 .cpu_name = "440EPX",
1680 .cpu_features = CPU_FTRS_44X,
1681 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001682 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001683 .icache_bsize = 32,
1684 .dcache_bsize = 32,
1685 .cpu_setup = __setup_cpu_440epx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001686 .machine_check = machine_check_440A,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001687 .platform = "ppc440",
1688 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001689 { /* 440GP Rev. B */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001690 .pvr_mask = 0xf0000fff,
1691 .pvr_value = 0x40000440,
1692 .cpu_name = "440GP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001693 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001694 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001695 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001696 .icache_bsize = 32,
1697 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001698 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001699 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001700 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001701 { /* 440GP Rev. C */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001702 .pvr_mask = 0xf0000fff,
1703 .pvr_value = 0x40000481,
1704 .cpu_name = "440GP Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001705 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001706 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001707 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001708 .icache_bsize = 32,
1709 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001710 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001711 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001712 },
1713 { /* 440GX Rev. A */
1714 .pvr_mask = 0xf0000fff,
1715 .pvr_value = 0x50000850,
1716 .cpu_name = "440GX Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001717 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001718 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001719 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001720 .icache_bsize = 32,
1721 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001722 .cpu_setup = __setup_cpu_440gx,
1723 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001724 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001725 },
1726 { /* 440GX Rev. B */
1727 .pvr_mask = 0xf0000fff,
1728 .pvr_value = 0x50000851,
1729 .cpu_name = "440GX Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001730 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001731 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001732 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001733 .icache_bsize = 32,
1734 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001735 .cpu_setup = __setup_cpu_440gx,
1736 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001737 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001738 },
1739 { /* 440GX Rev. C */
1740 .pvr_mask = 0xf0000fff,
1741 .pvr_value = 0x50000892,
1742 .cpu_name = "440GX Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001743 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001744 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001745 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001746 .icache_bsize = 32,
1747 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001748 .cpu_setup = __setup_cpu_440gx,
1749 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001750 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001751 },
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001752 { /* 440GX Rev. F */
1753 .pvr_mask = 0xf0000fff,
1754 .pvr_value = 0x50000894,
1755 .cpu_name = "440GX Rev. F",
Kumar Gala10b35d92005-09-23 14:08:58 -05001756 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001757 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001758 .mmu_features = MMU_FTR_TYPE_44x,
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001759 .icache_bsize = 32,
1760 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001761 .cpu_setup = __setup_cpu_440gx,
1762 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001763 .platform = "ppc440",
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001764 },
Matt Porter656de7e2005-09-03 15:55:42 -07001765 { /* 440SP Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001766 .pvr_mask = 0xfff00fff,
1767 .pvr_value = 0x53200891,
Matt Porter656de7e2005-09-03 15:55:42 -07001768 .cpu_name = "440SP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001769 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001770 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001771 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porter656de7e2005-09-03 15:55:42 -07001772 .icache_bsize = 32,
1773 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001774 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001775 .platform = "ppc440",
Matt Porter656de7e2005-09-03 15:55:42 -07001776 },
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001777 { /* 440SPe Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001778 .pvr_mask = 0xfff00fff,
1779 .pvr_value = 0x53400890,
1780 .cpu_name = "440SPe Rev. A",
1781 .cpu_features = CPU_FTRS_44X,
1782 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001783 .mmu_features = MMU_FTR_TYPE_44x,
Roland Dreier333e6152007-06-16 05:36:32 +10001784 .icache_bsize = 32,
1785 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001786 .cpu_setup = __setup_cpu_440spe,
1787 .machine_check = machine_check_440A,
Roland Dreier333e6152007-06-16 05:36:32 +10001788 .platform = "ppc440",
1789 },
1790 { /* 440SPe Rev. B */
1791 .pvr_mask = 0xfff00fff,
1792 .pvr_value = 0x53400891,
1793 .cpu_name = "440SPe Rev. B",
Kumar Galaa147c582006-12-08 02:34:38 -06001794 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001795 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001796 .mmu_features = MMU_FTR_TYPE_44x,
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001797 .icache_bsize = 32,
1798 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001799 .cpu_setup = __setup_cpu_440spe,
1800 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001801 .platform = "ppc440",
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001802 },
John Linn23e72372008-07-01 09:42:07 -07001803 { /* 440 in Xilinx Virtex-5 FXT */
1804 .pvr_mask = 0xfffffff0,
1805 .pvr_value = 0x7ff21910,
1806 .cpu_name = "440 in Virtex-5 FXT",
1807 .cpu_features = CPU_FTRS_44X,
1808 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001809 .mmu_features = MMU_FTR_TYPE_44x,
John Linn23e72372008-07-01 09:42:07 -07001810 .icache_bsize = 32,
1811 .dcache_bsize = 32,
Grant Likely640d17d2008-12-04 05:39:55 +00001812 .cpu_setup = __setup_cpu_440x5,
1813 .machine_check = machine_check_440A,
John Linn23e72372008-07-01 09:42:07 -07001814 .platform = "ppc440",
1815 },
Stefan Roese464076a2008-02-24 08:07:41 +11001816 { /* 460EX */
Stefan Roese20d70342009-07-29 07:04:46 +00001817 .pvr_mask = 0xffff0006,
Stefan Roese464076a2008-02-24 08:07:41 +11001818 .pvr_value = 0x13020002,
1819 .cpu_name = "460EX",
Benjamin Herrenschmidt6d2170b2008-12-18 19:13:22 +00001820 .cpu_features = CPU_FTRS_440x6,
Stefan Roese464076a2008-02-24 08:07:41 +11001821 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001822 .mmu_features = MMU_FTR_TYPE_44x,
Stefan Roese464076a2008-02-24 08:07:41 +11001823 .icache_bsize = 32,
1824 .dcache_bsize = 32,
1825 .cpu_setup = __setup_cpu_460ex,
1826 .machine_check = machine_check_440A,
1827 .platform = "ppc440",
1828 },
Stefan Roese20d70342009-07-29 07:04:46 +00001829 { /* 460EX Rev B */
1830 .pvr_mask = 0xffff0007,
1831 .pvr_value = 0x13020004,
1832 .cpu_name = "460EX Rev. B",
1833 .cpu_features = CPU_FTRS_440x6,
1834 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1835 .mmu_features = MMU_FTR_TYPE_44x,
1836 .icache_bsize = 32,
1837 .dcache_bsize = 32,
1838 .cpu_setup = __setup_cpu_460ex,
1839 .machine_check = machine_check_440A,
1840 .platform = "ppc440",
1841 },
Stefan Roese464076a2008-02-24 08:07:41 +11001842 { /* 460GT */
Stefan Roese20d70342009-07-29 07:04:46 +00001843 .pvr_mask = 0xffff0006,
Stefan Roese464076a2008-02-24 08:07:41 +11001844 .pvr_value = 0x13020000,
1845 .cpu_name = "460GT",
Benjamin Herrenschmidt6d2170b2008-12-18 19:13:22 +00001846 .cpu_features = CPU_FTRS_440x6,
Josh Boyer939e6222008-06-11 07:52:40 -04001847 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001848 .mmu_features = MMU_FTR_TYPE_44x,
Stefan Roese464076a2008-02-24 08:07:41 +11001849 .icache_bsize = 32,
1850 .dcache_bsize = 32,
Josh Boyer939e6222008-06-11 07:52:40 -04001851 .cpu_setup = __setup_cpu_460gt,
Stefan Roese464076a2008-02-24 08:07:41 +11001852 .machine_check = machine_check_440A,
1853 .platform = "ppc440",
1854 },
Stefan Roese20d70342009-07-29 07:04:46 +00001855 { /* 460GT Rev B */
1856 .pvr_mask = 0xffff0007,
1857 .pvr_value = 0x13020005,
1858 .cpu_name = "460GT Rev. B",
1859 .cpu_features = CPU_FTRS_440x6,
1860 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1861 .mmu_features = MMU_FTR_TYPE_44x,
1862 .icache_bsize = 32,
1863 .dcache_bsize = 32,
1864 .cpu_setup = __setup_cpu_460gt,
1865 .machine_check = machine_check_440A,
1866 .platform = "ppc440",
1867 },
Madhulika Madishetty6c712092009-02-05 13:31:36 +00001868 { /* 460SX */
1869 .pvr_mask = 0xffffff00,
1870 .pvr_value = 0x13541800,
1871 .cpu_name = "460SX",
1872 .cpu_features = CPU_FTRS_44X,
1873 .cpu_user_features = COMMON_USER_BOOKE,
1874 .mmu_features = MMU_FTR_TYPE_44x,
1875 .icache_bsize = 32,
1876 .dcache_bsize = 32,
1877 .cpu_setup = __setup_cpu_460sx,
1878 .machine_check = machine_check_440A,
1879 .platform = "ppc440",
1880 },
Tirumala Marri6edc3232010-09-13 13:26:11 +00001881 { /* 464 in APM821xx */
Vinh Nguyen Huu Tuong7c801162011-12-20 02:43:34 +00001882 .pvr_mask = 0xfffffff0,
Tirumala Marri6edc3232010-09-13 13:26:11 +00001883 .pvr_value = 0x12C41C80,
1884 .cpu_name = "APM821XX",
1885 .cpu_features = CPU_FTRS_44X,
1886 .cpu_user_features = COMMON_USER_BOOKE |
1887 PPC_FEATURE_HAS_FPU,
1888 .mmu_features = MMU_FTR_TYPE_44x,
1889 .icache_bsize = 32,
1890 .dcache_bsize = 32,
1891 .cpu_setup = __setup_cpu_apm821xx,
1892 .machine_check = machine_check_440A,
1893 .platform = "ppc440",
1894 },
Michael Ellerman13fef7f2017-08-08 16:39:17 +10001895#ifdef CONFIG_PPC_47x
Dave Kleikampc48d0db2011-01-26 06:17:58 +00001896 { /* 476 DD2 core */
1897 .pvr_mask = 0xffffffff,
1898 .pvr_value = 0x11a52080,
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001899 .cpu_name = "476",
Dave Kleikampc48d0db2011-01-26 06:17:58 +00001900 .cpu_features = CPU_FTRS_47X | CPU_FTR_476_DD2,
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001901 .cpu_user_features = COMMON_USER_BOOKE |
1902 PPC_FEATURE_HAS_FPU,
1903 .mmu_features = MMU_FTR_TYPE_47x |
1904 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1905 .icache_bsize = 32,
1906 .dcache_bsize = 128,
Dave Kleikampfc5e7092010-03-05 03:43:18 +00001907 .machine_check = machine_check_47x,
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001908 .platform = "ppc470",
1909 },
Tony Breedsdf777bd2011-11-30 21:39:23 +00001910 { /* 476fpe */
1911 .pvr_mask = 0xffff0000,
1912 .pvr_value = 0x7ff50000,
1913 .cpu_name = "476fpe",
1914 .cpu_features = CPU_FTRS_47X | CPU_FTR_476_DD2,
1915 .cpu_user_features = COMMON_USER_BOOKE |
1916 PPC_FEATURE_HAS_FPU,
1917 .mmu_features = MMU_FTR_TYPE_47x |
1918 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1919 .icache_bsize = 32,
1920 .dcache_bsize = 128,
1921 .machine_check = machine_check_47x,
1922 .platform = "ppc470",
1923 },
Torez Smithb4e8c8d2010-03-05 10:45:54 +00001924 { /* 476 iss */
1925 .pvr_mask = 0xffff0000,
1926 .pvr_value = 0x00050000,
1927 .cpu_name = "476",
1928 .cpu_features = CPU_FTRS_47X,
1929 .cpu_user_features = COMMON_USER_BOOKE |
1930 PPC_FEATURE_HAS_FPU,
Torez Smithb4e8c8d2010-03-05 10:45:54 +00001931 .mmu_features = MMU_FTR_TYPE_47x |
1932 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1933 .icache_bsize = 32,
1934 .dcache_bsize = 128,
1935 .machine_check = machine_check_47x,
1936 .platform = "ppc470",
1937 },
Dave Kleikampc48d0db2011-01-26 06:17:58 +00001938 { /* 476 others */
1939 .pvr_mask = 0xffff0000,
1940 .pvr_value = 0x11a50000,
1941 .cpu_name = "476",
1942 .cpu_features = CPU_FTRS_47X,
1943 .cpu_user_features = COMMON_USER_BOOKE |
1944 PPC_FEATURE_HAS_FPU,
1945 .mmu_features = MMU_FTR_TYPE_47x |
1946 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1947 .icache_bsize = 32,
1948 .dcache_bsize = 128,
1949 .machine_check = machine_check_47x,
1950 .platform = "ppc470",
1951 },
Michael Ellerman13fef7f2017-08-08 16:39:17 +10001952#endif /* CONFIG_PPC_47x */
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001953 { /* default match */
1954 .pvr_mask = 0x00000000,
1955 .pvr_value = 0x00000000,
1956 .cpu_name = "(generic 44x PPC)",
1957 .cpu_features = CPU_FTRS_44X,
1958 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001959 .mmu_features = MMU_FTR_TYPE_44x,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001960 .icache_bsize = 32,
1961 .dcache_bsize = 32,
1962 .machine_check = machine_check_4xx,
1963 .platform = "ppc440",
1964 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001965#endif /* CONFIG_44x */
Josh Boyere3e414b2007-12-24 08:44:47 -06001966#ifdef CONFIG_E200
Stephen Rothwell49209602005-10-12 15:55:09 +10001967 { /* e200z5 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001968 .pvr_mask = 0xfff00000,
1969 .pvr_value = 0x81000000,
1970 .cpu_name = "e200z5",
1971 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001972 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001973 .cpu_user_features = COMMON_USER_BOOKE |
1974 PPC_FEATURE_HAS_EFP_SINGLE |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001975 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001976 .mmu_features = MMU_FTR_TYPE_FSL_E,
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001977 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001978 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001979 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001980 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001981 { /* e200z6 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001982 .pvr_mask = 0xfff00000,
1983 .pvr_value = 0x81100000,
1984 .cpu_name = "e200z6",
1985 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001986 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001987 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001988 PPC_FEATURE_HAS_SPE_COMP |
1989 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001990 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001991 .mmu_features = MMU_FTR_TYPE_FSL_E,
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001992 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001993 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001994 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001995 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001996 { /* default match */
1997 .pvr_mask = 0x00000000,
1998 .pvr_value = 0x00000000,
1999 .cpu_name = "(generic E200 PPC)",
2000 .cpu_features = CPU_FTRS_E200,
2001 .cpu_user_features = COMMON_USER_BOOKE |
2002 PPC_FEATURE_HAS_EFP_SINGLE |
2003 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00002004 .mmu_features = MMU_FTR_TYPE_FSL_E,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002005 .dcache_bsize = 32,
Kumar Gala105c31d2009-01-08 08:31:20 -06002006 .cpu_setup = __setup_cpu_e200,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002007 .machine_check = machine_check_e200,
2008 .platform = "ppc5554",
Paul Mackerras516c8be2008-05-12 14:20:35 +10002009 }
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002010#endif /* CONFIG_E200 */
Kumar Gala4490c062010-10-08 08:32:11 -05002011#endif /* CONFIG_PPC32 */
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002012#ifdef CONFIG_E500
Kumar Gala4490c062010-10-08 08:32:11 -05002013#ifdef CONFIG_PPC32
Mihai Caraman3477e712014-08-20 16:09:03 +03002014#ifndef CONFIG_PPC_E500MC
Stephen Rothwell49209602005-10-12 15:55:09 +10002015 { /* e500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002016 .pvr_mask = 0xffff0000,
2017 .pvr_value = 0x80200000,
2018 .cpu_name = "e500",
Kumar Gala10b35d92005-09-23 14:08:58 -05002019 .cpu_features = CPU_FTRS_E500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002020 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05002021 PPC_FEATURE_HAS_SPE_COMP |
2022 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Nishanth Aravamudan6c1bf482013-05-04 16:01:17 +00002023 .cpu_user_features2 = PPC_FEATURE2_ISEL,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00002024 .mmu_features = MMU_FTR_TYPE_FSL_E,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002025 .icache_bsize = 32,
2026 .dcache_bsize = 32,
2027 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06002028 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06002029 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06002030 .cpu_setup = __setup_cpu_e500v1,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11002031 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002032 .platform = "ppc8540",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002033 },
Stephen Rothwell49209602005-10-12 15:55:09 +10002034 { /* e500v2 */
Kumar Gala5b37b702005-06-21 17:15:18 -07002035 .pvr_mask = 0xffff0000,
2036 .pvr_value = 0x80210000,
2037 .cpu_name = "e500v2",
Kumar Gala10b35d92005-09-23 14:08:58 -05002038 .cpu_features = CPU_FTRS_E500_2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002039 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05002040 PPC_FEATURE_HAS_SPE_COMP |
2041 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
2042 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
Nishanth Aravamudan6c1bf482013-05-04 16:01:17 +00002043 .cpu_user_features2 = PPC_FEATURE2_ISEL,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00002044 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS,
Kumar Gala5b37b702005-06-21 17:15:18 -07002045 .icache_bsize = 32,
2046 .dcache_bsize = 32,
2047 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06002048 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06002049 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06002050 .cpu_setup = __setup_cpu_e500v2,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11002051 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002052 .platform = "ppc8548",
chenhui zhaoe7affb12015-11-20 17:13:58 +08002053 .cpu_down_flush = cpu_down_flush_e500v2,
Kumar Gala5b37b702005-06-21 17:15:18 -07002054 },
Mihai Caraman3477e712014-08-20 16:09:03 +03002055#else
Kumar Gala3dfa8772008-06-16 09:41:32 -05002056 { /* e500mc */
2057 .pvr_mask = 0xffff0000,
2058 .pvr_value = 0x80230000,
2059 .cpu_name = "e500mc",
Kumar Gala3dfa8772008-06-16 09:41:32 -05002060 .cpu_features = CPU_FTRS_E500MC,
2061 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Nishanth Aravamudan6c1bf482013-05-04 16:01:17 +00002062 .cpu_user_features2 = PPC_FEATURE2_ISEL,
Kumar Galac3071952009-02-10 22:26:06 -06002063 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
Kumar Gala323d23a2009-04-23 08:51:22 -05002064 MMU_FTR_USE_TLBILX,
Kumar Gala3dfa8772008-06-16 09:41:32 -05002065 .icache_bsize = 64,
2066 .dcache_bsize = 64,
2067 .num_pmcs = 4,
Scott Wooda11106542010-02-25 18:09:45 -06002068 .oprofile_cpu_type = "ppc/e500mc",
Kumar Gala3dfa8772008-06-16 09:41:32 -05002069 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06002070 .cpu_setup = __setup_cpu_e500mc,
Scott Woodfe04b112010-04-08 00:38:22 -05002071 .machine_check = machine_check_e500mc,
Kumar Gala3dfa8772008-06-16 09:41:32 -05002072 .platform = "ppce500mc",
chenhui zhaoe7affb12015-11-20 17:13:58 +08002073 .cpu_down_flush = cpu_down_flush_e500mc,
Kumar Gala3dfa8772008-06-16 09:41:32 -05002074 },
Mihai Caraman3477e712014-08-20 16:09:03 +03002075#endif /* CONFIG_PPC_E500MC */
Kumar Gala4490c062010-10-08 08:32:11 -05002076#endif /* CONFIG_PPC32 */
Mihai Caraman3477e712014-08-20 16:09:03 +03002077#ifdef CONFIG_PPC_E500MC
Kumar Gala4490c062010-10-08 08:32:11 -05002078 { /* e5500 */
2079 .pvr_mask = 0xffff0000,
2080 .pvr_value = 0x80240000,
2081 .cpu_name = "e5500",
Kumar Gala11ed0db2011-04-06 00:11:06 -05002082 .cpu_features = CPU_FTRS_E5500,
Kumar Galafb9be232011-06-02 11:26:13 -05002083 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Nishanth Aravamudan6c1bf482013-05-04 16:01:17 +00002084 .cpu_user_features2 = PPC_FEATURE2_ISEL,
Kumar Gala4490c062010-10-08 08:32:11 -05002085 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
2086 MMU_FTR_USE_TLBILX,
2087 .icache_bsize = 64,
2088 .dcache_bsize = 64,
2089 .num_pmcs = 4,
2090 .oprofile_cpu_type = "ppc/e500mc",
2091 .oprofile_type = PPC_OPROFILE_FSL_EMB,
2092 .cpu_setup = __setup_cpu_e5500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05302093#ifndef CONFIG_PPC32
Kumar Gala4490c062010-10-08 08:32:11 -05002094 .cpu_restore = __restore_cpu_e5500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05302095#endif
Kumar Gala4490c062010-10-08 08:32:11 -05002096 .machine_check = machine_check_e500mc,
2097 .platform = "ppce5500",
chenhui zhaoe7affb12015-11-20 17:13:58 +08002098 .cpu_down_flush = cpu_down_flush_e5500,
Kumar Gala4490c062010-10-08 08:32:11 -05002099 },
Kumar Gala10241842011-11-06 11:51:07 -06002100 { /* e6500 */
2101 .pvr_mask = 0xffff0000,
2102 .pvr_value = 0x80400000,
2103 .cpu_name = "e6500",
2104 .cpu_features = CPU_FTRS_E6500,
Kumar Galacd66cc22012-09-07 15:57:17 -05002105 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU |
2106 PPC_FEATURE_HAS_ALTIVEC_COMP,
Nishanth Aravamudan6c1bf482013-05-04 16:01:17 +00002107 .cpu_user_features2 = PPC_FEATURE2_ISEL,
Kumar Gala10241842011-11-06 11:51:07 -06002108 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
2109 MMU_FTR_USE_TLBILX,
2110 .icache_bsize = 64,
2111 .dcache_bsize = 64,
Lijun Pan5815c432013-06-05 15:22:09 -05002112 .num_pmcs = 6,
Kumar Gala10241842011-11-06 11:51:07 -06002113 .oprofile_cpu_type = "ppc/e6500",
2114 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Galacd66cc22012-09-07 15:57:17 -05002115 .cpu_setup = __setup_cpu_e6500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05302116#ifndef CONFIG_PPC32
Kumar Galacd66cc22012-09-07 15:57:17 -05002117 .cpu_restore = __restore_cpu_e6500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05302118#endif
Kumar Gala10241842011-11-06 11:51:07 -06002119 .machine_check = machine_check_e500mc,
2120 .platform = "ppce6500",
chenhui zhaoe7affb12015-11-20 17:13:58 +08002121 .cpu_down_flush = cpu_down_flush_e6500,
Kumar Gala10241842011-11-06 11:51:07 -06002122 },
Mihai Caraman3477e712014-08-20 16:09:03 +03002123#endif /* CONFIG_PPC_E500MC */
Kumar Gala4490c062010-10-08 08:32:11 -05002124#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -07002125 { /* default match */
2126 .pvr_mask = 0x00000000,
2127 .pvr_value = 0x00000000,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002128 .cpu_name = "(generic E500 PPC)",
2129 .cpu_features = CPU_FTRS_E500,
2130 .cpu_user_features = COMMON_USER_BOOKE |
2131 PPC_FEATURE_HAS_SPE_COMP |
2132 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00002133 .mmu_features = MMU_FTR_TYPE_FSL_E,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002134 .icache_bsize = 32,
2135 .dcache_bsize = 32,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002136 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002137 .platform = "powerpc",
Paul Mackerras516c8be2008-05-12 14:20:35 +10002138 }
Stephen Rothwell49209602005-10-12 15:55:09 +10002139#endif /* CONFIG_PPC32 */
Kumar Gala4490c062010-10-08 08:32:11 -05002140#endif /* CONFIG_E500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002141};
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002142
Nicholas Piggin5a61ef72017-05-09 13:16:52 +10002143void __init set_cur_cpu_spec(struct cpu_spec *s)
2144{
2145 struct cpu_spec *t = &the_cpu_spec;
2146
2147 t = PTRRELOC(t);
Christophe Leroyadcf5912019-04-26 16:23:29 +00002148 /*
2149 * use memcpy() instead of *t = *s so that GCC replaces it
2150 * by __memcpy() when KASAN is active
2151 */
2152 memcpy(t, s, sizeof(*t));
Nicholas Piggin5a61ef72017-05-09 13:16:52 +10002153
2154 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
2155}
Paul Mackerras87a72f92007-10-04 14:18:01 +10002156
Scott Wood26ee9762011-07-25 11:04:36 +00002157static struct cpu_spec * __init setup_cpu_spec(unsigned long offset,
2158 struct cpu_spec *s)
Michael Ellerman666435b2009-02-22 16:25:43 +00002159{
2160 struct cpu_spec *t = &the_cpu_spec;
Michael Ellerman2657dd42009-02-22 16:25:45 +00002161 struct cpu_spec old;
2162
Michael Ellerman666435b2009-02-22 16:25:43 +00002163 t = PTRRELOC(t);
Michael Ellerman2657dd42009-02-22 16:25:45 +00002164 old = *t;
2165
Christophe Leroyadcf5912019-04-26 16:23:29 +00002166 /*
2167 * Copy everything, then do fixups. Use memcpy() instead of *t = *s
2168 * so that GCC replaces it by __memcpy() when KASAN is active
2169 */
2170 memcpy(t, s, sizeof(*t));
Michael Ellerman666435b2009-02-22 16:25:43 +00002171
2172 /*
2173 * If we are overriding a previous value derived from the real
2174 * PVR with a new value obtained using a logical PVR value,
2175 * don't modify the performance monitor fields.
2176 */
Michael Ellerman2657dd42009-02-22 16:25:45 +00002177 if (old.num_pmcs && !s->num_pmcs) {
2178 t->num_pmcs = old.num_pmcs;
2179 t->pmc_type = old.pmc_type;
2180 t->oprofile_type = old.oprofile_type;
2181 t->oprofile_mmcra_sihv = old.oprofile_mmcra_sihv;
2182 t->oprofile_mmcra_sipr = old.oprofile_mmcra_sipr;
2183 t->oprofile_mmcra_clear = old.oprofile_mmcra_clear;
2184
Michael Ellerman666435b2009-02-22 16:25:43 +00002185 /*
2186 * If we have passed through this logic once before and
2187 * have pulled the default case because the real PVR was
2188 * not found inside cpu_specs[], then we are possibly
2189 * running in compatibility mode. In that case, let the
2190 * oprofiler know which set of compatibility counters to
2191 * pull from by making sure the oprofile_cpu_type string
2192 * is set to that of compatibility mode. If the
2193 * oprofile_cpu_type already has a value, then we are
2194 * possibly overriding a real PVR with a logical one,
2195 * and, in that case, keep the current value for
2196 * oprofile_cpu_type.
2197 */
Benjamin Herrenschmidtb173f032009-05-14 18:34:06 +00002198 if (old.oprofile_cpu_type != NULL) {
Benjamin Herrenschmidt0203d6e2009-04-29 19:39:38 +00002199 t->oprofile_cpu_type = old.oprofile_cpu_type;
2200 t->oprofile_type = old.oprofile_type;
Michael Wolf79af6c42009-04-27 06:17:54 +00002201 }
Michael Ellerman2657dd42009-02-22 16:25:45 +00002202 }
Michael Ellerman666435b2009-02-22 16:25:43 +00002203
2204 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
2205
2206 /*
2207 * Set the base platform string once; assumes
2208 * we're called with real pvr first.
2209 */
2210 if (*PTRRELOC(&powerpc_base_platform) == NULL)
2211 *PTRRELOC(&powerpc_base_platform) = t->platform;
2212
2213#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
2214 /* ppc64 and booke expect identify_cpu to also call setup_cpu for
2215 * that processor. I will consolidate that at a later time, for now,
2216 * just use #ifdef. We also don't need to PTRRELOC the function
2217 * pointer on ppc64 and booke as we are running at 0 in real mode
2218 * on ppc64 and reloc_offset is always 0 on booke.
2219 */
Benjamin Herrenschmidtaf9eef32011-01-20 20:36:03 +00002220 if (t->cpu_setup) {
2221 t->cpu_setup(offset, t);
Michael Ellerman666435b2009-02-22 16:25:43 +00002222 }
2223#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
Scott Wood26ee9762011-07-25 11:04:36 +00002224
2225 return t;
Michael Ellerman666435b2009-02-22 16:25:43 +00002226}
2227
Paul Mackerras87a72f92007-10-04 14:18:01 +10002228struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002229{
2230 struct cpu_spec *s = cpu_specs;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002231 int i;
2232
2233 s = PTRRELOC(s);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002234
Michael Ellerman666435b2009-02-22 16:25:43 +00002235 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) {
Scott Wood26ee9762011-07-25 11:04:36 +00002236 if ((pvr & s->pvr_mask) == s->pvr_value)
2237 return setup_cpu_spec(offset, s);
Michael Ellerman666435b2009-02-22 16:25:43 +00002238 }
2239
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002240 BUG();
Michael Ellerman666435b2009-02-22 16:25:43 +00002241
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002242 return NULL;
2243}
Kevin Hao4db73272016-07-23 14:42:41 +05302244
Nicholas Piggin5a61ef72017-05-09 13:16:52 +10002245/*
2246 * Used by cpufeatures to get the name for CPUs with a PVR table.
2247 * If they don't hae a PVR table, cpufeatures gets the name from
2248 * cpu device-tree node.
2249 */
2250void __init identify_cpu_name(unsigned int pvr)
2251{
2252 struct cpu_spec *s = cpu_specs;
2253 struct cpu_spec *t = &the_cpu_spec;
2254 int i;
2255
2256 s = PTRRELOC(s);
2257 t = PTRRELOC(t);
2258
2259 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) {
2260 if ((pvr & s->pvr_mask) == s->pvr_value) {
2261 t->cpu_name = s->cpu_name;
2262 return;
2263 }
2264 }
2265}
2266
2267
Kevin Hao4db73272016-07-23 14:42:41 +05302268#ifdef CONFIG_JUMP_LABEL_FEATURE_CHECKS
2269struct static_key_true cpu_feature_keys[NUM_CPU_FTR_KEYS] = {
2270 [0 ... NUM_CPU_FTR_KEYS - 1] = STATIC_KEY_TRUE_INIT
2271};
2272EXPORT_SYMBOL_GPL(cpu_feature_keys);
2273
2274void __init cpu_feature_keys_init(void)
2275{
2276 int i;
2277
2278 for (i = 0; i < NUM_CPU_FTR_KEYS; i++) {
2279 unsigned long f = 1ul << i;
2280
2281 if (!(cur_cpu_spec->cpu_features & f))
2282 static_branch_disable(&cpu_feature_keys[i]);
2283 }
2284}
Kevin Haoc12e6f22016-07-23 14:42:42 +05302285
2286struct static_key_true mmu_feature_keys[NUM_MMU_FTR_KEYS] = {
2287 [0 ... NUM_MMU_FTR_KEYS - 1] = STATIC_KEY_TRUE_INIT
2288};
2289EXPORT_SYMBOL_GPL(mmu_feature_keys);
2290
2291void __init mmu_feature_keys_init(void)
2292{
2293 int i;
2294
2295 for (i = 0; i < NUM_MMU_FTR_KEYS; i++) {
2296 unsigned long f = 1ul << i;
2297
2298 if (!(cur_cpu_spec->mmu_features & f))
2299 static_branch_disable(&mmu_feature_keys[i]);
2300 }
2301}
Kevin Hao4db73272016-07-23 14:42:41 +05302302#endif