blob: bfe5f4a2886beb379f067a81c4331abe58585457 [file] [log] [blame]
Thomas Gleixner2874c5f2019-05-27 08:55:01 +02001// SPDX-License-Identifier: GPL-2.0-or-later
Linus Torvalds1da177e2005-04-16 15:20:36 -07002/*
Linus Torvalds1da177e2005-04-16 15:20:36 -07003 * Copyright (C) 2001 Ben. Herrenschmidt (benh@kernel.crashing.org)
4 *
Stephen Rothwell49209602005-10-12 15:55:09 +10005 * Modifications for ppc64:
6 * Copyright (C) 2003 Dave Engebretsen <engebret@us.ibm.com>
Linus Torvalds1da177e2005-04-16 15:20:36 -07007 */
8
Linus Torvalds1da177e2005-04-16 15:20:36 -07009#include <linux/string.h>
10#include <linux/sched.h>
11#include <linux/threads.h>
12#include <linux/init.h>
Paul Gortmaker4b16f8e2011-07-22 18:24:23 -040013#include <linux/export.h>
Kevin Hao4db73272016-07-23 14:42:41 +053014#include <linux/jump_label.h>
Kumar Gala400d2212005-09-27 15:13:12 -050015
16#include <asm/oprofile_impl.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070017#include <asm/cputable.h>
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +100018#include <asm/prom.h> /* for PTRRELOC on ARCH=ppc */
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +000019#include <asm/mmu.h>
David Howellsae3a1972012-03-28 18:30:02 +010020#include <asm/setup.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070021
Nicholas Piggin5a61ef72017-05-09 13:16:52 +100022static struct cpu_spec the_cpu_spec __read_mostly;
23
24struct cpu_spec* cur_cpu_spec __read_mostly = NULL;
Stephen Rothwell49209602005-10-12 15:55:09 +100025EXPORT_SYMBOL(cur_cpu_spec);
Linus Torvalds1da177e2005-04-16 15:20:36 -070026
Nathan Lynch9115d132008-07-16 09:58:51 +100027/* The platform string corresponding to the real PVR */
28const char *powerpc_base_platform;
29
Stephen Rothwell49209602005-10-12 15:55:09 +100030/* NOTE:
31 * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's
32 * the responsibility of the appropriate CPU save/restore functions to
33 * eventually copy these settings over. Those save/restore aren't yet
34 * part of the cputable though. That has to be fixed for both ppc32
35 * and ppc64
36 */
Geoff Levandb26f1002006-05-19 14:24:18 +100037#ifdef CONFIG_PPC32
Kumar Gala105c31d2009-01-08 08:31:20 -060038extern void __setup_cpu_e200(unsigned long offset, struct cpu_spec* spec);
39extern void __setup_cpu_e500v1(unsigned long offset, struct cpu_spec* spec);
40extern void __setup_cpu_e500v2(unsigned long offset, struct cpu_spec* spec);
41extern void __setup_cpu_e500mc(unsigned long offset, struct cpu_spec* spec);
Valentine Barshak81127532007-09-22 00:46:57 +100042extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
43extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110044extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
Valentine Barshak340ffd22007-09-22 00:50:09 +100045extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110046extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
Grant Likely640d17d2008-12-04 05:39:55 +000047extern void __setup_cpu_440x5(unsigned long offset, struct cpu_spec* spec);
Stefan Roese464076a2008-02-24 08:07:41 +110048extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec);
Josh Boyer939e6222008-06-11 07:52:40 -040049extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec);
Madhulika Madishetty6c712092009-02-05 13:31:36 +000050extern void __setup_cpu_460sx(unsigned long offset, struct cpu_spec *spec);
Tirumala Marri6edc3232010-09-13 13:26:11 +000051extern void __setup_cpu_apm821xx(unsigned long offset, struct cpu_spec *spec);
Kumar Gala400d2212005-09-27 15:13:12 -050052extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
53extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
54extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
55extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
56extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
57extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
58extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
59extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell49209602005-10-12 15:55:09 +100060#endif /* CONFIG_PPC32 */
Olof Johanssonf39b7a52006-08-11 00:07:08 -050061#ifdef CONFIG_PPC64
Kumar Gala400d2212005-09-27 15:13:12 -050062extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
Olof Johansson5b43d202006-10-04 23:41:41 -050063extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
Olof Johansson11999192007-02-04 16:36:51 -060064extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell40d244d2007-02-12 22:10:48 +110065extern void __restore_cpu_pa6t(void);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050066extern void __restore_cpu_ppc970(void);
Michael Neulinge952e6c2008-06-18 10:47:26 +100067extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec);
68extern void __restore_cpu_power7(void);
Michael Neulingaec937b2012-10-30 19:34:14 +000069extern void __setup_cpu_power8(unsigned long offset, struct cpu_spec* spec);
70extern void __restore_cpu_power8(void);
Michael Neulingc3ab3002016-02-19 11:16:24 +110071extern void __setup_cpu_power9(unsigned long offset, struct cpu_spec* spec);
72extern void __restore_cpu_power9(void);
Mahesh Salgaonkare22a2272013-10-30 20:05:11 +053073extern long __machine_check_early_realmode_p7(struct pt_regs *regs);
Mahesh Salgaonkarae744f32013-10-30 20:05:26 +053074extern long __machine_check_early_realmode_p8(struct pt_regs *regs);
Nicholas Piggin7b9f71f92017-02-28 12:00:48 +100075extern long __machine_check_early_realmode_p9(struct pt_regs *regs);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050076#endif /* CONFIG_PPC64 */
Kumar Gala4490c062010-10-08 08:32:11 -050077#if defined(CONFIG_E500)
78extern void __setup_cpu_e5500(unsigned long offset, struct cpu_spec* spec);
Kumar Galacd66cc22012-09-07 15:57:17 -050079extern void __setup_cpu_e6500(unsigned long offset, struct cpu_spec* spec);
Kumar Gala4490c062010-10-08 08:32:11 -050080extern void __restore_cpu_e5500(void);
Kumar Galacd66cc22012-09-07 15:57:17 -050081extern void __restore_cpu_e6500(void);
Kumar Gala4490c062010-10-08 08:32:11 -050082#endif /* CONFIG_E500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070083
Linus Torvalds1da177e2005-04-16 15:20:36 -070084/* This table only contains "desktop" CPUs, it need to be filled with embedded
85 * ones as well...
86 */
Stephen Rothwell49209602005-10-12 15:55:09 +100087#define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
88 PPC_FEATURE_HAS_MMU)
89#define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +110090#define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
Benjamin Herrenschmidtaa5cb0212006-03-01 15:07:07 +110091#define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
92 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
93#define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
94 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
Anton Blanchard03054d52006-04-29 09:51:06 +100095#define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
Paul Mackerrasfab5db92006-06-07 16:14:40 +100096 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
Nathan Lynch0f473312008-07-10 01:06:57 +100097 PPC_FEATURE_TRUE_LE | \
98 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Michael Neulinge952e6c2008-06-18 10:47:26 +100099#define COMMON_USER_POWER7 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
100 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
Nathan Lynch0f473312008-07-10 01:06:57 +1000101 PPC_FEATURE_TRUE_LE | \
102 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Nishanth Aravamudan4a1ae4f2013-05-03 14:48:38 +0000103#define COMMON_USER2_POWER7 (PPC_FEATURE2_DSCR)
Michael Neuling71e18492012-10-30 19:34:15 +0000104#define COMMON_USER_POWER8 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
105 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
106 PPC_FEATURE_TRUE_LE | \
107 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Nishanth Aravamudan748645b2013-05-03 14:49:59 +0000108#define COMMON_USER2_POWER8 (PPC_FEATURE2_ARCH_2_07 | \
Sam bobroffb4b56f92015-06-12 11:06:32 +1000109 PPC_FEATURE2_HTM_COMP | \
110 PPC_FEATURE2_HTM_NOSC_COMP | \
111 PPC_FEATURE2_DSCR | \
Benjamin Herrenschmidtdd58a092014-06-10 15:04:40 +1000112 PPC_FEATURE2_ISEL | PPC_FEATURE2_TAR | \
113 PPC_FEATURE2_VEC_CRYPTO)
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500114#define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
115 PPC_FEATURE_TRUE_LE | \
116 PPC_FEATURE_HAS_ALTIVEC_COMP)
Michael Neulingc3ab3002016-02-19 11:16:24 +1100117#define COMMON_USER_POWER9 COMMON_USER_POWER8
118#define COMMON_USER2_POWER9 (COMMON_USER2_POWER8 | \
119 PPC_FEATURE2_ARCH_3_00 | \
Nicholas Piggina4700a22017-05-20 14:29:49 +1000120 PPC_FEATURE2_HAS_IEEE128 | \
121 PPC_FEATURE2_DARN )
Michael Neulingc3ab3002016-02-19 11:16:24 +1100122
Kumar Galaf45c4482009-08-18 19:08:30 +0000123#ifdef CONFIG_PPC_BOOK3E_64
124#define COMMON_USER_BOOKE (COMMON_USER_PPC64 | PPC_FEATURE_BOOKE)
125#else
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100126#define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
127 PPC_FEATURE_BOOKE)
Kumar Galaf45c4482009-08-18 19:08:30 +0000128#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -0700129
Paul Mackerras87a72f92007-10-04 14:18:01 +1000130static struct cpu_spec __initdata cpu_specs[] = {
Benjamin Herrenschmidt2d27cfd2009-07-23 23:15:59 +0000131#ifdef CONFIG_PPC_BOOK3S_64
Stephen Rothwell49209602005-10-12 15:55:09 +1000132 { /* PPC970 */
133 .pvr_mask = 0xffff0000,
134 .pvr_value = 0x00390000,
135 .cpu_name = "PPC970",
136 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100137 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000138 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000139 .mmu_features = MMU_FTRS_PPC970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000140 .icache_bsize = 128,
141 .dcache_bsize = 128,
142 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600143 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000144 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500145 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000146 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000147 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100148 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000149 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000150 { /* PPC970FX */
151 .pvr_mask = 0xffff0000,
152 .pvr_value = 0x003c0000,
153 .cpu_name = "PPC970FX",
Stephen Rothwell49209602005-10-12 15:55:09 +1000154 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100155 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000156 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000157 .mmu_features = MMU_FTRS_PPC970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000158 .icache_bsize = 128,
159 .dcache_bsize = 128,
160 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600161 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000162 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500163 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000164 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000165 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100166 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000167 },
Olof Johansson3546e812007-02-26 00:35:14 -0600168 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
169 .pvr_mask = 0xffffffff,
170 .pvr_value = 0x00440100,
171 .cpu_name = "PPC970MP",
172 .cpu_features = CPU_FTRS_PPC970,
173 .cpu_user_features = COMMON_USER_POWER4 |
174 PPC_FEATURE_HAS_ALTIVEC_COMP,
Benjamin Herrenschmidtd63ac5f2013-03-13 09:55:02 +1100175 .mmu_features = MMU_FTRS_PPC970,
Olof Johansson3546e812007-02-26 00:35:14 -0600176 .icache_bsize = 128,
177 .dcache_bsize = 128,
178 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000179 .pmc_type = PPC_PMC_IBM,
Olof Johansson3546e812007-02-26 00:35:14 -0600180 .cpu_setup = __setup_cpu_ppc970,
181 .cpu_restore = __restore_cpu_ppc970,
182 .oprofile_cpu_type = "ppc64/970MP",
183 .oprofile_type = PPC_OPROFILE_POWER4,
184 .platform = "ppc970",
185 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000186 { /* PPC970MP */
187 .pvr_mask = 0xffff0000,
188 .pvr_value = 0x00440000,
189 .cpu_name = "PPC970MP",
190 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100191 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000192 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000193 .mmu_features = MMU_FTRS_PPC970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000194 .icache_bsize = 128,
195 .dcache_bsize = 128,
Anton Blanchard87af41b2006-05-05 05:44:26 +1000196 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000197 .pmc_type = PPC_PMC_IBM,
Olof Johansson5b43d202006-10-04 23:41:41 -0500198 .cpu_setup = __setup_cpu_ppc970MP,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500199 .cpu_restore = __restore_cpu_ppc970,
Mike Wolffecb3522006-11-21 14:41:54 -0600200 .oprofile_cpu_type = "ppc64/970MP",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000201 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100202 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000203 },
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500204 { /* PPC970GX */
205 .pvr_mask = 0xffff0000,
206 .pvr_value = 0x00450000,
207 .cpu_name = "PPC970GX",
208 .cpu_features = CPU_FTRS_PPC970,
209 .cpu_user_features = COMMON_USER_POWER4 |
210 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000211 .mmu_features = MMU_FTRS_PPC970,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500212 .icache_bsize = 128,
213 .dcache_bsize = 128,
214 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600215 .pmc_type = PPC_PMC_IBM,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500216 .cpu_setup = __setup_cpu_ppc970,
217 .oprofile_cpu_type = "ppc64/970",
218 .oprofile_type = PPC_OPROFILE_POWER4,
219 .platform = "ppc970",
220 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100221 { /* Power5 GR */
Stephen Rothwell49209602005-10-12 15:55:09 +1000222 .pvr_mask = 0xffff0000,
223 .pvr_value = 0x003a0000,
224 .cpu_name = "POWER5 (gr)",
225 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100226 .cpu_user_features = COMMON_USER_POWER5,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000227 .mmu_features = MMU_FTRS_POWER5,
Stephen Rothwell49209602005-10-12 15:55:09 +1000228 .icache_bsize = 128,
229 .dcache_bsize = 128,
230 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600231 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000232 .oprofile_cpu_type = "ppc64/power5",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000233 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000234 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
235 * and above but only works on POWER5 and above
236 */
237 .oprofile_mmcra_sihv = MMCRA_SIHV,
238 .oprofile_mmcra_sipr = MMCRA_SIPR,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100239 .platform = "power5",
Stephen Rothwell49209602005-10-12 15:55:09 +1000240 },
Mike Wolf31a12ce2007-07-10 13:13:47 -0500241 { /* Power5++ */
242 .pvr_mask = 0xffffff00,
243 .pvr_value = 0x003b0300,
244 .cpu_name = "POWER5+ (gs)",
245 .cpu_features = CPU_FTRS_POWER5,
246 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000247 .mmu_features = MMU_FTRS_POWER5,
Mike Wolf31a12ce2007-07-10 13:13:47 -0500248 .icache_bsize = 128,
249 .dcache_bsize = 128,
250 .num_pmcs = 6,
251 .oprofile_cpu_type = "ppc64/power5++",
252 .oprofile_type = PPC_OPROFILE_POWER4,
253 .oprofile_mmcra_sihv = MMCRA_SIHV,
254 .oprofile_mmcra_sipr = MMCRA_SIPR,
255 .platform = "power5+",
256 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100257 { /* Power5 GS */
Stephen Rothwell49209602005-10-12 15:55:09 +1000258 .pvr_mask = 0xffff0000,
259 .pvr_value = 0x003b0000,
Anton Blanchard834608f2006-01-09 15:42:30 +1100260 .cpu_name = "POWER5+ (gs)",
Stephen Rothwell49209602005-10-12 15:55:09 +1000261 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100262 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000263 .mmu_features = MMU_FTRS_POWER5,
Stephen Rothwell49209602005-10-12 15:55:09 +1000264 .icache_bsize = 128,
265 .dcache_bsize = 128,
266 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600267 .pmc_type = PPC_PMC_IBM,
Anton Blanchard834608f2006-01-09 15:42:30 +1100268 .oprofile_cpu_type = "ppc64/power5+",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000269 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000270 .oprofile_mmcra_sihv = MMCRA_SIHV,
271 .oprofile_mmcra_sipr = MMCRA_SIPR,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100272 .platform = "power5+",
Stephen Rothwell49209602005-10-12 15:55:09 +1000273 },
Paul Mackerras974a76f2006-11-10 20:38:53 +1100274 { /* POWER6 in P5+ mode; 2.04-compliant processor */
275 .pvr_mask = 0xffffffff,
276 .pvr_value = 0x0f000001,
277 .cpu_name = "POWER5+",
278 .cpu_features = CPU_FTRS_POWER5,
279 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000280 .mmu_features = MMU_FTRS_POWER5,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100281 .icache_bsize = 128,
282 .dcache_bsize = 128,
Michael Wolf79af6c42009-04-27 06:17:54 +0000283 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
284 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100285 .platform = "power5+",
286 },
Anton Blanchard03054d52006-04-29 09:51:06 +1000287 { /* Power6 */
288 .pvr_mask = 0xffff0000,
289 .pvr_value = 0x003e0000,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100290 .cpu_name = "POWER6 (raw)",
291 .cpu_features = CPU_FTRS_POWER6,
292 .cpu_user_features = COMMON_USER_POWER6 |
293 PPC_FEATURE_POWER6_EXT,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000294 .mmu_features = MMU_FTRS_POWER6,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100295 .icache_bsize = 128,
296 .dcache_bsize = 128,
297 .num_pmcs = 6,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000298 .pmc_type = PPC_PMC_IBM,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100299 .oprofile_cpu_type = "ppc64/power6",
300 .oprofile_type = PPC_OPROFILE_POWER4,
301 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
302 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
303 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
304 POWER6_MMCRA_OTHER,
305 .platform = "power6x",
306 },
307 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
308 .pvr_mask = 0xffffffff,
309 .pvr_value = 0x0f000002,
310 .cpu_name = "POWER6 (architected)",
Anton Blanchard03054d52006-04-29 09:51:06 +1000311 .cpu_features = CPU_FTRS_POWER6,
312 .cpu_user_features = COMMON_USER_POWER6,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000313 .mmu_features = MMU_FTRS_POWER6,
Anton Blanchard03054d52006-04-29 09:51:06 +1000314 .icache_bsize = 128,
315 .dcache_bsize = 128,
Michael Wolf79af6c42009-04-27 06:17:54 +0000316 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
317 .oprofile_type = PPC_OPROFILE_POWER4,
Anton Blanchard03054d52006-04-29 09:51:06 +1000318 .platform = "power6",
319 },
Joel Schopp635f5a62008-06-19 06:18:21 +1000320 { /* 2.06-compliant processor, i.e. Power7 "architected" mode */
321 .pvr_mask = 0xffffffff,
322 .pvr_value = 0x0f000003,
323 .cpu_name = "POWER7 (architected)",
324 .cpu_features = CPU_FTRS_POWER7,
325 .cpu_user_features = COMMON_USER_POWER7,
Nishanth Aravamudan4a1ae4f2013-05-03 14:48:38 +0000326 .cpu_user_features2 = COMMON_USER2_POWER7,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000327 .mmu_features = MMU_FTRS_POWER7,
Joel Schopp635f5a62008-06-19 06:18:21 +1000328 .icache_bsize = 128,
329 .dcache_bsize = 128,
Michael Wolf79af6c42009-04-27 06:17:54 +0000330 .oprofile_type = PPC_OPROFILE_POWER4,
331 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
Benjamin Herrenschmidt24cc67d2011-01-20 18:50:55 +1100332 .cpu_setup = __setup_cpu_power7,
333 .cpu_restore = __restore_cpu_power7,
Mahesh Salgaonkare22a2272013-10-30 20:05:11 +0530334 .machine_check_early = __machine_check_early_realmode_p7,
Joel Schopp635f5a62008-06-19 06:18:21 +1000335 .platform = "power7",
336 },
Michael Neulingc674e702012-11-08 20:26:42 +0000337 { /* 2.07-compliant processor, i.e. Power8 "architected" mode */
338 .pvr_mask = 0xffffffff,
339 .pvr_value = 0x0f000004,
340 .cpu_name = "POWER8 (architected)",
341 .cpu_features = CPU_FTRS_POWER8,
342 .cpu_user_features = COMMON_USER_POWER8,
Nishanth Aravamudan748645b2013-05-03 14:49:59 +0000343 .cpu_user_features2 = COMMON_USER2_POWER8,
Michael Neulingc674e702012-11-08 20:26:42 +0000344 .mmu_features = MMU_FTRS_POWER8,
345 .icache_bsize = 128,
346 .dcache_bsize = 128,
Michael Neuling6a60f9e72013-06-04 19:38:54 +0000347 .oprofile_type = PPC_OPROFILE_INVALID,
348 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
Michael Neulingc674e702012-11-08 20:26:42 +0000349 .cpu_setup = __setup_cpu_power8,
350 .cpu_restore = __restore_cpu_power8,
Mahesh Salgaonkarae744f32013-10-30 20:05:26 +0530351 .machine_check_early = __machine_check_early_realmode_p8,
Michael Neulingc674e702012-11-08 20:26:42 +0000352 .platform = "power8",
353 },
Russell Currey6ae3f8a2017-02-17 13:01:35 +1100354 { /* 3.00-compliant processor, i.e. Power9 "architected" mode */
355 .pvr_mask = 0xffffffff,
356 .pvr_value = 0x0f000005,
357 .cpu_name = "POWER9 (architected)",
358 .cpu_features = CPU_FTRS_POWER9,
359 .cpu_user_features = COMMON_USER_POWER9,
360 .cpu_user_features2 = COMMON_USER2_POWER9,
361 .mmu_features = MMU_FTRS_POWER9,
362 .icache_bsize = 128,
363 .dcache_bsize = 128,
364 .oprofile_type = PPC_OPROFILE_INVALID,
365 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
366 .cpu_setup = __setup_cpu_power9,
367 .cpu_restore = __restore_cpu_power9,
Russell Currey6ae3f8a2017-02-17 13:01:35 +1100368 .platform = "power9",
369 },
Michael Neulinge952e6c2008-06-18 10:47:26 +1000370 { /* Power7 */
371 .pvr_mask = 0xffff0000,
372 .pvr_value = 0x003f0000,
Joel Schopp635f5a62008-06-19 06:18:21 +1000373 .cpu_name = "POWER7 (raw)",
Michael Neulinge952e6c2008-06-18 10:47:26 +1000374 .cpu_features = CPU_FTRS_POWER7,
375 .cpu_user_features = COMMON_USER_POWER7,
Nishanth Aravamudan4a1ae4f2013-05-03 14:48:38 +0000376 .cpu_user_features2 = COMMON_USER2_POWER7,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000377 .mmu_features = MMU_FTRS_POWER7,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000378 .icache_bsize = 128,
379 .dcache_bsize = 128,
380 .num_pmcs = 6,
381 .pmc_type = PPC_PMC_IBM,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000382 .oprofile_cpu_type = "ppc64/power7",
383 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt24cc67d2011-01-20 18:50:55 +1100384 .cpu_setup = __setup_cpu_power7,
385 .cpu_restore = __restore_cpu_power7,
Mahesh Salgaonkare22a2272013-10-30 20:05:11 +0530386 .machine_check_early = __machine_check_early_realmode_p7,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000387 .platform = "power7",
388 },
Michael Neuling6f08cb32010-11-17 18:52:44 +0000389 { /* Power7+ */
390 .pvr_mask = 0xffff0000,
391 .pvr_value = 0x004A0000,
392 .cpu_name = "POWER7+ (raw)",
393 .cpu_features = CPU_FTRS_POWER7,
394 .cpu_user_features = COMMON_USER_POWER7,
Will Schmidtbadec112013-05-20 05:04:18 +0000395 .cpu_user_features2 = COMMON_USER2_POWER7,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000396 .mmu_features = MMU_FTRS_POWER7,
Michael Neuling6f08cb32010-11-17 18:52:44 +0000397 .icache_bsize = 128,
398 .dcache_bsize = 128,
399 .num_pmcs = 6,
400 .pmc_type = PPC_PMC_IBM,
401 .oprofile_cpu_type = "ppc64/power7",
402 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt24cc67d2011-01-20 18:50:55 +1100403 .cpu_setup = __setup_cpu_power7,
404 .cpu_restore = __restore_cpu_power7,
Mahesh Salgaonkare22a2272013-10-30 20:05:11 +0530405 .machine_check_early = __machine_check_early_realmode_p7,
Michael Neuling6f08cb32010-11-17 18:52:44 +0000406 .platform = "power7+",
407 },
Michael Neuling33959f82013-07-18 11:31:51 +1000408 { /* Power8E */
Michael Neuling71e18492012-10-30 19:34:15 +0000409 .pvr_mask = 0xffff0000,
410 .pvr_value = 0x004b0000,
Michael Neuling33959f82013-07-18 11:31:51 +1000411 .cpu_name = "POWER8E (raw)",
Michael Ellerman68f2f0d2014-03-14 16:00:28 +1100412 .cpu_features = CPU_FTRS_POWER8E,
Michael Neuling33959f82013-07-18 11:31:51 +1000413 .cpu_user_features = COMMON_USER_POWER8,
414 .cpu_user_features2 = COMMON_USER2_POWER8,
415 .mmu_features = MMU_FTRS_POWER8,
416 .icache_bsize = 128,
417 .dcache_bsize = 128,
418 .num_pmcs = 6,
419 .pmc_type = PPC_PMC_IBM,
420 .oprofile_cpu_type = "ppc64/power8",
421 .oprofile_type = PPC_OPROFILE_INVALID,
422 .cpu_setup = __setup_cpu_power8,
423 .cpu_restore = __restore_cpu_power8,
Mahesh Salgaonkarae744f32013-10-30 20:05:26 +0530424 .machine_check_early = __machine_check_early_realmode_p8,
Michael Neuling33959f82013-07-18 11:31:51 +1000425 .platform = "power8",
426 },
Benjamin Herrenschmidtddee09c2015-03-19 14:12:06 +1100427 { /* Power8NVL */
428 .pvr_mask = 0xffff0000,
429 .pvr_value = 0x004c0000,
430 .cpu_name = "POWER8NVL (raw)",
431 .cpu_features = CPU_FTRS_POWER8,
432 .cpu_user_features = COMMON_USER_POWER8,
433 .cpu_user_features2 = COMMON_USER2_POWER8,
434 .mmu_features = MMU_FTRS_POWER8,
435 .icache_bsize = 128,
436 .dcache_bsize = 128,
437 .num_pmcs = 6,
438 .pmc_type = PPC_PMC_IBM,
439 .oprofile_cpu_type = "ppc64/power8",
440 .oprofile_type = PPC_OPROFILE_INVALID,
441 .cpu_setup = __setup_cpu_power8,
442 .cpu_restore = __restore_cpu_power8,
Benjamin Herrenschmidtddee09c2015-03-19 14:12:06 +1100443 .machine_check_early = __machine_check_early_realmode_p8,
444 .platform = "power8",
445 },
Michael Neuling33959f82013-07-18 11:31:51 +1000446 { /* Power8 */
447 .pvr_mask = 0xffff0000,
448 .pvr_value = 0x004d0000,
Michael Neuling71e18492012-10-30 19:34:15 +0000449 .cpu_name = "POWER8 (raw)",
450 .cpu_features = CPU_FTRS_POWER8,
451 .cpu_user_features = COMMON_USER_POWER8,
Nishanth Aravamudan748645b2013-05-03 14:49:59 +0000452 .cpu_user_features2 = COMMON_USER2_POWER8,
Michael Neuling71e18492012-10-30 19:34:15 +0000453 .mmu_features = MMU_FTRS_POWER8,
454 .icache_bsize = 128,
455 .dcache_bsize = 128,
456 .num_pmcs = 6,
457 .pmc_type = PPC_PMC_IBM,
Michael Neuling6a60f9e72013-06-04 19:38:54 +0000458 .oprofile_cpu_type = "ppc64/power8",
459 .oprofile_type = PPC_OPROFILE_INVALID,
Michael Neuling71e18492012-10-30 19:34:15 +0000460 .cpu_setup = __setup_cpu_power8,
461 .cpu_restore = __restore_cpu_power8,
Mahesh Salgaonkarae744f32013-10-30 20:05:26 +0530462 .machine_check_early = __machine_check_early_realmode_p8,
Michael Neuling71e18492012-10-30 19:34:15 +0000463 .platform = "power8",
464 },
Nicholas Pigginb6b37552017-11-03 15:13:19 +1100465 { /* Power9 DD2.0 */
466 .pvr_mask = 0xffffefff,
467 .pvr_value = 0x004e0200,
468 .cpu_name = "POWER9 (raw)",
Michael Ellerman3ffa9d92017-11-15 14:25:42 +1100469 .cpu_features = CPU_FTRS_POWER9_DD2_0,
Nicholas Pigginb6b37552017-11-03 15:13:19 +1100470 .cpu_user_features = COMMON_USER_POWER9,
471 .cpu_user_features2 = COMMON_USER2_POWER9,
472 .mmu_features = MMU_FTRS_POWER9,
473 .icache_bsize = 128,
474 .dcache_bsize = 128,
475 .num_pmcs = 6,
476 .pmc_type = PPC_PMC_IBM,
477 .oprofile_cpu_type = "ppc64/power9",
478 .oprofile_type = PPC_OPROFILE_INVALID,
479 .cpu_setup = __setup_cpu_power9,
480 .cpu_restore = __restore_cpu_power9,
Nicholas Pigginb6b37552017-11-03 15:13:19 +1100481 .machine_check_early = __machine_check_early_realmode_p9,
482 .platform = "power9",
483 },
Paul Mackerrasb5af4f22018-03-21 21:31:59 +1100484 { /* Power9 DD 2.1 */
485 .pvr_mask = 0xffffefff,
486 .pvr_value = 0x004e0201,
487 .cpu_name = "POWER9 (raw)",
488 .cpu_features = CPU_FTRS_POWER9_DD2_1,
489 .cpu_user_features = COMMON_USER_POWER9,
490 .cpu_user_features2 = COMMON_USER2_POWER9,
491 .mmu_features = MMU_FTRS_POWER9,
492 .icache_bsize = 128,
493 .dcache_bsize = 128,
494 .num_pmcs = 6,
495 .pmc_type = PPC_PMC_IBM,
496 .oprofile_cpu_type = "ppc64/power9",
497 .oprofile_type = PPC_OPROFILE_INVALID,
498 .cpu_setup = __setup_cpu_power9,
499 .cpu_restore = __restore_cpu_power9,
Paul Mackerrasb5af4f22018-03-21 21:31:59 +1100500 .machine_check_early = __machine_check_early_realmode_p9,
501 .platform = "power9",
502 },
503 { /* Power9 DD2.2 or later */
Michael Neulingc3ab3002016-02-19 11:16:24 +1100504 .pvr_mask = 0xffff0000,
505 .pvr_value = 0x004e0000,
506 .cpu_name = "POWER9 (raw)",
Paul Mackerrasb5af4f22018-03-21 21:31:59 +1100507 .cpu_features = CPU_FTRS_POWER9_DD2_2,
Michael Neulingc3ab3002016-02-19 11:16:24 +1100508 .cpu_user_features = COMMON_USER_POWER9,
509 .cpu_user_features2 = COMMON_USER2_POWER9,
510 .mmu_features = MMU_FTRS_POWER9,
511 .icache_bsize = 128,
512 .dcache_bsize = 128,
513 .num_pmcs = 6,
514 .pmc_type = PPC_PMC_IBM,
515 .oprofile_cpu_type = "ppc64/power9",
516 .oprofile_type = PPC_OPROFILE_INVALID,
517 .cpu_setup = __setup_cpu_power9,
518 .cpu_restore = __restore_cpu_power9,
Nicholas Piggin7b9f71f92017-02-28 12:00:48 +1000519 .machine_check_early = __machine_check_early_realmode_p9,
Michael Neulingc3ab3002016-02-19 11:16:24 +1100520 .platform = "power9",
521 },
Arnd Bergmannc902be72006-01-04 19:55:53 +0000522 { /* Cell Broadband Engine */
Stephen Rothwell49209602005-10-12 15:55:09 +1000523 .pvr_mask = 0xffff0000,
524 .pvr_value = 0x00700000,
525 .cpu_name = "Cell Broadband Engine",
526 .cpu_features = CPU_FTRS_CELL,
527 .cpu_user_features = COMMON_USER_PPC64 |
Benjamin Herrenschmidtaa5cb0212006-03-01 15:07:07 +1100528 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
529 PPC_FEATURE_SMT,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000530 .mmu_features = MMU_FTRS_CELL,
Stephen Rothwell49209602005-10-12 15:55:09 +1000531 .icache_bsize = 128,
532 .dcache_bsize = 128,
Maynard Johnson18f21902006-11-20 18:45:16 +0100533 .num_pmcs = 4,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600534 .pmc_type = PPC_PMC_IBM,
Maynard Johnson18f21902006-11-20 18:45:16 +0100535 .oprofile_cpu_type = "ppc64/cell-be",
536 .oprofile_type = PPC_OPROFILE_CELL,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100537 .platform = "ppc-cell-be",
Stephen Rothwell49209602005-10-12 15:55:09 +1000538 },
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500539 { /* PA Semi PA6T */
540 .pvr_mask = 0x7fff0000,
541 .pvr_value = 0x00900000,
542 .cpu_name = "PA6T",
543 .cpu_features = CPU_FTRS_PA6T,
544 .cpu_user_features = COMMON_USER_PA6T,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000545 .mmu_features = MMU_FTRS_PA6T,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500546 .icache_bsize = 64,
547 .dcache_bsize = 64,
548 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600549 .pmc_type = PPC_PMC_PA6T,
Olof Johansson11999192007-02-04 16:36:51 -0600550 .cpu_setup = __setup_cpu_pa6t,
551 .cpu_restore = __restore_cpu_pa6t,
Olof Johansson25fc5302007-04-18 16:38:21 +1000552 .oprofile_cpu_type = "ppc64/pa6t",
553 .oprofile_type = PPC_OPROFILE_PA6T,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500554 .platform = "pa6t",
555 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000556 { /* default match */
557 .pvr_mask = 0x00000000,
558 .pvr_value = 0x00000000,
Nicholas Piggin471d7ff2018-02-21 05:08:29 +1000559 .cpu_name = "POWER5 (compatible)",
Stephen Rothwell49209602005-10-12 15:55:09 +1000560 .cpu_features = CPU_FTRS_COMPATIBLE,
561 .cpu_user_features = COMMON_USER_PPC64,
Nicholas Piggin471d7ff2018-02-21 05:08:29 +1000562 .mmu_features = MMU_FTRS_POWER,
Stephen Rothwell49209602005-10-12 15:55:09 +1000563 .icache_bsize = 128,
564 .dcache_bsize = 128,
565 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600566 .pmc_type = PPC_PMC_IBM,
Nicholas Piggin471d7ff2018-02-21 05:08:29 +1000567 .platform = "power5",
Stephen Rothwell49209602005-10-12 15:55:09 +1000568 }
Benjamin Herrenschmidt2d27cfd2009-07-23 23:15:59 +0000569#endif /* CONFIG_PPC_BOOK3S_64 */
Benjamin Herrenschmidt2d27cfd2009-07-23 23:15:59 +0000570
Stephen Rothwell49209602005-10-12 15:55:09 +1000571#ifdef CONFIG_PPC32
Michael Ellerman1e07a0a2014-07-10 12:29:26 +1000572#ifdef CONFIG_PPC_BOOK3S_32
Stephen Rothwell49209602005-10-12 15:55:09 +1000573 { /* 601 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700574 .pvr_mask = 0xffff0000,
575 .pvr_value = 0x00010000,
576 .cpu_name = "601",
Kumar Gala10b35d92005-09-23 14:08:58 -0500577 .cpu_features = CPU_FTRS_PPC601,
Stephen Rothwell49209602005-10-12 15:55:09 +1000578 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
Paul Mackerras98599012005-10-22 16:51:34 +1000579 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000580 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700581 .icache_bsize = 32,
582 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100583 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100584 .platform = "ppc601",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700585 },
586 { /* 603 */
587 .pvr_mask = 0xffff0000,
588 .pvr_value = 0x00030000,
589 .cpu_name = "603",
Kumar Gala10b35d92005-09-23 14:08:58 -0500590 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000591 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000592 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700593 .icache_bsize = 32,
594 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100595 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100596 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100597 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700598 },
599 { /* 603e */
600 .pvr_mask = 0xffff0000,
601 .pvr_value = 0x00060000,
602 .cpu_name = "603e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500603 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000604 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000605 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700606 .icache_bsize = 32,
607 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100608 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100609 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100610 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700611 },
612 { /* 603ev */
613 .pvr_mask = 0xffff0000,
614 .pvr_value = 0x00070000,
615 .cpu_name = "603ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500616 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000617 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000618 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700619 .icache_bsize = 32,
620 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100621 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100622 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100623 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700624 },
625 { /* 604 */
626 .pvr_mask = 0xffff0000,
627 .pvr_value = 0x00040000,
628 .cpu_name = "604",
Kumar Gala10b35d92005-09-23 14:08:58 -0500629 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000630 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000631 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700632 .icache_bsize = 32,
633 .dcache_bsize = 32,
634 .num_pmcs = 2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100635 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100636 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100637 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700638 },
639 { /* 604e */
640 .pvr_mask = 0xfffff000,
641 .pvr_value = 0x00090000,
642 .cpu_name = "604e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500643 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000644 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000645 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700646 .icache_bsize = 32,
647 .dcache_bsize = 32,
648 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100649 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100650 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100651 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700652 },
653 { /* 604r */
654 .pvr_mask = 0xffff0000,
655 .pvr_value = 0x00090000,
656 .cpu_name = "604r",
Kumar Gala10b35d92005-09-23 14:08:58 -0500657 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000658 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000659 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700660 .icache_bsize = 32,
661 .dcache_bsize = 32,
662 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100663 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100664 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100665 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700666 },
667 { /* 604ev */
668 .pvr_mask = 0xffff0000,
669 .pvr_value = 0x000a0000,
670 .cpu_name = "604ev",
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 = 4,
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 { /* 740/750 (0x4202, don't support TAU ?) */
682 .pvr_mask = 0xffffffff,
683 .pvr_value = 0x00084202,
684 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500685 .cpu_features = CPU_FTRS_740_NOTAU,
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_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100692 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100693 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700694 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700695 { /* 750CX (80100 and 8010x?) */
696 .pvr_mask = 0xfffffff0,
697 .pvr_value = 0x00080100,
698 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500699 .cpu_features = CPU_FTRS_750,
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_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100706 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100707 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700708 },
709 { /* 750CX (82201 and 82202) */
710 .pvr_mask = 0xfffffff0,
711 .pvr_value = 0x00082200,
712 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500713 .cpu_features = CPU_FTRS_750,
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,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000719 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100720 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100721 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100722 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700723 },
724 { /* 750CXe (82214) */
725 .pvr_mask = 0xfffffff0,
726 .pvr_value = 0x00082210,
727 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500728 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000729 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000730 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700731 .icache_bsize = 32,
732 .dcache_bsize = 32,
733 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000734 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100735 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100736 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100737 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700738 },
Arthur Othieno7c316252005-09-03 15:55:52 -0700739 { /* 750CXe "Gekko" (83214) */
740 .pvr_mask = 0xffffffff,
741 .pvr_value = 0x00083214,
742 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500743 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000744 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000745 .mmu_features = MMU_FTR_HPTE_TABLE,
Arthur Othieno7c316252005-09-03 15:55:52 -0700746 .icache_bsize = 32,
747 .dcache_bsize = 32,
748 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000749 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100750 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100751 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100752 .platform = "ppc750",
Arthur Othieno7c316252005-09-03 15:55:52 -0700753 },
Albert Herranz45158dc2009-12-12 06:31:46 +0000754 { /* 750CL (and "Broadway") */
755 .pvr_mask = 0xfffff0e0,
756 .pvr_value = 0x00087000,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500757 .cpu_name = "750CL",
Josh Boyera14c4502007-04-13 04:33:25 +1000758 .cpu_features = CPU_FTRS_750CL,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500759 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000760 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500761 .icache_bsize = 32,
762 .dcache_bsize = 32,
763 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000764 .pmc_type = PPC_PMC_IBM,
Josh Boyera14c4502007-04-13 04:33:25 +1000765 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100766 .machine_check = machine_check_generic,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500767 .platform = "ppc750",
Dragos Tatulea04f56534772009-09-16 11:58:15 +0300768 .oprofile_cpu_type = "ppc/750",
769 .oprofile_type = PPC_OPROFILE_G4,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500770 },
Arthur Othienoac1ff042005-09-03 15:55:51 -0700771 { /* 745/755 */
772 .pvr_mask = 0xfffff000,
773 .pvr_value = 0x00083000,
774 .cpu_name = "745/755",
Kumar Gala10b35d92005-09-23 14:08:58 -0500775 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000776 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000777 .mmu_features = MMU_FTR_HPTE_TABLE,
Arthur Othienoac1ff042005-09-03 15:55:51 -0700778 .icache_bsize = 32,
779 .dcache_bsize = 32,
780 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000781 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100782 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100783 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100784 .platform = "ppc750",
Arthur Othienoac1ff042005-09-03 15:55:51 -0700785 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700786 { /* 750FX rev 1.x */
787 .pvr_mask = 0xffffff00,
788 .pvr_value = 0x70000100,
789 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500790 .cpu_features = CPU_FTRS_750FX1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000791 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000792 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700793 .icache_bsize = 32,
794 .dcache_bsize = 32,
795 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000796 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100797 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100798 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100799 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000800 .oprofile_cpu_type = "ppc/750",
801 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700802 },
803 { /* 750FX rev 2.0 must disable HID0[DPM] */
804 .pvr_mask = 0xffffffff,
805 .pvr_value = 0x70000200,
806 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500807 .cpu_features = CPU_FTRS_750FX2,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000808 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000809 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700810 .icache_bsize = 32,
811 .dcache_bsize = 32,
812 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000813 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100814 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100815 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100816 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000817 .oprofile_cpu_type = "ppc/750",
818 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700819 },
820 { /* 750FX (All revs except 2.0) */
821 .pvr_mask = 0xffff0000,
822 .pvr_value = 0x70000000,
823 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500824 .cpu_features = CPU_FTRS_750FX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000825 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000826 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700827 .icache_bsize = 32,
828 .dcache_bsize = 32,
829 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000830 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100831 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100832 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100833 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000834 .oprofile_cpu_type = "ppc/750",
835 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700836 },
837 { /* 750GX */
838 .pvr_mask = 0xffff0000,
839 .pvr_value = 0x70020000,
840 .cpu_name = "750GX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500841 .cpu_features = CPU_FTRS_750GX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000842 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000843 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700844 .icache_bsize = 32,
845 .dcache_bsize = 32,
846 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000847 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100848 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100849 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100850 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000851 .oprofile_cpu_type = "ppc/750",
852 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700853 },
854 { /* 740/750 (L2CR bit need fixup for 740) */
855 .pvr_mask = 0xffff0000,
856 .pvr_value = 0x00080000,
857 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500858 .cpu_features = CPU_FTRS_740,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000859 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000860 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700861 .icache_bsize = 32,
862 .dcache_bsize = 32,
863 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000864 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100865 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100866 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100867 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700868 },
869 { /* 7400 rev 1.1 ? (no TAU) */
870 .pvr_mask = 0xffffffff,
871 .pvr_value = 0x000c1101,
872 .cpu_name = "7400 (1.1)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500873 .cpu_features = CPU_FTRS_7400_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000874 .cpu_user_features = COMMON_USER |
875 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000876 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700877 .icache_bsize = 32,
878 .dcache_bsize = 32,
879 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000880 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100881 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100882 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100883 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700884 },
885 { /* 7400 */
886 .pvr_mask = 0xffff0000,
887 .pvr_value = 0x000c0000,
888 .cpu_name = "7400",
Kumar Gala10b35d92005-09-23 14:08:58 -0500889 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000890 .cpu_user_features = COMMON_USER |
891 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000892 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700893 .icache_bsize = 32,
894 .dcache_bsize = 32,
895 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000896 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100897 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100898 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100899 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700900 },
901 { /* 7410 */
902 .pvr_mask = 0xffff0000,
903 .pvr_value = 0x800c0000,
904 .cpu_name = "7410",
Kumar Gala10b35d92005-09-23 14:08:58 -0500905 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000906 .cpu_user_features = COMMON_USER |
907 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000908 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700909 .icache_bsize = 32,
910 .dcache_bsize = 32,
911 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000912 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100913 .cpu_setup = __setup_cpu_7410,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100914 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100915 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700916 },
917 { /* 7450 2.0 - no doze/nap */
918 .pvr_mask = 0xffffffff,
919 .pvr_value = 0x80000200,
920 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500921 .cpu_features = CPU_FTRS_7450_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000922 .cpu_user_features = COMMON_USER |
923 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000924 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700925 .icache_bsize = 32,
926 .dcache_bsize = 32,
927 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000928 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600929 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600930 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000931 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100932 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100933 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700934 },
935 { /* 7450 2.1 */
936 .pvr_mask = 0xffffffff,
937 .pvr_value = 0x80000201,
938 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500939 .cpu_features = CPU_FTRS_7450_21,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000940 .cpu_user_features = COMMON_USER |
941 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000942 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700943 .icache_bsize = 32,
944 .dcache_bsize = 32,
945 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000946 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600947 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600948 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000949 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100950 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100951 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700952 },
953 { /* 7450 2.3 and newer */
954 .pvr_mask = 0xffff0000,
955 .pvr_value = 0x80000000,
956 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500957 .cpu_features = CPU_FTRS_7450_23,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000958 .cpu_user_features = COMMON_USER |
959 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000960 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700961 .icache_bsize = 32,
962 .dcache_bsize = 32,
963 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000964 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600965 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600966 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000967 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100968 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100969 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700970 },
971 { /* 7455 rev 1.x */
972 .pvr_mask = 0xffffff00,
973 .pvr_value = 0x80010100,
974 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500975 .cpu_features = CPU_FTRS_7455_1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000976 .cpu_user_features = COMMON_USER |
977 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000978 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700979 .icache_bsize = 32,
980 .dcache_bsize = 32,
981 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000982 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600983 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600984 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000985 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100986 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100987 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700988 },
989 { /* 7455 rev 2.0 */
990 .pvr_mask = 0xffffffff,
991 .pvr_value = 0x80010200,
992 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500993 .cpu_features = CPU_FTRS_7455_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000994 .cpu_user_features = COMMON_USER |
995 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000996 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700997 .icache_bsize = 32,
998 .dcache_bsize = 32,
999 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001000 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001001 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001002 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001003 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001004 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001005 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001006 },
1007 { /* 7455 others */
1008 .pvr_mask = 0xffff0000,
1009 .pvr_value = 0x80010000,
1010 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -05001011 .cpu_features = CPU_FTRS_7455,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001012 .cpu_user_features = COMMON_USER |
1013 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001014 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001015 .icache_bsize = 32,
1016 .dcache_bsize = 32,
1017 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001018 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001019 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001020 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001021 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001022 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001023 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001024 },
1025 { /* 7447/7457 Rev 1.0 */
1026 .pvr_mask = 0xffffffff,
1027 .pvr_value = 0x80020100,
1028 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -05001029 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001030 .cpu_user_features = COMMON_USER |
1031 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001032 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001033 .icache_bsize = 32,
1034 .dcache_bsize = 32,
1035 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001036 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001037 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001038 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001039 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001040 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001041 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001042 },
1043 { /* 7447/7457 Rev 1.1 */
1044 .pvr_mask = 0xffffffff,
1045 .pvr_value = 0x80020101,
1046 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -05001047 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001048 .cpu_user_features = COMMON_USER |
1049 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001050 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001051 .icache_bsize = 32,
1052 .dcache_bsize = 32,
1053 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001054 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001055 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001056 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001057 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001058 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001059 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001060 },
1061 { /* 7447/7457 Rev 1.2 and later */
1062 .pvr_mask = 0xffff0000,
1063 .pvr_value = 0x80020000,
1064 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -05001065 .cpu_features = CPU_FTRS_7447,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001066 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001067 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001068 .icache_bsize = 32,
1069 .dcache_bsize = 32,
1070 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001071 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001072 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001073 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001074 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001075 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001076 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001077 },
1078 { /* 7447A */
1079 .pvr_mask = 0xffff0000,
1080 .pvr_value = 0x80030000,
1081 .cpu_name = "7447A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001082 .cpu_features = CPU_FTRS_7447A,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001083 .cpu_user_features = COMMON_USER |
1084 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001085 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001086 .icache_bsize = 32,
1087 .dcache_bsize = 32,
1088 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001089 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001090 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001091 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001092 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001093 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001094 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001095 },
Kumar Galabbde6302005-09-03 15:55:55 -07001096 { /* 7448 */
1097 .pvr_mask = 0xffff0000,
1098 .pvr_value = 0x80040000,
1099 .cpu_name = "7448",
James.Yang3d372542007-05-02 16:34:43 -05001100 .cpu_features = CPU_FTRS_7448,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001101 .cpu_user_features = COMMON_USER |
1102 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001103 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Kumar Galabbde6302005-09-03 15:55:55 -07001104 .icache_bsize = 32,
1105 .dcache_bsize = 32,
1106 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001107 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001108 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001109 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001110 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001111 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001112 .platform = "ppc7450",
Kumar Galabbde6302005-09-03 15:55:55 -07001113 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001114 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
1115 .pvr_mask = 0x7fff0000,
1116 .pvr_value = 0x00810000,
1117 .cpu_name = "82xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001118 .cpu_features = CPU_FTRS_82XX,
Stephen Rothwell49209602005-10-12 15:55:09 +10001119 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001120 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001121 .icache_bsize = 32,
1122 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001123 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001124 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001125 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001126 },
1127 { /* All G2_LE (603e core, plus some) have the same pvr */
1128 .pvr_mask = 0x7fff0000,
1129 .pvr_value = 0x00820000,
1130 .cpu_name = "G2_LE",
Kumar Gala10b35d92005-09-23 14:08:58 -05001131 .cpu_features = CPU_FTRS_G2_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +10001132 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001133 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001134 .icache_bsize = 32,
1135 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001136 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001137 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001138 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001139 },
Christophe Leroy0deae392018-12-10 11:41:29 +00001140#ifdef CONFIG_PPC_83xx
Kim Phillips6c4a2502006-10-02 20:10:24 -05001141 { /* e300c1 (a 603e core, plus some) on 83xx */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001142 .pvr_mask = 0x7fff0000,
1143 .pvr_value = 0x00830000,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001144 .cpu_name = "e300c1",
Kumar Gala10b35d92005-09-23 14:08:58 -05001145 .cpu_features = CPU_FTRS_E300,
Stephen Rothwell49209602005-10-12 15:55:09 +10001146 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001147 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001148 .icache_bsize = 32,
1149 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001150 .cpu_setup = __setup_cpu_603,
Christophe Leroy0deae392018-12-10 11:41:29 +00001151 .machine_check = machine_check_83xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001152 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001153 },
Kim Phillips6c4a2502006-10-02 20:10:24 -05001154 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
1155 .pvr_mask = 0x7fff0000,
1156 .pvr_value = 0x00840000,
1157 .cpu_name = "e300c2",
Kim Phillipsaa42c692006-12-08 02:43:30 -06001158 .cpu_features = CPU_FTRS_E300C2,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001159 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Kumar Gala2319f122009-03-19 03:55:41 +00001160 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1161 MMU_FTR_NEED_DTLB_SW_LRU,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001162 .icache_bsize = 32,
1163 .dcache_bsize = 32,
1164 .cpu_setup = __setup_cpu_603,
Christophe Leroy0deae392018-12-10 11:41:29 +00001165 .machine_check = machine_check_83xx,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001166 .platform = "ppc603",
1167 },
Li Yanga58d5242007-10-19 19:38:42 +08001168 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
Scott Wood57933f82006-12-01 12:57:05 -06001169 .pvr_mask = 0x7fff0000,
1170 .pvr_value = 0x00850000,
1171 .cpu_name = "e300c3",
1172 .cpu_features = CPU_FTRS_E300,
1173 .cpu_user_features = COMMON_USER,
Kumar Gala2319f122009-03-19 03:55:41 +00001174 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1175 MMU_FTR_NEED_DTLB_SW_LRU,
Scott Wood57933f82006-12-01 12:57:05 -06001176 .icache_bsize = 32,
1177 .dcache_bsize = 32,
1178 .cpu_setup = __setup_cpu_603,
Christophe Leroy0deae392018-12-10 11:41:29 +00001179 .machine_check = machine_check_83xx,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001180 .num_pmcs = 4,
1181 .oprofile_cpu_type = "ppc/e300",
1182 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Scott Wood57933f82006-12-01 12:57:05 -06001183 .platform = "ppc603",
1184 },
Li Yanga58d5242007-10-19 19:38:42 +08001185 { /* e300c4 (e300c1, plus one IU) */
1186 .pvr_mask = 0x7fff0000,
1187 .pvr_value = 0x00860000,
1188 .cpu_name = "e300c4",
1189 .cpu_features = CPU_FTRS_E300,
1190 .cpu_user_features = COMMON_USER,
Kumar Gala2319f122009-03-19 03:55:41 +00001191 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1192 MMU_FTR_NEED_DTLB_SW_LRU,
Li Yanga58d5242007-10-19 19:38:42 +08001193 .icache_bsize = 32,
1194 .dcache_bsize = 32,
1195 .cpu_setup = __setup_cpu_603,
Christophe Leroy0deae392018-12-10 11:41:29 +00001196 .machine_check = machine_check_83xx,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001197 .num_pmcs = 4,
1198 .oprofile_cpu_type = "ppc/e300",
1199 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Li Yanga58d5242007-10-19 19:38:42 +08001200 .platform = "ppc603",
1201 },
Christophe Leroy0deae392018-12-10 11:41:29 +00001202#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -07001203 { /* default match, we assume split I/D cache & TB (non-601)... */
1204 .pvr_mask = 0x00000000,
1205 .pvr_value = 0x00000000,
1206 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -05001207 .cpu_features = CPU_FTRS_CLASSIC32,
Stephen Rothwell49209602005-10-12 15:55:09 +10001208 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001209 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001210 .icache_bsize = 32,
1211 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001212 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001213 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001214 },
Michael Ellerman1e07a0a2014-07-10 12:29:26 +10001215#endif /* CONFIG_PPC_BOOK3S_32 */
Christophe Leroy968159c2017-08-08 13:58:54 +02001216#ifdef CONFIG_PPC_8xx
Linus Torvalds1da177e2005-04-16 15:20:36 -07001217 { /* 8xx */
1218 .pvr_mask = 0xffff0000,
Christophe Leroy3ee87672017-08-08 13:58:58 +02001219 .pvr_value = PVR_8xx,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001220 .cpu_name = "8xx",
1221 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1222 * if the 8xx code is there.... */
Kumar Gala10b35d92005-09-23 14:08:58 -05001223 .cpu_features = CPU_FTRS_8XX,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001224 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001225 .mmu_features = MMU_FTR_TYPE_8xx,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001226 .icache_bsize = 16,
1227 .dcache_bsize = 16,
Christophe Leroye627f8d2016-09-16 10:23:11 +02001228 .machine_check = machine_check_8xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001229 .platform = "ppc823",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001230 },
Christophe Leroy968159c2017-08-08 13:58:54 +02001231#endif /* CONFIG_PPC_8xx */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001232#ifdef CONFIG_40x
1233 { /* 403GC */
1234 .pvr_mask = 0xffffff00,
1235 .pvr_value = 0x00200200,
1236 .cpu_name = "403GC",
Kumar Gala10b35d92005-09-23 14:08:58 -05001237 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001238 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001239 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001240 .icache_bsize = 16,
1241 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001242 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001243 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001244 },
1245 { /* 403GCX */
1246 .pvr_mask = 0xffffff00,
1247 .pvr_value = 0x00201400,
1248 .cpu_name = "403GCX",
Kumar Gala10b35d92005-09-23 14:08:58 -05001249 .cpu_features = CPU_FTRS_40X,
Paul Mackerras98599012005-10-22 16:51:34 +10001250 .cpu_user_features = PPC_FEATURE_32 |
1251 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001252 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001253 .icache_bsize = 16,
1254 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001255 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001256 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001257 },
1258 { /* 403G ?? */
1259 .pvr_mask = 0xffff0000,
1260 .pvr_value = 0x00200000,
1261 .cpu_name = "403G ??",
Kumar Gala10b35d92005-09-23 14:08:58 -05001262 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001263 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001264 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001265 .icache_bsize = 16,
1266 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001267 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001268 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001269 },
1270 { /* 405GP */
1271 .pvr_mask = 0xffff0000,
1272 .pvr_value = 0x40110000,
1273 .cpu_name = "405GP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001274 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001275 .cpu_user_features = PPC_FEATURE_32 |
1276 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001277 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001278 .icache_bsize = 32,
1279 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001280 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001281 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001282 },
1283 { /* STB 03xxx */
1284 .pvr_mask = 0xffff0000,
1285 .pvr_value = 0x40130000,
1286 .cpu_name = "STB03xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001287 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001288 .cpu_user_features = PPC_FEATURE_32 |
1289 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001290 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001291 .icache_bsize = 32,
1292 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001293 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001294 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001295 },
1296 { /* STB 04xxx */
1297 .pvr_mask = 0xffff0000,
1298 .pvr_value = 0x41810000,
1299 .cpu_name = "STB04xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001300 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001301 .cpu_user_features = PPC_FEATURE_32 |
1302 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001303 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001304 .icache_bsize = 32,
1305 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001306 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001307 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001308 },
1309 { /* NP405L */
1310 .pvr_mask = 0xffff0000,
1311 .pvr_value = 0x41610000,
1312 .cpu_name = "NP405L",
Kumar Gala10b35d92005-09-23 14:08:58 -05001313 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001314 .cpu_user_features = PPC_FEATURE_32 |
1315 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001316 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001317 .icache_bsize = 32,
1318 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001319 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001320 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001321 },
1322 { /* NP4GS3 */
1323 .pvr_mask = 0xffff0000,
1324 .pvr_value = 0x40B10000,
1325 .cpu_name = "NP4GS3",
Kumar Gala10b35d92005-09-23 14:08:58 -05001326 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001327 .cpu_user_features = PPC_FEATURE_32 |
1328 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001329 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001330 .icache_bsize = 32,
1331 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001332 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001333 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001334 },
1335 { /* NP405H */
1336 .pvr_mask = 0xffff0000,
1337 .pvr_value = 0x41410000,
1338 .cpu_name = "NP405H",
Kumar Gala10b35d92005-09-23 14:08:58 -05001339 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001340 .cpu_user_features = PPC_FEATURE_32 |
1341 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001342 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001343 .icache_bsize = 32,
1344 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001345 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001346 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001347 },
1348 { /* 405GPr */
1349 .pvr_mask = 0xffff0000,
1350 .pvr_value = 0x50910000,
1351 .cpu_name = "405GPr",
Kumar Gala10b35d92005-09-23 14:08:58 -05001352 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001353 .cpu_user_features = PPC_FEATURE_32 |
1354 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001355 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001356 .icache_bsize = 32,
1357 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001358 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001359 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001360 },
1361 { /* STBx25xx */
1362 .pvr_mask = 0xffff0000,
1363 .pvr_value = 0x51510000,
1364 .cpu_name = "STBx25xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001365 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001366 .cpu_user_features = PPC_FEATURE_32 |
1367 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001368 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001369 .icache_bsize = 32,
1370 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001371 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001372 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001373 },
1374 { /* 405LP */
1375 .pvr_mask = 0xffff0000,
1376 .pvr_value = 0x41F10000,
1377 .cpu_name = "405LP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001378 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001379 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001380 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001381 .icache_bsize = 32,
1382 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001383 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001384 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001385 },
1386 { /* Xilinx Virtex-II Pro */
Grant C. Likely72646c72006-01-19 01:13:20 -07001387 .pvr_mask = 0xfffff000,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001388 .pvr_value = 0x20010000,
1389 .cpu_name = "Virtex-II Pro",
Kumar Gala10b35d92005-09-23 14:08:58 -05001390 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001391 .cpu_user_features = PPC_FEATURE_32 |
1392 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001393 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001394 .icache_bsize = 32,
1395 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001396 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001397 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001398 },
Grant C. Likely72646c72006-01-19 01:13:20 -07001399 { /* Xilinx Virtex-4 FX */
1400 .pvr_mask = 0xfffff000,
1401 .pvr_value = 0x20011000,
1402 .cpu_name = "Virtex-4 FX",
1403 .cpu_features = CPU_FTRS_40X,
1404 .cpu_user_features = PPC_FEATURE_32 |
1405 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001406 .mmu_features = MMU_FTR_TYPE_40x,
Grant C. Likely72646c72006-01-19 01:13:20 -07001407 .icache_bsize = 32,
1408 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001409 .machine_check = machine_check_4xx,
Peter Bergner838fdb42006-09-14 14:18:38 -05001410 .platform = "ppc405",
Grant C. Likely72646c72006-01-19 01:13:20 -07001411 },
Eugene Suroveginad95d602005-06-07 13:22:09 -07001412 { /* 405EP */
1413 .pvr_mask = 0xffff0000,
1414 .pvr_value = 0x51210000,
1415 .cpu_name = "405EP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001416 .cpu_features = CPU_FTRS_40X,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001417 .cpu_user_features = PPC_FEATURE_32 |
1418 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001419 .mmu_features = MMU_FTR_TYPE_40x,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001420 .icache_bsize = 32,
1421 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001422 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001423 .platform = "ppc405",
Eugene Suroveginad95d602005-06-07 13:22:09 -07001424 },
Lee Nipperff349102010-07-09 01:17:16 +00001425 { /* 405EX Rev. A/B with Security */
1426 .pvr_mask = 0xffff000f,
1427 .pvr_value = 0x12910007,
1428 .cpu_name = "405EX Rev. A/B",
Stefan Roese5d8476c2007-10-11 22:08:14 +10001429 .cpu_features = CPU_FTRS_40X,
1430 .cpu_user_features = PPC_FEATURE_32 |
1431 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001432 .mmu_features = MMU_FTR_TYPE_40x,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001433 .icache_bsize = 32,
1434 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001435 .machine_check = machine_check_4xx,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001436 .platform = "ppc405",
1437 },
Lee Nipperff349102010-07-09 01:17:16 +00001438 { /* 405EX Rev. C without Security */
1439 .pvr_mask = 0xffff000f,
1440 .pvr_value = 0x1291000d,
1441 .cpu_name = "405EX Rev. C",
1442 .cpu_features = CPU_FTRS_40X,
1443 .cpu_user_features = PPC_FEATURE_32 |
1444 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1445 .mmu_features = MMU_FTR_TYPE_40x,
1446 .icache_bsize = 32,
1447 .dcache_bsize = 32,
1448 .machine_check = machine_check_4xx,
1449 .platform = "ppc405",
1450 },
1451 { /* 405EX Rev. C with Security */
1452 .pvr_mask = 0xffff000f,
1453 .pvr_value = 0x1291000f,
1454 .cpu_name = "405EX Rev. C",
1455 .cpu_features = CPU_FTRS_40X,
1456 .cpu_user_features = PPC_FEATURE_32 |
1457 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1458 .mmu_features = MMU_FTR_TYPE_40x,
1459 .icache_bsize = 32,
1460 .dcache_bsize = 32,
1461 .machine_check = machine_check_4xx,
1462 .platform = "ppc405",
1463 },
1464 { /* 405EX Rev. D without Security */
1465 .pvr_mask = 0xffff000f,
1466 .pvr_value = 0x12910003,
1467 .cpu_name = "405EX Rev. D",
1468 .cpu_features = CPU_FTRS_40X,
1469 .cpu_user_features = PPC_FEATURE_32 |
1470 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1471 .mmu_features = MMU_FTR_TYPE_40x,
1472 .icache_bsize = 32,
1473 .dcache_bsize = 32,
1474 .machine_check = machine_check_4xx,
1475 .platform = "ppc405",
1476 },
1477 { /* 405EX Rev. D with Security */
1478 .pvr_mask = 0xffff000f,
1479 .pvr_value = 0x12910005,
1480 .cpu_name = "405EX Rev. D",
1481 .cpu_features = CPU_FTRS_40X,
1482 .cpu_user_features = PPC_FEATURE_32 |
1483 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1484 .mmu_features = MMU_FTR_TYPE_40x,
1485 .icache_bsize = 32,
1486 .dcache_bsize = 32,
1487 .machine_check = machine_check_4xx,
1488 .platform = "ppc405",
1489 },
1490 { /* 405EXr Rev. A/B without Security */
1491 .pvr_mask = 0xffff000f,
1492 .pvr_value = 0x12910001,
1493 .cpu_name = "405EXr Rev. A/B",
1494 .cpu_features = CPU_FTRS_40X,
1495 .cpu_user_features = PPC_FEATURE_32 |
1496 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1497 .mmu_features = MMU_FTR_TYPE_40x,
1498 .icache_bsize = 32,
1499 .dcache_bsize = 32,
1500 .machine_check = machine_check_4xx,
1501 .platform = "ppc405",
1502 },
1503 { /* 405EXr Rev. C without Security */
1504 .pvr_mask = 0xffff000f,
1505 .pvr_value = 0x12910009,
1506 .cpu_name = "405EXr Rev. C",
1507 .cpu_features = CPU_FTRS_40X,
1508 .cpu_user_features = PPC_FEATURE_32 |
1509 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1510 .mmu_features = MMU_FTR_TYPE_40x,
1511 .icache_bsize = 32,
1512 .dcache_bsize = 32,
1513 .machine_check = machine_check_4xx,
1514 .platform = "ppc405",
1515 },
1516 { /* 405EXr Rev. C with Security */
1517 .pvr_mask = 0xffff000f,
1518 .pvr_value = 0x1291000b,
1519 .cpu_name = "405EXr Rev. C",
1520 .cpu_features = CPU_FTRS_40X,
1521 .cpu_user_features = PPC_FEATURE_32 |
1522 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1523 .mmu_features = MMU_FTR_TYPE_40x,
1524 .icache_bsize = 32,
1525 .dcache_bsize = 32,
1526 .machine_check = machine_check_4xx,
1527 .platform = "ppc405",
1528 },
1529 { /* 405EXr Rev. D without Security */
1530 .pvr_mask = 0xffff000f,
Stefan Roeseb676d842008-01-15 18:09:15 +11001531 .pvr_value = 0x12910000,
Lee Nipperff349102010-07-09 01:17:16 +00001532 .cpu_name = "405EXr Rev. D",
1533 .cpu_features = CPU_FTRS_40X,
1534 .cpu_user_features = PPC_FEATURE_32 |
1535 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1536 .mmu_features = MMU_FTR_TYPE_40x,
1537 .icache_bsize = 32,
1538 .dcache_bsize = 32,
1539 .machine_check = machine_check_4xx,
1540 .platform = "ppc405",
1541 },
1542 { /* 405EXr Rev. D with Security */
1543 .pvr_mask = 0xffff000f,
1544 .pvr_value = 0x12910002,
1545 .cpu_name = "405EXr Rev. D",
Stefan Roeseb676d842008-01-15 18:09:15 +11001546 .cpu_features = CPU_FTRS_40X,
1547 .cpu_user_features = PPC_FEATURE_32 |
1548 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001549 .mmu_features = MMU_FTR_TYPE_40x,
Stefan Roeseb676d842008-01-15 18:09:15 +11001550 .icache_bsize = 32,
1551 .dcache_bsize = 32,
1552 .machine_check = machine_check_4xx,
1553 .platform = "ppc405",
1554 },
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001555 {
1556 /* 405EZ */
1557 .pvr_mask = 0xffff0000,
1558 .pvr_value = 0x41510000,
1559 .cpu_name = "405EZ",
1560 .cpu_features = CPU_FTRS_40X,
1561 .cpu_user_features = PPC_FEATURE_32 |
1562 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001563 .mmu_features = MMU_FTR_TYPE_40x,
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001564 .icache_bsize = 32,
1565 .dcache_bsize = 32,
1566 .machine_check = machine_check_4xx,
1567 .platform = "ppc405",
1568 },
Tanmay Inamdard5b9ee72011-11-28 21:01:41 +00001569 { /* APM8018X */
1570 .pvr_mask = 0xffff0000,
1571 .pvr_value = 0x7ff11432,
1572 .cpu_name = "APM8018X",
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 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001582 { /* default match */
1583 .pvr_mask = 0x00000000,
1584 .pvr_value = 0x00000000,
1585 .cpu_name = "(generic 40x PPC)",
1586 .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,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001590 .icache_bsize = 32,
1591 .dcache_bsize = 32,
1592 .machine_check = machine_check_4xx,
1593 .platform = "ppc405",
1594 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001595
1596#endif /* CONFIG_40x */
1597#ifdef CONFIG_44x
Matt Porterc9cf73a2005-07-31 22:34:52 -07001598 {
1599 .pvr_mask = 0xf0000fff,
1600 .pvr_value = 0x40000850,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001601 .cpu_name = "440GR Rev. A",
1602 .cpu_features = CPU_FTRS_44X,
1603 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001604 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001605 .icache_bsize = 32,
1606 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001607 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001608 .platform = "ppc440",
1609 },
1610 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1611 .pvr_mask = 0xf0000fff,
1612 .pvr_value = 0x40000858,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001613 .cpu_name = "440EP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001614 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001615 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001616 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001617 .icache_bsize = 32,
1618 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001619 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001620 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001621 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001622 },
1623 {
1624 .pvr_mask = 0xf0000fff,
1625 .pvr_value = 0x400008d3,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001626 .cpu_name = "440GR Rev. B",
1627 .cpu_features = CPU_FTRS_44X,
1628 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001629 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001630 .icache_bsize = 32,
1631 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001632 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001633 .platform = "ppc440",
1634 },
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001635 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1636 .pvr_mask = 0xf0000ff7,
1637 .pvr_value = 0x400008d4,
1638 .cpu_name = "440EP Rev. C",
1639 .cpu_features = CPU_FTRS_44X,
1640 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001641 .mmu_features = MMU_FTR_TYPE_44x,
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001642 .icache_bsize = 32,
1643 .dcache_bsize = 32,
1644 .cpu_setup = __setup_cpu_440ep,
1645 .machine_check = machine_check_4xx,
1646 .platform = "ppc440",
1647 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001648 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1649 .pvr_mask = 0xf0000fff,
1650 .pvr_value = 0x400008db,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001651 .cpu_name = "440EP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001652 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001653 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001654 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001655 .icache_bsize = 32,
1656 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001657 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001658 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001659 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001660 },
Valentine Barshak15fc9932007-08-29 17:40:30 +04001661 { /* 440GRX */
1662 .pvr_mask = 0xf0000ffb,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001663 .pvr_value = 0x200008D0,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001664 .cpu_name = "440GRX",
1665 .cpu_features = CPU_FTRS_44X,
1666 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001667 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001668 .icache_bsize = 32,
1669 .dcache_bsize = 32,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001670 .cpu_setup = __setup_cpu_440grx,
Valentine Barshakb2be3b12007-12-22 03:22:23 +11001671 .machine_check = machine_check_440A,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001672 .platform = "ppc440",
Valentine Barshak15fc9932007-08-29 17:40:30 +04001673 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001674 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1675 .pvr_mask = 0xf0000ffb,
1676 .pvr_value = 0x200008D8,
1677 .cpu_name = "440EPX",
1678 .cpu_features = CPU_FTRS_44X,
1679 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001680 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001681 .icache_bsize = 32,
1682 .dcache_bsize = 32,
1683 .cpu_setup = __setup_cpu_440epx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001684 .machine_check = machine_check_440A,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001685 .platform = "ppc440",
1686 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001687 { /* 440GP Rev. B */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001688 .pvr_mask = 0xf0000fff,
1689 .pvr_value = 0x40000440,
1690 .cpu_name = "440GP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001691 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001692 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001693 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001694 .icache_bsize = 32,
1695 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001696 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001697 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001698 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001699 { /* 440GP Rev. C */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001700 .pvr_mask = 0xf0000fff,
1701 .pvr_value = 0x40000481,
1702 .cpu_name = "440GP Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001703 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001704 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001705 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001706 .icache_bsize = 32,
1707 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001708 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001709 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001710 },
1711 { /* 440GX Rev. A */
1712 .pvr_mask = 0xf0000fff,
1713 .pvr_value = 0x50000850,
1714 .cpu_name = "440GX Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001715 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001716 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001717 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001718 .icache_bsize = 32,
1719 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001720 .cpu_setup = __setup_cpu_440gx,
1721 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001722 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001723 },
1724 { /* 440GX Rev. B */
1725 .pvr_mask = 0xf0000fff,
1726 .pvr_value = 0x50000851,
1727 .cpu_name = "440GX Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001728 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001729 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001730 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001731 .icache_bsize = 32,
1732 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001733 .cpu_setup = __setup_cpu_440gx,
1734 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001735 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001736 },
1737 { /* 440GX Rev. C */
1738 .pvr_mask = 0xf0000fff,
1739 .pvr_value = 0x50000892,
1740 .cpu_name = "440GX Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001741 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001742 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001743 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001744 .icache_bsize = 32,
1745 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001746 .cpu_setup = __setup_cpu_440gx,
1747 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001748 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001749 },
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001750 { /* 440GX Rev. F */
1751 .pvr_mask = 0xf0000fff,
1752 .pvr_value = 0x50000894,
1753 .cpu_name = "440GX Rev. F",
Kumar Gala10b35d92005-09-23 14:08:58 -05001754 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001755 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001756 .mmu_features = MMU_FTR_TYPE_44x,
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001757 .icache_bsize = 32,
1758 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001759 .cpu_setup = __setup_cpu_440gx,
1760 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001761 .platform = "ppc440",
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001762 },
Matt Porter656de7e2005-09-03 15:55:42 -07001763 { /* 440SP Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001764 .pvr_mask = 0xfff00fff,
1765 .pvr_value = 0x53200891,
Matt Porter656de7e2005-09-03 15:55:42 -07001766 .cpu_name = "440SP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001767 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001768 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001769 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porter656de7e2005-09-03 15:55:42 -07001770 .icache_bsize = 32,
1771 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001772 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001773 .platform = "ppc440",
Matt Porter656de7e2005-09-03 15:55:42 -07001774 },
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001775 { /* 440SPe Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001776 .pvr_mask = 0xfff00fff,
1777 .pvr_value = 0x53400890,
1778 .cpu_name = "440SPe Rev. A",
1779 .cpu_features = CPU_FTRS_44X,
1780 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001781 .mmu_features = MMU_FTR_TYPE_44x,
Roland Dreier333e6152007-06-16 05:36:32 +10001782 .icache_bsize = 32,
1783 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001784 .cpu_setup = __setup_cpu_440spe,
1785 .machine_check = machine_check_440A,
Roland Dreier333e6152007-06-16 05:36:32 +10001786 .platform = "ppc440",
1787 },
1788 { /* 440SPe Rev. B */
1789 .pvr_mask = 0xfff00fff,
1790 .pvr_value = 0x53400891,
1791 .cpu_name = "440SPe Rev. B",
Kumar Galaa147c582006-12-08 02:34:38 -06001792 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001793 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001794 .mmu_features = MMU_FTR_TYPE_44x,
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001795 .icache_bsize = 32,
1796 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001797 .cpu_setup = __setup_cpu_440spe,
1798 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001799 .platform = "ppc440",
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001800 },
John Linn23e72372008-07-01 09:42:07 -07001801 { /* 440 in Xilinx Virtex-5 FXT */
1802 .pvr_mask = 0xfffffff0,
1803 .pvr_value = 0x7ff21910,
1804 .cpu_name = "440 in Virtex-5 FXT",
1805 .cpu_features = CPU_FTRS_44X,
1806 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001807 .mmu_features = MMU_FTR_TYPE_44x,
John Linn23e72372008-07-01 09:42:07 -07001808 .icache_bsize = 32,
1809 .dcache_bsize = 32,
Grant Likely640d17d2008-12-04 05:39:55 +00001810 .cpu_setup = __setup_cpu_440x5,
1811 .machine_check = machine_check_440A,
John Linn23e72372008-07-01 09:42:07 -07001812 .platform = "ppc440",
1813 },
Stefan Roese464076a2008-02-24 08:07:41 +11001814 { /* 460EX */
Stefan Roese20d70342009-07-29 07:04:46 +00001815 .pvr_mask = 0xffff0006,
Stefan Roese464076a2008-02-24 08:07:41 +11001816 .pvr_value = 0x13020002,
1817 .cpu_name = "460EX",
Benjamin Herrenschmidt6d2170b2008-12-18 19:13:22 +00001818 .cpu_features = CPU_FTRS_440x6,
Stefan Roese464076a2008-02-24 08:07:41 +11001819 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001820 .mmu_features = MMU_FTR_TYPE_44x,
Stefan Roese464076a2008-02-24 08:07:41 +11001821 .icache_bsize = 32,
1822 .dcache_bsize = 32,
1823 .cpu_setup = __setup_cpu_460ex,
1824 .machine_check = machine_check_440A,
1825 .platform = "ppc440",
1826 },
Stefan Roese20d70342009-07-29 07:04:46 +00001827 { /* 460EX Rev B */
1828 .pvr_mask = 0xffff0007,
1829 .pvr_value = 0x13020004,
1830 .cpu_name = "460EX Rev. B",
1831 .cpu_features = CPU_FTRS_440x6,
1832 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1833 .mmu_features = MMU_FTR_TYPE_44x,
1834 .icache_bsize = 32,
1835 .dcache_bsize = 32,
1836 .cpu_setup = __setup_cpu_460ex,
1837 .machine_check = machine_check_440A,
1838 .platform = "ppc440",
1839 },
Stefan Roese464076a2008-02-24 08:07:41 +11001840 { /* 460GT */
Stefan Roese20d70342009-07-29 07:04:46 +00001841 .pvr_mask = 0xffff0006,
Stefan Roese464076a2008-02-24 08:07:41 +11001842 .pvr_value = 0x13020000,
1843 .cpu_name = "460GT",
Benjamin Herrenschmidt6d2170b2008-12-18 19:13:22 +00001844 .cpu_features = CPU_FTRS_440x6,
Josh Boyer939e6222008-06-11 07:52:40 -04001845 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001846 .mmu_features = MMU_FTR_TYPE_44x,
Stefan Roese464076a2008-02-24 08:07:41 +11001847 .icache_bsize = 32,
1848 .dcache_bsize = 32,
Josh Boyer939e6222008-06-11 07:52:40 -04001849 .cpu_setup = __setup_cpu_460gt,
Stefan Roese464076a2008-02-24 08:07:41 +11001850 .machine_check = machine_check_440A,
1851 .platform = "ppc440",
1852 },
Stefan Roese20d70342009-07-29 07:04:46 +00001853 { /* 460GT Rev B */
1854 .pvr_mask = 0xffff0007,
1855 .pvr_value = 0x13020005,
1856 .cpu_name = "460GT Rev. B",
1857 .cpu_features = CPU_FTRS_440x6,
1858 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1859 .mmu_features = MMU_FTR_TYPE_44x,
1860 .icache_bsize = 32,
1861 .dcache_bsize = 32,
1862 .cpu_setup = __setup_cpu_460gt,
1863 .machine_check = machine_check_440A,
1864 .platform = "ppc440",
1865 },
Madhulika Madishetty6c712092009-02-05 13:31:36 +00001866 { /* 460SX */
1867 .pvr_mask = 0xffffff00,
1868 .pvr_value = 0x13541800,
1869 .cpu_name = "460SX",
1870 .cpu_features = CPU_FTRS_44X,
1871 .cpu_user_features = COMMON_USER_BOOKE,
1872 .mmu_features = MMU_FTR_TYPE_44x,
1873 .icache_bsize = 32,
1874 .dcache_bsize = 32,
1875 .cpu_setup = __setup_cpu_460sx,
1876 .machine_check = machine_check_440A,
1877 .platform = "ppc440",
1878 },
Tirumala Marri6edc3232010-09-13 13:26:11 +00001879 { /* 464 in APM821xx */
Vinh Nguyen Huu Tuong7c801162011-12-20 02:43:34 +00001880 .pvr_mask = 0xfffffff0,
Tirumala Marri6edc3232010-09-13 13:26:11 +00001881 .pvr_value = 0x12C41C80,
1882 .cpu_name = "APM821XX",
1883 .cpu_features = CPU_FTRS_44X,
1884 .cpu_user_features = COMMON_USER_BOOKE |
1885 PPC_FEATURE_HAS_FPU,
1886 .mmu_features = MMU_FTR_TYPE_44x,
1887 .icache_bsize = 32,
1888 .dcache_bsize = 32,
1889 .cpu_setup = __setup_cpu_apm821xx,
1890 .machine_check = machine_check_440A,
1891 .platform = "ppc440",
1892 },
Michael Ellerman13fef7f2017-08-08 16:39:17 +10001893#ifdef CONFIG_PPC_47x
Dave Kleikampc48d0db2011-01-26 06:17:58 +00001894 { /* 476 DD2 core */
1895 .pvr_mask = 0xffffffff,
1896 .pvr_value = 0x11a52080,
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001897 .cpu_name = "476",
Dave Kleikampc48d0db2011-01-26 06:17:58 +00001898 .cpu_features = CPU_FTRS_47X | CPU_FTR_476_DD2,
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001899 .cpu_user_features = COMMON_USER_BOOKE |
1900 PPC_FEATURE_HAS_FPU,
1901 .mmu_features = MMU_FTR_TYPE_47x |
1902 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1903 .icache_bsize = 32,
1904 .dcache_bsize = 128,
Dave Kleikampfc5e7092010-03-05 03:43:18 +00001905 .machine_check = machine_check_47x,
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001906 .platform = "ppc470",
1907 },
Tony Breedsdf777bd2011-11-30 21:39:23 +00001908 { /* 476fpe */
1909 .pvr_mask = 0xffff0000,
1910 .pvr_value = 0x7ff50000,
1911 .cpu_name = "476fpe",
1912 .cpu_features = CPU_FTRS_47X | CPU_FTR_476_DD2,
1913 .cpu_user_features = COMMON_USER_BOOKE |
1914 PPC_FEATURE_HAS_FPU,
1915 .mmu_features = MMU_FTR_TYPE_47x |
1916 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1917 .icache_bsize = 32,
1918 .dcache_bsize = 128,
1919 .machine_check = machine_check_47x,
1920 .platform = "ppc470",
1921 },
Torez Smithb4e8c8d2010-03-05 10:45:54 +00001922 { /* 476 iss */
1923 .pvr_mask = 0xffff0000,
1924 .pvr_value = 0x00050000,
1925 .cpu_name = "476",
1926 .cpu_features = CPU_FTRS_47X,
1927 .cpu_user_features = COMMON_USER_BOOKE |
1928 PPC_FEATURE_HAS_FPU,
Torez Smithb4e8c8d2010-03-05 10:45:54 +00001929 .mmu_features = MMU_FTR_TYPE_47x |
1930 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1931 .icache_bsize = 32,
1932 .dcache_bsize = 128,
1933 .machine_check = machine_check_47x,
1934 .platform = "ppc470",
1935 },
Dave Kleikampc48d0db2011-01-26 06:17:58 +00001936 { /* 476 others */
1937 .pvr_mask = 0xffff0000,
1938 .pvr_value = 0x11a50000,
1939 .cpu_name = "476",
1940 .cpu_features = CPU_FTRS_47X,
1941 .cpu_user_features = COMMON_USER_BOOKE |
1942 PPC_FEATURE_HAS_FPU,
1943 .mmu_features = MMU_FTR_TYPE_47x |
1944 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1945 .icache_bsize = 32,
1946 .dcache_bsize = 128,
1947 .machine_check = machine_check_47x,
1948 .platform = "ppc470",
1949 },
Michael Ellerman13fef7f2017-08-08 16:39:17 +10001950#endif /* CONFIG_PPC_47x */
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001951 { /* default match */
1952 .pvr_mask = 0x00000000,
1953 .pvr_value = 0x00000000,
1954 .cpu_name = "(generic 44x PPC)",
1955 .cpu_features = CPU_FTRS_44X,
1956 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001957 .mmu_features = MMU_FTR_TYPE_44x,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001958 .icache_bsize = 32,
1959 .dcache_bsize = 32,
1960 .machine_check = machine_check_4xx,
1961 .platform = "ppc440",
1962 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001963#endif /* CONFIG_44x */
Josh Boyere3e414b2007-12-24 08:44:47 -06001964#ifdef CONFIG_E200
Stephen Rothwell49209602005-10-12 15:55:09 +10001965 { /* e200z5 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001966 .pvr_mask = 0xfff00000,
1967 .pvr_value = 0x81000000,
1968 .cpu_name = "e200z5",
1969 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001970 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001971 .cpu_user_features = COMMON_USER_BOOKE |
1972 PPC_FEATURE_HAS_EFP_SINGLE |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001973 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001974 .mmu_features = MMU_FTR_TYPE_FSL_E,
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001975 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001976 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001977 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001978 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001979 { /* e200z6 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001980 .pvr_mask = 0xfff00000,
1981 .pvr_value = 0x81100000,
1982 .cpu_name = "e200z6",
1983 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001984 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001985 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001986 PPC_FEATURE_HAS_SPE_COMP |
1987 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001988 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001989 .mmu_features = MMU_FTR_TYPE_FSL_E,
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001990 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001991 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001992 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001993 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001994 { /* default match */
1995 .pvr_mask = 0x00000000,
1996 .pvr_value = 0x00000000,
1997 .cpu_name = "(generic E200 PPC)",
1998 .cpu_features = CPU_FTRS_E200,
1999 .cpu_user_features = COMMON_USER_BOOKE |
2000 PPC_FEATURE_HAS_EFP_SINGLE |
2001 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00002002 .mmu_features = MMU_FTR_TYPE_FSL_E,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002003 .dcache_bsize = 32,
Kumar Gala105c31d2009-01-08 08:31:20 -06002004 .cpu_setup = __setup_cpu_e200,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002005 .machine_check = machine_check_e200,
2006 .platform = "ppc5554",
Paul Mackerras516c8be2008-05-12 14:20:35 +10002007 }
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002008#endif /* CONFIG_E200 */
Kumar Gala4490c062010-10-08 08:32:11 -05002009#endif /* CONFIG_PPC32 */
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002010#ifdef CONFIG_E500
Kumar Gala4490c062010-10-08 08:32:11 -05002011#ifdef CONFIG_PPC32
Mihai Caraman3477e712014-08-20 16:09:03 +03002012#ifndef CONFIG_PPC_E500MC
Stephen Rothwell49209602005-10-12 15:55:09 +10002013 { /* e500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002014 .pvr_mask = 0xffff0000,
2015 .pvr_value = 0x80200000,
2016 .cpu_name = "e500",
Kumar Gala10b35d92005-09-23 14:08:58 -05002017 .cpu_features = CPU_FTRS_E500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002018 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05002019 PPC_FEATURE_HAS_SPE_COMP |
2020 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Nishanth Aravamudan6c1bf482013-05-04 16:01:17 +00002021 .cpu_user_features2 = PPC_FEATURE2_ISEL,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00002022 .mmu_features = MMU_FTR_TYPE_FSL_E,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002023 .icache_bsize = 32,
2024 .dcache_bsize = 32,
2025 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06002026 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06002027 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06002028 .cpu_setup = __setup_cpu_e500v1,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11002029 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002030 .platform = "ppc8540",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002031 },
Stephen Rothwell49209602005-10-12 15:55:09 +10002032 { /* e500v2 */
Kumar Gala5b37b702005-06-21 17:15:18 -07002033 .pvr_mask = 0xffff0000,
2034 .pvr_value = 0x80210000,
2035 .cpu_name = "e500v2",
Kumar Gala10b35d92005-09-23 14:08:58 -05002036 .cpu_features = CPU_FTRS_E500_2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002037 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05002038 PPC_FEATURE_HAS_SPE_COMP |
2039 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
2040 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
Nishanth Aravamudan6c1bf482013-05-04 16:01:17 +00002041 .cpu_user_features2 = PPC_FEATURE2_ISEL,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00002042 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS,
Kumar Gala5b37b702005-06-21 17:15:18 -07002043 .icache_bsize = 32,
2044 .dcache_bsize = 32,
2045 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06002046 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06002047 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06002048 .cpu_setup = __setup_cpu_e500v2,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11002049 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002050 .platform = "ppc8548",
chenhui zhaoe7affb12015-11-20 17:13:58 +08002051 .cpu_down_flush = cpu_down_flush_e500v2,
Kumar Gala5b37b702005-06-21 17:15:18 -07002052 },
Mihai Caraman3477e712014-08-20 16:09:03 +03002053#else
Kumar Gala3dfa8772008-06-16 09:41:32 -05002054 { /* e500mc */
2055 .pvr_mask = 0xffff0000,
2056 .pvr_value = 0x80230000,
2057 .cpu_name = "e500mc",
Kumar Gala3dfa8772008-06-16 09:41:32 -05002058 .cpu_features = CPU_FTRS_E500MC,
2059 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Nishanth Aravamudan6c1bf482013-05-04 16:01:17 +00002060 .cpu_user_features2 = PPC_FEATURE2_ISEL,
Kumar Galac3071952009-02-10 22:26:06 -06002061 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
Kumar Gala323d23a2009-04-23 08:51:22 -05002062 MMU_FTR_USE_TLBILX,
Kumar Gala3dfa8772008-06-16 09:41:32 -05002063 .icache_bsize = 64,
2064 .dcache_bsize = 64,
2065 .num_pmcs = 4,
Scott Wooda11106542010-02-25 18:09:45 -06002066 .oprofile_cpu_type = "ppc/e500mc",
Kumar Gala3dfa8772008-06-16 09:41:32 -05002067 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06002068 .cpu_setup = __setup_cpu_e500mc,
Scott Woodfe04b112010-04-08 00:38:22 -05002069 .machine_check = machine_check_e500mc,
Kumar Gala3dfa8772008-06-16 09:41:32 -05002070 .platform = "ppce500mc",
chenhui zhaoe7affb12015-11-20 17:13:58 +08002071 .cpu_down_flush = cpu_down_flush_e500mc,
Kumar Gala3dfa8772008-06-16 09:41:32 -05002072 },
Mihai Caraman3477e712014-08-20 16:09:03 +03002073#endif /* CONFIG_PPC_E500MC */
Kumar Gala4490c062010-10-08 08:32:11 -05002074#endif /* CONFIG_PPC32 */
Mihai Caraman3477e712014-08-20 16:09:03 +03002075#ifdef CONFIG_PPC_E500MC
Kumar Gala4490c062010-10-08 08:32:11 -05002076 { /* e5500 */
2077 .pvr_mask = 0xffff0000,
2078 .pvr_value = 0x80240000,
2079 .cpu_name = "e5500",
Kumar Gala11ed0db2011-04-06 00:11:06 -05002080 .cpu_features = CPU_FTRS_E5500,
Kumar Galafb9be232011-06-02 11:26:13 -05002081 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Nishanth Aravamudan6c1bf482013-05-04 16:01:17 +00002082 .cpu_user_features2 = PPC_FEATURE2_ISEL,
Kumar Gala4490c062010-10-08 08:32:11 -05002083 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
2084 MMU_FTR_USE_TLBILX,
2085 .icache_bsize = 64,
2086 .dcache_bsize = 64,
2087 .num_pmcs = 4,
2088 .oprofile_cpu_type = "ppc/e500mc",
2089 .oprofile_type = PPC_OPROFILE_FSL_EMB,
2090 .cpu_setup = __setup_cpu_e5500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05302091#ifndef CONFIG_PPC32
Kumar Gala4490c062010-10-08 08:32:11 -05002092 .cpu_restore = __restore_cpu_e5500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05302093#endif
Kumar Gala4490c062010-10-08 08:32:11 -05002094 .machine_check = machine_check_e500mc,
2095 .platform = "ppce5500",
chenhui zhaoe7affb12015-11-20 17:13:58 +08002096 .cpu_down_flush = cpu_down_flush_e5500,
Kumar Gala4490c062010-10-08 08:32:11 -05002097 },
Kumar Gala10241842011-11-06 11:51:07 -06002098 { /* e6500 */
2099 .pvr_mask = 0xffff0000,
2100 .pvr_value = 0x80400000,
2101 .cpu_name = "e6500",
2102 .cpu_features = CPU_FTRS_E6500,
Kumar Galacd66cc22012-09-07 15:57:17 -05002103 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU |
2104 PPC_FEATURE_HAS_ALTIVEC_COMP,
Nishanth Aravamudan6c1bf482013-05-04 16:01:17 +00002105 .cpu_user_features2 = PPC_FEATURE2_ISEL,
Kumar Gala10241842011-11-06 11:51:07 -06002106 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
2107 MMU_FTR_USE_TLBILX,
2108 .icache_bsize = 64,
2109 .dcache_bsize = 64,
Lijun Pan5815c432013-06-05 15:22:09 -05002110 .num_pmcs = 6,
Kumar Gala10241842011-11-06 11:51:07 -06002111 .oprofile_cpu_type = "ppc/e6500",
2112 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Galacd66cc22012-09-07 15:57:17 -05002113 .cpu_setup = __setup_cpu_e6500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05302114#ifndef CONFIG_PPC32
Kumar Galacd66cc22012-09-07 15:57:17 -05002115 .cpu_restore = __restore_cpu_e6500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05302116#endif
Kumar Gala10241842011-11-06 11:51:07 -06002117 .machine_check = machine_check_e500mc,
2118 .platform = "ppce6500",
chenhui zhaoe7affb12015-11-20 17:13:58 +08002119 .cpu_down_flush = cpu_down_flush_e6500,
Kumar Gala10241842011-11-06 11:51:07 -06002120 },
Mihai Caraman3477e712014-08-20 16:09:03 +03002121#endif /* CONFIG_PPC_E500MC */
Kumar Gala4490c062010-10-08 08:32:11 -05002122#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -07002123 { /* default match */
2124 .pvr_mask = 0x00000000,
2125 .pvr_value = 0x00000000,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002126 .cpu_name = "(generic E500 PPC)",
2127 .cpu_features = CPU_FTRS_E500,
2128 .cpu_user_features = COMMON_USER_BOOKE |
2129 PPC_FEATURE_HAS_SPE_COMP |
2130 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00002131 .mmu_features = MMU_FTR_TYPE_FSL_E,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002132 .icache_bsize = 32,
2133 .dcache_bsize = 32,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002134 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002135 .platform = "powerpc",
Paul Mackerras516c8be2008-05-12 14:20:35 +10002136 }
Stephen Rothwell49209602005-10-12 15:55:09 +10002137#endif /* CONFIG_PPC32 */
Kumar Gala4490c062010-10-08 08:32:11 -05002138#endif /* CONFIG_E500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002139};
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002140
Nicholas Piggin5a61ef72017-05-09 13:16:52 +10002141void __init set_cur_cpu_spec(struct cpu_spec *s)
2142{
2143 struct cpu_spec *t = &the_cpu_spec;
2144
2145 t = PTRRELOC(t);
Christophe Leroyadcf5912019-04-26 16:23:29 +00002146 /*
2147 * use memcpy() instead of *t = *s so that GCC replaces it
2148 * by __memcpy() when KASAN is active
2149 */
2150 memcpy(t, s, sizeof(*t));
Nicholas Piggin5a61ef72017-05-09 13:16:52 +10002151
2152 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
2153}
Paul Mackerras87a72f92007-10-04 14:18:01 +10002154
Scott Wood26ee9762011-07-25 11:04:36 +00002155static struct cpu_spec * __init setup_cpu_spec(unsigned long offset,
2156 struct cpu_spec *s)
Michael Ellerman666435b2009-02-22 16:25:43 +00002157{
2158 struct cpu_spec *t = &the_cpu_spec;
Michael Ellerman2657dd42009-02-22 16:25:45 +00002159 struct cpu_spec old;
2160
Michael Ellerman666435b2009-02-22 16:25:43 +00002161 t = PTRRELOC(t);
Michael Ellerman2657dd42009-02-22 16:25:45 +00002162 old = *t;
2163
Christophe Leroyadcf5912019-04-26 16:23:29 +00002164 /*
2165 * Copy everything, then do fixups. Use memcpy() instead of *t = *s
2166 * so that GCC replaces it by __memcpy() when KASAN is active
2167 */
2168 memcpy(t, s, sizeof(*t));
Michael Ellerman666435b2009-02-22 16:25:43 +00002169
2170 /*
2171 * If we are overriding a previous value derived from the real
2172 * PVR with a new value obtained using a logical PVR value,
2173 * don't modify the performance monitor fields.
2174 */
Michael Ellerman2657dd42009-02-22 16:25:45 +00002175 if (old.num_pmcs && !s->num_pmcs) {
2176 t->num_pmcs = old.num_pmcs;
2177 t->pmc_type = old.pmc_type;
2178 t->oprofile_type = old.oprofile_type;
2179 t->oprofile_mmcra_sihv = old.oprofile_mmcra_sihv;
2180 t->oprofile_mmcra_sipr = old.oprofile_mmcra_sipr;
2181 t->oprofile_mmcra_clear = old.oprofile_mmcra_clear;
2182
Michael Ellerman666435b2009-02-22 16:25:43 +00002183 /*
2184 * If we have passed through this logic once before and
2185 * have pulled the default case because the real PVR was
2186 * not found inside cpu_specs[], then we are possibly
2187 * running in compatibility mode. In that case, let the
2188 * oprofiler know which set of compatibility counters to
2189 * pull from by making sure the oprofile_cpu_type string
2190 * is set to that of compatibility mode. If the
2191 * oprofile_cpu_type already has a value, then we are
2192 * possibly overriding a real PVR with a logical one,
2193 * and, in that case, keep the current value for
2194 * oprofile_cpu_type.
2195 */
Benjamin Herrenschmidtb173f032009-05-14 18:34:06 +00002196 if (old.oprofile_cpu_type != NULL) {
Benjamin Herrenschmidt0203d6e2009-04-29 19:39:38 +00002197 t->oprofile_cpu_type = old.oprofile_cpu_type;
2198 t->oprofile_type = old.oprofile_type;
Michael Wolf79af6c42009-04-27 06:17:54 +00002199 }
Michael Ellerman2657dd42009-02-22 16:25:45 +00002200 }
Michael Ellerman666435b2009-02-22 16:25:43 +00002201
2202 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
2203
2204 /*
2205 * Set the base platform string once; assumes
2206 * we're called with real pvr first.
2207 */
2208 if (*PTRRELOC(&powerpc_base_platform) == NULL)
2209 *PTRRELOC(&powerpc_base_platform) = t->platform;
2210
2211#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
2212 /* ppc64 and booke expect identify_cpu to also call setup_cpu for
2213 * that processor. I will consolidate that at a later time, for now,
2214 * just use #ifdef. We also don't need to PTRRELOC the function
2215 * pointer on ppc64 and booke as we are running at 0 in real mode
2216 * on ppc64 and reloc_offset is always 0 on booke.
2217 */
Benjamin Herrenschmidtaf9eef32011-01-20 20:36:03 +00002218 if (t->cpu_setup) {
2219 t->cpu_setup(offset, t);
Michael Ellerman666435b2009-02-22 16:25:43 +00002220 }
2221#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
Scott Wood26ee9762011-07-25 11:04:36 +00002222
2223 return t;
Michael Ellerman666435b2009-02-22 16:25:43 +00002224}
2225
Paul Mackerras87a72f92007-10-04 14:18:01 +10002226struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002227{
2228 struct cpu_spec *s = cpu_specs;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002229 int i;
2230
2231 s = PTRRELOC(s);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002232
Michael Ellerman666435b2009-02-22 16:25:43 +00002233 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) {
Scott Wood26ee9762011-07-25 11:04:36 +00002234 if ((pvr & s->pvr_mask) == s->pvr_value)
2235 return setup_cpu_spec(offset, s);
Michael Ellerman666435b2009-02-22 16:25:43 +00002236 }
2237
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002238 BUG();
Michael Ellerman666435b2009-02-22 16:25:43 +00002239
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002240 return NULL;
2241}
Kevin Hao4db73272016-07-23 14:42:41 +05302242
Nicholas Piggin5a61ef72017-05-09 13:16:52 +10002243/*
2244 * Used by cpufeatures to get the name for CPUs with a PVR table.
2245 * If they don't hae a PVR table, cpufeatures gets the name from
2246 * cpu device-tree node.
2247 */
2248void __init identify_cpu_name(unsigned int pvr)
2249{
2250 struct cpu_spec *s = cpu_specs;
2251 struct cpu_spec *t = &the_cpu_spec;
2252 int i;
2253
2254 s = PTRRELOC(s);
2255 t = PTRRELOC(t);
2256
2257 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) {
2258 if ((pvr & s->pvr_mask) == s->pvr_value) {
2259 t->cpu_name = s->cpu_name;
2260 return;
2261 }
2262 }
2263}
2264
2265
Kevin Hao4db73272016-07-23 14:42:41 +05302266#ifdef CONFIG_JUMP_LABEL_FEATURE_CHECKS
2267struct static_key_true cpu_feature_keys[NUM_CPU_FTR_KEYS] = {
2268 [0 ... NUM_CPU_FTR_KEYS - 1] = STATIC_KEY_TRUE_INIT
2269};
2270EXPORT_SYMBOL_GPL(cpu_feature_keys);
2271
2272void __init cpu_feature_keys_init(void)
2273{
2274 int i;
2275
2276 for (i = 0; i < NUM_CPU_FTR_KEYS; i++) {
2277 unsigned long f = 1ul << i;
2278
2279 if (!(cur_cpu_spec->cpu_features & f))
2280 static_branch_disable(&cpu_feature_keys[i]);
2281 }
2282}
Kevin Haoc12e6f22016-07-23 14:42:42 +05302283
2284struct static_key_true mmu_feature_keys[NUM_MMU_FTR_KEYS] = {
2285 [0 ... NUM_MMU_FTR_KEYS - 1] = STATIC_KEY_TRUE_INIT
2286};
2287EXPORT_SYMBOL_GPL(mmu_feature_keys);
2288
2289void __init mmu_feature_keys_init(void)
2290{
2291 int i;
2292
2293 for (i = 0; i < NUM_MMU_FTR_KEYS; i++) {
2294 unsigned long f = 1ul << i;
2295
2296 if (!(cur_cpu_spec->mmu_features & f))
2297 static_branch_disable(&mmu_feature_keys[i]);
2298 }
2299}
Kevin Hao4db73272016-07-23 14:42:41 +05302300#endif