blob: 8084059063365c95ae1f096c6bb2a92f2d50f78d [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 Salgaonkar04407052013-10-30 20:04:56 +053074extern void __flush_tlb_power7(unsigned long inval_selector);
75extern void __flush_tlb_power8(unsigned long inval_selector);
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,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001136 .num_pmcs = 4,
1137 .oprofile_cpu_type = "ppc/e300",
1138 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Scott Wood57933f82006-12-01 12:57:05 -06001139 .platform = "ppc603",
1140 },
Li Yanga58d5242007-10-19 19:38:42 +08001141 { /* e300c4 (e300c1, plus one IU) */
1142 .pvr_mask = 0x7fff0000,
1143 .pvr_value = 0x00860000,
1144 .cpu_name = "e300c4",
1145 .cpu_features = CPU_FTRS_E300,
1146 .cpu_user_features = COMMON_USER,
Kumar Gala2319f122009-03-19 03:55:41 +00001147 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1148 MMU_FTR_NEED_DTLB_SW_LRU,
Li Yanga58d5242007-10-19 19:38:42 +08001149 .icache_bsize = 32,
1150 .dcache_bsize = 32,
1151 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001152 .machine_check = machine_check_generic,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001153 .num_pmcs = 4,
1154 .oprofile_cpu_type = "ppc/e300",
1155 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Li Yanga58d5242007-10-19 19:38:42 +08001156 .platform = "ppc603",
1157 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001158 { /* default match, we assume split I/D cache & TB (non-601)... */
1159 .pvr_mask = 0x00000000,
1160 .pvr_value = 0x00000000,
1161 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -05001162 .cpu_features = CPU_FTRS_CLASSIC32,
Stephen Rothwell49209602005-10-12 15:55:09 +10001163 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001164 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001165 .icache_bsize = 32,
1166 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001167 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001168 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001169 },
Michael Ellerman1e07a0a2014-07-10 12:29:26 +10001170#endif /* CONFIG_PPC_BOOK3S_32 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001171#ifdef CONFIG_8xx
1172 { /* 8xx */
1173 .pvr_mask = 0xffff0000,
1174 .pvr_value = 0x00500000,
1175 .cpu_name = "8xx",
1176 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1177 * if the 8xx code is there.... */
Kumar Gala10b35d92005-09-23 14:08:58 -05001178 .cpu_features = CPU_FTRS_8XX,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001179 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001180 .mmu_features = MMU_FTR_TYPE_8xx,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001181 .icache_bsize = 16,
1182 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001183 .platform = "ppc823",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001184 },
1185#endif /* CONFIG_8xx */
1186#ifdef CONFIG_40x
1187 { /* 403GC */
1188 .pvr_mask = 0xffffff00,
1189 .pvr_value = 0x00200200,
1190 .cpu_name = "403GC",
Kumar Gala10b35d92005-09-23 14:08:58 -05001191 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001192 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001193 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001194 .icache_bsize = 16,
1195 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001196 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001197 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001198 },
1199 { /* 403GCX */
1200 .pvr_mask = 0xffffff00,
1201 .pvr_value = 0x00201400,
1202 .cpu_name = "403GCX",
Kumar Gala10b35d92005-09-23 14:08:58 -05001203 .cpu_features = CPU_FTRS_40X,
Paul Mackerras98599012005-10-22 16:51:34 +10001204 .cpu_user_features = PPC_FEATURE_32 |
1205 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001206 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001207 .icache_bsize = 16,
1208 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001209 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001210 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001211 },
1212 { /* 403G ?? */
1213 .pvr_mask = 0xffff0000,
1214 .pvr_value = 0x00200000,
1215 .cpu_name = "403G ??",
Kumar Gala10b35d92005-09-23 14:08:58 -05001216 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001217 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001218 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001219 .icache_bsize = 16,
1220 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001221 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001222 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001223 },
1224 { /* 405GP */
1225 .pvr_mask = 0xffff0000,
1226 .pvr_value = 0x40110000,
1227 .cpu_name = "405GP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001228 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001229 .cpu_user_features = PPC_FEATURE_32 |
1230 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001231 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001232 .icache_bsize = 32,
1233 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001234 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001235 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001236 },
1237 { /* STB 03xxx */
1238 .pvr_mask = 0xffff0000,
1239 .pvr_value = 0x40130000,
1240 .cpu_name = "STB03xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001241 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001242 .cpu_user_features = PPC_FEATURE_32 |
1243 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001244 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001245 .icache_bsize = 32,
1246 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001247 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001248 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001249 },
1250 { /* STB 04xxx */
1251 .pvr_mask = 0xffff0000,
1252 .pvr_value = 0x41810000,
1253 .cpu_name = "STB04xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001254 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001255 .cpu_user_features = PPC_FEATURE_32 |
1256 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001257 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001258 .icache_bsize = 32,
1259 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001260 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001261 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001262 },
1263 { /* NP405L */
1264 .pvr_mask = 0xffff0000,
1265 .pvr_value = 0x41610000,
1266 .cpu_name = "NP405L",
Kumar Gala10b35d92005-09-23 14:08:58 -05001267 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001268 .cpu_user_features = PPC_FEATURE_32 |
1269 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001270 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001271 .icache_bsize = 32,
1272 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001273 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001274 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001275 },
1276 { /* NP4GS3 */
1277 .pvr_mask = 0xffff0000,
1278 .pvr_value = 0x40B10000,
1279 .cpu_name = "NP4GS3",
Kumar Gala10b35d92005-09-23 14:08:58 -05001280 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001281 .cpu_user_features = PPC_FEATURE_32 |
1282 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001283 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001284 .icache_bsize = 32,
1285 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001286 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001287 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001288 },
1289 { /* NP405H */
1290 .pvr_mask = 0xffff0000,
1291 .pvr_value = 0x41410000,
1292 .cpu_name = "NP405H",
Kumar Gala10b35d92005-09-23 14:08:58 -05001293 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001294 .cpu_user_features = PPC_FEATURE_32 |
1295 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001296 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001297 .icache_bsize = 32,
1298 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001299 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001300 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001301 },
1302 { /* 405GPr */
1303 .pvr_mask = 0xffff0000,
1304 .pvr_value = 0x50910000,
1305 .cpu_name = "405GPr",
Kumar Gala10b35d92005-09-23 14:08:58 -05001306 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001307 .cpu_user_features = PPC_FEATURE_32 |
1308 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001309 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001310 .icache_bsize = 32,
1311 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001312 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001313 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001314 },
1315 { /* STBx25xx */
1316 .pvr_mask = 0xffff0000,
1317 .pvr_value = 0x51510000,
1318 .cpu_name = "STBx25xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001319 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001320 .cpu_user_features = PPC_FEATURE_32 |
1321 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001322 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001323 .icache_bsize = 32,
1324 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001325 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001326 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001327 },
1328 { /* 405LP */
1329 .pvr_mask = 0xffff0000,
1330 .pvr_value = 0x41F10000,
1331 .cpu_name = "405LP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001332 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001333 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001334 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001335 .icache_bsize = 32,
1336 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001337 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001338 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001339 },
1340 { /* Xilinx Virtex-II Pro */
Grant C. Likely72646c72006-01-19 01:13:20 -07001341 .pvr_mask = 0xfffff000,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001342 .pvr_value = 0x20010000,
1343 .cpu_name = "Virtex-II Pro",
Kumar Gala10b35d92005-09-23 14:08:58 -05001344 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001345 .cpu_user_features = PPC_FEATURE_32 |
1346 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001347 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001348 .icache_bsize = 32,
1349 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001350 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001351 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001352 },
Grant C. Likely72646c72006-01-19 01:13:20 -07001353 { /* Xilinx Virtex-4 FX */
1354 .pvr_mask = 0xfffff000,
1355 .pvr_value = 0x20011000,
1356 .cpu_name = "Virtex-4 FX",
1357 .cpu_features = CPU_FTRS_40X,
1358 .cpu_user_features = PPC_FEATURE_32 |
1359 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001360 .mmu_features = MMU_FTR_TYPE_40x,
Grant C. Likely72646c72006-01-19 01:13:20 -07001361 .icache_bsize = 32,
1362 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001363 .machine_check = machine_check_4xx,
Peter Bergner838fdb42006-09-14 14:18:38 -05001364 .platform = "ppc405",
Grant C. Likely72646c72006-01-19 01:13:20 -07001365 },
Eugene Suroveginad95d602005-06-07 13:22:09 -07001366 { /* 405EP */
1367 .pvr_mask = 0xffff0000,
1368 .pvr_value = 0x51210000,
1369 .cpu_name = "405EP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001370 .cpu_features = CPU_FTRS_40X,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001371 .cpu_user_features = PPC_FEATURE_32 |
1372 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001373 .mmu_features = MMU_FTR_TYPE_40x,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001374 .icache_bsize = 32,
1375 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001376 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001377 .platform = "ppc405",
Eugene Suroveginad95d602005-06-07 13:22:09 -07001378 },
Lee Nipperff349102010-07-09 01:17:16 +00001379 { /* 405EX Rev. A/B with Security */
1380 .pvr_mask = 0xffff000f,
1381 .pvr_value = 0x12910007,
1382 .cpu_name = "405EX Rev. A/B",
Stefan Roese5d8476c2007-10-11 22:08:14 +10001383 .cpu_features = CPU_FTRS_40X,
1384 .cpu_user_features = PPC_FEATURE_32 |
1385 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001386 .mmu_features = MMU_FTR_TYPE_40x,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001387 .icache_bsize = 32,
1388 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001389 .machine_check = machine_check_4xx,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001390 .platform = "ppc405",
1391 },
Lee Nipperff349102010-07-09 01:17:16 +00001392 { /* 405EX Rev. C without Security */
1393 .pvr_mask = 0xffff000f,
1394 .pvr_value = 0x1291000d,
1395 .cpu_name = "405EX Rev. C",
1396 .cpu_features = CPU_FTRS_40X,
1397 .cpu_user_features = PPC_FEATURE_32 |
1398 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1399 .mmu_features = MMU_FTR_TYPE_40x,
1400 .icache_bsize = 32,
1401 .dcache_bsize = 32,
1402 .machine_check = machine_check_4xx,
1403 .platform = "ppc405",
1404 },
1405 { /* 405EX Rev. C with Security */
1406 .pvr_mask = 0xffff000f,
1407 .pvr_value = 0x1291000f,
1408 .cpu_name = "405EX Rev. C",
1409 .cpu_features = CPU_FTRS_40X,
1410 .cpu_user_features = PPC_FEATURE_32 |
1411 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1412 .mmu_features = MMU_FTR_TYPE_40x,
1413 .icache_bsize = 32,
1414 .dcache_bsize = 32,
1415 .machine_check = machine_check_4xx,
1416 .platform = "ppc405",
1417 },
1418 { /* 405EX Rev. D without Security */
1419 .pvr_mask = 0xffff000f,
1420 .pvr_value = 0x12910003,
1421 .cpu_name = "405EX Rev. D",
1422 .cpu_features = CPU_FTRS_40X,
1423 .cpu_user_features = PPC_FEATURE_32 |
1424 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1425 .mmu_features = MMU_FTR_TYPE_40x,
1426 .icache_bsize = 32,
1427 .dcache_bsize = 32,
1428 .machine_check = machine_check_4xx,
1429 .platform = "ppc405",
1430 },
1431 { /* 405EX Rev. D with Security */
1432 .pvr_mask = 0xffff000f,
1433 .pvr_value = 0x12910005,
1434 .cpu_name = "405EX Rev. D",
1435 .cpu_features = CPU_FTRS_40X,
1436 .cpu_user_features = PPC_FEATURE_32 |
1437 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1438 .mmu_features = MMU_FTR_TYPE_40x,
1439 .icache_bsize = 32,
1440 .dcache_bsize = 32,
1441 .machine_check = machine_check_4xx,
1442 .platform = "ppc405",
1443 },
1444 { /* 405EXr Rev. A/B without Security */
1445 .pvr_mask = 0xffff000f,
1446 .pvr_value = 0x12910001,
1447 .cpu_name = "405EXr Rev. A/B",
1448 .cpu_features = CPU_FTRS_40X,
1449 .cpu_user_features = PPC_FEATURE_32 |
1450 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1451 .mmu_features = MMU_FTR_TYPE_40x,
1452 .icache_bsize = 32,
1453 .dcache_bsize = 32,
1454 .machine_check = machine_check_4xx,
1455 .platform = "ppc405",
1456 },
1457 { /* 405EXr Rev. C without Security */
1458 .pvr_mask = 0xffff000f,
1459 .pvr_value = 0x12910009,
1460 .cpu_name = "405EXr Rev. C",
1461 .cpu_features = CPU_FTRS_40X,
1462 .cpu_user_features = PPC_FEATURE_32 |
1463 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1464 .mmu_features = MMU_FTR_TYPE_40x,
1465 .icache_bsize = 32,
1466 .dcache_bsize = 32,
1467 .machine_check = machine_check_4xx,
1468 .platform = "ppc405",
1469 },
1470 { /* 405EXr Rev. C with Security */
1471 .pvr_mask = 0xffff000f,
1472 .pvr_value = 0x1291000b,
1473 .cpu_name = "405EXr Rev. C",
1474 .cpu_features = CPU_FTRS_40X,
1475 .cpu_user_features = PPC_FEATURE_32 |
1476 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1477 .mmu_features = MMU_FTR_TYPE_40x,
1478 .icache_bsize = 32,
1479 .dcache_bsize = 32,
1480 .machine_check = machine_check_4xx,
1481 .platform = "ppc405",
1482 },
1483 { /* 405EXr Rev. D without Security */
1484 .pvr_mask = 0xffff000f,
Stefan Roeseb676d842008-01-15 18:09:15 +11001485 .pvr_value = 0x12910000,
Lee Nipperff349102010-07-09 01:17:16 +00001486 .cpu_name = "405EXr Rev. D",
1487 .cpu_features = CPU_FTRS_40X,
1488 .cpu_user_features = PPC_FEATURE_32 |
1489 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1490 .mmu_features = MMU_FTR_TYPE_40x,
1491 .icache_bsize = 32,
1492 .dcache_bsize = 32,
1493 .machine_check = machine_check_4xx,
1494 .platform = "ppc405",
1495 },
1496 { /* 405EXr Rev. D with Security */
1497 .pvr_mask = 0xffff000f,
1498 .pvr_value = 0x12910002,
1499 .cpu_name = "405EXr Rev. D",
Stefan Roeseb676d842008-01-15 18:09:15 +11001500 .cpu_features = CPU_FTRS_40X,
1501 .cpu_user_features = PPC_FEATURE_32 |
1502 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001503 .mmu_features = MMU_FTR_TYPE_40x,
Stefan Roeseb676d842008-01-15 18:09:15 +11001504 .icache_bsize = 32,
1505 .dcache_bsize = 32,
1506 .machine_check = machine_check_4xx,
1507 .platform = "ppc405",
1508 },
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001509 {
1510 /* 405EZ */
1511 .pvr_mask = 0xffff0000,
1512 .pvr_value = 0x41510000,
1513 .cpu_name = "405EZ",
1514 .cpu_features = CPU_FTRS_40X,
1515 .cpu_user_features = PPC_FEATURE_32 |
1516 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001517 .mmu_features = MMU_FTR_TYPE_40x,
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001518 .icache_bsize = 32,
1519 .dcache_bsize = 32,
1520 .machine_check = machine_check_4xx,
1521 .platform = "ppc405",
1522 },
Tanmay Inamdard5b9ee72011-11-28 21:01:41 +00001523 { /* APM8018X */
1524 .pvr_mask = 0xffff0000,
1525 .pvr_value = 0x7ff11432,
1526 .cpu_name = "APM8018X",
1527 .cpu_features = CPU_FTRS_40X,
1528 .cpu_user_features = PPC_FEATURE_32 |
1529 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1530 .mmu_features = MMU_FTR_TYPE_40x,
1531 .icache_bsize = 32,
1532 .dcache_bsize = 32,
1533 .machine_check = machine_check_4xx,
1534 .platform = "ppc405",
1535 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001536 { /* default match */
1537 .pvr_mask = 0x00000000,
1538 .pvr_value = 0x00000000,
1539 .cpu_name = "(generic 40x PPC)",
1540 .cpu_features = CPU_FTRS_40X,
1541 .cpu_user_features = PPC_FEATURE_32 |
1542 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001543 .mmu_features = MMU_FTR_TYPE_40x,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001544 .icache_bsize = 32,
1545 .dcache_bsize = 32,
1546 .machine_check = machine_check_4xx,
1547 .platform = "ppc405",
1548 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001549
1550#endif /* CONFIG_40x */
1551#ifdef CONFIG_44x
Matt Porterc9cf73a2005-07-31 22:34:52 -07001552 {
1553 .pvr_mask = 0xf0000fff,
1554 .pvr_value = 0x40000850,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001555 .cpu_name = "440GR Rev. A",
1556 .cpu_features = CPU_FTRS_44X,
1557 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001558 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001559 .icache_bsize = 32,
1560 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001561 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001562 .platform = "ppc440",
1563 },
1564 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1565 .pvr_mask = 0xf0000fff,
1566 .pvr_value = 0x40000858,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001567 .cpu_name = "440EP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001568 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001569 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001570 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001571 .icache_bsize = 32,
1572 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001573 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001574 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001575 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001576 },
1577 {
1578 .pvr_mask = 0xf0000fff,
1579 .pvr_value = 0x400008d3,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001580 .cpu_name = "440GR Rev. B",
1581 .cpu_features = CPU_FTRS_44X,
1582 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001583 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001584 .icache_bsize = 32,
1585 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001586 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001587 .platform = "ppc440",
1588 },
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001589 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1590 .pvr_mask = 0xf0000ff7,
1591 .pvr_value = 0x400008d4,
1592 .cpu_name = "440EP Rev. C",
1593 .cpu_features = CPU_FTRS_44X,
1594 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001595 .mmu_features = MMU_FTR_TYPE_44x,
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001596 .icache_bsize = 32,
1597 .dcache_bsize = 32,
1598 .cpu_setup = __setup_cpu_440ep,
1599 .machine_check = machine_check_4xx,
1600 .platform = "ppc440",
1601 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001602 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1603 .pvr_mask = 0xf0000fff,
1604 .pvr_value = 0x400008db,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001605 .cpu_name = "440EP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001606 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001607 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001608 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001609 .icache_bsize = 32,
1610 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001611 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001612 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001613 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001614 },
Valentine Barshak15fc9932007-08-29 17:40:30 +04001615 { /* 440GRX */
1616 .pvr_mask = 0xf0000ffb,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001617 .pvr_value = 0x200008D0,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001618 .cpu_name = "440GRX",
1619 .cpu_features = CPU_FTRS_44X,
1620 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001621 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001622 .icache_bsize = 32,
1623 .dcache_bsize = 32,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001624 .cpu_setup = __setup_cpu_440grx,
Valentine Barshakb2be3b12007-12-22 03:22:23 +11001625 .machine_check = machine_check_440A,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001626 .platform = "ppc440",
Valentine Barshak15fc9932007-08-29 17:40:30 +04001627 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001628 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1629 .pvr_mask = 0xf0000ffb,
1630 .pvr_value = 0x200008D8,
1631 .cpu_name = "440EPX",
1632 .cpu_features = CPU_FTRS_44X,
1633 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001634 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001635 .icache_bsize = 32,
1636 .dcache_bsize = 32,
1637 .cpu_setup = __setup_cpu_440epx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001638 .machine_check = machine_check_440A,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001639 .platform = "ppc440",
1640 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001641 { /* 440GP Rev. B */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001642 .pvr_mask = 0xf0000fff,
1643 .pvr_value = 0x40000440,
1644 .cpu_name = "440GP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001645 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001646 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001647 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001648 .icache_bsize = 32,
1649 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001650 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001651 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001652 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001653 { /* 440GP Rev. C */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001654 .pvr_mask = 0xf0000fff,
1655 .pvr_value = 0x40000481,
1656 .cpu_name = "440GP Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001657 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001658 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001659 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001660 .icache_bsize = 32,
1661 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001662 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001663 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001664 },
1665 { /* 440GX Rev. A */
1666 .pvr_mask = 0xf0000fff,
1667 .pvr_value = 0x50000850,
1668 .cpu_name = "440GX Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001669 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001670 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001671 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001672 .icache_bsize = 32,
1673 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001674 .cpu_setup = __setup_cpu_440gx,
1675 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001676 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001677 },
1678 { /* 440GX Rev. B */
1679 .pvr_mask = 0xf0000fff,
1680 .pvr_value = 0x50000851,
1681 .cpu_name = "440GX Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001682 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001683 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001684 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001685 .icache_bsize = 32,
1686 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001687 .cpu_setup = __setup_cpu_440gx,
1688 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001689 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001690 },
1691 { /* 440GX Rev. C */
1692 .pvr_mask = 0xf0000fff,
1693 .pvr_value = 0x50000892,
1694 .cpu_name = "440GX Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001695 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001696 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001697 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001698 .icache_bsize = 32,
1699 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001700 .cpu_setup = __setup_cpu_440gx,
1701 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001702 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001703 },
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001704 { /* 440GX Rev. F */
1705 .pvr_mask = 0xf0000fff,
1706 .pvr_value = 0x50000894,
1707 .cpu_name = "440GX Rev. F",
Kumar Gala10b35d92005-09-23 14:08:58 -05001708 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001709 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001710 .mmu_features = MMU_FTR_TYPE_44x,
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001711 .icache_bsize = 32,
1712 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001713 .cpu_setup = __setup_cpu_440gx,
1714 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001715 .platform = "ppc440",
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001716 },
Matt Porter656de7e2005-09-03 15:55:42 -07001717 { /* 440SP Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001718 .pvr_mask = 0xfff00fff,
1719 .pvr_value = 0x53200891,
Matt Porter656de7e2005-09-03 15:55:42 -07001720 .cpu_name = "440SP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001721 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001722 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001723 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porter656de7e2005-09-03 15:55:42 -07001724 .icache_bsize = 32,
1725 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001726 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001727 .platform = "ppc440",
Matt Porter656de7e2005-09-03 15:55:42 -07001728 },
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001729 { /* 440SPe Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001730 .pvr_mask = 0xfff00fff,
1731 .pvr_value = 0x53400890,
1732 .cpu_name = "440SPe Rev. A",
1733 .cpu_features = CPU_FTRS_44X,
1734 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001735 .mmu_features = MMU_FTR_TYPE_44x,
Roland Dreier333e6152007-06-16 05:36:32 +10001736 .icache_bsize = 32,
1737 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001738 .cpu_setup = __setup_cpu_440spe,
1739 .machine_check = machine_check_440A,
Roland Dreier333e6152007-06-16 05:36:32 +10001740 .platform = "ppc440",
1741 },
1742 { /* 440SPe Rev. B */
1743 .pvr_mask = 0xfff00fff,
1744 .pvr_value = 0x53400891,
1745 .cpu_name = "440SPe Rev. B",
Kumar Galaa147c582006-12-08 02:34:38 -06001746 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001747 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001748 .mmu_features = MMU_FTR_TYPE_44x,
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001749 .icache_bsize = 32,
1750 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001751 .cpu_setup = __setup_cpu_440spe,
1752 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001753 .platform = "ppc440",
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001754 },
John Linn23e72372008-07-01 09:42:07 -07001755 { /* 440 in Xilinx Virtex-5 FXT */
1756 .pvr_mask = 0xfffffff0,
1757 .pvr_value = 0x7ff21910,
1758 .cpu_name = "440 in Virtex-5 FXT",
1759 .cpu_features = CPU_FTRS_44X,
1760 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001761 .mmu_features = MMU_FTR_TYPE_44x,
John Linn23e72372008-07-01 09:42:07 -07001762 .icache_bsize = 32,
1763 .dcache_bsize = 32,
Grant Likely640d17d2008-12-04 05:39:55 +00001764 .cpu_setup = __setup_cpu_440x5,
1765 .machine_check = machine_check_440A,
John Linn23e72372008-07-01 09:42:07 -07001766 .platform = "ppc440",
1767 },
Stefan Roese464076a2008-02-24 08:07:41 +11001768 { /* 460EX */
Stefan Roese20d70342009-07-29 07:04:46 +00001769 .pvr_mask = 0xffff0006,
Stefan Roese464076a2008-02-24 08:07:41 +11001770 .pvr_value = 0x13020002,
1771 .cpu_name = "460EX",
Benjamin Herrenschmidt6d2170b2008-12-18 19:13:22 +00001772 .cpu_features = CPU_FTRS_440x6,
Stefan Roese464076a2008-02-24 08:07:41 +11001773 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001774 .mmu_features = MMU_FTR_TYPE_44x,
Stefan Roese464076a2008-02-24 08:07:41 +11001775 .icache_bsize = 32,
1776 .dcache_bsize = 32,
1777 .cpu_setup = __setup_cpu_460ex,
1778 .machine_check = machine_check_440A,
1779 .platform = "ppc440",
1780 },
Stefan Roese20d70342009-07-29 07:04:46 +00001781 { /* 460EX Rev B */
1782 .pvr_mask = 0xffff0007,
1783 .pvr_value = 0x13020004,
1784 .cpu_name = "460EX Rev. B",
1785 .cpu_features = CPU_FTRS_440x6,
1786 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1787 .mmu_features = MMU_FTR_TYPE_44x,
1788 .icache_bsize = 32,
1789 .dcache_bsize = 32,
1790 .cpu_setup = __setup_cpu_460ex,
1791 .machine_check = machine_check_440A,
1792 .platform = "ppc440",
1793 },
Stefan Roese464076a2008-02-24 08:07:41 +11001794 { /* 460GT */
Stefan Roese20d70342009-07-29 07:04:46 +00001795 .pvr_mask = 0xffff0006,
Stefan Roese464076a2008-02-24 08:07:41 +11001796 .pvr_value = 0x13020000,
1797 .cpu_name = "460GT",
Benjamin Herrenschmidt6d2170b2008-12-18 19:13:22 +00001798 .cpu_features = CPU_FTRS_440x6,
Josh Boyer939e6222008-06-11 07:52:40 -04001799 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001800 .mmu_features = MMU_FTR_TYPE_44x,
Stefan Roese464076a2008-02-24 08:07:41 +11001801 .icache_bsize = 32,
1802 .dcache_bsize = 32,
Josh Boyer939e6222008-06-11 07:52:40 -04001803 .cpu_setup = __setup_cpu_460gt,
Stefan Roese464076a2008-02-24 08:07:41 +11001804 .machine_check = machine_check_440A,
1805 .platform = "ppc440",
1806 },
Stefan Roese20d70342009-07-29 07:04:46 +00001807 { /* 460GT Rev B */
1808 .pvr_mask = 0xffff0007,
1809 .pvr_value = 0x13020005,
1810 .cpu_name = "460GT Rev. B",
1811 .cpu_features = CPU_FTRS_440x6,
1812 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1813 .mmu_features = MMU_FTR_TYPE_44x,
1814 .icache_bsize = 32,
1815 .dcache_bsize = 32,
1816 .cpu_setup = __setup_cpu_460gt,
1817 .machine_check = machine_check_440A,
1818 .platform = "ppc440",
1819 },
Madhulika Madishetty6c712092009-02-05 13:31:36 +00001820 { /* 460SX */
1821 .pvr_mask = 0xffffff00,
1822 .pvr_value = 0x13541800,
1823 .cpu_name = "460SX",
1824 .cpu_features = CPU_FTRS_44X,
1825 .cpu_user_features = COMMON_USER_BOOKE,
1826 .mmu_features = MMU_FTR_TYPE_44x,
1827 .icache_bsize = 32,
1828 .dcache_bsize = 32,
1829 .cpu_setup = __setup_cpu_460sx,
1830 .machine_check = machine_check_440A,
1831 .platform = "ppc440",
1832 },
Tirumala Marri6edc3232010-09-13 13:26:11 +00001833 { /* 464 in APM821xx */
Vinh Nguyen Huu Tuong7c801162011-12-20 02:43:34 +00001834 .pvr_mask = 0xfffffff0,
Tirumala Marri6edc3232010-09-13 13:26:11 +00001835 .pvr_value = 0x12C41C80,
1836 .cpu_name = "APM821XX",
1837 .cpu_features = CPU_FTRS_44X,
1838 .cpu_user_features = COMMON_USER_BOOKE |
1839 PPC_FEATURE_HAS_FPU,
1840 .mmu_features = MMU_FTR_TYPE_44x,
1841 .icache_bsize = 32,
1842 .dcache_bsize = 32,
1843 .cpu_setup = __setup_cpu_apm821xx,
1844 .machine_check = machine_check_440A,
1845 .platform = "ppc440",
1846 },
Dave Kleikampc48d0db2011-01-26 06:17:58 +00001847 { /* 476 DD2 core */
1848 .pvr_mask = 0xffffffff,
1849 .pvr_value = 0x11a52080,
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001850 .cpu_name = "476",
Dave Kleikampc48d0db2011-01-26 06:17:58 +00001851 .cpu_features = CPU_FTRS_47X | CPU_FTR_476_DD2,
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001852 .cpu_user_features = COMMON_USER_BOOKE |
1853 PPC_FEATURE_HAS_FPU,
1854 .mmu_features = MMU_FTR_TYPE_47x |
1855 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1856 .icache_bsize = 32,
1857 .dcache_bsize = 128,
Dave Kleikampfc5e7092010-03-05 03:43:18 +00001858 .machine_check = machine_check_47x,
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001859 .platform = "ppc470",
1860 },
Tony Breedsdf777bd2011-11-30 21:39:23 +00001861 { /* 476fpe */
1862 .pvr_mask = 0xffff0000,
1863 .pvr_value = 0x7ff50000,
1864 .cpu_name = "476fpe",
1865 .cpu_features = CPU_FTRS_47X | CPU_FTR_476_DD2,
1866 .cpu_user_features = COMMON_USER_BOOKE |
1867 PPC_FEATURE_HAS_FPU,
1868 .mmu_features = MMU_FTR_TYPE_47x |
1869 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1870 .icache_bsize = 32,
1871 .dcache_bsize = 128,
1872 .machine_check = machine_check_47x,
1873 .platform = "ppc470",
1874 },
Torez Smithb4e8c8d2010-03-05 10:45:54 +00001875 { /* 476 iss */
1876 .pvr_mask = 0xffff0000,
1877 .pvr_value = 0x00050000,
1878 .cpu_name = "476",
1879 .cpu_features = CPU_FTRS_47X,
1880 .cpu_user_features = COMMON_USER_BOOKE |
1881 PPC_FEATURE_HAS_FPU,
Torez Smithb4e8c8d2010-03-05 10:45:54 +00001882 .mmu_features = MMU_FTR_TYPE_47x |
1883 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1884 .icache_bsize = 32,
1885 .dcache_bsize = 128,
1886 .machine_check = machine_check_47x,
1887 .platform = "ppc470",
1888 },
Dave Kleikampc48d0db2011-01-26 06:17:58 +00001889 { /* 476 others */
1890 .pvr_mask = 0xffff0000,
1891 .pvr_value = 0x11a50000,
1892 .cpu_name = "476",
1893 .cpu_features = CPU_FTRS_47X,
1894 .cpu_user_features = COMMON_USER_BOOKE |
1895 PPC_FEATURE_HAS_FPU,
1896 .mmu_features = MMU_FTR_TYPE_47x |
1897 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1898 .icache_bsize = 32,
1899 .dcache_bsize = 128,
1900 .machine_check = machine_check_47x,
1901 .platform = "ppc470",
1902 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001903 { /* default match */
1904 .pvr_mask = 0x00000000,
1905 .pvr_value = 0x00000000,
1906 .cpu_name = "(generic 44x PPC)",
1907 .cpu_features = CPU_FTRS_44X,
1908 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001909 .mmu_features = MMU_FTR_TYPE_44x,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001910 .icache_bsize = 32,
1911 .dcache_bsize = 32,
1912 .machine_check = machine_check_4xx,
1913 .platform = "ppc440",
1914 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001915#endif /* CONFIG_44x */
Josh Boyere3e414b2007-12-24 08:44:47 -06001916#ifdef CONFIG_E200
Stephen Rothwell49209602005-10-12 15:55:09 +10001917 { /* e200z5 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001918 .pvr_mask = 0xfff00000,
1919 .pvr_value = 0x81000000,
1920 .cpu_name = "e200z5",
1921 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001922 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001923 .cpu_user_features = COMMON_USER_BOOKE |
1924 PPC_FEATURE_HAS_EFP_SINGLE |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001925 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001926 .mmu_features = MMU_FTR_TYPE_FSL_E,
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001927 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001928 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001929 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001930 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001931 { /* e200z6 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001932 .pvr_mask = 0xfff00000,
1933 .pvr_value = 0x81100000,
1934 .cpu_name = "e200z6",
1935 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001936 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001937 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001938 PPC_FEATURE_HAS_SPE_COMP |
1939 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001940 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001941 .mmu_features = MMU_FTR_TYPE_FSL_E,
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001942 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001943 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001944 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001945 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001946 { /* default match */
1947 .pvr_mask = 0x00000000,
1948 .pvr_value = 0x00000000,
1949 .cpu_name = "(generic E200 PPC)",
1950 .cpu_features = CPU_FTRS_E200,
1951 .cpu_user_features = COMMON_USER_BOOKE |
1952 PPC_FEATURE_HAS_EFP_SINGLE |
1953 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001954 .mmu_features = MMU_FTR_TYPE_FSL_E,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001955 .dcache_bsize = 32,
Kumar Gala105c31d2009-01-08 08:31:20 -06001956 .cpu_setup = __setup_cpu_e200,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001957 .machine_check = machine_check_e200,
1958 .platform = "ppc5554",
Paul Mackerras516c8be2008-05-12 14:20:35 +10001959 }
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001960#endif /* CONFIG_E200 */
Kumar Gala4490c062010-10-08 08:32:11 -05001961#endif /* CONFIG_PPC32 */
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001962#ifdef CONFIG_E500
Kumar Gala4490c062010-10-08 08:32:11 -05001963#ifdef CONFIG_PPC32
Mihai Caraman3477e712014-08-20 16:09:03 +03001964#ifndef CONFIG_PPC_E500MC
Stephen Rothwell49209602005-10-12 15:55:09 +10001965 { /* e500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001966 .pvr_mask = 0xffff0000,
1967 .pvr_value = 0x80200000,
1968 .cpu_name = "e500",
Kumar Gala10b35d92005-09-23 14:08:58 -05001969 .cpu_features = CPU_FTRS_E500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001970 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001971 PPC_FEATURE_HAS_SPE_COMP |
1972 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Nishanth Aravamudan6c1bf482013-05-04 16:01:17 +00001973 .cpu_user_features2 = PPC_FEATURE2_ISEL,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001974 .mmu_features = MMU_FTR_TYPE_FSL_E,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001975 .icache_bsize = 32,
1976 .dcache_bsize = 32,
1977 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001978 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001979 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06001980 .cpu_setup = __setup_cpu_e500v1,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001981 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001982 .platform = "ppc8540",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001983 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001984 { /* e500v2 */
Kumar Gala5b37b702005-06-21 17:15:18 -07001985 .pvr_mask = 0xffff0000,
1986 .pvr_value = 0x80210000,
1987 .cpu_name = "e500v2",
Kumar Gala10b35d92005-09-23 14:08:58 -05001988 .cpu_features = CPU_FTRS_E500_2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001989 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001990 PPC_FEATURE_HAS_SPE_COMP |
1991 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1992 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
Nishanth Aravamudan6c1bf482013-05-04 16:01:17 +00001993 .cpu_user_features2 = PPC_FEATURE2_ISEL,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001994 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS,
Kumar Gala5b37b702005-06-21 17:15:18 -07001995 .icache_bsize = 32,
1996 .dcache_bsize = 32,
1997 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001998 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001999 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06002000 .cpu_setup = __setup_cpu_e500v2,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11002001 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002002 .platform = "ppc8548",
Kumar Gala5b37b702005-06-21 17:15:18 -07002003 },
Mihai Caraman3477e712014-08-20 16:09:03 +03002004#else
Kumar Gala3dfa8772008-06-16 09:41:32 -05002005 { /* e500mc */
2006 .pvr_mask = 0xffff0000,
2007 .pvr_value = 0x80230000,
2008 .cpu_name = "e500mc",
Kumar Gala3dfa8772008-06-16 09:41:32 -05002009 .cpu_features = CPU_FTRS_E500MC,
2010 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Nishanth Aravamudan6c1bf482013-05-04 16:01:17 +00002011 .cpu_user_features2 = PPC_FEATURE2_ISEL,
Kumar Galac3071952009-02-10 22:26:06 -06002012 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
Kumar Gala323d23a2009-04-23 08:51:22 -05002013 MMU_FTR_USE_TLBILX,
Kumar Gala3dfa8772008-06-16 09:41:32 -05002014 .icache_bsize = 64,
2015 .dcache_bsize = 64,
2016 .num_pmcs = 4,
Scott Wooda11106542010-02-25 18:09:45 -06002017 .oprofile_cpu_type = "ppc/e500mc",
Kumar Gala3dfa8772008-06-16 09:41:32 -05002018 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06002019 .cpu_setup = __setup_cpu_e500mc,
Scott Woodfe04b112010-04-08 00:38:22 -05002020 .machine_check = machine_check_e500mc,
Kumar Gala3dfa8772008-06-16 09:41:32 -05002021 .platform = "ppce500mc",
2022 },
Mihai Caraman3477e712014-08-20 16:09:03 +03002023#endif /* CONFIG_PPC_E500MC */
Kumar Gala4490c062010-10-08 08:32:11 -05002024#endif /* CONFIG_PPC32 */
Mihai Caraman3477e712014-08-20 16:09:03 +03002025#ifdef CONFIG_PPC_E500MC
Kumar Gala4490c062010-10-08 08:32:11 -05002026 { /* e5500 */
2027 .pvr_mask = 0xffff0000,
2028 .pvr_value = 0x80240000,
2029 .cpu_name = "e5500",
Kumar Gala11ed0db2011-04-06 00:11:06 -05002030 .cpu_features = CPU_FTRS_E5500,
Kumar Galafb9be232011-06-02 11:26:13 -05002031 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Nishanth Aravamudan6c1bf482013-05-04 16:01:17 +00002032 .cpu_user_features2 = PPC_FEATURE2_ISEL,
Kumar Gala4490c062010-10-08 08:32:11 -05002033 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
2034 MMU_FTR_USE_TLBILX,
2035 .icache_bsize = 64,
2036 .dcache_bsize = 64,
2037 .num_pmcs = 4,
2038 .oprofile_cpu_type = "ppc/e500mc",
2039 .oprofile_type = PPC_OPROFILE_FSL_EMB,
2040 .cpu_setup = __setup_cpu_e5500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05302041#ifndef CONFIG_PPC32
Kumar Gala4490c062010-10-08 08:32:11 -05002042 .cpu_restore = __restore_cpu_e5500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05302043#endif
Kumar Gala4490c062010-10-08 08:32:11 -05002044 .machine_check = machine_check_e500mc,
2045 .platform = "ppce5500",
2046 },
Kumar Gala10241842011-11-06 11:51:07 -06002047 { /* e6500 */
2048 .pvr_mask = 0xffff0000,
2049 .pvr_value = 0x80400000,
2050 .cpu_name = "e6500",
2051 .cpu_features = CPU_FTRS_E6500,
Kumar Galacd66cc22012-09-07 15:57:17 -05002052 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU |
2053 PPC_FEATURE_HAS_ALTIVEC_COMP,
Nishanth Aravamudan6c1bf482013-05-04 16:01:17 +00002054 .cpu_user_features2 = PPC_FEATURE2_ISEL,
Kumar Gala10241842011-11-06 11:51:07 -06002055 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
2056 MMU_FTR_USE_TLBILX,
2057 .icache_bsize = 64,
2058 .dcache_bsize = 64,
Lijun Pan5815c432013-06-05 15:22:09 -05002059 .num_pmcs = 6,
Kumar Gala10241842011-11-06 11:51:07 -06002060 .oprofile_cpu_type = "ppc/e6500",
2061 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Galacd66cc22012-09-07 15:57:17 -05002062 .cpu_setup = __setup_cpu_e6500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05302063#ifndef CONFIG_PPC32
Kumar Galacd66cc22012-09-07 15:57:17 -05002064 .cpu_restore = __restore_cpu_e6500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05302065#endif
Kumar Gala10241842011-11-06 11:51:07 -06002066 .machine_check = machine_check_e500mc,
2067 .platform = "ppce6500",
2068 },
Mihai Caraman3477e712014-08-20 16:09:03 +03002069#endif /* CONFIG_PPC_E500MC */
Kumar Gala4490c062010-10-08 08:32:11 -05002070#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -07002071 { /* default match */
2072 .pvr_mask = 0x00000000,
2073 .pvr_value = 0x00000000,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002074 .cpu_name = "(generic E500 PPC)",
2075 .cpu_features = CPU_FTRS_E500,
2076 .cpu_user_features = COMMON_USER_BOOKE |
2077 PPC_FEATURE_HAS_SPE_COMP |
2078 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00002079 .mmu_features = MMU_FTR_TYPE_FSL_E,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002080 .icache_bsize = 32,
2081 .dcache_bsize = 32,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002082 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002083 .platform = "powerpc",
Paul Mackerras516c8be2008-05-12 14:20:35 +10002084 }
Stephen Rothwell49209602005-10-12 15:55:09 +10002085#endif /* CONFIG_PPC32 */
Kumar Gala4490c062010-10-08 08:32:11 -05002086#endif /* CONFIG_E500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002087};
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002088
Paul Mackerras87a72f92007-10-04 14:18:01 +10002089static struct cpu_spec the_cpu_spec;
2090
Scott Wood26ee9762011-07-25 11:04:36 +00002091static struct cpu_spec * __init setup_cpu_spec(unsigned long offset,
2092 struct cpu_spec *s)
Michael Ellerman666435b2009-02-22 16:25:43 +00002093{
2094 struct cpu_spec *t = &the_cpu_spec;
Michael Ellerman2657dd42009-02-22 16:25:45 +00002095 struct cpu_spec old;
2096
Michael Ellerman666435b2009-02-22 16:25:43 +00002097 t = PTRRELOC(t);
Michael Ellerman2657dd42009-02-22 16:25:45 +00002098 old = *t;
2099
2100 /* Copy everything, then do fixups */
2101 *t = *s;
Michael Ellerman666435b2009-02-22 16:25:43 +00002102
2103 /*
2104 * If we are overriding a previous value derived from the real
2105 * PVR with a new value obtained using a logical PVR value,
2106 * don't modify the performance monitor fields.
2107 */
Michael Ellerman2657dd42009-02-22 16:25:45 +00002108 if (old.num_pmcs && !s->num_pmcs) {
2109 t->num_pmcs = old.num_pmcs;
2110 t->pmc_type = old.pmc_type;
2111 t->oprofile_type = old.oprofile_type;
2112 t->oprofile_mmcra_sihv = old.oprofile_mmcra_sihv;
2113 t->oprofile_mmcra_sipr = old.oprofile_mmcra_sipr;
2114 t->oprofile_mmcra_clear = old.oprofile_mmcra_clear;
2115
Michael Ellerman666435b2009-02-22 16:25:43 +00002116 /*
2117 * If we have passed through this logic once before and
2118 * have pulled the default case because the real PVR was
2119 * not found inside cpu_specs[], then we are possibly
2120 * running in compatibility mode. In that case, let the
2121 * oprofiler know which set of compatibility counters to
2122 * pull from by making sure the oprofile_cpu_type string
2123 * is set to that of compatibility mode. If the
2124 * oprofile_cpu_type already has a value, then we are
2125 * possibly overriding a real PVR with a logical one,
2126 * and, in that case, keep the current value for
2127 * oprofile_cpu_type.
2128 */
Benjamin Herrenschmidtb173f032009-05-14 18:34:06 +00002129 if (old.oprofile_cpu_type != NULL) {
Benjamin Herrenschmidt0203d6e2009-04-29 19:39:38 +00002130 t->oprofile_cpu_type = old.oprofile_cpu_type;
2131 t->oprofile_type = old.oprofile_type;
Michael Wolf79af6c42009-04-27 06:17:54 +00002132 }
Michael Ellerman2657dd42009-02-22 16:25:45 +00002133 }
Michael Ellerman666435b2009-02-22 16:25:43 +00002134
2135 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
2136
2137 /*
2138 * Set the base platform string once; assumes
2139 * we're called with real pvr first.
2140 */
2141 if (*PTRRELOC(&powerpc_base_platform) == NULL)
2142 *PTRRELOC(&powerpc_base_platform) = t->platform;
2143
2144#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
2145 /* ppc64 and booke expect identify_cpu to also call setup_cpu for
2146 * that processor. I will consolidate that at a later time, for now,
2147 * just use #ifdef. We also don't need to PTRRELOC the function
2148 * pointer on ppc64 and booke as we are running at 0 in real mode
2149 * on ppc64 and reloc_offset is always 0 on booke.
2150 */
Benjamin Herrenschmidtaf9eef32011-01-20 20:36:03 +00002151 if (t->cpu_setup) {
2152 t->cpu_setup(offset, t);
Michael Ellerman666435b2009-02-22 16:25:43 +00002153 }
2154#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
Scott Wood26ee9762011-07-25 11:04:36 +00002155
2156 return t;
Michael Ellerman666435b2009-02-22 16:25:43 +00002157}
2158
Paul Mackerras87a72f92007-10-04 14:18:01 +10002159struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002160{
2161 struct cpu_spec *s = cpu_specs;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002162 int i;
2163
2164 s = PTRRELOC(s);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002165
Michael Ellerman666435b2009-02-22 16:25:43 +00002166 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) {
Scott Wood26ee9762011-07-25 11:04:36 +00002167 if ((pvr & s->pvr_mask) == s->pvr_value)
2168 return setup_cpu_spec(offset, s);
Michael Ellerman666435b2009-02-22 16:25:43 +00002169 }
2170
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002171 BUG();
Michael Ellerman666435b2009-02-22 16:25:43 +00002172
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002173 return NULL;
2174}