blob: 7ed126bc9b183d2d1b6c15f6537c99dfd677ea9e [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Linus Torvalds1da177e2005-04-16 15:20:36 -07002 * Copyright (C) 2001 Ben. Herrenschmidt (benh@kernel.crashing.org)
3 *
Stephen Rothwell49209602005-10-12 15:55:09 +10004 * Modifications for ppc64:
5 * Copyright (C) 2003 Dave Engebretsen <engebret@us.ibm.com>
6 *
Linus Torvalds1da177e2005-04-16 15:20:36 -07007 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version
10 * 2 of the License, or (at your option) any later version.
11 */
12
Linus Torvalds1da177e2005-04-16 15:20:36 -070013#include <linux/string.h>
14#include <linux/sched.h>
15#include <linux/threads.h>
16#include <linux/init.h>
Paul Gortmaker4b16f8e2011-07-22 18:24:23 -040017#include <linux/export.h>
Kumar Gala400d2212005-09-27 15:13:12 -050018
19#include <asm/oprofile_impl.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070020#include <asm/cputable.h>
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +100021#include <asm/prom.h> /* for PTRRELOC on ARCH=ppc */
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +000022#include <asm/mmu.h>
David Howellsae3a1972012-03-28 18:30:02 +010023#include <asm/setup.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070024
Kumar Gala400d2212005-09-27 15:13:12 -050025struct cpu_spec* cur_cpu_spec = NULL;
Stephen Rothwell49209602005-10-12 15:55:09 +100026EXPORT_SYMBOL(cur_cpu_spec);
Linus Torvalds1da177e2005-04-16 15:20:36 -070027
Nathan Lynch9115d132008-07-16 09:58:51 +100028/* The platform string corresponding to the real PVR */
29const char *powerpc_base_platform;
30
Stephen Rothwell49209602005-10-12 15:55:09 +100031/* NOTE:
32 * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's
33 * the responsibility of the appropriate CPU save/restore functions to
34 * eventually copy these settings over. Those save/restore aren't yet
35 * part of the cputable though. That has to be fixed for both ppc32
36 * and ppc64
37 */
Geoff Levandb26f1002006-05-19 14:24:18 +100038#ifdef CONFIG_PPC32
Kumar Gala105c31d2009-01-08 08:31:20 -060039extern void __setup_cpu_e200(unsigned long offset, struct cpu_spec* spec);
40extern void __setup_cpu_e500v1(unsigned long offset, struct cpu_spec* spec);
41extern void __setup_cpu_e500v2(unsigned long offset, struct cpu_spec* spec);
42extern void __setup_cpu_e500mc(unsigned long offset, struct cpu_spec* spec);
Valentine Barshak81127532007-09-22 00:46:57 +100043extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
44extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110045extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
Valentine Barshak340ffd22007-09-22 00:50:09 +100046extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110047extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
Grant Likely640d17d2008-12-04 05:39:55 +000048extern void __setup_cpu_440x5(unsigned long offset, struct cpu_spec* spec);
Stefan Roese464076a2008-02-24 08:07:41 +110049extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec);
Josh Boyer939e6222008-06-11 07:52:40 -040050extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec);
Madhulika Madishetty6c712092009-02-05 13:31:36 +000051extern void __setup_cpu_460sx(unsigned long offset, struct cpu_spec *spec);
Tirumala Marri6edc3232010-09-13 13:26:11 +000052extern void __setup_cpu_apm821xx(unsigned long offset, struct cpu_spec *spec);
Kumar Gala400d2212005-09-27 15:13:12 -050053extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
54extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
55extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
56extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
57extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
58extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
59extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
60extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell49209602005-10-12 15:55:09 +100061#endif /* CONFIG_PPC32 */
Olof Johanssonf39b7a52006-08-11 00:07:08 -050062#ifdef CONFIG_PPC64
Kumar Gala400d2212005-09-27 15:13:12 -050063extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
Olof Johansson5b43d202006-10-04 23:41:41 -050064extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
Olof Johansson11999192007-02-04 16:36:51 -060065extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
Benjamin Herrenschmidt76b4eda2011-04-14 22:32:01 +000066extern void __setup_cpu_a2(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell40d244d2007-02-12 22:10:48 +110067extern void __restore_cpu_pa6t(void);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050068extern void __restore_cpu_ppc970(void);
Michael Neulinge952e6c2008-06-18 10:47:26 +100069extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec);
70extern void __restore_cpu_power7(void);
Michael Neulingaec937b2012-10-30 19:34:14 +000071extern void __setup_cpu_power8(unsigned long offset, struct cpu_spec* spec);
72extern void __restore_cpu_power8(void);
Benjamin Herrenschmidt76b4eda2011-04-14 22:32:01 +000073extern void __restore_cpu_a2(void);
Mahesh Salgaonkar45706bb2014-12-19 08:41:05 +053074extern void __flush_tlb_power7(unsigned int action);
75extern void __flush_tlb_power8(unsigned int action);
Mahesh Salgaonkare22a2272013-10-30 20:05:11 +053076extern long __machine_check_early_realmode_p7(struct pt_regs *regs);
Mahesh Salgaonkarae744f32013-10-30 20:05:26 +053077extern long __machine_check_early_realmode_p8(struct pt_regs *regs);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050078#endif /* CONFIG_PPC64 */
Kumar Gala4490c062010-10-08 08:32:11 -050079#if defined(CONFIG_E500)
80extern void __setup_cpu_e5500(unsigned long offset, struct cpu_spec* spec);
Kumar Galacd66cc22012-09-07 15:57:17 -050081extern void __setup_cpu_e6500(unsigned long offset, struct cpu_spec* spec);
Kumar Gala4490c062010-10-08 08:32:11 -050082extern void __restore_cpu_e5500(void);
Kumar Galacd66cc22012-09-07 15:57:17 -050083extern void __restore_cpu_e6500(void);
Kumar Gala4490c062010-10-08 08:32:11 -050084#endif /* CONFIG_E500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070085
Linus Torvalds1da177e2005-04-16 15:20:36 -070086/* This table only contains "desktop" CPUs, it need to be filled with embedded
87 * ones as well...
88 */
Stephen Rothwell49209602005-10-12 15:55:09 +100089#define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
90 PPC_FEATURE_HAS_MMU)
91#define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +110092#define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
Benjamin Herrenschmidtaa5cb0212006-03-01 15:07:07 +110093#define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
94 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
95#define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
96 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
Anton Blanchard03054d52006-04-29 09:51:06 +100097#define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
Paul Mackerrasfab5db92006-06-07 16:14:40 +100098 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
Nathan Lynch0f473312008-07-10 01:06:57 +100099 PPC_FEATURE_TRUE_LE | \
100 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Michael Neulinge952e6c2008-06-18 10:47:26 +1000101#define COMMON_USER_POWER7 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
102 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
Nathan Lynch0f473312008-07-10 01:06:57 +1000103 PPC_FEATURE_TRUE_LE | \
104 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Nishanth Aravamudan4a1ae4f2013-05-03 14:48:38 +0000105#define COMMON_USER2_POWER7 (PPC_FEATURE2_DSCR)
Michael Neuling71e18492012-10-30 19:34:15 +0000106#define COMMON_USER_POWER8 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
107 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
108 PPC_FEATURE_TRUE_LE | \
109 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Nishanth Aravamudan748645b2013-05-03 14:49:59 +0000110#define COMMON_USER2_POWER8 (PPC_FEATURE2_ARCH_2_07 | \
111 PPC_FEATURE2_HTM_COMP | PPC_FEATURE2_DSCR | \
Benjamin Herrenschmidtdd58a092014-06-10 15:04:40 +1000112 PPC_FEATURE2_ISEL | PPC_FEATURE2_TAR | \
113 PPC_FEATURE2_VEC_CRYPTO)
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500114#define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
115 PPC_FEATURE_TRUE_LE | \
116 PPC_FEATURE_HAS_ALTIVEC_COMP)
Kumar Galaf45c4482009-08-18 19:08:30 +0000117#ifdef CONFIG_PPC_BOOK3E_64
118#define COMMON_USER_BOOKE (COMMON_USER_PPC64 | PPC_FEATURE_BOOKE)
119#else
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100120#define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
121 PPC_FEATURE_BOOKE)
Kumar Galaf45c4482009-08-18 19:08:30 +0000122#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -0700123
Paul Mackerras87a72f92007-10-04 14:18:01 +1000124static struct cpu_spec __initdata cpu_specs[] = {
Benjamin Herrenschmidt2d27cfd2009-07-23 23:15:59 +0000125#ifdef CONFIG_PPC_BOOK3S_64
Stephen Rothwell49209602005-10-12 15:55:09 +1000126 { /* Power4 */
127 .pvr_mask = 0xffff0000,
128 .pvr_value = 0x00350000,
129 .cpu_name = "POWER4 (gp)",
130 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100131 .cpu_user_features = COMMON_USER_POWER4,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000132 .mmu_features = MMU_FTRS_POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000133 .icache_bsize = 128,
134 .dcache_bsize = 128,
135 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600136 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000137 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000138 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100139 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000140 },
141 { /* Power4+ */
142 .pvr_mask = 0xffff0000,
143 .pvr_value = 0x00380000,
144 .cpu_name = "POWER4+ (gq)",
145 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100146 .cpu_user_features = COMMON_USER_POWER4,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000147 .mmu_features = MMU_FTRS_POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000148 .icache_bsize = 128,
149 .dcache_bsize = 128,
150 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600151 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000152 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000153 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100154 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000155 },
156 { /* PPC970 */
157 .pvr_mask = 0xffff0000,
158 .pvr_value = 0x00390000,
159 .cpu_name = "PPC970",
160 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100161 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000162 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000163 .mmu_features = MMU_FTRS_PPC970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000164 .icache_bsize = 128,
165 .dcache_bsize = 128,
166 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600167 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000168 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500169 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000170 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000171 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100172 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000173 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000174 { /* PPC970FX */
175 .pvr_mask = 0xffff0000,
176 .pvr_value = 0x003c0000,
177 .cpu_name = "PPC970FX",
Stephen Rothwell49209602005-10-12 15:55:09 +1000178 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100179 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000180 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000181 .mmu_features = MMU_FTRS_PPC970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000182 .icache_bsize = 128,
183 .dcache_bsize = 128,
184 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600185 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000186 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500187 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000188 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000189 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100190 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000191 },
Olof Johansson3546e812007-02-26 00:35:14 -0600192 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
193 .pvr_mask = 0xffffffff,
194 .pvr_value = 0x00440100,
195 .cpu_name = "PPC970MP",
196 .cpu_features = CPU_FTRS_PPC970,
197 .cpu_user_features = COMMON_USER_POWER4 |
198 PPC_FEATURE_HAS_ALTIVEC_COMP,
Benjamin Herrenschmidtd63ac5f2013-03-13 09:55:02 +1100199 .mmu_features = MMU_FTRS_PPC970,
Olof Johansson3546e812007-02-26 00:35:14 -0600200 .icache_bsize = 128,
201 .dcache_bsize = 128,
202 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000203 .pmc_type = PPC_PMC_IBM,
Olof Johansson3546e812007-02-26 00:35:14 -0600204 .cpu_setup = __setup_cpu_ppc970,
205 .cpu_restore = __restore_cpu_ppc970,
206 .oprofile_cpu_type = "ppc64/970MP",
207 .oprofile_type = PPC_OPROFILE_POWER4,
208 .platform = "ppc970",
209 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000210 { /* PPC970MP */
211 .pvr_mask = 0xffff0000,
212 .pvr_value = 0x00440000,
213 .cpu_name = "PPC970MP",
214 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100215 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000216 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000217 .mmu_features = MMU_FTRS_PPC970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000218 .icache_bsize = 128,
219 .dcache_bsize = 128,
Anton Blanchard87af41b2006-05-05 05:44:26 +1000220 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000221 .pmc_type = PPC_PMC_IBM,
Olof Johansson5b43d202006-10-04 23:41:41 -0500222 .cpu_setup = __setup_cpu_ppc970MP,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500223 .cpu_restore = __restore_cpu_ppc970,
Mike Wolffecb3522006-11-21 14:41:54 -0600224 .oprofile_cpu_type = "ppc64/970MP",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000225 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100226 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000227 },
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500228 { /* PPC970GX */
229 .pvr_mask = 0xffff0000,
230 .pvr_value = 0x00450000,
231 .cpu_name = "PPC970GX",
232 .cpu_features = CPU_FTRS_PPC970,
233 .cpu_user_features = COMMON_USER_POWER4 |
234 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000235 .mmu_features = MMU_FTRS_PPC970,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500236 .icache_bsize = 128,
237 .dcache_bsize = 128,
238 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600239 .pmc_type = PPC_PMC_IBM,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500240 .cpu_setup = __setup_cpu_ppc970,
241 .oprofile_cpu_type = "ppc64/970",
242 .oprofile_type = PPC_OPROFILE_POWER4,
243 .platform = "ppc970",
244 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100245 { /* Power5 GR */
Stephen Rothwell49209602005-10-12 15:55:09 +1000246 .pvr_mask = 0xffff0000,
247 .pvr_value = 0x003a0000,
248 .cpu_name = "POWER5 (gr)",
249 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100250 .cpu_user_features = COMMON_USER_POWER5,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000251 .mmu_features = MMU_FTRS_POWER5,
Stephen Rothwell49209602005-10-12 15:55:09 +1000252 .icache_bsize = 128,
253 .dcache_bsize = 128,
254 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600255 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000256 .oprofile_cpu_type = "ppc64/power5",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000257 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000258 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
259 * and above but only works on POWER5 and above
260 */
261 .oprofile_mmcra_sihv = MMCRA_SIHV,
262 .oprofile_mmcra_sipr = MMCRA_SIPR,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100263 .platform = "power5",
Stephen Rothwell49209602005-10-12 15:55:09 +1000264 },
Mike Wolf31a12ce2007-07-10 13:13:47 -0500265 { /* Power5++ */
266 .pvr_mask = 0xffffff00,
267 .pvr_value = 0x003b0300,
268 .cpu_name = "POWER5+ (gs)",
269 .cpu_features = CPU_FTRS_POWER5,
270 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000271 .mmu_features = MMU_FTRS_POWER5,
Mike Wolf31a12ce2007-07-10 13:13:47 -0500272 .icache_bsize = 128,
273 .dcache_bsize = 128,
274 .num_pmcs = 6,
275 .oprofile_cpu_type = "ppc64/power5++",
276 .oprofile_type = PPC_OPROFILE_POWER4,
277 .oprofile_mmcra_sihv = MMCRA_SIHV,
278 .oprofile_mmcra_sipr = MMCRA_SIPR,
279 .platform = "power5+",
280 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100281 { /* Power5 GS */
Stephen Rothwell49209602005-10-12 15:55:09 +1000282 .pvr_mask = 0xffff0000,
283 .pvr_value = 0x003b0000,
Anton Blanchard834608f2006-01-09 15:42:30 +1100284 .cpu_name = "POWER5+ (gs)",
Stephen Rothwell49209602005-10-12 15:55:09 +1000285 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100286 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000287 .mmu_features = MMU_FTRS_POWER5,
Stephen Rothwell49209602005-10-12 15:55:09 +1000288 .icache_bsize = 128,
289 .dcache_bsize = 128,
290 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600291 .pmc_type = PPC_PMC_IBM,
Anton Blanchard834608f2006-01-09 15:42:30 +1100292 .oprofile_cpu_type = "ppc64/power5+",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000293 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000294 .oprofile_mmcra_sihv = MMCRA_SIHV,
295 .oprofile_mmcra_sipr = MMCRA_SIPR,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100296 .platform = "power5+",
Stephen Rothwell49209602005-10-12 15:55:09 +1000297 },
Paul Mackerras974a76f2006-11-10 20:38:53 +1100298 { /* POWER6 in P5+ mode; 2.04-compliant processor */
299 .pvr_mask = 0xffffffff,
300 .pvr_value = 0x0f000001,
301 .cpu_name = "POWER5+",
302 .cpu_features = CPU_FTRS_POWER5,
303 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000304 .mmu_features = MMU_FTRS_POWER5,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100305 .icache_bsize = 128,
306 .dcache_bsize = 128,
Michael Wolf79af6c42009-04-27 06:17:54 +0000307 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
308 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100309 .platform = "power5+",
310 },
Anton Blanchard03054d52006-04-29 09:51:06 +1000311 { /* Power6 */
312 .pvr_mask = 0xffff0000,
313 .pvr_value = 0x003e0000,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100314 .cpu_name = "POWER6 (raw)",
315 .cpu_features = CPU_FTRS_POWER6,
316 .cpu_user_features = COMMON_USER_POWER6 |
317 PPC_FEATURE_POWER6_EXT,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000318 .mmu_features = MMU_FTRS_POWER6,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100319 .icache_bsize = 128,
320 .dcache_bsize = 128,
321 .num_pmcs = 6,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000322 .pmc_type = PPC_PMC_IBM,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100323 .oprofile_cpu_type = "ppc64/power6",
324 .oprofile_type = PPC_OPROFILE_POWER4,
325 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
326 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
327 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
328 POWER6_MMCRA_OTHER,
329 .platform = "power6x",
330 },
331 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
332 .pvr_mask = 0xffffffff,
333 .pvr_value = 0x0f000002,
334 .cpu_name = "POWER6 (architected)",
Anton Blanchard03054d52006-04-29 09:51:06 +1000335 .cpu_features = CPU_FTRS_POWER6,
336 .cpu_user_features = COMMON_USER_POWER6,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000337 .mmu_features = MMU_FTRS_POWER6,
Anton Blanchard03054d52006-04-29 09:51:06 +1000338 .icache_bsize = 128,
339 .dcache_bsize = 128,
Michael Wolf79af6c42009-04-27 06:17:54 +0000340 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
341 .oprofile_type = PPC_OPROFILE_POWER4,
Anton Blanchard03054d52006-04-29 09:51:06 +1000342 .platform = "power6",
343 },
Joel Schopp635f5a62008-06-19 06:18:21 +1000344 { /* 2.06-compliant processor, i.e. Power7 "architected" mode */
345 .pvr_mask = 0xffffffff,
346 .pvr_value = 0x0f000003,
347 .cpu_name = "POWER7 (architected)",
348 .cpu_features = CPU_FTRS_POWER7,
349 .cpu_user_features = COMMON_USER_POWER7,
Nishanth Aravamudan4a1ae4f2013-05-03 14:48:38 +0000350 .cpu_user_features2 = COMMON_USER2_POWER7,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000351 .mmu_features = MMU_FTRS_POWER7,
Joel Schopp635f5a62008-06-19 06:18:21 +1000352 .icache_bsize = 128,
353 .dcache_bsize = 128,
Michael Wolf79af6c42009-04-27 06:17:54 +0000354 .oprofile_type = PPC_OPROFILE_POWER4,
355 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
Benjamin Herrenschmidt24cc67d2011-01-20 18:50:55 +1100356 .cpu_setup = __setup_cpu_power7,
357 .cpu_restore = __restore_cpu_power7,
Mahesh Salgaonkar04407052013-10-30 20:04:56 +0530358 .flush_tlb = __flush_tlb_power7,
Mahesh Salgaonkare22a2272013-10-30 20:05:11 +0530359 .machine_check_early = __machine_check_early_realmode_p7,
Joel Schopp635f5a62008-06-19 06:18:21 +1000360 .platform = "power7",
361 },
Michael Neulingc674e702012-11-08 20:26:42 +0000362 { /* 2.07-compliant processor, i.e. Power8 "architected" mode */
363 .pvr_mask = 0xffffffff,
364 .pvr_value = 0x0f000004,
365 .cpu_name = "POWER8 (architected)",
366 .cpu_features = CPU_FTRS_POWER8,
367 .cpu_user_features = COMMON_USER_POWER8,
Nishanth Aravamudan748645b2013-05-03 14:49:59 +0000368 .cpu_user_features2 = COMMON_USER2_POWER8,
Michael Neulingc674e702012-11-08 20:26:42 +0000369 .mmu_features = MMU_FTRS_POWER8,
370 .icache_bsize = 128,
371 .dcache_bsize = 128,
Michael Neuling6a60f9e72013-06-04 19:38:54 +0000372 .oprofile_type = PPC_OPROFILE_INVALID,
373 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
Michael Neulingc674e702012-11-08 20:26:42 +0000374 .cpu_setup = __setup_cpu_power8,
375 .cpu_restore = __restore_cpu_power8,
Mahesh Salgaonkar04407052013-10-30 20:04:56 +0530376 .flush_tlb = __flush_tlb_power8,
Mahesh Salgaonkarae744f32013-10-30 20:05:26 +0530377 .machine_check_early = __machine_check_early_realmode_p8,
Michael Neulingc674e702012-11-08 20:26:42 +0000378 .platform = "power8",
379 },
Michael Neulinge952e6c2008-06-18 10:47:26 +1000380 { /* Power7 */
381 .pvr_mask = 0xffff0000,
382 .pvr_value = 0x003f0000,
Joel Schopp635f5a62008-06-19 06:18:21 +1000383 .cpu_name = "POWER7 (raw)",
Michael Neulinge952e6c2008-06-18 10:47:26 +1000384 .cpu_features = CPU_FTRS_POWER7,
385 .cpu_user_features = COMMON_USER_POWER7,
Nishanth Aravamudan4a1ae4f2013-05-03 14:48:38 +0000386 .cpu_user_features2 = COMMON_USER2_POWER7,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000387 .mmu_features = MMU_FTRS_POWER7,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000388 .icache_bsize = 128,
389 .dcache_bsize = 128,
390 .num_pmcs = 6,
391 .pmc_type = PPC_PMC_IBM,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000392 .oprofile_cpu_type = "ppc64/power7",
393 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt24cc67d2011-01-20 18:50:55 +1100394 .cpu_setup = __setup_cpu_power7,
395 .cpu_restore = __restore_cpu_power7,
Mahesh Salgaonkar04407052013-10-30 20:04:56 +0530396 .flush_tlb = __flush_tlb_power7,
Mahesh Salgaonkare22a2272013-10-30 20:05:11 +0530397 .machine_check_early = __machine_check_early_realmode_p7,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000398 .platform = "power7",
399 },
Michael Neuling6f08cb32010-11-17 18:52:44 +0000400 { /* Power7+ */
401 .pvr_mask = 0xffff0000,
402 .pvr_value = 0x004A0000,
403 .cpu_name = "POWER7+ (raw)",
404 .cpu_features = CPU_FTRS_POWER7,
405 .cpu_user_features = COMMON_USER_POWER7,
Will Schmidtbadec112013-05-20 05:04:18 +0000406 .cpu_user_features2 = COMMON_USER2_POWER7,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000407 .mmu_features = MMU_FTRS_POWER7,
Michael Neuling6f08cb32010-11-17 18:52:44 +0000408 .icache_bsize = 128,
409 .dcache_bsize = 128,
410 .num_pmcs = 6,
411 .pmc_type = PPC_PMC_IBM,
412 .oprofile_cpu_type = "ppc64/power7",
413 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt24cc67d2011-01-20 18:50:55 +1100414 .cpu_setup = __setup_cpu_power7,
415 .cpu_restore = __restore_cpu_power7,
Mahesh Salgaonkar04407052013-10-30 20:04:56 +0530416 .flush_tlb = __flush_tlb_power7,
Mahesh Salgaonkare22a2272013-10-30 20:05:11 +0530417 .machine_check_early = __machine_check_early_realmode_p7,
Michael Neuling6f08cb32010-11-17 18:52:44 +0000418 .platform = "power7+",
419 },
Michael Neuling33959f82013-07-18 11:31:51 +1000420 { /* Power8E */
Michael Neuling71e18492012-10-30 19:34:15 +0000421 .pvr_mask = 0xffff0000,
422 .pvr_value = 0x004b0000,
Michael Neuling33959f82013-07-18 11:31:51 +1000423 .cpu_name = "POWER8E (raw)",
Michael Ellerman68f2f0d2014-03-14 16:00:28 +1100424 .cpu_features = CPU_FTRS_POWER8E,
Michael Neuling33959f82013-07-18 11:31:51 +1000425 .cpu_user_features = COMMON_USER_POWER8,
426 .cpu_user_features2 = COMMON_USER2_POWER8,
427 .mmu_features = MMU_FTRS_POWER8,
428 .icache_bsize = 128,
429 .dcache_bsize = 128,
430 .num_pmcs = 6,
431 .pmc_type = PPC_PMC_IBM,
432 .oprofile_cpu_type = "ppc64/power8",
433 .oprofile_type = PPC_OPROFILE_INVALID,
434 .cpu_setup = __setup_cpu_power8,
435 .cpu_restore = __restore_cpu_power8,
Mahesh Salgaonkar04407052013-10-30 20:04:56 +0530436 .flush_tlb = __flush_tlb_power8,
Mahesh Salgaonkarae744f32013-10-30 20:05:26 +0530437 .machine_check_early = __machine_check_early_realmode_p8,
Michael Neuling33959f82013-07-18 11:31:51 +1000438 .platform = "power8",
439 },
Joel Stanleybd6ba352014-07-18 11:41:37 +0930440 { /* Power8 DD1: Does not support doorbell IPIs */
441 .pvr_mask = 0xffffff00,
442 .pvr_value = 0x004d0100,
443 .cpu_name = "POWER8 (raw)",
444 .cpu_features = CPU_FTRS_POWER8_DD1,
445 .cpu_user_features = COMMON_USER_POWER8,
446 .cpu_user_features2 = COMMON_USER2_POWER8,
447 .mmu_features = MMU_FTRS_POWER8,
448 .icache_bsize = 128,
449 .dcache_bsize = 128,
450 .num_pmcs = 6,
451 .pmc_type = PPC_PMC_IBM,
452 .oprofile_cpu_type = "ppc64/power8",
453 .oprofile_type = PPC_OPROFILE_INVALID,
454 .cpu_setup = __setup_cpu_power8,
455 .cpu_restore = __restore_cpu_power8,
456 .flush_tlb = __flush_tlb_power8,
457 .machine_check_early = __machine_check_early_realmode_p8,
458 .platform = "power8",
459 },
Michael Neuling33959f82013-07-18 11:31:51 +1000460 { /* Power8 */
461 .pvr_mask = 0xffff0000,
462 .pvr_value = 0x004d0000,
Michael Neuling71e18492012-10-30 19:34:15 +0000463 .cpu_name = "POWER8 (raw)",
464 .cpu_features = CPU_FTRS_POWER8,
465 .cpu_user_features = COMMON_USER_POWER8,
Nishanth Aravamudan748645b2013-05-03 14:49:59 +0000466 .cpu_user_features2 = COMMON_USER2_POWER8,
Michael Neuling71e18492012-10-30 19:34:15 +0000467 .mmu_features = MMU_FTRS_POWER8,
468 .icache_bsize = 128,
469 .dcache_bsize = 128,
470 .num_pmcs = 6,
471 .pmc_type = PPC_PMC_IBM,
Michael Neuling6a60f9e72013-06-04 19:38:54 +0000472 .oprofile_cpu_type = "ppc64/power8",
473 .oprofile_type = PPC_OPROFILE_INVALID,
Michael Neuling71e18492012-10-30 19:34:15 +0000474 .cpu_setup = __setup_cpu_power8,
475 .cpu_restore = __restore_cpu_power8,
Mahesh Salgaonkar04407052013-10-30 20:04:56 +0530476 .flush_tlb = __flush_tlb_power8,
Mahesh Salgaonkarae744f32013-10-30 20:05:26 +0530477 .machine_check_early = __machine_check_early_realmode_p8,
Michael Neuling71e18492012-10-30 19:34:15 +0000478 .platform = "power8",
479 },
Arnd Bergmannc902be72006-01-04 19:55:53 +0000480 { /* Cell Broadband Engine */
Stephen Rothwell49209602005-10-12 15:55:09 +1000481 .pvr_mask = 0xffff0000,
482 .pvr_value = 0x00700000,
483 .cpu_name = "Cell Broadband Engine",
484 .cpu_features = CPU_FTRS_CELL,
485 .cpu_user_features = COMMON_USER_PPC64 |
Benjamin Herrenschmidtaa5cb0212006-03-01 15:07:07 +1100486 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
487 PPC_FEATURE_SMT,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000488 .mmu_features = MMU_FTRS_CELL,
Stephen Rothwell49209602005-10-12 15:55:09 +1000489 .icache_bsize = 128,
490 .dcache_bsize = 128,
Maynard Johnson18f21902006-11-20 18:45:16 +0100491 .num_pmcs = 4,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600492 .pmc_type = PPC_PMC_IBM,
Maynard Johnson18f21902006-11-20 18:45:16 +0100493 .oprofile_cpu_type = "ppc64/cell-be",
494 .oprofile_type = PPC_OPROFILE_CELL,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100495 .platform = "ppc-cell-be",
Stephen Rothwell49209602005-10-12 15:55:09 +1000496 },
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500497 { /* PA Semi PA6T */
498 .pvr_mask = 0x7fff0000,
499 .pvr_value = 0x00900000,
500 .cpu_name = "PA6T",
501 .cpu_features = CPU_FTRS_PA6T,
502 .cpu_user_features = COMMON_USER_PA6T,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000503 .mmu_features = MMU_FTRS_PA6T,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500504 .icache_bsize = 64,
505 .dcache_bsize = 64,
506 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600507 .pmc_type = PPC_PMC_PA6T,
Olof Johansson11999192007-02-04 16:36:51 -0600508 .cpu_setup = __setup_cpu_pa6t,
509 .cpu_restore = __restore_cpu_pa6t,
Olof Johansson25fc5302007-04-18 16:38:21 +1000510 .oprofile_cpu_type = "ppc64/pa6t",
511 .oprofile_type = PPC_OPROFILE_PA6T,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500512 .platform = "pa6t",
513 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000514 { /* default match */
515 .pvr_mask = 0x00000000,
516 .pvr_value = 0x00000000,
517 .cpu_name = "POWER4 (compatible)",
518 .cpu_features = CPU_FTRS_COMPATIBLE,
519 .cpu_user_features = COMMON_USER_PPC64,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000520 .mmu_features = MMU_FTRS_DEFAULT_HPTE_ARCH_V2,
Stephen Rothwell49209602005-10-12 15:55:09 +1000521 .icache_bsize = 128,
522 .dcache_bsize = 128,
523 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600524 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100525 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000526 }
Benjamin Herrenschmidt2d27cfd2009-07-23 23:15:59 +0000527#endif /* CONFIG_PPC_BOOK3S_64 */
Benjamin Herrenschmidt2d27cfd2009-07-23 23:15:59 +0000528
Stephen Rothwell49209602005-10-12 15:55:09 +1000529#ifdef CONFIG_PPC32
Michael Ellerman1e07a0a2014-07-10 12:29:26 +1000530#ifdef CONFIG_PPC_BOOK3S_32
Stephen Rothwell49209602005-10-12 15:55:09 +1000531 { /* 601 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700532 .pvr_mask = 0xffff0000,
533 .pvr_value = 0x00010000,
534 .cpu_name = "601",
Kumar Gala10b35d92005-09-23 14:08:58 -0500535 .cpu_features = CPU_FTRS_PPC601,
Stephen Rothwell49209602005-10-12 15:55:09 +1000536 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
Paul Mackerras98599012005-10-22 16:51:34 +1000537 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000538 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700539 .icache_bsize = 32,
540 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100541 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100542 .platform = "ppc601",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700543 },
544 { /* 603 */
545 .pvr_mask = 0xffff0000,
546 .pvr_value = 0x00030000,
547 .cpu_name = "603",
Kumar Gala10b35d92005-09-23 14:08:58 -0500548 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000549 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000550 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700551 .icache_bsize = 32,
552 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100553 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100554 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100555 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700556 },
557 { /* 603e */
558 .pvr_mask = 0xffff0000,
559 .pvr_value = 0x00060000,
560 .cpu_name = "603e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500561 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000562 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000563 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700564 .icache_bsize = 32,
565 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100566 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100567 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100568 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700569 },
570 { /* 603ev */
571 .pvr_mask = 0xffff0000,
572 .pvr_value = 0x00070000,
573 .cpu_name = "603ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500574 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000575 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000576 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700577 .icache_bsize = 32,
578 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100579 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100580 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100581 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700582 },
583 { /* 604 */
584 .pvr_mask = 0xffff0000,
585 .pvr_value = 0x00040000,
586 .cpu_name = "604",
Kumar Gala10b35d92005-09-23 14:08:58 -0500587 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000588 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000589 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700590 .icache_bsize = 32,
591 .dcache_bsize = 32,
592 .num_pmcs = 2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100593 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100594 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100595 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700596 },
597 { /* 604e */
598 .pvr_mask = 0xfffff000,
599 .pvr_value = 0x00090000,
600 .cpu_name = "604e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500601 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000602 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000603 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700604 .icache_bsize = 32,
605 .dcache_bsize = 32,
606 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100607 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100608 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100609 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700610 },
611 { /* 604r */
612 .pvr_mask = 0xffff0000,
613 .pvr_value = 0x00090000,
614 .cpu_name = "604r",
Kumar Gala10b35d92005-09-23 14:08:58 -0500615 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000616 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000617 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700618 .icache_bsize = 32,
619 .dcache_bsize = 32,
620 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100621 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100622 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100623 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700624 },
625 { /* 604ev */
626 .pvr_mask = 0xffff0000,
627 .pvr_value = 0x000a0000,
628 .cpu_name = "604ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500629 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000630 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000631 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700632 .icache_bsize = 32,
633 .dcache_bsize = 32,
634 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100635 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100636 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100637 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700638 },
639 { /* 740/750 (0x4202, don't support TAU ?) */
640 .pvr_mask = 0xffffffff,
641 .pvr_value = 0x00084202,
642 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500643 .cpu_features = CPU_FTRS_740_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000644 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000645 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700646 .icache_bsize = 32,
647 .dcache_bsize = 32,
648 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100649 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100650 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100651 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700652 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700653 { /* 750CX (80100 and 8010x?) */
654 .pvr_mask = 0xfffffff0,
655 .pvr_value = 0x00080100,
656 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500657 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000658 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000659 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700660 .icache_bsize = 32,
661 .dcache_bsize = 32,
662 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100663 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100664 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100665 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700666 },
667 { /* 750CX (82201 and 82202) */
668 .pvr_mask = 0xfffffff0,
669 .pvr_value = 0x00082200,
670 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500671 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000672 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000673 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700674 .icache_bsize = 32,
675 .dcache_bsize = 32,
676 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000677 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100678 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100679 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100680 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700681 },
682 { /* 750CXe (82214) */
683 .pvr_mask = 0xfffffff0,
684 .pvr_value = 0x00082210,
685 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500686 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000687 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000688 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700689 .icache_bsize = 32,
690 .dcache_bsize = 32,
691 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000692 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100693 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100694 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100695 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700696 },
Arthur Othieno7c316252005-09-03 15:55:52 -0700697 { /* 750CXe "Gekko" (83214) */
698 .pvr_mask = 0xffffffff,
699 .pvr_value = 0x00083214,
700 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500701 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000702 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000703 .mmu_features = MMU_FTR_HPTE_TABLE,
Arthur Othieno7c316252005-09-03 15:55:52 -0700704 .icache_bsize = 32,
705 .dcache_bsize = 32,
706 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000707 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100708 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100709 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100710 .platform = "ppc750",
Arthur Othieno7c316252005-09-03 15:55:52 -0700711 },
Albert Herranz45158dc2009-12-12 06:31:46 +0000712 { /* 750CL (and "Broadway") */
713 .pvr_mask = 0xfffff0e0,
714 .pvr_value = 0x00087000,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500715 .cpu_name = "750CL",
Josh Boyera14c4502007-04-13 04:33:25 +1000716 .cpu_features = CPU_FTRS_750CL,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500717 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000718 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500719 .icache_bsize = 32,
720 .dcache_bsize = 32,
721 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000722 .pmc_type = PPC_PMC_IBM,
Josh Boyera14c4502007-04-13 04:33:25 +1000723 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100724 .machine_check = machine_check_generic,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500725 .platform = "ppc750",
Dragos Tatulea04f56534772009-09-16 11:58:15 +0300726 .oprofile_cpu_type = "ppc/750",
727 .oprofile_type = PPC_OPROFILE_G4,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500728 },
Arthur Othienoac1ff042005-09-03 15:55:51 -0700729 { /* 745/755 */
730 .pvr_mask = 0xfffff000,
731 .pvr_value = 0x00083000,
732 .cpu_name = "745/755",
Kumar Gala10b35d92005-09-23 14:08:58 -0500733 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000734 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000735 .mmu_features = MMU_FTR_HPTE_TABLE,
Arthur Othienoac1ff042005-09-03 15:55:51 -0700736 .icache_bsize = 32,
737 .dcache_bsize = 32,
738 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000739 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100740 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100741 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100742 .platform = "ppc750",
Arthur Othienoac1ff042005-09-03 15:55:51 -0700743 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700744 { /* 750FX rev 1.x */
745 .pvr_mask = 0xffffff00,
746 .pvr_value = 0x70000100,
747 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500748 .cpu_features = CPU_FTRS_750FX1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000749 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000750 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700751 .icache_bsize = 32,
752 .dcache_bsize = 32,
753 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000754 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100755 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100756 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100757 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000758 .oprofile_cpu_type = "ppc/750",
759 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700760 },
761 { /* 750FX rev 2.0 must disable HID0[DPM] */
762 .pvr_mask = 0xffffffff,
763 .pvr_value = 0x70000200,
764 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500765 .cpu_features = CPU_FTRS_750FX2,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000766 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000767 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700768 .icache_bsize = 32,
769 .dcache_bsize = 32,
770 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000771 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100772 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100773 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100774 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000775 .oprofile_cpu_type = "ppc/750",
776 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700777 },
778 { /* 750FX (All revs except 2.0) */
779 .pvr_mask = 0xffff0000,
780 .pvr_value = 0x70000000,
781 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500782 .cpu_features = CPU_FTRS_750FX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000783 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000784 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700785 .icache_bsize = 32,
786 .dcache_bsize = 32,
787 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000788 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100789 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100790 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100791 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000792 .oprofile_cpu_type = "ppc/750",
793 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700794 },
795 { /* 750GX */
796 .pvr_mask = 0xffff0000,
797 .pvr_value = 0x70020000,
798 .cpu_name = "750GX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500799 .cpu_features = CPU_FTRS_750GX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000800 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000801 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700802 .icache_bsize = 32,
803 .dcache_bsize = 32,
804 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000805 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100806 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100807 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100808 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000809 .oprofile_cpu_type = "ppc/750",
810 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700811 },
812 { /* 740/750 (L2CR bit need fixup for 740) */
813 .pvr_mask = 0xffff0000,
814 .pvr_value = 0x00080000,
815 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500816 .cpu_features = CPU_FTRS_740,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000817 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000818 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700819 .icache_bsize = 32,
820 .dcache_bsize = 32,
821 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000822 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100823 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100824 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100825 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700826 },
827 { /* 7400 rev 1.1 ? (no TAU) */
828 .pvr_mask = 0xffffffff,
829 .pvr_value = 0x000c1101,
830 .cpu_name = "7400 (1.1)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500831 .cpu_features = CPU_FTRS_7400_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000832 .cpu_user_features = COMMON_USER |
833 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000834 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700835 .icache_bsize = 32,
836 .dcache_bsize = 32,
837 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000838 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100839 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100840 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100841 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700842 },
843 { /* 7400 */
844 .pvr_mask = 0xffff0000,
845 .pvr_value = 0x000c0000,
846 .cpu_name = "7400",
Kumar Gala10b35d92005-09-23 14:08:58 -0500847 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000848 .cpu_user_features = COMMON_USER |
849 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000850 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700851 .icache_bsize = 32,
852 .dcache_bsize = 32,
853 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000854 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100855 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100856 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100857 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700858 },
859 { /* 7410 */
860 .pvr_mask = 0xffff0000,
861 .pvr_value = 0x800c0000,
862 .cpu_name = "7410",
Kumar Gala10b35d92005-09-23 14:08:58 -0500863 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000864 .cpu_user_features = COMMON_USER |
865 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000866 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700867 .icache_bsize = 32,
868 .dcache_bsize = 32,
869 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000870 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100871 .cpu_setup = __setup_cpu_7410,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100872 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100873 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700874 },
875 { /* 7450 2.0 - no doze/nap */
876 .pvr_mask = 0xffffffff,
877 .pvr_value = 0x80000200,
878 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500879 .cpu_features = CPU_FTRS_7450_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000880 .cpu_user_features = COMMON_USER |
881 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000882 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700883 .icache_bsize = 32,
884 .dcache_bsize = 32,
885 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000886 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600887 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600888 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000889 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100890 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100891 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700892 },
893 { /* 7450 2.1 */
894 .pvr_mask = 0xffffffff,
895 .pvr_value = 0x80000201,
896 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500897 .cpu_features = CPU_FTRS_7450_21,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000898 .cpu_user_features = COMMON_USER |
899 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000900 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700901 .icache_bsize = 32,
902 .dcache_bsize = 32,
903 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000904 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600905 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600906 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000907 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100908 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100909 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700910 },
911 { /* 7450 2.3 and newer */
912 .pvr_mask = 0xffff0000,
913 .pvr_value = 0x80000000,
914 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500915 .cpu_features = CPU_FTRS_7450_23,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000916 .cpu_user_features = COMMON_USER |
917 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000918 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700919 .icache_bsize = 32,
920 .dcache_bsize = 32,
921 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000922 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600923 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600924 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000925 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100926 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100927 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700928 },
929 { /* 7455 rev 1.x */
930 .pvr_mask = 0xffffff00,
931 .pvr_value = 0x80010100,
932 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500933 .cpu_features = CPU_FTRS_7455_1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000934 .cpu_user_features = COMMON_USER |
935 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000936 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700937 .icache_bsize = 32,
938 .dcache_bsize = 32,
939 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000940 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600941 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600942 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000943 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100944 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100945 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700946 },
947 { /* 7455 rev 2.0 */
948 .pvr_mask = 0xffffffff,
949 .pvr_value = 0x80010200,
950 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500951 .cpu_features = CPU_FTRS_7455_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000952 .cpu_user_features = COMMON_USER |
953 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000954 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700955 .icache_bsize = 32,
956 .dcache_bsize = 32,
957 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000958 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600959 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600960 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000961 .oprofile_type = PPC_OPROFILE_G4,
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 { /* 7455 others */
966 .pvr_mask = 0xffff0000,
967 .pvr_value = 0x80010000,
968 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500969 .cpu_features = CPU_FTRS_7455,
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",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000979 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100980 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100981 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700982 },
983 { /* 7447/7457 Rev 1.0 */
984 .pvr_mask = 0xffffffff,
985 .pvr_value = 0x80020100,
986 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500987 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000988 .cpu_user_features = COMMON_USER |
989 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000990 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700991 .icache_bsize = 32,
992 .dcache_bsize = 32,
993 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000994 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600995 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600996 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000997 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100998 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100999 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001000 },
1001 { /* 7447/7457 Rev 1.1 */
1002 .pvr_mask = 0xffffffff,
1003 .pvr_value = 0x80020101,
1004 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -05001005 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001006 .cpu_user_features = COMMON_USER |
1007 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001008 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001009 .icache_bsize = 32,
1010 .dcache_bsize = 32,
1011 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001012 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001013 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001014 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001015 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001016 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001017 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001018 },
1019 { /* 7447/7457 Rev 1.2 and later */
1020 .pvr_mask = 0xffff0000,
1021 .pvr_value = 0x80020000,
1022 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -05001023 .cpu_features = CPU_FTRS_7447,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001024 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001025 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001026 .icache_bsize = 32,
1027 .dcache_bsize = 32,
1028 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001029 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001030 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001031 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001032 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001033 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001034 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001035 },
1036 { /* 7447A */
1037 .pvr_mask = 0xffff0000,
1038 .pvr_value = 0x80030000,
1039 .cpu_name = "7447A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001040 .cpu_features = CPU_FTRS_7447A,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001041 .cpu_user_features = COMMON_USER |
1042 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001043 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001044 .icache_bsize = 32,
1045 .dcache_bsize = 32,
1046 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001047 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001048 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001049 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001050 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001051 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001052 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001053 },
Kumar Galabbde6302005-09-03 15:55:55 -07001054 { /* 7448 */
1055 .pvr_mask = 0xffff0000,
1056 .pvr_value = 0x80040000,
1057 .cpu_name = "7448",
James.Yang3d372542007-05-02 16:34:43 -05001058 .cpu_features = CPU_FTRS_7448,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001059 .cpu_user_features = COMMON_USER |
1060 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001061 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Kumar Galabbde6302005-09-03 15:55:55 -07001062 .icache_bsize = 32,
1063 .dcache_bsize = 32,
1064 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001065 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001066 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001067 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001068 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001069 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001070 .platform = "ppc7450",
Kumar Galabbde6302005-09-03 15:55:55 -07001071 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001072 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
1073 .pvr_mask = 0x7fff0000,
1074 .pvr_value = 0x00810000,
1075 .cpu_name = "82xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001076 .cpu_features = CPU_FTRS_82XX,
Stephen Rothwell49209602005-10-12 15:55:09 +10001077 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001078 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001079 .icache_bsize = 32,
1080 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001081 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001082 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001083 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001084 },
1085 { /* All G2_LE (603e core, plus some) have the same pvr */
1086 .pvr_mask = 0x7fff0000,
1087 .pvr_value = 0x00820000,
1088 .cpu_name = "G2_LE",
Kumar Gala10b35d92005-09-23 14:08:58 -05001089 .cpu_features = CPU_FTRS_G2_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +10001090 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001091 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001092 .icache_bsize = 32,
1093 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001094 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001095 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001096 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001097 },
Kim Phillips6c4a2502006-10-02 20:10:24 -05001098 { /* e300c1 (a 603e core, plus some) on 83xx */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001099 .pvr_mask = 0x7fff0000,
1100 .pvr_value = 0x00830000,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001101 .cpu_name = "e300c1",
Kumar Gala10b35d92005-09-23 14:08:58 -05001102 .cpu_features = CPU_FTRS_E300,
Stephen Rothwell49209602005-10-12 15:55:09 +10001103 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001104 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001105 .icache_bsize = 32,
1106 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001107 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001108 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001109 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001110 },
Kim Phillips6c4a2502006-10-02 20:10:24 -05001111 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
1112 .pvr_mask = 0x7fff0000,
1113 .pvr_value = 0x00840000,
1114 .cpu_name = "e300c2",
Kim Phillipsaa42c692006-12-08 02:43:30 -06001115 .cpu_features = CPU_FTRS_E300C2,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001116 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Kumar Gala2319f122009-03-19 03:55:41 +00001117 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1118 MMU_FTR_NEED_DTLB_SW_LRU,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001119 .icache_bsize = 32,
1120 .dcache_bsize = 32,
1121 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001122 .machine_check = machine_check_generic,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001123 .platform = "ppc603",
1124 },
Li Yanga58d5242007-10-19 19:38:42 +08001125 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
Scott Wood57933f82006-12-01 12:57:05 -06001126 .pvr_mask = 0x7fff0000,
1127 .pvr_value = 0x00850000,
1128 .cpu_name = "e300c3",
1129 .cpu_features = CPU_FTRS_E300,
1130 .cpu_user_features = COMMON_USER,
Kumar Gala2319f122009-03-19 03:55:41 +00001131 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1132 MMU_FTR_NEED_DTLB_SW_LRU,
Scott Wood57933f82006-12-01 12:57:05 -06001133 .icache_bsize = 32,
1134 .dcache_bsize = 32,
1135 .cpu_setup = __setup_cpu_603,
Esben Haabendal974ff4e2015-01-06 12:26:59 +01001136 .machine_check = machine_check_generic,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001137 .num_pmcs = 4,
1138 .oprofile_cpu_type = "ppc/e300",
1139 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Scott Wood57933f82006-12-01 12:57:05 -06001140 .platform = "ppc603",
1141 },
Li Yanga58d5242007-10-19 19:38:42 +08001142 { /* e300c4 (e300c1, plus one IU) */
1143 .pvr_mask = 0x7fff0000,
1144 .pvr_value = 0x00860000,
1145 .cpu_name = "e300c4",
1146 .cpu_features = CPU_FTRS_E300,
1147 .cpu_user_features = COMMON_USER,
Kumar Gala2319f122009-03-19 03:55:41 +00001148 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1149 MMU_FTR_NEED_DTLB_SW_LRU,
Li Yanga58d5242007-10-19 19:38:42 +08001150 .icache_bsize = 32,
1151 .dcache_bsize = 32,
1152 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001153 .machine_check = machine_check_generic,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001154 .num_pmcs = 4,
1155 .oprofile_cpu_type = "ppc/e300",
1156 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Li Yanga58d5242007-10-19 19:38:42 +08001157 .platform = "ppc603",
1158 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001159 { /* default match, we assume split I/D cache & TB (non-601)... */
1160 .pvr_mask = 0x00000000,
1161 .pvr_value = 0x00000000,
1162 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -05001163 .cpu_features = CPU_FTRS_CLASSIC32,
Stephen Rothwell49209602005-10-12 15:55:09 +10001164 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001165 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001166 .icache_bsize = 32,
1167 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001168 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001169 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001170 },
Michael Ellerman1e07a0a2014-07-10 12:29:26 +10001171#endif /* CONFIG_PPC_BOOK3S_32 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001172#ifdef CONFIG_8xx
1173 { /* 8xx */
1174 .pvr_mask = 0xffff0000,
1175 .pvr_value = 0x00500000,
1176 .cpu_name = "8xx",
1177 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1178 * if the 8xx code is there.... */
Kumar Gala10b35d92005-09-23 14:08:58 -05001179 .cpu_features = CPU_FTRS_8XX,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001180 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001181 .mmu_features = MMU_FTR_TYPE_8xx,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001182 .icache_bsize = 16,
1183 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001184 .platform = "ppc823",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001185 },
1186#endif /* CONFIG_8xx */
1187#ifdef CONFIG_40x
1188 { /* 403GC */
1189 .pvr_mask = 0xffffff00,
1190 .pvr_value = 0x00200200,
1191 .cpu_name = "403GC",
Kumar Gala10b35d92005-09-23 14:08:58 -05001192 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001193 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001194 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001195 .icache_bsize = 16,
1196 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001197 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001198 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001199 },
1200 { /* 403GCX */
1201 .pvr_mask = 0xffffff00,
1202 .pvr_value = 0x00201400,
1203 .cpu_name = "403GCX",
Kumar Gala10b35d92005-09-23 14:08:58 -05001204 .cpu_features = CPU_FTRS_40X,
Paul Mackerras98599012005-10-22 16:51:34 +10001205 .cpu_user_features = PPC_FEATURE_32 |
1206 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001207 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001208 .icache_bsize = 16,
1209 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001210 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001211 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001212 },
1213 { /* 403G ?? */
1214 .pvr_mask = 0xffff0000,
1215 .pvr_value = 0x00200000,
1216 .cpu_name = "403G ??",
Kumar Gala10b35d92005-09-23 14:08:58 -05001217 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001218 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001219 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001220 .icache_bsize = 16,
1221 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001222 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001223 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001224 },
1225 { /* 405GP */
1226 .pvr_mask = 0xffff0000,
1227 .pvr_value = 0x40110000,
1228 .cpu_name = "405GP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001229 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001230 .cpu_user_features = PPC_FEATURE_32 |
1231 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001232 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001233 .icache_bsize = 32,
1234 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001235 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001236 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001237 },
1238 { /* STB 03xxx */
1239 .pvr_mask = 0xffff0000,
1240 .pvr_value = 0x40130000,
1241 .cpu_name = "STB03xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001242 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001243 .cpu_user_features = PPC_FEATURE_32 |
1244 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001245 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001246 .icache_bsize = 32,
1247 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001248 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001249 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001250 },
1251 { /* STB 04xxx */
1252 .pvr_mask = 0xffff0000,
1253 .pvr_value = 0x41810000,
1254 .cpu_name = "STB04xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001255 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001256 .cpu_user_features = PPC_FEATURE_32 |
1257 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001258 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001259 .icache_bsize = 32,
1260 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001261 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001262 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001263 },
1264 { /* NP405L */
1265 .pvr_mask = 0xffff0000,
1266 .pvr_value = 0x41610000,
1267 .cpu_name = "NP405L",
Kumar Gala10b35d92005-09-23 14:08:58 -05001268 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001269 .cpu_user_features = PPC_FEATURE_32 |
1270 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001271 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001272 .icache_bsize = 32,
1273 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001274 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001275 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001276 },
1277 { /* NP4GS3 */
1278 .pvr_mask = 0xffff0000,
1279 .pvr_value = 0x40B10000,
1280 .cpu_name = "NP4GS3",
Kumar Gala10b35d92005-09-23 14:08:58 -05001281 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001282 .cpu_user_features = PPC_FEATURE_32 |
1283 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001284 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001285 .icache_bsize = 32,
1286 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001287 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001288 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001289 },
1290 { /* NP405H */
1291 .pvr_mask = 0xffff0000,
1292 .pvr_value = 0x41410000,
1293 .cpu_name = "NP405H",
Kumar Gala10b35d92005-09-23 14:08:58 -05001294 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001295 .cpu_user_features = PPC_FEATURE_32 |
1296 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001297 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001298 .icache_bsize = 32,
1299 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001300 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001301 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001302 },
1303 { /* 405GPr */
1304 .pvr_mask = 0xffff0000,
1305 .pvr_value = 0x50910000,
1306 .cpu_name = "405GPr",
Kumar Gala10b35d92005-09-23 14:08:58 -05001307 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001308 .cpu_user_features = PPC_FEATURE_32 |
1309 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001310 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001311 .icache_bsize = 32,
1312 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001313 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001314 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001315 },
1316 { /* STBx25xx */
1317 .pvr_mask = 0xffff0000,
1318 .pvr_value = 0x51510000,
1319 .cpu_name = "STBx25xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001320 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001321 .cpu_user_features = PPC_FEATURE_32 |
1322 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001323 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001324 .icache_bsize = 32,
1325 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001326 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001327 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001328 },
1329 { /* 405LP */
1330 .pvr_mask = 0xffff0000,
1331 .pvr_value = 0x41F10000,
1332 .cpu_name = "405LP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001333 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001334 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001335 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001336 .icache_bsize = 32,
1337 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001338 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001339 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001340 },
1341 { /* Xilinx Virtex-II Pro */
Grant C. Likely72646c72006-01-19 01:13:20 -07001342 .pvr_mask = 0xfffff000,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001343 .pvr_value = 0x20010000,
1344 .cpu_name = "Virtex-II Pro",
Kumar Gala10b35d92005-09-23 14:08:58 -05001345 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001346 .cpu_user_features = PPC_FEATURE_32 |
1347 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001348 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001349 .icache_bsize = 32,
1350 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001351 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001352 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001353 },
Grant C. Likely72646c72006-01-19 01:13:20 -07001354 { /* Xilinx Virtex-4 FX */
1355 .pvr_mask = 0xfffff000,
1356 .pvr_value = 0x20011000,
1357 .cpu_name = "Virtex-4 FX",
1358 .cpu_features = CPU_FTRS_40X,
1359 .cpu_user_features = PPC_FEATURE_32 |
1360 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001361 .mmu_features = MMU_FTR_TYPE_40x,
Grant C. Likely72646c72006-01-19 01:13:20 -07001362 .icache_bsize = 32,
1363 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001364 .machine_check = machine_check_4xx,
Peter Bergner838fdb42006-09-14 14:18:38 -05001365 .platform = "ppc405",
Grant C. Likely72646c72006-01-19 01:13:20 -07001366 },
Eugene Suroveginad95d602005-06-07 13:22:09 -07001367 { /* 405EP */
1368 .pvr_mask = 0xffff0000,
1369 .pvr_value = 0x51210000,
1370 .cpu_name = "405EP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001371 .cpu_features = CPU_FTRS_40X,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001372 .cpu_user_features = PPC_FEATURE_32 |
1373 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001374 .mmu_features = MMU_FTR_TYPE_40x,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001375 .icache_bsize = 32,
1376 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001377 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001378 .platform = "ppc405",
Eugene Suroveginad95d602005-06-07 13:22:09 -07001379 },
Lee Nipperff349102010-07-09 01:17:16 +00001380 { /* 405EX Rev. A/B with Security */
1381 .pvr_mask = 0xffff000f,
1382 .pvr_value = 0x12910007,
1383 .cpu_name = "405EX Rev. A/B",
Stefan Roese5d8476c2007-10-11 22:08:14 +10001384 .cpu_features = CPU_FTRS_40X,
1385 .cpu_user_features = PPC_FEATURE_32 |
1386 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001387 .mmu_features = MMU_FTR_TYPE_40x,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001388 .icache_bsize = 32,
1389 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001390 .machine_check = machine_check_4xx,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001391 .platform = "ppc405",
1392 },
Lee Nipperff349102010-07-09 01:17:16 +00001393 { /* 405EX Rev. C without Security */
1394 .pvr_mask = 0xffff000f,
1395 .pvr_value = 0x1291000d,
1396 .cpu_name = "405EX Rev. C",
1397 .cpu_features = CPU_FTRS_40X,
1398 .cpu_user_features = PPC_FEATURE_32 |
1399 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1400 .mmu_features = MMU_FTR_TYPE_40x,
1401 .icache_bsize = 32,
1402 .dcache_bsize = 32,
1403 .machine_check = machine_check_4xx,
1404 .platform = "ppc405",
1405 },
1406 { /* 405EX Rev. C with Security */
1407 .pvr_mask = 0xffff000f,
1408 .pvr_value = 0x1291000f,
1409 .cpu_name = "405EX Rev. C",
1410 .cpu_features = CPU_FTRS_40X,
1411 .cpu_user_features = PPC_FEATURE_32 |
1412 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1413 .mmu_features = MMU_FTR_TYPE_40x,
1414 .icache_bsize = 32,
1415 .dcache_bsize = 32,
1416 .machine_check = machine_check_4xx,
1417 .platform = "ppc405",
1418 },
1419 { /* 405EX Rev. D without Security */
1420 .pvr_mask = 0xffff000f,
1421 .pvr_value = 0x12910003,
1422 .cpu_name = "405EX Rev. D",
1423 .cpu_features = CPU_FTRS_40X,
1424 .cpu_user_features = PPC_FEATURE_32 |
1425 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1426 .mmu_features = MMU_FTR_TYPE_40x,
1427 .icache_bsize = 32,
1428 .dcache_bsize = 32,
1429 .machine_check = machine_check_4xx,
1430 .platform = "ppc405",
1431 },
1432 { /* 405EX Rev. D with Security */
1433 .pvr_mask = 0xffff000f,
1434 .pvr_value = 0x12910005,
1435 .cpu_name = "405EX Rev. D",
1436 .cpu_features = CPU_FTRS_40X,
1437 .cpu_user_features = PPC_FEATURE_32 |
1438 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1439 .mmu_features = MMU_FTR_TYPE_40x,
1440 .icache_bsize = 32,
1441 .dcache_bsize = 32,
1442 .machine_check = machine_check_4xx,
1443 .platform = "ppc405",
1444 },
1445 { /* 405EXr Rev. A/B without Security */
1446 .pvr_mask = 0xffff000f,
1447 .pvr_value = 0x12910001,
1448 .cpu_name = "405EXr Rev. A/B",
1449 .cpu_features = CPU_FTRS_40X,
1450 .cpu_user_features = PPC_FEATURE_32 |
1451 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1452 .mmu_features = MMU_FTR_TYPE_40x,
1453 .icache_bsize = 32,
1454 .dcache_bsize = 32,
1455 .machine_check = machine_check_4xx,
1456 .platform = "ppc405",
1457 },
1458 { /* 405EXr Rev. C without Security */
1459 .pvr_mask = 0xffff000f,
1460 .pvr_value = 0x12910009,
1461 .cpu_name = "405EXr Rev. C",
1462 .cpu_features = CPU_FTRS_40X,
1463 .cpu_user_features = PPC_FEATURE_32 |
1464 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1465 .mmu_features = MMU_FTR_TYPE_40x,
1466 .icache_bsize = 32,
1467 .dcache_bsize = 32,
1468 .machine_check = machine_check_4xx,
1469 .platform = "ppc405",
1470 },
1471 { /* 405EXr Rev. C with Security */
1472 .pvr_mask = 0xffff000f,
1473 .pvr_value = 0x1291000b,
1474 .cpu_name = "405EXr Rev. C",
1475 .cpu_features = CPU_FTRS_40X,
1476 .cpu_user_features = PPC_FEATURE_32 |
1477 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1478 .mmu_features = MMU_FTR_TYPE_40x,
1479 .icache_bsize = 32,
1480 .dcache_bsize = 32,
1481 .machine_check = machine_check_4xx,
1482 .platform = "ppc405",
1483 },
1484 { /* 405EXr Rev. D without Security */
1485 .pvr_mask = 0xffff000f,
Stefan Roeseb676d842008-01-15 18:09:15 +11001486 .pvr_value = 0x12910000,
Lee Nipperff349102010-07-09 01:17:16 +00001487 .cpu_name = "405EXr Rev. D",
1488 .cpu_features = CPU_FTRS_40X,
1489 .cpu_user_features = PPC_FEATURE_32 |
1490 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1491 .mmu_features = MMU_FTR_TYPE_40x,
1492 .icache_bsize = 32,
1493 .dcache_bsize = 32,
1494 .machine_check = machine_check_4xx,
1495 .platform = "ppc405",
1496 },
1497 { /* 405EXr Rev. D with Security */
1498 .pvr_mask = 0xffff000f,
1499 .pvr_value = 0x12910002,
1500 .cpu_name = "405EXr Rev. D",
Stefan Roeseb676d842008-01-15 18:09:15 +11001501 .cpu_features = CPU_FTRS_40X,
1502 .cpu_user_features = PPC_FEATURE_32 |
1503 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001504 .mmu_features = MMU_FTR_TYPE_40x,
Stefan Roeseb676d842008-01-15 18:09:15 +11001505 .icache_bsize = 32,
1506 .dcache_bsize = 32,
1507 .machine_check = machine_check_4xx,
1508 .platform = "ppc405",
1509 },
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001510 {
1511 /* 405EZ */
1512 .pvr_mask = 0xffff0000,
1513 .pvr_value = 0x41510000,
1514 .cpu_name = "405EZ",
1515 .cpu_features = CPU_FTRS_40X,
1516 .cpu_user_features = PPC_FEATURE_32 |
1517 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001518 .mmu_features = MMU_FTR_TYPE_40x,
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001519 .icache_bsize = 32,
1520 .dcache_bsize = 32,
1521 .machine_check = machine_check_4xx,
1522 .platform = "ppc405",
1523 },
Tanmay Inamdard5b9ee72011-11-28 21:01:41 +00001524 { /* APM8018X */
1525 .pvr_mask = 0xffff0000,
1526 .pvr_value = 0x7ff11432,
1527 .cpu_name = "APM8018X",
1528 .cpu_features = CPU_FTRS_40X,
1529 .cpu_user_features = PPC_FEATURE_32 |
1530 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1531 .mmu_features = MMU_FTR_TYPE_40x,
1532 .icache_bsize = 32,
1533 .dcache_bsize = 32,
1534 .machine_check = machine_check_4xx,
1535 .platform = "ppc405",
1536 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001537 { /* default match */
1538 .pvr_mask = 0x00000000,
1539 .pvr_value = 0x00000000,
1540 .cpu_name = "(generic 40x PPC)",
1541 .cpu_features = CPU_FTRS_40X,
1542 .cpu_user_features = PPC_FEATURE_32 |
1543 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001544 .mmu_features = MMU_FTR_TYPE_40x,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001545 .icache_bsize = 32,
1546 .dcache_bsize = 32,
1547 .machine_check = machine_check_4xx,
1548 .platform = "ppc405",
1549 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001550
1551#endif /* CONFIG_40x */
1552#ifdef CONFIG_44x
Matt Porterc9cf73a2005-07-31 22:34:52 -07001553 {
1554 .pvr_mask = 0xf0000fff,
1555 .pvr_value = 0x40000850,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001556 .cpu_name = "440GR Rev. A",
1557 .cpu_features = CPU_FTRS_44X,
1558 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001559 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001560 .icache_bsize = 32,
1561 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001562 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001563 .platform = "ppc440",
1564 },
1565 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1566 .pvr_mask = 0xf0000fff,
1567 .pvr_value = 0x40000858,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001568 .cpu_name = "440EP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001569 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001570 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001571 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001572 .icache_bsize = 32,
1573 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001574 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001575 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001576 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001577 },
1578 {
1579 .pvr_mask = 0xf0000fff,
1580 .pvr_value = 0x400008d3,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001581 .cpu_name = "440GR Rev. B",
1582 .cpu_features = CPU_FTRS_44X,
1583 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001584 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001585 .icache_bsize = 32,
1586 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001587 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001588 .platform = "ppc440",
1589 },
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001590 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1591 .pvr_mask = 0xf0000ff7,
1592 .pvr_value = 0x400008d4,
1593 .cpu_name = "440EP Rev. C",
1594 .cpu_features = CPU_FTRS_44X,
1595 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001596 .mmu_features = MMU_FTR_TYPE_44x,
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001597 .icache_bsize = 32,
1598 .dcache_bsize = 32,
1599 .cpu_setup = __setup_cpu_440ep,
1600 .machine_check = machine_check_4xx,
1601 .platform = "ppc440",
1602 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001603 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1604 .pvr_mask = 0xf0000fff,
1605 .pvr_value = 0x400008db,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001606 .cpu_name = "440EP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001607 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001608 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001609 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001610 .icache_bsize = 32,
1611 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001612 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001613 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001614 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001615 },
Valentine Barshak15fc9932007-08-29 17:40:30 +04001616 { /* 440GRX */
1617 .pvr_mask = 0xf0000ffb,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001618 .pvr_value = 0x200008D0,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001619 .cpu_name = "440GRX",
1620 .cpu_features = CPU_FTRS_44X,
1621 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001622 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001623 .icache_bsize = 32,
1624 .dcache_bsize = 32,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001625 .cpu_setup = __setup_cpu_440grx,
Valentine Barshakb2be3b12007-12-22 03:22:23 +11001626 .machine_check = machine_check_440A,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001627 .platform = "ppc440",
Valentine Barshak15fc9932007-08-29 17:40:30 +04001628 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001629 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1630 .pvr_mask = 0xf0000ffb,
1631 .pvr_value = 0x200008D8,
1632 .cpu_name = "440EPX",
1633 .cpu_features = CPU_FTRS_44X,
1634 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001635 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001636 .icache_bsize = 32,
1637 .dcache_bsize = 32,
1638 .cpu_setup = __setup_cpu_440epx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001639 .machine_check = machine_check_440A,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001640 .platform = "ppc440",
1641 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001642 { /* 440GP Rev. B */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001643 .pvr_mask = 0xf0000fff,
1644 .pvr_value = 0x40000440,
1645 .cpu_name = "440GP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001646 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001647 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001648 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001649 .icache_bsize = 32,
1650 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001651 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001652 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001653 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001654 { /* 440GP Rev. C */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001655 .pvr_mask = 0xf0000fff,
1656 .pvr_value = 0x40000481,
1657 .cpu_name = "440GP Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001658 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001659 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001660 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001661 .icache_bsize = 32,
1662 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001663 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001664 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001665 },
1666 { /* 440GX Rev. A */
1667 .pvr_mask = 0xf0000fff,
1668 .pvr_value = 0x50000850,
1669 .cpu_name = "440GX Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001670 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001671 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001672 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001673 .icache_bsize = 32,
1674 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001675 .cpu_setup = __setup_cpu_440gx,
1676 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001677 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001678 },
1679 { /* 440GX Rev. B */
1680 .pvr_mask = 0xf0000fff,
1681 .pvr_value = 0x50000851,
1682 .cpu_name = "440GX Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001683 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001684 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001685 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001686 .icache_bsize = 32,
1687 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001688 .cpu_setup = __setup_cpu_440gx,
1689 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001690 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001691 },
1692 { /* 440GX Rev. C */
1693 .pvr_mask = 0xf0000fff,
1694 .pvr_value = 0x50000892,
1695 .cpu_name = "440GX Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001696 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001697 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001698 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001699 .icache_bsize = 32,
1700 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001701 .cpu_setup = __setup_cpu_440gx,
1702 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001703 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001704 },
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001705 { /* 440GX Rev. F */
1706 .pvr_mask = 0xf0000fff,
1707 .pvr_value = 0x50000894,
1708 .cpu_name = "440GX Rev. F",
Kumar Gala10b35d92005-09-23 14:08:58 -05001709 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001710 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001711 .mmu_features = MMU_FTR_TYPE_44x,
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001712 .icache_bsize = 32,
1713 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001714 .cpu_setup = __setup_cpu_440gx,
1715 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001716 .platform = "ppc440",
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001717 },
Matt Porter656de7e2005-09-03 15:55:42 -07001718 { /* 440SP Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001719 .pvr_mask = 0xfff00fff,
1720 .pvr_value = 0x53200891,
Matt Porter656de7e2005-09-03 15:55:42 -07001721 .cpu_name = "440SP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001722 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001723 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001724 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porter656de7e2005-09-03 15:55:42 -07001725 .icache_bsize = 32,
1726 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001727 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001728 .platform = "ppc440",
Matt Porter656de7e2005-09-03 15:55:42 -07001729 },
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001730 { /* 440SPe Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001731 .pvr_mask = 0xfff00fff,
1732 .pvr_value = 0x53400890,
1733 .cpu_name = "440SPe Rev. A",
1734 .cpu_features = CPU_FTRS_44X,
1735 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001736 .mmu_features = MMU_FTR_TYPE_44x,
Roland Dreier333e6152007-06-16 05:36:32 +10001737 .icache_bsize = 32,
1738 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001739 .cpu_setup = __setup_cpu_440spe,
1740 .machine_check = machine_check_440A,
Roland Dreier333e6152007-06-16 05:36:32 +10001741 .platform = "ppc440",
1742 },
1743 { /* 440SPe Rev. B */
1744 .pvr_mask = 0xfff00fff,
1745 .pvr_value = 0x53400891,
1746 .cpu_name = "440SPe Rev. B",
Kumar Galaa147c582006-12-08 02:34:38 -06001747 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001748 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001749 .mmu_features = MMU_FTR_TYPE_44x,
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001750 .icache_bsize = 32,
1751 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001752 .cpu_setup = __setup_cpu_440spe,
1753 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001754 .platform = "ppc440",
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001755 },
John Linn23e72372008-07-01 09:42:07 -07001756 { /* 440 in Xilinx Virtex-5 FXT */
1757 .pvr_mask = 0xfffffff0,
1758 .pvr_value = 0x7ff21910,
1759 .cpu_name = "440 in Virtex-5 FXT",
1760 .cpu_features = CPU_FTRS_44X,
1761 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001762 .mmu_features = MMU_FTR_TYPE_44x,
John Linn23e72372008-07-01 09:42:07 -07001763 .icache_bsize = 32,
1764 .dcache_bsize = 32,
Grant Likely640d17d2008-12-04 05:39:55 +00001765 .cpu_setup = __setup_cpu_440x5,
1766 .machine_check = machine_check_440A,
John Linn23e72372008-07-01 09:42:07 -07001767 .platform = "ppc440",
1768 },
Stefan Roese464076a2008-02-24 08:07:41 +11001769 { /* 460EX */
Stefan Roese20d70342009-07-29 07:04:46 +00001770 .pvr_mask = 0xffff0006,
Stefan Roese464076a2008-02-24 08:07:41 +11001771 .pvr_value = 0x13020002,
1772 .cpu_name = "460EX",
Benjamin Herrenschmidt6d2170b2008-12-18 19:13:22 +00001773 .cpu_features = CPU_FTRS_440x6,
Stefan Roese464076a2008-02-24 08:07:41 +11001774 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001775 .mmu_features = MMU_FTR_TYPE_44x,
Stefan Roese464076a2008-02-24 08:07:41 +11001776 .icache_bsize = 32,
1777 .dcache_bsize = 32,
1778 .cpu_setup = __setup_cpu_460ex,
1779 .machine_check = machine_check_440A,
1780 .platform = "ppc440",
1781 },
Stefan Roese20d70342009-07-29 07:04:46 +00001782 { /* 460EX Rev B */
1783 .pvr_mask = 0xffff0007,
1784 .pvr_value = 0x13020004,
1785 .cpu_name = "460EX Rev. B",
1786 .cpu_features = CPU_FTRS_440x6,
1787 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1788 .mmu_features = MMU_FTR_TYPE_44x,
1789 .icache_bsize = 32,
1790 .dcache_bsize = 32,
1791 .cpu_setup = __setup_cpu_460ex,
1792 .machine_check = machine_check_440A,
1793 .platform = "ppc440",
1794 },
Stefan Roese464076a2008-02-24 08:07:41 +11001795 { /* 460GT */
Stefan Roese20d70342009-07-29 07:04:46 +00001796 .pvr_mask = 0xffff0006,
Stefan Roese464076a2008-02-24 08:07:41 +11001797 .pvr_value = 0x13020000,
1798 .cpu_name = "460GT",
Benjamin Herrenschmidt6d2170b2008-12-18 19:13:22 +00001799 .cpu_features = CPU_FTRS_440x6,
Josh Boyer939e6222008-06-11 07:52:40 -04001800 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001801 .mmu_features = MMU_FTR_TYPE_44x,
Stefan Roese464076a2008-02-24 08:07:41 +11001802 .icache_bsize = 32,
1803 .dcache_bsize = 32,
Josh Boyer939e6222008-06-11 07:52:40 -04001804 .cpu_setup = __setup_cpu_460gt,
Stefan Roese464076a2008-02-24 08:07:41 +11001805 .machine_check = machine_check_440A,
1806 .platform = "ppc440",
1807 },
Stefan Roese20d70342009-07-29 07:04:46 +00001808 { /* 460GT Rev B */
1809 .pvr_mask = 0xffff0007,
1810 .pvr_value = 0x13020005,
1811 .cpu_name = "460GT Rev. B",
1812 .cpu_features = CPU_FTRS_440x6,
1813 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1814 .mmu_features = MMU_FTR_TYPE_44x,
1815 .icache_bsize = 32,
1816 .dcache_bsize = 32,
1817 .cpu_setup = __setup_cpu_460gt,
1818 .machine_check = machine_check_440A,
1819 .platform = "ppc440",
1820 },
Madhulika Madishetty6c712092009-02-05 13:31:36 +00001821 { /* 460SX */
1822 .pvr_mask = 0xffffff00,
1823 .pvr_value = 0x13541800,
1824 .cpu_name = "460SX",
1825 .cpu_features = CPU_FTRS_44X,
1826 .cpu_user_features = COMMON_USER_BOOKE,
1827 .mmu_features = MMU_FTR_TYPE_44x,
1828 .icache_bsize = 32,
1829 .dcache_bsize = 32,
1830 .cpu_setup = __setup_cpu_460sx,
1831 .machine_check = machine_check_440A,
1832 .platform = "ppc440",
1833 },
Tirumala Marri6edc3232010-09-13 13:26:11 +00001834 { /* 464 in APM821xx */
Vinh Nguyen Huu Tuong7c801162011-12-20 02:43:34 +00001835 .pvr_mask = 0xfffffff0,
Tirumala Marri6edc3232010-09-13 13:26:11 +00001836 .pvr_value = 0x12C41C80,
1837 .cpu_name = "APM821XX",
1838 .cpu_features = CPU_FTRS_44X,
1839 .cpu_user_features = COMMON_USER_BOOKE |
1840 PPC_FEATURE_HAS_FPU,
1841 .mmu_features = MMU_FTR_TYPE_44x,
1842 .icache_bsize = 32,
1843 .dcache_bsize = 32,
1844 .cpu_setup = __setup_cpu_apm821xx,
1845 .machine_check = machine_check_440A,
1846 .platform = "ppc440",
1847 },
Dave Kleikampc48d0db2011-01-26 06:17:58 +00001848 { /* 476 DD2 core */
1849 .pvr_mask = 0xffffffff,
1850 .pvr_value = 0x11a52080,
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001851 .cpu_name = "476",
Dave Kleikampc48d0db2011-01-26 06:17:58 +00001852 .cpu_features = CPU_FTRS_47X | CPU_FTR_476_DD2,
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001853 .cpu_user_features = COMMON_USER_BOOKE |
1854 PPC_FEATURE_HAS_FPU,
1855 .mmu_features = MMU_FTR_TYPE_47x |
1856 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1857 .icache_bsize = 32,
1858 .dcache_bsize = 128,
Dave Kleikampfc5e7092010-03-05 03:43:18 +00001859 .machine_check = machine_check_47x,
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001860 .platform = "ppc470",
1861 },
Tony Breedsdf777bd2011-11-30 21:39:23 +00001862 { /* 476fpe */
1863 .pvr_mask = 0xffff0000,
1864 .pvr_value = 0x7ff50000,
1865 .cpu_name = "476fpe",
1866 .cpu_features = CPU_FTRS_47X | CPU_FTR_476_DD2,
1867 .cpu_user_features = COMMON_USER_BOOKE |
1868 PPC_FEATURE_HAS_FPU,
1869 .mmu_features = MMU_FTR_TYPE_47x |
1870 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1871 .icache_bsize = 32,
1872 .dcache_bsize = 128,
1873 .machine_check = machine_check_47x,
1874 .platform = "ppc470",
1875 },
Torez Smithb4e8c8d2010-03-05 10:45:54 +00001876 { /* 476 iss */
1877 .pvr_mask = 0xffff0000,
1878 .pvr_value = 0x00050000,
1879 .cpu_name = "476",
1880 .cpu_features = CPU_FTRS_47X,
1881 .cpu_user_features = COMMON_USER_BOOKE |
1882 PPC_FEATURE_HAS_FPU,
Torez Smithb4e8c8d2010-03-05 10:45:54 +00001883 .mmu_features = MMU_FTR_TYPE_47x |
1884 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1885 .icache_bsize = 32,
1886 .dcache_bsize = 128,
1887 .machine_check = machine_check_47x,
1888 .platform = "ppc470",
1889 },
Dave Kleikampc48d0db2011-01-26 06:17:58 +00001890 { /* 476 others */
1891 .pvr_mask = 0xffff0000,
1892 .pvr_value = 0x11a50000,
1893 .cpu_name = "476",
1894 .cpu_features = CPU_FTRS_47X,
1895 .cpu_user_features = COMMON_USER_BOOKE |
1896 PPC_FEATURE_HAS_FPU,
1897 .mmu_features = MMU_FTR_TYPE_47x |
1898 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1899 .icache_bsize = 32,
1900 .dcache_bsize = 128,
1901 .machine_check = machine_check_47x,
1902 .platform = "ppc470",
1903 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001904 { /* default match */
1905 .pvr_mask = 0x00000000,
1906 .pvr_value = 0x00000000,
1907 .cpu_name = "(generic 44x PPC)",
1908 .cpu_features = CPU_FTRS_44X,
1909 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001910 .mmu_features = MMU_FTR_TYPE_44x,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001911 .icache_bsize = 32,
1912 .dcache_bsize = 32,
1913 .machine_check = machine_check_4xx,
1914 .platform = "ppc440",
1915 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001916#endif /* CONFIG_44x */
Josh Boyere3e414b2007-12-24 08:44:47 -06001917#ifdef CONFIG_E200
Stephen Rothwell49209602005-10-12 15:55:09 +10001918 { /* e200z5 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001919 .pvr_mask = 0xfff00000,
1920 .pvr_value = 0x81000000,
1921 .cpu_name = "e200z5",
1922 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001923 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001924 .cpu_user_features = COMMON_USER_BOOKE |
1925 PPC_FEATURE_HAS_EFP_SINGLE |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001926 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001927 .mmu_features = MMU_FTR_TYPE_FSL_E,
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001928 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001929 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001930 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001931 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001932 { /* e200z6 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001933 .pvr_mask = 0xfff00000,
1934 .pvr_value = 0x81100000,
1935 .cpu_name = "e200z6",
1936 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001937 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001938 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001939 PPC_FEATURE_HAS_SPE_COMP |
1940 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001941 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001942 .mmu_features = MMU_FTR_TYPE_FSL_E,
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001943 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001944 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001945 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001946 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001947 { /* default match */
1948 .pvr_mask = 0x00000000,
1949 .pvr_value = 0x00000000,
1950 .cpu_name = "(generic E200 PPC)",
1951 .cpu_features = CPU_FTRS_E200,
1952 .cpu_user_features = COMMON_USER_BOOKE |
1953 PPC_FEATURE_HAS_EFP_SINGLE |
1954 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001955 .mmu_features = MMU_FTR_TYPE_FSL_E,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001956 .dcache_bsize = 32,
Kumar Gala105c31d2009-01-08 08:31:20 -06001957 .cpu_setup = __setup_cpu_e200,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001958 .machine_check = machine_check_e200,
1959 .platform = "ppc5554",
Paul Mackerras516c8be2008-05-12 14:20:35 +10001960 }
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001961#endif /* CONFIG_E200 */
Kumar Gala4490c062010-10-08 08:32:11 -05001962#endif /* CONFIG_PPC32 */
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001963#ifdef CONFIG_E500
Kumar Gala4490c062010-10-08 08:32:11 -05001964#ifdef CONFIG_PPC32
Mihai Caraman3477e712014-08-20 16:09:03 +03001965#ifndef CONFIG_PPC_E500MC
Stephen Rothwell49209602005-10-12 15:55:09 +10001966 { /* e500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001967 .pvr_mask = 0xffff0000,
1968 .pvr_value = 0x80200000,
1969 .cpu_name = "e500",
Kumar Gala10b35d92005-09-23 14:08:58 -05001970 .cpu_features = CPU_FTRS_E500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001971 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001972 PPC_FEATURE_HAS_SPE_COMP |
1973 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Nishanth Aravamudan6c1bf482013-05-04 16:01:17 +00001974 .cpu_user_features2 = PPC_FEATURE2_ISEL,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001975 .mmu_features = MMU_FTR_TYPE_FSL_E,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001976 .icache_bsize = 32,
1977 .dcache_bsize = 32,
1978 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001979 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001980 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06001981 .cpu_setup = __setup_cpu_e500v1,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001982 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001983 .platform = "ppc8540",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001984 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001985 { /* e500v2 */
Kumar Gala5b37b702005-06-21 17:15:18 -07001986 .pvr_mask = 0xffff0000,
1987 .pvr_value = 0x80210000,
1988 .cpu_name = "e500v2",
Kumar Gala10b35d92005-09-23 14:08:58 -05001989 .cpu_features = CPU_FTRS_E500_2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001990 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001991 PPC_FEATURE_HAS_SPE_COMP |
1992 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1993 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
Nishanth Aravamudan6c1bf482013-05-04 16:01:17 +00001994 .cpu_user_features2 = PPC_FEATURE2_ISEL,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001995 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS,
Kumar Gala5b37b702005-06-21 17:15:18 -07001996 .icache_bsize = 32,
1997 .dcache_bsize = 32,
1998 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001999 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06002000 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06002001 .cpu_setup = __setup_cpu_e500v2,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11002002 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002003 .platform = "ppc8548",
Kumar Gala5b37b702005-06-21 17:15:18 -07002004 },
Mihai Caraman3477e712014-08-20 16:09:03 +03002005#else
Kumar Gala3dfa8772008-06-16 09:41:32 -05002006 { /* e500mc */
2007 .pvr_mask = 0xffff0000,
2008 .pvr_value = 0x80230000,
2009 .cpu_name = "e500mc",
Kumar Gala3dfa8772008-06-16 09:41:32 -05002010 .cpu_features = CPU_FTRS_E500MC,
2011 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Nishanth Aravamudan6c1bf482013-05-04 16:01:17 +00002012 .cpu_user_features2 = PPC_FEATURE2_ISEL,
Kumar Galac3071952009-02-10 22:26:06 -06002013 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
Kumar Gala323d23a2009-04-23 08:51:22 -05002014 MMU_FTR_USE_TLBILX,
Kumar Gala3dfa8772008-06-16 09:41:32 -05002015 .icache_bsize = 64,
2016 .dcache_bsize = 64,
2017 .num_pmcs = 4,
Scott Wooda11106542010-02-25 18:09:45 -06002018 .oprofile_cpu_type = "ppc/e500mc",
Kumar Gala3dfa8772008-06-16 09:41:32 -05002019 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06002020 .cpu_setup = __setup_cpu_e500mc,
Scott Woodfe04b112010-04-08 00:38:22 -05002021 .machine_check = machine_check_e500mc,
Kumar Gala3dfa8772008-06-16 09:41:32 -05002022 .platform = "ppce500mc",
2023 },
Mihai Caraman3477e712014-08-20 16:09:03 +03002024#endif /* CONFIG_PPC_E500MC */
Kumar Gala4490c062010-10-08 08:32:11 -05002025#endif /* CONFIG_PPC32 */
Mihai Caraman3477e712014-08-20 16:09:03 +03002026#ifdef CONFIG_PPC_E500MC
Kumar Gala4490c062010-10-08 08:32:11 -05002027 { /* e5500 */
2028 .pvr_mask = 0xffff0000,
2029 .pvr_value = 0x80240000,
2030 .cpu_name = "e5500",
Kumar Gala11ed0db2011-04-06 00:11:06 -05002031 .cpu_features = CPU_FTRS_E5500,
Kumar Galafb9be232011-06-02 11:26:13 -05002032 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Nishanth Aravamudan6c1bf482013-05-04 16:01:17 +00002033 .cpu_user_features2 = PPC_FEATURE2_ISEL,
Kumar Gala4490c062010-10-08 08:32:11 -05002034 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
2035 MMU_FTR_USE_TLBILX,
2036 .icache_bsize = 64,
2037 .dcache_bsize = 64,
2038 .num_pmcs = 4,
2039 .oprofile_cpu_type = "ppc/e500mc",
2040 .oprofile_type = PPC_OPROFILE_FSL_EMB,
2041 .cpu_setup = __setup_cpu_e5500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05302042#ifndef CONFIG_PPC32
Kumar Gala4490c062010-10-08 08:32:11 -05002043 .cpu_restore = __restore_cpu_e5500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05302044#endif
Kumar Gala4490c062010-10-08 08:32:11 -05002045 .machine_check = machine_check_e500mc,
2046 .platform = "ppce5500",
2047 },
Kumar Gala10241842011-11-06 11:51:07 -06002048 { /* e6500 */
2049 .pvr_mask = 0xffff0000,
2050 .pvr_value = 0x80400000,
2051 .cpu_name = "e6500",
2052 .cpu_features = CPU_FTRS_E6500,
Kumar Galacd66cc22012-09-07 15:57:17 -05002053 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU |
2054 PPC_FEATURE_HAS_ALTIVEC_COMP,
Nishanth Aravamudan6c1bf482013-05-04 16:01:17 +00002055 .cpu_user_features2 = PPC_FEATURE2_ISEL,
Kumar Gala10241842011-11-06 11:51:07 -06002056 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
2057 MMU_FTR_USE_TLBILX,
2058 .icache_bsize = 64,
2059 .dcache_bsize = 64,
Lijun Pan5815c432013-06-05 15:22:09 -05002060 .num_pmcs = 6,
Kumar Gala10241842011-11-06 11:51:07 -06002061 .oprofile_cpu_type = "ppc/e6500",
2062 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Galacd66cc22012-09-07 15:57:17 -05002063 .cpu_setup = __setup_cpu_e6500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05302064#ifndef CONFIG_PPC32
Kumar Galacd66cc22012-09-07 15:57:17 -05002065 .cpu_restore = __restore_cpu_e6500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05302066#endif
Kumar Gala10241842011-11-06 11:51:07 -06002067 .machine_check = machine_check_e500mc,
2068 .platform = "ppce6500",
2069 },
Mihai Caraman3477e712014-08-20 16:09:03 +03002070#endif /* CONFIG_PPC_E500MC */
Kumar Gala4490c062010-10-08 08:32:11 -05002071#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -07002072 { /* default match */
2073 .pvr_mask = 0x00000000,
2074 .pvr_value = 0x00000000,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002075 .cpu_name = "(generic E500 PPC)",
2076 .cpu_features = CPU_FTRS_E500,
2077 .cpu_user_features = COMMON_USER_BOOKE |
2078 PPC_FEATURE_HAS_SPE_COMP |
2079 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00002080 .mmu_features = MMU_FTR_TYPE_FSL_E,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002081 .icache_bsize = 32,
2082 .dcache_bsize = 32,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002083 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002084 .platform = "powerpc",
Paul Mackerras516c8be2008-05-12 14:20:35 +10002085 }
Stephen Rothwell49209602005-10-12 15:55:09 +10002086#endif /* CONFIG_PPC32 */
Kumar Gala4490c062010-10-08 08:32:11 -05002087#endif /* CONFIG_E500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002088};
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002089
Paul Mackerras87a72f92007-10-04 14:18:01 +10002090static struct cpu_spec the_cpu_spec;
2091
Scott Wood26ee9762011-07-25 11:04:36 +00002092static struct cpu_spec * __init setup_cpu_spec(unsigned long offset,
2093 struct cpu_spec *s)
Michael Ellerman666435b2009-02-22 16:25:43 +00002094{
2095 struct cpu_spec *t = &the_cpu_spec;
Michael Ellerman2657dd42009-02-22 16:25:45 +00002096 struct cpu_spec old;
2097
Michael Ellerman666435b2009-02-22 16:25:43 +00002098 t = PTRRELOC(t);
Michael Ellerman2657dd42009-02-22 16:25:45 +00002099 old = *t;
2100
2101 /* Copy everything, then do fixups */
2102 *t = *s;
Michael Ellerman666435b2009-02-22 16:25:43 +00002103
2104 /*
2105 * If we are overriding a previous value derived from the real
2106 * PVR with a new value obtained using a logical PVR value,
2107 * don't modify the performance monitor fields.
2108 */
Michael Ellerman2657dd42009-02-22 16:25:45 +00002109 if (old.num_pmcs && !s->num_pmcs) {
2110 t->num_pmcs = old.num_pmcs;
2111 t->pmc_type = old.pmc_type;
2112 t->oprofile_type = old.oprofile_type;
2113 t->oprofile_mmcra_sihv = old.oprofile_mmcra_sihv;
2114 t->oprofile_mmcra_sipr = old.oprofile_mmcra_sipr;
2115 t->oprofile_mmcra_clear = old.oprofile_mmcra_clear;
2116
Michael Ellerman666435b2009-02-22 16:25:43 +00002117 /*
2118 * If we have passed through this logic once before and
2119 * have pulled the default case because the real PVR was
2120 * not found inside cpu_specs[], then we are possibly
2121 * running in compatibility mode. In that case, let the
2122 * oprofiler know which set of compatibility counters to
2123 * pull from by making sure the oprofile_cpu_type string
2124 * is set to that of compatibility mode. If the
2125 * oprofile_cpu_type already has a value, then we are
2126 * possibly overriding a real PVR with a logical one,
2127 * and, in that case, keep the current value for
2128 * oprofile_cpu_type.
2129 */
Benjamin Herrenschmidtb173f032009-05-14 18:34:06 +00002130 if (old.oprofile_cpu_type != NULL) {
Benjamin Herrenschmidt0203d6e2009-04-29 19:39:38 +00002131 t->oprofile_cpu_type = old.oprofile_cpu_type;
2132 t->oprofile_type = old.oprofile_type;
Michael Wolf79af6c42009-04-27 06:17:54 +00002133 }
Michael Ellerman2657dd42009-02-22 16:25:45 +00002134 }
Michael Ellerman666435b2009-02-22 16:25:43 +00002135
2136 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
2137
2138 /*
2139 * Set the base platform string once; assumes
2140 * we're called with real pvr first.
2141 */
2142 if (*PTRRELOC(&powerpc_base_platform) == NULL)
2143 *PTRRELOC(&powerpc_base_platform) = t->platform;
2144
2145#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
2146 /* ppc64 and booke expect identify_cpu to also call setup_cpu for
2147 * that processor. I will consolidate that at a later time, for now,
2148 * just use #ifdef. We also don't need to PTRRELOC the function
2149 * pointer on ppc64 and booke as we are running at 0 in real mode
2150 * on ppc64 and reloc_offset is always 0 on booke.
2151 */
Benjamin Herrenschmidtaf9eef32011-01-20 20:36:03 +00002152 if (t->cpu_setup) {
2153 t->cpu_setup(offset, t);
Michael Ellerman666435b2009-02-22 16:25:43 +00002154 }
2155#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
Scott Wood26ee9762011-07-25 11:04:36 +00002156
2157 return t;
Michael Ellerman666435b2009-02-22 16:25:43 +00002158}
2159
Paul Mackerras87a72f92007-10-04 14:18:01 +10002160struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002161{
2162 struct cpu_spec *s = cpu_specs;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002163 int i;
2164
2165 s = PTRRELOC(s);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002166
Michael Ellerman666435b2009-02-22 16:25:43 +00002167 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) {
Scott Wood26ee9762011-07-25 11:04:36 +00002168 if ((pvr & s->pvr_mask) == s->pvr_value)
2169 return setup_cpu_spec(offset, s);
Michael Ellerman666435b2009-02-22 16:25:43 +00002170 }
2171
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002172 BUG();
Michael Ellerman666435b2009-02-22 16:25:43 +00002173
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002174 return NULL;
2175}