blob: 361f6d91ab1b042e3f79922e4820ffd0c7be0fd8 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Linus Torvalds1da177e2005-04-16 15:20:36 -07002 * Copyright (C) 2001 Ben. Herrenschmidt (benh@kernel.crashing.org)
3 *
Stephen Rothwell49209602005-10-12 15:55:09 +10004 * Modifications for ppc64:
5 * Copyright (C) 2003 Dave Engebretsen <engebret@us.ibm.com>
6 *
Linus Torvalds1da177e2005-04-16 15:20:36 -07007 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version
10 * 2 of the License, or (at your option) any later version.
11 */
12
Linus Torvalds1da177e2005-04-16 15:20:36 -070013#include <linux/string.h>
14#include <linux/sched.h>
15#include <linux/threads.h>
16#include <linux/init.h>
Paul Gortmaker4b16f8e2011-07-22 18:24:23 -040017#include <linux/export.h>
Kumar Gala400d2212005-09-27 15:13:12 -050018
19#include <asm/oprofile_impl.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070020#include <asm/cputable.h>
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +100021#include <asm/prom.h> /* for PTRRELOC on ARCH=ppc */
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +000022#include <asm/mmu.h>
David Howellsae3a1972012-03-28 18:30:02 +010023#include <asm/setup.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070024
Kumar Gala400d2212005-09-27 15:13:12 -050025struct cpu_spec* cur_cpu_spec = NULL;
Stephen Rothwell49209602005-10-12 15:55:09 +100026EXPORT_SYMBOL(cur_cpu_spec);
Linus Torvalds1da177e2005-04-16 15:20:36 -070027
Nathan Lynch9115d132008-07-16 09:58:51 +100028/* The platform string corresponding to the real PVR */
29const char *powerpc_base_platform;
30
Stephen Rothwell49209602005-10-12 15:55:09 +100031/* NOTE:
32 * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's
33 * the responsibility of the appropriate CPU save/restore functions to
34 * eventually copy these settings over. Those save/restore aren't yet
35 * part of the cputable though. That has to be fixed for both ppc32
36 * and ppc64
37 */
Geoff Levandb26f1002006-05-19 14:24:18 +100038#ifdef CONFIG_PPC32
Kumar Gala105c31d2009-01-08 08:31:20 -060039extern void __setup_cpu_e200(unsigned long offset, struct cpu_spec* spec);
40extern void __setup_cpu_e500v1(unsigned long offset, struct cpu_spec* spec);
41extern void __setup_cpu_e500v2(unsigned long offset, struct cpu_spec* spec);
42extern void __setup_cpu_e500mc(unsigned long offset, struct cpu_spec* spec);
Valentine Barshak81127532007-09-22 00:46:57 +100043extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
44extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110045extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
Valentine Barshak340ffd22007-09-22 00:50:09 +100046extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110047extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
Grant Likely640d17d2008-12-04 05:39:55 +000048extern void __setup_cpu_440x5(unsigned long offset, struct cpu_spec* spec);
Stefan Roese464076a2008-02-24 08:07:41 +110049extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec);
Josh Boyer939e6222008-06-11 07:52:40 -040050extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec);
Madhulika Madishetty6c712092009-02-05 13:31:36 +000051extern void __setup_cpu_460sx(unsigned long offset, struct cpu_spec *spec);
Tirumala Marri6edc3232010-09-13 13:26:11 +000052extern void __setup_cpu_apm821xx(unsigned long offset, struct cpu_spec *spec);
Kumar Gala400d2212005-09-27 15:13:12 -050053extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
54extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
55extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
56extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
57extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
58extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
59extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
60extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell49209602005-10-12 15:55:09 +100061#endif /* CONFIG_PPC32 */
Olof Johanssonf39b7a52006-08-11 00:07:08 -050062#ifdef CONFIG_PPC64
Kumar Gala400d2212005-09-27 15:13:12 -050063extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
Olof Johansson5b43d202006-10-04 23:41:41 -050064extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
Olof Johansson11999192007-02-04 16:36:51 -060065extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
Benjamin Herrenschmidt76b4eda2011-04-14 22:32:01 +000066extern void __setup_cpu_a2(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell40d244d2007-02-12 22:10:48 +110067extern void __restore_cpu_pa6t(void);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050068extern void __restore_cpu_ppc970(void);
Michael Neulinge952e6c2008-06-18 10:47:26 +100069extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec);
70extern void __restore_cpu_power7(void);
Michael Neulingaec937b2012-10-30 19:34:14 +000071extern void __setup_cpu_power8(unsigned long offset, struct cpu_spec* spec);
72extern void __restore_cpu_power8(void);
Benjamin Herrenschmidt76b4eda2011-04-14 22:32:01 +000073extern void __restore_cpu_a2(void);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050074#endif /* CONFIG_PPC64 */
Kumar Gala4490c062010-10-08 08:32:11 -050075#if defined(CONFIG_E500)
76extern void __setup_cpu_e5500(unsigned long offset, struct cpu_spec* spec);
77extern void __restore_cpu_e5500(void);
78#endif /* CONFIG_E500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070079
Linus Torvalds1da177e2005-04-16 15:20:36 -070080/* This table only contains "desktop" CPUs, it need to be filled with embedded
81 * ones as well...
82 */
Stephen Rothwell49209602005-10-12 15:55:09 +100083#define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
84 PPC_FEATURE_HAS_MMU)
85#define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +110086#define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +110087#define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
88 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
89#define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
90 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
Anton Blanchard03054d52006-04-29 09:51:06 +100091#define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
Paul Mackerrasfab5db92006-06-07 16:14:40 +100092 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
Nathan Lynch0f473312008-07-10 01:06:57 +100093 PPC_FEATURE_TRUE_LE | \
94 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Michael Neulinge952e6c2008-06-18 10:47:26 +100095#define COMMON_USER_POWER7 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
96 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
Nathan Lynch0f473312008-07-10 01:06:57 +100097 PPC_FEATURE_TRUE_LE | \
98 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -050099#define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
100 PPC_FEATURE_TRUE_LE | \
101 PPC_FEATURE_HAS_ALTIVEC_COMP)
Kumar Galaf45c4482009-08-18 19:08:30 +0000102#ifdef CONFIG_PPC_BOOK3E_64
103#define COMMON_USER_BOOKE (COMMON_USER_PPC64 | PPC_FEATURE_BOOKE)
104#else
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100105#define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
106 PPC_FEATURE_BOOKE)
Kumar Galaf45c4482009-08-18 19:08:30 +0000107#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -0700108
Paul Mackerras87a72f92007-10-04 14:18:01 +1000109static struct cpu_spec __initdata cpu_specs[] = {
Benjamin Herrenschmidt2d27cfd2009-07-23 23:15:59 +0000110#ifdef CONFIG_PPC_BOOK3S_64
Stephen Rothwell49209602005-10-12 15:55:09 +1000111 { /* Power3 */
112 .pvr_mask = 0xffff0000,
113 .pvr_value = 0x00400000,
114 .cpu_name = "POWER3 (630)",
115 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000116 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000117 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000118 .icache_bsize = 128,
119 .dcache_bsize = 128,
120 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600121 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000122 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000123 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100124 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +1000125 },
126 { /* Power3+ */
127 .pvr_mask = 0xffff0000,
128 .pvr_value = 0x00410000,
129 .cpu_name = "POWER3 (630+)",
130 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000131 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000132 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000133 .icache_bsize = 128,
134 .dcache_bsize = 128,
135 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600136 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000137 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000138 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100139 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +1000140 },
141 { /* Northstar */
142 .pvr_mask = 0xffff0000,
143 .pvr_value = 0x00330000,
144 .cpu_name = "RS64-II (northstar)",
145 .cpu_features = CPU_FTRS_RS64,
146 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000147 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000148 .icache_bsize = 128,
149 .dcache_bsize = 128,
150 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600151 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000152 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000153 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100154 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000155 },
156 { /* Pulsar */
157 .pvr_mask = 0xffff0000,
158 .pvr_value = 0x00340000,
159 .cpu_name = "RS64-III (pulsar)",
160 .cpu_features = CPU_FTRS_RS64,
161 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000162 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000163 .icache_bsize = 128,
164 .dcache_bsize = 128,
165 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600166 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000167 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000168 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100169 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000170 },
171 { /* I-star */
172 .pvr_mask = 0xffff0000,
173 .pvr_value = 0x00360000,
174 .cpu_name = "RS64-III (icestar)",
175 .cpu_features = CPU_FTRS_RS64,
176 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000177 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000178 .icache_bsize = 128,
179 .dcache_bsize = 128,
180 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600181 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000182 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000183 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100184 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000185 },
186 { /* S-star */
187 .pvr_mask = 0xffff0000,
188 .pvr_value = 0x00370000,
189 .cpu_name = "RS64-IV (sstar)",
190 .cpu_features = CPU_FTRS_RS64,
191 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000192 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000193 .icache_bsize = 128,
194 .dcache_bsize = 128,
195 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600196 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000197 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000198 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100199 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000200 },
201 { /* Power4 */
202 .pvr_mask = 0xffff0000,
203 .pvr_value = 0x00350000,
204 .cpu_name = "POWER4 (gp)",
205 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100206 .cpu_user_features = COMMON_USER_POWER4,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000207 .mmu_features = MMU_FTRS_POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000208 .icache_bsize = 128,
209 .dcache_bsize = 128,
210 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600211 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000212 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000213 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100214 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000215 },
216 { /* Power4+ */
217 .pvr_mask = 0xffff0000,
218 .pvr_value = 0x00380000,
219 .cpu_name = "POWER4+ (gq)",
220 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100221 .cpu_user_features = COMMON_USER_POWER4,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000222 .mmu_features = MMU_FTRS_POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000223 .icache_bsize = 128,
224 .dcache_bsize = 128,
225 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600226 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000227 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000228 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100229 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000230 },
231 { /* PPC970 */
232 .pvr_mask = 0xffff0000,
233 .pvr_value = 0x00390000,
234 .cpu_name = "PPC970",
235 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100236 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000237 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000238 .mmu_features = MMU_FTRS_PPC970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000239 .icache_bsize = 128,
240 .dcache_bsize = 128,
241 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600242 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000243 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500244 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000245 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000246 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100247 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000248 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000249 { /* PPC970FX */
250 .pvr_mask = 0xffff0000,
251 .pvr_value = 0x003c0000,
252 .cpu_name = "PPC970FX",
Stephen Rothwell49209602005-10-12 15:55:09 +1000253 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100254 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000255 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000256 .mmu_features = MMU_FTRS_PPC970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000257 .icache_bsize = 128,
258 .dcache_bsize = 128,
259 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600260 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000261 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500262 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000263 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000264 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100265 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000266 },
Olof Johansson3546e812007-02-26 00:35:14 -0600267 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
268 .pvr_mask = 0xffffffff,
269 .pvr_value = 0x00440100,
270 .cpu_name = "PPC970MP",
271 .cpu_features = CPU_FTRS_PPC970,
272 .cpu_user_features = COMMON_USER_POWER4 |
273 PPC_FEATURE_HAS_ALTIVEC_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000274 .mmu_features = MMU_FTR_HPTE_TABLE,
Olof Johansson3546e812007-02-26 00:35:14 -0600275 .icache_bsize = 128,
276 .dcache_bsize = 128,
277 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000278 .pmc_type = PPC_PMC_IBM,
Olof Johansson3546e812007-02-26 00:35:14 -0600279 .cpu_setup = __setup_cpu_ppc970,
280 .cpu_restore = __restore_cpu_ppc970,
281 .oprofile_cpu_type = "ppc64/970MP",
282 .oprofile_type = PPC_OPROFILE_POWER4,
283 .platform = "ppc970",
284 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000285 { /* PPC970MP */
286 .pvr_mask = 0xffff0000,
287 .pvr_value = 0x00440000,
288 .cpu_name = "PPC970MP",
289 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100290 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000291 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000292 .mmu_features = MMU_FTRS_PPC970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000293 .icache_bsize = 128,
294 .dcache_bsize = 128,
Anton Blanchard87af41b2006-05-05 05:44:26 +1000295 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000296 .pmc_type = PPC_PMC_IBM,
Olof Johansson5b43d202006-10-04 23:41:41 -0500297 .cpu_setup = __setup_cpu_ppc970MP,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500298 .cpu_restore = __restore_cpu_ppc970,
Mike Wolffecb3522006-11-21 14:41:54 -0600299 .oprofile_cpu_type = "ppc64/970MP",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000300 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100301 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000302 },
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500303 { /* PPC970GX */
304 .pvr_mask = 0xffff0000,
305 .pvr_value = 0x00450000,
306 .cpu_name = "PPC970GX",
307 .cpu_features = CPU_FTRS_PPC970,
308 .cpu_user_features = COMMON_USER_POWER4 |
309 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000310 .mmu_features = MMU_FTRS_PPC970,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500311 .icache_bsize = 128,
312 .dcache_bsize = 128,
313 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600314 .pmc_type = PPC_PMC_IBM,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500315 .cpu_setup = __setup_cpu_ppc970,
316 .oprofile_cpu_type = "ppc64/970",
317 .oprofile_type = PPC_OPROFILE_POWER4,
318 .platform = "ppc970",
319 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100320 { /* Power5 GR */
Stephen Rothwell49209602005-10-12 15:55:09 +1000321 .pvr_mask = 0xffff0000,
322 .pvr_value = 0x003a0000,
323 .cpu_name = "POWER5 (gr)",
324 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100325 .cpu_user_features = COMMON_USER_POWER5,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000326 .mmu_features = MMU_FTRS_POWER5,
Stephen Rothwell49209602005-10-12 15:55:09 +1000327 .icache_bsize = 128,
328 .dcache_bsize = 128,
329 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600330 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000331 .oprofile_cpu_type = "ppc64/power5",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000332 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000333 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
334 * and above but only works on POWER5 and above
335 */
336 .oprofile_mmcra_sihv = MMCRA_SIHV,
337 .oprofile_mmcra_sipr = MMCRA_SIPR,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100338 .platform = "power5",
Stephen Rothwell49209602005-10-12 15:55:09 +1000339 },
Mike Wolf31a12ce2007-07-10 13:13:47 -0500340 { /* Power5++ */
341 .pvr_mask = 0xffffff00,
342 .pvr_value = 0x003b0300,
343 .cpu_name = "POWER5+ (gs)",
344 .cpu_features = CPU_FTRS_POWER5,
345 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000346 .mmu_features = MMU_FTRS_POWER5,
Mike Wolf31a12ce2007-07-10 13:13:47 -0500347 .icache_bsize = 128,
348 .dcache_bsize = 128,
349 .num_pmcs = 6,
350 .oprofile_cpu_type = "ppc64/power5++",
351 .oprofile_type = PPC_OPROFILE_POWER4,
352 .oprofile_mmcra_sihv = MMCRA_SIHV,
353 .oprofile_mmcra_sipr = MMCRA_SIPR,
354 .platform = "power5+",
355 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100356 { /* Power5 GS */
Stephen Rothwell49209602005-10-12 15:55:09 +1000357 .pvr_mask = 0xffff0000,
358 .pvr_value = 0x003b0000,
Anton Blanchard834608f2006-01-09 15:42:30 +1100359 .cpu_name = "POWER5+ (gs)",
Stephen Rothwell49209602005-10-12 15:55:09 +1000360 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100361 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000362 .mmu_features = MMU_FTRS_POWER5,
Stephen Rothwell49209602005-10-12 15:55:09 +1000363 .icache_bsize = 128,
364 .dcache_bsize = 128,
365 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600366 .pmc_type = PPC_PMC_IBM,
Anton Blanchard834608f2006-01-09 15:42:30 +1100367 .oprofile_cpu_type = "ppc64/power5+",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000368 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000369 .oprofile_mmcra_sihv = MMCRA_SIHV,
370 .oprofile_mmcra_sipr = MMCRA_SIPR,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100371 .platform = "power5+",
Stephen Rothwell49209602005-10-12 15:55:09 +1000372 },
Paul Mackerras974a76f2006-11-10 20:38:53 +1100373 { /* POWER6 in P5+ mode; 2.04-compliant processor */
374 .pvr_mask = 0xffffffff,
375 .pvr_value = 0x0f000001,
376 .cpu_name = "POWER5+",
377 .cpu_features = CPU_FTRS_POWER5,
378 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000379 .mmu_features = MMU_FTRS_POWER5,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100380 .icache_bsize = 128,
381 .dcache_bsize = 128,
Michael Wolf79af6c42009-04-27 06:17:54 +0000382 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
383 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100384 .platform = "power5+",
385 },
Anton Blanchard03054d52006-04-29 09:51:06 +1000386 { /* Power6 */
387 .pvr_mask = 0xffff0000,
388 .pvr_value = 0x003e0000,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100389 .cpu_name = "POWER6 (raw)",
390 .cpu_features = CPU_FTRS_POWER6,
391 .cpu_user_features = COMMON_USER_POWER6 |
392 PPC_FEATURE_POWER6_EXT,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000393 .mmu_features = MMU_FTRS_POWER6,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100394 .icache_bsize = 128,
395 .dcache_bsize = 128,
396 .num_pmcs = 6,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000397 .pmc_type = PPC_PMC_IBM,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100398 .oprofile_cpu_type = "ppc64/power6",
399 .oprofile_type = PPC_OPROFILE_POWER4,
400 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
401 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
402 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
403 POWER6_MMCRA_OTHER,
404 .platform = "power6x",
405 },
406 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
407 .pvr_mask = 0xffffffff,
408 .pvr_value = 0x0f000002,
409 .cpu_name = "POWER6 (architected)",
Anton Blanchard03054d52006-04-29 09:51:06 +1000410 .cpu_features = CPU_FTRS_POWER6,
411 .cpu_user_features = COMMON_USER_POWER6,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000412 .mmu_features = MMU_FTRS_POWER6,
Anton Blanchard03054d52006-04-29 09:51:06 +1000413 .icache_bsize = 128,
414 .dcache_bsize = 128,
Michael Wolf79af6c42009-04-27 06:17:54 +0000415 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
416 .oprofile_type = PPC_OPROFILE_POWER4,
Anton Blanchard03054d52006-04-29 09:51:06 +1000417 .platform = "power6",
418 },
Joel Schopp635f5a62008-06-19 06:18:21 +1000419 { /* 2.06-compliant processor, i.e. Power7 "architected" mode */
420 .pvr_mask = 0xffffffff,
421 .pvr_value = 0x0f000003,
422 .cpu_name = "POWER7 (architected)",
423 .cpu_features = CPU_FTRS_POWER7,
424 .cpu_user_features = COMMON_USER_POWER7,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000425 .mmu_features = MMU_FTRS_POWER7,
Joel Schopp635f5a62008-06-19 06:18:21 +1000426 .icache_bsize = 128,
427 .dcache_bsize = 128,
Michael Wolf79af6c42009-04-27 06:17:54 +0000428 .oprofile_type = PPC_OPROFILE_POWER4,
429 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
Benjamin Herrenschmidt24cc67d2011-01-20 18:50:55 +1100430 .cpu_setup = __setup_cpu_power7,
431 .cpu_restore = __restore_cpu_power7,
Joel Schopp635f5a62008-06-19 06:18:21 +1000432 .platform = "power7",
433 },
Michael Neulinge952e6c2008-06-18 10:47:26 +1000434 { /* Power7 */
435 .pvr_mask = 0xffff0000,
436 .pvr_value = 0x003f0000,
Joel Schopp635f5a62008-06-19 06:18:21 +1000437 .cpu_name = "POWER7 (raw)",
Michael Neulinge952e6c2008-06-18 10:47:26 +1000438 .cpu_features = CPU_FTRS_POWER7,
439 .cpu_user_features = COMMON_USER_POWER7,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000440 .mmu_features = MMU_FTRS_POWER7,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000441 .icache_bsize = 128,
442 .dcache_bsize = 128,
443 .num_pmcs = 6,
444 .pmc_type = PPC_PMC_IBM,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000445 .oprofile_cpu_type = "ppc64/power7",
446 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt24cc67d2011-01-20 18:50:55 +1100447 .cpu_setup = __setup_cpu_power7,
448 .cpu_restore = __restore_cpu_power7,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000449 .platform = "power7",
450 },
Michael Neuling6f08cb32010-11-17 18:52:44 +0000451 { /* Power7+ */
452 .pvr_mask = 0xffff0000,
453 .pvr_value = 0x004A0000,
454 .cpu_name = "POWER7+ (raw)",
455 .cpu_features = CPU_FTRS_POWER7,
456 .cpu_user_features = COMMON_USER_POWER7,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000457 .mmu_features = MMU_FTRS_POWER7,
Michael Neuling6f08cb32010-11-17 18:52:44 +0000458 .icache_bsize = 128,
459 .dcache_bsize = 128,
460 .num_pmcs = 6,
461 .pmc_type = PPC_PMC_IBM,
462 .oprofile_cpu_type = "ppc64/power7",
463 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt24cc67d2011-01-20 18:50:55 +1100464 .cpu_setup = __setup_cpu_power7,
465 .cpu_restore = __restore_cpu_power7,
Michael Neuling6f08cb32010-11-17 18:52:44 +0000466 .platform = "power7+",
467 },
Arnd Bergmannc902be72006-01-04 19:55:53 +0000468 { /* Cell Broadband Engine */
Stephen Rothwell49209602005-10-12 15:55:09 +1000469 .pvr_mask = 0xffff0000,
470 .pvr_value = 0x00700000,
471 .cpu_name = "Cell Broadband Engine",
472 .cpu_features = CPU_FTRS_CELL,
473 .cpu_user_features = COMMON_USER_PPC64 |
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +1100474 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
475 PPC_FEATURE_SMT,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000476 .mmu_features = MMU_FTRS_CELL,
Stephen Rothwell49209602005-10-12 15:55:09 +1000477 .icache_bsize = 128,
478 .dcache_bsize = 128,
Maynard Johnson18f21902006-11-20 18:45:16 +0100479 .num_pmcs = 4,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600480 .pmc_type = PPC_PMC_IBM,
Maynard Johnson18f21902006-11-20 18:45:16 +0100481 .oprofile_cpu_type = "ppc64/cell-be",
482 .oprofile_type = PPC_OPROFILE_CELL,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100483 .platform = "ppc-cell-be",
Stephen Rothwell49209602005-10-12 15:55:09 +1000484 },
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500485 { /* PA Semi PA6T */
486 .pvr_mask = 0x7fff0000,
487 .pvr_value = 0x00900000,
488 .cpu_name = "PA6T",
489 .cpu_features = CPU_FTRS_PA6T,
490 .cpu_user_features = COMMON_USER_PA6T,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000491 .mmu_features = MMU_FTRS_PA6T,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500492 .icache_bsize = 64,
493 .dcache_bsize = 64,
494 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600495 .pmc_type = PPC_PMC_PA6T,
Olof Johansson11999192007-02-04 16:36:51 -0600496 .cpu_setup = __setup_cpu_pa6t,
497 .cpu_restore = __restore_cpu_pa6t,
Olof Johansson25fc5302007-04-18 16:38:21 +1000498 .oprofile_cpu_type = "ppc64/pa6t",
499 .oprofile_type = PPC_OPROFILE_PA6T,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500500 .platform = "pa6t",
501 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000502 { /* default match */
503 .pvr_mask = 0x00000000,
504 .pvr_value = 0x00000000,
505 .cpu_name = "POWER4 (compatible)",
506 .cpu_features = CPU_FTRS_COMPATIBLE,
507 .cpu_user_features = COMMON_USER_PPC64,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000508 .mmu_features = MMU_FTRS_DEFAULT_HPTE_ARCH_V2,
Stephen Rothwell49209602005-10-12 15:55:09 +1000509 .icache_bsize = 128,
510 .dcache_bsize = 128,
511 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600512 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100513 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000514 }
Benjamin Herrenschmidt2d27cfd2009-07-23 23:15:59 +0000515#endif /* CONFIG_PPC_BOOK3S_64 */
Benjamin Herrenschmidt2d27cfd2009-07-23 23:15:59 +0000516
Stephen Rothwell49209602005-10-12 15:55:09 +1000517#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -0700518#if CLASSIC_PPC
Stephen Rothwell49209602005-10-12 15:55:09 +1000519 { /* 601 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700520 .pvr_mask = 0xffff0000,
521 .pvr_value = 0x00010000,
522 .cpu_name = "601",
Kumar Gala10b35d92005-09-23 14:08:58 -0500523 .cpu_features = CPU_FTRS_PPC601,
Stephen Rothwell49209602005-10-12 15:55:09 +1000524 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
Paul Mackerras98599012005-10-22 16:51:34 +1000525 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000526 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700527 .icache_bsize = 32,
528 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100529 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100530 .platform = "ppc601",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700531 },
532 { /* 603 */
533 .pvr_mask = 0xffff0000,
534 .pvr_value = 0x00030000,
535 .cpu_name = "603",
Kumar Gala10b35d92005-09-23 14:08:58 -0500536 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000537 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000538 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700539 .icache_bsize = 32,
540 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100541 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100542 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100543 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700544 },
545 { /* 603e */
546 .pvr_mask = 0xffff0000,
547 .pvr_value = 0x00060000,
548 .cpu_name = "603e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500549 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000550 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000551 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700552 .icache_bsize = 32,
553 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100554 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100555 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100556 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700557 },
558 { /* 603ev */
559 .pvr_mask = 0xffff0000,
560 .pvr_value = 0x00070000,
561 .cpu_name = "603ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500562 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000563 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000564 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700565 .icache_bsize = 32,
566 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100567 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100568 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100569 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700570 },
571 { /* 604 */
572 .pvr_mask = 0xffff0000,
573 .pvr_value = 0x00040000,
574 .cpu_name = "604",
Kumar Gala10b35d92005-09-23 14:08:58 -0500575 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000576 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000577 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700578 .icache_bsize = 32,
579 .dcache_bsize = 32,
580 .num_pmcs = 2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100581 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100582 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100583 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700584 },
585 { /* 604e */
586 .pvr_mask = 0xfffff000,
587 .pvr_value = 0x00090000,
588 .cpu_name = "604e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500589 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000590 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000591 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700592 .icache_bsize = 32,
593 .dcache_bsize = 32,
594 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100595 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100596 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100597 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700598 },
599 { /* 604r */
600 .pvr_mask = 0xffff0000,
601 .pvr_value = 0x00090000,
602 .cpu_name = "604r",
Kumar Gala10b35d92005-09-23 14:08:58 -0500603 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000604 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000605 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700606 .icache_bsize = 32,
607 .dcache_bsize = 32,
608 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100609 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100610 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100611 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700612 },
613 { /* 604ev */
614 .pvr_mask = 0xffff0000,
615 .pvr_value = 0x000a0000,
616 .cpu_name = "604ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500617 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000618 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000619 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700620 .icache_bsize = 32,
621 .dcache_bsize = 32,
622 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100623 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100624 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100625 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700626 },
627 { /* 740/750 (0x4202, don't support TAU ?) */
628 .pvr_mask = 0xffffffff,
629 .pvr_value = 0x00084202,
630 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500631 .cpu_features = CPU_FTRS_740_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000632 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000633 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700634 .icache_bsize = 32,
635 .dcache_bsize = 32,
636 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100637 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100638 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100639 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700640 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700641 { /* 750CX (80100 and 8010x?) */
642 .pvr_mask = 0xfffffff0,
643 .pvr_value = 0x00080100,
644 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500645 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000646 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000647 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700648 .icache_bsize = 32,
649 .dcache_bsize = 32,
650 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100651 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100652 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100653 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700654 },
655 { /* 750CX (82201 and 82202) */
656 .pvr_mask = 0xfffffff0,
657 .pvr_value = 0x00082200,
658 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500659 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000660 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000661 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700662 .icache_bsize = 32,
663 .dcache_bsize = 32,
664 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000665 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100666 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100667 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100668 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700669 },
670 { /* 750CXe (82214) */
671 .pvr_mask = 0xfffffff0,
672 .pvr_value = 0x00082210,
673 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500674 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000675 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000676 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700677 .icache_bsize = 32,
678 .dcache_bsize = 32,
679 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000680 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100681 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100682 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100683 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700684 },
Arthur Othieno7c316252005-09-03 15:55:52 -0700685 { /* 750CXe "Gekko" (83214) */
686 .pvr_mask = 0xffffffff,
687 .pvr_value = 0x00083214,
688 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500689 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000690 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000691 .mmu_features = MMU_FTR_HPTE_TABLE,
Arthur Othieno7c316252005-09-03 15:55:52 -0700692 .icache_bsize = 32,
693 .dcache_bsize = 32,
694 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000695 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100696 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100697 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100698 .platform = "ppc750",
Arthur Othieno7c316252005-09-03 15:55:52 -0700699 },
Albert Herranz45158dc2009-12-12 06:31:46 +0000700 { /* 750CL (and "Broadway") */
701 .pvr_mask = 0xfffff0e0,
702 .pvr_value = 0x00087000,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500703 .cpu_name = "750CL",
Josh Boyera14c4502007-04-13 04:33:25 +1000704 .cpu_features = CPU_FTRS_750CL,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500705 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000706 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500707 .icache_bsize = 32,
708 .dcache_bsize = 32,
709 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000710 .pmc_type = PPC_PMC_IBM,
Josh Boyera14c4502007-04-13 04:33:25 +1000711 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100712 .machine_check = machine_check_generic,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500713 .platform = "ppc750",
Dragos Tatulea04f56532009-09-16 11:58:15 +0300714 .oprofile_cpu_type = "ppc/750",
715 .oprofile_type = PPC_OPROFILE_G4,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500716 },
Arthur Othienoac1ff042005-09-03 15:55:51 -0700717 { /* 745/755 */
718 .pvr_mask = 0xfffff000,
719 .pvr_value = 0x00083000,
720 .cpu_name = "745/755",
Kumar Gala10b35d92005-09-23 14:08:58 -0500721 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000722 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000723 .mmu_features = MMU_FTR_HPTE_TABLE,
Arthur Othienoac1ff042005-09-03 15:55:51 -0700724 .icache_bsize = 32,
725 .dcache_bsize = 32,
726 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000727 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100728 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100729 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100730 .platform = "ppc750",
Arthur Othienoac1ff042005-09-03 15:55:51 -0700731 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700732 { /* 750FX rev 1.x */
733 .pvr_mask = 0xffffff00,
734 .pvr_value = 0x70000100,
735 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500736 .cpu_features = CPU_FTRS_750FX1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000737 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000738 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700739 .icache_bsize = 32,
740 .dcache_bsize = 32,
741 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000742 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100743 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100744 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100745 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000746 .oprofile_cpu_type = "ppc/750",
747 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700748 },
749 { /* 750FX rev 2.0 must disable HID0[DPM] */
750 .pvr_mask = 0xffffffff,
751 .pvr_value = 0x70000200,
752 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500753 .cpu_features = CPU_FTRS_750FX2,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000754 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000755 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700756 .icache_bsize = 32,
757 .dcache_bsize = 32,
758 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000759 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100760 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100761 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100762 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000763 .oprofile_cpu_type = "ppc/750",
764 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700765 },
766 { /* 750FX (All revs except 2.0) */
767 .pvr_mask = 0xffff0000,
768 .pvr_value = 0x70000000,
769 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500770 .cpu_features = CPU_FTRS_750FX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000771 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000772 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700773 .icache_bsize = 32,
774 .dcache_bsize = 32,
775 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000776 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100777 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100778 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100779 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000780 .oprofile_cpu_type = "ppc/750",
781 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700782 },
783 { /* 750GX */
784 .pvr_mask = 0xffff0000,
785 .pvr_value = 0x70020000,
786 .cpu_name = "750GX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500787 .cpu_features = CPU_FTRS_750GX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000788 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000789 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700790 .icache_bsize = 32,
791 .dcache_bsize = 32,
792 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000793 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100794 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100795 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100796 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000797 .oprofile_cpu_type = "ppc/750",
798 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700799 },
800 { /* 740/750 (L2CR bit need fixup for 740) */
801 .pvr_mask = 0xffff0000,
802 .pvr_value = 0x00080000,
803 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500804 .cpu_features = CPU_FTRS_740,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000805 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000806 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700807 .icache_bsize = 32,
808 .dcache_bsize = 32,
809 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000810 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100811 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100812 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100813 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700814 },
815 { /* 7400 rev 1.1 ? (no TAU) */
816 .pvr_mask = 0xffffffff,
817 .pvr_value = 0x000c1101,
818 .cpu_name = "7400 (1.1)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500819 .cpu_features = CPU_FTRS_7400_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000820 .cpu_user_features = COMMON_USER |
821 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000822 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700823 .icache_bsize = 32,
824 .dcache_bsize = 32,
825 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000826 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100827 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100828 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100829 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700830 },
831 { /* 7400 */
832 .pvr_mask = 0xffff0000,
833 .pvr_value = 0x000c0000,
834 .cpu_name = "7400",
Kumar Gala10b35d92005-09-23 14:08:58 -0500835 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000836 .cpu_user_features = COMMON_USER |
837 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000838 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700839 .icache_bsize = 32,
840 .dcache_bsize = 32,
841 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000842 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100843 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100844 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100845 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700846 },
847 { /* 7410 */
848 .pvr_mask = 0xffff0000,
849 .pvr_value = 0x800c0000,
850 .cpu_name = "7410",
Kumar Gala10b35d92005-09-23 14:08:58 -0500851 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000852 .cpu_user_features = COMMON_USER |
853 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000854 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700855 .icache_bsize = 32,
856 .dcache_bsize = 32,
857 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000858 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100859 .cpu_setup = __setup_cpu_7410,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100860 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100861 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700862 },
863 { /* 7450 2.0 - no doze/nap */
864 .pvr_mask = 0xffffffff,
865 .pvr_value = 0x80000200,
866 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500867 .cpu_features = CPU_FTRS_7450_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000868 .cpu_user_features = COMMON_USER |
869 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000870 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700871 .icache_bsize = 32,
872 .dcache_bsize = 32,
873 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000874 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600875 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600876 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000877 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100878 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100879 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700880 },
881 { /* 7450 2.1 */
882 .pvr_mask = 0xffffffff,
883 .pvr_value = 0x80000201,
884 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500885 .cpu_features = CPU_FTRS_7450_21,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000886 .cpu_user_features = COMMON_USER |
887 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000888 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700889 .icache_bsize = 32,
890 .dcache_bsize = 32,
891 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000892 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600893 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600894 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000895 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100896 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100897 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700898 },
899 { /* 7450 2.3 and newer */
900 .pvr_mask = 0xffff0000,
901 .pvr_value = 0x80000000,
902 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500903 .cpu_features = CPU_FTRS_7450_23,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000904 .cpu_user_features = COMMON_USER |
905 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000906 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700907 .icache_bsize = 32,
908 .dcache_bsize = 32,
909 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000910 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600911 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600912 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000913 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100914 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100915 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700916 },
917 { /* 7455 rev 1.x */
918 .pvr_mask = 0xffffff00,
919 .pvr_value = 0x80010100,
920 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500921 .cpu_features = CPU_FTRS_7455_1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000922 .cpu_user_features = COMMON_USER |
923 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000924 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700925 .icache_bsize = 32,
926 .dcache_bsize = 32,
927 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000928 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600929 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600930 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000931 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100932 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100933 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700934 },
935 { /* 7455 rev 2.0 */
936 .pvr_mask = 0xffffffff,
937 .pvr_value = 0x80010200,
938 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500939 .cpu_features = CPU_FTRS_7455_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000940 .cpu_user_features = COMMON_USER |
941 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000942 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700943 .icache_bsize = 32,
944 .dcache_bsize = 32,
945 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000946 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600947 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600948 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000949 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100950 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100951 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700952 },
953 { /* 7455 others */
954 .pvr_mask = 0xffff0000,
955 .pvr_value = 0x80010000,
956 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500957 .cpu_features = CPU_FTRS_7455,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000958 .cpu_user_features = COMMON_USER |
959 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000960 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700961 .icache_bsize = 32,
962 .dcache_bsize = 32,
963 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000964 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600965 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600966 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000967 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100968 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100969 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700970 },
971 { /* 7447/7457 Rev 1.0 */
972 .pvr_mask = 0xffffffff,
973 .pvr_value = 0x80020100,
974 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500975 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000976 .cpu_user_features = COMMON_USER |
977 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000978 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700979 .icache_bsize = 32,
980 .dcache_bsize = 32,
981 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000982 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600983 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600984 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000985 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100986 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100987 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700988 },
989 { /* 7447/7457 Rev 1.1 */
990 .pvr_mask = 0xffffffff,
991 .pvr_value = 0x80020101,
992 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500993 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000994 .cpu_user_features = COMMON_USER |
995 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000996 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700997 .icache_bsize = 32,
998 .dcache_bsize = 32,
999 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001000 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001001 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001002 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001003 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001004 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001005 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001006 },
1007 { /* 7447/7457 Rev 1.2 and later */
1008 .pvr_mask = 0xffff0000,
1009 .pvr_value = 0x80020000,
1010 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -05001011 .cpu_features = CPU_FTRS_7447,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001012 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001013 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001014 .icache_bsize = 32,
1015 .dcache_bsize = 32,
1016 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001017 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001018 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001019 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001020 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001021 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001022 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001023 },
1024 { /* 7447A */
1025 .pvr_mask = 0xffff0000,
1026 .pvr_value = 0x80030000,
1027 .cpu_name = "7447A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001028 .cpu_features = CPU_FTRS_7447A,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001029 .cpu_user_features = COMMON_USER |
1030 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001031 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001032 .icache_bsize = 32,
1033 .dcache_bsize = 32,
1034 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001035 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001036 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001037 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001038 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001039 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001040 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001041 },
Kumar Galabbde6302005-09-03 15:55:55 -07001042 { /* 7448 */
1043 .pvr_mask = 0xffff0000,
1044 .pvr_value = 0x80040000,
1045 .cpu_name = "7448",
James.Yang3d372542007-05-02 16:34:43 -05001046 .cpu_features = CPU_FTRS_7448,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001047 .cpu_user_features = COMMON_USER |
1048 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001049 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Kumar Galabbde6302005-09-03 15:55:55 -07001050 .icache_bsize = 32,
1051 .dcache_bsize = 32,
1052 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001053 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001054 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001055 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001056 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001057 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001058 .platform = "ppc7450",
Kumar Galabbde6302005-09-03 15:55:55 -07001059 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001060 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
1061 .pvr_mask = 0x7fff0000,
1062 .pvr_value = 0x00810000,
1063 .cpu_name = "82xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001064 .cpu_features = CPU_FTRS_82XX,
Stephen Rothwell49209602005-10-12 15:55:09 +10001065 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001066 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001067 .icache_bsize = 32,
1068 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001069 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001070 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001071 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001072 },
1073 { /* All G2_LE (603e core, plus some) have the same pvr */
1074 .pvr_mask = 0x7fff0000,
1075 .pvr_value = 0x00820000,
1076 .cpu_name = "G2_LE",
Kumar Gala10b35d92005-09-23 14:08:58 -05001077 .cpu_features = CPU_FTRS_G2_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +10001078 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001079 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001080 .icache_bsize = 32,
1081 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001082 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001083 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001084 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001085 },
Kim Phillips6c4a2502006-10-02 20:10:24 -05001086 { /* e300c1 (a 603e core, plus some) on 83xx */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001087 .pvr_mask = 0x7fff0000,
1088 .pvr_value = 0x00830000,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001089 .cpu_name = "e300c1",
Kumar Gala10b35d92005-09-23 14:08:58 -05001090 .cpu_features = CPU_FTRS_E300,
Stephen Rothwell49209602005-10-12 15:55:09 +10001091 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001092 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001093 .icache_bsize = 32,
1094 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001095 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001096 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001097 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001098 },
Kim Phillips6c4a2502006-10-02 20:10:24 -05001099 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
1100 .pvr_mask = 0x7fff0000,
1101 .pvr_value = 0x00840000,
1102 .cpu_name = "e300c2",
Kim Phillipsaa42c692006-12-08 02:43:30 -06001103 .cpu_features = CPU_FTRS_E300C2,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001104 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Kumar Gala2319f122009-03-19 03:55:41 +00001105 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1106 MMU_FTR_NEED_DTLB_SW_LRU,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001107 .icache_bsize = 32,
1108 .dcache_bsize = 32,
1109 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001110 .machine_check = machine_check_generic,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001111 .platform = "ppc603",
1112 },
Li Yanga58d5242007-10-19 19:38:42 +08001113 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
Scott Wood57933f82006-12-01 12:57:05 -06001114 .pvr_mask = 0x7fff0000,
1115 .pvr_value = 0x00850000,
1116 .cpu_name = "e300c3",
1117 .cpu_features = CPU_FTRS_E300,
1118 .cpu_user_features = COMMON_USER,
Kumar Gala2319f122009-03-19 03:55:41 +00001119 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1120 MMU_FTR_NEED_DTLB_SW_LRU,
Scott Wood57933f82006-12-01 12:57:05 -06001121 .icache_bsize = 32,
1122 .dcache_bsize = 32,
1123 .cpu_setup = __setup_cpu_603,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001124 .num_pmcs = 4,
1125 .oprofile_cpu_type = "ppc/e300",
1126 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Scott Wood57933f82006-12-01 12:57:05 -06001127 .platform = "ppc603",
1128 },
Li Yanga58d5242007-10-19 19:38:42 +08001129 { /* e300c4 (e300c1, plus one IU) */
1130 .pvr_mask = 0x7fff0000,
1131 .pvr_value = 0x00860000,
1132 .cpu_name = "e300c4",
1133 .cpu_features = CPU_FTRS_E300,
1134 .cpu_user_features = COMMON_USER,
Kumar Gala2319f122009-03-19 03:55:41 +00001135 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1136 MMU_FTR_NEED_DTLB_SW_LRU,
Li Yanga58d5242007-10-19 19:38:42 +08001137 .icache_bsize = 32,
1138 .dcache_bsize = 32,
1139 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001140 .machine_check = machine_check_generic,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001141 .num_pmcs = 4,
1142 .oprofile_cpu_type = "ppc/e300",
1143 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Li Yanga58d5242007-10-19 19:38:42 +08001144 .platform = "ppc603",
1145 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001146 { /* default match, we assume split I/D cache & TB (non-601)... */
1147 .pvr_mask = 0x00000000,
1148 .pvr_value = 0x00000000,
1149 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -05001150 .cpu_features = CPU_FTRS_CLASSIC32,
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_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001153 .icache_bsize = 32,
1154 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001155 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001156 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001157 },
1158#endif /* CLASSIC_PPC */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001159#ifdef CONFIG_8xx
1160 { /* 8xx */
1161 .pvr_mask = 0xffff0000,
1162 .pvr_value = 0x00500000,
1163 .cpu_name = "8xx",
1164 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1165 * if the 8xx code is there.... */
Kumar Gala10b35d92005-09-23 14:08:58 -05001166 .cpu_features = CPU_FTRS_8XX,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001167 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001168 .mmu_features = MMU_FTR_TYPE_8xx,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001169 .icache_bsize = 16,
1170 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001171 .platform = "ppc823",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001172 },
1173#endif /* CONFIG_8xx */
1174#ifdef CONFIG_40x
1175 { /* 403GC */
1176 .pvr_mask = 0xffffff00,
1177 .pvr_value = 0x00200200,
1178 .cpu_name = "403GC",
Kumar Gala10b35d92005-09-23 14:08:58 -05001179 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001180 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001181 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001182 .icache_bsize = 16,
1183 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001184 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001185 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001186 },
1187 { /* 403GCX */
1188 .pvr_mask = 0xffffff00,
1189 .pvr_value = 0x00201400,
1190 .cpu_name = "403GCX",
Kumar Gala10b35d92005-09-23 14:08:58 -05001191 .cpu_features = CPU_FTRS_40X,
Paul Mackerras98599012005-10-22 16:51:34 +10001192 .cpu_user_features = PPC_FEATURE_32 |
1193 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001194 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001195 .icache_bsize = 16,
1196 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001197 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001198 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001199 },
1200 { /* 403G ?? */
1201 .pvr_mask = 0xffff0000,
1202 .pvr_value = 0x00200000,
1203 .cpu_name = "403G ??",
Kumar Gala10b35d92005-09-23 14:08:58 -05001204 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001205 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001206 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001207 .icache_bsize = 16,
1208 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001209 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001210 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001211 },
1212 { /* 405GP */
1213 .pvr_mask = 0xffff0000,
1214 .pvr_value = 0x40110000,
1215 .cpu_name = "405GP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001216 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001217 .cpu_user_features = PPC_FEATURE_32 |
1218 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001219 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001220 .icache_bsize = 32,
1221 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001222 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001223 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001224 },
1225 { /* STB 03xxx */
1226 .pvr_mask = 0xffff0000,
1227 .pvr_value = 0x40130000,
1228 .cpu_name = "STB03xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001229 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001230 .cpu_user_features = PPC_FEATURE_32 |
1231 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001232 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001233 .icache_bsize = 32,
1234 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001235 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001236 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001237 },
1238 { /* STB 04xxx */
1239 .pvr_mask = 0xffff0000,
1240 .pvr_value = 0x41810000,
1241 .cpu_name = "STB04xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001242 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001243 .cpu_user_features = PPC_FEATURE_32 |
1244 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001245 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001246 .icache_bsize = 32,
1247 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001248 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001249 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001250 },
1251 { /* NP405L */
1252 .pvr_mask = 0xffff0000,
1253 .pvr_value = 0x41610000,
1254 .cpu_name = "NP405L",
Kumar Gala10b35d92005-09-23 14:08:58 -05001255 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001256 .cpu_user_features = PPC_FEATURE_32 |
1257 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001258 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001259 .icache_bsize = 32,
1260 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001261 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001262 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001263 },
1264 { /* NP4GS3 */
1265 .pvr_mask = 0xffff0000,
1266 .pvr_value = 0x40B10000,
1267 .cpu_name = "NP4GS3",
Kumar Gala10b35d92005-09-23 14:08:58 -05001268 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001269 .cpu_user_features = PPC_FEATURE_32 |
1270 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001271 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001272 .icache_bsize = 32,
1273 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001274 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001275 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001276 },
1277 { /* NP405H */
1278 .pvr_mask = 0xffff0000,
1279 .pvr_value = 0x41410000,
1280 .cpu_name = "NP405H",
Kumar Gala10b35d92005-09-23 14:08:58 -05001281 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001282 .cpu_user_features = PPC_FEATURE_32 |
1283 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001284 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001285 .icache_bsize = 32,
1286 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001287 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001288 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001289 },
1290 { /* 405GPr */
1291 .pvr_mask = 0xffff0000,
1292 .pvr_value = 0x50910000,
1293 .cpu_name = "405GPr",
Kumar Gala10b35d92005-09-23 14:08:58 -05001294 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001295 .cpu_user_features = PPC_FEATURE_32 |
1296 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001297 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001298 .icache_bsize = 32,
1299 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001300 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001301 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001302 },
1303 { /* STBx25xx */
1304 .pvr_mask = 0xffff0000,
1305 .pvr_value = 0x51510000,
1306 .cpu_name = "STBx25xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001307 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001308 .cpu_user_features = PPC_FEATURE_32 |
1309 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001310 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001311 .icache_bsize = 32,
1312 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001313 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001314 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001315 },
1316 { /* 405LP */
1317 .pvr_mask = 0xffff0000,
1318 .pvr_value = 0x41F10000,
1319 .cpu_name = "405LP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001320 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001321 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001322 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001323 .icache_bsize = 32,
1324 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001325 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001326 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001327 },
1328 { /* Xilinx Virtex-II Pro */
Grant C. Likely72646c72006-01-19 01:13:20 -07001329 .pvr_mask = 0xfffff000,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001330 .pvr_value = 0x20010000,
1331 .cpu_name = "Virtex-II Pro",
Kumar Gala10b35d92005-09-23 14:08:58 -05001332 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001333 .cpu_user_features = PPC_FEATURE_32 |
1334 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001335 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001336 .icache_bsize = 32,
1337 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001338 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001339 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001340 },
Grant C. Likely72646c72006-01-19 01:13:20 -07001341 { /* Xilinx Virtex-4 FX */
1342 .pvr_mask = 0xfffff000,
1343 .pvr_value = 0x20011000,
1344 .cpu_name = "Virtex-4 FX",
1345 .cpu_features = CPU_FTRS_40X,
1346 .cpu_user_features = PPC_FEATURE_32 |
1347 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001348 .mmu_features = MMU_FTR_TYPE_40x,
Grant C. Likely72646c72006-01-19 01:13:20 -07001349 .icache_bsize = 32,
1350 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001351 .machine_check = machine_check_4xx,
Peter Bergner838fdb42006-09-14 14:18:38 -05001352 .platform = "ppc405",
Grant C. Likely72646c72006-01-19 01:13:20 -07001353 },
Eugene Suroveginad95d602005-06-07 13:22:09 -07001354 { /* 405EP */
1355 .pvr_mask = 0xffff0000,
1356 .pvr_value = 0x51210000,
1357 .cpu_name = "405EP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001358 .cpu_features = CPU_FTRS_40X,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001359 .cpu_user_features = PPC_FEATURE_32 |
1360 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001361 .mmu_features = MMU_FTR_TYPE_40x,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001362 .icache_bsize = 32,
1363 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001364 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001365 .platform = "ppc405",
Eugene Suroveginad95d602005-06-07 13:22:09 -07001366 },
Lee Nipperff349102010-07-09 01:17:16 +00001367 { /* 405EX Rev. A/B with Security */
1368 .pvr_mask = 0xffff000f,
1369 .pvr_value = 0x12910007,
1370 .cpu_name = "405EX Rev. A/B",
Stefan Roese5d8476c2007-10-11 22:08:14 +10001371 .cpu_features = CPU_FTRS_40X,
1372 .cpu_user_features = PPC_FEATURE_32 |
1373 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001374 .mmu_features = MMU_FTR_TYPE_40x,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001375 .icache_bsize = 32,
1376 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001377 .machine_check = machine_check_4xx,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001378 .platform = "ppc405",
1379 },
Lee Nipperff349102010-07-09 01:17:16 +00001380 { /* 405EX Rev. C without Security */
1381 .pvr_mask = 0xffff000f,
1382 .pvr_value = 0x1291000d,
1383 .cpu_name = "405EX Rev. C",
1384 .cpu_features = CPU_FTRS_40X,
1385 .cpu_user_features = PPC_FEATURE_32 |
1386 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1387 .mmu_features = MMU_FTR_TYPE_40x,
1388 .icache_bsize = 32,
1389 .dcache_bsize = 32,
1390 .machine_check = machine_check_4xx,
1391 .platform = "ppc405",
1392 },
1393 { /* 405EX Rev. C with Security */
1394 .pvr_mask = 0xffff000f,
1395 .pvr_value = 0x1291000f,
1396 .cpu_name = "405EX Rev. C",
1397 .cpu_features = CPU_FTRS_40X,
1398 .cpu_user_features = PPC_FEATURE_32 |
1399 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1400 .mmu_features = MMU_FTR_TYPE_40x,
1401 .icache_bsize = 32,
1402 .dcache_bsize = 32,
1403 .machine_check = machine_check_4xx,
1404 .platform = "ppc405",
1405 },
1406 { /* 405EX Rev. D without Security */
1407 .pvr_mask = 0xffff000f,
1408 .pvr_value = 0x12910003,
1409 .cpu_name = "405EX Rev. D",
1410 .cpu_features = CPU_FTRS_40X,
1411 .cpu_user_features = PPC_FEATURE_32 |
1412 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1413 .mmu_features = MMU_FTR_TYPE_40x,
1414 .icache_bsize = 32,
1415 .dcache_bsize = 32,
1416 .machine_check = machine_check_4xx,
1417 .platform = "ppc405",
1418 },
1419 { /* 405EX Rev. D with Security */
1420 .pvr_mask = 0xffff000f,
1421 .pvr_value = 0x12910005,
1422 .cpu_name = "405EX Rev. D",
1423 .cpu_features = CPU_FTRS_40X,
1424 .cpu_user_features = PPC_FEATURE_32 |
1425 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1426 .mmu_features = MMU_FTR_TYPE_40x,
1427 .icache_bsize = 32,
1428 .dcache_bsize = 32,
1429 .machine_check = machine_check_4xx,
1430 .platform = "ppc405",
1431 },
1432 { /* 405EXr Rev. A/B without Security */
1433 .pvr_mask = 0xffff000f,
1434 .pvr_value = 0x12910001,
1435 .cpu_name = "405EXr Rev. A/B",
1436 .cpu_features = CPU_FTRS_40X,
1437 .cpu_user_features = PPC_FEATURE_32 |
1438 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1439 .mmu_features = MMU_FTR_TYPE_40x,
1440 .icache_bsize = 32,
1441 .dcache_bsize = 32,
1442 .machine_check = machine_check_4xx,
1443 .platform = "ppc405",
1444 },
1445 { /* 405EXr Rev. C without Security */
1446 .pvr_mask = 0xffff000f,
1447 .pvr_value = 0x12910009,
1448 .cpu_name = "405EXr Rev. C",
1449 .cpu_features = CPU_FTRS_40X,
1450 .cpu_user_features = PPC_FEATURE_32 |
1451 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1452 .mmu_features = MMU_FTR_TYPE_40x,
1453 .icache_bsize = 32,
1454 .dcache_bsize = 32,
1455 .machine_check = machine_check_4xx,
1456 .platform = "ppc405",
1457 },
1458 { /* 405EXr Rev. C with Security */
1459 .pvr_mask = 0xffff000f,
1460 .pvr_value = 0x1291000b,
1461 .cpu_name = "405EXr Rev. C",
1462 .cpu_features = CPU_FTRS_40X,
1463 .cpu_user_features = PPC_FEATURE_32 |
1464 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1465 .mmu_features = MMU_FTR_TYPE_40x,
1466 .icache_bsize = 32,
1467 .dcache_bsize = 32,
1468 .machine_check = machine_check_4xx,
1469 .platform = "ppc405",
1470 },
1471 { /* 405EXr Rev. D without Security */
1472 .pvr_mask = 0xffff000f,
Stefan Roeseb676d842008-01-15 18:09:15 +11001473 .pvr_value = 0x12910000,
Lee Nipperff349102010-07-09 01:17:16 +00001474 .cpu_name = "405EXr Rev. D",
1475 .cpu_features = CPU_FTRS_40X,
1476 .cpu_user_features = PPC_FEATURE_32 |
1477 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1478 .mmu_features = MMU_FTR_TYPE_40x,
1479 .icache_bsize = 32,
1480 .dcache_bsize = 32,
1481 .machine_check = machine_check_4xx,
1482 .platform = "ppc405",
1483 },
1484 { /* 405EXr Rev. D with Security */
1485 .pvr_mask = 0xffff000f,
1486 .pvr_value = 0x12910002,
1487 .cpu_name = "405EXr Rev. D",
Stefan Roeseb676d842008-01-15 18:09:15 +11001488 .cpu_features = CPU_FTRS_40X,
1489 .cpu_user_features = PPC_FEATURE_32 |
1490 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001491 .mmu_features = MMU_FTR_TYPE_40x,
Stefan Roeseb676d842008-01-15 18:09:15 +11001492 .icache_bsize = 32,
1493 .dcache_bsize = 32,
1494 .machine_check = machine_check_4xx,
1495 .platform = "ppc405",
1496 },
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001497 {
1498 /* 405EZ */
1499 .pvr_mask = 0xffff0000,
1500 .pvr_value = 0x41510000,
1501 .cpu_name = "405EZ",
1502 .cpu_features = CPU_FTRS_40X,
1503 .cpu_user_features = PPC_FEATURE_32 |
1504 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001505 .mmu_features = MMU_FTR_TYPE_40x,
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001506 .icache_bsize = 32,
1507 .dcache_bsize = 32,
1508 .machine_check = machine_check_4xx,
1509 .platform = "ppc405",
1510 },
Tanmay Inamdard5b9ee72011-11-28 21:01:41 +00001511 { /* APM8018X */
1512 .pvr_mask = 0xffff0000,
1513 .pvr_value = 0x7ff11432,
1514 .cpu_name = "APM8018X",
1515 .cpu_features = CPU_FTRS_40X,
1516 .cpu_user_features = PPC_FEATURE_32 |
1517 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1518 .mmu_features = MMU_FTR_TYPE_40x,
1519 .icache_bsize = 32,
1520 .dcache_bsize = 32,
1521 .machine_check = machine_check_4xx,
1522 .platform = "ppc405",
1523 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001524 { /* default match */
1525 .pvr_mask = 0x00000000,
1526 .pvr_value = 0x00000000,
1527 .cpu_name = "(generic 40x PPC)",
1528 .cpu_features = CPU_FTRS_40X,
1529 .cpu_user_features = PPC_FEATURE_32 |
1530 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001531 .mmu_features = MMU_FTR_TYPE_40x,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001532 .icache_bsize = 32,
1533 .dcache_bsize = 32,
1534 .machine_check = machine_check_4xx,
1535 .platform = "ppc405",
1536 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001537
1538#endif /* CONFIG_40x */
1539#ifdef CONFIG_44x
Matt Porterc9cf73a2005-07-31 22:34:52 -07001540 {
1541 .pvr_mask = 0xf0000fff,
1542 .pvr_value = 0x40000850,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001543 .cpu_name = "440GR Rev. A",
1544 .cpu_features = CPU_FTRS_44X,
1545 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001546 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001547 .icache_bsize = 32,
1548 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001549 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001550 .platform = "ppc440",
1551 },
1552 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1553 .pvr_mask = 0xf0000fff,
1554 .pvr_value = 0x40000858,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001555 .cpu_name = "440EP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001556 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001557 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001558 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001559 .icache_bsize = 32,
1560 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001561 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001562 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001563 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001564 },
1565 {
1566 .pvr_mask = 0xf0000fff,
1567 .pvr_value = 0x400008d3,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001568 .cpu_name = "440GR Rev. B",
1569 .cpu_features = CPU_FTRS_44X,
1570 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001571 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001572 .icache_bsize = 32,
1573 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001574 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001575 .platform = "ppc440",
1576 },
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001577 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1578 .pvr_mask = 0xf0000ff7,
1579 .pvr_value = 0x400008d4,
1580 .cpu_name = "440EP Rev. C",
1581 .cpu_features = CPU_FTRS_44X,
1582 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001583 .mmu_features = MMU_FTR_TYPE_44x,
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001584 .icache_bsize = 32,
1585 .dcache_bsize = 32,
1586 .cpu_setup = __setup_cpu_440ep,
1587 .machine_check = machine_check_4xx,
1588 .platform = "ppc440",
1589 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001590 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1591 .pvr_mask = 0xf0000fff,
1592 .pvr_value = 0x400008db,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001593 .cpu_name = "440EP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001594 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001595 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001596 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001597 .icache_bsize = 32,
1598 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001599 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001600 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001601 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001602 },
Valentine Barshak15fc9932007-08-29 17:40:30 +04001603 { /* 440GRX */
1604 .pvr_mask = 0xf0000ffb,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001605 .pvr_value = 0x200008D0,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001606 .cpu_name = "440GRX",
1607 .cpu_features = CPU_FTRS_44X,
1608 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001609 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001610 .icache_bsize = 32,
1611 .dcache_bsize = 32,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001612 .cpu_setup = __setup_cpu_440grx,
Valentine Barshakb2be3b12007-12-22 03:22:23 +11001613 .machine_check = machine_check_440A,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001614 .platform = "ppc440",
Valentine Barshak15fc9932007-08-29 17:40:30 +04001615 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001616 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1617 .pvr_mask = 0xf0000ffb,
1618 .pvr_value = 0x200008D8,
1619 .cpu_name = "440EPX",
1620 .cpu_features = CPU_FTRS_44X,
1621 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001622 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001623 .icache_bsize = 32,
1624 .dcache_bsize = 32,
1625 .cpu_setup = __setup_cpu_440epx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001626 .machine_check = machine_check_440A,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001627 .platform = "ppc440",
1628 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001629 { /* 440GP Rev. B */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001630 .pvr_mask = 0xf0000fff,
1631 .pvr_value = 0x40000440,
1632 .cpu_name = "440GP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001633 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001634 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001635 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001636 .icache_bsize = 32,
1637 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001638 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001639 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001640 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001641 { /* 440GP Rev. C */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001642 .pvr_mask = 0xf0000fff,
1643 .pvr_value = 0x40000481,
1644 .cpu_name = "440GP Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001645 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001646 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001647 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001648 .icache_bsize = 32,
1649 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001650 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001651 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001652 },
1653 { /* 440GX Rev. A */
1654 .pvr_mask = 0xf0000fff,
1655 .pvr_value = 0x50000850,
1656 .cpu_name = "440GX Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001657 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001658 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001659 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001660 .icache_bsize = 32,
1661 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001662 .cpu_setup = __setup_cpu_440gx,
1663 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001664 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001665 },
1666 { /* 440GX Rev. B */
1667 .pvr_mask = 0xf0000fff,
1668 .pvr_value = 0x50000851,
1669 .cpu_name = "440GX Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001670 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001671 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001672 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001673 .icache_bsize = 32,
1674 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001675 .cpu_setup = __setup_cpu_440gx,
1676 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001677 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001678 },
1679 { /* 440GX Rev. C */
1680 .pvr_mask = 0xf0000fff,
1681 .pvr_value = 0x50000892,
1682 .cpu_name = "440GX Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001683 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001684 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001685 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001686 .icache_bsize = 32,
1687 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001688 .cpu_setup = __setup_cpu_440gx,
1689 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001690 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001691 },
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001692 { /* 440GX Rev. F */
1693 .pvr_mask = 0xf0000fff,
1694 .pvr_value = 0x50000894,
1695 .cpu_name = "440GX Rev. F",
Kumar Gala10b35d92005-09-23 14:08:58 -05001696 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001697 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001698 .mmu_features = MMU_FTR_TYPE_44x,
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001699 .icache_bsize = 32,
1700 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001701 .cpu_setup = __setup_cpu_440gx,
1702 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001703 .platform = "ppc440",
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001704 },
Matt Porter656de7e2005-09-03 15:55:42 -07001705 { /* 440SP Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001706 .pvr_mask = 0xfff00fff,
1707 .pvr_value = 0x53200891,
Matt Porter656de7e2005-09-03 15:55:42 -07001708 .cpu_name = "440SP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001709 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001710 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001711 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porter656de7e2005-09-03 15:55:42 -07001712 .icache_bsize = 32,
1713 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001714 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001715 .platform = "ppc440",
Matt Porter656de7e2005-09-03 15:55:42 -07001716 },
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001717 { /* 440SPe Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001718 .pvr_mask = 0xfff00fff,
1719 .pvr_value = 0x53400890,
1720 .cpu_name = "440SPe Rev. A",
1721 .cpu_features = CPU_FTRS_44X,
1722 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001723 .mmu_features = MMU_FTR_TYPE_44x,
Roland Dreier333e6152007-06-16 05:36:32 +10001724 .icache_bsize = 32,
1725 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001726 .cpu_setup = __setup_cpu_440spe,
1727 .machine_check = machine_check_440A,
Roland Dreier333e6152007-06-16 05:36:32 +10001728 .platform = "ppc440",
1729 },
1730 { /* 440SPe Rev. B */
1731 .pvr_mask = 0xfff00fff,
1732 .pvr_value = 0x53400891,
1733 .cpu_name = "440SPe Rev. B",
Kumar Galaa147c582006-12-08 02:34:38 -06001734 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001735 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001736 .mmu_features = MMU_FTR_TYPE_44x,
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001737 .icache_bsize = 32,
1738 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001739 .cpu_setup = __setup_cpu_440spe,
1740 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001741 .platform = "ppc440",
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001742 },
John Linn23e72372008-07-01 09:42:07 -07001743 { /* 440 in Xilinx Virtex-5 FXT */
1744 .pvr_mask = 0xfffffff0,
1745 .pvr_value = 0x7ff21910,
1746 .cpu_name = "440 in Virtex-5 FXT",
1747 .cpu_features = CPU_FTRS_44X,
1748 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001749 .mmu_features = MMU_FTR_TYPE_44x,
John Linn23e72372008-07-01 09:42:07 -07001750 .icache_bsize = 32,
1751 .dcache_bsize = 32,
Grant Likely640d17d2008-12-04 05:39:55 +00001752 .cpu_setup = __setup_cpu_440x5,
1753 .machine_check = machine_check_440A,
John Linn23e72372008-07-01 09:42:07 -07001754 .platform = "ppc440",
1755 },
Stefan Roese464076a2008-02-24 08:07:41 +11001756 { /* 460EX */
Stefan Roese20d70342009-07-29 07:04:46 +00001757 .pvr_mask = 0xffff0006,
Stefan Roese464076a2008-02-24 08:07:41 +11001758 .pvr_value = 0x13020002,
1759 .cpu_name = "460EX",
Benjamin Herrenschmidt6d2170b2008-12-18 19:13:22 +00001760 .cpu_features = CPU_FTRS_440x6,
Stefan Roese464076a2008-02-24 08:07:41 +11001761 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001762 .mmu_features = MMU_FTR_TYPE_44x,
Stefan Roese464076a2008-02-24 08:07:41 +11001763 .icache_bsize = 32,
1764 .dcache_bsize = 32,
1765 .cpu_setup = __setup_cpu_460ex,
1766 .machine_check = machine_check_440A,
1767 .platform = "ppc440",
1768 },
Stefan Roese20d70342009-07-29 07:04:46 +00001769 { /* 460EX Rev B */
1770 .pvr_mask = 0xffff0007,
1771 .pvr_value = 0x13020004,
1772 .cpu_name = "460EX Rev. B",
1773 .cpu_features = CPU_FTRS_440x6,
1774 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1775 .mmu_features = MMU_FTR_TYPE_44x,
1776 .icache_bsize = 32,
1777 .dcache_bsize = 32,
1778 .cpu_setup = __setup_cpu_460ex,
1779 .machine_check = machine_check_440A,
1780 .platform = "ppc440",
1781 },
Stefan Roese464076a2008-02-24 08:07:41 +11001782 { /* 460GT */
Stefan Roese20d70342009-07-29 07:04:46 +00001783 .pvr_mask = 0xffff0006,
Stefan Roese464076a2008-02-24 08:07:41 +11001784 .pvr_value = 0x13020000,
1785 .cpu_name = "460GT",
Benjamin Herrenschmidt6d2170b2008-12-18 19:13:22 +00001786 .cpu_features = CPU_FTRS_440x6,
Josh Boyer939e6222008-06-11 07:52:40 -04001787 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001788 .mmu_features = MMU_FTR_TYPE_44x,
Stefan Roese464076a2008-02-24 08:07:41 +11001789 .icache_bsize = 32,
1790 .dcache_bsize = 32,
Josh Boyer939e6222008-06-11 07:52:40 -04001791 .cpu_setup = __setup_cpu_460gt,
Stefan Roese464076a2008-02-24 08:07:41 +11001792 .machine_check = machine_check_440A,
1793 .platform = "ppc440",
1794 },
Stefan Roese20d70342009-07-29 07:04:46 +00001795 { /* 460GT Rev B */
1796 .pvr_mask = 0xffff0007,
1797 .pvr_value = 0x13020005,
1798 .cpu_name = "460GT Rev. B",
1799 .cpu_features = CPU_FTRS_440x6,
1800 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1801 .mmu_features = MMU_FTR_TYPE_44x,
1802 .icache_bsize = 32,
1803 .dcache_bsize = 32,
1804 .cpu_setup = __setup_cpu_460gt,
1805 .machine_check = machine_check_440A,
1806 .platform = "ppc440",
1807 },
Madhulika Madishetty6c712092009-02-05 13:31:36 +00001808 { /* 460SX */
1809 .pvr_mask = 0xffffff00,
1810 .pvr_value = 0x13541800,
1811 .cpu_name = "460SX",
1812 .cpu_features = CPU_FTRS_44X,
1813 .cpu_user_features = COMMON_USER_BOOKE,
1814 .mmu_features = MMU_FTR_TYPE_44x,
1815 .icache_bsize = 32,
1816 .dcache_bsize = 32,
1817 .cpu_setup = __setup_cpu_460sx,
1818 .machine_check = machine_check_440A,
1819 .platform = "ppc440",
1820 },
Tirumala Marri6edc3232010-09-13 13:26:11 +00001821 { /* 464 in APM821xx */
Vinh Nguyen Huu Tuong7c801162011-12-20 02:43:34 +00001822 .pvr_mask = 0xfffffff0,
Tirumala Marri6edc3232010-09-13 13:26:11 +00001823 .pvr_value = 0x12C41C80,
1824 .cpu_name = "APM821XX",
1825 .cpu_features = CPU_FTRS_44X,
1826 .cpu_user_features = COMMON_USER_BOOKE |
1827 PPC_FEATURE_HAS_FPU,
1828 .mmu_features = MMU_FTR_TYPE_44x,
1829 .icache_bsize = 32,
1830 .dcache_bsize = 32,
1831 .cpu_setup = __setup_cpu_apm821xx,
1832 .machine_check = machine_check_440A,
1833 .platform = "ppc440",
1834 },
Dave Kleikampc48d0db2011-01-26 06:17:58 +00001835 { /* 476 DD2 core */
1836 .pvr_mask = 0xffffffff,
1837 .pvr_value = 0x11a52080,
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001838 .cpu_name = "476",
Dave Kleikampc48d0db2011-01-26 06:17:58 +00001839 .cpu_features = CPU_FTRS_47X | CPU_FTR_476_DD2,
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001840 .cpu_user_features = COMMON_USER_BOOKE |
1841 PPC_FEATURE_HAS_FPU,
1842 .mmu_features = MMU_FTR_TYPE_47x |
1843 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1844 .icache_bsize = 32,
1845 .dcache_bsize = 128,
Dave Kleikampfc5e7092010-03-05 03:43:18 +00001846 .machine_check = machine_check_47x,
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001847 .platform = "ppc470",
1848 },
Tony Breedsdf777bd2011-11-30 21:39:23 +00001849 { /* 476fpe */
1850 .pvr_mask = 0xffff0000,
1851 .pvr_value = 0x7ff50000,
1852 .cpu_name = "476fpe",
1853 .cpu_features = CPU_FTRS_47X | CPU_FTR_476_DD2,
1854 .cpu_user_features = COMMON_USER_BOOKE |
1855 PPC_FEATURE_HAS_FPU,
1856 .mmu_features = MMU_FTR_TYPE_47x |
1857 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1858 .icache_bsize = 32,
1859 .dcache_bsize = 128,
1860 .machine_check = machine_check_47x,
1861 .platform = "ppc470",
1862 },
Torez Smithb4e8c8d2010-03-05 10:45:54 +00001863 { /* 476 iss */
1864 .pvr_mask = 0xffff0000,
1865 .pvr_value = 0x00050000,
1866 .cpu_name = "476",
1867 .cpu_features = CPU_FTRS_47X,
1868 .cpu_user_features = COMMON_USER_BOOKE |
1869 PPC_FEATURE_HAS_FPU,
Torez Smithb4e8c8d2010-03-05 10:45:54 +00001870 .mmu_features = MMU_FTR_TYPE_47x |
1871 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1872 .icache_bsize = 32,
1873 .dcache_bsize = 128,
1874 .machine_check = machine_check_47x,
1875 .platform = "ppc470",
1876 },
Dave Kleikampc48d0db2011-01-26 06:17:58 +00001877 { /* 476 others */
1878 .pvr_mask = 0xffff0000,
1879 .pvr_value = 0x11a50000,
1880 .cpu_name = "476",
1881 .cpu_features = CPU_FTRS_47X,
1882 .cpu_user_features = COMMON_USER_BOOKE |
1883 PPC_FEATURE_HAS_FPU,
1884 .mmu_features = MMU_FTR_TYPE_47x |
1885 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1886 .icache_bsize = 32,
1887 .dcache_bsize = 128,
1888 .machine_check = machine_check_47x,
1889 .platform = "ppc470",
1890 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001891 { /* default match */
1892 .pvr_mask = 0x00000000,
1893 .pvr_value = 0x00000000,
1894 .cpu_name = "(generic 44x PPC)",
1895 .cpu_features = CPU_FTRS_44X,
1896 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001897 .mmu_features = MMU_FTR_TYPE_44x,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001898 .icache_bsize = 32,
1899 .dcache_bsize = 32,
1900 .machine_check = machine_check_4xx,
1901 .platform = "ppc440",
1902 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001903#endif /* CONFIG_44x */
Josh Boyere3e414b2007-12-24 08:44:47 -06001904#ifdef CONFIG_E200
Stephen Rothwell49209602005-10-12 15:55:09 +10001905 { /* e200z5 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001906 .pvr_mask = 0xfff00000,
1907 .pvr_value = 0x81000000,
1908 .cpu_name = "e200z5",
1909 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001910 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001911 .cpu_user_features = COMMON_USER_BOOKE |
1912 PPC_FEATURE_HAS_EFP_SINGLE |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001913 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001914 .mmu_features = MMU_FTR_TYPE_FSL_E,
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001915 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001916 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001917 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001918 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001919 { /* e200z6 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001920 .pvr_mask = 0xfff00000,
1921 .pvr_value = 0x81100000,
1922 .cpu_name = "e200z6",
1923 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001924 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001925 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001926 PPC_FEATURE_HAS_SPE_COMP |
1927 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001928 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001929 .mmu_features = MMU_FTR_TYPE_FSL_E,
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001930 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001931 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001932 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001933 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001934 { /* default match */
1935 .pvr_mask = 0x00000000,
1936 .pvr_value = 0x00000000,
1937 .cpu_name = "(generic E200 PPC)",
1938 .cpu_features = CPU_FTRS_E200,
1939 .cpu_user_features = COMMON_USER_BOOKE |
1940 PPC_FEATURE_HAS_EFP_SINGLE |
1941 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001942 .mmu_features = MMU_FTR_TYPE_FSL_E,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001943 .dcache_bsize = 32,
Kumar Gala105c31d2009-01-08 08:31:20 -06001944 .cpu_setup = __setup_cpu_e200,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001945 .machine_check = machine_check_e200,
1946 .platform = "ppc5554",
Paul Mackerras516c8be2008-05-12 14:20:35 +10001947 }
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001948#endif /* CONFIG_E200 */
Kumar Gala4490c062010-10-08 08:32:11 -05001949#endif /* CONFIG_PPC32 */
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001950#ifdef CONFIG_E500
Kumar Gala4490c062010-10-08 08:32:11 -05001951#ifdef CONFIG_PPC32
Stephen Rothwell49209602005-10-12 15:55:09 +10001952 { /* e500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001953 .pvr_mask = 0xffff0000,
1954 .pvr_value = 0x80200000,
1955 .cpu_name = "e500",
Kumar Gala10b35d92005-09-23 14:08:58 -05001956 .cpu_features = CPU_FTRS_E500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001957 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001958 PPC_FEATURE_HAS_SPE_COMP |
1959 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001960 .mmu_features = MMU_FTR_TYPE_FSL_E,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001961 .icache_bsize = 32,
1962 .dcache_bsize = 32,
1963 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001964 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001965 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06001966 .cpu_setup = __setup_cpu_e500v1,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001967 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001968 .platform = "ppc8540",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001969 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001970 { /* e500v2 */
Kumar Gala5b37b702005-06-21 17:15:18 -07001971 .pvr_mask = 0xffff0000,
1972 .pvr_value = 0x80210000,
1973 .cpu_name = "e500v2",
Kumar Gala10b35d92005-09-23 14:08:58 -05001974 .cpu_features = CPU_FTRS_E500_2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001975 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001976 PPC_FEATURE_HAS_SPE_COMP |
1977 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1978 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001979 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS,
Kumar Gala5b37b702005-06-21 17:15:18 -07001980 .icache_bsize = 32,
1981 .dcache_bsize = 32,
1982 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001983 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001984 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06001985 .cpu_setup = __setup_cpu_e500v2,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001986 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001987 .platform = "ppc8548",
Kumar Gala5b37b702005-06-21 17:15:18 -07001988 },
Kumar Gala3dfa8772008-06-16 09:41:32 -05001989 { /* e500mc */
1990 .pvr_mask = 0xffff0000,
1991 .pvr_value = 0x80230000,
1992 .cpu_name = "e500mc",
Kumar Gala3dfa8772008-06-16 09:41:32 -05001993 .cpu_features = CPU_FTRS_E500MC,
1994 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Kumar Galac3071952009-02-10 22:26:06 -06001995 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
Kumar Gala323d23a2009-04-23 08:51:22 -05001996 MMU_FTR_USE_TLBILX,
Kumar Gala3dfa8772008-06-16 09:41:32 -05001997 .icache_bsize = 64,
1998 .dcache_bsize = 64,
1999 .num_pmcs = 4,
Scott Wooda1110652010-02-25 18:09:45 -06002000 .oprofile_cpu_type = "ppc/e500mc",
Kumar Gala3dfa8772008-06-16 09:41:32 -05002001 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06002002 .cpu_setup = __setup_cpu_e500mc,
Scott Woodfe04b112010-04-08 00:38:22 -05002003 .machine_check = machine_check_e500mc,
Kumar Gala3dfa8772008-06-16 09:41:32 -05002004 .platform = "ppce500mc",
2005 },
Kumar Gala4490c062010-10-08 08:32:11 -05002006#endif /* CONFIG_PPC32 */
2007 { /* e5500 */
2008 .pvr_mask = 0xffff0000,
2009 .pvr_value = 0x80240000,
2010 .cpu_name = "e5500",
Kumar Gala11ed0db2011-04-06 00:11:06 -05002011 .cpu_features = CPU_FTRS_E5500,
Kumar Galafb9be232011-06-02 11:26:13 -05002012 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Kumar Gala4490c062010-10-08 08:32:11 -05002013 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
2014 MMU_FTR_USE_TLBILX,
2015 .icache_bsize = 64,
2016 .dcache_bsize = 64,
2017 .num_pmcs = 4,
2018 .oprofile_cpu_type = "ppc/e500mc",
2019 .oprofile_type = PPC_OPROFILE_FSL_EMB,
2020 .cpu_setup = __setup_cpu_e5500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05302021#ifndef CONFIG_PPC32
Kumar Gala4490c062010-10-08 08:32:11 -05002022 .cpu_restore = __restore_cpu_e5500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05302023#endif
Kumar Gala4490c062010-10-08 08:32:11 -05002024 .machine_check = machine_check_e500mc,
2025 .platform = "ppce5500",
2026 },
Kumar Gala10241842011-11-06 11:51:07 -06002027 { /* e6500 */
2028 .pvr_mask = 0xffff0000,
2029 .pvr_value = 0x80400000,
2030 .cpu_name = "e6500",
2031 .cpu_features = CPU_FTRS_E6500,
2032 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
2033 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
2034 MMU_FTR_USE_TLBILX,
2035 .icache_bsize = 64,
2036 .dcache_bsize = 64,
2037 .num_pmcs = 4,
2038 .oprofile_cpu_type = "ppc/e6500",
2039 .oprofile_type = PPC_OPROFILE_FSL_EMB,
2040 .cpu_setup = __setup_cpu_e5500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05302041#ifndef CONFIG_PPC32
Kumar Gala10241842011-11-06 11:51:07 -06002042 .cpu_restore = __restore_cpu_e5500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05302043#endif
Kumar Gala10241842011-11-06 11:51:07 -06002044 .machine_check = machine_check_e500mc,
2045 .platform = "ppce6500",
2046 },
Kumar Gala4490c062010-10-08 08:32:11 -05002047#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -07002048 { /* default match */
2049 .pvr_mask = 0x00000000,
2050 .pvr_value = 0x00000000,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002051 .cpu_name = "(generic E500 PPC)",
2052 .cpu_features = CPU_FTRS_E500,
2053 .cpu_user_features = COMMON_USER_BOOKE |
2054 PPC_FEATURE_HAS_SPE_COMP |
2055 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00002056 .mmu_features = MMU_FTR_TYPE_FSL_E,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002057 .icache_bsize = 32,
2058 .dcache_bsize = 32,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002059 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002060 .platform = "powerpc",
Paul Mackerras516c8be2008-05-12 14:20:35 +10002061 }
Stephen Rothwell49209602005-10-12 15:55:09 +10002062#endif /* CONFIG_PPC32 */
Kumar Gala4490c062010-10-08 08:32:11 -05002063#endif /* CONFIG_E500 */
Kumar Galaf45c4482009-08-18 19:08:30 +00002064
Benjamin Herrenschmidt76b4eda2011-04-14 22:32:01 +00002065#ifdef CONFIG_PPC_A2
2066 { /* Standard A2 (>= DD2) + FPU core */
2067 .pvr_mask = 0xffff0000,
2068 .pvr_value = 0x00480000,
2069 .cpu_name = "A2 (>= DD2)",
2070 .cpu_features = CPU_FTRS_A2,
2071 .cpu_user_features = COMMON_USER_PPC64,
Matt Evans44ae3ab2011-04-06 19:48:50 +00002072 .mmu_features = MMU_FTRS_A2,
Benjamin Herrenschmidt76b4eda2011-04-14 22:32:01 +00002073 .icache_bsize = 64,
2074 .dcache_bsize = 64,
2075 .num_pmcs = 0,
2076 .cpu_setup = __setup_cpu_a2,
2077 .cpu_restore = __restore_cpu_a2,
2078 .machine_check = machine_check_generic,
2079 .platform = "ppca2",
2080 },
Kumar Galaf45c4482009-08-18 19:08:30 +00002081 { /* This is a default entry to get going, to be replaced by
2082 * a real one at some stage
2083 */
2084#define CPU_FTRS_BASE_BOOK3E (CPU_FTR_USE_TB | \
2085 CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_SMT | \
2086 CPU_FTR_NODSISRALIGN | CPU_FTR_NOEXECUTE)
2087 .pvr_mask = 0x00000000,
2088 .pvr_value = 0x00000000,
2089 .cpu_name = "Book3E",
2090 .cpu_features = CPU_FTRS_BASE_BOOK3E,
2091 .cpu_user_features = COMMON_USER_PPC64,
2092 .mmu_features = MMU_FTR_TYPE_3E | MMU_FTR_USE_TLBILX |
2093 MMU_FTR_USE_TLBIVAX_BCAST |
2094 MMU_FTR_LOCK_BCAST_INVAL,
2095 .icache_bsize = 64,
2096 .dcache_bsize = 64,
2097 .num_pmcs = 0,
2098 .machine_check = machine_check_generic,
2099 .platform = "power6",
2100 },
Benjamin Herrenschmidt76b4eda2011-04-14 22:32:01 +00002101#endif /* CONFIG_PPC_A2 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002102};
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002103
Paul Mackerras87a72f92007-10-04 14:18:01 +10002104static struct cpu_spec the_cpu_spec;
2105
Scott Wood26ee9762011-07-25 11:04:36 +00002106static struct cpu_spec * __init setup_cpu_spec(unsigned long offset,
2107 struct cpu_spec *s)
Michael Ellerman666435b2009-02-22 16:25:43 +00002108{
2109 struct cpu_spec *t = &the_cpu_spec;
Michael Ellerman2657dd42009-02-22 16:25:45 +00002110 struct cpu_spec old;
2111
Michael Ellerman666435b2009-02-22 16:25:43 +00002112 t = PTRRELOC(t);
Michael Ellerman2657dd42009-02-22 16:25:45 +00002113 old = *t;
2114
2115 /* Copy everything, then do fixups */
2116 *t = *s;
Michael Ellerman666435b2009-02-22 16:25:43 +00002117
2118 /*
2119 * If we are overriding a previous value derived from the real
2120 * PVR with a new value obtained using a logical PVR value,
2121 * don't modify the performance monitor fields.
2122 */
Michael Ellerman2657dd42009-02-22 16:25:45 +00002123 if (old.num_pmcs && !s->num_pmcs) {
2124 t->num_pmcs = old.num_pmcs;
2125 t->pmc_type = old.pmc_type;
2126 t->oprofile_type = old.oprofile_type;
2127 t->oprofile_mmcra_sihv = old.oprofile_mmcra_sihv;
2128 t->oprofile_mmcra_sipr = old.oprofile_mmcra_sipr;
2129 t->oprofile_mmcra_clear = old.oprofile_mmcra_clear;
2130
Michael Ellerman666435b2009-02-22 16:25:43 +00002131 /*
2132 * If we have passed through this logic once before and
2133 * have pulled the default case because the real PVR was
2134 * not found inside cpu_specs[], then we are possibly
2135 * running in compatibility mode. In that case, let the
2136 * oprofiler know which set of compatibility counters to
2137 * pull from by making sure the oprofile_cpu_type string
2138 * is set to that of compatibility mode. If the
2139 * oprofile_cpu_type already has a value, then we are
2140 * possibly overriding a real PVR with a logical one,
2141 * and, in that case, keep the current value for
2142 * oprofile_cpu_type.
2143 */
Benjamin Herrenschmidtb173f032009-05-14 18:34:06 +00002144 if (old.oprofile_cpu_type != NULL) {
Benjamin Herrenschmidt0203d6e2009-04-29 19:39:38 +00002145 t->oprofile_cpu_type = old.oprofile_cpu_type;
2146 t->oprofile_type = old.oprofile_type;
Michael Wolf79af6c42009-04-27 06:17:54 +00002147 }
Michael Ellerman2657dd42009-02-22 16:25:45 +00002148 }
Michael Ellerman666435b2009-02-22 16:25:43 +00002149
2150 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
2151
2152 /*
2153 * Set the base platform string once; assumes
2154 * we're called with real pvr first.
2155 */
2156 if (*PTRRELOC(&powerpc_base_platform) == NULL)
2157 *PTRRELOC(&powerpc_base_platform) = t->platform;
2158
2159#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
2160 /* ppc64 and booke expect identify_cpu to also call setup_cpu for
2161 * that processor. I will consolidate that at a later time, for now,
2162 * just use #ifdef. We also don't need to PTRRELOC the function
2163 * pointer on ppc64 and booke as we are running at 0 in real mode
2164 * on ppc64 and reloc_offset is always 0 on booke.
2165 */
Benjamin Herrenschmidtaf9eef32011-01-20 20:36:03 +00002166 if (t->cpu_setup) {
2167 t->cpu_setup(offset, t);
Michael Ellerman666435b2009-02-22 16:25:43 +00002168 }
2169#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
Scott Wood26ee9762011-07-25 11:04:36 +00002170
2171 return t;
Michael Ellerman666435b2009-02-22 16:25:43 +00002172}
2173
Paul Mackerras87a72f92007-10-04 14:18:01 +10002174struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002175{
2176 struct cpu_spec *s = cpu_specs;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002177 int i;
2178
2179 s = PTRRELOC(s);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002180
Michael Ellerman666435b2009-02-22 16:25:43 +00002181 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) {
Scott Wood26ee9762011-07-25 11:04:36 +00002182 if ((pvr & s->pvr_mask) == s->pvr_value)
2183 return setup_cpu_spec(offset, s);
Michael Ellerman666435b2009-02-22 16:25:43 +00002184 }
2185
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002186 BUG();
Michael Ellerman666435b2009-02-22 16:25:43 +00002187
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002188 return NULL;
2189}