blob: 8eb8087383eba030ccf1078be0dc3a88cc6daffb [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
Kumar Gala400d2212005-09-27 15:13:12 -050034extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
35extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
36extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
37extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
38extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
39extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
40extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
41extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell49209602005-10-12 15:55:09 +100042#endif /* CONFIG_PPC32 */
Olof Johanssonf39b7a52006-08-11 00:07:08 -050043#ifdef CONFIG_PPC64
Kumar Gala400d2212005-09-27 15:13:12 -050044extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
Olof Johansson5b43d202006-10-04 23:41:41 -050045extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
Olof Johansson11999192007-02-04 16:36:51 -060046extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell40d244d2007-02-12 22:10:48 +110047extern void __restore_cpu_pa6t(void);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050048extern void __restore_cpu_ppc970(void);
49#endif /* CONFIG_PPC64 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070050
Linus Torvalds1da177e2005-04-16 15:20:36 -070051/* This table only contains "desktop" CPUs, it need to be filled with embedded
52 * ones as well...
53 */
Stephen Rothwell49209602005-10-12 15:55:09 +100054#define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
55 PPC_FEATURE_HAS_MMU)
56#define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +110057#define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +110058#define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
59 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
60#define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
61 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
Anton Blanchard03054d52006-04-29 09:51:06 +100062#define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
Paul Mackerrasfab5db92006-06-07 16:14:40 +100063 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
64 PPC_FEATURE_TRUE_LE)
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -050065#define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
66 PPC_FEATURE_TRUE_LE | \
67 PPC_FEATURE_HAS_ALTIVEC_COMP)
Paul Mackerras80f15dc2006-01-14 10:11:39 +110068#define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
69 PPC_FEATURE_BOOKE)
Linus Torvalds1da177e2005-04-16 15:20:36 -070070
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +100071static struct cpu_spec cpu_specs[] = {
Stephen Rothwell49209602005-10-12 15:55:09 +100072#ifdef CONFIG_PPC64
73 { /* Power3 */
74 .pvr_mask = 0xffff0000,
75 .pvr_value = 0x00400000,
76 .cpu_name = "POWER3 (630)",
77 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +100078 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +100079 .icache_bsize = 128,
80 .dcache_bsize = 128,
81 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -060082 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +100083 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +000084 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +110085 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +100086 },
87 { /* Power3+ */
88 .pvr_mask = 0xffff0000,
89 .pvr_value = 0x00410000,
90 .cpu_name = "POWER3 (630+)",
91 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +100092 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +100093 .icache_bsize = 128,
94 .dcache_bsize = 128,
95 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -060096 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +100097 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +000098 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +110099 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +1000100 },
101 { /* Northstar */
102 .pvr_mask = 0xffff0000,
103 .pvr_value = 0x00330000,
104 .cpu_name = "RS64-II (northstar)",
105 .cpu_features = CPU_FTRS_RS64,
106 .cpu_user_features = COMMON_USER_PPC64,
107 .icache_bsize = 128,
108 .dcache_bsize = 128,
109 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600110 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000111 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000112 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100113 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000114 },
115 { /* Pulsar */
116 .pvr_mask = 0xffff0000,
117 .pvr_value = 0x00340000,
118 .cpu_name = "RS64-III (pulsar)",
119 .cpu_features = CPU_FTRS_RS64,
120 .cpu_user_features = COMMON_USER_PPC64,
121 .icache_bsize = 128,
122 .dcache_bsize = 128,
123 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600124 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000125 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000126 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100127 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000128 },
129 { /* I-star */
130 .pvr_mask = 0xffff0000,
131 .pvr_value = 0x00360000,
132 .cpu_name = "RS64-III (icestar)",
133 .cpu_features = CPU_FTRS_RS64,
134 .cpu_user_features = COMMON_USER_PPC64,
135 .icache_bsize = 128,
136 .dcache_bsize = 128,
137 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600138 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000139 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000140 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100141 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000142 },
143 { /* S-star */
144 .pvr_mask = 0xffff0000,
145 .pvr_value = 0x00370000,
146 .cpu_name = "RS64-IV (sstar)",
147 .cpu_features = CPU_FTRS_RS64,
148 .cpu_user_features = COMMON_USER_PPC64,
149 .icache_bsize = 128,
150 .dcache_bsize = 128,
151 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600152 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000153 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000154 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100155 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000156 },
157 { /* Power4 */
158 .pvr_mask = 0xffff0000,
159 .pvr_value = 0x00350000,
160 .cpu_name = "POWER4 (gp)",
161 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100162 .cpu_user_features = COMMON_USER_POWER4,
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/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000168 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100169 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000170 },
171 { /* Power4+ */
172 .pvr_mask = 0xffff0000,
173 .pvr_value = 0x00380000,
174 .cpu_name = "POWER4+ (gq)",
175 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100176 .cpu_user_features = COMMON_USER_POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000177 .icache_bsize = 128,
178 .dcache_bsize = 128,
179 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600180 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000181 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000182 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100183 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000184 },
185 { /* PPC970 */
186 .pvr_mask = 0xffff0000,
187 .pvr_value = 0x00390000,
188 .cpu_name = "PPC970",
189 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100190 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000191 PPC_FEATURE_HAS_ALTIVEC_COMP,
192 .icache_bsize = 128,
193 .dcache_bsize = 128,
194 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600195 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000196 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500197 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000198 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000199 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100200 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000201 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000202 { /* PPC970FX */
203 .pvr_mask = 0xffff0000,
204 .pvr_value = 0x003c0000,
205 .cpu_name = "PPC970FX",
Stephen Rothwell49209602005-10-12 15:55:09 +1000206 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100207 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000208 PPC_FEATURE_HAS_ALTIVEC_COMP,
209 .icache_bsize = 128,
210 .dcache_bsize = 128,
211 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600212 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000213 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500214 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000215 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000216 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100217 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000218 },
Olof Johansson3546e812007-02-26 00:35:14 -0600219 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
220 .pvr_mask = 0xffffffff,
221 .pvr_value = 0x00440100,
222 .cpu_name = "PPC970MP",
223 .cpu_features = CPU_FTRS_PPC970,
224 .cpu_user_features = COMMON_USER_POWER4 |
225 PPC_FEATURE_HAS_ALTIVEC_COMP,
226 .icache_bsize = 128,
227 .dcache_bsize = 128,
228 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000229 .pmc_type = PPC_PMC_IBM,
Olof Johansson3546e812007-02-26 00:35:14 -0600230 .cpu_setup = __setup_cpu_ppc970,
231 .cpu_restore = __restore_cpu_ppc970,
232 .oprofile_cpu_type = "ppc64/970MP",
233 .oprofile_type = PPC_OPROFILE_POWER4,
234 .platform = "ppc970",
235 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000236 { /* PPC970MP */
237 .pvr_mask = 0xffff0000,
238 .pvr_value = 0x00440000,
239 .cpu_name = "PPC970MP",
240 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100241 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000242 PPC_FEATURE_HAS_ALTIVEC_COMP,
243 .icache_bsize = 128,
244 .dcache_bsize = 128,
Anton Blanchard87af41b2006-05-05 05:44:26 +1000245 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000246 .pmc_type = PPC_PMC_IBM,
Olof Johansson5b43d202006-10-04 23:41:41 -0500247 .cpu_setup = __setup_cpu_ppc970MP,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500248 .cpu_restore = __restore_cpu_ppc970,
Mike Wolffecb3522006-11-21 14:41:54 -0600249 .oprofile_cpu_type = "ppc64/970MP",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000250 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100251 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000252 },
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500253 { /* PPC970GX */
254 .pvr_mask = 0xffff0000,
255 .pvr_value = 0x00450000,
256 .cpu_name = "PPC970GX",
257 .cpu_features = CPU_FTRS_PPC970,
258 .cpu_user_features = COMMON_USER_POWER4 |
259 PPC_FEATURE_HAS_ALTIVEC_COMP,
260 .icache_bsize = 128,
261 .dcache_bsize = 128,
262 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600263 .pmc_type = PPC_PMC_IBM,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500264 .cpu_setup = __setup_cpu_ppc970,
265 .oprofile_cpu_type = "ppc64/970",
266 .oprofile_type = PPC_OPROFILE_POWER4,
267 .platform = "ppc970",
268 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100269 { /* Power5 GR */
Stephen Rothwell49209602005-10-12 15:55:09 +1000270 .pvr_mask = 0xffff0000,
271 .pvr_value = 0x003a0000,
272 .cpu_name = "POWER5 (gr)",
273 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100274 .cpu_user_features = COMMON_USER_POWER5,
Stephen Rothwell49209602005-10-12 15:55:09 +1000275 .icache_bsize = 128,
276 .dcache_bsize = 128,
277 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600278 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000279 .oprofile_cpu_type = "ppc64/power5",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000280 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000281 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
282 * and above but only works on POWER5 and above
283 */
284 .oprofile_mmcra_sihv = MMCRA_SIHV,
285 .oprofile_mmcra_sipr = MMCRA_SIPR,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100286 .platform = "power5",
Stephen Rothwell49209602005-10-12 15:55:09 +1000287 },
Mike Wolf31a12ce2007-07-10 13:13:47 -0500288 { /* Power5++ */
289 .pvr_mask = 0xffffff00,
290 .pvr_value = 0x003b0300,
291 .cpu_name = "POWER5+ (gs)",
292 .cpu_features = CPU_FTRS_POWER5,
293 .cpu_user_features = COMMON_USER_POWER5_PLUS,
294 .icache_bsize = 128,
295 .dcache_bsize = 128,
296 .num_pmcs = 6,
297 .oprofile_cpu_type = "ppc64/power5++",
298 .oprofile_type = PPC_OPROFILE_POWER4,
299 .oprofile_mmcra_sihv = MMCRA_SIHV,
300 .oprofile_mmcra_sipr = MMCRA_SIPR,
301 .platform = "power5+",
302 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100303 { /* Power5 GS */
Stephen Rothwell49209602005-10-12 15:55:09 +1000304 .pvr_mask = 0xffff0000,
305 .pvr_value = 0x003b0000,
Anton Blanchard834608f2006-01-09 15:42:30 +1100306 .cpu_name = "POWER5+ (gs)",
Stephen Rothwell49209602005-10-12 15:55:09 +1000307 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100308 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Stephen Rothwell49209602005-10-12 15:55:09 +1000309 .icache_bsize = 128,
310 .dcache_bsize = 128,
311 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600312 .pmc_type = PPC_PMC_IBM,
Anton Blanchard834608f2006-01-09 15:42:30 +1100313 .oprofile_cpu_type = "ppc64/power5+",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000314 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000315 .oprofile_mmcra_sihv = MMCRA_SIHV,
316 .oprofile_mmcra_sipr = MMCRA_SIPR,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100317 .platform = "power5+",
Stephen Rothwell49209602005-10-12 15:55:09 +1000318 },
Paul Mackerras974a76f2006-11-10 20:38:53 +1100319 { /* POWER6 in P5+ mode; 2.04-compliant processor */
320 .pvr_mask = 0xffffffff,
321 .pvr_value = 0x0f000001,
322 .cpu_name = "POWER5+",
323 .cpu_features = CPU_FTRS_POWER5,
324 .cpu_user_features = COMMON_USER_POWER5_PLUS,
325 .icache_bsize = 128,
326 .dcache_bsize = 128,
327 .num_pmcs = 6,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000328 .pmc_type = PPC_PMC_IBM,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100329 .oprofile_cpu_type = "ppc64/power6",
330 .oprofile_type = PPC_OPROFILE_POWER4,
331 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
332 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
333 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
334 POWER6_MMCRA_OTHER,
335 .platform = "power5+",
336 },
Anton Blanchard03054d52006-04-29 09:51:06 +1000337 { /* Power6 */
338 .pvr_mask = 0xffff0000,
339 .pvr_value = 0x003e0000,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100340 .cpu_name = "POWER6 (raw)",
341 .cpu_features = CPU_FTRS_POWER6,
342 .cpu_user_features = COMMON_USER_POWER6 |
343 PPC_FEATURE_POWER6_EXT,
344 .icache_bsize = 128,
345 .dcache_bsize = 128,
346 .num_pmcs = 6,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000347 .pmc_type = PPC_PMC_IBM,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100348 .oprofile_cpu_type = "ppc64/power6",
349 .oprofile_type = PPC_OPROFILE_POWER4,
350 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
351 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
352 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
353 POWER6_MMCRA_OTHER,
354 .platform = "power6x",
355 },
356 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
357 .pvr_mask = 0xffffffff,
358 .pvr_value = 0x0f000002,
359 .cpu_name = "POWER6 (architected)",
Anton Blanchard03054d52006-04-29 09:51:06 +1000360 .cpu_features = CPU_FTRS_POWER6,
361 .cpu_user_features = COMMON_USER_POWER6,
362 .icache_bsize = 128,
363 .dcache_bsize = 128,
Anton Blanchard99f48612006-10-13 12:13:12 +1000364 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600365 .pmc_type = PPC_PMC_IBM,
Anton Blanchard03054d52006-04-29 09:51:06 +1000366 .oprofile_cpu_type = "ppc64/power6",
367 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000368 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
369 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
370 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
371 POWER6_MMCRA_OTHER,
Anton Blanchard03054d52006-04-29 09:51:06 +1000372 .platform = "power6",
373 },
Arnd Bergmannc902be72006-01-04 19:55:53 +0000374 { /* Cell Broadband Engine */
Stephen Rothwell49209602005-10-12 15:55:09 +1000375 .pvr_mask = 0xffff0000,
376 .pvr_value = 0x00700000,
377 .cpu_name = "Cell Broadband Engine",
378 .cpu_features = CPU_FTRS_CELL,
379 .cpu_user_features = COMMON_USER_PPC64 |
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +1100380 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
381 PPC_FEATURE_SMT,
Stephen Rothwell49209602005-10-12 15:55:09 +1000382 .icache_bsize = 128,
383 .dcache_bsize = 128,
Maynard Johnson18f21902006-11-20 18:45:16 +0100384 .num_pmcs = 4,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600385 .pmc_type = PPC_PMC_IBM,
Maynard Johnson18f21902006-11-20 18:45:16 +0100386 .oprofile_cpu_type = "ppc64/cell-be",
387 .oprofile_type = PPC_OPROFILE_CELL,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100388 .platform = "ppc-cell-be",
Stephen Rothwell49209602005-10-12 15:55:09 +1000389 },
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500390 { /* PA Semi PA6T */
391 .pvr_mask = 0x7fff0000,
392 .pvr_value = 0x00900000,
393 .cpu_name = "PA6T",
394 .cpu_features = CPU_FTRS_PA6T,
395 .cpu_user_features = COMMON_USER_PA6T,
396 .icache_bsize = 64,
397 .dcache_bsize = 64,
398 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600399 .pmc_type = PPC_PMC_PA6T,
Olof Johansson11999192007-02-04 16:36:51 -0600400 .cpu_setup = __setup_cpu_pa6t,
401 .cpu_restore = __restore_cpu_pa6t,
Olof Johansson25fc5302007-04-18 16:38:21 +1000402 .oprofile_cpu_type = "ppc64/pa6t",
403 .oprofile_type = PPC_OPROFILE_PA6T,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500404 .platform = "pa6t",
405 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000406 { /* default match */
407 .pvr_mask = 0x00000000,
408 .pvr_value = 0x00000000,
409 .cpu_name = "POWER4 (compatible)",
410 .cpu_features = CPU_FTRS_COMPATIBLE,
411 .cpu_user_features = COMMON_USER_PPC64,
412 .icache_bsize = 128,
413 .dcache_bsize = 128,
414 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600415 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100416 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000417 }
418#endif /* CONFIG_PPC64 */
419#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -0700420#if CLASSIC_PPC
Stephen Rothwell49209602005-10-12 15:55:09 +1000421 { /* 601 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700422 .pvr_mask = 0xffff0000,
423 .pvr_value = 0x00010000,
424 .cpu_name = "601",
Kumar Gala10b35d92005-09-23 14:08:58 -0500425 .cpu_features = CPU_FTRS_PPC601,
Stephen Rothwell49209602005-10-12 15:55:09 +1000426 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
Paul Mackerras98599012005-10-22 16:51:34 +1000427 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700428 .icache_bsize = 32,
429 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100430 .platform = "ppc601",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700431 },
432 { /* 603 */
433 .pvr_mask = 0xffff0000,
434 .pvr_value = 0x00030000,
435 .cpu_name = "603",
Kumar Gala10b35d92005-09-23 14:08:58 -0500436 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000437 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700438 .icache_bsize = 32,
439 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100440 .cpu_setup = __setup_cpu_603,
441 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700442 },
443 { /* 603e */
444 .pvr_mask = 0xffff0000,
445 .pvr_value = 0x00060000,
446 .cpu_name = "603e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500447 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000448 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700449 .icache_bsize = 32,
450 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100451 .cpu_setup = __setup_cpu_603,
452 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700453 },
454 { /* 603ev */
455 .pvr_mask = 0xffff0000,
456 .pvr_value = 0x00070000,
457 .cpu_name = "603ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500458 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000459 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700460 .icache_bsize = 32,
461 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100462 .cpu_setup = __setup_cpu_603,
463 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700464 },
465 { /* 604 */
466 .pvr_mask = 0xffff0000,
467 .pvr_value = 0x00040000,
468 .cpu_name = "604",
Kumar Gala10b35d92005-09-23 14:08:58 -0500469 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000470 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700471 .icache_bsize = 32,
472 .dcache_bsize = 32,
473 .num_pmcs = 2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100474 .cpu_setup = __setup_cpu_604,
475 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700476 },
477 { /* 604e */
478 .pvr_mask = 0xfffff000,
479 .pvr_value = 0x00090000,
480 .cpu_name = "604e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500481 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000482 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700483 .icache_bsize = 32,
484 .dcache_bsize = 32,
485 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100486 .cpu_setup = __setup_cpu_604,
487 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700488 },
489 { /* 604r */
490 .pvr_mask = 0xffff0000,
491 .pvr_value = 0x00090000,
492 .cpu_name = "604r",
Kumar Gala10b35d92005-09-23 14:08:58 -0500493 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000494 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700495 .icache_bsize = 32,
496 .dcache_bsize = 32,
497 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100498 .cpu_setup = __setup_cpu_604,
499 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700500 },
501 { /* 604ev */
502 .pvr_mask = 0xffff0000,
503 .pvr_value = 0x000a0000,
504 .cpu_name = "604ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500505 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000506 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700507 .icache_bsize = 32,
508 .dcache_bsize = 32,
509 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100510 .cpu_setup = __setup_cpu_604,
511 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700512 },
513 { /* 740/750 (0x4202, don't support TAU ?) */
514 .pvr_mask = 0xffffffff,
515 .pvr_value = 0x00084202,
516 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500517 .cpu_features = CPU_FTRS_740_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000518 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700519 .icache_bsize = 32,
520 .dcache_bsize = 32,
521 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100522 .cpu_setup = __setup_cpu_750,
523 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700524 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700525 { /* 750CX (80100 and 8010x?) */
526 .pvr_mask = 0xfffffff0,
527 .pvr_value = 0x00080100,
528 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500529 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000530 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700531 .icache_bsize = 32,
532 .dcache_bsize = 32,
533 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100534 .cpu_setup = __setup_cpu_750cx,
535 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700536 },
537 { /* 750CX (82201 and 82202) */
538 .pvr_mask = 0xfffffff0,
539 .pvr_value = 0x00082200,
540 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500541 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000542 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700543 .icache_bsize = 32,
544 .dcache_bsize = 32,
545 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100546 .cpu_setup = __setup_cpu_750cx,
547 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700548 },
549 { /* 750CXe (82214) */
550 .pvr_mask = 0xfffffff0,
551 .pvr_value = 0x00082210,
552 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500553 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000554 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700555 .icache_bsize = 32,
556 .dcache_bsize = 32,
557 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100558 .cpu_setup = __setup_cpu_750cx,
559 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700560 },
Arthur Othieno7c316252005-09-03 15:55:52 -0700561 { /* 750CXe "Gekko" (83214) */
562 .pvr_mask = 0xffffffff,
563 .pvr_value = 0x00083214,
564 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500565 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000566 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Arthur Othieno7c316252005-09-03 15:55:52 -0700567 .icache_bsize = 32,
568 .dcache_bsize = 32,
569 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100570 .cpu_setup = __setup_cpu_750cx,
571 .platform = "ppc750",
Arthur Othieno7c316252005-09-03 15:55:52 -0700572 },
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500573 { /* 750CL */
574 .pvr_mask = 0xfffff0f0,
575 .pvr_value = 0x00087010,
576 .cpu_name = "750CL",
Josh Boyera14c4502007-04-13 04:33:25 +1000577 .cpu_features = CPU_FTRS_750CL,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500578 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
579 .icache_bsize = 32,
580 .dcache_bsize = 32,
581 .num_pmcs = 4,
Josh Boyera14c4502007-04-13 04:33:25 +1000582 .cpu_setup = __setup_cpu_750,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500583 .platform = "ppc750",
584 },
Arthur Othienoac1ff042005-09-03 15:55:51 -0700585 { /* 745/755 */
586 .pvr_mask = 0xfffff000,
587 .pvr_value = 0x00083000,
588 .cpu_name = "745/755",
Kumar Gala10b35d92005-09-23 14:08:58 -0500589 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000590 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Arthur Othienoac1ff042005-09-03 15:55:51 -0700591 .icache_bsize = 32,
592 .dcache_bsize = 32,
593 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100594 .cpu_setup = __setup_cpu_750,
595 .platform = "ppc750",
Arthur Othienoac1ff042005-09-03 15:55:51 -0700596 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700597 { /* 750FX rev 1.x */
598 .pvr_mask = 0xffffff00,
599 .pvr_value = 0x70000100,
600 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500601 .cpu_features = CPU_FTRS_750FX1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000602 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700603 .icache_bsize = 32,
604 .dcache_bsize = 32,
605 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100606 .cpu_setup = __setup_cpu_750,
607 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700608 },
609 { /* 750FX rev 2.0 must disable HID0[DPM] */
610 .pvr_mask = 0xffffffff,
611 .pvr_value = 0x70000200,
612 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500613 .cpu_features = CPU_FTRS_750FX2,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000614 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700615 .icache_bsize = 32,
616 .dcache_bsize = 32,
617 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100618 .cpu_setup = __setup_cpu_750,
619 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700620 },
621 { /* 750FX (All revs except 2.0) */
622 .pvr_mask = 0xffff0000,
623 .pvr_value = 0x70000000,
624 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500625 .cpu_features = CPU_FTRS_750FX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000626 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700627 .icache_bsize = 32,
628 .dcache_bsize = 32,
629 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100630 .cpu_setup = __setup_cpu_750fx,
631 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700632 },
633 { /* 750GX */
634 .pvr_mask = 0xffff0000,
635 .pvr_value = 0x70020000,
636 .cpu_name = "750GX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500637 .cpu_features = CPU_FTRS_750GX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000638 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700639 .icache_bsize = 32,
640 .dcache_bsize = 32,
641 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100642 .cpu_setup = __setup_cpu_750fx,
643 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700644 },
645 { /* 740/750 (L2CR bit need fixup for 740) */
646 .pvr_mask = 0xffff0000,
647 .pvr_value = 0x00080000,
648 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500649 .cpu_features = CPU_FTRS_740,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000650 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700651 .icache_bsize = 32,
652 .dcache_bsize = 32,
653 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100654 .cpu_setup = __setup_cpu_750,
655 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700656 },
657 { /* 7400 rev 1.1 ? (no TAU) */
658 .pvr_mask = 0xffffffff,
659 .pvr_value = 0x000c1101,
660 .cpu_name = "7400 (1.1)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500661 .cpu_features = CPU_FTRS_7400_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000662 .cpu_user_features = COMMON_USER |
663 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700664 .icache_bsize = 32,
665 .dcache_bsize = 32,
666 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100667 .cpu_setup = __setup_cpu_7400,
668 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700669 },
670 { /* 7400 */
671 .pvr_mask = 0xffff0000,
672 .pvr_value = 0x000c0000,
673 .cpu_name = "7400",
Kumar Gala10b35d92005-09-23 14:08:58 -0500674 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000675 .cpu_user_features = COMMON_USER |
676 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700677 .icache_bsize = 32,
678 .dcache_bsize = 32,
679 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100680 .cpu_setup = __setup_cpu_7400,
681 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700682 },
683 { /* 7410 */
684 .pvr_mask = 0xffff0000,
685 .pvr_value = 0x800c0000,
686 .cpu_name = "7410",
Kumar Gala10b35d92005-09-23 14:08:58 -0500687 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000688 .cpu_user_features = COMMON_USER |
689 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700690 .icache_bsize = 32,
691 .dcache_bsize = 32,
692 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100693 .cpu_setup = __setup_cpu_7410,
694 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700695 },
696 { /* 7450 2.0 - no doze/nap */
697 .pvr_mask = 0xffffffff,
698 .pvr_value = 0x80000200,
699 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500700 .cpu_features = CPU_FTRS_7450_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000701 .cpu_user_features = COMMON_USER |
702 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700703 .icache_bsize = 32,
704 .dcache_bsize = 32,
705 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600706 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600707 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000708 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100709 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700710 },
711 { /* 7450 2.1 */
712 .pvr_mask = 0xffffffff,
713 .pvr_value = 0x80000201,
714 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500715 .cpu_features = CPU_FTRS_7450_21,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000716 .cpu_user_features = COMMON_USER |
717 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700718 .icache_bsize = 32,
719 .dcache_bsize = 32,
720 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600721 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600722 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000723 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100724 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700725 },
726 { /* 7450 2.3 and newer */
727 .pvr_mask = 0xffff0000,
728 .pvr_value = 0x80000000,
729 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500730 .cpu_features = CPU_FTRS_7450_23,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000731 .cpu_user_features = COMMON_USER |
732 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700733 .icache_bsize = 32,
734 .dcache_bsize = 32,
735 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600736 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600737 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000738 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100739 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700740 },
741 { /* 7455 rev 1.x */
742 .pvr_mask = 0xffffff00,
743 .pvr_value = 0x80010100,
744 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500745 .cpu_features = CPU_FTRS_7455_1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000746 .cpu_user_features = COMMON_USER |
747 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700748 .icache_bsize = 32,
749 .dcache_bsize = 32,
750 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600751 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600752 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000753 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100754 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700755 },
756 { /* 7455 rev 2.0 */
757 .pvr_mask = 0xffffffff,
758 .pvr_value = 0x80010200,
759 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500760 .cpu_features = CPU_FTRS_7455_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000761 .cpu_user_features = COMMON_USER |
762 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700763 .icache_bsize = 32,
764 .dcache_bsize = 32,
765 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600766 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600767 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000768 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100769 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700770 },
771 { /* 7455 others */
772 .pvr_mask = 0xffff0000,
773 .pvr_value = 0x80010000,
774 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500775 .cpu_features = CPU_FTRS_7455,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000776 .cpu_user_features = COMMON_USER |
777 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700778 .icache_bsize = 32,
779 .dcache_bsize = 32,
780 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600781 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600782 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000783 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100784 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700785 },
786 { /* 7447/7457 Rev 1.0 */
787 .pvr_mask = 0xffffffff,
788 .pvr_value = 0x80020100,
789 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500790 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000791 .cpu_user_features = COMMON_USER |
792 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700793 .icache_bsize = 32,
794 .dcache_bsize = 32,
795 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600796 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600797 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000798 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100799 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700800 },
801 { /* 7447/7457 Rev 1.1 */
802 .pvr_mask = 0xffffffff,
803 .pvr_value = 0x80020101,
804 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500805 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000806 .cpu_user_features = COMMON_USER |
807 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700808 .icache_bsize = 32,
809 .dcache_bsize = 32,
810 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600811 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600812 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000813 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100814 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700815 },
816 { /* 7447/7457 Rev 1.2 and later */
817 .pvr_mask = 0xffff0000,
818 .pvr_value = 0x80020000,
819 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500820 .cpu_features = CPU_FTRS_7447,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000821 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700822 .icache_bsize = 32,
823 .dcache_bsize = 32,
824 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600825 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600826 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000827 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100828 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700829 },
830 { /* 7447A */
831 .pvr_mask = 0xffff0000,
832 .pvr_value = 0x80030000,
833 .cpu_name = "7447A",
Kumar Gala10b35d92005-09-23 14:08:58 -0500834 .cpu_features = CPU_FTRS_7447A,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000835 .cpu_user_features = COMMON_USER |
836 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700837 .icache_bsize = 32,
838 .dcache_bsize = 32,
839 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600840 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600841 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000842 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100843 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700844 },
Kumar Galabbde6302005-09-03 15:55:55 -0700845 { /* 7448 */
846 .pvr_mask = 0xffff0000,
847 .pvr_value = 0x80040000,
848 .cpu_name = "7448",
James.Yang3d372542007-05-02 16:34:43 -0500849 .cpu_features = CPU_FTRS_7448,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000850 .cpu_user_features = COMMON_USER |
851 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Kumar Galabbde6302005-09-03 15:55:55 -0700852 .icache_bsize = 32,
853 .dcache_bsize = 32,
854 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600855 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600856 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000857 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100858 .platform = "ppc7450",
Kumar Galabbde6302005-09-03 15:55:55 -0700859 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700860 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
861 .pvr_mask = 0x7fff0000,
862 .pvr_value = 0x00810000,
863 .cpu_name = "82xx",
Kumar Gala10b35d92005-09-23 14:08:58 -0500864 .cpu_features = CPU_FTRS_82XX,
Stephen Rothwell49209602005-10-12 15:55:09 +1000865 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700866 .icache_bsize = 32,
867 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100868 .cpu_setup = __setup_cpu_603,
869 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700870 },
871 { /* All G2_LE (603e core, plus some) have the same pvr */
872 .pvr_mask = 0x7fff0000,
873 .pvr_value = 0x00820000,
874 .cpu_name = "G2_LE",
Kumar Gala10b35d92005-09-23 14:08:58 -0500875 .cpu_features = CPU_FTRS_G2_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000876 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700877 .icache_bsize = 32,
878 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100879 .cpu_setup = __setup_cpu_603,
880 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700881 },
Kim Phillips6c4a2502006-10-02 20:10:24 -0500882 { /* e300c1 (a 603e core, plus some) on 83xx */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700883 .pvr_mask = 0x7fff0000,
884 .pvr_value = 0x00830000,
Kim Phillips6c4a2502006-10-02 20:10:24 -0500885 .cpu_name = "e300c1",
Kumar Gala10b35d92005-09-23 14:08:58 -0500886 .cpu_features = CPU_FTRS_E300,
Stephen Rothwell49209602005-10-12 15:55:09 +1000887 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700888 .icache_bsize = 32,
889 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100890 .cpu_setup = __setup_cpu_603,
891 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700892 },
Kim Phillips6c4a2502006-10-02 20:10:24 -0500893 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
894 .pvr_mask = 0x7fff0000,
895 .pvr_value = 0x00840000,
896 .cpu_name = "e300c2",
Kim Phillipsaa42c692006-12-08 02:43:30 -0600897 .cpu_features = CPU_FTRS_E300C2,
Kim Phillips6c4a2502006-10-02 20:10:24 -0500898 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
899 .icache_bsize = 32,
900 .dcache_bsize = 32,
901 .cpu_setup = __setup_cpu_603,
902 .platform = "ppc603",
903 },
Scott Wood57933f82006-12-01 12:57:05 -0600904 { /* e300c3 on 83xx */
905 .pvr_mask = 0x7fff0000,
906 .pvr_value = 0x00850000,
907 .cpu_name = "e300c3",
908 .cpu_features = CPU_FTRS_E300,
909 .cpu_user_features = COMMON_USER,
910 .icache_bsize = 32,
911 .dcache_bsize = 32,
912 .cpu_setup = __setup_cpu_603,
913 .platform = "ppc603",
914 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700915 { /* default match, we assume split I/D cache & TB (non-601)... */
916 .pvr_mask = 0x00000000,
917 .pvr_value = 0x00000000,
918 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500919 .cpu_features = CPU_FTRS_CLASSIC32,
Stephen Rothwell49209602005-10-12 15:55:09 +1000920 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700921 .icache_bsize = 32,
922 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100923 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700924 },
925#endif /* CLASSIC_PPC */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700926#ifdef CONFIG_8xx
927 { /* 8xx */
928 .pvr_mask = 0xffff0000,
929 .pvr_value = 0x00500000,
930 .cpu_name = "8xx",
931 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
932 * if the 8xx code is there.... */
Kumar Gala10b35d92005-09-23 14:08:58 -0500933 .cpu_features = CPU_FTRS_8XX,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700934 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
935 .icache_bsize = 16,
936 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100937 .platform = "ppc823",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700938 },
939#endif /* CONFIG_8xx */
940#ifdef CONFIG_40x
941 { /* 403GC */
942 .pvr_mask = 0xffffff00,
943 .pvr_value = 0x00200200,
944 .cpu_name = "403GC",
Kumar Gala10b35d92005-09-23 14:08:58 -0500945 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700946 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
947 .icache_bsize = 16,
948 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100949 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700950 },
951 { /* 403GCX */
952 .pvr_mask = 0xffffff00,
953 .pvr_value = 0x00201400,
954 .cpu_name = "403GCX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500955 .cpu_features = CPU_FTRS_40X,
Paul Mackerras98599012005-10-22 16:51:34 +1000956 .cpu_user_features = PPC_FEATURE_32 |
957 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700958 .icache_bsize = 16,
959 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100960 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700961 },
962 { /* 403G ?? */
963 .pvr_mask = 0xffff0000,
964 .pvr_value = 0x00200000,
965 .cpu_name = "403G ??",
Kumar Gala10b35d92005-09-23 14:08:58 -0500966 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700967 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
968 .icache_bsize = 16,
969 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100970 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700971 },
972 { /* 405GP */
973 .pvr_mask = 0xffff0000,
974 .pvr_value = 0x40110000,
975 .cpu_name = "405GP",
Kumar Gala10b35d92005-09-23 14:08:58 -0500976 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700977 .cpu_user_features = PPC_FEATURE_32 |
978 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
979 .icache_bsize = 32,
980 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100981 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700982 },
983 { /* STB 03xxx */
984 .pvr_mask = 0xffff0000,
985 .pvr_value = 0x40130000,
986 .cpu_name = "STB03xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -0500987 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700988 .cpu_user_features = PPC_FEATURE_32 |
989 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
990 .icache_bsize = 32,
991 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100992 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700993 },
994 { /* STB 04xxx */
995 .pvr_mask = 0xffff0000,
996 .pvr_value = 0x41810000,
997 .cpu_name = "STB04xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -0500998 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700999 .cpu_user_features = PPC_FEATURE_32 |
1000 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1001 .icache_bsize = 32,
1002 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001003 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001004 },
1005 { /* NP405L */
1006 .pvr_mask = 0xffff0000,
1007 .pvr_value = 0x41610000,
1008 .cpu_name = "NP405L",
Kumar Gala10b35d92005-09-23 14:08:58 -05001009 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001010 .cpu_user_features = PPC_FEATURE_32 |
1011 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1012 .icache_bsize = 32,
1013 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001014 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001015 },
1016 { /* NP4GS3 */
1017 .pvr_mask = 0xffff0000,
1018 .pvr_value = 0x40B10000,
1019 .cpu_name = "NP4GS3",
Kumar Gala10b35d92005-09-23 14:08:58 -05001020 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001021 .cpu_user_features = PPC_FEATURE_32 |
1022 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1023 .icache_bsize = 32,
1024 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001025 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001026 },
1027 { /* NP405H */
1028 .pvr_mask = 0xffff0000,
1029 .pvr_value = 0x41410000,
1030 .cpu_name = "NP405H",
Kumar Gala10b35d92005-09-23 14:08:58 -05001031 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001032 .cpu_user_features = PPC_FEATURE_32 |
1033 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1034 .icache_bsize = 32,
1035 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001036 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001037 },
1038 { /* 405GPr */
1039 .pvr_mask = 0xffff0000,
1040 .pvr_value = 0x50910000,
1041 .cpu_name = "405GPr",
Kumar Gala10b35d92005-09-23 14:08:58 -05001042 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001043 .cpu_user_features = PPC_FEATURE_32 |
1044 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1045 .icache_bsize = 32,
1046 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001047 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001048 },
1049 { /* STBx25xx */
1050 .pvr_mask = 0xffff0000,
1051 .pvr_value = 0x51510000,
1052 .cpu_name = "STBx25xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001053 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001054 .cpu_user_features = PPC_FEATURE_32 |
1055 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1056 .icache_bsize = 32,
1057 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001058 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001059 },
1060 { /* 405LP */
1061 .pvr_mask = 0xffff0000,
1062 .pvr_value = 0x41F10000,
1063 .cpu_name = "405LP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001064 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001065 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1066 .icache_bsize = 32,
1067 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001068 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001069 },
1070 { /* Xilinx Virtex-II Pro */
Grant C. Likely72646c72006-01-19 01:13:20 -07001071 .pvr_mask = 0xfffff000,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001072 .pvr_value = 0x20010000,
1073 .cpu_name = "Virtex-II Pro",
Kumar Gala10b35d92005-09-23 14:08:58 -05001074 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001075 .cpu_user_features = PPC_FEATURE_32 |
1076 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1077 .icache_bsize = 32,
1078 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001079 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001080 },
Grant C. Likely72646c72006-01-19 01:13:20 -07001081 { /* Xilinx Virtex-4 FX */
1082 .pvr_mask = 0xfffff000,
1083 .pvr_value = 0x20011000,
1084 .cpu_name = "Virtex-4 FX",
1085 .cpu_features = CPU_FTRS_40X,
1086 .cpu_user_features = PPC_FEATURE_32 |
1087 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1088 .icache_bsize = 32,
1089 .dcache_bsize = 32,
Peter Bergner838fdb42006-09-14 14:18:38 -05001090 .platform = "ppc405",
Grant C. Likely72646c72006-01-19 01:13:20 -07001091 },
Eugene Suroveginad95d602005-06-07 13:22:09 -07001092 { /* 405EP */
1093 .pvr_mask = 0xffff0000,
1094 .pvr_value = 0x51210000,
1095 .cpu_name = "405EP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001096 .cpu_features = CPU_FTRS_40X,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001097 .cpu_user_features = PPC_FEATURE_32 |
1098 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1099 .icache_bsize = 32,
1100 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001101 .platform = "ppc405",
Eugene Suroveginad95d602005-06-07 13:22:09 -07001102 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001103
1104#endif /* CONFIG_40x */
1105#ifdef CONFIG_44x
Matt Porterc9cf73a2005-07-31 22:34:52 -07001106 {
1107 .pvr_mask = 0xf0000fff,
1108 .pvr_value = 0x40000850,
1109 .cpu_name = "440EP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001110 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001111 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001112 .icache_bsize = 32,
1113 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001114 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001115 },
1116 {
1117 .pvr_mask = 0xf0000fff,
1118 .pvr_value = 0x400008d3,
1119 .cpu_name = "440EP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001120 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001121 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001122 .icache_bsize = 32,
1123 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001124 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001125 },
Valentine Barshak15fc9932007-08-29 17:40:30 +04001126 { /* 440EPX */
1127 .pvr_mask = 0xf0000ffb,
1128 .pvr_value = 0x200008D0,
1129 .cpu_name = "440EPX",
1130 .cpu_features = CPU_FTRS_44X,
1131 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1132 .icache_bsize = 32,
1133 .dcache_bsize = 32,
1134 },
1135 { /* 440GRX */
1136 .pvr_mask = 0xf0000ffb,
1137 .pvr_value = 0x200008D8,
1138 .cpu_name = "440GRX",
1139 .cpu_features = CPU_FTRS_44X,
1140 .cpu_user_features = COMMON_USER_BOOKE,
1141 .icache_bsize = 32,
1142 .dcache_bsize = 32,
1143 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001144 { /* 440GP Rev. B */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001145 .pvr_mask = 0xf0000fff,
1146 .pvr_value = 0x40000440,
1147 .cpu_name = "440GP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001148 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001149 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001150 .icache_bsize = 32,
1151 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001152 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001153 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001154 { /* 440GP Rev. C */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001155 .pvr_mask = 0xf0000fff,
1156 .pvr_value = 0x40000481,
1157 .cpu_name = "440GP Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001158 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001159 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001160 .icache_bsize = 32,
1161 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001162 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001163 },
1164 { /* 440GX Rev. A */
1165 .pvr_mask = 0xf0000fff,
1166 .pvr_value = 0x50000850,
1167 .cpu_name = "440GX Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001168 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001169 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001170 .icache_bsize = 32,
1171 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001172 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001173 },
1174 { /* 440GX Rev. B */
1175 .pvr_mask = 0xf0000fff,
1176 .pvr_value = 0x50000851,
1177 .cpu_name = "440GX Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001178 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001179 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001180 .icache_bsize = 32,
1181 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001182 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001183 },
1184 { /* 440GX Rev. C */
1185 .pvr_mask = 0xf0000fff,
1186 .pvr_value = 0x50000892,
1187 .cpu_name = "440GX Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001188 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001189 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001190 .icache_bsize = 32,
1191 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001192 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001193 },
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001194 { /* 440GX Rev. F */
1195 .pvr_mask = 0xf0000fff,
1196 .pvr_value = 0x50000894,
1197 .cpu_name = "440GX Rev. F",
Kumar Gala10b35d92005-09-23 14:08:58 -05001198 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001199 .cpu_user_features = COMMON_USER_BOOKE,
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001200 .icache_bsize = 32,
1201 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001202 .platform = "ppc440",
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001203 },
Matt Porter656de7e2005-09-03 15:55:42 -07001204 { /* 440SP Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001205 .pvr_mask = 0xfff00fff,
1206 .pvr_value = 0x53200891,
Matt Porter656de7e2005-09-03 15:55:42 -07001207 .cpu_name = "440SP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001208 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001209 .cpu_user_features = COMMON_USER_BOOKE,
Matt Porter656de7e2005-09-03 15:55:42 -07001210 .icache_bsize = 32,
1211 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001212 .platform = "ppc440",
Matt Porter656de7e2005-09-03 15:55:42 -07001213 },
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001214 { /* 440SPe Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001215 .pvr_mask = 0xfff00fff,
1216 .pvr_value = 0x53400890,
1217 .cpu_name = "440SPe Rev. A",
1218 .cpu_features = CPU_FTRS_44X,
1219 .cpu_user_features = COMMON_USER_BOOKE,
1220 .icache_bsize = 32,
1221 .dcache_bsize = 32,
1222 .platform = "ppc440",
1223 },
1224 { /* 440SPe Rev. B */
1225 .pvr_mask = 0xfff00fff,
1226 .pvr_value = 0x53400891,
1227 .cpu_name = "440SPe Rev. B",
Kumar Galaa147c582006-12-08 02:34:38 -06001228 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001229 .cpu_user_features = COMMON_USER_BOOKE,
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001230 .icache_bsize = 32,
1231 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001232 .platform = "ppc440",
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001233 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001234#endif /* CONFIG_44x */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001235#ifdef CONFIG_FSL_BOOKE
Stephen Rothwell49209602005-10-12 15:55:09 +10001236 { /* e200z5 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001237 .pvr_mask = 0xfff00000,
1238 .pvr_value = 0x81000000,
1239 .cpu_name = "e200z5",
1240 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001241 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001242 .cpu_user_features = COMMON_USER_BOOKE |
1243 PPC_FEATURE_HAS_EFP_SINGLE |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001244 PPC_FEATURE_UNIFIED_CACHE,
1245 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001246 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001247 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001248 { /* e200z6 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001249 .pvr_mask = 0xfff00000,
1250 .pvr_value = 0x81100000,
1251 .cpu_name = "e200z6",
1252 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001253 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001254 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001255 PPC_FEATURE_HAS_SPE_COMP |
1256 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001257 PPC_FEATURE_UNIFIED_CACHE,
1258 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001259 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001260 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001261 { /* e500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001262 .pvr_mask = 0xffff0000,
1263 .pvr_value = 0x80200000,
1264 .cpu_name = "e500",
1265 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001266 .cpu_features = CPU_FTRS_E500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001267 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001268 PPC_FEATURE_HAS_SPE_COMP |
1269 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001270 .icache_bsize = 32,
1271 .dcache_bsize = 32,
1272 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001273 .oprofile_cpu_type = "ppc/e500",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001274 .oprofile_type = PPC_OPROFILE_BOOKE,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001275 .platform = "ppc8540",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001276 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001277 { /* e500v2 */
Kumar Gala5b37b702005-06-21 17:15:18 -07001278 .pvr_mask = 0xffff0000,
1279 .pvr_value = 0x80210000,
1280 .cpu_name = "e500v2",
1281 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001282 .cpu_features = CPU_FTRS_E500_2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001283 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001284 PPC_FEATURE_HAS_SPE_COMP |
1285 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1286 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
Kumar Gala5b37b702005-06-21 17:15:18 -07001287 .icache_bsize = 32,
1288 .dcache_bsize = 32,
1289 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001290 .oprofile_cpu_type = "ppc/e500",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001291 .oprofile_type = PPC_OPROFILE_BOOKE,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001292 .platform = "ppc8548",
Kumar Gala5b37b702005-06-21 17:15:18 -07001293 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001294#endif
1295#if !CLASSIC_PPC
1296 { /* default match */
1297 .pvr_mask = 0x00000000,
1298 .pvr_value = 0x00000000,
1299 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -05001300 .cpu_features = CPU_FTRS_GENERIC_32,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001301 .cpu_user_features = PPC_FEATURE_32,
1302 .icache_bsize = 32,
1303 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001304 .platform = "powerpc",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001305 }
1306#endif /* !CLASSIC_PPC */
Stephen Rothwell49209602005-10-12 15:55:09 +10001307#endif /* CONFIG_PPC32 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001308};
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001309
Paul Mackerras974a76f2006-11-10 20:38:53 +11001310struct cpu_spec *identify_cpu(unsigned long offset, unsigned int pvr)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001311{
1312 struct cpu_spec *s = cpu_specs;
1313 struct cpu_spec **cur = &cur_cpu_spec;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001314 int i;
1315
1316 s = PTRRELOC(s);
1317 cur = PTRRELOC(cur);
1318
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001319 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
1320 if ((pvr & s->pvr_mask) == s->pvr_value) {
1321 *cur = cpu_specs + i;
1322#ifdef CONFIG_PPC64
1323 /* ppc64 expects identify_cpu to also call setup_cpu
1324 * for that processor. I will consolidate that at a
1325 * later time, for now, just use our friend #ifdef.
1326 * we also don't need to PTRRELOC the function pointer
1327 * on ppc64 as we are running at 0 in real mode.
1328 */
1329 if (s->cpu_setup) {
1330 s->cpu_setup(offset, s);
1331 }
1332#endif /* CONFIG_PPC64 */
1333 return s;
1334 }
1335 BUG();
1336 return NULL;
1337}
1338
Benjamin Herrenschmidt0909c8c2006-10-20 11:47:18 +10001339void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001340{
1341 struct fixup_entry {
1342 unsigned long mask;
1343 unsigned long value;
Benjamin Herrenschmidt0909c8c2006-10-20 11:47:18 +10001344 long start_off;
1345 long end_off;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001346 } *fcur, *fend;
1347
1348 fcur = fixup_start;
1349 fend = fixup_end;
1350
1351 for (; fcur < fend; fcur++) {
1352 unsigned int *pstart, *pend, *p;
1353
1354 if ((value & fcur->mask) == fcur->value)
1355 continue;
1356
1357 /* These PTRRELOCs will disappear once the new scheme for
1358 * modules and vdso is implemented
1359 */
Benjamin Herrenschmidt0909c8c2006-10-20 11:47:18 +10001360 pstart = ((unsigned int *)fcur) + (fcur->start_off / 4);
1361 pend = ((unsigned int *)fcur) + (fcur->end_off / 4);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001362
1363 for (p = pstart; p < pend; p++) {
1364 *p = 0x60000000u;
1365 asm volatile ("dcbst 0, %0" : : "r" (p));
1366 }
1367 asm volatile ("sync" : : : "memory");
1368 for (p = pstart; p < pend; p++)
1369 asm volatile ("icbi 0,%0" : : "r" (p));
1370 asm volatile ("sync; isync" : : : "memory");
1371 }
1372}