blob: c8fc9691f8c7e02b26264e701f21fc5d64a56df2 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Linus Torvalds1da177e2005-04-16 15:20:36 -07002 * Copyright (C) 2001 Ben. Herrenschmidt (benh@kernel.crashing.org)
3 *
Stephen Rothwell49209602005-10-12 15:55:09 +10004 * Modifications for ppc64:
5 * Copyright (C) 2003 Dave Engebretsen <engebret@us.ibm.com>
6 *
Linus Torvalds1da177e2005-04-16 15:20:36 -07007 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version
10 * 2 of the License, or (at your option) any later version.
11 */
12
Linus Torvalds1da177e2005-04-16 15:20:36 -070013#include <linux/string.h>
14#include <linux/sched.h>
15#include <linux/threads.h>
16#include <linux/init.h>
Paul Gortmaker4b16f8e2011-07-22 18:24:23 -040017#include <linux/export.h>
Kevin Hao4db73272016-07-23 14:42:41 +053018#include <linux/jump_label.h>
Kumar Gala400d2212005-09-27 15:13:12 -050019
20#include <asm/oprofile_impl.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070021#include <asm/cputable.h>
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +100022#include <asm/prom.h> /* for PTRRELOC on ARCH=ppc */
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +000023#include <asm/mmu.h>
David Howellsae3a1972012-03-28 18:30:02 +010024#include <asm/setup.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070025
Nicholas Piggin5a61ef72017-05-09 13:16:52 +100026static struct cpu_spec the_cpu_spec __read_mostly;
27
28struct cpu_spec* cur_cpu_spec __read_mostly = NULL;
Stephen Rothwell49209602005-10-12 15:55:09 +100029EXPORT_SYMBOL(cur_cpu_spec);
Linus Torvalds1da177e2005-04-16 15:20:36 -070030
Nathan Lynch9115d132008-07-16 09:58:51 +100031/* The platform string corresponding to the real PVR */
32const char *powerpc_base_platform;
33
Stephen Rothwell49209602005-10-12 15:55:09 +100034/* NOTE:
35 * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's
36 * the responsibility of the appropriate CPU save/restore functions to
37 * eventually copy these settings over. Those save/restore aren't yet
38 * part of the cputable though. That has to be fixed for both ppc32
39 * and ppc64
40 */
Geoff Levandb26f1002006-05-19 14:24:18 +100041#ifdef CONFIG_PPC32
Kumar Gala105c31d2009-01-08 08:31:20 -060042extern void __setup_cpu_e200(unsigned long offset, struct cpu_spec* spec);
43extern void __setup_cpu_e500v1(unsigned long offset, struct cpu_spec* spec);
44extern void __setup_cpu_e500v2(unsigned long offset, struct cpu_spec* spec);
45extern void __setup_cpu_e500mc(unsigned long offset, struct cpu_spec* spec);
Valentine Barshak81127532007-09-22 00:46:57 +100046extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
47extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110048extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
Valentine Barshak340ffd22007-09-22 00:50:09 +100049extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110050extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
Grant Likely640d17d2008-12-04 05:39:55 +000051extern void __setup_cpu_440x5(unsigned long offset, struct cpu_spec* spec);
Stefan Roese464076a2008-02-24 08:07:41 +110052extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec);
Josh Boyer939e6222008-06-11 07:52:40 -040053extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec);
Madhulika Madishetty6c712092009-02-05 13:31:36 +000054extern void __setup_cpu_460sx(unsigned long offset, struct cpu_spec *spec);
Tirumala Marri6edc3232010-09-13 13:26:11 +000055extern void __setup_cpu_apm821xx(unsigned long offset, struct cpu_spec *spec);
Kumar Gala400d2212005-09-27 15:13:12 -050056extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
57extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
58extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
59extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
60extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
61extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
62extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
63extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell49209602005-10-12 15:55:09 +100064#endif /* CONFIG_PPC32 */
Olof Johanssonf39b7a52006-08-11 00:07:08 -050065#ifdef CONFIG_PPC64
Kumar Gala400d2212005-09-27 15:13:12 -050066extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
Olof Johansson5b43d202006-10-04 23:41:41 -050067extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
Olof Johansson11999192007-02-04 16:36:51 -060068extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell40d244d2007-02-12 22:10:48 +110069extern void __restore_cpu_pa6t(void);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050070extern void __restore_cpu_ppc970(void);
Michael Neulinge952e6c2008-06-18 10:47:26 +100071extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec);
72extern void __restore_cpu_power7(void);
Michael Neulingaec937b2012-10-30 19:34:14 +000073extern void __setup_cpu_power8(unsigned long offset, struct cpu_spec* spec);
74extern void __restore_cpu_power8(void);
Michael Neulingc3ab3002016-02-19 11:16:24 +110075extern void __setup_cpu_power9(unsigned long offset, struct cpu_spec* spec);
76extern void __restore_cpu_power9(void);
Mahesh Salgaonkare22a2272013-10-30 20:05:11 +053077extern long __machine_check_early_realmode_p7(struct pt_regs *regs);
Mahesh Salgaonkarae744f32013-10-30 20:05:26 +053078extern long __machine_check_early_realmode_p8(struct pt_regs *regs);
Nicholas Piggin7b9f71f92017-02-28 12:00:48 +100079extern long __machine_check_early_realmode_p9(struct pt_regs *regs);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050080#endif /* CONFIG_PPC64 */
Kumar Gala4490c062010-10-08 08:32:11 -050081#if defined(CONFIG_E500)
82extern void __setup_cpu_e5500(unsigned long offset, struct cpu_spec* spec);
Kumar Galacd66cc22012-09-07 15:57:17 -050083extern void __setup_cpu_e6500(unsigned long offset, struct cpu_spec* spec);
Kumar Gala4490c062010-10-08 08:32:11 -050084extern void __restore_cpu_e5500(void);
Kumar Galacd66cc22012-09-07 15:57:17 -050085extern void __restore_cpu_e6500(void);
Kumar Gala4490c062010-10-08 08:32:11 -050086#endif /* CONFIG_E500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070087
Linus Torvalds1da177e2005-04-16 15:20:36 -070088/* This table only contains "desktop" CPUs, it need to be filled with embedded
89 * ones as well...
90 */
Stephen Rothwell49209602005-10-12 15:55:09 +100091#define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
92 PPC_FEATURE_HAS_MMU)
93#define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +110094#define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
Benjamin Herrenschmidtaa5cb0212006-03-01 15:07:07 +110095#define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
96 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
97#define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
98 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
Anton Blanchard03054d52006-04-29 09:51:06 +100099#define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000100 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)
Michael Neulinge952e6c2008-06-18 10:47:26 +1000103#define COMMON_USER_POWER7 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
104 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
Nathan Lynch0f473312008-07-10 01:06:57 +1000105 PPC_FEATURE_TRUE_LE | \
106 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Nishanth Aravamudan4a1ae4f2013-05-03 14:48:38 +0000107#define COMMON_USER2_POWER7 (PPC_FEATURE2_DSCR)
Michael Neuling71e18492012-10-30 19:34:15 +0000108#define COMMON_USER_POWER8 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
109 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
110 PPC_FEATURE_TRUE_LE | \
111 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Nishanth Aravamudan748645b2013-05-03 14:49:59 +0000112#define COMMON_USER2_POWER8 (PPC_FEATURE2_ARCH_2_07 | \
Sam bobroffb4b56f92015-06-12 11:06:32 +1000113 PPC_FEATURE2_HTM_COMP | \
114 PPC_FEATURE2_HTM_NOSC_COMP | \
115 PPC_FEATURE2_DSCR | \
Benjamin Herrenschmidtdd58a092014-06-10 15:04:40 +1000116 PPC_FEATURE2_ISEL | PPC_FEATURE2_TAR | \
117 PPC_FEATURE2_VEC_CRYPTO)
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500118#define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
119 PPC_FEATURE_TRUE_LE | \
120 PPC_FEATURE_HAS_ALTIVEC_COMP)
Michael Neulingc3ab3002016-02-19 11:16:24 +1100121#define COMMON_USER_POWER9 COMMON_USER_POWER8
122#define COMMON_USER2_POWER9 (COMMON_USER2_POWER8 | \
123 PPC_FEATURE2_ARCH_3_00 | \
Nicholas Piggina4700a22017-05-20 14:29:49 +1000124 PPC_FEATURE2_HAS_IEEE128 | \
125 PPC_FEATURE2_DARN )
Michael Neulingc3ab3002016-02-19 11:16:24 +1100126
Kumar Galaf45c4482009-08-18 19:08:30 +0000127#ifdef CONFIG_PPC_BOOK3E_64
128#define COMMON_USER_BOOKE (COMMON_USER_PPC64 | PPC_FEATURE_BOOKE)
129#else
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100130#define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
131 PPC_FEATURE_BOOKE)
Kumar Galaf45c4482009-08-18 19:08:30 +0000132#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -0700133
Paul Mackerras87a72f92007-10-04 14:18:01 +1000134static struct cpu_spec __initdata cpu_specs[] = {
Benjamin Herrenschmidt2d27cfd2009-07-23 23:15:59 +0000135#ifdef CONFIG_PPC_BOOK3S_64
Stephen Rothwell49209602005-10-12 15:55:09 +1000136 { /* PPC970 */
137 .pvr_mask = 0xffff0000,
138 .pvr_value = 0x00390000,
139 .cpu_name = "PPC970",
140 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100141 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000142 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000143 .mmu_features = MMU_FTRS_PPC970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000144 .icache_bsize = 128,
145 .dcache_bsize = 128,
146 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600147 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000148 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500149 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000150 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000151 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100152 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000153 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000154 { /* PPC970FX */
155 .pvr_mask = 0xffff0000,
156 .pvr_value = 0x003c0000,
157 .cpu_name = "PPC970FX",
Stephen Rothwell49209602005-10-12 15:55:09 +1000158 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100159 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000160 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000161 .mmu_features = MMU_FTRS_PPC970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000162 .icache_bsize = 128,
163 .dcache_bsize = 128,
164 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600165 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000166 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500167 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000168 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000169 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100170 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000171 },
Olof Johansson3546e812007-02-26 00:35:14 -0600172 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
173 .pvr_mask = 0xffffffff,
174 .pvr_value = 0x00440100,
175 .cpu_name = "PPC970MP",
176 .cpu_features = CPU_FTRS_PPC970,
177 .cpu_user_features = COMMON_USER_POWER4 |
178 PPC_FEATURE_HAS_ALTIVEC_COMP,
Benjamin Herrenschmidtd63ac5f2013-03-13 09:55:02 +1100179 .mmu_features = MMU_FTRS_PPC970,
Olof Johansson3546e812007-02-26 00:35:14 -0600180 .icache_bsize = 128,
181 .dcache_bsize = 128,
182 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000183 .pmc_type = PPC_PMC_IBM,
Olof Johansson3546e812007-02-26 00:35:14 -0600184 .cpu_setup = __setup_cpu_ppc970,
185 .cpu_restore = __restore_cpu_ppc970,
186 .oprofile_cpu_type = "ppc64/970MP",
187 .oprofile_type = PPC_OPROFILE_POWER4,
188 .platform = "ppc970",
189 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000190 { /* PPC970MP */
191 .pvr_mask = 0xffff0000,
192 .pvr_value = 0x00440000,
193 .cpu_name = "PPC970MP",
194 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100195 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000196 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000197 .mmu_features = MMU_FTRS_PPC970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000198 .icache_bsize = 128,
199 .dcache_bsize = 128,
Anton Blanchard87af41b2006-05-05 05:44:26 +1000200 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000201 .pmc_type = PPC_PMC_IBM,
Olof Johansson5b43d202006-10-04 23:41:41 -0500202 .cpu_setup = __setup_cpu_ppc970MP,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500203 .cpu_restore = __restore_cpu_ppc970,
Mike Wolffecb3522006-11-21 14:41:54 -0600204 .oprofile_cpu_type = "ppc64/970MP",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000205 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100206 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000207 },
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500208 { /* PPC970GX */
209 .pvr_mask = 0xffff0000,
210 .pvr_value = 0x00450000,
211 .cpu_name = "PPC970GX",
212 .cpu_features = CPU_FTRS_PPC970,
213 .cpu_user_features = COMMON_USER_POWER4 |
214 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000215 .mmu_features = MMU_FTRS_PPC970,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500216 .icache_bsize = 128,
217 .dcache_bsize = 128,
218 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600219 .pmc_type = PPC_PMC_IBM,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500220 .cpu_setup = __setup_cpu_ppc970,
221 .oprofile_cpu_type = "ppc64/970",
222 .oprofile_type = PPC_OPROFILE_POWER4,
223 .platform = "ppc970",
224 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100225 { /* Power5 GR */
Stephen Rothwell49209602005-10-12 15:55:09 +1000226 .pvr_mask = 0xffff0000,
227 .pvr_value = 0x003a0000,
228 .cpu_name = "POWER5 (gr)",
229 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100230 .cpu_user_features = COMMON_USER_POWER5,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000231 .mmu_features = MMU_FTRS_POWER5,
Stephen Rothwell49209602005-10-12 15:55:09 +1000232 .icache_bsize = 128,
233 .dcache_bsize = 128,
234 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600235 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000236 .oprofile_cpu_type = "ppc64/power5",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000237 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000238 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
239 * and above but only works on POWER5 and above
240 */
241 .oprofile_mmcra_sihv = MMCRA_SIHV,
242 .oprofile_mmcra_sipr = MMCRA_SIPR,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100243 .platform = "power5",
Stephen Rothwell49209602005-10-12 15:55:09 +1000244 },
Mike Wolf31a12ce2007-07-10 13:13:47 -0500245 { /* Power5++ */
246 .pvr_mask = 0xffffff00,
247 .pvr_value = 0x003b0300,
248 .cpu_name = "POWER5+ (gs)",
249 .cpu_features = CPU_FTRS_POWER5,
250 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000251 .mmu_features = MMU_FTRS_POWER5,
Mike Wolf31a12ce2007-07-10 13:13:47 -0500252 .icache_bsize = 128,
253 .dcache_bsize = 128,
254 .num_pmcs = 6,
255 .oprofile_cpu_type = "ppc64/power5++",
256 .oprofile_type = PPC_OPROFILE_POWER4,
257 .oprofile_mmcra_sihv = MMCRA_SIHV,
258 .oprofile_mmcra_sipr = MMCRA_SIPR,
259 .platform = "power5+",
260 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100261 { /* Power5 GS */
Stephen Rothwell49209602005-10-12 15:55:09 +1000262 .pvr_mask = 0xffff0000,
263 .pvr_value = 0x003b0000,
Anton Blanchard834608f2006-01-09 15:42:30 +1100264 .cpu_name = "POWER5+ (gs)",
Stephen Rothwell49209602005-10-12 15:55:09 +1000265 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100266 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000267 .mmu_features = MMU_FTRS_POWER5,
Stephen Rothwell49209602005-10-12 15:55:09 +1000268 .icache_bsize = 128,
269 .dcache_bsize = 128,
270 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600271 .pmc_type = PPC_PMC_IBM,
Anton Blanchard834608f2006-01-09 15:42:30 +1100272 .oprofile_cpu_type = "ppc64/power5+",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000273 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000274 .oprofile_mmcra_sihv = MMCRA_SIHV,
275 .oprofile_mmcra_sipr = MMCRA_SIPR,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100276 .platform = "power5+",
Stephen Rothwell49209602005-10-12 15:55:09 +1000277 },
Paul Mackerras974a76f2006-11-10 20:38:53 +1100278 { /* POWER6 in P5+ mode; 2.04-compliant processor */
279 .pvr_mask = 0xffffffff,
280 .pvr_value = 0x0f000001,
281 .cpu_name = "POWER5+",
282 .cpu_features = CPU_FTRS_POWER5,
283 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000284 .mmu_features = MMU_FTRS_POWER5,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100285 .icache_bsize = 128,
286 .dcache_bsize = 128,
Michael Wolf79af6c42009-04-27 06:17:54 +0000287 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
288 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100289 .platform = "power5+",
290 },
Anton Blanchard03054d52006-04-29 09:51:06 +1000291 { /* Power6 */
292 .pvr_mask = 0xffff0000,
293 .pvr_value = 0x003e0000,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100294 .cpu_name = "POWER6 (raw)",
295 .cpu_features = CPU_FTRS_POWER6,
296 .cpu_user_features = COMMON_USER_POWER6 |
297 PPC_FEATURE_POWER6_EXT,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000298 .mmu_features = MMU_FTRS_POWER6,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100299 .icache_bsize = 128,
300 .dcache_bsize = 128,
301 .num_pmcs = 6,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000302 .pmc_type = PPC_PMC_IBM,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100303 .oprofile_cpu_type = "ppc64/power6",
304 .oprofile_type = PPC_OPROFILE_POWER4,
305 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
306 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
307 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
308 POWER6_MMCRA_OTHER,
309 .platform = "power6x",
310 },
311 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
312 .pvr_mask = 0xffffffff,
313 .pvr_value = 0x0f000002,
314 .cpu_name = "POWER6 (architected)",
Anton Blanchard03054d52006-04-29 09:51:06 +1000315 .cpu_features = CPU_FTRS_POWER6,
316 .cpu_user_features = COMMON_USER_POWER6,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000317 .mmu_features = MMU_FTRS_POWER6,
Anton Blanchard03054d52006-04-29 09:51:06 +1000318 .icache_bsize = 128,
319 .dcache_bsize = 128,
Michael Wolf79af6c42009-04-27 06:17:54 +0000320 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
321 .oprofile_type = PPC_OPROFILE_POWER4,
Anton Blanchard03054d52006-04-29 09:51:06 +1000322 .platform = "power6",
323 },
Joel Schopp635f5a62008-06-19 06:18:21 +1000324 { /* 2.06-compliant processor, i.e. Power7 "architected" mode */
325 .pvr_mask = 0xffffffff,
326 .pvr_value = 0x0f000003,
327 .cpu_name = "POWER7 (architected)",
328 .cpu_features = CPU_FTRS_POWER7,
329 .cpu_user_features = COMMON_USER_POWER7,
Nishanth Aravamudan4a1ae4f2013-05-03 14:48:38 +0000330 .cpu_user_features2 = COMMON_USER2_POWER7,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000331 .mmu_features = MMU_FTRS_POWER7,
Joel Schopp635f5a62008-06-19 06:18:21 +1000332 .icache_bsize = 128,
333 .dcache_bsize = 128,
Michael Wolf79af6c42009-04-27 06:17:54 +0000334 .oprofile_type = PPC_OPROFILE_POWER4,
335 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
Benjamin Herrenschmidt24cc67d2011-01-20 18:50:55 +1100336 .cpu_setup = __setup_cpu_power7,
337 .cpu_restore = __restore_cpu_power7,
Mahesh Salgaonkare22a2272013-10-30 20:05:11 +0530338 .machine_check_early = __machine_check_early_realmode_p7,
Joel Schopp635f5a62008-06-19 06:18:21 +1000339 .platform = "power7",
340 },
Michael Neulingc674e702012-11-08 20:26:42 +0000341 { /* 2.07-compliant processor, i.e. Power8 "architected" mode */
342 .pvr_mask = 0xffffffff,
343 .pvr_value = 0x0f000004,
344 .cpu_name = "POWER8 (architected)",
345 .cpu_features = CPU_FTRS_POWER8,
346 .cpu_user_features = COMMON_USER_POWER8,
Nishanth Aravamudan748645b2013-05-03 14:49:59 +0000347 .cpu_user_features2 = COMMON_USER2_POWER8,
Michael Neulingc674e702012-11-08 20:26:42 +0000348 .mmu_features = MMU_FTRS_POWER8,
349 .icache_bsize = 128,
350 .dcache_bsize = 128,
Michael Neuling6a60f9e72013-06-04 19:38:54 +0000351 .oprofile_type = PPC_OPROFILE_INVALID,
352 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
Michael Neulingc674e702012-11-08 20:26:42 +0000353 .cpu_setup = __setup_cpu_power8,
354 .cpu_restore = __restore_cpu_power8,
Mahesh Salgaonkarae744f32013-10-30 20:05:26 +0530355 .machine_check_early = __machine_check_early_realmode_p8,
Michael Neulingc674e702012-11-08 20:26:42 +0000356 .platform = "power8",
357 },
Russell Currey6ae3f8a2017-02-17 13:01:35 +1100358 { /* 3.00-compliant processor, i.e. Power9 "architected" mode */
359 .pvr_mask = 0xffffffff,
360 .pvr_value = 0x0f000005,
361 .cpu_name = "POWER9 (architected)",
362 .cpu_features = CPU_FTRS_POWER9,
363 .cpu_user_features = COMMON_USER_POWER9,
364 .cpu_user_features2 = COMMON_USER2_POWER9,
365 .mmu_features = MMU_FTRS_POWER9,
366 .icache_bsize = 128,
367 .dcache_bsize = 128,
368 .oprofile_type = PPC_OPROFILE_INVALID,
369 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
370 .cpu_setup = __setup_cpu_power9,
371 .cpu_restore = __restore_cpu_power9,
Russell Currey6ae3f8a2017-02-17 13:01:35 +1100372 .platform = "power9",
373 },
Michael Neulinge952e6c2008-06-18 10:47:26 +1000374 { /* Power7 */
375 .pvr_mask = 0xffff0000,
376 .pvr_value = 0x003f0000,
Joel Schopp635f5a62008-06-19 06:18:21 +1000377 .cpu_name = "POWER7 (raw)",
Michael Neulinge952e6c2008-06-18 10:47:26 +1000378 .cpu_features = CPU_FTRS_POWER7,
379 .cpu_user_features = COMMON_USER_POWER7,
Nishanth Aravamudan4a1ae4f2013-05-03 14:48:38 +0000380 .cpu_user_features2 = COMMON_USER2_POWER7,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000381 .mmu_features = MMU_FTRS_POWER7,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000382 .icache_bsize = 128,
383 .dcache_bsize = 128,
384 .num_pmcs = 6,
385 .pmc_type = PPC_PMC_IBM,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000386 .oprofile_cpu_type = "ppc64/power7",
387 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt24cc67d2011-01-20 18:50:55 +1100388 .cpu_setup = __setup_cpu_power7,
389 .cpu_restore = __restore_cpu_power7,
Mahesh Salgaonkare22a2272013-10-30 20:05:11 +0530390 .machine_check_early = __machine_check_early_realmode_p7,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000391 .platform = "power7",
392 },
Michael Neuling6f08cb32010-11-17 18:52:44 +0000393 { /* Power7+ */
394 .pvr_mask = 0xffff0000,
395 .pvr_value = 0x004A0000,
396 .cpu_name = "POWER7+ (raw)",
397 .cpu_features = CPU_FTRS_POWER7,
398 .cpu_user_features = COMMON_USER_POWER7,
Will Schmidtbadec112013-05-20 05:04:18 +0000399 .cpu_user_features2 = COMMON_USER2_POWER7,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000400 .mmu_features = MMU_FTRS_POWER7,
Michael Neuling6f08cb32010-11-17 18:52:44 +0000401 .icache_bsize = 128,
402 .dcache_bsize = 128,
403 .num_pmcs = 6,
404 .pmc_type = PPC_PMC_IBM,
405 .oprofile_cpu_type = "ppc64/power7",
406 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt24cc67d2011-01-20 18:50:55 +1100407 .cpu_setup = __setup_cpu_power7,
408 .cpu_restore = __restore_cpu_power7,
Mahesh Salgaonkare22a2272013-10-30 20:05:11 +0530409 .machine_check_early = __machine_check_early_realmode_p7,
Michael Neuling6f08cb32010-11-17 18:52:44 +0000410 .platform = "power7+",
411 },
Michael Neuling33959f82013-07-18 11:31:51 +1000412 { /* Power8E */
Michael Neuling71e18492012-10-30 19:34:15 +0000413 .pvr_mask = 0xffff0000,
414 .pvr_value = 0x004b0000,
Michael Neuling33959f82013-07-18 11:31:51 +1000415 .cpu_name = "POWER8E (raw)",
Michael Ellerman68f2f0d2014-03-14 16:00:28 +1100416 .cpu_features = CPU_FTRS_POWER8E,
Michael Neuling33959f82013-07-18 11:31:51 +1000417 .cpu_user_features = COMMON_USER_POWER8,
418 .cpu_user_features2 = COMMON_USER2_POWER8,
419 .mmu_features = MMU_FTRS_POWER8,
420 .icache_bsize = 128,
421 .dcache_bsize = 128,
422 .num_pmcs = 6,
423 .pmc_type = PPC_PMC_IBM,
424 .oprofile_cpu_type = "ppc64/power8",
425 .oprofile_type = PPC_OPROFILE_INVALID,
426 .cpu_setup = __setup_cpu_power8,
427 .cpu_restore = __restore_cpu_power8,
Mahesh Salgaonkarae744f32013-10-30 20:05:26 +0530428 .machine_check_early = __machine_check_early_realmode_p8,
Michael Neuling33959f82013-07-18 11:31:51 +1000429 .platform = "power8",
430 },
Benjamin Herrenschmidtddee09c2015-03-19 14:12:06 +1100431 { /* Power8NVL */
432 .pvr_mask = 0xffff0000,
433 .pvr_value = 0x004c0000,
434 .cpu_name = "POWER8NVL (raw)",
435 .cpu_features = CPU_FTRS_POWER8,
436 .cpu_user_features = COMMON_USER_POWER8,
437 .cpu_user_features2 = COMMON_USER2_POWER8,
438 .mmu_features = MMU_FTRS_POWER8,
439 .icache_bsize = 128,
440 .dcache_bsize = 128,
441 .num_pmcs = 6,
442 .pmc_type = PPC_PMC_IBM,
443 .oprofile_cpu_type = "ppc64/power8",
444 .oprofile_type = PPC_OPROFILE_INVALID,
445 .cpu_setup = __setup_cpu_power8,
446 .cpu_restore = __restore_cpu_power8,
Benjamin Herrenschmidtddee09c2015-03-19 14:12:06 +1100447 .machine_check_early = __machine_check_early_realmode_p8,
448 .platform = "power8",
449 },
Joel Stanleybd6ba352014-07-18 11:41:37 +0930450 { /* Power8 DD1: Does not support doorbell IPIs */
451 .pvr_mask = 0xffffff00,
452 .pvr_value = 0x004d0100,
453 .cpu_name = "POWER8 (raw)",
454 .cpu_features = CPU_FTRS_POWER8_DD1,
455 .cpu_user_features = COMMON_USER_POWER8,
456 .cpu_user_features2 = COMMON_USER2_POWER8,
457 .mmu_features = MMU_FTRS_POWER8,
458 .icache_bsize = 128,
459 .dcache_bsize = 128,
460 .num_pmcs = 6,
461 .pmc_type = PPC_PMC_IBM,
462 .oprofile_cpu_type = "ppc64/power8",
463 .oprofile_type = PPC_OPROFILE_INVALID,
464 .cpu_setup = __setup_cpu_power8,
465 .cpu_restore = __restore_cpu_power8,
Joel Stanleybd6ba352014-07-18 11:41:37 +0930466 .machine_check_early = __machine_check_early_realmode_p8,
467 .platform = "power8",
468 },
Michael Neuling33959f82013-07-18 11:31:51 +1000469 { /* Power8 */
470 .pvr_mask = 0xffff0000,
471 .pvr_value = 0x004d0000,
Michael Neuling71e18492012-10-30 19:34:15 +0000472 .cpu_name = "POWER8 (raw)",
473 .cpu_features = CPU_FTRS_POWER8,
474 .cpu_user_features = COMMON_USER_POWER8,
Nishanth Aravamudan748645b2013-05-03 14:49:59 +0000475 .cpu_user_features2 = COMMON_USER2_POWER8,
Michael Neuling71e18492012-10-30 19:34:15 +0000476 .mmu_features = MMU_FTRS_POWER8,
477 .icache_bsize = 128,
478 .dcache_bsize = 128,
479 .num_pmcs = 6,
480 .pmc_type = PPC_PMC_IBM,
Michael Neuling6a60f9e72013-06-04 19:38:54 +0000481 .oprofile_cpu_type = "ppc64/power8",
482 .oprofile_type = PPC_OPROFILE_INVALID,
Michael Neuling71e18492012-10-30 19:34:15 +0000483 .cpu_setup = __setup_cpu_power8,
484 .cpu_restore = __restore_cpu_power8,
Mahesh Salgaonkarae744f32013-10-30 20:05:26 +0530485 .machine_check_early = __machine_check_early_realmode_p8,
Michael Neuling71e18492012-10-30 19:34:15 +0000486 .platform = "power8",
487 },
Aneesh Kumar K.V7dccfbc2016-08-24 15:03:36 +0530488 { /* Power9 DD1*/
489 .pvr_mask = 0xffffff00,
490 .pvr_value = 0x004e0100,
491 .cpu_name = "POWER9 (raw)",
492 .cpu_features = CPU_FTRS_POWER9_DD1,
493 .cpu_user_features = COMMON_USER_POWER9,
494 .cpu_user_features2 = COMMON_USER2_POWER9,
495 .mmu_features = MMU_FTRS_POWER9,
496 .icache_bsize = 128,
497 .dcache_bsize = 128,
498 .num_pmcs = 6,
499 .pmc_type = PPC_PMC_IBM,
500 .oprofile_cpu_type = "ppc64/power9",
501 .oprofile_type = PPC_OPROFILE_INVALID,
502 .cpu_setup = __setup_cpu_power9,
503 .cpu_restore = __restore_cpu_power9,
Nicholas Piggin7b9f71f92017-02-28 12:00:48 +1000504 .machine_check_early = __machine_check_early_realmode_p9,
Aneesh Kumar K.V7dccfbc2016-08-24 15:03:36 +0530505 .platform = "power9",
506 },
Nicholas Pigginb6b37552017-11-03 15:13:19 +1100507 { /* Power9 DD2.0 */
508 .pvr_mask = 0xffffefff,
509 .pvr_value = 0x004e0200,
510 .cpu_name = "POWER9 (raw)",
Michael Ellerman3ffa9d92017-11-15 14:25:42 +1100511 .cpu_features = CPU_FTRS_POWER9_DD2_0,
Nicholas Pigginb6b37552017-11-03 15:13:19 +1100512 .cpu_user_features = COMMON_USER_POWER9,
513 .cpu_user_features2 = COMMON_USER2_POWER9,
514 .mmu_features = MMU_FTRS_POWER9,
515 .icache_bsize = 128,
516 .dcache_bsize = 128,
517 .num_pmcs = 6,
518 .pmc_type = PPC_PMC_IBM,
519 .oprofile_cpu_type = "ppc64/power9",
520 .oprofile_type = PPC_OPROFILE_INVALID,
521 .cpu_setup = __setup_cpu_power9,
522 .cpu_restore = __restore_cpu_power9,
Nicholas Pigginb6b37552017-11-03 15:13:19 +1100523 .machine_check_early = __machine_check_early_realmode_p9,
524 .platform = "power9",
525 },
Paul Mackerrasb5af4f22018-03-21 21:31:59 +1100526 { /* Power9 DD 2.1 */
527 .pvr_mask = 0xffffefff,
528 .pvr_value = 0x004e0201,
529 .cpu_name = "POWER9 (raw)",
530 .cpu_features = CPU_FTRS_POWER9_DD2_1,
531 .cpu_user_features = COMMON_USER_POWER9,
532 .cpu_user_features2 = COMMON_USER2_POWER9,
533 .mmu_features = MMU_FTRS_POWER9,
534 .icache_bsize = 128,
535 .dcache_bsize = 128,
536 .num_pmcs = 6,
537 .pmc_type = PPC_PMC_IBM,
538 .oprofile_cpu_type = "ppc64/power9",
539 .oprofile_type = PPC_OPROFILE_INVALID,
540 .cpu_setup = __setup_cpu_power9,
541 .cpu_restore = __restore_cpu_power9,
Paul Mackerrasb5af4f22018-03-21 21:31:59 +1100542 .machine_check_early = __machine_check_early_realmode_p9,
543 .platform = "power9",
544 },
545 { /* Power9 DD2.2 or later */
Michael Neulingc3ab3002016-02-19 11:16:24 +1100546 .pvr_mask = 0xffff0000,
547 .pvr_value = 0x004e0000,
548 .cpu_name = "POWER9 (raw)",
Paul Mackerrasb5af4f22018-03-21 21:31:59 +1100549 .cpu_features = CPU_FTRS_POWER9_DD2_2,
Michael Neulingc3ab3002016-02-19 11:16:24 +1100550 .cpu_user_features = COMMON_USER_POWER9,
551 .cpu_user_features2 = COMMON_USER2_POWER9,
552 .mmu_features = MMU_FTRS_POWER9,
553 .icache_bsize = 128,
554 .dcache_bsize = 128,
555 .num_pmcs = 6,
556 .pmc_type = PPC_PMC_IBM,
557 .oprofile_cpu_type = "ppc64/power9",
558 .oprofile_type = PPC_OPROFILE_INVALID,
559 .cpu_setup = __setup_cpu_power9,
560 .cpu_restore = __restore_cpu_power9,
Nicholas Piggin7b9f71f92017-02-28 12:00:48 +1000561 .machine_check_early = __machine_check_early_realmode_p9,
Michael Neulingc3ab3002016-02-19 11:16:24 +1100562 .platform = "power9",
563 },
Arnd Bergmannc902be72006-01-04 19:55:53 +0000564 { /* Cell Broadband Engine */
Stephen Rothwell49209602005-10-12 15:55:09 +1000565 .pvr_mask = 0xffff0000,
566 .pvr_value = 0x00700000,
567 .cpu_name = "Cell Broadband Engine",
568 .cpu_features = CPU_FTRS_CELL,
569 .cpu_user_features = COMMON_USER_PPC64 |
Benjamin Herrenschmidtaa5cb0212006-03-01 15:07:07 +1100570 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
571 PPC_FEATURE_SMT,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000572 .mmu_features = MMU_FTRS_CELL,
Stephen Rothwell49209602005-10-12 15:55:09 +1000573 .icache_bsize = 128,
574 .dcache_bsize = 128,
Maynard Johnson18f21902006-11-20 18:45:16 +0100575 .num_pmcs = 4,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600576 .pmc_type = PPC_PMC_IBM,
Maynard Johnson18f21902006-11-20 18:45:16 +0100577 .oprofile_cpu_type = "ppc64/cell-be",
578 .oprofile_type = PPC_OPROFILE_CELL,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100579 .platform = "ppc-cell-be",
Stephen Rothwell49209602005-10-12 15:55:09 +1000580 },
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500581 { /* PA Semi PA6T */
582 .pvr_mask = 0x7fff0000,
583 .pvr_value = 0x00900000,
584 .cpu_name = "PA6T",
585 .cpu_features = CPU_FTRS_PA6T,
586 .cpu_user_features = COMMON_USER_PA6T,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000587 .mmu_features = MMU_FTRS_PA6T,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500588 .icache_bsize = 64,
589 .dcache_bsize = 64,
590 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600591 .pmc_type = PPC_PMC_PA6T,
Olof Johansson11999192007-02-04 16:36:51 -0600592 .cpu_setup = __setup_cpu_pa6t,
593 .cpu_restore = __restore_cpu_pa6t,
Olof Johansson25fc5302007-04-18 16:38:21 +1000594 .oprofile_cpu_type = "ppc64/pa6t",
595 .oprofile_type = PPC_OPROFILE_PA6T,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500596 .platform = "pa6t",
597 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000598 { /* default match */
599 .pvr_mask = 0x00000000,
600 .pvr_value = 0x00000000,
Nicholas Piggin471d7ff2018-02-21 05:08:29 +1000601 .cpu_name = "POWER5 (compatible)",
Stephen Rothwell49209602005-10-12 15:55:09 +1000602 .cpu_features = CPU_FTRS_COMPATIBLE,
603 .cpu_user_features = COMMON_USER_PPC64,
Nicholas Piggin471d7ff2018-02-21 05:08:29 +1000604 .mmu_features = MMU_FTRS_POWER,
Stephen Rothwell49209602005-10-12 15:55:09 +1000605 .icache_bsize = 128,
606 .dcache_bsize = 128,
607 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600608 .pmc_type = PPC_PMC_IBM,
Nicholas Piggin471d7ff2018-02-21 05:08:29 +1000609 .platform = "power5",
Stephen Rothwell49209602005-10-12 15:55:09 +1000610 }
Benjamin Herrenschmidt2d27cfd2009-07-23 23:15:59 +0000611#endif /* CONFIG_PPC_BOOK3S_64 */
Benjamin Herrenschmidt2d27cfd2009-07-23 23:15:59 +0000612
Stephen Rothwell49209602005-10-12 15:55:09 +1000613#ifdef CONFIG_PPC32
Michael Ellerman1e07a0a2014-07-10 12:29:26 +1000614#ifdef CONFIG_PPC_BOOK3S_32
Stephen Rothwell49209602005-10-12 15:55:09 +1000615 { /* 601 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700616 .pvr_mask = 0xffff0000,
617 .pvr_value = 0x00010000,
618 .cpu_name = "601",
Kumar Gala10b35d92005-09-23 14:08:58 -0500619 .cpu_features = CPU_FTRS_PPC601,
Stephen Rothwell49209602005-10-12 15:55:09 +1000620 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
Paul Mackerras98599012005-10-22 16:51:34 +1000621 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000622 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700623 .icache_bsize = 32,
624 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100625 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100626 .platform = "ppc601",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700627 },
628 { /* 603 */
629 .pvr_mask = 0xffff0000,
630 .pvr_value = 0x00030000,
631 .cpu_name = "603",
Kumar Gala10b35d92005-09-23 14:08:58 -0500632 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000633 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000634 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700635 .icache_bsize = 32,
636 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100637 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100638 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100639 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700640 },
641 { /* 603e */
642 .pvr_mask = 0xffff0000,
643 .pvr_value = 0x00060000,
644 .cpu_name = "603e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500645 .cpu_features = CPU_FTRS_603,
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 = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700648 .icache_bsize = 32,
649 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100650 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100651 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100652 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700653 },
654 { /* 603ev */
655 .pvr_mask = 0xffff0000,
656 .pvr_value = 0x00070000,
657 .cpu_name = "603ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500658 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000659 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000660 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700661 .icache_bsize = 32,
662 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100663 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100664 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100665 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700666 },
667 { /* 604 */
668 .pvr_mask = 0xffff0000,
669 .pvr_value = 0x00040000,
670 .cpu_name = "604",
Kumar Gala10b35d92005-09-23 14:08:58 -0500671 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000672 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000673 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700674 .icache_bsize = 32,
675 .dcache_bsize = 32,
676 .num_pmcs = 2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100677 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100678 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100679 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700680 },
681 { /* 604e */
682 .pvr_mask = 0xfffff000,
683 .pvr_value = 0x00090000,
684 .cpu_name = "604e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500685 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000686 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000687 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700688 .icache_bsize = 32,
689 .dcache_bsize = 32,
690 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100691 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100692 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100693 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700694 },
695 { /* 604r */
696 .pvr_mask = 0xffff0000,
697 .pvr_value = 0x00090000,
698 .cpu_name = "604r",
Kumar Gala10b35d92005-09-23 14:08:58 -0500699 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000700 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000701 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700702 .icache_bsize = 32,
703 .dcache_bsize = 32,
704 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100705 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100706 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100707 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700708 },
709 { /* 604ev */
710 .pvr_mask = 0xffff0000,
711 .pvr_value = 0x000a0000,
712 .cpu_name = "604ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500713 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000714 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000715 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700716 .icache_bsize = 32,
717 .dcache_bsize = 32,
718 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100719 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100720 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100721 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700722 },
723 { /* 740/750 (0x4202, don't support TAU ?) */
724 .pvr_mask = 0xffffffff,
725 .pvr_value = 0x00084202,
726 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500727 .cpu_features = CPU_FTRS_740_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000728 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000729 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700730 .icache_bsize = 32,
731 .dcache_bsize = 32,
732 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100733 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100734 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100735 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700736 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700737 { /* 750CX (80100 and 8010x?) */
738 .pvr_mask = 0xfffffff0,
739 .pvr_value = 0x00080100,
740 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500741 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000742 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000743 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700744 .icache_bsize = 32,
745 .dcache_bsize = 32,
746 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100747 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100748 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100749 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700750 },
751 { /* 750CX (82201 and 82202) */
752 .pvr_mask = 0xfffffff0,
753 .pvr_value = 0x00082200,
754 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500755 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000756 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000757 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700758 .icache_bsize = 32,
759 .dcache_bsize = 32,
760 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000761 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100762 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100763 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100764 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700765 },
766 { /* 750CXe (82214) */
767 .pvr_mask = 0xfffffff0,
768 .pvr_value = 0x00082210,
769 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500770 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000771 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000772 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700773 .icache_bsize = 32,
774 .dcache_bsize = 32,
775 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000776 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100777 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100778 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100779 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700780 },
Arthur Othieno7c316252005-09-03 15:55:52 -0700781 { /* 750CXe "Gekko" (83214) */
782 .pvr_mask = 0xffffffff,
783 .pvr_value = 0x00083214,
784 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500785 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000786 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000787 .mmu_features = MMU_FTR_HPTE_TABLE,
Arthur Othieno7c316252005-09-03 15:55:52 -0700788 .icache_bsize = 32,
789 .dcache_bsize = 32,
790 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000791 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100792 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100793 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100794 .platform = "ppc750",
Arthur Othieno7c316252005-09-03 15:55:52 -0700795 },
Albert Herranz45158dc2009-12-12 06:31:46 +0000796 { /* 750CL (and "Broadway") */
797 .pvr_mask = 0xfffff0e0,
798 .pvr_value = 0x00087000,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500799 .cpu_name = "750CL",
Josh Boyera14c4502007-04-13 04:33:25 +1000800 .cpu_features = CPU_FTRS_750CL,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500801 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000802 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500803 .icache_bsize = 32,
804 .dcache_bsize = 32,
805 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000806 .pmc_type = PPC_PMC_IBM,
Josh Boyera14c4502007-04-13 04:33:25 +1000807 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100808 .machine_check = machine_check_generic,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500809 .platform = "ppc750",
Dragos Tatulea04f56534772009-09-16 11:58:15 +0300810 .oprofile_cpu_type = "ppc/750",
811 .oprofile_type = PPC_OPROFILE_G4,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500812 },
Arthur Othienoac1ff042005-09-03 15:55:51 -0700813 { /* 745/755 */
814 .pvr_mask = 0xfffff000,
815 .pvr_value = 0x00083000,
816 .cpu_name = "745/755",
Kumar Gala10b35d92005-09-23 14:08:58 -0500817 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000818 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000819 .mmu_features = MMU_FTR_HPTE_TABLE,
Arthur Othienoac1ff042005-09-03 15:55:51 -0700820 .icache_bsize = 32,
821 .dcache_bsize = 32,
822 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000823 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100824 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100825 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100826 .platform = "ppc750",
Arthur Othienoac1ff042005-09-03 15:55:51 -0700827 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700828 { /* 750FX rev 1.x */
829 .pvr_mask = 0xffffff00,
830 .pvr_value = 0x70000100,
831 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500832 .cpu_features = CPU_FTRS_750FX1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000833 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000834 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700835 .icache_bsize = 32,
836 .dcache_bsize = 32,
837 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000838 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100839 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100840 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100841 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000842 .oprofile_cpu_type = "ppc/750",
843 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700844 },
845 { /* 750FX rev 2.0 must disable HID0[DPM] */
846 .pvr_mask = 0xffffffff,
847 .pvr_value = 0x70000200,
848 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500849 .cpu_features = CPU_FTRS_750FX2,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000850 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000851 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700852 .icache_bsize = 32,
853 .dcache_bsize = 32,
854 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000855 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100856 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100857 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100858 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000859 .oprofile_cpu_type = "ppc/750",
860 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700861 },
862 { /* 750FX (All revs except 2.0) */
863 .pvr_mask = 0xffff0000,
864 .pvr_value = 0x70000000,
865 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500866 .cpu_features = CPU_FTRS_750FX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000867 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000868 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700869 .icache_bsize = 32,
870 .dcache_bsize = 32,
871 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000872 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100873 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100874 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100875 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000876 .oprofile_cpu_type = "ppc/750",
877 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700878 },
879 { /* 750GX */
880 .pvr_mask = 0xffff0000,
881 .pvr_value = 0x70020000,
882 .cpu_name = "750GX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500883 .cpu_features = CPU_FTRS_750GX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000884 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000885 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700886 .icache_bsize = 32,
887 .dcache_bsize = 32,
888 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000889 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100890 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100891 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100892 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000893 .oprofile_cpu_type = "ppc/750",
894 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700895 },
896 { /* 740/750 (L2CR bit need fixup for 740) */
897 .pvr_mask = 0xffff0000,
898 .pvr_value = 0x00080000,
899 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500900 .cpu_features = CPU_FTRS_740,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000901 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000902 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700903 .icache_bsize = 32,
904 .dcache_bsize = 32,
905 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000906 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100907 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100908 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100909 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700910 },
911 { /* 7400 rev 1.1 ? (no TAU) */
912 .pvr_mask = 0xffffffff,
913 .pvr_value = 0x000c1101,
914 .cpu_name = "7400 (1.1)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500915 .cpu_features = CPU_FTRS_7400_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000916 .cpu_user_features = COMMON_USER |
917 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000918 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700919 .icache_bsize = 32,
920 .dcache_bsize = 32,
921 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000922 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100923 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100924 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100925 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700926 },
927 { /* 7400 */
928 .pvr_mask = 0xffff0000,
929 .pvr_value = 0x000c0000,
930 .cpu_name = "7400",
Kumar Gala10b35d92005-09-23 14:08:58 -0500931 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000932 .cpu_user_features = COMMON_USER |
933 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000934 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700935 .icache_bsize = 32,
936 .dcache_bsize = 32,
937 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000938 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100939 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100940 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100941 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700942 },
943 { /* 7410 */
944 .pvr_mask = 0xffff0000,
945 .pvr_value = 0x800c0000,
946 .cpu_name = "7410",
Kumar Gala10b35d92005-09-23 14:08:58 -0500947 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000948 .cpu_user_features = COMMON_USER |
949 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000950 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700951 .icache_bsize = 32,
952 .dcache_bsize = 32,
953 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000954 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100955 .cpu_setup = __setup_cpu_7410,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100956 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100957 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700958 },
959 { /* 7450 2.0 - no doze/nap */
960 .pvr_mask = 0xffffffff,
961 .pvr_value = 0x80000200,
962 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500963 .cpu_features = CPU_FTRS_7450_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000964 .cpu_user_features = COMMON_USER |
965 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000966 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700967 .icache_bsize = 32,
968 .dcache_bsize = 32,
969 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000970 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600971 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600972 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000973 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100974 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100975 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700976 },
977 { /* 7450 2.1 */
978 .pvr_mask = 0xffffffff,
979 .pvr_value = 0x80000201,
980 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500981 .cpu_features = CPU_FTRS_7450_21,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000982 .cpu_user_features = COMMON_USER |
983 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000984 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700985 .icache_bsize = 32,
986 .dcache_bsize = 32,
987 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000988 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600989 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600990 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000991 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100992 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100993 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700994 },
995 { /* 7450 2.3 and newer */
996 .pvr_mask = 0xffff0000,
997 .pvr_value = 0x80000000,
998 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500999 .cpu_features = CPU_FTRS_7450_23,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001000 .cpu_user_features = COMMON_USER |
1001 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001002 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001003 .icache_bsize = 32,
1004 .dcache_bsize = 32,
1005 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001006 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001007 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001008 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001009 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001010 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001011 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001012 },
1013 { /* 7455 rev 1.x */
1014 .pvr_mask = 0xffffff00,
1015 .pvr_value = 0x80010100,
1016 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -05001017 .cpu_features = CPU_FTRS_7455_1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001018 .cpu_user_features = COMMON_USER |
1019 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001020 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001021 .icache_bsize = 32,
1022 .dcache_bsize = 32,
1023 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001024 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001025 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001026 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001027 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001028 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001029 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001030 },
1031 { /* 7455 rev 2.0 */
1032 .pvr_mask = 0xffffffff,
1033 .pvr_value = 0x80010200,
1034 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -05001035 .cpu_features = CPU_FTRS_7455_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001036 .cpu_user_features = COMMON_USER |
1037 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001038 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001039 .icache_bsize = 32,
1040 .dcache_bsize = 32,
1041 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001042 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001043 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001044 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001045 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001046 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001047 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001048 },
1049 { /* 7455 others */
1050 .pvr_mask = 0xffff0000,
1051 .pvr_value = 0x80010000,
1052 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -05001053 .cpu_features = CPU_FTRS_7455,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001054 .cpu_user_features = COMMON_USER |
1055 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001056 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001057 .icache_bsize = 32,
1058 .dcache_bsize = 32,
1059 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001060 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001061 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001062 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001063 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001064 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001065 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001066 },
1067 { /* 7447/7457 Rev 1.0 */
1068 .pvr_mask = 0xffffffff,
1069 .pvr_value = 0x80020100,
1070 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -05001071 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001072 .cpu_user_features = COMMON_USER |
1073 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001074 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001075 .icache_bsize = 32,
1076 .dcache_bsize = 32,
1077 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001078 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001079 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001080 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001081 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001082 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001083 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001084 },
1085 { /* 7447/7457 Rev 1.1 */
1086 .pvr_mask = 0xffffffff,
1087 .pvr_value = 0x80020101,
1088 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -05001089 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001090 .cpu_user_features = COMMON_USER |
1091 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001092 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001093 .icache_bsize = 32,
1094 .dcache_bsize = 32,
1095 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001096 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001097 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001098 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001099 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001100 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001101 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001102 },
1103 { /* 7447/7457 Rev 1.2 and later */
1104 .pvr_mask = 0xffff0000,
1105 .pvr_value = 0x80020000,
1106 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -05001107 .cpu_features = CPU_FTRS_7447,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001108 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001109 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001110 .icache_bsize = 32,
1111 .dcache_bsize = 32,
1112 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001113 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001114 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001115 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001116 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001117 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001118 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001119 },
1120 { /* 7447A */
1121 .pvr_mask = 0xffff0000,
1122 .pvr_value = 0x80030000,
1123 .cpu_name = "7447A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001124 .cpu_features = CPU_FTRS_7447A,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001125 .cpu_user_features = COMMON_USER |
1126 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001127 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001128 .icache_bsize = 32,
1129 .dcache_bsize = 32,
1130 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001131 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001132 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001133 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001134 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001135 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001136 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001137 },
Kumar Galabbde6302005-09-03 15:55:55 -07001138 { /* 7448 */
1139 .pvr_mask = 0xffff0000,
1140 .pvr_value = 0x80040000,
1141 .cpu_name = "7448",
James.Yang3d372542007-05-02 16:34:43 -05001142 .cpu_features = CPU_FTRS_7448,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001143 .cpu_user_features = COMMON_USER |
1144 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001145 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Kumar Galabbde6302005-09-03 15:55:55 -07001146 .icache_bsize = 32,
1147 .dcache_bsize = 32,
1148 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001149 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001150 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001151 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001152 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001153 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001154 .platform = "ppc7450",
Kumar Galabbde6302005-09-03 15:55:55 -07001155 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001156 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
1157 .pvr_mask = 0x7fff0000,
1158 .pvr_value = 0x00810000,
1159 .cpu_name = "82xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001160 .cpu_features = CPU_FTRS_82XX,
Stephen Rothwell49209602005-10-12 15:55:09 +10001161 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001162 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001163 .icache_bsize = 32,
1164 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001165 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001166 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001167 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001168 },
1169 { /* All G2_LE (603e core, plus some) have the same pvr */
1170 .pvr_mask = 0x7fff0000,
1171 .pvr_value = 0x00820000,
1172 .cpu_name = "G2_LE",
Kumar Gala10b35d92005-09-23 14:08:58 -05001173 .cpu_features = CPU_FTRS_G2_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +10001174 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001175 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001176 .icache_bsize = 32,
1177 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001178 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001179 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001180 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001181 },
Kim Phillips6c4a2502006-10-02 20:10:24 -05001182 { /* e300c1 (a 603e core, plus some) on 83xx */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001183 .pvr_mask = 0x7fff0000,
1184 .pvr_value = 0x00830000,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001185 .cpu_name = "e300c1",
Kumar Gala10b35d92005-09-23 14:08:58 -05001186 .cpu_features = CPU_FTRS_E300,
Stephen Rothwell49209602005-10-12 15:55:09 +10001187 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001188 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001189 .icache_bsize = 32,
1190 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001191 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001192 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001193 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001194 },
Kim Phillips6c4a2502006-10-02 20:10:24 -05001195 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
1196 .pvr_mask = 0x7fff0000,
1197 .pvr_value = 0x00840000,
1198 .cpu_name = "e300c2",
Kim Phillipsaa42c692006-12-08 02:43:30 -06001199 .cpu_features = CPU_FTRS_E300C2,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001200 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Kumar Gala2319f122009-03-19 03:55:41 +00001201 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1202 MMU_FTR_NEED_DTLB_SW_LRU,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001203 .icache_bsize = 32,
1204 .dcache_bsize = 32,
1205 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001206 .machine_check = machine_check_generic,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001207 .platform = "ppc603",
1208 },
Li Yanga58d5242007-10-19 19:38:42 +08001209 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
Scott Wood57933f82006-12-01 12:57:05 -06001210 .pvr_mask = 0x7fff0000,
1211 .pvr_value = 0x00850000,
1212 .cpu_name = "e300c3",
1213 .cpu_features = CPU_FTRS_E300,
1214 .cpu_user_features = COMMON_USER,
Kumar Gala2319f122009-03-19 03:55:41 +00001215 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1216 MMU_FTR_NEED_DTLB_SW_LRU,
Scott Wood57933f82006-12-01 12:57:05 -06001217 .icache_bsize = 32,
1218 .dcache_bsize = 32,
1219 .cpu_setup = __setup_cpu_603,
Esben Haabendal974ff4e2015-01-06 12:26:59 +01001220 .machine_check = machine_check_generic,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001221 .num_pmcs = 4,
1222 .oprofile_cpu_type = "ppc/e300",
1223 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Scott Wood57933f82006-12-01 12:57:05 -06001224 .platform = "ppc603",
1225 },
Li Yanga58d5242007-10-19 19:38:42 +08001226 { /* e300c4 (e300c1, plus one IU) */
1227 .pvr_mask = 0x7fff0000,
1228 .pvr_value = 0x00860000,
1229 .cpu_name = "e300c4",
1230 .cpu_features = CPU_FTRS_E300,
1231 .cpu_user_features = COMMON_USER,
Kumar Gala2319f122009-03-19 03:55:41 +00001232 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1233 MMU_FTR_NEED_DTLB_SW_LRU,
Li Yanga58d5242007-10-19 19:38:42 +08001234 .icache_bsize = 32,
1235 .dcache_bsize = 32,
1236 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001237 .machine_check = machine_check_generic,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001238 .num_pmcs = 4,
1239 .oprofile_cpu_type = "ppc/e300",
1240 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Li Yanga58d5242007-10-19 19:38:42 +08001241 .platform = "ppc603",
1242 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001243 { /* default match, we assume split I/D cache & TB (non-601)... */
1244 .pvr_mask = 0x00000000,
1245 .pvr_value = 0x00000000,
1246 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -05001247 .cpu_features = CPU_FTRS_CLASSIC32,
Stephen Rothwell49209602005-10-12 15:55:09 +10001248 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001249 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001250 .icache_bsize = 32,
1251 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001252 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001253 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001254 },
Michael Ellerman1e07a0a2014-07-10 12:29:26 +10001255#endif /* CONFIG_PPC_BOOK3S_32 */
Christophe Leroy968159c2017-08-08 13:58:54 +02001256#ifdef CONFIG_PPC_8xx
Linus Torvalds1da177e2005-04-16 15:20:36 -07001257 { /* 8xx */
1258 .pvr_mask = 0xffff0000,
Christophe Leroy3ee87672017-08-08 13:58:58 +02001259 .pvr_value = PVR_8xx,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001260 .cpu_name = "8xx",
1261 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1262 * if the 8xx code is there.... */
Kumar Gala10b35d92005-09-23 14:08:58 -05001263 .cpu_features = CPU_FTRS_8XX,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001264 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001265 .mmu_features = MMU_FTR_TYPE_8xx,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001266 .icache_bsize = 16,
1267 .dcache_bsize = 16,
Christophe Leroye627f8d2016-09-16 10:23:11 +02001268 .machine_check = machine_check_8xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001269 .platform = "ppc823",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001270 },
Christophe Leroy968159c2017-08-08 13:58:54 +02001271#endif /* CONFIG_PPC_8xx */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001272#ifdef CONFIG_40x
1273 { /* 403GC */
1274 .pvr_mask = 0xffffff00,
1275 .pvr_value = 0x00200200,
1276 .cpu_name = "403GC",
Kumar Gala10b35d92005-09-23 14:08:58 -05001277 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001278 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001279 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001280 .icache_bsize = 16,
1281 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001282 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001283 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001284 },
1285 { /* 403GCX */
1286 .pvr_mask = 0xffffff00,
1287 .pvr_value = 0x00201400,
1288 .cpu_name = "403GCX",
Kumar Gala10b35d92005-09-23 14:08:58 -05001289 .cpu_features = CPU_FTRS_40X,
Paul Mackerras98599012005-10-22 16:51:34 +10001290 .cpu_user_features = PPC_FEATURE_32 |
1291 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001292 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001293 .icache_bsize = 16,
1294 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001295 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001296 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001297 },
1298 { /* 403G ?? */
1299 .pvr_mask = 0xffff0000,
1300 .pvr_value = 0x00200000,
1301 .cpu_name = "403G ??",
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 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001304 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001305 .icache_bsize = 16,
1306 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001307 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001308 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001309 },
1310 { /* 405GP */
1311 .pvr_mask = 0xffff0000,
1312 .pvr_value = 0x40110000,
1313 .cpu_name = "405GP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001314 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001315 .cpu_user_features = PPC_FEATURE_32 |
1316 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001317 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001318 .icache_bsize = 32,
1319 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001320 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001321 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001322 },
1323 { /* STB 03xxx */
1324 .pvr_mask = 0xffff0000,
1325 .pvr_value = 0x40130000,
1326 .cpu_name = "STB03xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001327 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001328 .cpu_user_features = PPC_FEATURE_32 |
1329 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001330 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001331 .icache_bsize = 32,
1332 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001333 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001334 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001335 },
1336 { /* STB 04xxx */
1337 .pvr_mask = 0xffff0000,
1338 .pvr_value = 0x41810000,
1339 .cpu_name = "STB04xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001340 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001341 .cpu_user_features = PPC_FEATURE_32 |
1342 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001343 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001344 .icache_bsize = 32,
1345 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001346 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001347 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001348 },
1349 { /* NP405L */
1350 .pvr_mask = 0xffff0000,
1351 .pvr_value = 0x41610000,
1352 .cpu_name = "NP405L",
Kumar Gala10b35d92005-09-23 14:08:58 -05001353 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001354 .cpu_user_features = PPC_FEATURE_32 |
1355 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001356 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001357 .icache_bsize = 32,
1358 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001359 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001360 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001361 },
1362 { /* NP4GS3 */
1363 .pvr_mask = 0xffff0000,
1364 .pvr_value = 0x40B10000,
1365 .cpu_name = "NP4GS3",
Kumar Gala10b35d92005-09-23 14:08:58 -05001366 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001367 .cpu_user_features = PPC_FEATURE_32 |
1368 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001369 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001370 .icache_bsize = 32,
1371 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001372 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001373 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001374 },
1375 { /* NP405H */
1376 .pvr_mask = 0xffff0000,
1377 .pvr_value = 0x41410000,
1378 .cpu_name = "NP405H",
Kumar Gala10b35d92005-09-23 14:08:58 -05001379 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001380 .cpu_user_features = PPC_FEATURE_32 |
1381 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
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 { /* 405GPr */
1389 .pvr_mask = 0xffff0000,
1390 .pvr_value = 0x50910000,
1391 .cpu_name = "405GPr",
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 },
1401 { /* STBx25xx */
1402 .pvr_mask = 0xffff0000,
1403 .pvr_value = 0x51510000,
1404 .cpu_name = "STBx25xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001405 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001406 .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,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001409 .icache_bsize = 32,
1410 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001411 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001412 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001413 },
1414 { /* 405LP */
1415 .pvr_mask = 0xffff0000,
1416 .pvr_value = 0x41F10000,
1417 .cpu_name = "405LP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001418 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001419 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001420 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001421 .icache_bsize = 32,
1422 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001423 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001424 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001425 },
1426 { /* Xilinx Virtex-II Pro */
Grant C. Likely72646c72006-01-19 01:13:20 -07001427 .pvr_mask = 0xfffff000,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001428 .pvr_value = 0x20010000,
1429 .cpu_name = "Virtex-II Pro",
Kumar Gala10b35d92005-09-23 14:08:58 -05001430 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001431 .cpu_user_features = PPC_FEATURE_32 |
1432 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001433 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001434 .icache_bsize = 32,
1435 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001436 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001437 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001438 },
Grant C. Likely72646c72006-01-19 01:13:20 -07001439 { /* Xilinx Virtex-4 FX */
1440 .pvr_mask = 0xfffff000,
1441 .pvr_value = 0x20011000,
1442 .cpu_name = "Virtex-4 FX",
1443 .cpu_features = CPU_FTRS_40X,
1444 .cpu_user_features = PPC_FEATURE_32 |
1445 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001446 .mmu_features = MMU_FTR_TYPE_40x,
Grant C. Likely72646c72006-01-19 01:13:20 -07001447 .icache_bsize = 32,
1448 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001449 .machine_check = machine_check_4xx,
Peter Bergner838fdb42006-09-14 14:18:38 -05001450 .platform = "ppc405",
Grant C. Likely72646c72006-01-19 01:13:20 -07001451 },
Eugene Suroveginad95d602005-06-07 13:22:09 -07001452 { /* 405EP */
1453 .pvr_mask = 0xffff0000,
1454 .pvr_value = 0x51210000,
1455 .cpu_name = "405EP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001456 .cpu_features = CPU_FTRS_40X,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001457 .cpu_user_features = PPC_FEATURE_32 |
1458 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001459 .mmu_features = MMU_FTR_TYPE_40x,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001460 .icache_bsize = 32,
1461 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001462 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001463 .platform = "ppc405",
Eugene Suroveginad95d602005-06-07 13:22:09 -07001464 },
Lee Nipperff349102010-07-09 01:17:16 +00001465 { /* 405EX Rev. A/B with Security */
1466 .pvr_mask = 0xffff000f,
1467 .pvr_value = 0x12910007,
1468 .cpu_name = "405EX Rev. A/B",
Stefan Roese5d8476c2007-10-11 22:08:14 +10001469 .cpu_features = CPU_FTRS_40X,
1470 .cpu_user_features = PPC_FEATURE_32 |
1471 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001472 .mmu_features = MMU_FTR_TYPE_40x,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001473 .icache_bsize = 32,
1474 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001475 .machine_check = machine_check_4xx,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001476 .platform = "ppc405",
1477 },
Lee Nipperff349102010-07-09 01:17:16 +00001478 { /* 405EX Rev. C without Security */
1479 .pvr_mask = 0xffff000f,
1480 .pvr_value = 0x1291000d,
1481 .cpu_name = "405EX Rev. C",
1482 .cpu_features = CPU_FTRS_40X,
1483 .cpu_user_features = PPC_FEATURE_32 |
1484 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1485 .mmu_features = MMU_FTR_TYPE_40x,
1486 .icache_bsize = 32,
1487 .dcache_bsize = 32,
1488 .machine_check = machine_check_4xx,
1489 .platform = "ppc405",
1490 },
1491 { /* 405EX Rev. C with Security */
1492 .pvr_mask = 0xffff000f,
1493 .pvr_value = 0x1291000f,
1494 .cpu_name = "405EX Rev. C",
1495 .cpu_features = CPU_FTRS_40X,
1496 .cpu_user_features = PPC_FEATURE_32 |
1497 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1498 .mmu_features = MMU_FTR_TYPE_40x,
1499 .icache_bsize = 32,
1500 .dcache_bsize = 32,
1501 .machine_check = machine_check_4xx,
1502 .platform = "ppc405",
1503 },
1504 { /* 405EX Rev. D without Security */
1505 .pvr_mask = 0xffff000f,
1506 .pvr_value = 0x12910003,
1507 .cpu_name = "405EX Rev. D",
1508 .cpu_features = CPU_FTRS_40X,
1509 .cpu_user_features = PPC_FEATURE_32 |
1510 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1511 .mmu_features = MMU_FTR_TYPE_40x,
1512 .icache_bsize = 32,
1513 .dcache_bsize = 32,
1514 .machine_check = machine_check_4xx,
1515 .platform = "ppc405",
1516 },
1517 { /* 405EX Rev. D with Security */
1518 .pvr_mask = 0xffff000f,
1519 .pvr_value = 0x12910005,
1520 .cpu_name = "405EX Rev. D",
1521 .cpu_features = CPU_FTRS_40X,
1522 .cpu_user_features = PPC_FEATURE_32 |
1523 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1524 .mmu_features = MMU_FTR_TYPE_40x,
1525 .icache_bsize = 32,
1526 .dcache_bsize = 32,
1527 .machine_check = machine_check_4xx,
1528 .platform = "ppc405",
1529 },
1530 { /* 405EXr Rev. A/B without Security */
1531 .pvr_mask = 0xffff000f,
1532 .pvr_value = 0x12910001,
1533 .cpu_name = "405EXr Rev. A/B",
1534 .cpu_features = CPU_FTRS_40X,
1535 .cpu_user_features = PPC_FEATURE_32 |
1536 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1537 .mmu_features = MMU_FTR_TYPE_40x,
1538 .icache_bsize = 32,
1539 .dcache_bsize = 32,
1540 .machine_check = machine_check_4xx,
1541 .platform = "ppc405",
1542 },
1543 { /* 405EXr Rev. C without Security */
1544 .pvr_mask = 0xffff000f,
1545 .pvr_value = 0x12910009,
1546 .cpu_name = "405EXr Rev. C",
1547 .cpu_features = CPU_FTRS_40X,
1548 .cpu_user_features = PPC_FEATURE_32 |
1549 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1550 .mmu_features = MMU_FTR_TYPE_40x,
1551 .icache_bsize = 32,
1552 .dcache_bsize = 32,
1553 .machine_check = machine_check_4xx,
1554 .platform = "ppc405",
1555 },
1556 { /* 405EXr Rev. C with Security */
1557 .pvr_mask = 0xffff000f,
1558 .pvr_value = 0x1291000b,
1559 .cpu_name = "405EXr Rev. C",
1560 .cpu_features = CPU_FTRS_40X,
1561 .cpu_user_features = PPC_FEATURE_32 |
1562 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1563 .mmu_features = MMU_FTR_TYPE_40x,
1564 .icache_bsize = 32,
1565 .dcache_bsize = 32,
1566 .machine_check = machine_check_4xx,
1567 .platform = "ppc405",
1568 },
1569 { /* 405EXr Rev. D without Security */
1570 .pvr_mask = 0xffff000f,
Stefan Roeseb676d842008-01-15 18:09:15 +11001571 .pvr_value = 0x12910000,
Lee Nipperff349102010-07-09 01:17:16 +00001572 .cpu_name = "405EXr Rev. D",
1573 .cpu_features = CPU_FTRS_40X,
1574 .cpu_user_features = PPC_FEATURE_32 |
1575 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1576 .mmu_features = MMU_FTR_TYPE_40x,
1577 .icache_bsize = 32,
1578 .dcache_bsize = 32,
1579 .machine_check = machine_check_4xx,
1580 .platform = "ppc405",
1581 },
1582 { /* 405EXr Rev. D with Security */
1583 .pvr_mask = 0xffff000f,
1584 .pvr_value = 0x12910002,
1585 .cpu_name = "405EXr Rev. D",
Stefan Roeseb676d842008-01-15 18:09:15 +11001586 .cpu_features = CPU_FTRS_40X,
1587 .cpu_user_features = PPC_FEATURE_32 |
1588 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001589 .mmu_features = MMU_FTR_TYPE_40x,
Stefan Roeseb676d842008-01-15 18:09:15 +11001590 .icache_bsize = 32,
1591 .dcache_bsize = 32,
1592 .machine_check = machine_check_4xx,
1593 .platform = "ppc405",
1594 },
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001595 {
1596 /* 405EZ */
1597 .pvr_mask = 0xffff0000,
1598 .pvr_value = 0x41510000,
1599 .cpu_name = "405EZ",
1600 .cpu_features = CPU_FTRS_40X,
1601 .cpu_user_features = PPC_FEATURE_32 |
1602 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001603 .mmu_features = MMU_FTR_TYPE_40x,
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001604 .icache_bsize = 32,
1605 .dcache_bsize = 32,
1606 .machine_check = machine_check_4xx,
1607 .platform = "ppc405",
1608 },
Tanmay Inamdard5b9ee72011-11-28 21:01:41 +00001609 { /* APM8018X */
1610 .pvr_mask = 0xffff0000,
1611 .pvr_value = 0x7ff11432,
1612 .cpu_name = "APM8018X",
1613 .cpu_features = CPU_FTRS_40X,
1614 .cpu_user_features = PPC_FEATURE_32 |
1615 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1616 .mmu_features = MMU_FTR_TYPE_40x,
1617 .icache_bsize = 32,
1618 .dcache_bsize = 32,
1619 .machine_check = machine_check_4xx,
1620 .platform = "ppc405",
1621 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001622 { /* default match */
1623 .pvr_mask = 0x00000000,
1624 .pvr_value = 0x00000000,
1625 .cpu_name = "(generic 40x PPC)",
1626 .cpu_features = CPU_FTRS_40X,
1627 .cpu_user_features = PPC_FEATURE_32 |
1628 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001629 .mmu_features = MMU_FTR_TYPE_40x,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001630 .icache_bsize = 32,
1631 .dcache_bsize = 32,
1632 .machine_check = machine_check_4xx,
1633 .platform = "ppc405",
1634 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001635
1636#endif /* CONFIG_40x */
1637#ifdef CONFIG_44x
Matt Porterc9cf73a2005-07-31 22:34:52 -07001638 {
1639 .pvr_mask = 0xf0000fff,
1640 .pvr_value = 0x40000850,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001641 .cpu_name = "440GR Rev. A",
1642 .cpu_features = CPU_FTRS_44X,
1643 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001644 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001645 .icache_bsize = 32,
1646 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001647 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001648 .platform = "ppc440",
1649 },
1650 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1651 .pvr_mask = 0xf0000fff,
1652 .pvr_value = 0x40000858,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001653 .cpu_name = "440EP Rev. A",
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 },
1663 {
1664 .pvr_mask = 0xf0000fff,
1665 .pvr_value = 0x400008d3,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001666 .cpu_name = "440GR Rev. B",
1667 .cpu_features = CPU_FTRS_44X,
1668 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001669 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001670 .icache_bsize = 32,
1671 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001672 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001673 .platform = "ppc440",
1674 },
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001675 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1676 .pvr_mask = 0xf0000ff7,
1677 .pvr_value = 0x400008d4,
1678 .cpu_name = "440EP Rev. C",
1679 .cpu_features = CPU_FTRS_44X,
1680 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001681 .mmu_features = MMU_FTR_TYPE_44x,
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001682 .icache_bsize = 32,
1683 .dcache_bsize = 32,
1684 .cpu_setup = __setup_cpu_440ep,
1685 .machine_check = machine_check_4xx,
1686 .platform = "ppc440",
1687 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001688 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1689 .pvr_mask = 0xf0000fff,
1690 .pvr_value = 0x400008db,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001691 .cpu_name = "440EP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001692 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001693 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001694 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001695 .icache_bsize = 32,
1696 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001697 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001698 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001699 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001700 },
Valentine Barshak15fc9932007-08-29 17:40:30 +04001701 { /* 440GRX */
1702 .pvr_mask = 0xf0000ffb,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001703 .pvr_value = 0x200008D0,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001704 .cpu_name = "440GRX",
1705 .cpu_features = CPU_FTRS_44X,
1706 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001707 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001708 .icache_bsize = 32,
1709 .dcache_bsize = 32,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001710 .cpu_setup = __setup_cpu_440grx,
Valentine Barshakb2be3b12007-12-22 03:22:23 +11001711 .machine_check = machine_check_440A,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001712 .platform = "ppc440",
Valentine Barshak15fc9932007-08-29 17:40:30 +04001713 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001714 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1715 .pvr_mask = 0xf0000ffb,
1716 .pvr_value = 0x200008D8,
1717 .cpu_name = "440EPX",
1718 .cpu_features = CPU_FTRS_44X,
1719 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001720 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001721 .icache_bsize = 32,
1722 .dcache_bsize = 32,
1723 .cpu_setup = __setup_cpu_440epx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001724 .machine_check = machine_check_440A,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001725 .platform = "ppc440",
1726 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001727 { /* 440GP Rev. B */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001728 .pvr_mask = 0xf0000fff,
1729 .pvr_value = 0x40000440,
1730 .cpu_name = "440GP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001731 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001732 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001733 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001734 .icache_bsize = 32,
1735 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001736 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001737 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001738 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001739 { /* 440GP Rev. C */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001740 .pvr_mask = 0xf0000fff,
1741 .pvr_value = 0x40000481,
1742 .cpu_name = "440GP 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 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001749 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001750 },
1751 { /* 440GX Rev. A */
1752 .pvr_mask = 0xf0000fff,
1753 .pvr_value = 0x50000850,
1754 .cpu_name = "440GX Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001755 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001756 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001757 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001758 .icache_bsize = 32,
1759 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001760 .cpu_setup = __setup_cpu_440gx,
1761 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001762 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001763 },
1764 { /* 440GX Rev. B */
1765 .pvr_mask = 0xf0000fff,
1766 .pvr_value = 0x50000851,
1767 .cpu_name = "440GX Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001768 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001769 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001770 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001771 .icache_bsize = 32,
1772 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001773 .cpu_setup = __setup_cpu_440gx,
1774 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001775 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001776 },
1777 { /* 440GX Rev. C */
1778 .pvr_mask = 0xf0000fff,
1779 .pvr_value = 0x50000892,
1780 .cpu_name = "440GX Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001781 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001782 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001783 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001784 .icache_bsize = 32,
1785 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001786 .cpu_setup = __setup_cpu_440gx,
1787 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001788 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001789 },
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001790 { /* 440GX Rev. F */
1791 .pvr_mask = 0xf0000fff,
1792 .pvr_value = 0x50000894,
1793 .cpu_name = "440GX Rev. F",
Kumar Gala10b35d92005-09-23 14:08:58 -05001794 .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,
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001797 .icache_bsize = 32,
1798 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001799 .cpu_setup = __setup_cpu_440gx,
1800 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001801 .platform = "ppc440",
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001802 },
Matt Porter656de7e2005-09-03 15:55:42 -07001803 { /* 440SP Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001804 .pvr_mask = 0xfff00fff,
1805 .pvr_value = 0x53200891,
Matt Porter656de7e2005-09-03 15:55:42 -07001806 .cpu_name = "440SP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001807 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001808 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001809 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porter656de7e2005-09-03 15:55:42 -07001810 .icache_bsize = 32,
1811 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001812 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001813 .platform = "ppc440",
Matt Porter656de7e2005-09-03 15:55:42 -07001814 },
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001815 { /* 440SPe Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001816 .pvr_mask = 0xfff00fff,
1817 .pvr_value = 0x53400890,
1818 .cpu_name = "440SPe Rev. A",
1819 .cpu_features = CPU_FTRS_44X,
1820 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001821 .mmu_features = MMU_FTR_TYPE_44x,
Roland Dreier333e6152007-06-16 05:36:32 +10001822 .icache_bsize = 32,
1823 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001824 .cpu_setup = __setup_cpu_440spe,
1825 .machine_check = machine_check_440A,
Roland Dreier333e6152007-06-16 05:36:32 +10001826 .platform = "ppc440",
1827 },
1828 { /* 440SPe Rev. B */
1829 .pvr_mask = 0xfff00fff,
1830 .pvr_value = 0x53400891,
1831 .cpu_name = "440SPe Rev. B",
Kumar Galaa147c582006-12-08 02:34:38 -06001832 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001833 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001834 .mmu_features = MMU_FTR_TYPE_44x,
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001835 .icache_bsize = 32,
1836 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001837 .cpu_setup = __setup_cpu_440spe,
1838 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001839 .platform = "ppc440",
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001840 },
John Linn23e72372008-07-01 09:42:07 -07001841 { /* 440 in Xilinx Virtex-5 FXT */
1842 .pvr_mask = 0xfffffff0,
1843 .pvr_value = 0x7ff21910,
1844 .cpu_name = "440 in Virtex-5 FXT",
1845 .cpu_features = CPU_FTRS_44X,
1846 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001847 .mmu_features = MMU_FTR_TYPE_44x,
John Linn23e72372008-07-01 09:42:07 -07001848 .icache_bsize = 32,
1849 .dcache_bsize = 32,
Grant Likely640d17d2008-12-04 05:39:55 +00001850 .cpu_setup = __setup_cpu_440x5,
1851 .machine_check = machine_check_440A,
John Linn23e72372008-07-01 09:42:07 -07001852 .platform = "ppc440",
1853 },
Stefan Roese464076a2008-02-24 08:07:41 +11001854 { /* 460EX */
Stefan Roese20d70342009-07-29 07:04:46 +00001855 .pvr_mask = 0xffff0006,
Stefan Roese464076a2008-02-24 08:07:41 +11001856 .pvr_value = 0x13020002,
1857 .cpu_name = "460EX",
Benjamin Herrenschmidt6d2170b2008-12-18 19:13:22 +00001858 .cpu_features = CPU_FTRS_440x6,
Stefan Roese464076a2008-02-24 08:07:41 +11001859 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001860 .mmu_features = MMU_FTR_TYPE_44x,
Stefan Roese464076a2008-02-24 08:07:41 +11001861 .icache_bsize = 32,
1862 .dcache_bsize = 32,
1863 .cpu_setup = __setup_cpu_460ex,
1864 .machine_check = machine_check_440A,
1865 .platform = "ppc440",
1866 },
Stefan Roese20d70342009-07-29 07:04:46 +00001867 { /* 460EX Rev B */
1868 .pvr_mask = 0xffff0007,
1869 .pvr_value = 0x13020004,
1870 .cpu_name = "460EX Rev. B",
1871 .cpu_features = CPU_FTRS_440x6,
1872 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1873 .mmu_features = MMU_FTR_TYPE_44x,
1874 .icache_bsize = 32,
1875 .dcache_bsize = 32,
1876 .cpu_setup = __setup_cpu_460ex,
1877 .machine_check = machine_check_440A,
1878 .platform = "ppc440",
1879 },
Stefan Roese464076a2008-02-24 08:07:41 +11001880 { /* 460GT */
Stefan Roese20d70342009-07-29 07:04:46 +00001881 .pvr_mask = 0xffff0006,
Stefan Roese464076a2008-02-24 08:07:41 +11001882 .pvr_value = 0x13020000,
1883 .cpu_name = "460GT",
Benjamin Herrenschmidt6d2170b2008-12-18 19:13:22 +00001884 .cpu_features = CPU_FTRS_440x6,
Josh Boyer939e6222008-06-11 07:52:40 -04001885 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001886 .mmu_features = MMU_FTR_TYPE_44x,
Stefan Roese464076a2008-02-24 08:07:41 +11001887 .icache_bsize = 32,
1888 .dcache_bsize = 32,
Josh Boyer939e6222008-06-11 07:52:40 -04001889 .cpu_setup = __setup_cpu_460gt,
Stefan Roese464076a2008-02-24 08:07:41 +11001890 .machine_check = machine_check_440A,
1891 .platform = "ppc440",
1892 },
Stefan Roese20d70342009-07-29 07:04:46 +00001893 { /* 460GT Rev B */
1894 .pvr_mask = 0xffff0007,
1895 .pvr_value = 0x13020005,
1896 .cpu_name = "460GT Rev. B",
1897 .cpu_features = CPU_FTRS_440x6,
1898 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1899 .mmu_features = MMU_FTR_TYPE_44x,
1900 .icache_bsize = 32,
1901 .dcache_bsize = 32,
1902 .cpu_setup = __setup_cpu_460gt,
1903 .machine_check = machine_check_440A,
1904 .platform = "ppc440",
1905 },
Madhulika Madishetty6c712092009-02-05 13:31:36 +00001906 { /* 460SX */
1907 .pvr_mask = 0xffffff00,
1908 .pvr_value = 0x13541800,
1909 .cpu_name = "460SX",
1910 .cpu_features = CPU_FTRS_44X,
1911 .cpu_user_features = COMMON_USER_BOOKE,
1912 .mmu_features = MMU_FTR_TYPE_44x,
1913 .icache_bsize = 32,
1914 .dcache_bsize = 32,
1915 .cpu_setup = __setup_cpu_460sx,
1916 .machine_check = machine_check_440A,
1917 .platform = "ppc440",
1918 },
Tirumala Marri6edc3232010-09-13 13:26:11 +00001919 { /* 464 in APM821xx */
Vinh Nguyen Huu Tuong7c801162011-12-20 02:43:34 +00001920 .pvr_mask = 0xfffffff0,
Tirumala Marri6edc3232010-09-13 13:26:11 +00001921 .pvr_value = 0x12C41C80,
1922 .cpu_name = "APM821XX",
1923 .cpu_features = CPU_FTRS_44X,
1924 .cpu_user_features = COMMON_USER_BOOKE |
1925 PPC_FEATURE_HAS_FPU,
1926 .mmu_features = MMU_FTR_TYPE_44x,
1927 .icache_bsize = 32,
1928 .dcache_bsize = 32,
1929 .cpu_setup = __setup_cpu_apm821xx,
1930 .machine_check = machine_check_440A,
1931 .platform = "ppc440",
1932 },
Michael Ellerman13fef7f2017-08-08 16:39:17 +10001933#ifdef CONFIG_PPC_47x
Dave Kleikampc48d0db2011-01-26 06:17:58 +00001934 { /* 476 DD2 core */
1935 .pvr_mask = 0xffffffff,
1936 .pvr_value = 0x11a52080,
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001937 .cpu_name = "476",
Dave Kleikampc48d0db2011-01-26 06:17:58 +00001938 .cpu_features = CPU_FTRS_47X | CPU_FTR_476_DD2,
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001939 .cpu_user_features = COMMON_USER_BOOKE |
1940 PPC_FEATURE_HAS_FPU,
1941 .mmu_features = MMU_FTR_TYPE_47x |
1942 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1943 .icache_bsize = 32,
1944 .dcache_bsize = 128,
Dave Kleikampfc5e7092010-03-05 03:43:18 +00001945 .machine_check = machine_check_47x,
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001946 .platform = "ppc470",
1947 },
Tony Breedsdf777bd2011-11-30 21:39:23 +00001948 { /* 476fpe */
1949 .pvr_mask = 0xffff0000,
1950 .pvr_value = 0x7ff50000,
1951 .cpu_name = "476fpe",
1952 .cpu_features = CPU_FTRS_47X | CPU_FTR_476_DD2,
1953 .cpu_user_features = COMMON_USER_BOOKE |
1954 PPC_FEATURE_HAS_FPU,
1955 .mmu_features = MMU_FTR_TYPE_47x |
1956 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1957 .icache_bsize = 32,
1958 .dcache_bsize = 128,
1959 .machine_check = machine_check_47x,
1960 .platform = "ppc470",
1961 },
Torez Smithb4e8c8d2010-03-05 10:45:54 +00001962 { /* 476 iss */
1963 .pvr_mask = 0xffff0000,
1964 .pvr_value = 0x00050000,
1965 .cpu_name = "476",
1966 .cpu_features = CPU_FTRS_47X,
1967 .cpu_user_features = COMMON_USER_BOOKE |
1968 PPC_FEATURE_HAS_FPU,
Torez Smithb4e8c8d2010-03-05 10:45:54 +00001969 .mmu_features = MMU_FTR_TYPE_47x |
1970 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1971 .icache_bsize = 32,
1972 .dcache_bsize = 128,
1973 .machine_check = machine_check_47x,
1974 .platform = "ppc470",
1975 },
Dave Kleikampc48d0db2011-01-26 06:17:58 +00001976 { /* 476 others */
1977 .pvr_mask = 0xffff0000,
1978 .pvr_value = 0x11a50000,
1979 .cpu_name = "476",
1980 .cpu_features = CPU_FTRS_47X,
1981 .cpu_user_features = COMMON_USER_BOOKE |
1982 PPC_FEATURE_HAS_FPU,
1983 .mmu_features = MMU_FTR_TYPE_47x |
1984 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1985 .icache_bsize = 32,
1986 .dcache_bsize = 128,
1987 .machine_check = machine_check_47x,
1988 .platform = "ppc470",
1989 },
Michael Ellerman13fef7f2017-08-08 16:39:17 +10001990#endif /* CONFIG_PPC_47x */
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001991 { /* default match */
1992 .pvr_mask = 0x00000000,
1993 .pvr_value = 0x00000000,
1994 .cpu_name = "(generic 44x PPC)",
1995 .cpu_features = CPU_FTRS_44X,
1996 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001997 .mmu_features = MMU_FTR_TYPE_44x,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001998 .icache_bsize = 32,
1999 .dcache_bsize = 32,
2000 .machine_check = machine_check_4xx,
2001 .platform = "ppc440",
2002 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07002003#endif /* CONFIG_44x */
Josh Boyere3e414b2007-12-24 08:44:47 -06002004#ifdef CONFIG_E200
Stephen Rothwell49209602005-10-12 15:55:09 +10002005 { /* e200z5 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07002006 .pvr_mask = 0xfff00000,
2007 .pvr_value = 0x81000000,
2008 .cpu_name = "e200z5",
2009 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05002010 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002011 .cpu_user_features = COMMON_USER_BOOKE |
2012 PPC_FEATURE_HAS_EFP_SINGLE |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07002013 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00002014 .mmu_features = MMU_FTR_TYPE_FSL_E,
Kumar Gala33d9e9b2005-06-25 14:54:37 -07002015 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11002016 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002017 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07002018 },
Stephen Rothwell49209602005-10-12 15:55:09 +10002019 { /* e200z6 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07002020 .pvr_mask = 0xfff00000,
2021 .pvr_value = 0x81100000,
2022 .cpu_name = "e200z6",
2023 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05002024 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002025 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05002026 PPC_FEATURE_HAS_SPE_COMP |
2027 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07002028 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00002029 .mmu_features = MMU_FTR_TYPE_FSL_E,
Kumar Gala33d9e9b2005-06-25 14:54:37 -07002030 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11002031 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002032 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07002033 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002034 { /* default match */
2035 .pvr_mask = 0x00000000,
2036 .pvr_value = 0x00000000,
2037 .cpu_name = "(generic E200 PPC)",
2038 .cpu_features = CPU_FTRS_E200,
2039 .cpu_user_features = COMMON_USER_BOOKE |
2040 PPC_FEATURE_HAS_EFP_SINGLE |
2041 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00002042 .mmu_features = MMU_FTR_TYPE_FSL_E,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002043 .dcache_bsize = 32,
Kumar Gala105c31d2009-01-08 08:31:20 -06002044 .cpu_setup = __setup_cpu_e200,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002045 .machine_check = machine_check_e200,
2046 .platform = "ppc5554",
Paul Mackerras516c8be2008-05-12 14:20:35 +10002047 }
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002048#endif /* CONFIG_E200 */
Kumar Gala4490c062010-10-08 08:32:11 -05002049#endif /* CONFIG_PPC32 */
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002050#ifdef CONFIG_E500
Kumar Gala4490c062010-10-08 08:32:11 -05002051#ifdef CONFIG_PPC32
Mihai Caraman3477e712014-08-20 16:09:03 +03002052#ifndef CONFIG_PPC_E500MC
Stephen Rothwell49209602005-10-12 15:55:09 +10002053 { /* e500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002054 .pvr_mask = 0xffff0000,
2055 .pvr_value = 0x80200000,
2056 .cpu_name = "e500",
Kumar Gala10b35d92005-09-23 14:08:58 -05002057 .cpu_features = CPU_FTRS_E500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002058 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05002059 PPC_FEATURE_HAS_SPE_COMP |
2060 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Nishanth Aravamudan6c1bf482013-05-04 16:01:17 +00002061 .cpu_user_features2 = PPC_FEATURE2_ISEL,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00002062 .mmu_features = MMU_FTR_TYPE_FSL_E,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002063 .icache_bsize = 32,
2064 .dcache_bsize = 32,
2065 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06002066 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06002067 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06002068 .cpu_setup = __setup_cpu_e500v1,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11002069 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002070 .platform = "ppc8540",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002071 },
Stephen Rothwell49209602005-10-12 15:55:09 +10002072 { /* e500v2 */
Kumar Gala5b37b702005-06-21 17:15:18 -07002073 .pvr_mask = 0xffff0000,
2074 .pvr_value = 0x80210000,
2075 .cpu_name = "e500v2",
Kumar Gala10b35d92005-09-23 14:08:58 -05002076 .cpu_features = CPU_FTRS_E500_2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002077 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05002078 PPC_FEATURE_HAS_SPE_COMP |
2079 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
2080 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
Nishanth Aravamudan6c1bf482013-05-04 16:01:17 +00002081 .cpu_user_features2 = PPC_FEATURE2_ISEL,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00002082 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS,
Kumar Gala5b37b702005-06-21 17:15:18 -07002083 .icache_bsize = 32,
2084 .dcache_bsize = 32,
2085 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06002086 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06002087 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06002088 .cpu_setup = __setup_cpu_e500v2,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11002089 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002090 .platform = "ppc8548",
chenhui zhaoe7affb12015-11-20 17:13:58 +08002091 .cpu_down_flush = cpu_down_flush_e500v2,
Kumar Gala5b37b702005-06-21 17:15:18 -07002092 },
Mihai Caraman3477e712014-08-20 16:09:03 +03002093#else
Kumar Gala3dfa8772008-06-16 09:41:32 -05002094 { /* e500mc */
2095 .pvr_mask = 0xffff0000,
2096 .pvr_value = 0x80230000,
2097 .cpu_name = "e500mc",
Kumar Gala3dfa8772008-06-16 09:41:32 -05002098 .cpu_features = CPU_FTRS_E500MC,
2099 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Nishanth Aravamudan6c1bf482013-05-04 16:01:17 +00002100 .cpu_user_features2 = PPC_FEATURE2_ISEL,
Kumar Galac3071952009-02-10 22:26:06 -06002101 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
Kumar Gala323d23a2009-04-23 08:51:22 -05002102 MMU_FTR_USE_TLBILX,
Kumar Gala3dfa8772008-06-16 09:41:32 -05002103 .icache_bsize = 64,
2104 .dcache_bsize = 64,
2105 .num_pmcs = 4,
Scott Wooda11106542010-02-25 18:09:45 -06002106 .oprofile_cpu_type = "ppc/e500mc",
Kumar Gala3dfa8772008-06-16 09:41:32 -05002107 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06002108 .cpu_setup = __setup_cpu_e500mc,
Scott Woodfe04b112010-04-08 00:38:22 -05002109 .machine_check = machine_check_e500mc,
Kumar Gala3dfa8772008-06-16 09:41:32 -05002110 .platform = "ppce500mc",
chenhui zhaoe7affb12015-11-20 17:13:58 +08002111 .cpu_down_flush = cpu_down_flush_e500mc,
Kumar Gala3dfa8772008-06-16 09:41:32 -05002112 },
Mihai Caraman3477e712014-08-20 16:09:03 +03002113#endif /* CONFIG_PPC_E500MC */
Kumar Gala4490c062010-10-08 08:32:11 -05002114#endif /* CONFIG_PPC32 */
Mihai Caraman3477e712014-08-20 16:09:03 +03002115#ifdef CONFIG_PPC_E500MC
Kumar Gala4490c062010-10-08 08:32:11 -05002116 { /* e5500 */
2117 .pvr_mask = 0xffff0000,
2118 .pvr_value = 0x80240000,
2119 .cpu_name = "e5500",
Kumar Gala11ed0db2011-04-06 00:11:06 -05002120 .cpu_features = CPU_FTRS_E5500,
Kumar Galafb9be232011-06-02 11:26:13 -05002121 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Nishanth Aravamudan6c1bf482013-05-04 16:01:17 +00002122 .cpu_user_features2 = PPC_FEATURE2_ISEL,
Kumar Gala4490c062010-10-08 08:32:11 -05002123 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
2124 MMU_FTR_USE_TLBILX,
2125 .icache_bsize = 64,
2126 .dcache_bsize = 64,
2127 .num_pmcs = 4,
2128 .oprofile_cpu_type = "ppc/e500mc",
2129 .oprofile_type = PPC_OPROFILE_FSL_EMB,
2130 .cpu_setup = __setup_cpu_e5500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05302131#ifndef CONFIG_PPC32
Kumar Gala4490c062010-10-08 08:32:11 -05002132 .cpu_restore = __restore_cpu_e5500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05302133#endif
Kumar Gala4490c062010-10-08 08:32:11 -05002134 .machine_check = machine_check_e500mc,
2135 .platform = "ppce5500",
chenhui zhaoe7affb12015-11-20 17:13:58 +08002136 .cpu_down_flush = cpu_down_flush_e5500,
Kumar Gala4490c062010-10-08 08:32:11 -05002137 },
Kumar Gala10241842011-11-06 11:51:07 -06002138 { /* e6500 */
2139 .pvr_mask = 0xffff0000,
2140 .pvr_value = 0x80400000,
2141 .cpu_name = "e6500",
2142 .cpu_features = CPU_FTRS_E6500,
Kumar Galacd66cc22012-09-07 15:57:17 -05002143 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU |
2144 PPC_FEATURE_HAS_ALTIVEC_COMP,
Nishanth Aravamudan6c1bf482013-05-04 16:01:17 +00002145 .cpu_user_features2 = PPC_FEATURE2_ISEL,
Kumar Gala10241842011-11-06 11:51:07 -06002146 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
2147 MMU_FTR_USE_TLBILX,
2148 .icache_bsize = 64,
2149 .dcache_bsize = 64,
Lijun Pan5815c432013-06-05 15:22:09 -05002150 .num_pmcs = 6,
Kumar Gala10241842011-11-06 11:51:07 -06002151 .oprofile_cpu_type = "ppc/e6500",
2152 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Galacd66cc22012-09-07 15:57:17 -05002153 .cpu_setup = __setup_cpu_e6500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05302154#ifndef CONFIG_PPC32
Kumar Galacd66cc22012-09-07 15:57:17 -05002155 .cpu_restore = __restore_cpu_e6500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05302156#endif
Kumar Gala10241842011-11-06 11:51:07 -06002157 .machine_check = machine_check_e500mc,
2158 .platform = "ppce6500",
chenhui zhaoe7affb12015-11-20 17:13:58 +08002159 .cpu_down_flush = cpu_down_flush_e6500,
Kumar Gala10241842011-11-06 11:51:07 -06002160 },
Mihai Caraman3477e712014-08-20 16:09:03 +03002161#endif /* CONFIG_PPC_E500MC */
Kumar Gala4490c062010-10-08 08:32:11 -05002162#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -07002163 { /* default match */
2164 .pvr_mask = 0x00000000,
2165 .pvr_value = 0x00000000,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002166 .cpu_name = "(generic E500 PPC)",
2167 .cpu_features = CPU_FTRS_E500,
2168 .cpu_user_features = COMMON_USER_BOOKE |
2169 PPC_FEATURE_HAS_SPE_COMP |
2170 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00002171 .mmu_features = MMU_FTR_TYPE_FSL_E,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002172 .icache_bsize = 32,
2173 .dcache_bsize = 32,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002174 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002175 .platform = "powerpc",
Paul Mackerras516c8be2008-05-12 14:20:35 +10002176 }
Stephen Rothwell49209602005-10-12 15:55:09 +10002177#endif /* CONFIG_PPC32 */
Kumar Gala4490c062010-10-08 08:32:11 -05002178#endif /* CONFIG_E500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002179};
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002180
Nicholas Piggin5a61ef72017-05-09 13:16:52 +10002181void __init set_cur_cpu_spec(struct cpu_spec *s)
2182{
2183 struct cpu_spec *t = &the_cpu_spec;
2184
2185 t = PTRRELOC(t);
2186 *t = *s;
2187
2188 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
2189}
Paul Mackerras87a72f92007-10-04 14:18:01 +10002190
Scott Wood26ee9762011-07-25 11:04:36 +00002191static struct cpu_spec * __init setup_cpu_spec(unsigned long offset,
2192 struct cpu_spec *s)
Michael Ellerman666435b2009-02-22 16:25:43 +00002193{
2194 struct cpu_spec *t = &the_cpu_spec;
Michael Ellerman2657dd42009-02-22 16:25:45 +00002195 struct cpu_spec old;
2196
Michael Ellerman666435b2009-02-22 16:25:43 +00002197 t = PTRRELOC(t);
Michael Ellerman2657dd42009-02-22 16:25:45 +00002198 old = *t;
2199
2200 /* Copy everything, then do fixups */
2201 *t = *s;
Michael Ellerman666435b2009-02-22 16:25:43 +00002202
2203 /*
2204 * If we are overriding a previous value derived from the real
2205 * PVR with a new value obtained using a logical PVR value,
2206 * don't modify the performance monitor fields.
2207 */
Michael Ellerman2657dd42009-02-22 16:25:45 +00002208 if (old.num_pmcs && !s->num_pmcs) {
2209 t->num_pmcs = old.num_pmcs;
2210 t->pmc_type = old.pmc_type;
2211 t->oprofile_type = old.oprofile_type;
2212 t->oprofile_mmcra_sihv = old.oprofile_mmcra_sihv;
2213 t->oprofile_mmcra_sipr = old.oprofile_mmcra_sipr;
2214 t->oprofile_mmcra_clear = old.oprofile_mmcra_clear;
2215
Michael Ellerman666435b2009-02-22 16:25:43 +00002216 /*
2217 * If we have passed through this logic once before and
2218 * have pulled the default case because the real PVR was
2219 * not found inside cpu_specs[], then we are possibly
2220 * running in compatibility mode. In that case, let the
2221 * oprofiler know which set of compatibility counters to
2222 * pull from by making sure the oprofile_cpu_type string
2223 * is set to that of compatibility mode. If the
2224 * oprofile_cpu_type already has a value, then we are
2225 * possibly overriding a real PVR with a logical one,
2226 * and, in that case, keep the current value for
2227 * oprofile_cpu_type.
2228 */
Benjamin Herrenschmidtb173f032009-05-14 18:34:06 +00002229 if (old.oprofile_cpu_type != NULL) {
Benjamin Herrenschmidt0203d6e2009-04-29 19:39:38 +00002230 t->oprofile_cpu_type = old.oprofile_cpu_type;
2231 t->oprofile_type = old.oprofile_type;
Michael Wolf79af6c42009-04-27 06:17:54 +00002232 }
Michael Ellerman2657dd42009-02-22 16:25:45 +00002233 }
Michael Ellerman666435b2009-02-22 16:25:43 +00002234
2235 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
2236
2237 /*
2238 * Set the base platform string once; assumes
2239 * we're called with real pvr first.
2240 */
2241 if (*PTRRELOC(&powerpc_base_platform) == NULL)
2242 *PTRRELOC(&powerpc_base_platform) = t->platform;
2243
2244#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
2245 /* ppc64 and booke expect identify_cpu to also call setup_cpu for
2246 * that processor. I will consolidate that at a later time, for now,
2247 * just use #ifdef. We also don't need to PTRRELOC the function
2248 * pointer on ppc64 and booke as we are running at 0 in real mode
2249 * on ppc64 and reloc_offset is always 0 on booke.
2250 */
Benjamin Herrenschmidtaf9eef32011-01-20 20:36:03 +00002251 if (t->cpu_setup) {
2252 t->cpu_setup(offset, t);
Michael Ellerman666435b2009-02-22 16:25:43 +00002253 }
2254#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
Scott Wood26ee9762011-07-25 11:04:36 +00002255
2256 return t;
Michael Ellerman666435b2009-02-22 16:25:43 +00002257}
2258
Paul Mackerras87a72f92007-10-04 14:18:01 +10002259struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002260{
2261 struct cpu_spec *s = cpu_specs;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002262 int i;
2263
2264 s = PTRRELOC(s);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002265
Michael Ellerman666435b2009-02-22 16:25:43 +00002266 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) {
Scott Wood26ee9762011-07-25 11:04:36 +00002267 if ((pvr & s->pvr_mask) == s->pvr_value)
2268 return setup_cpu_spec(offset, s);
Michael Ellerman666435b2009-02-22 16:25:43 +00002269 }
2270
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002271 BUG();
Michael Ellerman666435b2009-02-22 16:25:43 +00002272
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002273 return NULL;
2274}
Kevin Hao4db73272016-07-23 14:42:41 +05302275
Nicholas Piggin5a61ef72017-05-09 13:16:52 +10002276/*
2277 * Used by cpufeatures to get the name for CPUs with a PVR table.
2278 * If they don't hae a PVR table, cpufeatures gets the name from
2279 * cpu device-tree node.
2280 */
2281void __init identify_cpu_name(unsigned int pvr)
2282{
2283 struct cpu_spec *s = cpu_specs;
2284 struct cpu_spec *t = &the_cpu_spec;
2285 int i;
2286
2287 s = PTRRELOC(s);
2288 t = PTRRELOC(t);
2289
2290 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) {
2291 if ((pvr & s->pvr_mask) == s->pvr_value) {
2292 t->cpu_name = s->cpu_name;
2293 return;
2294 }
2295 }
2296}
2297
2298
Kevin Hao4db73272016-07-23 14:42:41 +05302299#ifdef CONFIG_JUMP_LABEL_FEATURE_CHECKS
2300struct static_key_true cpu_feature_keys[NUM_CPU_FTR_KEYS] = {
2301 [0 ... NUM_CPU_FTR_KEYS - 1] = STATIC_KEY_TRUE_INIT
2302};
2303EXPORT_SYMBOL_GPL(cpu_feature_keys);
2304
2305void __init cpu_feature_keys_init(void)
2306{
2307 int i;
2308
2309 for (i = 0; i < NUM_CPU_FTR_KEYS; i++) {
2310 unsigned long f = 1ul << i;
2311
2312 if (!(cur_cpu_spec->cpu_features & f))
2313 static_branch_disable(&cpu_feature_keys[i]);
2314 }
2315}
Kevin Haoc12e6f22016-07-23 14:42:42 +05302316
2317struct static_key_true mmu_feature_keys[NUM_MMU_FTR_KEYS] = {
2318 [0 ... NUM_MMU_FTR_KEYS - 1] = STATIC_KEY_TRUE_INIT
2319};
2320EXPORT_SYMBOL_GPL(mmu_feature_keys);
2321
2322void __init mmu_feature_keys_init(void)
2323{
2324 int i;
2325
2326 for (i = 0; i < NUM_MMU_FTR_KEYS; i++) {
2327 unsigned long f = 1ul << i;
2328
2329 if (!(cur_cpu_spec->mmu_features & f))
2330 static_branch_disable(&mmu_feature_keys[i]);
2331 }
2332}
Kevin Hao4db73272016-07-23 14:42:41 +05302333#endif