blob: b03a442b7888a28dcae8b0da7cf9a840a7216ee0 [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>
Kumar Gala400d2212005-09-27 15:13:12 -050017#include <linux/module.h>
18
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 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070022
Kumar Gala400d2212005-09-27 15:13:12 -050023struct cpu_spec* cur_cpu_spec = NULL;
Stephen Rothwell49209602005-10-12 15:55:09 +100024EXPORT_SYMBOL(cur_cpu_spec);
Linus Torvalds1da177e2005-04-16 15:20:36 -070025
Stephen Rothwell49209602005-10-12 15:55:09 +100026/* NOTE:
27 * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's
28 * the responsibility of the appropriate CPU save/restore functions to
29 * eventually copy these settings over. Those save/restore aren't yet
30 * part of the cputable though. That has to be fixed for both ppc32
31 * and ppc64
32 */
Geoff Levandb26f1002006-05-19 14:24:18 +100033#ifdef CONFIG_PPC32
Valentine Barshak81127532007-09-22 00:46:57 +100034extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
35extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
Valentine Barshak340ffd22007-09-22 00:50:09 +100036extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
Kumar Gala400d2212005-09-27 15:13:12 -050037extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
38extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
39extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
40extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
41extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
42extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
43extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
44extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell49209602005-10-12 15:55:09 +100045#endif /* CONFIG_PPC32 */
Olof Johanssonf39b7a52006-08-11 00:07:08 -050046#ifdef CONFIG_PPC64
Kumar Gala400d2212005-09-27 15:13:12 -050047extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
Olof Johansson5b43d202006-10-04 23:41:41 -050048extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
Olof Johansson11999192007-02-04 16:36:51 -060049extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell40d244d2007-02-12 22:10:48 +110050extern void __restore_cpu_pa6t(void);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050051extern void __restore_cpu_ppc970(void);
52#endif /* CONFIG_PPC64 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070053
Linus Torvalds1da177e2005-04-16 15:20:36 -070054/* This table only contains "desktop" CPUs, it need to be filled with embedded
55 * ones as well...
56 */
Stephen Rothwell49209602005-10-12 15:55:09 +100057#define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
58 PPC_FEATURE_HAS_MMU)
59#define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +110060#define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +110061#define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
62 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
63#define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
64 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
Anton Blanchard03054d52006-04-29 09:51:06 +100065#define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
Paul Mackerrasfab5db92006-06-07 16:14:40 +100066 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
67 PPC_FEATURE_TRUE_LE)
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -050068#define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
69 PPC_FEATURE_TRUE_LE | \
70 PPC_FEATURE_HAS_ALTIVEC_COMP)
Paul Mackerras80f15dc2006-01-14 10:11:39 +110071#define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
72 PPC_FEATURE_BOOKE)
Linus Torvalds1da177e2005-04-16 15:20:36 -070073
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +100074static struct cpu_spec cpu_specs[] = {
Stephen Rothwell49209602005-10-12 15:55:09 +100075#ifdef CONFIG_PPC64
76 { /* Power3 */
77 .pvr_mask = 0xffff0000,
78 .pvr_value = 0x00400000,
79 .cpu_name = "POWER3 (630)",
80 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +100081 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +100082 .icache_bsize = 128,
83 .dcache_bsize = 128,
84 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -060085 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +100086 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +000087 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +110088 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +100089 },
90 { /* Power3+ */
91 .pvr_mask = 0xffff0000,
92 .pvr_value = 0x00410000,
93 .cpu_name = "POWER3 (630+)",
94 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +100095 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +100096 .icache_bsize = 128,
97 .dcache_bsize = 128,
98 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -060099 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000100 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000101 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100102 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +1000103 },
104 { /* Northstar */
105 .pvr_mask = 0xffff0000,
106 .pvr_value = 0x00330000,
107 .cpu_name = "RS64-II (northstar)",
108 .cpu_features = CPU_FTRS_RS64,
109 .cpu_user_features = COMMON_USER_PPC64,
110 .icache_bsize = 128,
111 .dcache_bsize = 128,
112 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600113 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000114 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000115 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100116 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000117 },
118 { /* Pulsar */
119 .pvr_mask = 0xffff0000,
120 .pvr_value = 0x00340000,
121 .cpu_name = "RS64-III (pulsar)",
122 .cpu_features = CPU_FTRS_RS64,
123 .cpu_user_features = COMMON_USER_PPC64,
124 .icache_bsize = 128,
125 .dcache_bsize = 128,
126 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600127 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000128 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000129 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100130 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000131 },
132 { /* I-star */
133 .pvr_mask = 0xffff0000,
134 .pvr_value = 0x00360000,
135 .cpu_name = "RS64-III (icestar)",
136 .cpu_features = CPU_FTRS_RS64,
137 .cpu_user_features = COMMON_USER_PPC64,
138 .icache_bsize = 128,
139 .dcache_bsize = 128,
140 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600141 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000142 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000143 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100144 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000145 },
146 { /* S-star */
147 .pvr_mask = 0xffff0000,
148 .pvr_value = 0x00370000,
149 .cpu_name = "RS64-IV (sstar)",
150 .cpu_features = CPU_FTRS_RS64,
151 .cpu_user_features = COMMON_USER_PPC64,
152 .icache_bsize = 128,
153 .dcache_bsize = 128,
154 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600155 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000156 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000157 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100158 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000159 },
160 { /* Power4 */
161 .pvr_mask = 0xffff0000,
162 .pvr_value = 0x00350000,
163 .cpu_name = "POWER4 (gp)",
164 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100165 .cpu_user_features = COMMON_USER_POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000166 .icache_bsize = 128,
167 .dcache_bsize = 128,
168 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600169 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000170 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000171 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100172 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000173 },
174 { /* Power4+ */
175 .pvr_mask = 0xffff0000,
176 .pvr_value = 0x00380000,
177 .cpu_name = "POWER4+ (gq)",
178 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100179 .cpu_user_features = COMMON_USER_POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000180 .icache_bsize = 128,
181 .dcache_bsize = 128,
182 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600183 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000184 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000185 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100186 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000187 },
188 { /* PPC970 */
189 .pvr_mask = 0xffff0000,
190 .pvr_value = 0x00390000,
191 .cpu_name = "PPC970",
192 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100193 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000194 PPC_FEATURE_HAS_ALTIVEC_COMP,
195 .icache_bsize = 128,
196 .dcache_bsize = 128,
197 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600198 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000199 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500200 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000201 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000202 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100203 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000204 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000205 { /* PPC970FX */
206 .pvr_mask = 0xffff0000,
207 .pvr_value = 0x003c0000,
208 .cpu_name = "PPC970FX",
Stephen Rothwell49209602005-10-12 15:55:09 +1000209 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100210 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000211 PPC_FEATURE_HAS_ALTIVEC_COMP,
212 .icache_bsize = 128,
213 .dcache_bsize = 128,
214 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600215 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000216 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500217 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000218 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000219 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100220 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000221 },
Olof Johansson3546e812007-02-26 00:35:14 -0600222 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
223 .pvr_mask = 0xffffffff,
224 .pvr_value = 0x00440100,
225 .cpu_name = "PPC970MP",
226 .cpu_features = CPU_FTRS_PPC970,
227 .cpu_user_features = COMMON_USER_POWER4 |
228 PPC_FEATURE_HAS_ALTIVEC_COMP,
229 .icache_bsize = 128,
230 .dcache_bsize = 128,
231 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000232 .pmc_type = PPC_PMC_IBM,
Olof Johansson3546e812007-02-26 00:35:14 -0600233 .cpu_setup = __setup_cpu_ppc970,
234 .cpu_restore = __restore_cpu_ppc970,
235 .oprofile_cpu_type = "ppc64/970MP",
236 .oprofile_type = PPC_OPROFILE_POWER4,
237 .platform = "ppc970",
238 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000239 { /* PPC970MP */
240 .pvr_mask = 0xffff0000,
241 .pvr_value = 0x00440000,
242 .cpu_name = "PPC970MP",
243 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100244 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000245 PPC_FEATURE_HAS_ALTIVEC_COMP,
246 .icache_bsize = 128,
247 .dcache_bsize = 128,
Anton Blanchard87af41b2006-05-05 05:44:26 +1000248 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000249 .pmc_type = PPC_PMC_IBM,
Olof Johansson5b43d202006-10-04 23:41:41 -0500250 .cpu_setup = __setup_cpu_ppc970MP,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500251 .cpu_restore = __restore_cpu_ppc970,
Mike Wolffecb3522006-11-21 14:41:54 -0600252 .oprofile_cpu_type = "ppc64/970MP",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000253 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100254 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000255 },
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500256 { /* PPC970GX */
257 .pvr_mask = 0xffff0000,
258 .pvr_value = 0x00450000,
259 .cpu_name = "PPC970GX",
260 .cpu_features = CPU_FTRS_PPC970,
261 .cpu_user_features = COMMON_USER_POWER4 |
262 PPC_FEATURE_HAS_ALTIVEC_COMP,
263 .icache_bsize = 128,
264 .dcache_bsize = 128,
265 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600266 .pmc_type = PPC_PMC_IBM,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500267 .cpu_setup = __setup_cpu_ppc970,
268 .oprofile_cpu_type = "ppc64/970",
269 .oprofile_type = PPC_OPROFILE_POWER4,
270 .platform = "ppc970",
271 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100272 { /* Power5 GR */
Stephen Rothwell49209602005-10-12 15:55:09 +1000273 .pvr_mask = 0xffff0000,
274 .pvr_value = 0x003a0000,
275 .cpu_name = "POWER5 (gr)",
276 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100277 .cpu_user_features = COMMON_USER_POWER5,
Stephen Rothwell49209602005-10-12 15:55:09 +1000278 .icache_bsize = 128,
279 .dcache_bsize = 128,
280 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600281 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000282 .oprofile_cpu_type = "ppc64/power5",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000283 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000284 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
285 * and above but only works on POWER5 and above
286 */
287 .oprofile_mmcra_sihv = MMCRA_SIHV,
288 .oprofile_mmcra_sipr = MMCRA_SIPR,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100289 .platform = "power5",
Stephen Rothwell49209602005-10-12 15:55:09 +1000290 },
Mike Wolf31a12ce2007-07-10 13:13:47 -0500291 { /* Power5++ */
292 .pvr_mask = 0xffffff00,
293 .pvr_value = 0x003b0300,
294 .cpu_name = "POWER5+ (gs)",
295 .cpu_features = CPU_FTRS_POWER5,
296 .cpu_user_features = COMMON_USER_POWER5_PLUS,
297 .icache_bsize = 128,
298 .dcache_bsize = 128,
299 .num_pmcs = 6,
300 .oprofile_cpu_type = "ppc64/power5++",
301 .oprofile_type = PPC_OPROFILE_POWER4,
302 .oprofile_mmcra_sihv = MMCRA_SIHV,
303 .oprofile_mmcra_sipr = MMCRA_SIPR,
304 .platform = "power5+",
305 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100306 { /* Power5 GS */
Stephen Rothwell49209602005-10-12 15:55:09 +1000307 .pvr_mask = 0xffff0000,
308 .pvr_value = 0x003b0000,
Anton Blanchard834608f2006-01-09 15:42:30 +1100309 .cpu_name = "POWER5+ (gs)",
Stephen Rothwell49209602005-10-12 15:55:09 +1000310 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100311 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Stephen Rothwell49209602005-10-12 15:55:09 +1000312 .icache_bsize = 128,
313 .dcache_bsize = 128,
314 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600315 .pmc_type = PPC_PMC_IBM,
Anton Blanchard834608f2006-01-09 15:42:30 +1100316 .oprofile_cpu_type = "ppc64/power5+",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000317 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000318 .oprofile_mmcra_sihv = MMCRA_SIHV,
319 .oprofile_mmcra_sipr = MMCRA_SIPR,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100320 .platform = "power5+",
Stephen Rothwell49209602005-10-12 15:55:09 +1000321 },
Paul Mackerras974a76f2006-11-10 20:38:53 +1100322 { /* POWER6 in P5+ mode; 2.04-compliant processor */
323 .pvr_mask = 0xffffffff,
324 .pvr_value = 0x0f000001,
325 .cpu_name = "POWER5+",
326 .cpu_features = CPU_FTRS_POWER5,
327 .cpu_user_features = COMMON_USER_POWER5_PLUS,
328 .icache_bsize = 128,
329 .dcache_bsize = 128,
330 .num_pmcs = 6,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000331 .pmc_type = PPC_PMC_IBM,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100332 .oprofile_cpu_type = "ppc64/power6",
333 .oprofile_type = PPC_OPROFILE_POWER4,
334 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
335 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
336 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
337 POWER6_MMCRA_OTHER,
338 .platform = "power5+",
339 },
Anton Blanchard03054d52006-04-29 09:51:06 +1000340 { /* Power6 */
341 .pvr_mask = 0xffff0000,
342 .pvr_value = 0x003e0000,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100343 .cpu_name = "POWER6 (raw)",
344 .cpu_features = CPU_FTRS_POWER6,
345 .cpu_user_features = COMMON_USER_POWER6 |
346 PPC_FEATURE_POWER6_EXT,
347 .icache_bsize = 128,
348 .dcache_bsize = 128,
349 .num_pmcs = 6,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000350 .pmc_type = PPC_PMC_IBM,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100351 .oprofile_cpu_type = "ppc64/power6",
352 .oprofile_type = PPC_OPROFILE_POWER4,
353 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
354 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
355 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
356 POWER6_MMCRA_OTHER,
357 .platform = "power6x",
358 },
359 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
360 .pvr_mask = 0xffffffff,
361 .pvr_value = 0x0f000002,
362 .cpu_name = "POWER6 (architected)",
Anton Blanchard03054d52006-04-29 09:51:06 +1000363 .cpu_features = CPU_FTRS_POWER6,
364 .cpu_user_features = COMMON_USER_POWER6,
365 .icache_bsize = 128,
366 .dcache_bsize = 128,
Anton Blanchard99f48612006-10-13 12:13:12 +1000367 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600368 .pmc_type = PPC_PMC_IBM,
Anton Blanchard03054d52006-04-29 09:51:06 +1000369 .oprofile_cpu_type = "ppc64/power6",
370 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000371 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
372 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
373 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
374 POWER6_MMCRA_OTHER,
Anton Blanchard03054d52006-04-29 09:51:06 +1000375 .platform = "power6",
376 },
Arnd Bergmannc902be72006-01-04 19:55:53 +0000377 { /* Cell Broadband Engine */
Stephen Rothwell49209602005-10-12 15:55:09 +1000378 .pvr_mask = 0xffff0000,
379 .pvr_value = 0x00700000,
380 .cpu_name = "Cell Broadband Engine",
381 .cpu_features = CPU_FTRS_CELL,
382 .cpu_user_features = COMMON_USER_PPC64 |
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +1100383 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
384 PPC_FEATURE_SMT,
Stephen Rothwell49209602005-10-12 15:55:09 +1000385 .icache_bsize = 128,
386 .dcache_bsize = 128,
Maynard Johnson18f21902006-11-20 18:45:16 +0100387 .num_pmcs = 4,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600388 .pmc_type = PPC_PMC_IBM,
Maynard Johnson18f21902006-11-20 18:45:16 +0100389 .oprofile_cpu_type = "ppc64/cell-be",
390 .oprofile_type = PPC_OPROFILE_CELL,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100391 .platform = "ppc-cell-be",
Stephen Rothwell49209602005-10-12 15:55:09 +1000392 },
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500393 { /* PA Semi PA6T */
394 .pvr_mask = 0x7fff0000,
395 .pvr_value = 0x00900000,
396 .cpu_name = "PA6T",
397 .cpu_features = CPU_FTRS_PA6T,
398 .cpu_user_features = COMMON_USER_PA6T,
399 .icache_bsize = 64,
400 .dcache_bsize = 64,
401 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600402 .pmc_type = PPC_PMC_PA6T,
Olof Johansson11999192007-02-04 16:36:51 -0600403 .cpu_setup = __setup_cpu_pa6t,
404 .cpu_restore = __restore_cpu_pa6t,
Olof Johansson25fc5302007-04-18 16:38:21 +1000405 .oprofile_cpu_type = "ppc64/pa6t",
406 .oprofile_type = PPC_OPROFILE_PA6T,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500407 .platform = "pa6t",
408 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000409 { /* default match */
410 .pvr_mask = 0x00000000,
411 .pvr_value = 0x00000000,
412 .cpu_name = "POWER4 (compatible)",
413 .cpu_features = CPU_FTRS_COMPATIBLE,
414 .cpu_user_features = COMMON_USER_PPC64,
415 .icache_bsize = 128,
416 .dcache_bsize = 128,
417 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600418 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100419 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000420 }
421#endif /* CONFIG_PPC64 */
422#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -0700423#if CLASSIC_PPC
Stephen Rothwell49209602005-10-12 15:55:09 +1000424 { /* 601 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700425 .pvr_mask = 0xffff0000,
426 .pvr_value = 0x00010000,
427 .cpu_name = "601",
Kumar Gala10b35d92005-09-23 14:08:58 -0500428 .cpu_features = CPU_FTRS_PPC601,
Stephen Rothwell49209602005-10-12 15:55:09 +1000429 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
Paul Mackerras98599012005-10-22 16:51:34 +1000430 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700431 .icache_bsize = 32,
432 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100433 .platform = "ppc601",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700434 },
435 { /* 603 */
436 .pvr_mask = 0xffff0000,
437 .pvr_value = 0x00030000,
438 .cpu_name = "603",
Kumar Gala10b35d92005-09-23 14:08:58 -0500439 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000440 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700441 .icache_bsize = 32,
442 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100443 .cpu_setup = __setup_cpu_603,
444 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700445 },
446 { /* 603e */
447 .pvr_mask = 0xffff0000,
448 .pvr_value = 0x00060000,
449 .cpu_name = "603e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500450 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000451 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700452 .icache_bsize = 32,
453 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100454 .cpu_setup = __setup_cpu_603,
455 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700456 },
457 { /* 603ev */
458 .pvr_mask = 0xffff0000,
459 .pvr_value = 0x00070000,
460 .cpu_name = "603ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500461 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000462 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700463 .icache_bsize = 32,
464 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100465 .cpu_setup = __setup_cpu_603,
466 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700467 },
468 { /* 604 */
469 .pvr_mask = 0xffff0000,
470 .pvr_value = 0x00040000,
471 .cpu_name = "604",
Kumar Gala10b35d92005-09-23 14:08:58 -0500472 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000473 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700474 .icache_bsize = 32,
475 .dcache_bsize = 32,
476 .num_pmcs = 2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100477 .cpu_setup = __setup_cpu_604,
478 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700479 },
480 { /* 604e */
481 .pvr_mask = 0xfffff000,
482 .pvr_value = 0x00090000,
483 .cpu_name = "604e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500484 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000485 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700486 .icache_bsize = 32,
487 .dcache_bsize = 32,
488 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100489 .cpu_setup = __setup_cpu_604,
490 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700491 },
492 { /* 604r */
493 .pvr_mask = 0xffff0000,
494 .pvr_value = 0x00090000,
495 .cpu_name = "604r",
Kumar Gala10b35d92005-09-23 14:08:58 -0500496 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000497 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700498 .icache_bsize = 32,
499 .dcache_bsize = 32,
500 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100501 .cpu_setup = __setup_cpu_604,
502 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700503 },
504 { /* 604ev */
505 .pvr_mask = 0xffff0000,
506 .pvr_value = 0x000a0000,
507 .cpu_name = "604ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500508 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000509 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700510 .icache_bsize = 32,
511 .dcache_bsize = 32,
512 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100513 .cpu_setup = __setup_cpu_604,
514 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700515 },
516 { /* 740/750 (0x4202, don't support TAU ?) */
517 .pvr_mask = 0xffffffff,
518 .pvr_value = 0x00084202,
519 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500520 .cpu_features = CPU_FTRS_740_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000521 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700522 .icache_bsize = 32,
523 .dcache_bsize = 32,
524 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100525 .cpu_setup = __setup_cpu_750,
526 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700527 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700528 { /* 750CX (80100 and 8010x?) */
529 .pvr_mask = 0xfffffff0,
530 .pvr_value = 0x00080100,
531 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500532 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000533 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700534 .icache_bsize = 32,
535 .dcache_bsize = 32,
536 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100537 .cpu_setup = __setup_cpu_750cx,
538 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700539 },
540 { /* 750CX (82201 and 82202) */
541 .pvr_mask = 0xfffffff0,
542 .pvr_value = 0x00082200,
543 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500544 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000545 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700546 .icache_bsize = 32,
547 .dcache_bsize = 32,
548 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100549 .cpu_setup = __setup_cpu_750cx,
550 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700551 },
552 { /* 750CXe (82214) */
553 .pvr_mask = 0xfffffff0,
554 .pvr_value = 0x00082210,
555 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500556 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000557 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700558 .icache_bsize = 32,
559 .dcache_bsize = 32,
560 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100561 .cpu_setup = __setup_cpu_750cx,
562 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700563 },
Arthur Othieno7c316252005-09-03 15:55:52 -0700564 { /* 750CXe "Gekko" (83214) */
565 .pvr_mask = 0xffffffff,
566 .pvr_value = 0x00083214,
567 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500568 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000569 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Arthur Othieno7c316252005-09-03 15:55:52 -0700570 .icache_bsize = 32,
571 .dcache_bsize = 32,
572 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100573 .cpu_setup = __setup_cpu_750cx,
574 .platform = "ppc750",
Arthur Othieno7c316252005-09-03 15:55:52 -0700575 },
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500576 { /* 750CL */
577 .pvr_mask = 0xfffff0f0,
578 .pvr_value = 0x00087010,
579 .cpu_name = "750CL",
Josh Boyera14c4502007-04-13 04:33:25 +1000580 .cpu_features = CPU_FTRS_750CL,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500581 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
582 .icache_bsize = 32,
583 .dcache_bsize = 32,
584 .num_pmcs = 4,
Josh Boyera14c4502007-04-13 04:33:25 +1000585 .cpu_setup = __setup_cpu_750,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500586 .platform = "ppc750",
587 },
Arthur Othienoac1ff042005-09-03 15:55:51 -0700588 { /* 745/755 */
589 .pvr_mask = 0xfffff000,
590 .pvr_value = 0x00083000,
591 .cpu_name = "745/755",
Kumar Gala10b35d92005-09-23 14:08:58 -0500592 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000593 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Arthur Othienoac1ff042005-09-03 15:55:51 -0700594 .icache_bsize = 32,
595 .dcache_bsize = 32,
596 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100597 .cpu_setup = __setup_cpu_750,
598 .platform = "ppc750",
Arthur Othienoac1ff042005-09-03 15:55:51 -0700599 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700600 { /* 750FX rev 1.x */
601 .pvr_mask = 0xffffff00,
602 .pvr_value = 0x70000100,
603 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500604 .cpu_features = CPU_FTRS_750FX1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000605 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
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_750,
610 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700611 },
612 { /* 750FX rev 2.0 must disable HID0[DPM] */
613 .pvr_mask = 0xffffffff,
614 .pvr_value = 0x70000200,
615 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500616 .cpu_features = CPU_FTRS_750FX2,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000617 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700618 .icache_bsize = 32,
619 .dcache_bsize = 32,
620 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100621 .cpu_setup = __setup_cpu_750,
622 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700623 },
624 { /* 750FX (All revs except 2.0) */
625 .pvr_mask = 0xffff0000,
626 .pvr_value = 0x70000000,
627 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500628 .cpu_features = CPU_FTRS_750FX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000629 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700630 .icache_bsize = 32,
631 .dcache_bsize = 32,
632 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100633 .cpu_setup = __setup_cpu_750fx,
634 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700635 },
636 { /* 750GX */
637 .pvr_mask = 0xffff0000,
638 .pvr_value = 0x70020000,
639 .cpu_name = "750GX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500640 .cpu_features = CPU_FTRS_750GX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000641 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700642 .icache_bsize = 32,
643 .dcache_bsize = 32,
644 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100645 .cpu_setup = __setup_cpu_750fx,
646 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700647 },
648 { /* 740/750 (L2CR bit need fixup for 740) */
649 .pvr_mask = 0xffff0000,
650 .pvr_value = 0x00080000,
651 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500652 .cpu_features = CPU_FTRS_740,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000653 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700654 .icache_bsize = 32,
655 .dcache_bsize = 32,
656 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100657 .cpu_setup = __setup_cpu_750,
658 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700659 },
660 { /* 7400 rev 1.1 ? (no TAU) */
661 .pvr_mask = 0xffffffff,
662 .pvr_value = 0x000c1101,
663 .cpu_name = "7400 (1.1)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500664 .cpu_features = CPU_FTRS_7400_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000665 .cpu_user_features = COMMON_USER |
666 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700667 .icache_bsize = 32,
668 .dcache_bsize = 32,
669 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100670 .cpu_setup = __setup_cpu_7400,
671 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700672 },
673 { /* 7400 */
674 .pvr_mask = 0xffff0000,
675 .pvr_value = 0x000c0000,
676 .cpu_name = "7400",
Kumar Gala10b35d92005-09-23 14:08:58 -0500677 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000678 .cpu_user_features = COMMON_USER |
679 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700680 .icache_bsize = 32,
681 .dcache_bsize = 32,
682 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100683 .cpu_setup = __setup_cpu_7400,
684 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700685 },
686 { /* 7410 */
687 .pvr_mask = 0xffff0000,
688 .pvr_value = 0x800c0000,
689 .cpu_name = "7410",
Kumar Gala10b35d92005-09-23 14:08:58 -0500690 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000691 .cpu_user_features = COMMON_USER |
692 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700693 .icache_bsize = 32,
694 .dcache_bsize = 32,
695 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100696 .cpu_setup = __setup_cpu_7410,
697 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700698 },
699 { /* 7450 2.0 - no doze/nap */
700 .pvr_mask = 0xffffffff,
701 .pvr_value = 0x80000200,
702 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500703 .cpu_features = CPU_FTRS_7450_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000704 .cpu_user_features = COMMON_USER |
705 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700706 .icache_bsize = 32,
707 .dcache_bsize = 32,
708 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600709 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600710 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000711 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100712 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700713 },
714 { /* 7450 2.1 */
715 .pvr_mask = 0xffffffff,
716 .pvr_value = 0x80000201,
717 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500718 .cpu_features = CPU_FTRS_7450_21,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000719 .cpu_user_features = COMMON_USER |
720 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700721 .icache_bsize = 32,
722 .dcache_bsize = 32,
723 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600724 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600725 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000726 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100727 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700728 },
729 { /* 7450 2.3 and newer */
730 .pvr_mask = 0xffff0000,
731 .pvr_value = 0x80000000,
732 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500733 .cpu_features = CPU_FTRS_7450_23,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000734 .cpu_user_features = COMMON_USER |
735 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700736 .icache_bsize = 32,
737 .dcache_bsize = 32,
738 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600739 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600740 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000741 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100742 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700743 },
744 { /* 7455 rev 1.x */
745 .pvr_mask = 0xffffff00,
746 .pvr_value = 0x80010100,
747 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500748 .cpu_features = CPU_FTRS_7455_1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000749 .cpu_user_features = COMMON_USER |
750 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700751 .icache_bsize = 32,
752 .dcache_bsize = 32,
753 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600754 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600755 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000756 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100757 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700758 },
759 { /* 7455 rev 2.0 */
760 .pvr_mask = 0xffffffff,
761 .pvr_value = 0x80010200,
762 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500763 .cpu_features = CPU_FTRS_7455_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000764 .cpu_user_features = COMMON_USER |
765 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700766 .icache_bsize = 32,
767 .dcache_bsize = 32,
768 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600769 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600770 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000771 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100772 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700773 },
774 { /* 7455 others */
775 .pvr_mask = 0xffff0000,
776 .pvr_value = 0x80010000,
777 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500778 .cpu_features = CPU_FTRS_7455,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000779 .cpu_user_features = COMMON_USER |
780 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700781 .icache_bsize = 32,
782 .dcache_bsize = 32,
783 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600784 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600785 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000786 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100787 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700788 },
789 { /* 7447/7457 Rev 1.0 */
790 .pvr_mask = 0xffffffff,
791 .pvr_value = 0x80020100,
792 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500793 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000794 .cpu_user_features = COMMON_USER |
795 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700796 .icache_bsize = 32,
797 .dcache_bsize = 32,
798 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600799 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600800 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000801 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100802 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700803 },
804 { /* 7447/7457 Rev 1.1 */
805 .pvr_mask = 0xffffffff,
806 .pvr_value = 0x80020101,
807 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500808 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000809 .cpu_user_features = COMMON_USER |
810 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700811 .icache_bsize = 32,
812 .dcache_bsize = 32,
813 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600814 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600815 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000816 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100817 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700818 },
819 { /* 7447/7457 Rev 1.2 and later */
820 .pvr_mask = 0xffff0000,
821 .pvr_value = 0x80020000,
822 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500823 .cpu_features = CPU_FTRS_7447,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000824 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700825 .icache_bsize = 32,
826 .dcache_bsize = 32,
827 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600828 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600829 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000830 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100831 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700832 },
833 { /* 7447A */
834 .pvr_mask = 0xffff0000,
835 .pvr_value = 0x80030000,
836 .cpu_name = "7447A",
Kumar Gala10b35d92005-09-23 14:08:58 -0500837 .cpu_features = CPU_FTRS_7447A,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000838 .cpu_user_features = COMMON_USER |
839 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700840 .icache_bsize = 32,
841 .dcache_bsize = 32,
842 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600843 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600844 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000845 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100846 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700847 },
Kumar Galabbde6302005-09-03 15:55:55 -0700848 { /* 7448 */
849 .pvr_mask = 0xffff0000,
850 .pvr_value = 0x80040000,
851 .cpu_name = "7448",
James.Yang3d372542007-05-02 16:34:43 -0500852 .cpu_features = CPU_FTRS_7448,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000853 .cpu_user_features = COMMON_USER |
854 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Kumar Galabbde6302005-09-03 15:55:55 -0700855 .icache_bsize = 32,
856 .dcache_bsize = 32,
857 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600858 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600859 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000860 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100861 .platform = "ppc7450",
Kumar Galabbde6302005-09-03 15:55:55 -0700862 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700863 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
864 .pvr_mask = 0x7fff0000,
865 .pvr_value = 0x00810000,
866 .cpu_name = "82xx",
Kumar Gala10b35d92005-09-23 14:08:58 -0500867 .cpu_features = CPU_FTRS_82XX,
Stephen Rothwell49209602005-10-12 15:55:09 +1000868 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700869 .icache_bsize = 32,
870 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100871 .cpu_setup = __setup_cpu_603,
872 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700873 },
874 { /* All G2_LE (603e core, plus some) have the same pvr */
875 .pvr_mask = 0x7fff0000,
876 .pvr_value = 0x00820000,
877 .cpu_name = "G2_LE",
Kumar Gala10b35d92005-09-23 14:08:58 -0500878 .cpu_features = CPU_FTRS_G2_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000879 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700880 .icache_bsize = 32,
881 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100882 .cpu_setup = __setup_cpu_603,
883 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700884 },
Kim Phillips6c4a2502006-10-02 20:10:24 -0500885 { /* e300c1 (a 603e core, plus some) on 83xx */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700886 .pvr_mask = 0x7fff0000,
887 .pvr_value = 0x00830000,
Kim Phillips6c4a2502006-10-02 20:10:24 -0500888 .cpu_name = "e300c1",
Kumar Gala10b35d92005-09-23 14:08:58 -0500889 .cpu_features = CPU_FTRS_E300,
Stephen Rothwell49209602005-10-12 15:55:09 +1000890 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700891 .icache_bsize = 32,
892 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100893 .cpu_setup = __setup_cpu_603,
894 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700895 },
Kim Phillips6c4a2502006-10-02 20:10:24 -0500896 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
897 .pvr_mask = 0x7fff0000,
898 .pvr_value = 0x00840000,
899 .cpu_name = "e300c2",
Kim Phillipsaa42c692006-12-08 02:43:30 -0600900 .cpu_features = CPU_FTRS_E300C2,
Kim Phillips6c4a2502006-10-02 20:10:24 -0500901 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
902 .icache_bsize = 32,
903 .dcache_bsize = 32,
904 .cpu_setup = __setup_cpu_603,
905 .platform = "ppc603",
906 },
Scott Wood57933f82006-12-01 12:57:05 -0600907 { /* e300c3 on 83xx */
908 .pvr_mask = 0x7fff0000,
909 .pvr_value = 0x00850000,
910 .cpu_name = "e300c3",
911 .cpu_features = CPU_FTRS_E300,
912 .cpu_user_features = COMMON_USER,
913 .icache_bsize = 32,
914 .dcache_bsize = 32,
915 .cpu_setup = __setup_cpu_603,
916 .platform = "ppc603",
917 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700918 { /* default match, we assume split I/D cache & TB (non-601)... */
919 .pvr_mask = 0x00000000,
920 .pvr_value = 0x00000000,
921 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500922 .cpu_features = CPU_FTRS_CLASSIC32,
Stephen Rothwell49209602005-10-12 15:55:09 +1000923 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700924 .icache_bsize = 32,
925 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100926 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700927 },
928#endif /* CLASSIC_PPC */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700929#ifdef CONFIG_8xx
930 { /* 8xx */
931 .pvr_mask = 0xffff0000,
932 .pvr_value = 0x00500000,
933 .cpu_name = "8xx",
934 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
935 * if the 8xx code is there.... */
Kumar Gala10b35d92005-09-23 14:08:58 -0500936 .cpu_features = CPU_FTRS_8XX,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700937 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
938 .icache_bsize = 16,
939 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100940 .platform = "ppc823",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700941 },
942#endif /* CONFIG_8xx */
943#ifdef CONFIG_40x
944 { /* 403GC */
945 .pvr_mask = 0xffffff00,
946 .pvr_value = 0x00200200,
947 .cpu_name = "403GC",
Kumar Gala10b35d92005-09-23 14:08:58 -0500948 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700949 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
950 .icache_bsize = 16,
951 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100952 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700953 },
954 { /* 403GCX */
955 .pvr_mask = 0xffffff00,
956 .pvr_value = 0x00201400,
957 .cpu_name = "403GCX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500958 .cpu_features = CPU_FTRS_40X,
Paul Mackerras98599012005-10-22 16:51:34 +1000959 .cpu_user_features = PPC_FEATURE_32 |
960 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700961 .icache_bsize = 16,
962 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100963 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700964 },
965 { /* 403G ?? */
966 .pvr_mask = 0xffff0000,
967 .pvr_value = 0x00200000,
968 .cpu_name = "403G ??",
Kumar Gala10b35d92005-09-23 14:08:58 -0500969 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700970 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
971 .icache_bsize = 16,
972 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100973 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700974 },
975 { /* 405GP */
976 .pvr_mask = 0xffff0000,
977 .pvr_value = 0x40110000,
978 .cpu_name = "405GP",
Kumar Gala10b35d92005-09-23 14:08:58 -0500979 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700980 .cpu_user_features = PPC_FEATURE_32 |
981 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
982 .icache_bsize = 32,
983 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100984 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700985 },
986 { /* STB 03xxx */
987 .pvr_mask = 0xffff0000,
988 .pvr_value = 0x40130000,
989 .cpu_name = "STB03xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -0500990 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700991 .cpu_user_features = PPC_FEATURE_32 |
992 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
993 .icache_bsize = 32,
994 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100995 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700996 },
997 { /* STB 04xxx */
998 .pvr_mask = 0xffff0000,
999 .pvr_value = 0x41810000,
1000 .cpu_name = "STB04xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001001 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001002 .cpu_user_features = PPC_FEATURE_32 |
1003 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1004 .icache_bsize = 32,
1005 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001006 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001007 },
1008 { /* NP405L */
1009 .pvr_mask = 0xffff0000,
1010 .pvr_value = 0x41610000,
1011 .cpu_name = "NP405L",
Kumar Gala10b35d92005-09-23 14:08:58 -05001012 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001013 .cpu_user_features = PPC_FEATURE_32 |
1014 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1015 .icache_bsize = 32,
1016 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001017 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001018 },
1019 { /* NP4GS3 */
1020 .pvr_mask = 0xffff0000,
1021 .pvr_value = 0x40B10000,
1022 .cpu_name = "NP4GS3",
Kumar Gala10b35d92005-09-23 14:08:58 -05001023 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001024 .cpu_user_features = PPC_FEATURE_32 |
1025 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1026 .icache_bsize = 32,
1027 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001028 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001029 },
1030 { /* NP405H */
1031 .pvr_mask = 0xffff0000,
1032 .pvr_value = 0x41410000,
1033 .cpu_name = "NP405H",
Kumar Gala10b35d92005-09-23 14:08:58 -05001034 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001035 .cpu_user_features = PPC_FEATURE_32 |
1036 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1037 .icache_bsize = 32,
1038 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001039 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001040 },
1041 { /* 405GPr */
1042 .pvr_mask = 0xffff0000,
1043 .pvr_value = 0x50910000,
1044 .cpu_name = "405GPr",
Kumar Gala10b35d92005-09-23 14:08:58 -05001045 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001046 .cpu_user_features = PPC_FEATURE_32 |
1047 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1048 .icache_bsize = 32,
1049 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001050 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001051 },
1052 { /* STBx25xx */
1053 .pvr_mask = 0xffff0000,
1054 .pvr_value = 0x51510000,
1055 .cpu_name = "STBx25xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001056 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001057 .cpu_user_features = PPC_FEATURE_32 |
1058 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1059 .icache_bsize = 32,
1060 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001061 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001062 },
1063 { /* 405LP */
1064 .pvr_mask = 0xffff0000,
1065 .pvr_value = 0x41F10000,
1066 .cpu_name = "405LP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001067 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001068 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1069 .icache_bsize = 32,
1070 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001071 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001072 },
1073 { /* Xilinx Virtex-II Pro */
Grant C. Likely72646c72006-01-19 01:13:20 -07001074 .pvr_mask = 0xfffff000,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001075 .pvr_value = 0x20010000,
1076 .cpu_name = "Virtex-II Pro",
Kumar Gala10b35d92005-09-23 14:08:58 -05001077 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001078 .cpu_user_features = PPC_FEATURE_32 |
1079 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1080 .icache_bsize = 32,
1081 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001082 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001083 },
Grant C. Likely72646c72006-01-19 01:13:20 -07001084 { /* Xilinx Virtex-4 FX */
1085 .pvr_mask = 0xfffff000,
1086 .pvr_value = 0x20011000,
1087 .cpu_name = "Virtex-4 FX",
1088 .cpu_features = CPU_FTRS_40X,
1089 .cpu_user_features = PPC_FEATURE_32 |
1090 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1091 .icache_bsize = 32,
1092 .dcache_bsize = 32,
Peter Bergner838fdb42006-09-14 14:18:38 -05001093 .platform = "ppc405",
Grant C. Likely72646c72006-01-19 01:13:20 -07001094 },
Eugene Suroveginad95d602005-06-07 13:22:09 -07001095 { /* 405EP */
1096 .pvr_mask = 0xffff0000,
1097 .pvr_value = 0x51210000,
1098 .cpu_name = "405EP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001099 .cpu_features = CPU_FTRS_40X,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001100 .cpu_user_features = PPC_FEATURE_32 |
1101 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1102 .icache_bsize = 32,
1103 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001104 .platform = "ppc405",
Eugene Suroveginad95d602005-06-07 13:22:09 -07001105 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001106
1107#endif /* CONFIG_40x */
1108#ifdef CONFIG_44x
Matt Porterc9cf73a2005-07-31 22:34:52 -07001109 {
1110 .pvr_mask = 0xf0000fff,
1111 .pvr_value = 0x40000850,
1112 .cpu_name = "440EP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001113 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001114 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001115 .icache_bsize = 32,
1116 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001117 .cpu_setup = __setup_cpu_440ep,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001118 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001119 },
1120 {
1121 .pvr_mask = 0xf0000fff,
1122 .pvr_value = 0x400008d3,
1123 .cpu_name = "440EP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001124 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001125 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001126 .icache_bsize = 32,
1127 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001128 .cpu_setup = __setup_cpu_440ep,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001129 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001130 },
Valentine Barshak15fc9932007-08-29 17:40:30 +04001131 { /* 440EPX */
1132 .pvr_mask = 0xf0000ffb,
1133 .pvr_value = 0x200008D0,
1134 .cpu_name = "440EPX",
1135 .cpu_features = CPU_FTRS_44X,
1136 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1137 .icache_bsize = 32,
1138 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001139 .cpu_setup = __setup_cpu_440epx,
1140 .platform = "ppc440",
Valentine Barshak15fc9932007-08-29 17:40:30 +04001141 },
1142 { /* 440GRX */
1143 .pvr_mask = 0xf0000ffb,
1144 .pvr_value = 0x200008D8,
1145 .cpu_name = "440GRX",
1146 .cpu_features = CPU_FTRS_44X,
1147 .cpu_user_features = COMMON_USER_BOOKE,
1148 .icache_bsize = 32,
1149 .dcache_bsize = 32,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001150 .cpu_setup = __setup_cpu_440grx,
1151 .platform = "ppc440",
Valentine Barshak15fc9932007-08-29 17:40:30 +04001152 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001153 { /* 440GP Rev. B */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001154 .pvr_mask = 0xf0000fff,
1155 .pvr_value = 0x40000440,
1156 .cpu_name = "440GP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001157 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001158 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001159 .icache_bsize = 32,
1160 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001161 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001162 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001163 { /* 440GP Rev. C */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001164 .pvr_mask = 0xf0000fff,
1165 .pvr_value = 0x40000481,
1166 .cpu_name = "440GP Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001167 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001168 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001169 .icache_bsize = 32,
1170 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001171 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001172 },
1173 { /* 440GX Rev. A */
1174 .pvr_mask = 0xf0000fff,
1175 .pvr_value = 0x50000850,
1176 .cpu_name = "440GX Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001177 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001178 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001179 .icache_bsize = 32,
1180 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001181 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001182 },
1183 { /* 440GX Rev. B */
1184 .pvr_mask = 0xf0000fff,
1185 .pvr_value = 0x50000851,
1186 .cpu_name = "440GX Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001187 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001188 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001189 .icache_bsize = 32,
1190 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001191 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001192 },
1193 { /* 440GX Rev. C */
1194 .pvr_mask = 0xf0000fff,
1195 .pvr_value = 0x50000892,
1196 .cpu_name = "440GX Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001197 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001198 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001199 .icache_bsize = 32,
1200 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001201 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001202 },
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001203 { /* 440GX Rev. F */
1204 .pvr_mask = 0xf0000fff,
1205 .pvr_value = 0x50000894,
1206 .cpu_name = "440GX Rev. F",
Kumar Gala10b35d92005-09-23 14:08:58 -05001207 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001208 .cpu_user_features = COMMON_USER_BOOKE,
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001209 .icache_bsize = 32,
1210 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001211 .platform = "ppc440",
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001212 },
Matt Porter656de7e2005-09-03 15:55:42 -07001213 { /* 440SP Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001214 .pvr_mask = 0xfff00fff,
1215 .pvr_value = 0x53200891,
Matt Porter656de7e2005-09-03 15:55:42 -07001216 .cpu_name = "440SP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001217 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001218 .cpu_user_features = COMMON_USER_BOOKE,
Matt Porter656de7e2005-09-03 15:55:42 -07001219 .icache_bsize = 32,
1220 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001221 .platform = "ppc440",
Matt Porter656de7e2005-09-03 15:55:42 -07001222 },
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001223 { /* 440SPe Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001224 .pvr_mask = 0xfff00fff,
1225 .pvr_value = 0x53400890,
1226 .cpu_name = "440SPe Rev. A",
1227 .cpu_features = CPU_FTRS_44X,
1228 .cpu_user_features = COMMON_USER_BOOKE,
1229 .icache_bsize = 32,
1230 .dcache_bsize = 32,
1231 .platform = "ppc440",
1232 },
1233 { /* 440SPe Rev. B */
1234 .pvr_mask = 0xfff00fff,
1235 .pvr_value = 0x53400891,
1236 .cpu_name = "440SPe Rev. B",
Kumar Galaa147c582006-12-08 02:34:38 -06001237 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001238 .cpu_user_features = COMMON_USER_BOOKE,
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001239 .icache_bsize = 32,
1240 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001241 .platform = "ppc440",
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001242 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001243#endif /* CONFIG_44x */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001244#ifdef CONFIG_FSL_BOOKE
Stephen Rothwell49209602005-10-12 15:55:09 +10001245 { /* e200z5 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001246 .pvr_mask = 0xfff00000,
1247 .pvr_value = 0x81000000,
1248 .cpu_name = "e200z5",
1249 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001250 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001251 .cpu_user_features = COMMON_USER_BOOKE |
1252 PPC_FEATURE_HAS_EFP_SINGLE |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001253 PPC_FEATURE_UNIFIED_CACHE,
1254 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001255 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001256 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001257 { /* e200z6 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001258 .pvr_mask = 0xfff00000,
1259 .pvr_value = 0x81100000,
1260 .cpu_name = "e200z6",
1261 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001262 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001263 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001264 PPC_FEATURE_HAS_SPE_COMP |
1265 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001266 PPC_FEATURE_UNIFIED_CACHE,
1267 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001268 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001269 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001270 { /* e500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001271 .pvr_mask = 0xffff0000,
1272 .pvr_value = 0x80200000,
1273 .cpu_name = "e500",
1274 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001275 .cpu_features = CPU_FTRS_E500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001276 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001277 PPC_FEATURE_HAS_SPE_COMP |
1278 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001279 .icache_bsize = 32,
1280 .dcache_bsize = 32,
1281 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001282 .oprofile_cpu_type = "ppc/e500",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001283 .oprofile_type = PPC_OPROFILE_BOOKE,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001284 .platform = "ppc8540",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001285 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001286 { /* e500v2 */
Kumar Gala5b37b702005-06-21 17:15:18 -07001287 .pvr_mask = 0xffff0000,
1288 .pvr_value = 0x80210000,
1289 .cpu_name = "e500v2",
1290 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001291 .cpu_features = CPU_FTRS_E500_2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001292 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001293 PPC_FEATURE_HAS_SPE_COMP |
1294 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1295 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
Kumar Gala5b37b702005-06-21 17:15:18 -07001296 .icache_bsize = 32,
1297 .dcache_bsize = 32,
1298 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001299 .oprofile_cpu_type = "ppc/e500",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001300 .oprofile_type = PPC_OPROFILE_BOOKE,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001301 .platform = "ppc8548",
Kumar Gala5b37b702005-06-21 17:15:18 -07001302 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001303#endif
1304#if !CLASSIC_PPC
1305 { /* default match */
1306 .pvr_mask = 0x00000000,
1307 .pvr_value = 0x00000000,
1308 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -05001309 .cpu_features = CPU_FTRS_GENERIC_32,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001310 .cpu_user_features = PPC_FEATURE_32,
1311 .icache_bsize = 32,
1312 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001313 .platform = "powerpc",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001314 }
1315#endif /* !CLASSIC_PPC */
Stephen Rothwell49209602005-10-12 15:55:09 +10001316#endif /* CONFIG_PPC32 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001317};
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001318
Paul Mackerras974a76f2006-11-10 20:38:53 +11001319struct cpu_spec *identify_cpu(unsigned long offset, unsigned int pvr)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001320{
1321 struct cpu_spec *s = cpu_specs;
1322 struct cpu_spec **cur = &cur_cpu_spec;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001323 int i;
1324
1325 s = PTRRELOC(s);
1326 cur = PTRRELOC(cur);
1327
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001328 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
1329 if ((pvr & s->pvr_mask) == s->pvr_value) {
1330 *cur = cpu_specs + i;
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001331#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
1332 /* ppc64 and booke expect identify_cpu to also call
1333 * setup_cpu for that processor. I will consolidate
1334 * that at a later time, for now, just use #ifdef.
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001335 * we also don't need to PTRRELOC the function pointer
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001336 * on ppc64 and booke as we are running at 0 in real
1337 * mode on ppc64 and reloc_offset is always 0 on booke.
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001338 */
1339 if (s->cpu_setup) {
1340 s->cpu_setup(offset, s);
1341 }
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001342#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001343 return s;
1344 }
1345 BUG();
1346 return NULL;
1347}
1348
Benjamin Herrenschmidt0909c8c2006-10-20 11:47:18 +10001349void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001350{
1351 struct fixup_entry {
1352 unsigned long mask;
1353 unsigned long value;
Benjamin Herrenschmidt0909c8c2006-10-20 11:47:18 +10001354 long start_off;
1355 long end_off;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001356 } *fcur, *fend;
1357
1358 fcur = fixup_start;
1359 fend = fixup_end;
1360
1361 for (; fcur < fend; fcur++) {
1362 unsigned int *pstart, *pend, *p;
1363
1364 if ((value & fcur->mask) == fcur->value)
1365 continue;
1366
1367 /* These PTRRELOCs will disappear once the new scheme for
1368 * modules and vdso is implemented
1369 */
Benjamin Herrenschmidt0909c8c2006-10-20 11:47:18 +10001370 pstart = ((unsigned int *)fcur) + (fcur->start_off / 4);
1371 pend = ((unsigned int *)fcur) + (fcur->end_off / 4);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001372
1373 for (p = pstart; p < pend; p++) {
1374 *p = 0x60000000u;
1375 asm volatile ("dcbst 0, %0" : : "r" (p));
1376 }
1377 asm volatile ("sync" : : : "memory");
1378 for (p = pstart; p < pend; p++)
1379 asm volatile ("icbi 0,%0" : : "r" (p));
1380 asm volatile ("sync; isync" : : : "memory");
1381 }
1382}