blob: ae0fdef0ac1156c120c40ebc591c90898a13043f [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
Linus Torvalds1da177e2005-04-16 15:20:36 -070016#include <asm/cputable.h>
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +100017#include <asm/prom.h> /* for PTRRELOC on ARCH=ppc */
Nicholas Piggin9983efa2020-09-16 13:02:33 +100018#include <asm/mce.h>
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_e500v1(unsigned long offset, struct cpu_spec* spec);
39extern void __setup_cpu_e500v2(unsigned long offset, struct cpu_spec* spec);
40extern void __setup_cpu_e500mc(unsigned long offset, struct cpu_spec* spec);
Valentine Barshak81127532007-09-22 00:46:57 +100041extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
42extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110043extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
Valentine Barshak340ffd22007-09-22 00:50:09 +100044extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110045extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
Grant Likely640d17d2008-12-04 05:39:55 +000046extern void __setup_cpu_440x5(unsigned long offset, struct cpu_spec* spec);
Stefan Roese464076a2008-02-24 08:07:41 +110047extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec);
Josh Boyer939e6222008-06-11 07:52:40 -040048extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec);
Madhulika Madishetty6c712092009-02-05 13:31:36 +000049extern void __setup_cpu_460sx(unsigned long offset, struct cpu_spec *spec);
Tirumala Marri6edc3232010-09-13 13:26:11 +000050extern void __setup_cpu_apm821xx(unsigned long offset, struct cpu_spec *spec);
Kumar Gala400d2212005-09-27 15:13:12 -050051extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
52extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
53extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
54extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
55extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
56extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
57extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
58extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell49209602005-10-12 15:55:09 +100059#endif /* CONFIG_PPC32 */
Olof Johanssonf39b7a52006-08-11 00:07:08 -050060#ifdef CONFIG_PPC64
Jordan Niethe344fbab2020-10-14 18:28:37 +110061#include <asm/cpu_setup_power.h>
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);
Jordan Niethe344fbab2020-10-14 18:28:37 +110067extern long __machine_check_early_realmode_p7(struct pt_regs *regs);
68extern long __machine_check_early_realmode_p8(struct pt_regs *regs);
69extern long __machine_check_early_realmode_p9(struct pt_regs *regs);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050070#endif /* CONFIG_PPC64 */
Kumar Gala4490c062010-10-08 08:32:11 -050071#if defined(CONFIG_E500)
72extern void __setup_cpu_e5500(unsigned long offset, struct cpu_spec* spec);
Kumar Galacd66cc22012-09-07 15:57:17 -050073extern void __setup_cpu_e6500(unsigned long offset, struct cpu_spec* spec);
Kumar Gala4490c062010-10-08 08:32:11 -050074extern void __restore_cpu_e5500(void);
Kumar Galacd66cc22012-09-07 15:57:17 -050075extern void __restore_cpu_e6500(void);
Kumar Gala4490c062010-10-08 08:32:11 -050076#endif /* CONFIG_E500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070077
Linus Torvalds1da177e2005-04-16 15:20:36 -070078/* This table only contains "desktop" CPUs, it need to be filled with embedded
79 * ones as well...
80 */
Stephen Rothwell49209602005-10-12 15:55:09 +100081#define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
82 PPC_FEATURE_HAS_MMU)
83#define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +110084#define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
Benjamin Herrenschmidtaa5cb0212006-03-01 15:07:07 +110085#define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
86 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
87#define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
88 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
Anton Blanchard03054d52006-04-29 09:51:06 +100089#define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
Paul Mackerrasfab5db92006-06-07 16:14:40 +100090 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
Nathan Lynch0f473312008-07-10 01:06:57 +100091 PPC_FEATURE_TRUE_LE | \
92 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Michael Neulinge952e6c2008-06-18 10:47:26 +100093#define COMMON_USER_POWER7 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
94 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
Nathan Lynch0f473312008-07-10 01:06:57 +100095 PPC_FEATURE_TRUE_LE | \
96 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Nishanth Aravamudan4a1ae4f2013-05-03 14:48:38 +000097#define COMMON_USER2_POWER7 (PPC_FEATURE2_DSCR)
Michael Neuling71e18492012-10-30 19:34:15 +000098#define COMMON_USER_POWER8 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
99 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
100 PPC_FEATURE_TRUE_LE | \
101 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Nishanth Aravamudan748645b2013-05-03 14:49:59 +0000102#define COMMON_USER2_POWER8 (PPC_FEATURE2_ARCH_2_07 | \
Sam bobroffb4b56f92015-06-12 11:06:32 +1000103 PPC_FEATURE2_HTM_COMP | \
104 PPC_FEATURE2_HTM_NOSC_COMP | \
105 PPC_FEATURE2_DSCR | \
Benjamin Herrenschmidtdd58a092014-06-10 15:04:40 +1000106 PPC_FEATURE2_ISEL | PPC_FEATURE2_TAR | \
107 PPC_FEATURE2_VEC_CRYPTO)
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500108#define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
109 PPC_FEATURE_TRUE_LE | \
110 PPC_FEATURE_HAS_ALTIVEC_COMP)
Michael Neulingc3ab3002016-02-19 11:16:24 +1100111#define COMMON_USER_POWER9 COMMON_USER_POWER8
112#define COMMON_USER2_POWER9 (COMMON_USER2_POWER8 | \
113 PPC_FEATURE2_ARCH_3_00 | \
Nicholas Piggina4700a22017-05-20 14:29:49 +1000114 PPC_FEATURE2_HAS_IEEE128 | \
Nicholas Piggin7fa95f92020-06-11 18:12:03 +1000115 PPC_FEATURE2_DARN | \
116 PPC_FEATURE2_SCV)
Alistair Popplea3ea40d2020-05-21 11:43:41 +1000117#define COMMON_USER_POWER10 COMMON_USER_POWER9
Jordan Nietheec613a572020-08-27 13:55:29 +1000118#define COMMON_USER2_POWER10 (PPC_FEATURE2_ARCH_3_1 | \
119 PPC_FEATURE2_MMA | \
120 PPC_FEATURE2_ARCH_3_00 | \
121 PPC_FEATURE2_HAS_IEEE128 | \
122 PPC_FEATURE2_DARN | \
123 PPC_FEATURE2_SCV | \
124 PPC_FEATURE2_ARCH_2_07 | \
125 PPC_FEATURE2_DSCR | \
126 PPC_FEATURE2_ISEL | PPC_FEATURE2_TAR | \
127 PPC_FEATURE2_VEC_CRYPTO)
Michael Neulingc3ab3002016-02-19 11:16:24 +1100128
Kumar Galaf45c4482009-08-18 19:08:30 +0000129#ifdef CONFIG_PPC_BOOK3E_64
130#define COMMON_USER_BOOKE (COMMON_USER_PPC64 | PPC_FEATURE_BOOKE)
131#else
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100132#define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
133 PPC_FEATURE_BOOKE)
Kumar Galaf45c4482009-08-18 19:08:30 +0000134#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -0700135
Paul Mackerras87a72f92007-10-04 14:18:01 +1000136static struct cpu_spec __initdata cpu_specs[] = {
Benjamin Herrenschmidt2d27cfd2009-07-23 23:15:59 +0000137#ifdef CONFIG_PPC_BOOK3S_64
Stephen Rothwell49209602005-10-12 15:55:09 +1000138 { /* PPC970 */
139 .pvr_mask = 0xffff0000,
140 .pvr_value = 0x00390000,
141 .cpu_name = "PPC970",
142 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100143 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000144 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000145 .mmu_features = MMU_FTRS_PPC970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000146 .icache_bsize = 128,
147 .dcache_bsize = 128,
148 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600149 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000150 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500151 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000152 .oprofile_cpu_type = "ppc64/970",
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100153 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000154 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000155 { /* PPC970FX */
156 .pvr_mask = 0xffff0000,
157 .pvr_value = 0x003c0000,
158 .cpu_name = "PPC970FX",
Stephen Rothwell49209602005-10-12 15:55:09 +1000159 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100160 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000161 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000162 .mmu_features = MMU_FTRS_PPC970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000163 .icache_bsize = 128,
164 .dcache_bsize = 128,
165 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600166 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000167 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500168 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000169 .oprofile_cpu_type = "ppc64/970",
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100170 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000171 },
Olof Johansson3546e812007-02-26 00:35:14 -0600172 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
173 .pvr_mask = 0xffffffff,
174 .pvr_value = 0x00440100,
175 .cpu_name = "PPC970MP",
176 .cpu_features = CPU_FTRS_PPC970,
177 .cpu_user_features = COMMON_USER_POWER4 |
178 PPC_FEATURE_HAS_ALTIVEC_COMP,
Benjamin Herrenschmidtd63ac5f2013-03-13 09:55:02 +1100179 .mmu_features = MMU_FTRS_PPC970,
Olof Johansson3546e812007-02-26 00:35:14 -0600180 .icache_bsize = 128,
181 .dcache_bsize = 128,
182 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000183 .pmc_type = PPC_PMC_IBM,
Olof Johansson3546e812007-02-26 00:35:14 -0600184 .cpu_setup = __setup_cpu_ppc970,
185 .cpu_restore = __restore_cpu_ppc970,
186 .oprofile_cpu_type = "ppc64/970MP",
Olof Johansson3546e812007-02-26 00:35:14 -0600187 .platform = "ppc970",
188 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000189 { /* PPC970MP */
190 .pvr_mask = 0xffff0000,
191 .pvr_value = 0x00440000,
192 .cpu_name = "PPC970MP",
193 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100194 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000195 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000196 .mmu_features = MMU_FTRS_PPC970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000197 .icache_bsize = 128,
198 .dcache_bsize = 128,
Anton Blanchard87af41b2006-05-05 05:44:26 +1000199 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000200 .pmc_type = PPC_PMC_IBM,
Olof Johansson5b43d202006-10-04 23:41:41 -0500201 .cpu_setup = __setup_cpu_ppc970MP,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500202 .cpu_restore = __restore_cpu_ppc970,
Mike Wolffecb3522006-11-21 14:41:54 -0600203 .oprofile_cpu_type = "ppc64/970MP",
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100204 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000205 },
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500206 { /* PPC970GX */
207 .pvr_mask = 0xffff0000,
208 .pvr_value = 0x00450000,
209 .cpu_name = "PPC970GX",
210 .cpu_features = CPU_FTRS_PPC970,
211 .cpu_user_features = COMMON_USER_POWER4 |
212 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000213 .mmu_features = MMU_FTRS_PPC970,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500214 .icache_bsize = 128,
215 .dcache_bsize = 128,
216 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600217 .pmc_type = PPC_PMC_IBM,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500218 .cpu_setup = __setup_cpu_ppc970,
219 .oprofile_cpu_type = "ppc64/970",
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500220 .platform = "ppc970",
221 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100222 { /* Power5 GR */
Stephen Rothwell49209602005-10-12 15:55:09 +1000223 .pvr_mask = 0xffff0000,
224 .pvr_value = 0x003a0000,
225 .cpu_name = "POWER5 (gr)",
226 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100227 .cpu_user_features = COMMON_USER_POWER5,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000228 .mmu_features = MMU_FTRS_POWER5,
Stephen Rothwell49209602005-10-12 15:55:09 +1000229 .icache_bsize = 128,
230 .dcache_bsize = 128,
231 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600232 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000233 .oprofile_cpu_type = "ppc64/power5",
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100234 .platform = "power5",
Stephen Rothwell49209602005-10-12 15:55:09 +1000235 },
Mike Wolf31a12ce2007-07-10 13:13:47 -0500236 { /* Power5++ */
237 .pvr_mask = 0xffffff00,
238 .pvr_value = 0x003b0300,
239 .cpu_name = "POWER5+ (gs)",
240 .cpu_features = CPU_FTRS_POWER5,
241 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000242 .mmu_features = MMU_FTRS_POWER5,
Mike Wolf31a12ce2007-07-10 13:13:47 -0500243 .icache_bsize = 128,
244 .dcache_bsize = 128,
245 .num_pmcs = 6,
246 .oprofile_cpu_type = "ppc64/power5++",
Mike Wolf31a12ce2007-07-10 13:13:47 -0500247 .platform = "power5+",
248 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100249 { /* Power5 GS */
Stephen Rothwell49209602005-10-12 15:55:09 +1000250 .pvr_mask = 0xffff0000,
251 .pvr_value = 0x003b0000,
Anton Blanchard834608f2006-01-09 15:42:30 +1100252 .cpu_name = "POWER5+ (gs)",
Stephen Rothwell49209602005-10-12 15:55:09 +1000253 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100254 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000255 .mmu_features = MMU_FTRS_POWER5,
Stephen Rothwell49209602005-10-12 15:55:09 +1000256 .icache_bsize = 128,
257 .dcache_bsize = 128,
258 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600259 .pmc_type = PPC_PMC_IBM,
Anton Blanchard834608f2006-01-09 15:42:30 +1100260 .oprofile_cpu_type = "ppc64/power5+",
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100261 .platform = "power5+",
Stephen Rothwell49209602005-10-12 15:55:09 +1000262 },
Paul Mackerras974a76f2006-11-10 20:38:53 +1100263 { /* POWER6 in P5+ mode; 2.04-compliant processor */
264 .pvr_mask = 0xffffffff,
265 .pvr_value = 0x0f000001,
266 .cpu_name = "POWER5+",
267 .cpu_features = CPU_FTRS_POWER5,
268 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000269 .mmu_features = MMU_FTRS_POWER5,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100270 .icache_bsize = 128,
271 .dcache_bsize = 128,
Michael Wolf79af6c42009-04-27 06:17:54 +0000272 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
Paul Mackerras974a76f2006-11-10 20:38:53 +1100273 .platform = "power5+",
274 },
Anton Blanchard03054d52006-04-29 09:51:06 +1000275 { /* Power6 */
276 .pvr_mask = 0xffff0000,
277 .pvr_value = 0x003e0000,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100278 .cpu_name = "POWER6 (raw)",
279 .cpu_features = CPU_FTRS_POWER6,
280 .cpu_user_features = COMMON_USER_POWER6 |
281 PPC_FEATURE_POWER6_EXT,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000282 .mmu_features = MMU_FTRS_POWER6,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100283 .icache_bsize = 128,
284 .dcache_bsize = 128,
285 .num_pmcs = 6,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000286 .pmc_type = PPC_PMC_IBM,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100287 .oprofile_cpu_type = "ppc64/power6",
Paul Mackerras974a76f2006-11-10 20:38:53 +1100288 .platform = "power6x",
289 },
290 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
291 .pvr_mask = 0xffffffff,
292 .pvr_value = 0x0f000002,
293 .cpu_name = "POWER6 (architected)",
Anton Blanchard03054d52006-04-29 09:51:06 +1000294 .cpu_features = CPU_FTRS_POWER6,
295 .cpu_user_features = COMMON_USER_POWER6,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000296 .mmu_features = MMU_FTRS_POWER6,
Anton Blanchard03054d52006-04-29 09:51:06 +1000297 .icache_bsize = 128,
298 .dcache_bsize = 128,
Michael Wolf79af6c42009-04-27 06:17:54 +0000299 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
Anton Blanchard03054d52006-04-29 09:51:06 +1000300 .platform = "power6",
301 },
Joel Schopp635f5a62008-06-19 06:18:21 +1000302 { /* 2.06-compliant processor, i.e. Power7 "architected" mode */
303 .pvr_mask = 0xffffffff,
304 .pvr_value = 0x0f000003,
305 .cpu_name = "POWER7 (architected)",
306 .cpu_features = CPU_FTRS_POWER7,
307 .cpu_user_features = COMMON_USER_POWER7,
Nishanth Aravamudan4a1ae4f2013-05-03 14:48:38 +0000308 .cpu_user_features2 = COMMON_USER2_POWER7,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000309 .mmu_features = MMU_FTRS_POWER7,
Joel Schopp635f5a62008-06-19 06:18:21 +1000310 .icache_bsize = 128,
311 .dcache_bsize = 128,
Michael Wolf79af6c42009-04-27 06:17:54 +0000312 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
Benjamin Herrenschmidt24cc67d2011-01-20 18:50:55 +1100313 .cpu_setup = __setup_cpu_power7,
314 .cpu_restore = __restore_cpu_power7,
Mahesh Salgaonkare22a2272013-10-30 20:05:11 +0530315 .machine_check_early = __machine_check_early_realmode_p7,
Joel Schopp635f5a62008-06-19 06:18:21 +1000316 .platform = "power7",
317 },
Michael Neulingc674e702012-11-08 20:26:42 +0000318 { /* 2.07-compliant processor, i.e. Power8 "architected" mode */
319 .pvr_mask = 0xffffffff,
320 .pvr_value = 0x0f000004,
321 .cpu_name = "POWER8 (architected)",
322 .cpu_features = CPU_FTRS_POWER8,
323 .cpu_user_features = COMMON_USER_POWER8,
Nishanth Aravamudan748645b2013-05-03 14:49:59 +0000324 .cpu_user_features2 = COMMON_USER2_POWER8,
Michael Neulingc674e702012-11-08 20:26:42 +0000325 .mmu_features = MMU_FTRS_POWER8,
326 .icache_bsize = 128,
327 .dcache_bsize = 128,
Michael Neuling6a60f9e2013-06-04 19:38:54 +0000328 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
Michael Neulingc674e702012-11-08 20:26:42 +0000329 .cpu_setup = __setup_cpu_power8,
330 .cpu_restore = __restore_cpu_power8,
Mahesh Salgaonkarae744f32013-10-30 20:05:26 +0530331 .machine_check_early = __machine_check_early_realmode_p8,
Michael Neulingc674e702012-11-08 20:26:42 +0000332 .platform = "power8",
333 },
Russell Currey6ae3f8a2017-02-17 13:01:35 +1100334 { /* 3.00-compliant processor, i.e. Power9 "architected" mode */
335 .pvr_mask = 0xffffffff,
336 .pvr_value = 0x0f000005,
337 .cpu_name = "POWER9 (architected)",
338 .cpu_features = CPU_FTRS_POWER9,
339 .cpu_user_features = COMMON_USER_POWER9,
340 .cpu_user_features2 = COMMON_USER2_POWER9,
341 .mmu_features = MMU_FTRS_POWER9,
342 .icache_bsize = 128,
343 .dcache_bsize = 128,
Russell Currey6ae3f8a2017-02-17 13:01:35 +1100344 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
345 .cpu_setup = __setup_cpu_power9,
346 .cpu_restore = __restore_cpu_power9,
Russell Currey6ae3f8a2017-02-17 13:01:35 +1100347 .platform = "power9",
348 },
Alistair Popplea3ea40d2020-05-21 11:43:41 +1000349 { /* 3.1-compliant processor, i.e. Power10 "architected" mode */
350 .pvr_mask = 0xffffffff,
351 .pvr_value = 0x0f000006,
352 .cpu_name = "POWER10 (architected)",
353 .cpu_features = CPU_FTRS_POWER10,
354 .cpu_user_features = COMMON_USER_POWER10,
355 .cpu_user_features2 = COMMON_USER2_POWER10,
356 .mmu_features = MMU_FTRS_POWER10,
357 .icache_bsize = 128,
358 .dcache_bsize = 128,
Alistair Popplea3ea40d2020-05-21 11:43:41 +1000359 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
360 .cpu_setup = __setup_cpu_power10,
361 .cpu_restore = __restore_cpu_power10,
362 .platform = "power10",
363 },
Michael Neulinge952e6c2008-06-18 10:47:26 +1000364 { /* Power7 */
365 .pvr_mask = 0xffff0000,
366 .pvr_value = 0x003f0000,
Joel Schopp635f5a62008-06-19 06:18:21 +1000367 .cpu_name = "POWER7 (raw)",
Michael Neulinge952e6c2008-06-18 10:47:26 +1000368 .cpu_features = CPU_FTRS_POWER7,
369 .cpu_user_features = COMMON_USER_POWER7,
Nishanth Aravamudan4a1ae4f2013-05-03 14:48:38 +0000370 .cpu_user_features2 = COMMON_USER2_POWER7,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000371 .mmu_features = MMU_FTRS_POWER7,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000372 .icache_bsize = 128,
373 .dcache_bsize = 128,
374 .num_pmcs = 6,
375 .pmc_type = PPC_PMC_IBM,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000376 .oprofile_cpu_type = "ppc64/power7",
Benjamin Herrenschmidt24cc67d2011-01-20 18:50:55 +1100377 .cpu_setup = __setup_cpu_power7,
378 .cpu_restore = __restore_cpu_power7,
Mahesh Salgaonkare22a2272013-10-30 20:05:11 +0530379 .machine_check_early = __machine_check_early_realmode_p7,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000380 .platform = "power7",
381 },
Michael Neuling6f08cb32010-11-17 18:52:44 +0000382 { /* Power7+ */
383 .pvr_mask = 0xffff0000,
384 .pvr_value = 0x004A0000,
385 .cpu_name = "POWER7+ (raw)",
386 .cpu_features = CPU_FTRS_POWER7,
387 .cpu_user_features = COMMON_USER_POWER7,
Will Schmidtbadec112013-05-20 05:04:18 +0000388 .cpu_user_features2 = COMMON_USER2_POWER7,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000389 .mmu_features = MMU_FTRS_POWER7,
Michael Neuling6f08cb32010-11-17 18:52:44 +0000390 .icache_bsize = 128,
391 .dcache_bsize = 128,
392 .num_pmcs = 6,
393 .pmc_type = PPC_PMC_IBM,
394 .oprofile_cpu_type = "ppc64/power7",
Benjamin Herrenschmidt24cc67d2011-01-20 18:50:55 +1100395 .cpu_setup = __setup_cpu_power7,
396 .cpu_restore = __restore_cpu_power7,
Mahesh Salgaonkare22a2272013-10-30 20:05:11 +0530397 .machine_check_early = __machine_check_early_realmode_p7,
Michael Neuling6f08cb32010-11-17 18:52:44 +0000398 .platform = "power7+",
399 },
Michael Neuling33959f82013-07-18 11:31:51 +1000400 { /* Power8E */
Michael Neuling71e18492012-10-30 19:34:15 +0000401 .pvr_mask = 0xffff0000,
402 .pvr_value = 0x004b0000,
Michael Neuling33959f82013-07-18 11:31:51 +1000403 .cpu_name = "POWER8E (raw)",
Michael Ellerman68f2f0d2014-03-14 16:00:28 +1100404 .cpu_features = CPU_FTRS_POWER8E,
Michael Neuling33959f82013-07-18 11:31:51 +1000405 .cpu_user_features = COMMON_USER_POWER8,
406 .cpu_user_features2 = COMMON_USER2_POWER8,
407 .mmu_features = MMU_FTRS_POWER8,
408 .icache_bsize = 128,
409 .dcache_bsize = 128,
410 .num_pmcs = 6,
411 .pmc_type = PPC_PMC_IBM,
412 .oprofile_cpu_type = "ppc64/power8",
Michael Neuling33959f82013-07-18 11:31:51 +1000413 .cpu_setup = __setup_cpu_power8,
414 .cpu_restore = __restore_cpu_power8,
Mahesh Salgaonkarae744f32013-10-30 20:05:26 +0530415 .machine_check_early = __machine_check_early_realmode_p8,
Michael Neuling33959f82013-07-18 11:31:51 +1000416 .platform = "power8",
417 },
Benjamin Herrenschmidtddee09c2015-03-19 14:12:06 +1100418 { /* Power8NVL */
419 .pvr_mask = 0xffff0000,
420 .pvr_value = 0x004c0000,
421 .cpu_name = "POWER8NVL (raw)",
422 .cpu_features = CPU_FTRS_POWER8,
423 .cpu_user_features = COMMON_USER_POWER8,
424 .cpu_user_features2 = COMMON_USER2_POWER8,
425 .mmu_features = MMU_FTRS_POWER8,
426 .icache_bsize = 128,
427 .dcache_bsize = 128,
428 .num_pmcs = 6,
429 .pmc_type = PPC_PMC_IBM,
430 .oprofile_cpu_type = "ppc64/power8",
Benjamin Herrenschmidtddee09c2015-03-19 14:12:06 +1100431 .cpu_setup = __setup_cpu_power8,
432 .cpu_restore = __restore_cpu_power8,
Benjamin Herrenschmidtddee09c2015-03-19 14:12:06 +1100433 .machine_check_early = __machine_check_early_realmode_p8,
434 .platform = "power8",
435 },
Michael Neuling33959f82013-07-18 11:31:51 +1000436 { /* Power8 */
437 .pvr_mask = 0xffff0000,
438 .pvr_value = 0x004d0000,
Michael Neuling71e18492012-10-30 19:34:15 +0000439 .cpu_name = "POWER8 (raw)",
440 .cpu_features = CPU_FTRS_POWER8,
441 .cpu_user_features = COMMON_USER_POWER8,
Nishanth Aravamudan748645b2013-05-03 14:49:59 +0000442 .cpu_user_features2 = COMMON_USER2_POWER8,
Michael Neuling71e18492012-10-30 19:34:15 +0000443 .mmu_features = MMU_FTRS_POWER8,
444 .icache_bsize = 128,
445 .dcache_bsize = 128,
446 .num_pmcs = 6,
447 .pmc_type = PPC_PMC_IBM,
Michael Neuling6a60f9e2013-06-04 19:38:54 +0000448 .oprofile_cpu_type = "ppc64/power8",
Michael Neuling71e18492012-10-30 19:34:15 +0000449 .cpu_setup = __setup_cpu_power8,
450 .cpu_restore = __restore_cpu_power8,
Mahesh Salgaonkarae744f32013-10-30 20:05:26 +0530451 .machine_check_early = __machine_check_early_realmode_p8,
Michael Neuling71e18492012-10-30 19:34:15 +0000452 .platform = "power8",
453 },
Nicholas Pigginb6b37552017-11-03 15:13:19 +1100454 { /* Power9 DD2.0 */
455 .pvr_mask = 0xffffefff,
456 .pvr_value = 0x004e0200,
457 .cpu_name = "POWER9 (raw)",
Michael Ellerman3ffa9d92017-11-15 14:25:42 +1100458 .cpu_features = CPU_FTRS_POWER9_DD2_0,
Nicholas Pigginb6b37552017-11-03 15:13:19 +1100459 .cpu_user_features = COMMON_USER_POWER9,
460 .cpu_user_features2 = COMMON_USER2_POWER9,
461 .mmu_features = MMU_FTRS_POWER9,
462 .icache_bsize = 128,
463 .dcache_bsize = 128,
464 .num_pmcs = 6,
465 .pmc_type = PPC_PMC_IBM,
466 .oprofile_cpu_type = "ppc64/power9",
Nicholas Pigginb6b37552017-11-03 15:13:19 +1100467 .cpu_setup = __setup_cpu_power9,
468 .cpu_restore = __restore_cpu_power9,
Nicholas Pigginb6b37552017-11-03 15:13:19 +1100469 .machine_check_early = __machine_check_early_realmode_p9,
470 .platform = "power9",
471 },
Paul Mackerrasb5af4f22018-03-21 21:31:59 +1100472 { /* Power9 DD 2.1 */
473 .pvr_mask = 0xffffefff,
474 .pvr_value = 0x004e0201,
475 .cpu_name = "POWER9 (raw)",
476 .cpu_features = CPU_FTRS_POWER9_DD2_1,
477 .cpu_user_features = COMMON_USER_POWER9,
478 .cpu_user_features2 = COMMON_USER2_POWER9,
479 .mmu_features = MMU_FTRS_POWER9,
480 .icache_bsize = 128,
481 .dcache_bsize = 128,
482 .num_pmcs = 6,
483 .pmc_type = PPC_PMC_IBM,
484 .oprofile_cpu_type = "ppc64/power9",
Paul Mackerrasb5af4f22018-03-21 21:31:59 +1100485 .cpu_setup = __setup_cpu_power9,
486 .cpu_restore = __restore_cpu_power9,
Paul Mackerrasb5af4f22018-03-21 21:31:59 +1100487 .machine_check_early = __machine_check_early_realmode_p9,
488 .platform = "power9",
489 },
490 { /* Power9 DD2.2 or later */
Michael Neulingc3ab3002016-02-19 11:16:24 +1100491 .pvr_mask = 0xffff0000,
492 .pvr_value = 0x004e0000,
493 .cpu_name = "POWER9 (raw)",
Paul Mackerrasb5af4f22018-03-21 21:31:59 +1100494 .cpu_features = CPU_FTRS_POWER9_DD2_2,
Michael Neulingc3ab3002016-02-19 11:16:24 +1100495 .cpu_user_features = COMMON_USER_POWER9,
496 .cpu_user_features2 = COMMON_USER2_POWER9,
497 .mmu_features = MMU_FTRS_POWER9,
498 .icache_bsize = 128,
499 .dcache_bsize = 128,
500 .num_pmcs = 6,
501 .pmc_type = PPC_PMC_IBM,
502 .oprofile_cpu_type = "ppc64/power9",
Michael Neulingc3ab3002016-02-19 11:16:24 +1100503 .cpu_setup = __setup_cpu_power9,
504 .cpu_restore = __restore_cpu_power9,
Nicholas Piggin7b9f71f92017-02-28 12:00:48 +1000505 .machine_check_early = __machine_check_early_realmode_p9,
Michael Neulingc3ab3002016-02-19 11:16:24 +1100506 .platform = "power9",
507 },
Madhavan Srinivasan327da002020-08-17 06:26:18 +0530508 { /* Power10 */
509 .pvr_mask = 0xffff0000,
510 .pvr_value = 0x00800000,
511 .cpu_name = "POWER10 (raw)",
512 .cpu_features = CPU_FTRS_POWER10,
513 .cpu_user_features = COMMON_USER_POWER10,
514 .cpu_user_features2 = COMMON_USER2_POWER10,
515 .mmu_features = MMU_FTRS_POWER10,
516 .icache_bsize = 128,
517 .dcache_bsize = 128,
518 .num_pmcs = 6,
519 .pmc_type = PPC_PMC_IBM,
520 .oprofile_cpu_type = "ppc64/power10",
Madhavan Srinivasan327da002020-08-17 06:26:18 +0530521 .cpu_setup = __setup_cpu_power10,
522 .cpu_restore = __restore_cpu_power10,
523 .machine_check_early = __machine_check_early_realmode_p10,
524 .platform = "power10",
525 },
Arnd Bergmannc902be72006-01-04 19:55:53 +0000526 { /* Cell Broadband Engine */
Stephen Rothwell49209602005-10-12 15:55:09 +1000527 .pvr_mask = 0xffff0000,
528 .pvr_value = 0x00700000,
529 .cpu_name = "Cell Broadband Engine",
530 .cpu_features = CPU_FTRS_CELL,
531 .cpu_user_features = COMMON_USER_PPC64 |
Benjamin Herrenschmidtaa5cb0212006-03-01 15:07:07 +1100532 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
533 PPC_FEATURE_SMT,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000534 .mmu_features = MMU_FTRS_CELL,
Stephen Rothwell49209602005-10-12 15:55:09 +1000535 .icache_bsize = 128,
536 .dcache_bsize = 128,
Maynard Johnson18f21902006-11-20 18:45:16 +0100537 .num_pmcs = 4,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600538 .pmc_type = PPC_PMC_IBM,
Maynard Johnson18f21902006-11-20 18:45:16 +0100539 .oprofile_cpu_type = "ppc64/cell-be",
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100540 .platform = "ppc-cell-be",
Stephen Rothwell49209602005-10-12 15:55:09 +1000541 },
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500542 { /* PA Semi PA6T */
543 .pvr_mask = 0x7fff0000,
544 .pvr_value = 0x00900000,
545 .cpu_name = "PA6T",
546 .cpu_features = CPU_FTRS_PA6T,
547 .cpu_user_features = COMMON_USER_PA6T,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000548 .mmu_features = MMU_FTRS_PA6T,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500549 .icache_bsize = 64,
550 .dcache_bsize = 64,
551 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600552 .pmc_type = PPC_PMC_PA6T,
Olof Johansson11999192007-02-04 16:36:51 -0600553 .cpu_setup = __setup_cpu_pa6t,
554 .cpu_restore = __restore_cpu_pa6t,
Olof Johansson25fc5302007-04-18 16:38:21 +1000555 .oprofile_cpu_type = "ppc64/pa6t",
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500556 .platform = "pa6t",
557 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000558 { /* default match */
559 .pvr_mask = 0x00000000,
560 .pvr_value = 0x00000000,
Nicholas Piggin471d7ff2018-02-21 05:08:29 +1000561 .cpu_name = "POWER5 (compatible)",
Stephen Rothwell49209602005-10-12 15:55:09 +1000562 .cpu_features = CPU_FTRS_COMPATIBLE,
563 .cpu_user_features = COMMON_USER_PPC64,
Nicholas Piggin471d7ff2018-02-21 05:08:29 +1000564 .mmu_features = MMU_FTRS_POWER,
Stephen Rothwell49209602005-10-12 15:55:09 +1000565 .icache_bsize = 128,
566 .dcache_bsize = 128,
567 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600568 .pmc_type = PPC_PMC_IBM,
Nicholas Piggin471d7ff2018-02-21 05:08:29 +1000569 .platform = "power5",
Stephen Rothwell49209602005-10-12 15:55:09 +1000570 }
Benjamin Herrenschmidt2d27cfd2009-07-23 23:15:59 +0000571#endif /* CONFIG_PPC_BOOK3S_64 */
Benjamin Herrenschmidt2d27cfd2009-07-23 23:15:59 +0000572
Stephen Rothwell49209602005-10-12 15:55:09 +1000573#ifdef CONFIG_PPC32
Christophe Leroya6a50d82020-10-22 06:29:42 +0000574#ifdef CONFIG_PPC_BOOK3S_32
Christophe Leroy44e97542020-10-22 06:29:44 +0000575#ifdef CONFIG_PPC_BOOK3S_604
Linus Torvalds1da177e2005-04-16 15:20:36 -0700576 { /* 604 */
577 .pvr_mask = 0xffff0000,
578 .pvr_value = 0x00040000,
579 .cpu_name = "604",
Kumar Gala10b35d92005-09-23 14:08:58 -0500580 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000581 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000582 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700583 .icache_bsize = 32,
584 .dcache_bsize = 32,
585 .num_pmcs = 2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100586 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100587 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100588 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700589 },
590 { /* 604e */
591 .pvr_mask = 0xfffff000,
592 .pvr_value = 0x00090000,
593 .cpu_name = "604e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500594 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000595 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000596 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700597 .icache_bsize = 32,
598 .dcache_bsize = 32,
599 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100600 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100601 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100602 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700603 },
604 { /* 604r */
605 .pvr_mask = 0xffff0000,
606 .pvr_value = 0x00090000,
607 .cpu_name = "604r",
Kumar Gala10b35d92005-09-23 14:08:58 -0500608 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000609 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000610 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700611 .icache_bsize = 32,
612 .dcache_bsize = 32,
613 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100614 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100615 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100616 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700617 },
618 { /* 604ev */
619 .pvr_mask = 0xffff0000,
620 .pvr_value = 0x000a0000,
621 .cpu_name = "604ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500622 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000623 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000624 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700625 .icache_bsize = 32,
626 .dcache_bsize = 32,
627 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100628 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100629 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100630 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700631 },
632 { /* 740/750 (0x4202, don't support TAU ?) */
633 .pvr_mask = 0xffffffff,
634 .pvr_value = 0x00084202,
635 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500636 .cpu_features = CPU_FTRS_740_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000637 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000638 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700639 .icache_bsize = 32,
640 .dcache_bsize = 32,
641 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100642 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100643 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100644 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700645 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700646 { /* 750CX (80100 and 8010x?) */
647 .pvr_mask = 0xfffffff0,
648 .pvr_value = 0x00080100,
649 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500650 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000651 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000652 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700653 .icache_bsize = 32,
654 .dcache_bsize = 32,
655 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100656 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100657 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100658 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700659 },
660 { /* 750CX (82201 and 82202) */
661 .pvr_mask = 0xfffffff0,
662 .pvr_value = 0x00082200,
663 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500664 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000665 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000666 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700667 .icache_bsize = 32,
668 .dcache_bsize = 32,
669 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000670 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100671 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100672 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100673 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700674 },
675 { /* 750CXe (82214) */
676 .pvr_mask = 0xfffffff0,
677 .pvr_value = 0x00082210,
678 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500679 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000680 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000681 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700682 .icache_bsize = 32,
683 .dcache_bsize = 32,
684 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000685 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100686 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100687 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100688 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700689 },
Arthur Othieno7c316252005-09-03 15:55:52 -0700690 { /* 750CXe "Gekko" (83214) */
691 .pvr_mask = 0xffffffff,
692 .pvr_value = 0x00083214,
693 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500694 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000695 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000696 .mmu_features = MMU_FTR_HPTE_TABLE,
Arthur Othieno7c316252005-09-03 15:55:52 -0700697 .icache_bsize = 32,
698 .dcache_bsize = 32,
699 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000700 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100701 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100702 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100703 .platform = "ppc750",
Arthur Othieno7c316252005-09-03 15:55:52 -0700704 },
Albert Herranz45158dc2009-12-12 06:31:46 +0000705 { /* 750CL (and "Broadway") */
706 .pvr_mask = 0xfffff0e0,
707 .pvr_value = 0x00087000,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500708 .cpu_name = "750CL",
Josh Boyera14c4502007-04-13 04:33:25 +1000709 .cpu_features = CPU_FTRS_750CL,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500710 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000711 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500712 .icache_bsize = 32,
713 .dcache_bsize = 32,
714 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000715 .pmc_type = PPC_PMC_IBM,
Josh Boyera14c4502007-04-13 04:33:25 +1000716 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100717 .machine_check = machine_check_generic,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500718 .platform = "ppc750",
Dragos Tatulea04f56534772009-09-16 11:58:15 +0300719 .oprofile_cpu_type = "ppc/750",
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500720 },
Arthur Othienoac1ff042005-09-03 15:55:51 -0700721 { /* 745/755 */
722 .pvr_mask = 0xfffff000,
723 .pvr_value = 0x00083000,
724 .cpu_name = "745/755",
Kumar Gala10b35d92005-09-23 14:08:58 -0500725 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000726 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000727 .mmu_features = MMU_FTR_HPTE_TABLE,
Arthur Othienoac1ff042005-09-03 15:55:51 -0700728 .icache_bsize = 32,
729 .dcache_bsize = 32,
730 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000731 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100732 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100733 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100734 .platform = "ppc750",
Arthur Othienoac1ff042005-09-03 15:55:51 -0700735 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700736 { /* 750FX rev 1.x */
737 .pvr_mask = 0xffffff00,
738 .pvr_value = 0x70000100,
739 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500740 .cpu_features = CPU_FTRS_750FX1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000741 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000742 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700743 .icache_bsize = 32,
744 .dcache_bsize = 32,
745 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000746 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100747 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100748 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100749 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000750 .oprofile_cpu_type = "ppc/750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700751 },
752 { /* 750FX rev 2.0 must disable HID0[DPM] */
753 .pvr_mask = 0xffffffff,
754 .pvr_value = 0x70000200,
755 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500756 .cpu_features = CPU_FTRS_750FX2,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000757 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000758 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700759 .icache_bsize = 32,
760 .dcache_bsize = 32,
761 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000762 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100763 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100764 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100765 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000766 .oprofile_cpu_type = "ppc/750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700767 },
768 { /* 750FX (All revs except 2.0) */
769 .pvr_mask = 0xffff0000,
770 .pvr_value = 0x70000000,
771 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500772 .cpu_features = CPU_FTRS_750FX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000773 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000774 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700775 .icache_bsize = 32,
776 .dcache_bsize = 32,
777 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000778 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100779 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100780 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100781 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000782 .oprofile_cpu_type = "ppc/750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700783 },
784 { /* 750GX */
785 .pvr_mask = 0xffff0000,
786 .pvr_value = 0x70020000,
787 .cpu_name = "750GX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500788 .cpu_features = CPU_FTRS_750GX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000789 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000790 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700791 .icache_bsize = 32,
792 .dcache_bsize = 32,
793 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000794 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100795 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100796 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100797 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000798 .oprofile_cpu_type = "ppc/750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700799 },
800 { /* 740/750 (L2CR bit need fixup for 740) */
801 .pvr_mask = 0xffff0000,
802 .pvr_value = 0x00080000,
803 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500804 .cpu_features = CPU_FTRS_740,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000805 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000806 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700807 .icache_bsize = 32,
808 .dcache_bsize = 32,
809 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000810 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100811 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100812 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100813 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700814 },
815 { /* 7400 rev 1.1 ? (no TAU) */
816 .pvr_mask = 0xffffffff,
817 .pvr_value = 0x000c1101,
818 .cpu_name = "7400 (1.1)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500819 .cpu_features = CPU_FTRS_7400_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000820 .cpu_user_features = COMMON_USER |
821 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000822 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700823 .icache_bsize = 32,
824 .dcache_bsize = 32,
825 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000826 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100827 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100828 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100829 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700830 },
831 { /* 7400 */
832 .pvr_mask = 0xffff0000,
833 .pvr_value = 0x000c0000,
834 .cpu_name = "7400",
Kumar Gala10b35d92005-09-23 14:08:58 -0500835 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000836 .cpu_user_features = COMMON_USER |
837 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000838 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700839 .icache_bsize = 32,
840 .dcache_bsize = 32,
841 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000842 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100843 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100844 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100845 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700846 },
847 { /* 7410 */
848 .pvr_mask = 0xffff0000,
849 .pvr_value = 0x800c0000,
850 .cpu_name = "7410",
Kumar Gala10b35d92005-09-23 14:08:58 -0500851 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000852 .cpu_user_features = COMMON_USER |
853 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000854 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700855 .icache_bsize = 32,
856 .dcache_bsize = 32,
857 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000858 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100859 .cpu_setup = __setup_cpu_7410,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100860 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100861 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700862 },
863 { /* 7450 2.0 - no doze/nap */
864 .pvr_mask = 0xffffffff,
865 .pvr_value = 0x80000200,
866 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500867 .cpu_features = CPU_FTRS_7450_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000868 .cpu_user_features = COMMON_USER |
869 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000870 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700871 .icache_bsize = 32,
872 .dcache_bsize = 32,
873 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000874 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600875 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600876 .oprofile_cpu_type = "ppc/7450",
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100877 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100878 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700879 },
880 { /* 7450 2.1 */
881 .pvr_mask = 0xffffffff,
882 .pvr_value = 0x80000201,
883 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500884 .cpu_features = CPU_FTRS_7450_21,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000885 .cpu_user_features = COMMON_USER |
886 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000887 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700888 .icache_bsize = 32,
889 .dcache_bsize = 32,
890 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000891 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600892 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600893 .oprofile_cpu_type = "ppc/7450",
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100894 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100895 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700896 },
897 { /* 7450 2.3 and newer */
898 .pvr_mask = 0xffff0000,
899 .pvr_value = 0x80000000,
900 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500901 .cpu_features = CPU_FTRS_7450_23,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000902 .cpu_user_features = COMMON_USER |
903 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000904 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700905 .icache_bsize = 32,
906 .dcache_bsize = 32,
907 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000908 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600909 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600910 .oprofile_cpu_type = "ppc/7450",
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100911 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100912 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700913 },
914 { /* 7455 rev 1.x */
915 .pvr_mask = 0xffffff00,
916 .pvr_value = 0x80010100,
917 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500918 .cpu_features = CPU_FTRS_7455_1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000919 .cpu_user_features = COMMON_USER |
920 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000921 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700922 .icache_bsize = 32,
923 .dcache_bsize = 32,
924 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000925 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600926 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600927 .oprofile_cpu_type = "ppc/7450",
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100928 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100929 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700930 },
931 { /* 7455 rev 2.0 */
932 .pvr_mask = 0xffffffff,
933 .pvr_value = 0x80010200,
934 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500935 .cpu_features = CPU_FTRS_7455_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000936 .cpu_user_features = COMMON_USER |
937 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000938 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700939 .icache_bsize = 32,
940 .dcache_bsize = 32,
941 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000942 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600943 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600944 .oprofile_cpu_type = "ppc/7450",
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100945 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100946 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700947 },
948 { /* 7455 others */
949 .pvr_mask = 0xffff0000,
950 .pvr_value = 0x80010000,
951 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500952 .cpu_features = CPU_FTRS_7455,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000953 .cpu_user_features = COMMON_USER |
954 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000955 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700956 .icache_bsize = 32,
957 .dcache_bsize = 32,
958 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000959 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600960 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600961 .oprofile_cpu_type = "ppc/7450",
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100962 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100963 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700964 },
965 { /* 7447/7457 Rev 1.0 */
966 .pvr_mask = 0xffffffff,
967 .pvr_value = 0x80020100,
968 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500969 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000970 .cpu_user_features = COMMON_USER |
971 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000972 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700973 .icache_bsize = 32,
974 .dcache_bsize = 32,
975 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000976 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600977 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600978 .oprofile_cpu_type = "ppc/7450",
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100979 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100980 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700981 },
982 { /* 7447/7457 Rev 1.1 */
983 .pvr_mask = 0xffffffff,
984 .pvr_value = 0x80020101,
985 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500986 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000987 .cpu_user_features = COMMON_USER |
988 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000989 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700990 .icache_bsize = 32,
991 .dcache_bsize = 32,
992 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000993 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600994 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600995 .oprofile_cpu_type = "ppc/7450",
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100996 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100997 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700998 },
999 { /* 7447/7457 Rev 1.2 and later */
1000 .pvr_mask = 0xffff0000,
1001 .pvr_value = 0x80020000,
1002 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -05001003 .cpu_features = CPU_FTRS_7447,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001004 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001005 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001006 .icache_bsize = 32,
1007 .dcache_bsize = 32,
1008 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001009 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001010 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001011 .oprofile_cpu_type = "ppc/7450",
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001012 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001013 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001014 },
1015 { /* 7447A */
1016 .pvr_mask = 0xffff0000,
1017 .pvr_value = 0x80030000,
1018 .cpu_name = "7447A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001019 .cpu_features = CPU_FTRS_7447A,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001020 .cpu_user_features = COMMON_USER |
1021 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001022 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001023 .icache_bsize = 32,
1024 .dcache_bsize = 32,
1025 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001026 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001027 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001028 .oprofile_cpu_type = "ppc/7450",
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001029 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001030 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001031 },
Kumar Galabbde6302005-09-03 15:55:55 -07001032 { /* 7448 */
1033 .pvr_mask = 0xffff0000,
1034 .pvr_value = 0x80040000,
1035 .cpu_name = "7448",
James.Yang3d372542007-05-02 16:34:43 -05001036 .cpu_features = CPU_FTRS_7448,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001037 .cpu_user_features = COMMON_USER |
1038 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001039 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Kumar Galabbde6302005-09-03 15:55:55 -07001040 .icache_bsize = 32,
1041 .dcache_bsize = 32,
1042 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001043 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001044 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001045 .oprofile_cpu_type = "ppc/7450",
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001046 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001047 .platform = "ppc7450",
Kumar Galabbde6302005-09-03 15:55:55 -07001048 },
Christophe Leroy44e97542020-10-22 06:29:44 +00001049#endif /* CONFIG_PPC_BOOK3S_604 */
1050#ifdef CONFIG_PPC_BOOK3S_603
Christophe Leroyad510e32020-10-22 06:29:43 +00001051 { /* 603 */
1052 .pvr_mask = 0xffff0000,
1053 .pvr_value = 0x00030000,
1054 .cpu_name = "603",
1055 .cpu_features = CPU_FTRS_603,
1056 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
1057 .mmu_features = 0,
1058 .icache_bsize = 32,
1059 .dcache_bsize = 32,
1060 .cpu_setup = __setup_cpu_603,
1061 .machine_check = machine_check_generic,
1062 .platform = "ppc603",
1063 },
1064 { /* 603e */
1065 .pvr_mask = 0xffff0000,
1066 .pvr_value = 0x00060000,
1067 .cpu_name = "603e",
1068 .cpu_features = CPU_FTRS_603,
1069 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
1070 .mmu_features = 0,
1071 .icache_bsize = 32,
1072 .dcache_bsize = 32,
1073 .cpu_setup = __setup_cpu_603,
1074 .machine_check = machine_check_generic,
1075 .platform = "ppc603",
1076 },
1077 { /* 603ev */
1078 .pvr_mask = 0xffff0000,
1079 .pvr_value = 0x00070000,
1080 .cpu_name = "603ev",
1081 .cpu_features = CPU_FTRS_603,
1082 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
1083 .mmu_features = 0,
1084 .icache_bsize = 32,
1085 .dcache_bsize = 32,
1086 .cpu_setup = __setup_cpu_603,
1087 .machine_check = machine_check_generic,
1088 .platform = "ppc603",
1089 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001090 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
1091 .pvr_mask = 0x7fff0000,
1092 .pvr_value = 0x00810000,
1093 .cpu_name = "82xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001094 .cpu_features = CPU_FTRS_82XX,
Stephen Rothwell49209602005-10-12 15:55:09 +10001095 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001096 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001097 .icache_bsize = 32,
1098 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001099 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001100 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001101 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001102 },
1103 { /* All G2_LE (603e core, plus some) have the same pvr */
1104 .pvr_mask = 0x7fff0000,
1105 .pvr_value = 0x00820000,
1106 .cpu_name = "G2_LE",
Kumar Gala10b35d92005-09-23 14:08:58 -05001107 .cpu_features = CPU_FTRS_G2_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +10001108 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001109 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001110 .icache_bsize = 32,
1111 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001112 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001113 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001114 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001115 },
Christophe Leroy0deae392018-12-10 11:41:29 +00001116#ifdef CONFIG_PPC_83xx
Kim Phillips6c4a2502006-10-02 20:10:24 -05001117 { /* e300c1 (a 603e core, plus some) on 83xx */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001118 .pvr_mask = 0x7fff0000,
1119 .pvr_value = 0x00830000,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001120 .cpu_name = "e300c1",
Kumar Gala10b35d92005-09-23 14:08:58 -05001121 .cpu_features = CPU_FTRS_E300,
Stephen Rothwell49209602005-10-12 15:55:09 +10001122 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001123 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001124 .icache_bsize = 32,
1125 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001126 .cpu_setup = __setup_cpu_603,
Christophe Leroy0deae392018-12-10 11:41:29 +00001127 .machine_check = machine_check_83xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001128 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001129 },
Kim Phillips6c4a2502006-10-02 20:10:24 -05001130 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
1131 .pvr_mask = 0x7fff0000,
1132 .pvr_value = 0x00840000,
1133 .cpu_name = "e300c2",
Kim Phillipsaa42c692006-12-08 02:43:30 -06001134 .cpu_features = CPU_FTRS_E300C2,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001135 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Kumar Gala2319f122009-03-19 03:55:41 +00001136 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1137 MMU_FTR_NEED_DTLB_SW_LRU,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001138 .icache_bsize = 32,
1139 .dcache_bsize = 32,
1140 .cpu_setup = __setup_cpu_603,
Christophe Leroy0deae392018-12-10 11:41:29 +00001141 .machine_check = machine_check_83xx,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001142 .platform = "ppc603",
1143 },
Li Yanga58d5242007-10-19 19:38:42 +08001144 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
Scott Wood57933f82006-12-01 12:57:05 -06001145 .pvr_mask = 0x7fff0000,
1146 .pvr_value = 0x00850000,
1147 .cpu_name = "e300c3",
1148 .cpu_features = CPU_FTRS_E300,
1149 .cpu_user_features = COMMON_USER,
Kumar Gala2319f122009-03-19 03:55:41 +00001150 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1151 MMU_FTR_NEED_DTLB_SW_LRU,
Scott Wood57933f82006-12-01 12:57:05 -06001152 .icache_bsize = 32,
1153 .dcache_bsize = 32,
1154 .cpu_setup = __setup_cpu_603,
Christophe Leroy0deae392018-12-10 11:41:29 +00001155 .machine_check = machine_check_83xx,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001156 .num_pmcs = 4,
1157 .oprofile_cpu_type = "ppc/e300",
Scott Wood57933f82006-12-01 12:57:05 -06001158 .platform = "ppc603",
1159 },
Li Yanga58d5242007-10-19 19:38:42 +08001160 { /* e300c4 (e300c1, plus one IU) */
1161 .pvr_mask = 0x7fff0000,
1162 .pvr_value = 0x00860000,
1163 .cpu_name = "e300c4",
1164 .cpu_features = CPU_FTRS_E300,
1165 .cpu_user_features = COMMON_USER,
Kumar Gala2319f122009-03-19 03:55:41 +00001166 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1167 MMU_FTR_NEED_DTLB_SW_LRU,
Li Yanga58d5242007-10-19 19:38:42 +08001168 .icache_bsize = 32,
1169 .dcache_bsize = 32,
1170 .cpu_setup = __setup_cpu_603,
Christophe Leroy0deae392018-12-10 11:41:29 +00001171 .machine_check = machine_check_83xx,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001172 .num_pmcs = 4,
1173 .oprofile_cpu_type = "ppc/e300",
Li Yanga58d5242007-10-19 19:38:42 +08001174 .platform = "ppc603",
1175 },
Christophe Leroy0deae392018-12-10 11:41:29 +00001176#endif
Christophe Leroy44e97542020-10-22 06:29:44 +00001177#endif /* CONFIG_PPC_BOOK3S_603 */
1178#ifdef CONFIG_PPC_BOOK3S_604
Linus Torvalds1da177e2005-04-16 15:20:36 -07001179 { /* default match, we assume split I/D cache & TB (non-601)... */
1180 .pvr_mask = 0x00000000,
1181 .pvr_value = 0x00000000,
1182 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -05001183 .cpu_features = CPU_FTRS_CLASSIC32,
Stephen Rothwell49209602005-10-12 15:55:09 +10001184 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001185 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001186 .icache_bsize = 32,
1187 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001188 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001189 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001190 },
Christophe Leroy44e97542020-10-22 06:29:44 +00001191#endif /* CONFIG_PPC_BOOK3S_604 */
Christophe Leroya6a50d82020-10-22 06:29:42 +00001192#endif /* CONFIG_PPC_BOOK3S_32 */
Christophe Leroy968159c2017-08-08 13:58:54 +02001193#ifdef CONFIG_PPC_8xx
Linus Torvalds1da177e2005-04-16 15:20:36 -07001194 { /* 8xx */
1195 .pvr_mask = 0xffff0000,
Christophe Leroy3ee87672017-08-08 13:58:58 +02001196 .pvr_value = PVR_8xx,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001197 .cpu_name = "8xx",
1198 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1199 * if the 8xx code is there.... */
Kumar Gala10b35d92005-09-23 14:08:58 -05001200 .cpu_features = CPU_FTRS_8XX,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001201 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001202 .mmu_features = MMU_FTR_TYPE_8xx,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001203 .icache_bsize = 16,
1204 .dcache_bsize = 16,
Christophe Leroye627f8d2016-09-16 10:23:11 +02001205 .machine_check = machine_check_8xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001206 .platform = "ppc823",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001207 },
Christophe Leroy968159c2017-08-08 13:58:54 +02001208#endif /* CONFIG_PPC_8xx */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001209#ifdef CONFIG_40x
Linus Torvalds1da177e2005-04-16 15:20:36 -07001210 { /* STB 04xxx */
1211 .pvr_mask = 0xffff0000,
1212 .pvr_value = 0x41810000,
1213 .cpu_name = "STB04xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001214 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001215 .cpu_user_features = PPC_FEATURE_32 |
1216 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001217 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001218 .icache_bsize = 32,
1219 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001220 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001221 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001222 },
1223 { /* NP405L */
1224 .pvr_mask = 0xffff0000,
1225 .pvr_value = 0x41610000,
1226 .cpu_name = "NP405L",
Kumar Gala10b35d92005-09-23 14:08:58 -05001227 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001228 .cpu_user_features = PPC_FEATURE_32 |
1229 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001230 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001231 .icache_bsize = 32,
1232 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001233 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001234 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001235 },
1236 { /* NP4GS3 */
1237 .pvr_mask = 0xffff0000,
1238 .pvr_value = 0x40B10000,
1239 .cpu_name = "NP4GS3",
Kumar Gala10b35d92005-09-23 14:08:58 -05001240 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001241 .cpu_user_features = PPC_FEATURE_32 |
1242 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001243 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001244 .icache_bsize = 32,
1245 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001246 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001247 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001248 },
1249 { /* NP405H */
1250 .pvr_mask = 0xffff0000,
1251 .pvr_value = 0x41410000,
1252 .cpu_name = "NP405H",
Kumar Gala10b35d92005-09-23 14:08:58 -05001253 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001254 .cpu_user_features = PPC_FEATURE_32 |
1255 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001256 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001257 .icache_bsize = 32,
1258 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001259 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001260 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001261 },
1262 { /* 405GPr */
1263 .pvr_mask = 0xffff0000,
1264 .pvr_value = 0x50910000,
1265 .cpu_name = "405GPr",
Kumar Gala10b35d92005-09-23 14:08:58 -05001266 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001267 .cpu_user_features = PPC_FEATURE_32 |
1268 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001269 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001270 .icache_bsize = 32,
1271 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001272 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001273 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001274 },
1275 { /* STBx25xx */
1276 .pvr_mask = 0xffff0000,
1277 .pvr_value = 0x51510000,
1278 .cpu_name = "STBx25xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001279 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001280 .cpu_user_features = PPC_FEATURE_32 |
1281 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001282 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001283 .icache_bsize = 32,
1284 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001285 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001286 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001287 },
1288 { /* 405LP */
1289 .pvr_mask = 0xffff0000,
1290 .pvr_value = 0x41F10000,
1291 .cpu_name = "405LP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001292 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001293 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001294 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001295 .icache_bsize = 32,
1296 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001297 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001298 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001299 },
Eugene Suroveginad95d602005-06-07 13:22:09 -07001300 { /* 405EP */
1301 .pvr_mask = 0xffff0000,
1302 .pvr_value = 0x51210000,
1303 .cpu_name = "405EP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001304 .cpu_features = CPU_FTRS_40X,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001305 .cpu_user_features = PPC_FEATURE_32 |
1306 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001307 .mmu_features = MMU_FTR_TYPE_40x,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001308 .icache_bsize = 32,
1309 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001310 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001311 .platform = "ppc405",
Eugene Suroveginad95d602005-06-07 13:22:09 -07001312 },
Lee Nipperff349102010-07-09 01:17:16 +00001313 { /* 405EX Rev. A/B with Security */
1314 .pvr_mask = 0xffff000f,
1315 .pvr_value = 0x12910007,
1316 .cpu_name = "405EX Rev. A/B",
Stefan Roese5d8476c2007-10-11 22:08:14 +10001317 .cpu_features = CPU_FTRS_40X,
1318 .cpu_user_features = PPC_FEATURE_32 |
1319 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001320 .mmu_features = MMU_FTR_TYPE_40x,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001321 .icache_bsize = 32,
1322 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001323 .machine_check = machine_check_4xx,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001324 .platform = "ppc405",
1325 },
Lee Nipperff349102010-07-09 01:17:16 +00001326 { /* 405EX Rev. C without Security */
1327 .pvr_mask = 0xffff000f,
1328 .pvr_value = 0x1291000d,
1329 .cpu_name = "405EX Rev. C",
1330 .cpu_features = CPU_FTRS_40X,
1331 .cpu_user_features = PPC_FEATURE_32 |
1332 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1333 .mmu_features = MMU_FTR_TYPE_40x,
1334 .icache_bsize = 32,
1335 .dcache_bsize = 32,
1336 .machine_check = machine_check_4xx,
1337 .platform = "ppc405",
1338 },
1339 { /* 405EX Rev. C with Security */
1340 .pvr_mask = 0xffff000f,
1341 .pvr_value = 0x1291000f,
1342 .cpu_name = "405EX Rev. C",
1343 .cpu_features = CPU_FTRS_40X,
1344 .cpu_user_features = PPC_FEATURE_32 |
1345 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1346 .mmu_features = MMU_FTR_TYPE_40x,
1347 .icache_bsize = 32,
1348 .dcache_bsize = 32,
1349 .machine_check = machine_check_4xx,
1350 .platform = "ppc405",
1351 },
1352 { /* 405EX Rev. D without Security */
1353 .pvr_mask = 0xffff000f,
1354 .pvr_value = 0x12910003,
1355 .cpu_name = "405EX Rev. D",
1356 .cpu_features = CPU_FTRS_40X,
1357 .cpu_user_features = PPC_FEATURE_32 |
1358 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1359 .mmu_features = MMU_FTR_TYPE_40x,
1360 .icache_bsize = 32,
1361 .dcache_bsize = 32,
1362 .machine_check = machine_check_4xx,
1363 .platform = "ppc405",
1364 },
1365 { /* 405EX Rev. D with Security */
1366 .pvr_mask = 0xffff000f,
1367 .pvr_value = 0x12910005,
1368 .cpu_name = "405EX Rev. D",
1369 .cpu_features = CPU_FTRS_40X,
1370 .cpu_user_features = PPC_FEATURE_32 |
1371 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1372 .mmu_features = MMU_FTR_TYPE_40x,
1373 .icache_bsize = 32,
1374 .dcache_bsize = 32,
1375 .machine_check = machine_check_4xx,
1376 .platform = "ppc405",
1377 },
1378 { /* 405EXr Rev. A/B without Security */
1379 .pvr_mask = 0xffff000f,
1380 .pvr_value = 0x12910001,
1381 .cpu_name = "405EXr Rev. A/B",
1382 .cpu_features = CPU_FTRS_40X,
1383 .cpu_user_features = PPC_FEATURE_32 |
1384 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1385 .mmu_features = MMU_FTR_TYPE_40x,
1386 .icache_bsize = 32,
1387 .dcache_bsize = 32,
1388 .machine_check = machine_check_4xx,
1389 .platform = "ppc405",
1390 },
1391 { /* 405EXr Rev. C without Security */
1392 .pvr_mask = 0xffff000f,
1393 .pvr_value = 0x12910009,
1394 .cpu_name = "405EXr Rev. C",
1395 .cpu_features = CPU_FTRS_40X,
1396 .cpu_user_features = PPC_FEATURE_32 |
1397 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1398 .mmu_features = MMU_FTR_TYPE_40x,
1399 .icache_bsize = 32,
1400 .dcache_bsize = 32,
1401 .machine_check = machine_check_4xx,
1402 .platform = "ppc405",
1403 },
1404 { /* 405EXr Rev. C with Security */
1405 .pvr_mask = 0xffff000f,
1406 .pvr_value = 0x1291000b,
1407 .cpu_name = "405EXr Rev. C",
1408 .cpu_features = CPU_FTRS_40X,
1409 .cpu_user_features = PPC_FEATURE_32 |
1410 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1411 .mmu_features = MMU_FTR_TYPE_40x,
1412 .icache_bsize = 32,
1413 .dcache_bsize = 32,
1414 .machine_check = machine_check_4xx,
1415 .platform = "ppc405",
1416 },
1417 { /* 405EXr Rev. D without Security */
1418 .pvr_mask = 0xffff000f,
Stefan Roeseb676d842008-01-15 18:09:15 +11001419 .pvr_value = 0x12910000,
Lee Nipperff349102010-07-09 01:17:16 +00001420 .cpu_name = "405EXr Rev. D",
1421 .cpu_features = CPU_FTRS_40X,
1422 .cpu_user_features = PPC_FEATURE_32 |
1423 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1424 .mmu_features = MMU_FTR_TYPE_40x,
1425 .icache_bsize = 32,
1426 .dcache_bsize = 32,
1427 .machine_check = machine_check_4xx,
1428 .platform = "ppc405",
1429 },
1430 { /* 405EXr Rev. D with Security */
1431 .pvr_mask = 0xffff000f,
1432 .pvr_value = 0x12910002,
1433 .cpu_name = "405EXr Rev. D",
Stefan Roeseb676d842008-01-15 18:09:15 +11001434 .cpu_features = CPU_FTRS_40X,
1435 .cpu_user_features = PPC_FEATURE_32 |
1436 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001437 .mmu_features = MMU_FTR_TYPE_40x,
Stefan Roeseb676d842008-01-15 18:09:15 +11001438 .icache_bsize = 32,
1439 .dcache_bsize = 32,
1440 .machine_check = machine_check_4xx,
1441 .platform = "ppc405",
1442 },
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001443 {
1444 /* 405EZ */
1445 .pvr_mask = 0xffff0000,
1446 .pvr_value = 0x41510000,
1447 .cpu_name = "405EZ",
1448 .cpu_features = CPU_FTRS_40X,
1449 .cpu_user_features = PPC_FEATURE_32 |
1450 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001451 .mmu_features = MMU_FTR_TYPE_40x,
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001452 .icache_bsize = 32,
1453 .dcache_bsize = 32,
1454 .machine_check = machine_check_4xx,
1455 .platform = "ppc405",
1456 },
Tanmay Inamdard5b9ee72011-11-28 21:01:41 +00001457 { /* APM8018X */
1458 .pvr_mask = 0xffff0000,
1459 .pvr_value = 0x7ff11432,
1460 .cpu_name = "APM8018X",
1461 .cpu_features = CPU_FTRS_40X,
1462 .cpu_user_features = PPC_FEATURE_32 |
1463 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1464 .mmu_features = MMU_FTR_TYPE_40x,
1465 .icache_bsize = 32,
1466 .dcache_bsize = 32,
1467 .machine_check = machine_check_4xx,
1468 .platform = "ppc405",
1469 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001470 { /* default match */
1471 .pvr_mask = 0x00000000,
1472 .pvr_value = 0x00000000,
1473 .cpu_name = "(generic 40x PPC)",
1474 .cpu_features = CPU_FTRS_40X,
1475 .cpu_user_features = PPC_FEATURE_32 |
1476 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001477 .mmu_features = MMU_FTR_TYPE_40x,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001478 .icache_bsize = 32,
1479 .dcache_bsize = 32,
1480 .machine_check = machine_check_4xx,
1481 .platform = "ppc405",
1482 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001483
1484#endif /* CONFIG_40x */
1485#ifdef CONFIG_44x
Christophe Leroy8b8319b2020-10-18 17:25:17 +00001486#ifndef CONFIG_PPC_47x
Matt Porterc9cf73a2005-07-31 22:34:52 -07001487 {
1488 .pvr_mask = 0xf0000fff,
1489 .pvr_value = 0x40000850,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001490 .cpu_name = "440GR Rev. A",
1491 .cpu_features = CPU_FTRS_44X,
1492 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001493 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001494 .icache_bsize = 32,
1495 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001496 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001497 .platform = "ppc440",
1498 },
1499 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1500 .pvr_mask = 0xf0000fff,
1501 .pvr_value = 0x40000858,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001502 .cpu_name = "440EP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001503 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001504 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001505 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001506 .icache_bsize = 32,
1507 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001508 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001509 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001510 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001511 },
1512 {
1513 .pvr_mask = 0xf0000fff,
1514 .pvr_value = 0x400008d3,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001515 .cpu_name = "440GR Rev. B",
1516 .cpu_features = CPU_FTRS_44X,
1517 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001518 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001519 .icache_bsize = 32,
1520 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001521 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001522 .platform = "ppc440",
1523 },
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001524 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1525 .pvr_mask = 0xf0000ff7,
1526 .pvr_value = 0x400008d4,
1527 .cpu_name = "440EP Rev. C",
1528 .cpu_features = CPU_FTRS_44X,
1529 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001530 .mmu_features = MMU_FTR_TYPE_44x,
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001531 .icache_bsize = 32,
1532 .dcache_bsize = 32,
1533 .cpu_setup = __setup_cpu_440ep,
1534 .machine_check = machine_check_4xx,
1535 .platform = "ppc440",
1536 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001537 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1538 .pvr_mask = 0xf0000fff,
1539 .pvr_value = 0x400008db,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001540 .cpu_name = "440EP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001541 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001542 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001543 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001544 .icache_bsize = 32,
1545 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001546 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001547 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001548 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001549 },
Valentine Barshak15fc9932007-08-29 17:40:30 +04001550 { /* 440GRX */
1551 .pvr_mask = 0xf0000ffb,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001552 .pvr_value = 0x200008D0,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001553 .cpu_name = "440GRX",
1554 .cpu_features = CPU_FTRS_44X,
1555 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001556 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001557 .icache_bsize = 32,
1558 .dcache_bsize = 32,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001559 .cpu_setup = __setup_cpu_440grx,
Valentine Barshakb2be3b12007-12-22 03:22:23 +11001560 .machine_check = machine_check_440A,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001561 .platform = "ppc440",
Valentine Barshak15fc9932007-08-29 17:40:30 +04001562 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001563 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1564 .pvr_mask = 0xf0000ffb,
1565 .pvr_value = 0x200008D8,
1566 .cpu_name = "440EPX",
1567 .cpu_features = CPU_FTRS_44X,
1568 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001569 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001570 .icache_bsize = 32,
1571 .dcache_bsize = 32,
1572 .cpu_setup = __setup_cpu_440epx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001573 .machine_check = machine_check_440A,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001574 .platform = "ppc440",
1575 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001576 { /* 440GP Rev. B */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001577 .pvr_mask = 0xf0000fff,
1578 .pvr_value = 0x40000440,
1579 .cpu_name = "440GP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001580 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001581 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001582 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001583 .icache_bsize = 32,
1584 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001585 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001586 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001587 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001588 { /* 440GP Rev. C */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001589 .pvr_mask = 0xf0000fff,
1590 .pvr_value = 0x40000481,
1591 .cpu_name = "440GP Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001592 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001593 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001594 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001595 .icache_bsize = 32,
1596 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001597 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001598 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001599 },
1600 { /* 440GX Rev. A */
1601 .pvr_mask = 0xf0000fff,
1602 .pvr_value = 0x50000850,
1603 .cpu_name = "440GX Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001604 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001605 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001606 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001607 .icache_bsize = 32,
1608 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001609 .cpu_setup = __setup_cpu_440gx,
1610 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001611 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001612 },
1613 { /* 440GX Rev. B */
1614 .pvr_mask = 0xf0000fff,
1615 .pvr_value = 0x50000851,
1616 .cpu_name = "440GX Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001617 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001618 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001619 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001620 .icache_bsize = 32,
1621 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001622 .cpu_setup = __setup_cpu_440gx,
1623 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001624 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001625 },
1626 { /* 440GX Rev. C */
1627 .pvr_mask = 0xf0000fff,
1628 .pvr_value = 0x50000892,
1629 .cpu_name = "440GX Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001630 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001631 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001632 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001633 .icache_bsize = 32,
1634 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001635 .cpu_setup = __setup_cpu_440gx,
1636 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001637 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001638 },
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001639 { /* 440GX Rev. F */
1640 .pvr_mask = 0xf0000fff,
1641 .pvr_value = 0x50000894,
1642 .cpu_name = "440GX Rev. F",
Kumar Gala10b35d92005-09-23 14:08:58 -05001643 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001644 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001645 .mmu_features = MMU_FTR_TYPE_44x,
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001646 .icache_bsize = 32,
1647 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001648 .cpu_setup = __setup_cpu_440gx,
1649 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001650 .platform = "ppc440",
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001651 },
Matt Porter656de7e2005-09-03 15:55:42 -07001652 { /* 440SP Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001653 .pvr_mask = 0xfff00fff,
1654 .pvr_value = 0x53200891,
Matt Porter656de7e2005-09-03 15:55:42 -07001655 .cpu_name = "440SP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001656 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001657 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001658 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porter656de7e2005-09-03 15:55:42 -07001659 .icache_bsize = 32,
1660 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001661 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001662 .platform = "ppc440",
Matt Porter656de7e2005-09-03 15:55:42 -07001663 },
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001664 { /* 440SPe Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001665 .pvr_mask = 0xfff00fff,
1666 .pvr_value = 0x53400890,
1667 .cpu_name = "440SPe Rev. A",
1668 .cpu_features = CPU_FTRS_44X,
1669 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001670 .mmu_features = MMU_FTR_TYPE_44x,
Roland Dreier333e6152007-06-16 05:36:32 +10001671 .icache_bsize = 32,
1672 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001673 .cpu_setup = __setup_cpu_440spe,
1674 .machine_check = machine_check_440A,
Roland Dreier333e6152007-06-16 05:36:32 +10001675 .platform = "ppc440",
1676 },
1677 { /* 440SPe Rev. B */
1678 .pvr_mask = 0xfff00fff,
1679 .pvr_value = 0x53400891,
1680 .cpu_name = "440SPe Rev. B",
Kumar Galaa147c582006-12-08 02:34:38 -06001681 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001682 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001683 .mmu_features = MMU_FTR_TYPE_44x,
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001684 .icache_bsize = 32,
1685 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001686 .cpu_setup = __setup_cpu_440spe,
1687 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001688 .platform = "ppc440",
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001689 },
Stefan Roese464076a2008-02-24 08:07:41 +11001690 { /* 460EX */
Stefan Roese20d70342009-07-29 07:04:46 +00001691 .pvr_mask = 0xffff0006,
Stefan Roese464076a2008-02-24 08:07:41 +11001692 .pvr_value = 0x13020002,
1693 .cpu_name = "460EX",
Benjamin Herrenschmidt6d2170b2008-12-18 19:13:22 +00001694 .cpu_features = CPU_FTRS_440x6,
Stefan Roese464076a2008-02-24 08:07:41 +11001695 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001696 .mmu_features = MMU_FTR_TYPE_44x,
Stefan Roese464076a2008-02-24 08:07:41 +11001697 .icache_bsize = 32,
1698 .dcache_bsize = 32,
1699 .cpu_setup = __setup_cpu_460ex,
1700 .machine_check = machine_check_440A,
1701 .platform = "ppc440",
1702 },
Stefan Roese20d70342009-07-29 07:04:46 +00001703 { /* 460EX Rev B */
1704 .pvr_mask = 0xffff0007,
1705 .pvr_value = 0x13020004,
1706 .cpu_name = "460EX Rev. B",
1707 .cpu_features = CPU_FTRS_440x6,
1708 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1709 .mmu_features = MMU_FTR_TYPE_44x,
1710 .icache_bsize = 32,
1711 .dcache_bsize = 32,
1712 .cpu_setup = __setup_cpu_460ex,
1713 .machine_check = machine_check_440A,
1714 .platform = "ppc440",
1715 },
Stefan Roese464076a2008-02-24 08:07:41 +11001716 { /* 460GT */
Stefan Roese20d70342009-07-29 07:04:46 +00001717 .pvr_mask = 0xffff0006,
Stefan Roese464076a2008-02-24 08:07:41 +11001718 .pvr_value = 0x13020000,
1719 .cpu_name = "460GT",
Benjamin Herrenschmidt6d2170b2008-12-18 19:13:22 +00001720 .cpu_features = CPU_FTRS_440x6,
Josh Boyer939e6222008-06-11 07:52:40 -04001721 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001722 .mmu_features = MMU_FTR_TYPE_44x,
Stefan Roese464076a2008-02-24 08:07:41 +11001723 .icache_bsize = 32,
1724 .dcache_bsize = 32,
Josh Boyer939e6222008-06-11 07:52:40 -04001725 .cpu_setup = __setup_cpu_460gt,
Stefan Roese464076a2008-02-24 08:07:41 +11001726 .machine_check = machine_check_440A,
1727 .platform = "ppc440",
1728 },
Stefan Roese20d70342009-07-29 07:04:46 +00001729 { /* 460GT Rev B */
1730 .pvr_mask = 0xffff0007,
1731 .pvr_value = 0x13020005,
1732 .cpu_name = "460GT Rev. B",
1733 .cpu_features = CPU_FTRS_440x6,
1734 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1735 .mmu_features = MMU_FTR_TYPE_44x,
1736 .icache_bsize = 32,
1737 .dcache_bsize = 32,
1738 .cpu_setup = __setup_cpu_460gt,
1739 .machine_check = machine_check_440A,
1740 .platform = "ppc440",
1741 },
Madhulika Madishetty6c712092009-02-05 13:31:36 +00001742 { /* 460SX */
1743 .pvr_mask = 0xffffff00,
1744 .pvr_value = 0x13541800,
1745 .cpu_name = "460SX",
1746 .cpu_features = CPU_FTRS_44X,
1747 .cpu_user_features = COMMON_USER_BOOKE,
1748 .mmu_features = MMU_FTR_TYPE_44x,
1749 .icache_bsize = 32,
1750 .dcache_bsize = 32,
1751 .cpu_setup = __setup_cpu_460sx,
1752 .machine_check = machine_check_440A,
1753 .platform = "ppc440",
1754 },
Tirumala Marri6edc3232010-09-13 13:26:11 +00001755 { /* 464 in APM821xx */
Vinh Nguyen Huu Tuong7c801162011-12-20 02:43:34 +00001756 .pvr_mask = 0xfffffff0,
Tirumala Marri6edc3232010-09-13 13:26:11 +00001757 .pvr_value = 0x12C41C80,
1758 .cpu_name = "APM821XX",
1759 .cpu_features = CPU_FTRS_44X,
1760 .cpu_user_features = COMMON_USER_BOOKE |
1761 PPC_FEATURE_HAS_FPU,
1762 .mmu_features = MMU_FTR_TYPE_44x,
1763 .icache_bsize = 32,
1764 .dcache_bsize = 32,
1765 .cpu_setup = __setup_cpu_apm821xx,
1766 .machine_check = machine_check_440A,
1767 .platform = "ppc440",
1768 },
Christophe Leroy8b8319b2020-10-18 17:25:17 +00001769 { /* default match */
1770 .pvr_mask = 0x00000000,
1771 .pvr_value = 0x00000000,
1772 .cpu_name = "(generic 44x PPC)",
1773 .cpu_features = CPU_FTRS_44X,
1774 .cpu_user_features = COMMON_USER_BOOKE,
1775 .mmu_features = MMU_FTR_TYPE_44x,
1776 .icache_bsize = 32,
1777 .dcache_bsize = 32,
1778 .machine_check = machine_check_4xx,
1779 .platform = "ppc440",
1780 }
1781#else /* CONFIG_PPC_47x */
Dave Kleikampc48d0db2011-01-26 06:17:58 +00001782 { /* 476 DD2 core */
1783 .pvr_mask = 0xffffffff,
1784 .pvr_value = 0x11a52080,
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001785 .cpu_name = "476",
Dave Kleikampc48d0db2011-01-26 06:17:58 +00001786 .cpu_features = CPU_FTRS_47X | CPU_FTR_476_DD2,
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001787 .cpu_user_features = COMMON_USER_BOOKE |
1788 PPC_FEATURE_HAS_FPU,
1789 .mmu_features = MMU_FTR_TYPE_47x |
1790 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1791 .icache_bsize = 32,
1792 .dcache_bsize = 128,
Dave Kleikampfc5e7092010-03-05 03:43:18 +00001793 .machine_check = machine_check_47x,
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001794 .platform = "ppc470",
1795 },
Tony Breedsdf777bd2011-11-30 21:39:23 +00001796 { /* 476fpe */
1797 .pvr_mask = 0xffff0000,
1798 .pvr_value = 0x7ff50000,
1799 .cpu_name = "476fpe",
1800 .cpu_features = CPU_FTRS_47X | CPU_FTR_476_DD2,
1801 .cpu_user_features = COMMON_USER_BOOKE |
1802 PPC_FEATURE_HAS_FPU,
1803 .mmu_features = MMU_FTR_TYPE_47x |
1804 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1805 .icache_bsize = 32,
1806 .dcache_bsize = 128,
1807 .machine_check = machine_check_47x,
1808 .platform = "ppc470",
1809 },
Torez Smithb4e8c8d2010-03-05 10:45:54 +00001810 { /* 476 iss */
1811 .pvr_mask = 0xffff0000,
1812 .pvr_value = 0x00050000,
1813 .cpu_name = "476",
1814 .cpu_features = CPU_FTRS_47X,
1815 .cpu_user_features = COMMON_USER_BOOKE |
1816 PPC_FEATURE_HAS_FPU,
Torez Smithb4e8c8d2010-03-05 10:45:54 +00001817 .mmu_features = MMU_FTR_TYPE_47x |
1818 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1819 .icache_bsize = 32,
1820 .dcache_bsize = 128,
1821 .machine_check = machine_check_47x,
1822 .platform = "ppc470",
1823 },
Dave Kleikampc48d0db2011-01-26 06:17:58 +00001824 { /* 476 others */
1825 .pvr_mask = 0xffff0000,
1826 .pvr_value = 0x11a50000,
1827 .cpu_name = "476",
1828 .cpu_features = CPU_FTRS_47X,
1829 .cpu_user_features = COMMON_USER_BOOKE |
1830 PPC_FEATURE_HAS_FPU,
1831 .mmu_features = MMU_FTR_TYPE_47x |
1832 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1833 .icache_bsize = 32,
1834 .dcache_bsize = 128,
1835 .machine_check = machine_check_47x,
1836 .platform = "ppc470",
1837 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001838 { /* default match */
1839 .pvr_mask = 0x00000000,
1840 .pvr_value = 0x00000000,
Christophe Leroy8b8319b2020-10-18 17:25:17 +00001841 .cpu_name = "(generic 47x PPC)",
1842 .cpu_features = CPU_FTRS_47X,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001843 .cpu_user_features = COMMON_USER_BOOKE,
Christophe Leroy8b8319b2020-10-18 17:25:17 +00001844 .mmu_features = MMU_FTR_TYPE_47x,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001845 .icache_bsize = 32,
Christophe Leroy8b8319b2020-10-18 17:25:17 +00001846 .dcache_bsize = 128,
1847 .machine_check = machine_check_47x,
1848 .platform = "ppc470",
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001849 }
Christophe Leroy8b8319b2020-10-18 17:25:17 +00001850#endif /* CONFIG_PPC_47x */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001851#endif /* CONFIG_44x */
Kumar Gala4490c062010-10-08 08:32:11 -05001852#endif /* CONFIG_PPC32 */
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001853#ifdef CONFIG_E500
Kumar Gala4490c062010-10-08 08:32:11 -05001854#ifdef CONFIG_PPC32
Mihai Caraman3477e712014-08-20 16:09:03 +03001855#ifndef CONFIG_PPC_E500MC
Stephen Rothwell49209602005-10-12 15:55:09 +10001856 { /* e500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001857 .pvr_mask = 0xffff0000,
1858 .pvr_value = 0x80200000,
1859 .cpu_name = "e500",
Kumar Gala10b35d92005-09-23 14:08:58 -05001860 .cpu_features = CPU_FTRS_E500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001861 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001862 PPC_FEATURE_HAS_SPE_COMP |
1863 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Nishanth Aravamudan6c1bf482013-05-04 16:01:17 +00001864 .cpu_user_features2 = PPC_FEATURE2_ISEL,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001865 .mmu_features = MMU_FTR_TYPE_FSL_E,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001866 .icache_bsize = 32,
1867 .dcache_bsize = 32,
1868 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001869 .oprofile_cpu_type = "ppc/e500",
Kumar Gala105c31d2009-01-08 08:31:20 -06001870 .cpu_setup = __setup_cpu_e500v1,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001871 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001872 .platform = "ppc8540",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001873 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001874 { /* e500v2 */
Kumar Gala5b37b702005-06-21 17:15:18 -07001875 .pvr_mask = 0xffff0000,
1876 .pvr_value = 0x80210000,
1877 .cpu_name = "e500v2",
Kumar Gala10b35d92005-09-23 14:08:58 -05001878 .cpu_features = CPU_FTRS_E500_2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001879 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001880 PPC_FEATURE_HAS_SPE_COMP |
1881 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1882 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
Nishanth Aravamudan6c1bf482013-05-04 16:01:17 +00001883 .cpu_user_features2 = PPC_FEATURE2_ISEL,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001884 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS,
Kumar Gala5b37b702005-06-21 17:15:18 -07001885 .icache_bsize = 32,
1886 .dcache_bsize = 32,
1887 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001888 .oprofile_cpu_type = "ppc/e500",
Kumar Gala105c31d2009-01-08 08:31:20 -06001889 .cpu_setup = __setup_cpu_e500v2,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001890 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001891 .platform = "ppc8548",
chenhui zhaoe7affb12015-11-20 17:13:58 +08001892 .cpu_down_flush = cpu_down_flush_e500v2,
Kumar Gala5b37b702005-06-21 17:15:18 -07001893 },
Mihai Caraman3477e712014-08-20 16:09:03 +03001894#else
Kumar Gala3dfa8772008-06-16 09:41:32 -05001895 { /* e500mc */
1896 .pvr_mask = 0xffff0000,
1897 .pvr_value = 0x80230000,
1898 .cpu_name = "e500mc",
Kumar Gala3dfa8772008-06-16 09:41:32 -05001899 .cpu_features = CPU_FTRS_E500MC,
1900 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Nishanth Aravamudan6c1bf482013-05-04 16:01:17 +00001901 .cpu_user_features2 = PPC_FEATURE2_ISEL,
Kumar Galac3071952009-02-10 22:26:06 -06001902 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
Kumar Gala323d23a2009-04-23 08:51:22 -05001903 MMU_FTR_USE_TLBILX,
Kumar Gala3dfa8772008-06-16 09:41:32 -05001904 .icache_bsize = 64,
1905 .dcache_bsize = 64,
1906 .num_pmcs = 4,
Scott Wooda11106542010-02-25 18:09:45 -06001907 .oprofile_cpu_type = "ppc/e500mc",
Kumar Gala105c31d2009-01-08 08:31:20 -06001908 .cpu_setup = __setup_cpu_e500mc,
Scott Woodfe04b112010-04-08 00:38:22 -05001909 .machine_check = machine_check_e500mc,
Kumar Gala3dfa8772008-06-16 09:41:32 -05001910 .platform = "ppce500mc",
chenhui zhaoe7affb12015-11-20 17:13:58 +08001911 .cpu_down_flush = cpu_down_flush_e500mc,
Kumar Gala3dfa8772008-06-16 09:41:32 -05001912 },
Mihai Caraman3477e712014-08-20 16:09:03 +03001913#endif /* CONFIG_PPC_E500MC */
Kumar Gala4490c062010-10-08 08:32:11 -05001914#endif /* CONFIG_PPC32 */
Mihai Caraman3477e712014-08-20 16:09:03 +03001915#ifdef CONFIG_PPC_E500MC
Kumar Gala4490c062010-10-08 08:32:11 -05001916 { /* e5500 */
1917 .pvr_mask = 0xffff0000,
1918 .pvr_value = 0x80240000,
1919 .cpu_name = "e5500",
Kumar Gala11ed0db2011-04-06 00:11:06 -05001920 .cpu_features = CPU_FTRS_E5500,
Kumar Galafb9be232011-06-02 11:26:13 -05001921 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Nishanth Aravamudan6c1bf482013-05-04 16:01:17 +00001922 .cpu_user_features2 = PPC_FEATURE2_ISEL,
Kumar Gala4490c062010-10-08 08:32:11 -05001923 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
1924 MMU_FTR_USE_TLBILX,
1925 .icache_bsize = 64,
1926 .dcache_bsize = 64,
1927 .num_pmcs = 4,
1928 .oprofile_cpu_type = "ppc/e500mc",
Kumar Gala4490c062010-10-08 08:32:11 -05001929 .cpu_setup = __setup_cpu_e5500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05301930#ifndef CONFIG_PPC32
Kumar Gala4490c062010-10-08 08:32:11 -05001931 .cpu_restore = __restore_cpu_e5500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05301932#endif
Kumar Gala4490c062010-10-08 08:32:11 -05001933 .machine_check = machine_check_e500mc,
1934 .platform = "ppce5500",
chenhui zhaoe7affb12015-11-20 17:13:58 +08001935 .cpu_down_flush = cpu_down_flush_e5500,
Kumar Gala4490c062010-10-08 08:32:11 -05001936 },
Kumar Gala10241842011-11-06 11:51:07 -06001937 { /* e6500 */
1938 .pvr_mask = 0xffff0000,
1939 .pvr_value = 0x80400000,
1940 .cpu_name = "e6500",
1941 .cpu_features = CPU_FTRS_E6500,
Kumar Galacd66cc22012-09-07 15:57:17 -05001942 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU |
1943 PPC_FEATURE_HAS_ALTIVEC_COMP,
Nishanth Aravamudan6c1bf482013-05-04 16:01:17 +00001944 .cpu_user_features2 = PPC_FEATURE2_ISEL,
Kumar Gala10241842011-11-06 11:51:07 -06001945 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
1946 MMU_FTR_USE_TLBILX,
1947 .icache_bsize = 64,
1948 .dcache_bsize = 64,
Lijun Pan5815c432013-06-05 15:22:09 -05001949 .num_pmcs = 6,
Kumar Gala10241842011-11-06 11:51:07 -06001950 .oprofile_cpu_type = "ppc/e6500",
Kumar Galacd66cc22012-09-07 15:57:17 -05001951 .cpu_setup = __setup_cpu_e6500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05301952#ifndef CONFIG_PPC32
Kumar Galacd66cc22012-09-07 15:57:17 -05001953 .cpu_restore = __restore_cpu_e6500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05301954#endif
Kumar Gala10241842011-11-06 11:51:07 -06001955 .machine_check = machine_check_e500mc,
1956 .platform = "ppce6500",
chenhui zhaoe7affb12015-11-20 17:13:58 +08001957 .cpu_down_flush = cpu_down_flush_e6500,
Kumar Gala10241842011-11-06 11:51:07 -06001958 },
Mihai Caraman3477e712014-08-20 16:09:03 +03001959#endif /* CONFIG_PPC_E500MC */
Kumar Gala4490c062010-10-08 08:32:11 -05001960#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -07001961 { /* default match */
1962 .pvr_mask = 0x00000000,
1963 .pvr_value = 0x00000000,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001964 .cpu_name = "(generic E500 PPC)",
1965 .cpu_features = CPU_FTRS_E500,
1966 .cpu_user_features = COMMON_USER_BOOKE |
1967 PPC_FEATURE_HAS_SPE_COMP |
1968 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001969 .mmu_features = MMU_FTR_TYPE_FSL_E,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001970 .icache_bsize = 32,
1971 .dcache_bsize = 32,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001972 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001973 .platform = "powerpc",
Paul Mackerras516c8be2008-05-12 14:20:35 +10001974 }
Stephen Rothwell49209602005-10-12 15:55:09 +10001975#endif /* CONFIG_PPC32 */
Kumar Gala4490c062010-10-08 08:32:11 -05001976#endif /* CONFIG_E500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001977};
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001978
Nicholas Piggin5a61ef72017-05-09 13:16:52 +10001979void __init set_cur_cpu_spec(struct cpu_spec *s)
1980{
1981 struct cpu_spec *t = &the_cpu_spec;
1982
1983 t = PTRRELOC(t);
Christophe Leroyadcf5912019-04-26 16:23:29 +00001984 /*
1985 * use memcpy() instead of *t = *s so that GCC replaces it
1986 * by __memcpy() when KASAN is active
1987 */
1988 memcpy(t, s, sizeof(*t));
Nicholas Piggin5a61ef72017-05-09 13:16:52 +10001989
1990 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
1991}
Paul Mackerras87a72f92007-10-04 14:18:01 +10001992
Scott Wood26ee9762011-07-25 11:04:36 +00001993static struct cpu_spec * __init setup_cpu_spec(unsigned long offset,
1994 struct cpu_spec *s)
Michael Ellerman666435b2009-02-22 16:25:43 +00001995{
1996 struct cpu_spec *t = &the_cpu_spec;
Michael Ellerman2657dd42009-02-22 16:25:45 +00001997 struct cpu_spec old;
1998
Michael Ellerman666435b2009-02-22 16:25:43 +00001999 t = PTRRELOC(t);
Michael Ellerman2657dd42009-02-22 16:25:45 +00002000 old = *t;
2001
Christophe Leroyadcf5912019-04-26 16:23:29 +00002002 /*
2003 * Copy everything, then do fixups. Use memcpy() instead of *t = *s
2004 * so that GCC replaces it by __memcpy() when KASAN is active
2005 */
2006 memcpy(t, s, sizeof(*t));
Michael Ellerman666435b2009-02-22 16:25:43 +00002007
2008 /*
2009 * If we are overriding a previous value derived from the real
2010 * PVR with a new value obtained using a logical PVR value,
2011 * don't modify the performance monitor fields.
2012 */
Michael Ellerman2657dd42009-02-22 16:25:45 +00002013 if (old.num_pmcs && !s->num_pmcs) {
2014 t->num_pmcs = old.num_pmcs;
2015 t->pmc_type = old.pmc_type;
Michael Ellerman2657dd42009-02-22 16:25:45 +00002016
Michael Ellerman666435b2009-02-22 16:25:43 +00002017 /*
2018 * If we have passed through this logic once before and
2019 * have pulled the default case because the real PVR was
2020 * not found inside cpu_specs[], then we are possibly
2021 * running in compatibility mode. In that case, let the
2022 * oprofiler know which set of compatibility counters to
2023 * pull from by making sure the oprofile_cpu_type string
2024 * is set to that of compatibility mode. If the
2025 * oprofile_cpu_type already has a value, then we are
2026 * possibly overriding a real PVR with a logical one,
2027 * and, in that case, keep the current value for
Desnes A. Nunes do Rosariofc37a162020-02-27 10:47:15 -03002028 * oprofile_cpu_type. Futhermore, let's ensure that the
2029 * fix for the PMAO bug is enabled on compatibility mode.
Michael Ellerman666435b2009-02-22 16:25:43 +00002030 */
Benjamin Herrenschmidtb173f032009-05-14 18:34:06 +00002031 if (old.oprofile_cpu_type != NULL) {
Benjamin Herrenschmidt0203d6e2009-04-29 19:39:38 +00002032 t->oprofile_cpu_type = old.oprofile_cpu_type;
Desnes A. Nunes do Rosariofc37a162020-02-27 10:47:15 -03002033 t->cpu_features |= old.cpu_features & CPU_FTR_PMAO_BUG;
Michael Wolf79af6c42009-04-27 06:17:54 +00002034 }
Michael Ellerman2657dd42009-02-22 16:25:45 +00002035 }
Michael Ellerman666435b2009-02-22 16:25:43 +00002036
2037 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
2038
2039 /*
2040 * Set the base platform string once; assumes
2041 * we're called with real pvr first.
2042 */
2043 if (*PTRRELOC(&powerpc_base_platform) == NULL)
2044 *PTRRELOC(&powerpc_base_platform) = t->platform;
2045
2046#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
2047 /* ppc64 and booke expect identify_cpu to also call setup_cpu for
2048 * that processor. I will consolidate that at a later time, for now,
2049 * just use #ifdef. We also don't need to PTRRELOC the function
2050 * pointer on ppc64 and booke as we are running at 0 in real mode
2051 * on ppc64 and reloc_offset is always 0 on booke.
2052 */
Benjamin Herrenschmidtaf9eef32011-01-20 20:36:03 +00002053 if (t->cpu_setup) {
2054 t->cpu_setup(offset, t);
Michael Ellerman666435b2009-02-22 16:25:43 +00002055 }
2056#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
Scott Wood26ee9762011-07-25 11:04:36 +00002057
2058 return t;
Michael Ellerman666435b2009-02-22 16:25:43 +00002059}
2060
Paul Mackerras87a72f92007-10-04 14:18:01 +10002061struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002062{
2063 struct cpu_spec *s = cpu_specs;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002064 int i;
2065
2066 s = PTRRELOC(s);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002067
Michael Ellerman666435b2009-02-22 16:25:43 +00002068 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) {
Scott Wood26ee9762011-07-25 11:04:36 +00002069 if ((pvr & s->pvr_mask) == s->pvr_value)
2070 return setup_cpu_spec(offset, s);
Michael Ellerman666435b2009-02-22 16:25:43 +00002071 }
2072
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002073 BUG();
Michael Ellerman666435b2009-02-22 16:25:43 +00002074
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002075 return NULL;
2076}
Kevin Hao4db73272016-07-23 14:42:41 +05302077
Nicholas Piggin5a61ef72017-05-09 13:16:52 +10002078/*
2079 * Used by cpufeatures to get the name for CPUs with a PVR table.
2080 * If they don't hae a PVR table, cpufeatures gets the name from
2081 * cpu device-tree node.
2082 */
2083void __init identify_cpu_name(unsigned int pvr)
2084{
2085 struct cpu_spec *s = cpu_specs;
2086 struct cpu_spec *t = &the_cpu_spec;
2087 int i;
2088
2089 s = PTRRELOC(s);
2090 t = PTRRELOC(t);
2091
2092 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) {
2093 if ((pvr & s->pvr_mask) == s->pvr_value) {
2094 t->cpu_name = s->cpu_name;
2095 return;
2096 }
2097 }
2098}
2099
2100
Kevin Hao4db73272016-07-23 14:42:41 +05302101#ifdef CONFIG_JUMP_LABEL_FEATURE_CHECKS
2102struct static_key_true cpu_feature_keys[NUM_CPU_FTR_KEYS] = {
2103 [0 ... NUM_CPU_FTR_KEYS - 1] = STATIC_KEY_TRUE_INIT
2104};
2105EXPORT_SYMBOL_GPL(cpu_feature_keys);
2106
2107void __init cpu_feature_keys_init(void)
2108{
2109 int i;
2110
2111 for (i = 0; i < NUM_CPU_FTR_KEYS; i++) {
2112 unsigned long f = 1ul << i;
2113
2114 if (!(cur_cpu_spec->cpu_features & f))
2115 static_branch_disable(&cpu_feature_keys[i]);
2116 }
2117}
Kevin Haoc12e6f22016-07-23 14:42:42 +05302118
2119struct static_key_true mmu_feature_keys[NUM_MMU_FTR_KEYS] = {
2120 [0 ... NUM_MMU_FTR_KEYS - 1] = STATIC_KEY_TRUE_INIT
2121};
2122EXPORT_SYMBOL_GPL(mmu_feature_keys);
2123
2124void __init mmu_feature_keys_init(void)
2125{
2126 int i;
2127
2128 for (i = 0; i < NUM_MMU_FTR_KEYS; i++) {
2129 unsigned long f = 1ul << i;
2130
2131 if (!(cur_cpu_spec->mmu_features & f))
2132 static_branch_disable(&mmu_feature_keys[i]);
2133 }
2134}
Kevin Hao4db73272016-07-23 14:42:41 +05302135#endif