blob: e3da41f8ef9397459d6c1b50a9b868e0ad8ad521 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Linus Torvalds1da177e2005-04-16 15:20:36 -07002 * Copyright (C) 2001 Ben. Herrenschmidt (benh@kernel.crashing.org)
3 *
Stephen Rothwell49209602005-10-12 15:55:09 +10004 * Modifications for ppc64:
5 * Copyright (C) 2003 Dave Engebretsen <engebret@us.ibm.com>
6 *
Linus Torvalds1da177e2005-04-16 15:20:36 -07007 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version
10 * 2 of the License, or (at your option) any later version.
11 */
12
Linus Torvalds1da177e2005-04-16 15:20:36 -070013#include <linux/string.h>
14#include <linux/sched.h>
15#include <linux/threads.h>
16#include <linux/init.h>
Paul Gortmaker4b16f8e2011-07-22 18:24:23 -040017#include <linux/export.h>
Kevin Hao4db73272016-07-23 14:42:41 +053018#include <linux/jump_label.h>
Kumar Gala400d2212005-09-27 15:13:12 -050019
20#include <asm/oprofile_impl.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070021#include <asm/cputable.h>
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +100022#include <asm/prom.h> /* for PTRRELOC on ARCH=ppc */
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +000023#include <asm/mmu.h>
David Howellsae3a1972012-03-28 18:30:02 +010024#include <asm/setup.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070025
Kumar Gala400d2212005-09-27 15:13:12 -050026struct cpu_spec* cur_cpu_spec = NULL;
Stephen Rothwell49209602005-10-12 15:55:09 +100027EXPORT_SYMBOL(cur_cpu_spec);
Linus Torvalds1da177e2005-04-16 15:20:36 -070028
Nathan Lynch9115d132008-07-16 09:58:51 +100029/* The platform string corresponding to the real PVR */
30const char *powerpc_base_platform;
31
Stephen Rothwell49209602005-10-12 15:55:09 +100032/* NOTE:
33 * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's
34 * the responsibility of the appropriate CPU save/restore functions to
35 * eventually copy these settings over. Those save/restore aren't yet
36 * part of the cputable though. That has to be fixed for both ppc32
37 * and ppc64
38 */
Geoff Levandb26f1002006-05-19 14:24:18 +100039#ifdef CONFIG_PPC32
Kumar Gala105c31d2009-01-08 08:31:20 -060040extern void __setup_cpu_e200(unsigned long offset, struct cpu_spec* spec);
41extern void __setup_cpu_e500v1(unsigned long offset, struct cpu_spec* spec);
42extern void __setup_cpu_e500v2(unsigned long offset, struct cpu_spec* spec);
43extern void __setup_cpu_e500mc(unsigned long offset, struct cpu_spec* spec);
Valentine Barshak81127532007-09-22 00:46:57 +100044extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
45extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110046extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
Valentine Barshak340ffd22007-09-22 00:50:09 +100047extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110048extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
Grant Likely640d17d2008-12-04 05:39:55 +000049extern void __setup_cpu_440x5(unsigned long offset, struct cpu_spec* spec);
Stefan Roese464076a2008-02-24 08:07:41 +110050extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec);
Josh Boyer939e6222008-06-11 07:52:40 -040051extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec);
Madhulika Madishetty6c712092009-02-05 13:31:36 +000052extern void __setup_cpu_460sx(unsigned long offset, struct cpu_spec *spec);
Tirumala Marri6edc3232010-09-13 13:26:11 +000053extern void __setup_cpu_apm821xx(unsigned long offset, struct cpu_spec *spec);
Kumar Gala400d2212005-09-27 15:13:12 -050054extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
55extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
56extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
57extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
58extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
59extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
60extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
61extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell49209602005-10-12 15:55:09 +100062#endif /* CONFIG_PPC32 */
Olof Johanssonf39b7a52006-08-11 00:07:08 -050063#ifdef CONFIG_PPC64
Kumar Gala400d2212005-09-27 15:13:12 -050064extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
Olof Johansson5b43d202006-10-04 23:41:41 -050065extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
Olof Johansson11999192007-02-04 16:36:51 -060066extern void __setup_cpu_pa6t(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);
Michael Neulingc3ab3002016-02-19 11:16:24 +110073extern void __setup_cpu_power9(unsigned long offset, struct cpu_spec* spec);
74extern void __restore_cpu_power9(void);
Mahesh Salgaonkar45706bb2014-12-19 08:41:05 +053075extern void __flush_tlb_power7(unsigned int action);
76extern void __flush_tlb_power8(unsigned int action);
Michael Neulingc3ab3002016-02-19 11:16:24 +110077extern void __flush_tlb_power9(unsigned int action);
Mahesh Salgaonkare22a2272013-10-30 20:05:11 +053078extern long __machine_check_early_realmode_p7(struct pt_regs *regs);
Mahesh Salgaonkarae744f32013-10-30 20:05:26 +053079extern long __machine_check_early_realmode_p8(struct pt_regs *regs);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050080#endif /* CONFIG_PPC64 */
Kumar Gala4490c062010-10-08 08:32:11 -050081#if defined(CONFIG_E500)
82extern void __setup_cpu_e5500(unsigned long offset, struct cpu_spec* spec);
Kumar Galacd66cc22012-09-07 15:57:17 -050083extern void __setup_cpu_e6500(unsigned long offset, struct cpu_spec* spec);
Kumar Gala4490c062010-10-08 08:32:11 -050084extern void __restore_cpu_e5500(void);
Kumar Galacd66cc22012-09-07 15:57:17 -050085extern void __restore_cpu_e6500(void);
Kumar Gala4490c062010-10-08 08:32:11 -050086#endif /* CONFIG_E500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070087
Linus Torvalds1da177e2005-04-16 15:20:36 -070088/* This table only contains "desktop" CPUs, it need to be filled with embedded
89 * ones as well...
90 */
Stephen Rothwell49209602005-10-12 15:55:09 +100091#define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
92 PPC_FEATURE_HAS_MMU)
93#define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +110094#define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
Benjamin Herrenschmidtaa5cb0212006-03-01 15:07:07 +110095#define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
96 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
97#define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
98 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
Anton Blanchard03054d52006-04-29 09:51:06 +100099#define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000100 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
Nathan Lynch0f473312008-07-10 01:06:57 +1000101 PPC_FEATURE_TRUE_LE | \
102 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Michael Neulinge952e6c2008-06-18 10:47:26 +1000103#define COMMON_USER_POWER7 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
104 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
Nathan Lynch0f473312008-07-10 01:06:57 +1000105 PPC_FEATURE_TRUE_LE | \
106 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Nishanth Aravamudan4a1ae4f2013-05-03 14:48:38 +0000107#define COMMON_USER2_POWER7 (PPC_FEATURE2_DSCR)
Michael Neuling71e18492012-10-30 19:34:15 +0000108#define COMMON_USER_POWER8 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
109 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
110 PPC_FEATURE_TRUE_LE | \
111 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Nishanth Aravamudan748645b2013-05-03 14:49:59 +0000112#define COMMON_USER2_POWER8 (PPC_FEATURE2_ARCH_2_07 | \
Sam bobroffb4b56f92015-06-12 11:06:32 +1000113 PPC_FEATURE2_HTM_COMP | \
114 PPC_FEATURE2_HTM_NOSC_COMP | \
115 PPC_FEATURE2_DSCR | \
Benjamin Herrenschmidtdd58a092014-06-10 15:04:40 +1000116 PPC_FEATURE2_ISEL | PPC_FEATURE2_TAR | \
117 PPC_FEATURE2_VEC_CRYPTO)
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500118#define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
119 PPC_FEATURE_TRUE_LE | \
120 PPC_FEATURE_HAS_ALTIVEC_COMP)
Michael Neulingc3ab3002016-02-19 11:16:24 +1100121#define COMMON_USER_POWER9 COMMON_USER_POWER8
122#define COMMON_USER2_POWER9 (COMMON_USER2_POWER8 | \
123 PPC_FEATURE2_ARCH_3_00 | \
124 PPC_FEATURE2_HAS_IEEE128)
125
Kumar Galaf45c4482009-08-18 19:08:30 +0000126#ifdef CONFIG_PPC_BOOK3E_64
127#define COMMON_USER_BOOKE (COMMON_USER_PPC64 | PPC_FEATURE_BOOKE)
128#else
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100129#define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
130 PPC_FEATURE_BOOKE)
Kumar Galaf45c4482009-08-18 19:08:30 +0000131#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -0700132
Paul Mackerras87a72f92007-10-04 14:18:01 +1000133static struct cpu_spec __initdata cpu_specs[] = {
Benjamin Herrenschmidt2d27cfd2009-07-23 23:15:59 +0000134#ifdef CONFIG_PPC_BOOK3S_64
Stephen Rothwell49209602005-10-12 15:55:09 +1000135 { /* Power4 */
136 .pvr_mask = 0xffff0000,
137 .pvr_value = 0x00350000,
138 .cpu_name = "POWER4 (gp)",
139 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100140 .cpu_user_features = COMMON_USER_POWER4,
Aneesh Kumar K.Vaccfad72016-07-13 15:05:24 +0530141 .mmu_features = MMU_FTRS_POWER4 | MMU_FTR_TLBIE_CROP_VA,
Stephen Rothwell49209602005-10-12 15:55:09 +1000142 .icache_bsize = 128,
143 .dcache_bsize = 128,
144 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600145 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000146 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000147 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100148 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000149 },
150 { /* Power4+ */
151 .pvr_mask = 0xffff0000,
152 .pvr_value = 0x00380000,
153 .cpu_name = "POWER4+ (gq)",
154 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100155 .cpu_user_features = COMMON_USER_POWER4,
Aneesh Kumar K.Vaccfad72016-07-13 15:05:24 +0530156 .mmu_features = MMU_FTRS_POWER4 | MMU_FTR_TLBIE_CROP_VA,
Stephen Rothwell49209602005-10-12 15:55:09 +1000157 .icache_bsize = 128,
158 .dcache_bsize = 128,
159 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600160 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000161 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000162 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100163 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000164 },
165 { /* PPC970 */
166 .pvr_mask = 0xffff0000,
167 .pvr_value = 0x00390000,
168 .cpu_name = "PPC970",
169 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100170 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000171 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000172 .mmu_features = MMU_FTRS_PPC970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000173 .icache_bsize = 128,
174 .dcache_bsize = 128,
175 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600176 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000177 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500178 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000179 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000180 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100181 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000182 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000183 { /* PPC970FX */
184 .pvr_mask = 0xffff0000,
185 .pvr_value = 0x003c0000,
186 .cpu_name = "PPC970FX",
Stephen Rothwell49209602005-10-12 15:55:09 +1000187 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100188 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000189 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000190 .mmu_features = MMU_FTRS_PPC970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000191 .icache_bsize = 128,
192 .dcache_bsize = 128,
193 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600194 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000195 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500196 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000197 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000198 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100199 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000200 },
Olof Johansson3546e812007-02-26 00:35:14 -0600201 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
202 .pvr_mask = 0xffffffff,
203 .pvr_value = 0x00440100,
204 .cpu_name = "PPC970MP",
205 .cpu_features = CPU_FTRS_PPC970,
206 .cpu_user_features = COMMON_USER_POWER4 |
207 PPC_FEATURE_HAS_ALTIVEC_COMP,
Benjamin Herrenschmidtd63ac5f2013-03-13 09:55:02 +1100208 .mmu_features = MMU_FTRS_PPC970,
Olof Johansson3546e812007-02-26 00:35:14 -0600209 .icache_bsize = 128,
210 .dcache_bsize = 128,
211 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000212 .pmc_type = PPC_PMC_IBM,
Olof Johansson3546e812007-02-26 00:35:14 -0600213 .cpu_setup = __setup_cpu_ppc970,
214 .cpu_restore = __restore_cpu_ppc970,
215 .oprofile_cpu_type = "ppc64/970MP",
216 .oprofile_type = PPC_OPROFILE_POWER4,
217 .platform = "ppc970",
218 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000219 { /* PPC970MP */
220 .pvr_mask = 0xffff0000,
221 .pvr_value = 0x00440000,
222 .cpu_name = "PPC970MP",
223 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100224 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000225 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000226 .mmu_features = MMU_FTRS_PPC970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000227 .icache_bsize = 128,
228 .dcache_bsize = 128,
Anton Blanchard87af41b2006-05-05 05:44:26 +1000229 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000230 .pmc_type = PPC_PMC_IBM,
Olof Johansson5b43d202006-10-04 23:41:41 -0500231 .cpu_setup = __setup_cpu_ppc970MP,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500232 .cpu_restore = __restore_cpu_ppc970,
Mike Wolffecb3522006-11-21 14:41:54 -0600233 .oprofile_cpu_type = "ppc64/970MP",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000234 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100235 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000236 },
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500237 { /* PPC970GX */
238 .pvr_mask = 0xffff0000,
239 .pvr_value = 0x00450000,
240 .cpu_name = "PPC970GX",
241 .cpu_features = CPU_FTRS_PPC970,
242 .cpu_user_features = COMMON_USER_POWER4 |
243 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000244 .mmu_features = MMU_FTRS_PPC970,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500245 .icache_bsize = 128,
246 .dcache_bsize = 128,
247 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600248 .pmc_type = PPC_PMC_IBM,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500249 .cpu_setup = __setup_cpu_ppc970,
250 .oprofile_cpu_type = "ppc64/970",
251 .oprofile_type = PPC_OPROFILE_POWER4,
252 .platform = "ppc970",
253 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100254 { /* Power5 GR */
Stephen Rothwell49209602005-10-12 15:55:09 +1000255 .pvr_mask = 0xffff0000,
256 .pvr_value = 0x003a0000,
257 .cpu_name = "POWER5 (gr)",
258 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100259 .cpu_user_features = COMMON_USER_POWER5,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000260 .mmu_features = MMU_FTRS_POWER5,
Stephen Rothwell49209602005-10-12 15:55:09 +1000261 .icache_bsize = 128,
262 .dcache_bsize = 128,
263 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600264 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000265 .oprofile_cpu_type = "ppc64/power5",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000266 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000267 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
268 * and above but only works on POWER5 and above
269 */
270 .oprofile_mmcra_sihv = MMCRA_SIHV,
271 .oprofile_mmcra_sipr = MMCRA_SIPR,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100272 .platform = "power5",
Stephen Rothwell49209602005-10-12 15:55:09 +1000273 },
Mike Wolf31a12ce2007-07-10 13:13:47 -0500274 { /* Power5++ */
275 .pvr_mask = 0xffffff00,
276 .pvr_value = 0x003b0300,
277 .cpu_name = "POWER5+ (gs)",
278 .cpu_features = CPU_FTRS_POWER5,
279 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000280 .mmu_features = MMU_FTRS_POWER5,
Mike Wolf31a12ce2007-07-10 13:13:47 -0500281 .icache_bsize = 128,
282 .dcache_bsize = 128,
283 .num_pmcs = 6,
284 .oprofile_cpu_type = "ppc64/power5++",
285 .oprofile_type = PPC_OPROFILE_POWER4,
286 .oprofile_mmcra_sihv = MMCRA_SIHV,
287 .oprofile_mmcra_sipr = MMCRA_SIPR,
288 .platform = "power5+",
289 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100290 { /* Power5 GS */
Stephen Rothwell49209602005-10-12 15:55:09 +1000291 .pvr_mask = 0xffff0000,
292 .pvr_value = 0x003b0000,
Anton Blanchard834608f2006-01-09 15:42:30 +1100293 .cpu_name = "POWER5+ (gs)",
Stephen Rothwell49209602005-10-12 15:55:09 +1000294 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100295 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000296 .mmu_features = MMU_FTRS_POWER5,
Stephen Rothwell49209602005-10-12 15:55:09 +1000297 .icache_bsize = 128,
298 .dcache_bsize = 128,
299 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600300 .pmc_type = PPC_PMC_IBM,
Anton Blanchard834608f2006-01-09 15:42:30 +1100301 .oprofile_cpu_type = "ppc64/power5+",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000302 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000303 .oprofile_mmcra_sihv = MMCRA_SIHV,
304 .oprofile_mmcra_sipr = MMCRA_SIPR,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100305 .platform = "power5+",
Stephen Rothwell49209602005-10-12 15:55:09 +1000306 },
Paul Mackerras974a76f2006-11-10 20:38:53 +1100307 { /* POWER6 in P5+ mode; 2.04-compliant processor */
308 .pvr_mask = 0xffffffff,
309 .pvr_value = 0x0f000001,
310 .cpu_name = "POWER5+",
311 .cpu_features = CPU_FTRS_POWER5,
312 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000313 .mmu_features = MMU_FTRS_POWER5,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100314 .icache_bsize = 128,
315 .dcache_bsize = 128,
Michael Wolf79af6c42009-04-27 06:17:54 +0000316 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
317 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100318 .platform = "power5+",
319 },
Anton Blanchard03054d52006-04-29 09:51:06 +1000320 { /* Power6 */
321 .pvr_mask = 0xffff0000,
322 .pvr_value = 0x003e0000,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100323 .cpu_name = "POWER6 (raw)",
324 .cpu_features = CPU_FTRS_POWER6,
325 .cpu_user_features = COMMON_USER_POWER6 |
326 PPC_FEATURE_POWER6_EXT,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000327 .mmu_features = MMU_FTRS_POWER6,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100328 .icache_bsize = 128,
329 .dcache_bsize = 128,
330 .num_pmcs = 6,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000331 .pmc_type = PPC_PMC_IBM,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100332 .oprofile_cpu_type = "ppc64/power6",
333 .oprofile_type = PPC_OPROFILE_POWER4,
334 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
335 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
336 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
337 POWER6_MMCRA_OTHER,
338 .platform = "power6x",
339 },
340 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
341 .pvr_mask = 0xffffffff,
342 .pvr_value = 0x0f000002,
343 .cpu_name = "POWER6 (architected)",
Anton Blanchard03054d52006-04-29 09:51:06 +1000344 .cpu_features = CPU_FTRS_POWER6,
345 .cpu_user_features = COMMON_USER_POWER6,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000346 .mmu_features = MMU_FTRS_POWER6,
Anton Blanchard03054d52006-04-29 09:51:06 +1000347 .icache_bsize = 128,
348 .dcache_bsize = 128,
Michael Wolf79af6c42009-04-27 06:17:54 +0000349 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
350 .oprofile_type = PPC_OPROFILE_POWER4,
Anton Blanchard03054d52006-04-29 09:51:06 +1000351 .platform = "power6",
352 },
Joel Schopp635f5a62008-06-19 06:18:21 +1000353 { /* 2.06-compliant processor, i.e. Power7 "architected" mode */
354 .pvr_mask = 0xffffffff,
355 .pvr_value = 0x0f000003,
356 .cpu_name = "POWER7 (architected)",
357 .cpu_features = CPU_FTRS_POWER7,
358 .cpu_user_features = COMMON_USER_POWER7,
Nishanth Aravamudan4a1ae4f2013-05-03 14:48:38 +0000359 .cpu_user_features2 = COMMON_USER2_POWER7,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000360 .mmu_features = MMU_FTRS_POWER7,
Joel Schopp635f5a62008-06-19 06:18:21 +1000361 .icache_bsize = 128,
362 .dcache_bsize = 128,
Michael Wolf79af6c42009-04-27 06:17:54 +0000363 .oprofile_type = PPC_OPROFILE_POWER4,
364 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
Benjamin Herrenschmidt24cc67d2011-01-20 18:50:55 +1100365 .cpu_setup = __setup_cpu_power7,
366 .cpu_restore = __restore_cpu_power7,
Mahesh Salgaonkar04407052013-10-30 20:04:56 +0530367 .flush_tlb = __flush_tlb_power7,
Mahesh Salgaonkare22a2272013-10-30 20:05:11 +0530368 .machine_check_early = __machine_check_early_realmode_p7,
Joel Schopp635f5a62008-06-19 06:18:21 +1000369 .platform = "power7",
370 },
Michael Neulingc674e702012-11-08 20:26:42 +0000371 { /* 2.07-compliant processor, i.e. Power8 "architected" mode */
372 .pvr_mask = 0xffffffff,
373 .pvr_value = 0x0f000004,
374 .cpu_name = "POWER8 (architected)",
375 .cpu_features = CPU_FTRS_POWER8,
376 .cpu_user_features = COMMON_USER_POWER8,
Nishanth Aravamudan748645b2013-05-03 14:49:59 +0000377 .cpu_user_features2 = COMMON_USER2_POWER8,
Michael Neulingc674e702012-11-08 20:26:42 +0000378 .mmu_features = MMU_FTRS_POWER8,
379 .icache_bsize = 128,
380 .dcache_bsize = 128,
Michael Neuling6a60f9e72013-06-04 19:38:54 +0000381 .oprofile_type = PPC_OPROFILE_INVALID,
382 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
Michael Neulingc674e702012-11-08 20:26:42 +0000383 .cpu_setup = __setup_cpu_power8,
384 .cpu_restore = __restore_cpu_power8,
Mahesh Salgaonkar04407052013-10-30 20:04:56 +0530385 .flush_tlb = __flush_tlb_power8,
Mahesh Salgaonkarae744f32013-10-30 20:05:26 +0530386 .machine_check_early = __machine_check_early_realmode_p8,
Michael Neulingc674e702012-11-08 20:26:42 +0000387 .platform = "power8",
388 },
Michael Neulinge952e6c2008-06-18 10:47:26 +1000389 { /* Power7 */
390 .pvr_mask = 0xffff0000,
391 .pvr_value = 0x003f0000,
Joel Schopp635f5a62008-06-19 06:18:21 +1000392 .cpu_name = "POWER7 (raw)",
Michael Neulinge952e6c2008-06-18 10:47:26 +1000393 .cpu_features = CPU_FTRS_POWER7,
394 .cpu_user_features = COMMON_USER_POWER7,
Nishanth Aravamudan4a1ae4f2013-05-03 14:48:38 +0000395 .cpu_user_features2 = COMMON_USER2_POWER7,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000396 .mmu_features = MMU_FTRS_POWER7,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000397 .icache_bsize = 128,
398 .dcache_bsize = 128,
399 .num_pmcs = 6,
400 .pmc_type = PPC_PMC_IBM,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000401 .oprofile_cpu_type = "ppc64/power7",
402 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt24cc67d2011-01-20 18:50:55 +1100403 .cpu_setup = __setup_cpu_power7,
404 .cpu_restore = __restore_cpu_power7,
Mahesh Salgaonkar04407052013-10-30 20:04:56 +0530405 .flush_tlb = __flush_tlb_power7,
Mahesh Salgaonkare22a2272013-10-30 20:05:11 +0530406 .machine_check_early = __machine_check_early_realmode_p7,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000407 .platform = "power7",
408 },
Michael Neuling6f08cb32010-11-17 18:52:44 +0000409 { /* Power7+ */
410 .pvr_mask = 0xffff0000,
411 .pvr_value = 0x004A0000,
412 .cpu_name = "POWER7+ (raw)",
413 .cpu_features = CPU_FTRS_POWER7,
414 .cpu_user_features = COMMON_USER_POWER7,
Will Schmidtbadec112013-05-20 05:04:18 +0000415 .cpu_user_features2 = COMMON_USER2_POWER7,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000416 .mmu_features = MMU_FTRS_POWER7,
Michael Neuling6f08cb32010-11-17 18:52:44 +0000417 .icache_bsize = 128,
418 .dcache_bsize = 128,
419 .num_pmcs = 6,
420 .pmc_type = PPC_PMC_IBM,
421 .oprofile_cpu_type = "ppc64/power7",
422 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt24cc67d2011-01-20 18:50:55 +1100423 .cpu_setup = __setup_cpu_power7,
424 .cpu_restore = __restore_cpu_power7,
Mahesh Salgaonkar04407052013-10-30 20:04:56 +0530425 .flush_tlb = __flush_tlb_power7,
Mahesh Salgaonkare22a2272013-10-30 20:05:11 +0530426 .machine_check_early = __machine_check_early_realmode_p7,
Michael Neuling6f08cb32010-11-17 18:52:44 +0000427 .platform = "power7+",
428 },
Michael Neuling33959f82013-07-18 11:31:51 +1000429 { /* Power8E */
Michael Neuling71e18492012-10-30 19:34:15 +0000430 .pvr_mask = 0xffff0000,
431 .pvr_value = 0x004b0000,
Michael Neuling33959f82013-07-18 11:31:51 +1000432 .cpu_name = "POWER8E (raw)",
Michael Ellerman68f2f0d2014-03-14 16:00:28 +1100433 .cpu_features = CPU_FTRS_POWER8E,
Michael Neuling33959f82013-07-18 11:31:51 +1000434 .cpu_user_features = COMMON_USER_POWER8,
435 .cpu_user_features2 = COMMON_USER2_POWER8,
436 .mmu_features = MMU_FTRS_POWER8,
437 .icache_bsize = 128,
438 .dcache_bsize = 128,
439 .num_pmcs = 6,
440 .pmc_type = PPC_PMC_IBM,
441 .oprofile_cpu_type = "ppc64/power8",
442 .oprofile_type = PPC_OPROFILE_INVALID,
443 .cpu_setup = __setup_cpu_power8,
444 .cpu_restore = __restore_cpu_power8,
Mahesh Salgaonkar04407052013-10-30 20:04:56 +0530445 .flush_tlb = __flush_tlb_power8,
Mahesh Salgaonkarae744f32013-10-30 20:05:26 +0530446 .machine_check_early = __machine_check_early_realmode_p8,
Michael Neuling33959f82013-07-18 11:31:51 +1000447 .platform = "power8",
448 },
Benjamin Herrenschmidtddee09c2015-03-19 14:12:06 +1100449 { /* Power8NVL */
450 .pvr_mask = 0xffff0000,
451 .pvr_value = 0x004c0000,
452 .cpu_name = "POWER8NVL (raw)",
453 .cpu_features = CPU_FTRS_POWER8,
454 .cpu_user_features = COMMON_USER_POWER8,
455 .cpu_user_features2 = COMMON_USER2_POWER8,
456 .mmu_features = MMU_FTRS_POWER8,
457 .icache_bsize = 128,
458 .dcache_bsize = 128,
459 .num_pmcs = 6,
460 .pmc_type = PPC_PMC_IBM,
461 .oprofile_cpu_type = "ppc64/power8",
462 .oprofile_type = PPC_OPROFILE_INVALID,
463 .cpu_setup = __setup_cpu_power8,
464 .cpu_restore = __restore_cpu_power8,
465 .flush_tlb = __flush_tlb_power8,
466 .machine_check_early = __machine_check_early_realmode_p8,
467 .platform = "power8",
468 },
Joel Stanleybd6ba352014-07-18 11:41:37 +0930469 { /* Power8 DD1: Does not support doorbell IPIs */
470 .pvr_mask = 0xffffff00,
471 .pvr_value = 0x004d0100,
472 .cpu_name = "POWER8 (raw)",
473 .cpu_features = CPU_FTRS_POWER8_DD1,
474 .cpu_user_features = COMMON_USER_POWER8,
475 .cpu_user_features2 = COMMON_USER2_POWER8,
476 .mmu_features = MMU_FTRS_POWER8,
477 .icache_bsize = 128,
478 .dcache_bsize = 128,
479 .num_pmcs = 6,
480 .pmc_type = PPC_PMC_IBM,
481 .oprofile_cpu_type = "ppc64/power8",
482 .oprofile_type = PPC_OPROFILE_INVALID,
483 .cpu_setup = __setup_cpu_power8,
484 .cpu_restore = __restore_cpu_power8,
485 .flush_tlb = __flush_tlb_power8,
486 .machine_check_early = __machine_check_early_realmode_p8,
487 .platform = "power8",
488 },
Michael Neuling33959f82013-07-18 11:31:51 +1000489 { /* Power8 */
490 .pvr_mask = 0xffff0000,
491 .pvr_value = 0x004d0000,
Michael Neuling71e18492012-10-30 19:34:15 +0000492 .cpu_name = "POWER8 (raw)",
493 .cpu_features = CPU_FTRS_POWER8,
494 .cpu_user_features = COMMON_USER_POWER8,
Nishanth Aravamudan748645b2013-05-03 14:49:59 +0000495 .cpu_user_features2 = COMMON_USER2_POWER8,
Michael Neuling71e18492012-10-30 19:34:15 +0000496 .mmu_features = MMU_FTRS_POWER8,
497 .icache_bsize = 128,
498 .dcache_bsize = 128,
499 .num_pmcs = 6,
500 .pmc_type = PPC_PMC_IBM,
Michael Neuling6a60f9e72013-06-04 19:38:54 +0000501 .oprofile_cpu_type = "ppc64/power8",
502 .oprofile_type = PPC_OPROFILE_INVALID,
Michael Neuling71e18492012-10-30 19:34:15 +0000503 .cpu_setup = __setup_cpu_power8,
504 .cpu_restore = __restore_cpu_power8,
Mahesh Salgaonkar04407052013-10-30 20:04:56 +0530505 .flush_tlb = __flush_tlb_power8,
Mahesh Salgaonkarae744f32013-10-30 20:05:26 +0530506 .machine_check_early = __machine_check_early_realmode_p8,
Michael Neuling71e18492012-10-30 19:34:15 +0000507 .platform = "power8",
508 },
Michael Neulingc3ab3002016-02-19 11:16:24 +1100509 { /* Power9 */
510 .pvr_mask = 0xffff0000,
511 .pvr_value = 0x004e0000,
512 .cpu_name = "POWER9 (raw)",
513 .cpu_features = CPU_FTRS_POWER9,
514 .cpu_user_features = COMMON_USER_POWER9,
515 .cpu_user_features2 = COMMON_USER2_POWER9,
516 .mmu_features = MMU_FTRS_POWER9,
517 .icache_bsize = 128,
518 .dcache_bsize = 128,
519 .num_pmcs = 6,
520 .pmc_type = PPC_PMC_IBM,
521 .oprofile_cpu_type = "ppc64/power9",
522 .oprofile_type = PPC_OPROFILE_INVALID,
523 .cpu_setup = __setup_cpu_power9,
524 .cpu_restore = __restore_cpu_power9,
525 .flush_tlb = __flush_tlb_power9,
526 .platform = "power9",
527 },
Arnd Bergmannc902be72006-01-04 19:55:53 +0000528 { /* Cell Broadband Engine */
Stephen Rothwell49209602005-10-12 15:55:09 +1000529 .pvr_mask = 0xffff0000,
530 .pvr_value = 0x00700000,
531 .cpu_name = "Cell Broadband Engine",
532 .cpu_features = CPU_FTRS_CELL,
533 .cpu_user_features = COMMON_USER_PPC64 |
Benjamin Herrenschmidtaa5cb0212006-03-01 15:07:07 +1100534 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
535 PPC_FEATURE_SMT,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000536 .mmu_features = MMU_FTRS_CELL,
Stephen Rothwell49209602005-10-12 15:55:09 +1000537 .icache_bsize = 128,
538 .dcache_bsize = 128,
Maynard Johnson18f21902006-11-20 18:45:16 +0100539 .num_pmcs = 4,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600540 .pmc_type = PPC_PMC_IBM,
Maynard Johnson18f21902006-11-20 18:45:16 +0100541 .oprofile_cpu_type = "ppc64/cell-be",
542 .oprofile_type = PPC_OPROFILE_CELL,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100543 .platform = "ppc-cell-be",
Stephen Rothwell49209602005-10-12 15:55:09 +1000544 },
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500545 { /* PA Semi PA6T */
546 .pvr_mask = 0x7fff0000,
547 .pvr_value = 0x00900000,
548 .cpu_name = "PA6T",
549 .cpu_features = CPU_FTRS_PA6T,
550 .cpu_user_features = COMMON_USER_PA6T,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000551 .mmu_features = MMU_FTRS_PA6T,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500552 .icache_bsize = 64,
553 .dcache_bsize = 64,
554 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600555 .pmc_type = PPC_PMC_PA6T,
Olof Johansson11999192007-02-04 16:36:51 -0600556 .cpu_setup = __setup_cpu_pa6t,
557 .cpu_restore = __restore_cpu_pa6t,
Olof Johansson25fc5302007-04-18 16:38:21 +1000558 .oprofile_cpu_type = "ppc64/pa6t",
559 .oprofile_type = PPC_OPROFILE_PA6T,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500560 .platform = "pa6t",
561 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000562 { /* default match */
563 .pvr_mask = 0x00000000,
564 .pvr_value = 0x00000000,
565 .cpu_name = "POWER4 (compatible)",
566 .cpu_features = CPU_FTRS_COMPATIBLE,
567 .cpu_user_features = COMMON_USER_PPC64,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000568 .mmu_features = MMU_FTRS_DEFAULT_HPTE_ARCH_V2,
Stephen Rothwell49209602005-10-12 15:55:09 +1000569 .icache_bsize = 128,
570 .dcache_bsize = 128,
571 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600572 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100573 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000574 }
Benjamin Herrenschmidt2d27cfd2009-07-23 23:15:59 +0000575#endif /* CONFIG_PPC_BOOK3S_64 */
Benjamin Herrenschmidt2d27cfd2009-07-23 23:15:59 +0000576
Stephen Rothwell49209602005-10-12 15:55:09 +1000577#ifdef CONFIG_PPC32
Michael Ellerman1e07a0a2014-07-10 12:29:26 +1000578#ifdef CONFIG_PPC_BOOK3S_32
Stephen Rothwell49209602005-10-12 15:55:09 +1000579 { /* 601 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700580 .pvr_mask = 0xffff0000,
581 .pvr_value = 0x00010000,
582 .cpu_name = "601",
Kumar Gala10b35d92005-09-23 14:08:58 -0500583 .cpu_features = CPU_FTRS_PPC601,
Stephen Rothwell49209602005-10-12 15:55:09 +1000584 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
Paul Mackerras98599012005-10-22 16:51:34 +1000585 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000586 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700587 .icache_bsize = 32,
588 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100589 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100590 .platform = "ppc601",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700591 },
592 { /* 603 */
593 .pvr_mask = 0xffff0000,
594 .pvr_value = 0x00030000,
595 .cpu_name = "603",
Kumar Gala10b35d92005-09-23 14:08:58 -0500596 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000597 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000598 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700599 .icache_bsize = 32,
600 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100601 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100602 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100603 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700604 },
605 { /* 603e */
606 .pvr_mask = 0xffff0000,
607 .pvr_value = 0x00060000,
608 .cpu_name = "603e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500609 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000610 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000611 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700612 .icache_bsize = 32,
613 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100614 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100615 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100616 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700617 },
618 { /* 603ev */
619 .pvr_mask = 0xffff0000,
620 .pvr_value = 0x00070000,
621 .cpu_name = "603ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500622 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000623 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000624 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700625 .icache_bsize = 32,
626 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100627 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100628 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100629 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700630 },
631 { /* 604 */
632 .pvr_mask = 0xffff0000,
633 .pvr_value = 0x00040000,
634 .cpu_name = "604",
Kumar Gala10b35d92005-09-23 14:08:58 -0500635 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000636 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000637 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700638 .icache_bsize = 32,
639 .dcache_bsize = 32,
640 .num_pmcs = 2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100641 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100642 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100643 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700644 },
645 { /* 604e */
646 .pvr_mask = 0xfffff000,
647 .pvr_value = 0x00090000,
648 .cpu_name = "604e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500649 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000650 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000651 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700652 .icache_bsize = 32,
653 .dcache_bsize = 32,
654 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100655 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100656 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100657 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700658 },
659 { /* 604r */
660 .pvr_mask = 0xffff0000,
661 .pvr_value = 0x00090000,
662 .cpu_name = "604r",
Kumar Gala10b35d92005-09-23 14:08:58 -0500663 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000664 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000665 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700666 .icache_bsize = 32,
667 .dcache_bsize = 32,
668 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100669 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100670 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100671 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700672 },
673 { /* 604ev */
674 .pvr_mask = 0xffff0000,
675 .pvr_value = 0x000a0000,
676 .cpu_name = "604ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500677 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000678 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000679 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700680 .icache_bsize = 32,
681 .dcache_bsize = 32,
682 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100683 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100684 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100685 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700686 },
687 { /* 740/750 (0x4202, don't support TAU ?) */
688 .pvr_mask = 0xffffffff,
689 .pvr_value = 0x00084202,
690 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500691 .cpu_features = CPU_FTRS_740_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000692 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000693 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700694 .icache_bsize = 32,
695 .dcache_bsize = 32,
696 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100697 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100698 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100699 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700700 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700701 { /* 750CX (80100 and 8010x?) */
702 .pvr_mask = 0xfffffff0,
703 .pvr_value = 0x00080100,
704 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500705 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000706 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000707 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700708 .icache_bsize = 32,
709 .dcache_bsize = 32,
710 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100711 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100712 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100713 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700714 },
715 { /* 750CX (82201 and 82202) */
716 .pvr_mask = 0xfffffff0,
717 .pvr_value = 0x00082200,
718 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500719 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000720 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000721 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700722 .icache_bsize = 32,
723 .dcache_bsize = 32,
724 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000725 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100726 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100727 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100728 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700729 },
730 { /* 750CXe (82214) */
731 .pvr_mask = 0xfffffff0,
732 .pvr_value = 0x00082210,
733 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500734 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000735 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000736 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700737 .icache_bsize = 32,
738 .dcache_bsize = 32,
739 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000740 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100741 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100742 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100743 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700744 },
Arthur Othieno7c316252005-09-03 15:55:52 -0700745 { /* 750CXe "Gekko" (83214) */
746 .pvr_mask = 0xffffffff,
747 .pvr_value = 0x00083214,
748 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500749 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000750 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000751 .mmu_features = MMU_FTR_HPTE_TABLE,
Arthur Othieno7c316252005-09-03 15:55:52 -0700752 .icache_bsize = 32,
753 .dcache_bsize = 32,
754 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000755 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100756 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100757 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100758 .platform = "ppc750",
Arthur Othieno7c316252005-09-03 15:55:52 -0700759 },
Albert Herranz45158dc2009-12-12 06:31:46 +0000760 { /* 750CL (and "Broadway") */
761 .pvr_mask = 0xfffff0e0,
762 .pvr_value = 0x00087000,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500763 .cpu_name = "750CL",
Josh Boyera14c4502007-04-13 04:33:25 +1000764 .cpu_features = CPU_FTRS_750CL,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500765 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000766 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500767 .icache_bsize = 32,
768 .dcache_bsize = 32,
769 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000770 .pmc_type = PPC_PMC_IBM,
Josh Boyera14c4502007-04-13 04:33:25 +1000771 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100772 .machine_check = machine_check_generic,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500773 .platform = "ppc750",
Dragos Tatulea04f56534772009-09-16 11:58:15 +0300774 .oprofile_cpu_type = "ppc/750",
775 .oprofile_type = PPC_OPROFILE_G4,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500776 },
Arthur Othienoac1ff042005-09-03 15:55:51 -0700777 { /* 745/755 */
778 .pvr_mask = 0xfffff000,
779 .pvr_value = 0x00083000,
780 .cpu_name = "745/755",
Kumar Gala10b35d92005-09-23 14:08:58 -0500781 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000782 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000783 .mmu_features = MMU_FTR_HPTE_TABLE,
Arthur Othienoac1ff042005-09-03 15:55:51 -0700784 .icache_bsize = 32,
785 .dcache_bsize = 32,
786 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000787 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100788 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100789 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100790 .platform = "ppc750",
Arthur Othienoac1ff042005-09-03 15:55:51 -0700791 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700792 { /* 750FX rev 1.x */
793 .pvr_mask = 0xffffff00,
794 .pvr_value = 0x70000100,
795 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500796 .cpu_features = CPU_FTRS_750FX1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000797 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000798 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700799 .icache_bsize = 32,
800 .dcache_bsize = 32,
801 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000802 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100803 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100804 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100805 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000806 .oprofile_cpu_type = "ppc/750",
807 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700808 },
809 { /* 750FX rev 2.0 must disable HID0[DPM] */
810 .pvr_mask = 0xffffffff,
811 .pvr_value = 0x70000200,
812 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500813 .cpu_features = CPU_FTRS_750FX2,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000814 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000815 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700816 .icache_bsize = 32,
817 .dcache_bsize = 32,
818 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000819 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100820 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100821 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100822 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000823 .oprofile_cpu_type = "ppc/750",
824 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700825 },
826 { /* 750FX (All revs except 2.0) */
827 .pvr_mask = 0xffff0000,
828 .pvr_value = 0x70000000,
829 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500830 .cpu_features = CPU_FTRS_750FX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000831 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000832 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700833 .icache_bsize = 32,
834 .dcache_bsize = 32,
835 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000836 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100837 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100838 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100839 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000840 .oprofile_cpu_type = "ppc/750",
841 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700842 },
843 { /* 750GX */
844 .pvr_mask = 0xffff0000,
845 .pvr_value = 0x70020000,
846 .cpu_name = "750GX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500847 .cpu_features = CPU_FTRS_750GX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000848 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000849 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700850 .icache_bsize = 32,
851 .dcache_bsize = 32,
852 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000853 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100854 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100855 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100856 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000857 .oprofile_cpu_type = "ppc/750",
858 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700859 },
860 { /* 740/750 (L2CR bit need fixup for 740) */
861 .pvr_mask = 0xffff0000,
862 .pvr_value = 0x00080000,
863 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500864 .cpu_features = CPU_FTRS_740,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000865 .cpu_user_features = COMMON_USER | 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_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100871 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100872 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100873 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700874 },
875 { /* 7400 rev 1.1 ? (no TAU) */
876 .pvr_mask = 0xffffffff,
877 .pvr_value = 0x000c1101,
878 .cpu_name = "7400 (1.1)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500879 .cpu_features = CPU_FTRS_7400_NOTAU,
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 = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000886 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100887 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100888 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100889 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700890 },
891 { /* 7400 */
892 .pvr_mask = 0xffff0000,
893 .pvr_value = 0x000c0000,
894 .cpu_name = "7400",
Kumar Gala10b35d92005-09-23 14:08:58 -0500895 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000896 .cpu_user_features = COMMON_USER |
897 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000898 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700899 .icache_bsize = 32,
900 .dcache_bsize = 32,
901 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000902 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100903 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100904 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100905 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700906 },
907 { /* 7410 */
908 .pvr_mask = 0xffff0000,
909 .pvr_value = 0x800c0000,
910 .cpu_name = "7410",
Kumar Gala10b35d92005-09-23 14:08:58 -0500911 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000912 .cpu_user_features = COMMON_USER |
913 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000914 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700915 .icache_bsize = 32,
916 .dcache_bsize = 32,
917 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000918 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100919 .cpu_setup = __setup_cpu_7410,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100920 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100921 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700922 },
923 { /* 7450 2.0 - no doze/nap */
924 .pvr_mask = 0xffffffff,
925 .pvr_value = 0x80000200,
926 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500927 .cpu_features = CPU_FTRS_7450_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000928 .cpu_user_features = COMMON_USER |
929 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000930 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700931 .icache_bsize = 32,
932 .dcache_bsize = 32,
933 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000934 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600935 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600936 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000937 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100938 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100939 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700940 },
941 { /* 7450 2.1 */
942 .pvr_mask = 0xffffffff,
943 .pvr_value = 0x80000201,
944 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500945 .cpu_features = CPU_FTRS_7450_21,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000946 .cpu_user_features = COMMON_USER |
947 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000948 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700949 .icache_bsize = 32,
950 .dcache_bsize = 32,
951 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000952 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600953 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600954 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000955 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100956 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100957 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700958 },
959 { /* 7450 2.3 and newer */
960 .pvr_mask = 0xffff0000,
961 .pvr_value = 0x80000000,
962 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500963 .cpu_features = CPU_FTRS_7450_23,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000964 .cpu_user_features = COMMON_USER |
965 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000966 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700967 .icache_bsize = 32,
968 .dcache_bsize = 32,
969 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000970 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600971 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600972 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000973 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100974 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100975 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700976 },
977 { /* 7455 rev 1.x */
978 .pvr_mask = 0xffffff00,
979 .pvr_value = 0x80010100,
980 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500981 .cpu_features = CPU_FTRS_7455_1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000982 .cpu_user_features = COMMON_USER |
983 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000984 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700985 .icache_bsize = 32,
986 .dcache_bsize = 32,
987 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000988 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600989 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600990 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000991 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100992 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100993 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700994 },
995 { /* 7455 rev 2.0 */
996 .pvr_mask = 0xffffffff,
997 .pvr_value = 0x80010200,
998 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500999 .cpu_features = CPU_FTRS_7455_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001000 .cpu_user_features = COMMON_USER |
1001 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001002 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001003 .icache_bsize = 32,
1004 .dcache_bsize = 32,
1005 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001006 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001007 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001008 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001009 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001010 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001011 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001012 },
1013 { /* 7455 others */
1014 .pvr_mask = 0xffff0000,
1015 .pvr_value = 0x80010000,
1016 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -05001017 .cpu_features = CPU_FTRS_7455,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001018 .cpu_user_features = COMMON_USER |
1019 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001020 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001021 .icache_bsize = 32,
1022 .dcache_bsize = 32,
1023 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001024 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001025 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001026 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001027 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001028 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001029 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001030 },
1031 { /* 7447/7457 Rev 1.0 */
1032 .pvr_mask = 0xffffffff,
1033 .pvr_value = 0x80020100,
1034 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -05001035 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001036 .cpu_user_features = COMMON_USER |
1037 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001038 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001039 .icache_bsize = 32,
1040 .dcache_bsize = 32,
1041 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001042 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001043 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001044 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001045 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001046 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001047 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001048 },
1049 { /* 7447/7457 Rev 1.1 */
1050 .pvr_mask = 0xffffffff,
1051 .pvr_value = 0x80020101,
1052 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -05001053 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001054 .cpu_user_features = COMMON_USER |
1055 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001056 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001057 .icache_bsize = 32,
1058 .dcache_bsize = 32,
1059 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001060 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001061 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001062 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001063 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001064 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001065 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001066 },
1067 { /* 7447/7457 Rev 1.2 and later */
1068 .pvr_mask = 0xffff0000,
1069 .pvr_value = 0x80020000,
1070 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -05001071 .cpu_features = CPU_FTRS_7447,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001072 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001073 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001074 .icache_bsize = 32,
1075 .dcache_bsize = 32,
1076 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001077 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001078 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001079 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001080 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001081 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001082 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001083 },
1084 { /* 7447A */
1085 .pvr_mask = 0xffff0000,
1086 .pvr_value = 0x80030000,
1087 .cpu_name = "7447A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001088 .cpu_features = CPU_FTRS_7447A,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001089 .cpu_user_features = COMMON_USER |
1090 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001091 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001092 .icache_bsize = 32,
1093 .dcache_bsize = 32,
1094 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001095 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001096 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001097 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001098 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001099 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001100 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001101 },
Kumar Galabbde6302005-09-03 15:55:55 -07001102 { /* 7448 */
1103 .pvr_mask = 0xffff0000,
1104 .pvr_value = 0x80040000,
1105 .cpu_name = "7448",
James.Yang3d372542007-05-02 16:34:43 -05001106 .cpu_features = CPU_FTRS_7448,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001107 .cpu_user_features = COMMON_USER |
1108 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001109 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Kumar Galabbde6302005-09-03 15:55:55 -07001110 .icache_bsize = 32,
1111 .dcache_bsize = 32,
1112 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001113 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001114 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001115 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001116 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001117 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001118 .platform = "ppc7450",
Kumar Galabbde6302005-09-03 15:55:55 -07001119 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001120 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
1121 .pvr_mask = 0x7fff0000,
1122 .pvr_value = 0x00810000,
1123 .cpu_name = "82xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001124 .cpu_features = CPU_FTRS_82XX,
Stephen Rothwell49209602005-10-12 15:55:09 +10001125 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001126 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001127 .icache_bsize = 32,
1128 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001129 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001130 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001131 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001132 },
1133 { /* All G2_LE (603e core, plus some) have the same pvr */
1134 .pvr_mask = 0x7fff0000,
1135 .pvr_value = 0x00820000,
1136 .cpu_name = "G2_LE",
Kumar Gala10b35d92005-09-23 14:08:58 -05001137 .cpu_features = CPU_FTRS_G2_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +10001138 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001139 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001140 .icache_bsize = 32,
1141 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001142 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001143 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001144 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001145 },
Kim Phillips6c4a2502006-10-02 20:10:24 -05001146 { /* e300c1 (a 603e core, plus some) on 83xx */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001147 .pvr_mask = 0x7fff0000,
1148 .pvr_value = 0x00830000,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001149 .cpu_name = "e300c1",
Kumar Gala10b35d92005-09-23 14:08:58 -05001150 .cpu_features = CPU_FTRS_E300,
Stephen Rothwell49209602005-10-12 15:55:09 +10001151 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001152 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001153 .icache_bsize = 32,
1154 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001155 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001156 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001157 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001158 },
Kim Phillips6c4a2502006-10-02 20:10:24 -05001159 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
1160 .pvr_mask = 0x7fff0000,
1161 .pvr_value = 0x00840000,
1162 .cpu_name = "e300c2",
Kim Phillipsaa42c692006-12-08 02:43:30 -06001163 .cpu_features = CPU_FTRS_E300C2,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001164 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Kumar Gala2319f122009-03-19 03:55:41 +00001165 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1166 MMU_FTR_NEED_DTLB_SW_LRU,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001167 .icache_bsize = 32,
1168 .dcache_bsize = 32,
1169 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001170 .machine_check = machine_check_generic,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001171 .platform = "ppc603",
1172 },
Li Yanga58d5242007-10-19 19:38:42 +08001173 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
Scott Wood57933f82006-12-01 12:57:05 -06001174 .pvr_mask = 0x7fff0000,
1175 .pvr_value = 0x00850000,
1176 .cpu_name = "e300c3",
1177 .cpu_features = CPU_FTRS_E300,
1178 .cpu_user_features = COMMON_USER,
Kumar Gala2319f122009-03-19 03:55:41 +00001179 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1180 MMU_FTR_NEED_DTLB_SW_LRU,
Scott Wood57933f82006-12-01 12:57:05 -06001181 .icache_bsize = 32,
1182 .dcache_bsize = 32,
1183 .cpu_setup = __setup_cpu_603,
Esben Haabendal974ff4e2015-01-06 12:26:59 +01001184 .machine_check = machine_check_generic,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001185 .num_pmcs = 4,
1186 .oprofile_cpu_type = "ppc/e300",
1187 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Scott Wood57933f82006-12-01 12:57:05 -06001188 .platform = "ppc603",
1189 },
Li Yanga58d5242007-10-19 19:38:42 +08001190 { /* e300c4 (e300c1, plus one IU) */
1191 .pvr_mask = 0x7fff0000,
1192 .pvr_value = 0x00860000,
1193 .cpu_name = "e300c4",
1194 .cpu_features = CPU_FTRS_E300,
1195 .cpu_user_features = COMMON_USER,
Kumar Gala2319f122009-03-19 03:55:41 +00001196 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1197 MMU_FTR_NEED_DTLB_SW_LRU,
Li Yanga58d5242007-10-19 19:38:42 +08001198 .icache_bsize = 32,
1199 .dcache_bsize = 32,
1200 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001201 .machine_check = machine_check_generic,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001202 .num_pmcs = 4,
1203 .oprofile_cpu_type = "ppc/e300",
1204 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Li Yanga58d5242007-10-19 19:38:42 +08001205 .platform = "ppc603",
1206 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001207 { /* default match, we assume split I/D cache & TB (non-601)... */
1208 .pvr_mask = 0x00000000,
1209 .pvr_value = 0x00000000,
1210 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -05001211 .cpu_features = CPU_FTRS_CLASSIC32,
Stephen Rothwell49209602005-10-12 15:55:09 +10001212 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001213 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001214 .icache_bsize = 32,
1215 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001216 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001217 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001218 },
Michael Ellerman1e07a0a2014-07-10 12:29:26 +10001219#endif /* CONFIG_PPC_BOOK3S_32 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001220#ifdef CONFIG_8xx
1221 { /* 8xx */
1222 .pvr_mask = 0xffff0000,
1223 .pvr_value = 0x00500000,
1224 .cpu_name = "8xx",
1225 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1226 * if the 8xx code is there.... */
Kumar Gala10b35d92005-09-23 14:08:58 -05001227 .cpu_features = CPU_FTRS_8XX,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001228 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001229 .mmu_features = MMU_FTR_TYPE_8xx,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001230 .icache_bsize = 16,
1231 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001232 .platform = "ppc823",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001233 },
1234#endif /* CONFIG_8xx */
1235#ifdef CONFIG_40x
1236 { /* 403GC */
1237 .pvr_mask = 0xffffff00,
1238 .pvr_value = 0x00200200,
1239 .cpu_name = "403GC",
Kumar Gala10b35d92005-09-23 14:08:58 -05001240 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001241 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001242 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001243 .icache_bsize = 16,
1244 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001245 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001246 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001247 },
1248 { /* 403GCX */
1249 .pvr_mask = 0xffffff00,
1250 .pvr_value = 0x00201400,
1251 .cpu_name = "403GCX",
Kumar Gala10b35d92005-09-23 14:08:58 -05001252 .cpu_features = CPU_FTRS_40X,
Paul Mackerras98599012005-10-22 16:51:34 +10001253 .cpu_user_features = PPC_FEATURE_32 |
1254 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001255 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001256 .icache_bsize = 16,
1257 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001258 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001259 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001260 },
1261 { /* 403G ?? */
1262 .pvr_mask = 0xffff0000,
1263 .pvr_value = 0x00200000,
1264 .cpu_name = "403G ??",
Kumar Gala10b35d92005-09-23 14:08:58 -05001265 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001266 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001267 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001268 .icache_bsize = 16,
1269 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001270 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001271 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001272 },
1273 { /* 405GP */
1274 .pvr_mask = 0xffff0000,
1275 .pvr_value = 0x40110000,
1276 .cpu_name = "405GP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001277 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001278 .cpu_user_features = PPC_FEATURE_32 |
1279 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001280 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001281 .icache_bsize = 32,
1282 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001283 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001284 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001285 },
1286 { /* STB 03xxx */
1287 .pvr_mask = 0xffff0000,
1288 .pvr_value = 0x40130000,
1289 .cpu_name = "STB03xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001290 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001291 .cpu_user_features = PPC_FEATURE_32 |
1292 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001293 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001294 .icache_bsize = 32,
1295 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001296 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001297 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001298 },
1299 { /* STB 04xxx */
1300 .pvr_mask = 0xffff0000,
1301 .pvr_value = 0x41810000,
1302 .cpu_name = "STB04xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001303 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001304 .cpu_user_features = PPC_FEATURE_32 |
1305 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001306 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001307 .icache_bsize = 32,
1308 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001309 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001310 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001311 },
1312 { /* NP405L */
1313 .pvr_mask = 0xffff0000,
1314 .pvr_value = 0x41610000,
1315 .cpu_name = "NP405L",
Kumar Gala10b35d92005-09-23 14:08:58 -05001316 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001317 .cpu_user_features = PPC_FEATURE_32 |
1318 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001319 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001320 .icache_bsize = 32,
1321 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001322 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001323 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001324 },
1325 { /* NP4GS3 */
1326 .pvr_mask = 0xffff0000,
1327 .pvr_value = 0x40B10000,
1328 .cpu_name = "NP4GS3",
Kumar Gala10b35d92005-09-23 14:08:58 -05001329 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001330 .cpu_user_features = PPC_FEATURE_32 |
1331 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001332 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001333 .icache_bsize = 32,
1334 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001335 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001336 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001337 },
1338 { /* NP405H */
1339 .pvr_mask = 0xffff0000,
1340 .pvr_value = 0x41410000,
1341 .cpu_name = "NP405H",
Kumar Gala10b35d92005-09-23 14:08:58 -05001342 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001343 .cpu_user_features = PPC_FEATURE_32 |
1344 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001345 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001346 .icache_bsize = 32,
1347 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001348 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001349 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001350 },
1351 { /* 405GPr */
1352 .pvr_mask = 0xffff0000,
1353 .pvr_value = 0x50910000,
1354 .cpu_name = "405GPr",
Kumar Gala10b35d92005-09-23 14:08:58 -05001355 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001356 .cpu_user_features = PPC_FEATURE_32 |
1357 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001358 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001359 .icache_bsize = 32,
1360 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001361 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001362 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001363 },
1364 { /* STBx25xx */
1365 .pvr_mask = 0xffff0000,
1366 .pvr_value = 0x51510000,
1367 .cpu_name = "STBx25xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001368 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001369 .cpu_user_features = PPC_FEATURE_32 |
1370 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001371 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001372 .icache_bsize = 32,
1373 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001374 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001375 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001376 },
1377 { /* 405LP */
1378 .pvr_mask = 0xffff0000,
1379 .pvr_value = 0x41F10000,
1380 .cpu_name = "405LP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001381 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001382 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001383 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001384 .icache_bsize = 32,
1385 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001386 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001387 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001388 },
1389 { /* Xilinx Virtex-II Pro */
Grant C. Likely72646c72006-01-19 01:13:20 -07001390 .pvr_mask = 0xfffff000,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001391 .pvr_value = 0x20010000,
1392 .cpu_name = "Virtex-II Pro",
Kumar Gala10b35d92005-09-23 14:08:58 -05001393 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001394 .cpu_user_features = PPC_FEATURE_32 |
1395 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001396 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001397 .icache_bsize = 32,
1398 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001399 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001400 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001401 },
Grant C. Likely72646c72006-01-19 01:13:20 -07001402 { /* Xilinx Virtex-4 FX */
1403 .pvr_mask = 0xfffff000,
1404 .pvr_value = 0x20011000,
1405 .cpu_name = "Virtex-4 FX",
1406 .cpu_features = CPU_FTRS_40X,
1407 .cpu_user_features = PPC_FEATURE_32 |
1408 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001409 .mmu_features = MMU_FTR_TYPE_40x,
Grant C. Likely72646c72006-01-19 01:13:20 -07001410 .icache_bsize = 32,
1411 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001412 .machine_check = machine_check_4xx,
Peter Bergner838fdb42006-09-14 14:18:38 -05001413 .platform = "ppc405",
Grant C. Likely72646c72006-01-19 01:13:20 -07001414 },
Eugene Suroveginad95d602005-06-07 13:22:09 -07001415 { /* 405EP */
1416 .pvr_mask = 0xffff0000,
1417 .pvr_value = 0x51210000,
1418 .cpu_name = "405EP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001419 .cpu_features = CPU_FTRS_40X,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001420 .cpu_user_features = PPC_FEATURE_32 |
1421 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001422 .mmu_features = MMU_FTR_TYPE_40x,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001423 .icache_bsize = 32,
1424 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001425 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001426 .platform = "ppc405",
Eugene Suroveginad95d602005-06-07 13:22:09 -07001427 },
Lee Nipperff349102010-07-09 01:17:16 +00001428 { /* 405EX Rev. A/B with Security */
1429 .pvr_mask = 0xffff000f,
1430 .pvr_value = 0x12910007,
1431 .cpu_name = "405EX Rev. A/B",
Stefan Roese5d8476c2007-10-11 22:08:14 +10001432 .cpu_features = CPU_FTRS_40X,
1433 .cpu_user_features = PPC_FEATURE_32 |
1434 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001435 .mmu_features = MMU_FTR_TYPE_40x,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001436 .icache_bsize = 32,
1437 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001438 .machine_check = machine_check_4xx,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001439 .platform = "ppc405",
1440 },
Lee Nipperff349102010-07-09 01:17:16 +00001441 { /* 405EX Rev. C without Security */
1442 .pvr_mask = 0xffff000f,
1443 .pvr_value = 0x1291000d,
1444 .cpu_name = "405EX Rev. C",
1445 .cpu_features = CPU_FTRS_40X,
1446 .cpu_user_features = PPC_FEATURE_32 |
1447 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1448 .mmu_features = MMU_FTR_TYPE_40x,
1449 .icache_bsize = 32,
1450 .dcache_bsize = 32,
1451 .machine_check = machine_check_4xx,
1452 .platform = "ppc405",
1453 },
1454 { /* 405EX Rev. C with Security */
1455 .pvr_mask = 0xffff000f,
1456 .pvr_value = 0x1291000f,
1457 .cpu_name = "405EX Rev. C",
1458 .cpu_features = CPU_FTRS_40X,
1459 .cpu_user_features = PPC_FEATURE_32 |
1460 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1461 .mmu_features = MMU_FTR_TYPE_40x,
1462 .icache_bsize = 32,
1463 .dcache_bsize = 32,
1464 .machine_check = machine_check_4xx,
1465 .platform = "ppc405",
1466 },
1467 { /* 405EX Rev. D without Security */
1468 .pvr_mask = 0xffff000f,
1469 .pvr_value = 0x12910003,
1470 .cpu_name = "405EX Rev. D",
1471 .cpu_features = CPU_FTRS_40X,
1472 .cpu_user_features = PPC_FEATURE_32 |
1473 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1474 .mmu_features = MMU_FTR_TYPE_40x,
1475 .icache_bsize = 32,
1476 .dcache_bsize = 32,
1477 .machine_check = machine_check_4xx,
1478 .platform = "ppc405",
1479 },
1480 { /* 405EX Rev. D with Security */
1481 .pvr_mask = 0xffff000f,
1482 .pvr_value = 0x12910005,
1483 .cpu_name = "405EX Rev. D",
1484 .cpu_features = CPU_FTRS_40X,
1485 .cpu_user_features = PPC_FEATURE_32 |
1486 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1487 .mmu_features = MMU_FTR_TYPE_40x,
1488 .icache_bsize = 32,
1489 .dcache_bsize = 32,
1490 .machine_check = machine_check_4xx,
1491 .platform = "ppc405",
1492 },
1493 { /* 405EXr Rev. A/B without Security */
1494 .pvr_mask = 0xffff000f,
1495 .pvr_value = 0x12910001,
1496 .cpu_name = "405EXr Rev. A/B",
1497 .cpu_features = CPU_FTRS_40X,
1498 .cpu_user_features = PPC_FEATURE_32 |
1499 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1500 .mmu_features = MMU_FTR_TYPE_40x,
1501 .icache_bsize = 32,
1502 .dcache_bsize = 32,
1503 .machine_check = machine_check_4xx,
1504 .platform = "ppc405",
1505 },
1506 { /* 405EXr Rev. C without Security */
1507 .pvr_mask = 0xffff000f,
1508 .pvr_value = 0x12910009,
1509 .cpu_name = "405EXr Rev. C",
1510 .cpu_features = CPU_FTRS_40X,
1511 .cpu_user_features = PPC_FEATURE_32 |
1512 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1513 .mmu_features = MMU_FTR_TYPE_40x,
1514 .icache_bsize = 32,
1515 .dcache_bsize = 32,
1516 .machine_check = machine_check_4xx,
1517 .platform = "ppc405",
1518 },
1519 { /* 405EXr Rev. C with Security */
1520 .pvr_mask = 0xffff000f,
1521 .pvr_value = 0x1291000b,
1522 .cpu_name = "405EXr Rev. C",
1523 .cpu_features = CPU_FTRS_40X,
1524 .cpu_user_features = PPC_FEATURE_32 |
1525 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1526 .mmu_features = MMU_FTR_TYPE_40x,
1527 .icache_bsize = 32,
1528 .dcache_bsize = 32,
1529 .machine_check = machine_check_4xx,
1530 .platform = "ppc405",
1531 },
1532 { /* 405EXr Rev. D without Security */
1533 .pvr_mask = 0xffff000f,
Stefan Roeseb676d842008-01-15 18:09:15 +11001534 .pvr_value = 0x12910000,
Lee Nipperff349102010-07-09 01:17:16 +00001535 .cpu_name = "405EXr Rev. D",
1536 .cpu_features = CPU_FTRS_40X,
1537 .cpu_user_features = PPC_FEATURE_32 |
1538 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1539 .mmu_features = MMU_FTR_TYPE_40x,
1540 .icache_bsize = 32,
1541 .dcache_bsize = 32,
1542 .machine_check = machine_check_4xx,
1543 .platform = "ppc405",
1544 },
1545 { /* 405EXr Rev. D with Security */
1546 .pvr_mask = 0xffff000f,
1547 .pvr_value = 0x12910002,
1548 .cpu_name = "405EXr Rev. D",
Stefan Roeseb676d842008-01-15 18:09:15 +11001549 .cpu_features = CPU_FTRS_40X,
1550 .cpu_user_features = PPC_FEATURE_32 |
1551 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001552 .mmu_features = MMU_FTR_TYPE_40x,
Stefan Roeseb676d842008-01-15 18:09:15 +11001553 .icache_bsize = 32,
1554 .dcache_bsize = 32,
1555 .machine_check = machine_check_4xx,
1556 .platform = "ppc405",
1557 },
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001558 {
1559 /* 405EZ */
1560 .pvr_mask = 0xffff0000,
1561 .pvr_value = 0x41510000,
1562 .cpu_name = "405EZ",
1563 .cpu_features = CPU_FTRS_40X,
1564 .cpu_user_features = PPC_FEATURE_32 |
1565 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001566 .mmu_features = MMU_FTR_TYPE_40x,
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001567 .icache_bsize = 32,
1568 .dcache_bsize = 32,
1569 .machine_check = machine_check_4xx,
1570 .platform = "ppc405",
1571 },
Tanmay Inamdard5b9ee72011-11-28 21:01:41 +00001572 { /* APM8018X */
1573 .pvr_mask = 0xffff0000,
1574 .pvr_value = 0x7ff11432,
1575 .cpu_name = "APM8018X",
1576 .cpu_features = CPU_FTRS_40X,
1577 .cpu_user_features = PPC_FEATURE_32 |
1578 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1579 .mmu_features = MMU_FTR_TYPE_40x,
1580 .icache_bsize = 32,
1581 .dcache_bsize = 32,
1582 .machine_check = machine_check_4xx,
1583 .platform = "ppc405",
1584 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001585 { /* default match */
1586 .pvr_mask = 0x00000000,
1587 .pvr_value = 0x00000000,
1588 .cpu_name = "(generic 40x PPC)",
1589 .cpu_features = CPU_FTRS_40X,
1590 .cpu_user_features = PPC_FEATURE_32 |
1591 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001592 .mmu_features = MMU_FTR_TYPE_40x,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001593 .icache_bsize = 32,
1594 .dcache_bsize = 32,
1595 .machine_check = machine_check_4xx,
1596 .platform = "ppc405",
1597 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001598
1599#endif /* CONFIG_40x */
1600#ifdef CONFIG_44x
Matt Porterc9cf73a2005-07-31 22:34:52 -07001601 {
1602 .pvr_mask = 0xf0000fff,
1603 .pvr_value = 0x40000850,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001604 .cpu_name = "440GR Rev. A",
1605 .cpu_features = CPU_FTRS_44X,
1606 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001607 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001608 .icache_bsize = 32,
1609 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001610 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001611 .platform = "ppc440",
1612 },
1613 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1614 .pvr_mask = 0xf0000fff,
1615 .pvr_value = 0x40000858,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001616 .cpu_name = "440EP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001617 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001618 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001619 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001620 .icache_bsize = 32,
1621 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001622 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001623 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001624 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001625 },
1626 {
1627 .pvr_mask = 0xf0000fff,
1628 .pvr_value = 0x400008d3,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001629 .cpu_name = "440GR Rev. B",
1630 .cpu_features = CPU_FTRS_44X,
1631 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001632 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001633 .icache_bsize = 32,
1634 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001635 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001636 .platform = "ppc440",
1637 },
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001638 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1639 .pvr_mask = 0xf0000ff7,
1640 .pvr_value = 0x400008d4,
1641 .cpu_name = "440EP Rev. C",
1642 .cpu_features = CPU_FTRS_44X,
1643 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001644 .mmu_features = MMU_FTR_TYPE_44x,
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001645 .icache_bsize = 32,
1646 .dcache_bsize = 32,
1647 .cpu_setup = __setup_cpu_440ep,
1648 .machine_check = machine_check_4xx,
1649 .platform = "ppc440",
1650 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001651 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1652 .pvr_mask = 0xf0000fff,
1653 .pvr_value = 0x400008db,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001654 .cpu_name = "440EP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001655 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001656 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001657 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001658 .icache_bsize = 32,
1659 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001660 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001661 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001662 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001663 },
Valentine Barshak15fc9932007-08-29 17:40:30 +04001664 { /* 440GRX */
1665 .pvr_mask = 0xf0000ffb,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001666 .pvr_value = 0x200008D0,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001667 .cpu_name = "440GRX",
1668 .cpu_features = CPU_FTRS_44X,
1669 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001670 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001671 .icache_bsize = 32,
1672 .dcache_bsize = 32,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001673 .cpu_setup = __setup_cpu_440grx,
Valentine Barshakb2be3b12007-12-22 03:22:23 +11001674 .machine_check = machine_check_440A,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001675 .platform = "ppc440",
Valentine Barshak15fc9932007-08-29 17:40:30 +04001676 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001677 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1678 .pvr_mask = 0xf0000ffb,
1679 .pvr_value = 0x200008D8,
1680 .cpu_name = "440EPX",
1681 .cpu_features = CPU_FTRS_44X,
1682 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001683 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001684 .icache_bsize = 32,
1685 .dcache_bsize = 32,
1686 .cpu_setup = __setup_cpu_440epx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001687 .machine_check = machine_check_440A,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001688 .platform = "ppc440",
1689 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001690 { /* 440GP Rev. B */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001691 .pvr_mask = 0xf0000fff,
1692 .pvr_value = 0x40000440,
1693 .cpu_name = "440GP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001694 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001695 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001696 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001697 .icache_bsize = 32,
1698 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001699 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001700 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001701 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001702 { /* 440GP Rev. C */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001703 .pvr_mask = 0xf0000fff,
1704 .pvr_value = 0x40000481,
1705 .cpu_name = "440GP Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001706 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001707 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001708 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001709 .icache_bsize = 32,
1710 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001711 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001712 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001713 },
1714 { /* 440GX Rev. A */
1715 .pvr_mask = 0xf0000fff,
1716 .pvr_value = 0x50000850,
1717 .cpu_name = "440GX Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001718 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001719 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001720 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001721 .icache_bsize = 32,
1722 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001723 .cpu_setup = __setup_cpu_440gx,
1724 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001725 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001726 },
1727 { /* 440GX Rev. B */
1728 .pvr_mask = 0xf0000fff,
1729 .pvr_value = 0x50000851,
1730 .cpu_name = "440GX Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001731 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001732 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001733 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001734 .icache_bsize = 32,
1735 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001736 .cpu_setup = __setup_cpu_440gx,
1737 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001738 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001739 },
1740 { /* 440GX Rev. C */
1741 .pvr_mask = 0xf0000fff,
1742 .pvr_value = 0x50000892,
1743 .cpu_name = "440GX Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001744 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001745 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001746 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001747 .icache_bsize = 32,
1748 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001749 .cpu_setup = __setup_cpu_440gx,
1750 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001751 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001752 },
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001753 { /* 440GX Rev. F */
1754 .pvr_mask = 0xf0000fff,
1755 .pvr_value = 0x50000894,
1756 .cpu_name = "440GX Rev. F",
Kumar Gala10b35d92005-09-23 14:08:58 -05001757 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001758 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001759 .mmu_features = MMU_FTR_TYPE_44x,
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001760 .icache_bsize = 32,
1761 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001762 .cpu_setup = __setup_cpu_440gx,
1763 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001764 .platform = "ppc440",
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001765 },
Matt Porter656de7e2005-09-03 15:55:42 -07001766 { /* 440SP Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001767 .pvr_mask = 0xfff00fff,
1768 .pvr_value = 0x53200891,
Matt Porter656de7e2005-09-03 15:55:42 -07001769 .cpu_name = "440SP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001770 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001771 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001772 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porter656de7e2005-09-03 15:55:42 -07001773 .icache_bsize = 32,
1774 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001775 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001776 .platform = "ppc440",
Matt Porter656de7e2005-09-03 15:55:42 -07001777 },
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001778 { /* 440SPe Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001779 .pvr_mask = 0xfff00fff,
1780 .pvr_value = 0x53400890,
1781 .cpu_name = "440SPe Rev. A",
1782 .cpu_features = CPU_FTRS_44X,
1783 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001784 .mmu_features = MMU_FTR_TYPE_44x,
Roland Dreier333e6152007-06-16 05:36:32 +10001785 .icache_bsize = 32,
1786 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001787 .cpu_setup = __setup_cpu_440spe,
1788 .machine_check = machine_check_440A,
Roland Dreier333e6152007-06-16 05:36:32 +10001789 .platform = "ppc440",
1790 },
1791 { /* 440SPe Rev. B */
1792 .pvr_mask = 0xfff00fff,
1793 .pvr_value = 0x53400891,
1794 .cpu_name = "440SPe Rev. B",
Kumar Galaa147c582006-12-08 02:34:38 -06001795 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001796 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001797 .mmu_features = MMU_FTR_TYPE_44x,
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001798 .icache_bsize = 32,
1799 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001800 .cpu_setup = __setup_cpu_440spe,
1801 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001802 .platform = "ppc440",
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001803 },
John Linn23e72372008-07-01 09:42:07 -07001804 { /* 440 in Xilinx Virtex-5 FXT */
1805 .pvr_mask = 0xfffffff0,
1806 .pvr_value = 0x7ff21910,
1807 .cpu_name = "440 in Virtex-5 FXT",
1808 .cpu_features = CPU_FTRS_44X,
1809 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001810 .mmu_features = MMU_FTR_TYPE_44x,
John Linn23e72372008-07-01 09:42:07 -07001811 .icache_bsize = 32,
1812 .dcache_bsize = 32,
Grant Likely640d17d2008-12-04 05:39:55 +00001813 .cpu_setup = __setup_cpu_440x5,
1814 .machine_check = machine_check_440A,
John Linn23e72372008-07-01 09:42:07 -07001815 .platform = "ppc440",
1816 },
Stefan Roese464076a2008-02-24 08:07:41 +11001817 { /* 460EX */
Stefan Roese20d70342009-07-29 07:04:46 +00001818 .pvr_mask = 0xffff0006,
Stefan Roese464076a2008-02-24 08:07:41 +11001819 .pvr_value = 0x13020002,
1820 .cpu_name = "460EX",
Benjamin Herrenschmidt6d2170b2008-12-18 19:13:22 +00001821 .cpu_features = CPU_FTRS_440x6,
Stefan Roese464076a2008-02-24 08:07:41 +11001822 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001823 .mmu_features = MMU_FTR_TYPE_44x,
Stefan Roese464076a2008-02-24 08:07:41 +11001824 .icache_bsize = 32,
1825 .dcache_bsize = 32,
1826 .cpu_setup = __setup_cpu_460ex,
1827 .machine_check = machine_check_440A,
1828 .platform = "ppc440",
1829 },
Stefan Roese20d70342009-07-29 07:04:46 +00001830 { /* 460EX Rev B */
1831 .pvr_mask = 0xffff0007,
1832 .pvr_value = 0x13020004,
1833 .cpu_name = "460EX Rev. B",
1834 .cpu_features = CPU_FTRS_440x6,
1835 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1836 .mmu_features = MMU_FTR_TYPE_44x,
1837 .icache_bsize = 32,
1838 .dcache_bsize = 32,
1839 .cpu_setup = __setup_cpu_460ex,
1840 .machine_check = machine_check_440A,
1841 .platform = "ppc440",
1842 },
Stefan Roese464076a2008-02-24 08:07:41 +11001843 { /* 460GT */
Stefan Roese20d70342009-07-29 07:04:46 +00001844 .pvr_mask = 0xffff0006,
Stefan Roese464076a2008-02-24 08:07:41 +11001845 .pvr_value = 0x13020000,
1846 .cpu_name = "460GT",
Benjamin Herrenschmidt6d2170b2008-12-18 19:13:22 +00001847 .cpu_features = CPU_FTRS_440x6,
Josh Boyer939e6222008-06-11 07:52:40 -04001848 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001849 .mmu_features = MMU_FTR_TYPE_44x,
Stefan Roese464076a2008-02-24 08:07:41 +11001850 .icache_bsize = 32,
1851 .dcache_bsize = 32,
Josh Boyer939e6222008-06-11 07:52:40 -04001852 .cpu_setup = __setup_cpu_460gt,
Stefan Roese464076a2008-02-24 08:07:41 +11001853 .machine_check = machine_check_440A,
1854 .platform = "ppc440",
1855 },
Stefan Roese20d70342009-07-29 07:04:46 +00001856 { /* 460GT Rev B */
1857 .pvr_mask = 0xffff0007,
1858 .pvr_value = 0x13020005,
1859 .cpu_name = "460GT Rev. B",
1860 .cpu_features = CPU_FTRS_440x6,
1861 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1862 .mmu_features = MMU_FTR_TYPE_44x,
1863 .icache_bsize = 32,
1864 .dcache_bsize = 32,
1865 .cpu_setup = __setup_cpu_460gt,
1866 .machine_check = machine_check_440A,
1867 .platform = "ppc440",
1868 },
Madhulika Madishetty6c712092009-02-05 13:31:36 +00001869 { /* 460SX */
1870 .pvr_mask = 0xffffff00,
1871 .pvr_value = 0x13541800,
1872 .cpu_name = "460SX",
1873 .cpu_features = CPU_FTRS_44X,
1874 .cpu_user_features = COMMON_USER_BOOKE,
1875 .mmu_features = MMU_FTR_TYPE_44x,
1876 .icache_bsize = 32,
1877 .dcache_bsize = 32,
1878 .cpu_setup = __setup_cpu_460sx,
1879 .machine_check = machine_check_440A,
1880 .platform = "ppc440",
1881 },
Tirumala Marri6edc3232010-09-13 13:26:11 +00001882 { /* 464 in APM821xx */
Vinh Nguyen Huu Tuong7c801162011-12-20 02:43:34 +00001883 .pvr_mask = 0xfffffff0,
Tirumala Marri6edc3232010-09-13 13:26:11 +00001884 .pvr_value = 0x12C41C80,
1885 .cpu_name = "APM821XX",
1886 .cpu_features = CPU_FTRS_44X,
1887 .cpu_user_features = COMMON_USER_BOOKE |
1888 PPC_FEATURE_HAS_FPU,
1889 .mmu_features = MMU_FTR_TYPE_44x,
1890 .icache_bsize = 32,
1891 .dcache_bsize = 32,
1892 .cpu_setup = __setup_cpu_apm821xx,
1893 .machine_check = machine_check_440A,
1894 .platform = "ppc440",
1895 },
Dave Kleikampc48d0db2011-01-26 06:17:58 +00001896 { /* 476 DD2 core */
1897 .pvr_mask = 0xffffffff,
1898 .pvr_value = 0x11a52080,
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001899 .cpu_name = "476",
Dave Kleikampc48d0db2011-01-26 06:17:58 +00001900 .cpu_features = CPU_FTRS_47X | CPU_FTR_476_DD2,
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001901 .cpu_user_features = COMMON_USER_BOOKE |
1902 PPC_FEATURE_HAS_FPU,
1903 .mmu_features = MMU_FTR_TYPE_47x |
1904 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1905 .icache_bsize = 32,
1906 .dcache_bsize = 128,
Dave Kleikampfc5e7092010-03-05 03:43:18 +00001907 .machine_check = machine_check_47x,
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001908 .platform = "ppc470",
1909 },
Tony Breedsdf777bd2011-11-30 21:39:23 +00001910 { /* 476fpe */
1911 .pvr_mask = 0xffff0000,
1912 .pvr_value = 0x7ff50000,
1913 .cpu_name = "476fpe",
1914 .cpu_features = CPU_FTRS_47X | CPU_FTR_476_DD2,
1915 .cpu_user_features = COMMON_USER_BOOKE |
1916 PPC_FEATURE_HAS_FPU,
1917 .mmu_features = MMU_FTR_TYPE_47x |
1918 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1919 .icache_bsize = 32,
1920 .dcache_bsize = 128,
1921 .machine_check = machine_check_47x,
1922 .platform = "ppc470",
1923 },
Torez Smithb4e8c8d2010-03-05 10:45:54 +00001924 { /* 476 iss */
1925 .pvr_mask = 0xffff0000,
1926 .pvr_value = 0x00050000,
1927 .cpu_name = "476",
1928 .cpu_features = CPU_FTRS_47X,
1929 .cpu_user_features = COMMON_USER_BOOKE |
1930 PPC_FEATURE_HAS_FPU,
Torez Smithb4e8c8d2010-03-05 10:45:54 +00001931 .mmu_features = MMU_FTR_TYPE_47x |
1932 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1933 .icache_bsize = 32,
1934 .dcache_bsize = 128,
1935 .machine_check = machine_check_47x,
1936 .platform = "ppc470",
1937 },
Dave Kleikampc48d0db2011-01-26 06:17:58 +00001938 { /* 476 others */
1939 .pvr_mask = 0xffff0000,
1940 .pvr_value = 0x11a50000,
1941 .cpu_name = "476",
1942 .cpu_features = CPU_FTRS_47X,
1943 .cpu_user_features = COMMON_USER_BOOKE |
1944 PPC_FEATURE_HAS_FPU,
1945 .mmu_features = MMU_FTR_TYPE_47x |
1946 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1947 .icache_bsize = 32,
1948 .dcache_bsize = 128,
1949 .machine_check = machine_check_47x,
1950 .platform = "ppc470",
1951 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001952 { /* default match */
1953 .pvr_mask = 0x00000000,
1954 .pvr_value = 0x00000000,
1955 .cpu_name = "(generic 44x PPC)",
1956 .cpu_features = CPU_FTRS_44X,
1957 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001958 .mmu_features = MMU_FTR_TYPE_44x,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001959 .icache_bsize = 32,
1960 .dcache_bsize = 32,
1961 .machine_check = machine_check_4xx,
1962 .platform = "ppc440",
1963 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001964#endif /* CONFIG_44x */
Josh Boyere3e414b2007-12-24 08:44:47 -06001965#ifdef CONFIG_E200
Stephen Rothwell49209602005-10-12 15:55:09 +10001966 { /* e200z5 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001967 .pvr_mask = 0xfff00000,
1968 .pvr_value = 0x81000000,
1969 .cpu_name = "e200z5",
1970 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001971 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001972 .cpu_user_features = COMMON_USER_BOOKE |
1973 PPC_FEATURE_HAS_EFP_SINGLE |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001974 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001975 .mmu_features = MMU_FTR_TYPE_FSL_E,
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001976 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001977 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001978 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001979 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001980 { /* e200z6 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001981 .pvr_mask = 0xfff00000,
1982 .pvr_value = 0x81100000,
1983 .cpu_name = "e200z6",
1984 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001985 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001986 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001987 PPC_FEATURE_HAS_SPE_COMP |
1988 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001989 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001990 .mmu_features = MMU_FTR_TYPE_FSL_E,
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001991 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001992 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001993 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001994 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001995 { /* default match */
1996 .pvr_mask = 0x00000000,
1997 .pvr_value = 0x00000000,
1998 .cpu_name = "(generic E200 PPC)",
1999 .cpu_features = CPU_FTRS_E200,
2000 .cpu_user_features = COMMON_USER_BOOKE |
2001 PPC_FEATURE_HAS_EFP_SINGLE |
2002 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00002003 .mmu_features = MMU_FTR_TYPE_FSL_E,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002004 .dcache_bsize = 32,
Kumar Gala105c31d2009-01-08 08:31:20 -06002005 .cpu_setup = __setup_cpu_e200,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002006 .machine_check = machine_check_e200,
2007 .platform = "ppc5554",
Paul Mackerras516c8be2008-05-12 14:20:35 +10002008 }
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002009#endif /* CONFIG_E200 */
Kumar Gala4490c062010-10-08 08:32:11 -05002010#endif /* CONFIG_PPC32 */
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002011#ifdef CONFIG_E500
Kumar Gala4490c062010-10-08 08:32:11 -05002012#ifdef CONFIG_PPC32
Mihai Caraman3477e712014-08-20 16:09:03 +03002013#ifndef CONFIG_PPC_E500MC
Stephen Rothwell49209602005-10-12 15:55:09 +10002014 { /* e500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002015 .pvr_mask = 0xffff0000,
2016 .pvr_value = 0x80200000,
2017 .cpu_name = "e500",
Kumar Gala10b35d92005-09-23 14:08:58 -05002018 .cpu_features = CPU_FTRS_E500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002019 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05002020 PPC_FEATURE_HAS_SPE_COMP |
2021 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Nishanth Aravamudan6c1bf482013-05-04 16:01:17 +00002022 .cpu_user_features2 = PPC_FEATURE2_ISEL,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00002023 .mmu_features = MMU_FTR_TYPE_FSL_E,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002024 .icache_bsize = 32,
2025 .dcache_bsize = 32,
2026 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06002027 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06002028 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06002029 .cpu_setup = __setup_cpu_e500v1,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11002030 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002031 .platform = "ppc8540",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002032 },
Stephen Rothwell49209602005-10-12 15:55:09 +10002033 { /* e500v2 */
Kumar Gala5b37b702005-06-21 17:15:18 -07002034 .pvr_mask = 0xffff0000,
2035 .pvr_value = 0x80210000,
2036 .cpu_name = "e500v2",
Kumar Gala10b35d92005-09-23 14:08:58 -05002037 .cpu_features = CPU_FTRS_E500_2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002038 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05002039 PPC_FEATURE_HAS_SPE_COMP |
2040 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
2041 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
Nishanth Aravamudan6c1bf482013-05-04 16:01:17 +00002042 .cpu_user_features2 = PPC_FEATURE2_ISEL,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00002043 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS,
Kumar Gala5b37b702005-06-21 17:15:18 -07002044 .icache_bsize = 32,
2045 .dcache_bsize = 32,
2046 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06002047 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06002048 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06002049 .cpu_setup = __setup_cpu_e500v2,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11002050 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002051 .platform = "ppc8548",
chenhui zhaoe7affb12015-11-20 17:13:58 +08002052 .cpu_down_flush = cpu_down_flush_e500v2,
Kumar Gala5b37b702005-06-21 17:15:18 -07002053 },
Mihai Caraman3477e712014-08-20 16:09:03 +03002054#else
Kumar Gala3dfa8772008-06-16 09:41:32 -05002055 { /* e500mc */
2056 .pvr_mask = 0xffff0000,
2057 .pvr_value = 0x80230000,
2058 .cpu_name = "e500mc",
Kumar Gala3dfa8772008-06-16 09:41:32 -05002059 .cpu_features = CPU_FTRS_E500MC,
2060 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Nishanth Aravamudan6c1bf482013-05-04 16:01:17 +00002061 .cpu_user_features2 = PPC_FEATURE2_ISEL,
Kumar Galac3071952009-02-10 22:26:06 -06002062 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
Kumar Gala323d23a2009-04-23 08:51:22 -05002063 MMU_FTR_USE_TLBILX,
Kumar Gala3dfa8772008-06-16 09:41:32 -05002064 .icache_bsize = 64,
2065 .dcache_bsize = 64,
2066 .num_pmcs = 4,
Scott Wooda11106542010-02-25 18:09:45 -06002067 .oprofile_cpu_type = "ppc/e500mc",
Kumar Gala3dfa8772008-06-16 09:41:32 -05002068 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06002069 .cpu_setup = __setup_cpu_e500mc,
Scott Woodfe04b112010-04-08 00:38:22 -05002070 .machine_check = machine_check_e500mc,
Kumar Gala3dfa8772008-06-16 09:41:32 -05002071 .platform = "ppce500mc",
chenhui zhaoe7affb12015-11-20 17:13:58 +08002072 .cpu_down_flush = cpu_down_flush_e500mc,
Kumar Gala3dfa8772008-06-16 09:41:32 -05002073 },
Mihai Caraman3477e712014-08-20 16:09:03 +03002074#endif /* CONFIG_PPC_E500MC */
Kumar Gala4490c062010-10-08 08:32:11 -05002075#endif /* CONFIG_PPC32 */
Mihai Caraman3477e712014-08-20 16:09:03 +03002076#ifdef CONFIG_PPC_E500MC
Kumar Gala4490c062010-10-08 08:32:11 -05002077 { /* e5500 */
2078 .pvr_mask = 0xffff0000,
2079 .pvr_value = 0x80240000,
2080 .cpu_name = "e5500",
Kumar Gala11ed0db2011-04-06 00:11:06 -05002081 .cpu_features = CPU_FTRS_E5500,
Kumar Galafb9be232011-06-02 11:26:13 -05002082 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Nishanth Aravamudan6c1bf482013-05-04 16:01:17 +00002083 .cpu_user_features2 = PPC_FEATURE2_ISEL,
Kumar Gala4490c062010-10-08 08:32:11 -05002084 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
2085 MMU_FTR_USE_TLBILX,
2086 .icache_bsize = 64,
2087 .dcache_bsize = 64,
2088 .num_pmcs = 4,
2089 .oprofile_cpu_type = "ppc/e500mc",
2090 .oprofile_type = PPC_OPROFILE_FSL_EMB,
2091 .cpu_setup = __setup_cpu_e5500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05302092#ifndef CONFIG_PPC32
Kumar Gala4490c062010-10-08 08:32:11 -05002093 .cpu_restore = __restore_cpu_e5500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05302094#endif
Kumar Gala4490c062010-10-08 08:32:11 -05002095 .machine_check = machine_check_e500mc,
2096 .platform = "ppce5500",
chenhui zhaoe7affb12015-11-20 17:13:58 +08002097 .cpu_down_flush = cpu_down_flush_e5500,
Kumar Gala4490c062010-10-08 08:32:11 -05002098 },
Kumar Gala10241842011-11-06 11:51:07 -06002099 { /* e6500 */
2100 .pvr_mask = 0xffff0000,
2101 .pvr_value = 0x80400000,
2102 .cpu_name = "e6500",
2103 .cpu_features = CPU_FTRS_E6500,
Kumar Galacd66cc22012-09-07 15:57:17 -05002104 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU |
2105 PPC_FEATURE_HAS_ALTIVEC_COMP,
Nishanth Aravamudan6c1bf482013-05-04 16:01:17 +00002106 .cpu_user_features2 = PPC_FEATURE2_ISEL,
Kumar Gala10241842011-11-06 11:51:07 -06002107 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
2108 MMU_FTR_USE_TLBILX,
2109 .icache_bsize = 64,
2110 .dcache_bsize = 64,
Lijun Pan5815c432013-06-05 15:22:09 -05002111 .num_pmcs = 6,
Kumar Gala10241842011-11-06 11:51:07 -06002112 .oprofile_cpu_type = "ppc/e6500",
2113 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Galacd66cc22012-09-07 15:57:17 -05002114 .cpu_setup = __setup_cpu_e6500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05302115#ifndef CONFIG_PPC32
Kumar Galacd66cc22012-09-07 15:57:17 -05002116 .cpu_restore = __restore_cpu_e6500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05302117#endif
Kumar Gala10241842011-11-06 11:51:07 -06002118 .machine_check = machine_check_e500mc,
2119 .platform = "ppce6500",
chenhui zhaoe7affb12015-11-20 17:13:58 +08002120 .cpu_down_flush = cpu_down_flush_e6500,
Kumar Gala10241842011-11-06 11:51:07 -06002121 },
Mihai Caraman3477e712014-08-20 16:09:03 +03002122#endif /* CONFIG_PPC_E500MC */
Kumar Gala4490c062010-10-08 08:32:11 -05002123#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -07002124 { /* default match */
2125 .pvr_mask = 0x00000000,
2126 .pvr_value = 0x00000000,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002127 .cpu_name = "(generic E500 PPC)",
2128 .cpu_features = CPU_FTRS_E500,
2129 .cpu_user_features = COMMON_USER_BOOKE |
2130 PPC_FEATURE_HAS_SPE_COMP |
2131 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00002132 .mmu_features = MMU_FTR_TYPE_FSL_E,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002133 .icache_bsize = 32,
2134 .dcache_bsize = 32,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002135 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002136 .platform = "powerpc",
Paul Mackerras516c8be2008-05-12 14:20:35 +10002137 }
Stephen Rothwell49209602005-10-12 15:55:09 +10002138#endif /* CONFIG_PPC32 */
Kumar Gala4490c062010-10-08 08:32:11 -05002139#endif /* CONFIG_E500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002140};
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002141
Paul Mackerras87a72f92007-10-04 14:18:01 +10002142static struct cpu_spec the_cpu_spec;
2143
Scott Wood26ee9762011-07-25 11:04:36 +00002144static struct cpu_spec * __init setup_cpu_spec(unsigned long offset,
2145 struct cpu_spec *s)
Michael Ellerman666435b2009-02-22 16:25:43 +00002146{
2147 struct cpu_spec *t = &the_cpu_spec;
Michael Ellerman2657dd42009-02-22 16:25:45 +00002148 struct cpu_spec old;
2149
Michael Ellerman666435b2009-02-22 16:25:43 +00002150 t = PTRRELOC(t);
Michael Ellerman2657dd42009-02-22 16:25:45 +00002151 old = *t;
2152
2153 /* Copy everything, then do fixups */
2154 *t = *s;
Michael Ellerman666435b2009-02-22 16:25:43 +00002155
2156 /*
2157 * If we are overriding a previous value derived from the real
2158 * PVR with a new value obtained using a logical PVR value,
2159 * don't modify the performance monitor fields.
2160 */
Michael Ellerman2657dd42009-02-22 16:25:45 +00002161 if (old.num_pmcs && !s->num_pmcs) {
2162 t->num_pmcs = old.num_pmcs;
2163 t->pmc_type = old.pmc_type;
2164 t->oprofile_type = old.oprofile_type;
2165 t->oprofile_mmcra_sihv = old.oprofile_mmcra_sihv;
2166 t->oprofile_mmcra_sipr = old.oprofile_mmcra_sipr;
2167 t->oprofile_mmcra_clear = old.oprofile_mmcra_clear;
2168
Michael Ellerman666435b2009-02-22 16:25:43 +00002169 /*
2170 * If we have passed through this logic once before and
2171 * have pulled the default case because the real PVR was
2172 * not found inside cpu_specs[], then we are possibly
2173 * running in compatibility mode. In that case, let the
2174 * oprofiler know which set of compatibility counters to
2175 * pull from by making sure the oprofile_cpu_type string
2176 * is set to that of compatibility mode. If the
2177 * oprofile_cpu_type already has a value, then we are
2178 * possibly overriding a real PVR with a logical one,
2179 * and, in that case, keep the current value for
2180 * oprofile_cpu_type.
2181 */
Benjamin Herrenschmidtb173f032009-05-14 18:34:06 +00002182 if (old.oprofile_cpu_type != NULL) {
Benjamin Herrenschmidt0203d6e2009-04-29 19:39:38 +00002183 t->oprofile_cpu_type = old.oprofile_cpu_type;
2184 t->oprofile_type = old.oprofile_type;
Michael Wolf79af6c42009-04-27 06:17:54 +00002185 }
Michael Ellerman2657dd42009-02-22 16:25:45 +00002186 }
Michael Ellerman666435b2009-02-22 16:25:43 +00002187
2188 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
2189
2190 /*
2191 * Set the base platform string once; assumes
2192 * we're called with real pvr first.
2193 */
2194 if (*PTRRELOC(&powerpc_base_platform) == NULL)
2195 *PTRRELOC(&powerpc_base_platform) = t->platform;
2196
2197#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
2198 /* ppc64 and booke expect identify_cpu to also call setup_cpu for
2199 * that processor. I will consolidate that at a later time, for now,
2200 * just use #ifdef. We also don't need to PTRRELOC the function
2201 * pointer on ppc64 and booke as we are running at 0 in real mode
2202 * on ppc64 and reloc_offset is always 0 on booke.
2203 */
Benjamin Herrenschmidtaf9eef32011-01-20 20:36:03 +00002204 if (t->cpu_setup) {
2205 t->cpu_setup(offset, t);
Michael Ellerman666435b2009-02-22 16:25:43 +00002206 }
2207#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
Scott Wood26ee9762011-07-25 11:04:36 +00002208
2209 return t;
Michael Ellerman666435b2009-02-22 16:25:43 +00002210}
2211
Paul Mackerras87a72f92007-10-04 14:18:01 +10002212struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002213{
2214 struct cpu_spec *s = cpu_specs;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002215 int i;
2216
2217 s = PTRRELOC(s);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002218
Michael Ellerman666435b2009-02-22 16:25:43 +00002219 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) {
Scott Wood26ee9762011-07-25 11:04:36 +00002220 if ((pvr & s->pvr_mask) == s->pvr_value)
2221 return setup_cpu_spec(offset, s);
Michael Ellerman666435b2009-02-22 16:25:43 +00002222 }
2223
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002224 BUG();
Michael Ellerman666435b2009-02-22 16:25:43 +00002225
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002226 return NULL;
2227}
Kevin Hao4db73272016-07-23 14:42:41 +05302228
2229#ifdef CONFIG_JUMP_LABEL_FEATURE_CHECKS
2230struct static_key_true cpu_feature_keys[NUM_CPU_FTR_KEYS] = {
2231 [0 ... NUM_CPU_FTR_KEYS - 1] = STATIC_KEY_TRUE_INIT
2232};
2233EXPORT_SYMBOL_GPL(cpu_feature_keys);
2234
2235void __init cpu_feature_keys_init(void)
2236{
2237 int i;
2238
2239 for (i = 0; i < NUM_CPU_FTR_KEYS; i++) {
2240 unsigned long f = 1ul << i;
2241
2242 if (!(cur_cpu_spec->cpu_features & f))
2243 static_branch_disable(&cpu_feature_keys[i]);
2244 }
2245}
2246#endif