blob: 43c74a6b07b1502e5039f8d10ea2e9a3d1f2ade5 [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
13#include <linux/config.h>
14#include <linux/string.h>
15#include <linux/sched.h>
16#include <linux/threads.h>
17#include <linux/init.h>
Kumar Gala400d2212005-09-27 15:13:12 -050018#include <linux/module.h>
19
20#include <asm/oprofile_impl.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070021#include <asm/cputable.h>
22
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 */
33#ifdef CONFIG_PPC64
34extern void __setup_cpu_power3(unsigned long offset, struct cpu_spec* spec);
35extern void __setup_cpu_power4(unsigned long offset, struct cpu_spec* spec);
36extern void __setup_cpu_be(unsigned long offset, struct cpu_spec* spec);
37#else
Kumar Gala400d2212005-09-27 15:13:12 -050038extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
39extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
40extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
41extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
42extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
43extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
44extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
45extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell49209602005-10-12 15:55:09 +100046#endif /* CONFIG_PPC32 */
Kumar Gala400d2212005-09-27 15:13:12 -050047extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
Linus Torvalds1da177e2005-04-16 15:20:36 -070048
Linus Torvalds1da177e2005-04-16 15:20:36 -070049/* This table only contains "desktop" CPUs, it need to be filled with embedded
50 * ones as well...
51 */
Stephen Rothwell49209602005-10-12 15:55:09 +100052#define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
53 PPC_FEATURE_HAS_MMU)
54#define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +110055#define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
56#define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5)
57#define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS)
Stephen Rothwell49209602005-10-12 15:55:09 +100058
Linus Torvalds1da177e2005-04-16 15:20:36 -070059
Linus Torvalds1da177e2005-04-16 15:20:36 -070060/* We only set the spe features if the kernel was compiled with
61 * spe support
62 */
63#ifdef CONFIG_SPE
Stephen Rothwell49209602005-10-12 15:55:09 +100064#define PPC_FEATURE_SPE_COMP PPC_FEATURE_HAS_SPE
Linus Torvalds1da177e2005-04-16 15:20:36 -070065#else
Stephen Rothwell49209602005-10-12 15:55:09 +100066#define PPC_FEATURE_SPE_COMP 0
Linus Torvalds1da177e2005-04-16 15:20:36 -070067#endif
68
Linus Torvalds1da177e2005-04-16 15:20:36 -070069struct cpu_spec cpu_specs[] = {
Stephen Rothwell49209602005-10-12 15:55:09 +100070#ifdef CONFIG_PPC64
71 { /* Power3 */
72 .pvr_mask = 0xffff0000,
73 .pvr_value = 0x00400000,
74 .cpu_name = "POWER3 (630)",
75 .cpu_features = CPU_FTRS_POWER3,
76 .cpu_user_features = COMMON_USER_PPC64,
77 .icache_bsize = 128,
78 .dcache_bsize = 128,
79 .num_pmcs = 8,
80 .cpu_setup = __setup_cpu_power3,
Stephen Rothwell49209602005-10-12 15:55:09 +100081 .oprofile_cpu_type = "ppc64/power3",
Anton Blanchard32a33992006-01-09 15:41:31 +110082 .oprofile_type = RS64,
Stephen Rothwell49209602005-10-12 15:55:09 +100083 },
84 { /* Power3+ */
85 .pvr_mask = 0xffff0000,
86 .pvr_value = 0x00410000,
87 .cpu_name = "POWER3 (630+)",
88 .cpu_features = CPU_FTRS_POWER3,
89 .cpu_user_features = COMMON_USER_PPC64,
90 .icache_bsize = 128,
91 .dcache_bsize = 128,
92 .num_pmcs = 8,
93 .cpu_setup = __setup_cpu_power3,
Stephen Rothwell49209602005-10-12 15:55:09 +100094 .oprofile_cpu_type = "ppc64/power3",
Anton Blanchard32a33992006-01-09 15:41:31 +110095 .oprofile_type = RS64,
Stephen Rothwell49209602005-10-12 15:55:09 +100096 },
97 { /* Northstar */
98 .pvr_mask = 0xffff0000,
99 .pvr_value = 0x00330000,
100 .cpu_name = "RS64-II (northstar)",
101 .cpu_features = CPU_FTRS_RS64,
102 .cpu_user_features = COMMON_USER_PPC64,
103 .icache_bsize = 128,
104 .dcache_bsize = 128,
105 .num_pmcs = 8,
106 .cpu_setup = __setup_cpu_power3,
Stephen Rothwell49209602005-10-12 15:55:09 +1000107 .oprofile_cpu_type = "ppc64/rs64",
Anton Blanchard32a33992006-01-09 15:41:31 +1100108 .oprofile_type = RS64,
Stephen Rothwell49209602005-10-12 15:55:09 +1000109 },
110 { /* Pulsar */
111 .pvr_mask = 0xffff0000,
112 .pvr_value = 0x00340000,
113 .cpu_name = "RS64-III (pulsar)",
114 .cpu_features = CPU_FTRS_RS64,
115 .cpu_user_features = COMMON_USER_PPC64,
116 .icache_bsize = 128,
117 .dcache_bsize = 128,
118 .num_pmcs = 8,
119 .cpu_setup = __setup_cpu_power3,
Stephen Rothwell49209602005-10-12 15:55:09 +1000120 .oprofile_cpu_type = "ppc64/rs64",
Anton Blanchard32a33992006-01-09 15:41:31 +1100121 .oprofile_type = RS64,
Stephen Rothwell49209602005-10-12 15:55:09 +1000122 },
123 { /* I-star */
124 .pvr_mask = 0xffff0000,
125 .pvr_value = 0x00360000,
126 .cpu_name = "RS64-III (icestar)",
127 .cpu_features = CPU_FTRS_RS64,
128 .cpu_user_features = COMMON_USER_PPC64,
129 .icache_bsize = 128,
130 .dcache_bsize = 128,
131 .num_pmcs = 8,
132 .cpu_setup = __setup_cpu_power3,
Stephen Rothwell49209602005-10-12 15:55:09 +1000133 .oprofile_cpu_type = "ppc64/rs64",
Anton Blanchard32a33992006-01-09 15:41:31 +1100134 .oprofile_type = RS64,
Stephen Rothwell49209602005-10-12 15:55:09 +1000135 },
136 { /* S-star */
137 .pvr_mask = 0xffff0000,
138 .pvr_value = 0x00370000,
139 .cpu_name = "RS64-IV (sstar)",
140 .cpu_features = CPU_FTRS_RS64,
141 .cpu_user_features = COMMON_USER_PPC64,
142 .icache_bsize = 128,
143 .dcache_bsize = 128,
144 .num_pmcs = 8,
145 .cpu_setup = __setup_cpu_power3,
Stephen Rothwell49209602005-10-12 15:55:09 +1000146 .oprofile_cpu_type = "ppc64/rs64",
Anton Blanchard32a33992006-01-09 15:41:31 +1100147 .oprofile_type = RS64,
Stephen Rothwell49209602005-10-12 15:55:09 +1000148 },
149 { /* Power4 */
150 .pvr_mask = 0xffff0000,
151 .pvr_value = 0x00350000,
152 .cpu_name = "POWER4 (gp)",
153 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100154 .cpu_user_features = COMMON_USER_POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000155 .icache_bsize = 128,
156 .dcache_bsize = 128,
157 .num_pmcs = 8,
158 .cpu_setup = __setup_cpu_power4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000159 .oprofile_cpu_type = "ppc64/power4",
Anton Blanchard32a33992006-01-09 15:41:31 +1100160 .oprofile_type = POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000161 },
162 { /* Power4+ */
163 .pvr_mask = 0xffff0000,
164 .pvr_value = 0x00380000,
165 .cpu_name = "POWER4+ (gq)",
166 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100167 .cpu_user_features = COMMON_USER_POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000168 .icache_bsize = 128,
169 .dcache_bsize = 128,
170 .num_pmcs = 8,
171 .cpu_setup = __setup_cpu_power4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000172 .oprofile_cpu_type = "ppc64/power4",
Anton Blanchard32a33992006-01-09 15:41:31 +1100173 .oprofile_type = POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000174 },
175 { /* PPC970 */
176 .pvr_mask = 0xffff0000,
177 .pvr_value = 0x00390000,
178 .cpu_name = "PPC970",
179 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100180 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000181 PPC_FEATURE_HAS_ALTIVEC_COMP,
182 .icache_bsize = 128,
183 .dcache_bsize = 128,
184 .num_pmcs = 8,
185 .cpu_setup = __setup_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000186 .oprofile_cpu_type = "ppc64/970",
Anton Blanchard32a33992006-01-09 15:41:31 +1100187 .oprofile_type = POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000188 },
189#endif /* CONFIG_PPC64 */
190#if defined(CONFIG_PPC64) || defined(CONFIG_POWER4)
191 { /* PPC970FX */
192 .pvr_mask = 0xffff0000,
193 .pvr_value = 0x003c0000,
194 .cpu_name = "PPC970FX",
195#ifdef CONFIG_PPC32
196 .cpu_features = CPU_FTRS_970_32,
197#else
198 .cpu_features = CPU_FTRS_PPC970,
199#endif
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100200 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000201 PPC_FEATURE_HAS_ALTIVEC_COMP,
202 .icache_bsize = 128,
203 .dcache_bsize = 128,
204 .num_pmcs = 8,
205 .cpu_setup = __setup_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000206 .oprofile_cpu_type = "ppc64/970",
Anton Blanchard32a33992006-01-09 15:41:31 +1100207 .oprofile_type = POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000208 },
209#endif /* defined(CONFIG_PPC64) || defined(CONFIG_POWER4) */
210#ifdef CONFIG_PPC64
211 { /* PPC970MP */
212 .pvr_mask = 0xffff0000,
213 .pvr_value = 0x00440000,
214 .cpu_name = "PPC970MP",
215 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100216 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000217 PPC_FEATURE_HAS_ALTIVEC_COMP,
218 .icache_bsize = 128,
219 .dcache_bsize = 128,
220 .cpu_setup = __setup_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000221 .oprofile_cpu_type = "ppc64/970",
Anton Blanchard32a33992006-01-09 15:41:31 +1100222 .oprofile_type = POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000223 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100224 { /* Power5 GR */
Stephen Rothwell49209602005-10-12 15:55:09 +1000225 .pvr_mask = 0xffff0000,
226 .pvr_value = 0x003a0000,
227 .cpu_name = "POWER5 (gr)",
228 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100229 .cpu_user_features = COMMON_USER_POWER5,
Stephen Rothwell49209602005-10-12 15:55:09 +1000230 .icache_bsize = 128,
231 .dcache_bsize = 128,
232 .num_pmcs = 6,
233 .cpu_setup = __setup_cpu_power4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000234 .oprofile_cpu_type = "ppc64/power5",
Anton Blanchard32a33992006-01-09 15:41:31 +1100235 .oprofile_type = POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000236 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100237 { /* Power5 GS */
Stephen Rothwell49209602005-10-12 15:55:09 +1000238 .pvr_mask = 0xffff0000,
239 .pvr_value = 0x003b0000,
Anton Blanchard834608f2006-01-09 15:42:30 +1100240 .cpu_name = "POWER5+ (gs)",
Stephen Rothwell49209602005-10-12 15:55:09 +1000241 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100242 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Stephen Rothwell49209602005-10-12 15:55:09 +1000243 .icache_bsize = 128,
244 .dcache_bsize = 128,
245 .num_pmcs = 6,
246 .cpu_setup = __setup_cpu_power4,
Anton Blanchard834608f2006-01-09 15:42:30 +1100247 .oprofile_cpu_type = "ppc64/power5+",
Anton Blanchard32a33992006-01-09 15:41:31 +1100248 .oprofile_type = POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000249 },
Arnd Bergmannc902be72006-01-04 19:55:53 +0000250 { /* Cell Broadband Engine */
Stephen Rothwell49209602005-10-12 15:55:09 +1000251 .pvr_mask = 0xffff0000,
252 .pvr_value = 0x00700000,
253 .cpu_name = "Cell Broadband Engine",
254 .cpu_features = CPU_FTRS_CELL,
255 .cpu_user_features = COMMON_USER_PPC64 |
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100256 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP,
Stephen Rothwell49209602005-10-12 15:55:09 +1000257 .icache_bsize = 128,
258 .dcache_bsize = 128,
259 .cpu_setup = __setup_cpu_be,
260 },
261 { /* default match */
262 .pvr_mask = 0x00000000,
263 .pvr_value = 0x00000000,
264 .cpu_name = "POWER4 (compatible)",
265 .cpu_features = CPU_FTRS_COMPATIBLE,
266 .cpu_user_features = COMMON_USER_PPC64,
267 .icache_bsize = 128,
268 .dcache_bsize = 128,
269 .num_pmcs = 6,
270 .cpu_setup = __setup_cpu_power4,
271 }
272#endif /* CONFIG_PPC64 */
273#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -0700274#if CLASSIC_PPC
Stephen Rothwell49209602005-10-12 15:55:09 +1000275 { /* 601 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700276 .pvr_mask = 0xffff0000,
277 .pvr_value = 0x00010000,
278 .cpu_name = "601",
Kumar Gala10b35d92005-09-23 14:08:58 -0500279 .cpu_features = CPU_FTRS_PPC601,
Stephen Rothwell49209602005-10-12 15:55:09 +1000280 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
Paul Mackerras98599012005-10-22 16:51:34 +1000281 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700282 .icache_bsize = 32,
283 .dcache_bsize = 32,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700284 },
285 { /* 603 */
286 .pvr_mask = 0xffff0000,
287 .pvr_value = 0x00030000,
288 .cpu_name = "603",
Kumar Gala10b35d92005-09-23 14:08:58 -0500289 .cpu_features = CPU_FTRS_603,
Stephen Rothwell49209602005-10-12 15:55:09 +1000290 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700291 .icache_bsize = 32,
292 .dcache_bsize = 32,
293 .cpu_setup = __setup_cpu_603
294 },
295 { /* 603e */
296 .pvr_mask = 0xffff0000,
297 .pvr_value = 0x00060000,
298 .cpu_name = "603e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500299 .cpu_features = CPU_FTRS_603,
Stephen Rothwell49209602005-10-12 15:55:09 +1000300 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700301 .icache_bsize = 32,
302 .dcache_bsize = 32,
303 .cpu_setup = __setup_cpu_603
304 },
305 { /* 603ev */
306 .pvr_mask = 0xffff0000,
307 .pvr_value = 0x00070000,
308 .cpu_name = "603ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500309 .cpu_features = CPU_FTRS_603,
Stephen Rothwell49209602005-10-12 15:55:09 +1000310 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700311 .icache_bsize = 32,
312 .dcache_bsize = 32,
313 .cpu_setup = __setup_cpu_603
314 },
315 { /* 604 */
316 .pvr_mask = 0xffff0000,
317 .pvr_value = 0x00040000,
318 .cpu_name = "604",
Kumar Gala10b35d92005-09-23 14:08:58 -0500319 .cpu_features = CPU_FTRS_604,
Stephen Rothwell49209602005-10-12 15:55:09 +1000320 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700321 .icache_bsize = 32,
322 .dcache_bsize = 32,
323 .num_pmcs = 2,
324 .cpu_setup = __setup_cpu_604
325 },
326 { /* 604e */
327 .pvr_mask = 0xfffff000,
328 .pvr_value = 0x00090000,
329 .cpu_name = "604e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500330 .cpu_features = CPU_FTRS_604,
Stephen Rothwell49209602005-10-12 15:55:09 +1000331 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700332 .icache_bsize = 32,
333 .dcache_bsize = 32,
334 .num_pmcs = 4,
335 .cpu_setup = __setup_cpu_604
336 },
337 { /* 604r */
338 .pvr_mask = 0xffff0000,
339 .pvr_value = 0x00090000,
340 .cpu_name = "604r",
Kumar Gala10b35d92005-09-23 14:08:58 -0500341 .cpu_features = CPU_FTRS_604,
Stephen Rothwell49209602005-10-12 15:55:09 +1000342 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700343 .icache_bsize = 32,
344 .dcache_bsize = 32,
345 .num_pmcs = 4,
346 .cpu_setup = __setup_cpu_604
347 },
348 { /* 604ev */
349 .pvr_mask = 0xffff0000,
350 .pvr_value = 0x000a0000,
351 .cpu_name = "604ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500352 .cpu_features = CPU_FTRS_604,
Stephen Rothwell49209602005-10-12 15:55:09 +1000353 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700354 .icache_bsize = 32,
355 .dcache_bsize = 32,
356 .num_pmcs = 4,
357 .cpu_setup = __setup_cpu_604
358 },
359 { /* 740/750 (0x4202, don't support TAU ?) */
360 .pvr_mask = 0xffffffff,
361 .pvr_value = 0x00084202,
362 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500363 .cpu_features = CPU_FTRS_740_NOTAU,
Stephen Rothwell49209602005-10-12 15:55:09 +1000364 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700365 .icache_bsize = 32,
366 .dcache_bsize = 32,
367 .num_pmcs = 4,
368 .cpu_setup = __setup_cpu_750
369 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700370 { /* 750CX (80100 and 8010x?) */
371 .pvr_mask = 0xfffffff0,
372 .pvr_value = 0x00080100,
373 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500374 .cpu_features = CPU_FTRS_750,
Stephen Rothwell49209602005-10-12 15:55:09 +1000375 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700376 .icache_bsize = 32,
377 .dcache_bsize = 32,
378 .num_pmcs = 4,
379 .cpu_setup = __setup_cpu_750cx
380 },
381 { /* 750CX (82201 and 82202) */
382 .pvr_mask = 0xfffffff0,
383 .pvr_value = 0x00082200,
384 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500385 .cpu_features = CPU_FTRS_750,
Stephen Rothwell49209602005-10-12 15:55:09 +1000386 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700387 .icache_bsize = 32,
388 .dcache_bsize = 32,
389 .num_pmcs = 4,
390 .cpu_setup = __setup_cpu_750cx
391 },
392 { /* 750CXe (82214) */
393 .pvr_mask = 0xfffffff0,
394 .pvr_value = 0x00082210,
395 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500396 .cpu_features = CPU_FTRS_750,
Stephen Rothwell49209602005-10-12 15:55:09 +1000397 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700398 .icache_bsize = 32,
399 .dcache_bsize = 32,
400 .num_pmcs = 4,
401 .cpu_setup = __setup_cpu_750cx
402 },
Arthur Othieno7c316252005-09-03 15:55:52 -0700403 { /* 750CXe "Gekko" (83214) */
404 .pvr_mask = 0xffffffff,
405 .pvr_value = 0x00083214,
406 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500407 .cpu_features = CPU_FTRS_750,
Stephen Rothwell49209602005-10-12 15:55:09 +1000408 .cpu_user_features = COMMON_USER,
Arthur Othieno7c316252005-09-03 15:55:52 -0700409 .icache_bsize = 32,
410 .dcache_bsize = 32,
411 .num_pmcs = 4,
412 .cpu_setup = __setup_cpu_750cx
413 },
Arthur Othienoac1ff042005-09-03 15:55:51 -0700414 { /* 745/755 */
415 .pvr_mask = 0xfffff000,
416 .pvr_value = 0x00083000,
417 .cpu_name = "745/755",
Kumar Gala10b35d92005-09-23 14:08:58 -0500418 .cpu_features = CPU_FTRS_750,
Stephen Rothwell49209602005-10-12 15:55:09 +1000419 .cpu_user_features = COMMON_USER,
Arthur Othienoac1ff042005-09-03 15:55:51 -0700420 .icache_bsize = 32,
421 .dcache_bsize = 32,
422 .num_pmcs = 4,
423 .cpu_setup = __setup_cpu_750
424 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700425 { /* 750FX rev 1.x */
426 .pvr_mask = 0xffffff00,
427 .pvr_value = 0x70000100,
428 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500429 .cpu_features = CPU_FTRS_750FX1,
Stephen Rothwell49209602005-10-12 15:55:09 +1000430 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700431 .icache_bsize = 32,
432 .dcache_bsize = 32,
433 .num_pmcs = 4,
434 .cpu_setup = __setup_cpu_750
435 },
436 { /* 750FX rev 2.0 must disable HID0[DPM] */
437 .pvr_mask = 0xffffffff,
438 .pvr_value = 0x70000200,
439 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500440 .cpu_features = CPU_FTRS_750FX2,
Stephen Rothwell49209602005-10-12 15:55:09 +1000441 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700442 .icache_bsize = 32,
443 .dcache_bsize = 32,
444 .num_pmcs = 4,
445 .cpu_setup = __setup_cpu_750
446 },
447 { /* 750FX (All revs except 2.0) */
448 .pvr_mask = 0xffff0000,
449 .pvr_value = 0x70000000,
450 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500451 .cpu_features = CPU_FTRS_750FX,
Stephen Rothwell49209602005-10-12 15:55:09 +1000452 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700453 .icache_bsize = 32,
454 .dcache_bsize = 32,
455 .num_pmcs = 4,
456 .cpu_setup = __setup_cpu_750fx
457 },
458 { /* 750GX */
459 .pvr_mask = 0xffff0000,
460 .pvr_value = 0x70020000,
461 .cpu_name = "750GX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500462 .cpu_features = CPU_FTRS_750GX,
Stephen Rothwell49209602005-10-12 15:55:09 +1000463 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700464 .icache_bsize = 32,
465 .dcache_bsize = 32,
466 .num_pmcs = 4,
467 .cpu_setup = __setup_cpu_750fx
468 },
469 { /* 740/750 (L2CR bit need fixup for 740) */
470 .pvr_mask = 0xffff0000,
471 .pvr_value = 0x00080000,
472 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500473 .cpu_features = CPU_FTRS_740,
Stephen Rothwell49209602005-10-12 15:55:09 +1000474 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700475 .icache_bsize = 32,
476 .dcache_bsize = 32,
477 .num_pmcs = 4,
478 .cpu_setup = __setup_cpu_750
479 },
480 { /* 7400 rev 1.1 ? (no TAU) */
481 .pvr_mask = 0xffffffff,
482 .pvr_value = 0x000c1101,
483 .cpu_name = "7400 (1.1)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500484 .cpu_features = CPU_FTRS_7400_NOTAU,
Stephen Rothwell49209602005-10-12 15:55:09 +1000485 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700486 .icache_bsize = 32,
487 .dcache_bsize = 32,
488 .num_pmcs = 4,
489 .cpu_setup = __setup_cpu_7400
490 },
491 { /* 7400 */
492 .pvr_mask = 0xffff0000,
493 .pvr_value = 0x000c0000,
494 .cpu_name = "7400",
Kumar Gala10b35d92005-09-23 14:08:58 -0500495 .cpu_features = CPU_FTRS_7400,
Stephen Rothwell49209602005-10-12 15:55:09 +1000496 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700497 .icache_bsize = 32,
498 .dcache_bsize = 32,
499 .num_pmcs = 4,
500 .cpu_setup = __setup_cpu_7400
501 },
502 { /* 7410 */
503 .pvr_mask = 0xffff0000,
504 .pvr_value = 0x800c0000,
505 .cpu_name = "7410",
Kumar Gala10b35d92005-09-23 14:08:58 -0500506 .cpu_features = CPU_FTRS_7400,
Stephen Rothwell49209602005-10-12 15:55:09 +1000507 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700508 .icache_bsize = 32,
509 .dcache_bsize = 32,
510 .num_pmcs = 4,
511 .cpu_setup = __setup_cpu_7410
512 },
513 { /* 7450 2.0 - no doze/nap */
514 .pvr_mask = 0xffffffff,
515 .pvr_value = 0x80000200,
516 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500517 .cpu_features = CPU_FTRS_7450_20,
Stephen Rothwell49209602005-10-12 15:55:09 +1000518 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700519 .icache_bsize = 32,
520 .dcache_bsize = 32,
521 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600522 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600523 .oprofile_cpu_type = "ppc/7450",
Anton Blanchard32a33992006-01-09 15:41:31 +1100524 .oprofile_type = G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700525 },
526 { /* 7450 2.1 */
527 .pvr_mask = 0xffffffff,
528 .pvr_value = 0x80000201,
529 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500530 .cpu_features = CPU_FTRS_7450_21,
Stephen Rothwell49209602005-10-12 15:55:09 +1000531 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700532 .icache_bsize = 32,
533 .dcache_bsize = 32,
534 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600535 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600536 .oprofile_cpu_type = "ppc/7450",
Anton Blanchard32a33992006-01-09 15:41:31 +1100537 .oprofile_type = G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700538 },
539 { /* 7450 2.3 and newer */
540 .pvr_mask = 0xffff0000,
541 .pvr_value = 0x80000000,
542 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500543 .cpu_features = CPU_FTRS_7450_23,
Stephen Rothwell49209602005-10-12 15:55:09 +1000544 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700545 .icache_bsize = 32,
546 .dcache_bsize = 32,
547 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600548 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600549 .oprofile_cpu_type = "ppc/7450",
Anton Blanchard32a33992006-01-09 15:41:31 +1100550 .oprofile_type = G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700551 },
552 { /* 7455 rev 1.x */
553 .pvr_mask = 0xffffff00,
554 .pvr_value = 0x80010100,
555 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500556 .cpu_features = CPU_FTRS_7455_1,
Stephen Rothwell49209602005-10-12 15:55:09 +1000557 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700558 .icache_bsize = 32,
559 .dcache_bsize = 32,
560 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600561 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600562 .oprofile_cpu_type = "ppc/7450",
Anton Blanchard32a33992006-01-09 15:41:31 +1100563 .oprofile_type = G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700564 },
565 { /* 7455 rev 2.0 */
566 .pvr_mask = 0xffffffff,
567 .pvr_value = 0x80010200,
568 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500569 .cpu_features = CPU_FTRS_7455_20,
Stephen Rothwell49209602005-10-12 15:55:09 +1000570 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700571 .icache_bsize = 32,
572 .dcache_bsize = 32,
573 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600574 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600575 .oprofile_cpu_type = "ppc/7450",
Anton Blanchard32a33992006-01-09 15:41:31 +1100576 .oprofile_type = G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700577 },
578 { /* 7455 others */
579 .pvr_mask = 0xffff0000,
580 .pvr_value = 0x80010000,
581 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500582 .cpu_features = CPU_FTRS_7455,
Stephen Rothwell49209602005-10-12 15:55:09 +1000583 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700584 .icache_bsize = 32,
585 .dcache_bsize = 32,
586 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600587 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600588 .oprofile_cpu_type = "ppc/7450",
Anton Blanchard32a33992006-01-09 15:41:31 +1100589 .oprofile_type = G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700590 },
591 { /* 7447/7457 Rev 1.0 */
592 .pvr_mask = 0xffffffff,
593 .pvr_value = 0x80020100,
594 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500595 .cpu_features = CPU_FTRS_7447_10,
Stephen Rothwell49209602005-10-12 15:55:09 +1000596 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700597 .icache_bsize = 32,
598 .dcache_bsize = 32,
599 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600600 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600601 .oprofile_cpu_type = "ppc/7450",
Anton Blanchard32a33992006-01-09 15:41:31 +1100602 .oprofile_type = G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700603 },
604 { /* 7447/7457 Rev 1.1 */
605 .pvr_mask = 0xffffffff,
606 .pvr_value = 0x80020101,
607 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500608 .cpu_features = CPU_FTRS_7447_10,
Stephen Rothwell49209602005-10-12 15:55:09 +1000609 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700610 .icache_bsize = 32,
611 .dcache_bsize = 32,
612 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600613 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600614 .oprofile_cpu_type = "ppc/7450",
Anton Blanchard32a33992006-01-09 15:41:31 +1100615 .oprofile_type = G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700616 },
617 { /* 7447/7457 Rev 1.2 and later */
618 .pvr_mask = 0xffff0000,
619 .pvr_value = 0x80020000,
620 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500621 .cpu_features = CPU_FTRS_7447,
Stephen Rothwell49209602005-10-12 15:55:09 +1000622 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700623 .icache_bsize = 32,
624 .dcache_bsize = 32,
625 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600626 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600627 .oprofile_cpu_type = "ppc/7450",
Anton Blanchard32a33992006-01-09 15:41:31 +1100628 .oprofile_type = G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700629 },
630 { /* 7447A */
631 .pvr_mask = 0xffff0000,
632 .pvr_value = 0x80030000,
633 .cpu_name = "7447A",
Kumar Gala10b35d92005-09-23 14:08:58 -0500634 .cpu_features = CPU_FTRS_7447A,
Stephen Rothwell49209602005-10-12 15:55:09 +1000635 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700636 .icache_bsize = 32,
637 .dcache_bsize = 32,
638 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600639 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600640 .oprofile_cpu_type = "ppc/7450",
Anton Blanchard32a33992006-01-09 15:41:31 +1100641 .oprofile_type = G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700642 },
Kumar Galabbde6302005-09-03 15:55:55 -0700643 { /* 7448 */
644 .pvr_mask = 0xffff0000,
645 .pvr_value = 0x80040000,
646 .cpu_name = "7448",
Kumar Gala10b35d92005-09-23 14:08:58 -0500647 .cpu_features = CPU_FTRS_7447A,
Stephen Rothwell49209602005-10-12 15:55:09 +1000648 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP,
Kumar Galabbde6302005-09-03 15:55:55 -0700649 .icache_bsize = 32,
650 .dcache_bsize = 32,
651 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600652 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600653 .oprofile_cpu_type = "ppc/7450",
Anton Blanchard32a33992006-01-09 15:41:31 +1100654 .oprofile_type = G4,
Kumar Galabbde6302005-09-03 15:55:55 -0700655 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700656 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
657 .pvr_mask = 0x7fff0000,
658 .pvr_value = 0x00810000,
659 .cpu_name = "82xx",
Kumar Gala10b35d92005-09-23 14:08:58 -0500660 .cpu_features = CPU_FTRS_82XX,
Stephen Rothwell49209602005-10-12 15:55:09 +1000661 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700662 .icache_bsize = 32,
663 .dcache_bsize = 32,
664 .cpu_setup = __setup_cpu_603
665 },
666 { /* All G2_LE (603e core, plus some) have the same pvr */
667 .pvr_mask = 0x7fff0000,
668 .pvr_value = 0x00820000,
669 .cpu_name = "G2_LE",
Kumar Gala10b35d92005-09-23 14:08:58 -0500670 .cpu_features = CPU_FTRS_G2_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000671 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700672 .icache_bsize = 32,
673 .dcache_bsize = 32,
674 .cpu_setup = __setup_cpu_603
675 },
676 { /* e300 (a 603e core, plus some) on 83xx */
677 .pvr_mask = 0x7fff0000,
678 .pvr_value = 0x00830000,
679 .cpu_name = "e300",
Kumar Gala10b35d92005-09-23 14:08:58 -0500680 .cpu_features = CPU_FTRS_E300,
Stephen Rothwell49209602005-10-12 15:55:09 +1000681 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700682 .icache_bsize = 32,
683 .dcache_bsize = 32,
684 .cpu_setup = __setup_cpu_603
685 },
686 { /* default match, we assume split I/D cache & TB (non-601)... */
687 .pvr_mask = 0x00000000,
688 .pvr_value = 0x00000000,
689 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500690 .cpu_features = CPU_FTRS_CLASSIC32,
Stephen Rothwell49209602005-10-12 15:55:09 +1000691 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700692 .icache_bsize = 32,
693 .dcache_bsize = 32,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700694 },
695#endif /* CLASSIC_PPC */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700696#ifdef CONFIG_8xx
697 { /* 8xx */
698 .pvr_mask = 0xffff0000,
699 .pvr_value = 0x00500000,
700 .cpu_name = "8xx",
701 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
702 * if the 8xx code is there.... */
Kumar Gala10b35d92005-09-23 14:08:58 -0500703 .cpu_features = CPU_FTRS_8XX,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700704 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
705 .icache_bsize = 16,
706 .dcache_bsize = 16,
707 },
708#endif /* CONFIG_8xx */
709#ifdef CONFIG_40x
710 { /* 403GC */
711 .pvr_mask = 0xffffff00,
712 .pvr_value = 0x00200200,
713 .cpu_name = "403GC",
Kumar Gala10b35d92005-09-23 14:08:58 -0500714 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700715 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
716 .icache_bsize = 16,
717 .dcache_bsize = 16,
718 },
719 { /* 403GCX */
720 .pvr_mask = 0xffffff00,
721 .pvr_value = 0x00201400,
722 .cpu_name = "403GCX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500723 .cpu_features = CPU_FTRS_40X,
Paul Mackerras98599012005-10-22 16:51:34 +1000724 .cpu_user_features = PPC_FEATURE_32 |
725 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700726 .icache_bsize = 16,
727 .dcache_bsize = 16,
728 },
729 { /* 403G ?? */
730 .pvr_mask = 0xffff0000,
731 .pvr_value = 0x00200000,
732 .cpu_name = "403G ??",
Kumar Gala10b35d92005-09-23 14:08:58 -0500733 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700734 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
735 .icache_bsize = 16,
736 .dcache_bsize = 16,
737 },
738 { /* 405GP */
739 .pvr_mask = 0xffff0000,
740 .pvr_value = 0x40110000,
741 .cpu_name = "405GP",
Kumar Gala10b35d92005-09-23 14:08:58 -0500742 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700743 .cpu_user_features = PPC_FEATURE_32 |
744 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
745 .icache_bsize = 32,
746 .dcache_bsize = 32,
747 },
748 { /* STB 03xxx */
749 .pvr_mask = 0xffff0000,
750 .pvr_value = 0x40130000,
751 .cpu_name = "STB03xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -0500752 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700753 .cpu_user_features = PPC_FEATURE_32 |
754 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
755 .icache_bsize = 32,
756 .dcache_bsize = 32,
757 },
758 { /* STB 04xxx */
759 .pvr_mask = 0xffff0000,
760 .pvr_value = 0x41810000,
761 .cpu_name = "STB04xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -0500762 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700763 .cpu_user_features = PPC_FEATURE_32 |
764 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
765 .icache_bsize = 32,
766 .dcache_bsize = 32,
767 },
768 { /* NP405L */
769 .pvr_mask = 0xffff0000,
770 .pvr_value = 0x41610000,
771 .cpu_name = "NP405L",
Kumar Gala10b35d92005-09-23 14:08:58 -0500772 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700773 .cpu_user_features = PPC_FEATURE_32 |
774 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
775 .icache_bsize = 32,
776 .dcache_bsize = 32,
777 },
778 { /* NP4GS3 */
779 .pvr_mask = 0xffff0000,
780 .pvr_value = 0x40B10000,
781 .cpu_name = "NP4GS3",
Kumar Gala10b35d92005-09-23 14:08:58 -0500782 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700783 .cpu_user_features = PPC_FEATURE_32 |
784 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
785 .icache_bsize = 32,
786 .dcache_bsize = 32,
787 },
788 { /* NP405H */
789 .pvr_mask = 0xffff0000,
790 .pvr_value = 0x41410000,
791 .cpu_name = "NP405H",
Kumar Gala10b35d92005-09-23 14:08:58 -0500792 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700793 .cpu_user_features = PPC_FEATURE_32 |
794 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
795 .icache_bsize = 32,
796 .dcache_bsize = 32,
797 },
798 { /* 405GPr */
799 .pvr_mask = 0xffff0000,
800 .pvr_value = 0x50910000,
801 .cpu_name = "405GPr",
Kumar Gala10b35d92005-09-23 14:08:58 -0500802 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700803 .cpu_user_features = PPC_FEATURE_32 |
804 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
805 .icache_bsize = 32,
806 .dcache_bsize = 32,
807 },
808 { /* STBx25xx */
809 .pvr_mask = 0xffff0000,
810 .pvr_value = 0x51510000,
811 .cpu_name = "STBx25xx",
Kumar Gala10b35d92005-09-23 14:08:58 -0500812 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700813 .cpu_user_features = PPC_FEATURE_32 |
814 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
815 .icache_bsize = 32,
816 .dcache_bsize = 32,
817 },
818 { /* 405LP */
819 .pvr_mask = 0xffff0000,
820 .pvr_value = 0x41F10000,
821 .cpu_name = "405LP",
Kumar Gala10b35d92005-09-23 14:08:58 -0500822 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700823 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
824 .icache_bsize = 32,
825 .dcache_bsize = 32,
826 },
827 { /* Xilinx Virtex-II Pro */
828 .pvr_mask = 0xffff0000,
829 .pvr_value = 0x20010000,
830 .cpu_name = "Virtex-II Pro",
Kumar Gala10b35d92005-09-23 14:08:58 -0500831 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700832 .cpu_user_features = PPC_FEATURE_32 |
833 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
834 .icache_bsize = 32,
835 .dcache_bsize = 32,
836 },
Eugene Suroveginad95d602005-06-07 13:22:09 -0700837 { /* 405EP */
838 .pvr_mask = 0xffff0000,
839 .pvr_value = 0x51210000,
840 .cpu_name = "405EP",
Kumar Gala10b35d92005-09-23 14:08:58 -0500841 .cpu_features = CPU_FTRS_40X,
Eugene Suroveginad95d602005-06-07 13:22:09 -0700842 .cpu_user_features = PPC_FEATURE_32 |
843 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
844 .icache_bsize = 32,
845 .dcache_bsize = 32,
846 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700847
848#endif /* CONFIG_40x */
849#ifdef CONFIG_44x
Matt Porterc9cf73a2005-07-31 22:34:52 -0700850 {
851 .pvr_mask = 0xf0000fff,
852 .pvr_value = 0x40000850,
853 .cpu_name = "440EP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -0500854 .cpu_features = CPU_FTRS_44X,
Stephen Rothwell49209602005-10-12 15:55:09 +1000855 .cpu_user_features = COMMON_USER, /* 440EP has an FPU */
Matt Porterc9cf73a2005-07-31 22:34:52 -0700856 .icache_bsize = 32,
857 .dcache_bsize = 32,
858 },
859 {
860 .pvr_mask = 0xf0000fff,
861 .pvr_value = 0x400008d3,
862 .cpu_name = "440EP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -0500863 .cpu_features = CPU_FTRS_44X,
Stephen Rothwell49209602005-10-12 15:55:09 +1000864 .cpu_user_features = COMMON_USER, /* 440EP has an FPU */
Matt Porterc9cf73a2005-07-31 22:34:52 -0700865 .icache_bsize = 32,
866 .dcache_bsize = 32,
867 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000868 { /* 440GP Rev. B */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700869 .pvr_mask = 0xf0000fff,
870 .pvr_value = 0x40000440,
871 .cpu_name = "440GP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -0500872 .cpu_features = CPU_FTRS_44X,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700873 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
874 .icache_bsize = 32,
875 .dcache_bsize = 32,
876 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000877 { /* 440GP Rev. C */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700878 .pvr_mask = 0xf0000fff,
879 .pvr_value = 0x40000481,
880 .cpu_name = "440GP Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -0500881 .cpu_features = CPU_FTRS_44X,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700882 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
883 .icache_bsize = 32,
884 .dcache_bsize = 32,
885 },
886 { /* 440GX Rev. A */
887 .pvr_mask = 0xf0000fff,
888 .pvr_value = 0x50000850,
889 .cpu_name = "440GX Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -0500890 .cpu_features = CPU_FTRS_44X,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700891 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
892 .icache_bsize = 32,
893 .dcache_bsize = 32,
894 },
895 { /* 440GX Rev. B */
896 .pvr_mask = 0xf0000fff,
897 .pvr_value = 0x50000851,
898 .cpu_name = "440GX Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -0500899 .cpu_features = CPU_FTRS_44X,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700900 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
901 .icache_bsize = 32,
902 .dcache_bsize = 32,
903 },
904 { /* 440GX Rev. C */
905 .pvr_mask = 0xf0000fff,
906 .pvr_value = 0x50000892,
907 .cpu_name = "440GX Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -0500908 .cpu_features = CPU_FTRS_44X,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700909 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
910 .icache_bsize = 32,
911 .dcache_bsize = 32,
912 },
Eugene Surovegin9149fb32005-09-03 15:55:40 -0700913 { /* 440GX Rev. F */
914 .pvr_mask = 0xf0000fff,
915 .pvr_value = 0x50000894,
916 .cpu_name = "440GX Rev. F",
Kumar Gala10b35d92005-09-23 14:08:58 -0500917 .cpu_features = CPU_FTRS_44X,
Eugene Surovegin9149fb32005-09-03 15:55:40 -0700918 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
919 .icache_bsize = 32,
920 .dcache_bsize = 32,
921 },
Matt Porter656de7e2005-09-03 15:55:42 -0700922 { /* 440SP Rev. A */
923 .pvr_mask = 0xff000fff,
924 .pvr_value = 0x53000891,
925 .cpu_name = "440SP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -0500926 .cpu_features = CPU_FTRS_44X,
Matt Porter656de7e2005-09-03 15:55:42 -0700927 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
928 .icache_bsize = 32,
929 .dcache_bsize = 32,
930 },
Roland Dreierb0f7b8b2005-11-07 00:58:13 -0800931 { /* 440SPe Rev. A */
932 .pvr_mask = 0xff000fff,
933 .pvr_value = 0x53000890,
934 .cpu_name = "440SPe Rev. A",
935 .cpu_features = CPU_FTR_SPLIT_ID_CACHE |
936 CPU_FTR_USE_TB,
937 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
938 .icache_bsize = 32,
939 .dcache_bsize = 32,
940 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700941#endif /* CONFIG_44x */
Kumar Gala33d9e9b2005-06-25 14:54:37 -0700942#ifdef CONFIG_FSL_BOOKE
Stephen Rothwell49209602005-10-12 15:55:09 +1000943 { /* e200z5 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -0700944 .pvr_mask = 0xfff00000,
945 .pvr_value = 0x81000000,
946 .cpu_name = "e200z5",
947 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -0500948 .cpu_features = CPU_FTRS_E200,
Kumar Gala33d9e9b2005-06-25 14:54:37 -0700949 .cpu_user_features = PPC_FEATURE_32 |
950 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_EFP_SINGLE |
951 PPC_FEATURE_UNIFIED_CACHE,
952 .dcache_bsize = 32,
953 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000954 { /* e200z6 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -0700955 .pvr_mask = 0xfff00000,
956 .pvr_value = 0x81100000,
957 .cpu_name = "e200z6",
958 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -0500959 .cpu_features = CPU_FTRS_E200,
Kumar Gala33d9e9b2005-06-25 14:54:37 -0700960 .cpu_user_features = PPC_FEATURE_32 |
961 PPC_FEATURE_HAS_MMU | PPC_FEATURE_SPE_COMP |
962 PPC_FEATURE_HAS_EFP_SINGLE |
963 PPC_FEATURE_UNIFIED_CACHE,
964 .dcache_bsize = 32,
965 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000966 { /* e500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700967 .pvr_mask = 0xffff0000,
968 .pvr_value = 0x80200000,
969 .cpu_name = "e500",
970 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -0500971 .cpu_features = CPU_FTRS_E500,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700972 .cpu_user_features = PPC_FEATURE_32 |
973 PPC_FEATURE_HAS_MMU | PPC_FEATURE_SPE_COMP |
974 PPC_FEATURE_HAS_EFP_SINGLE,
975 .icache_bsize = 32,
976 .dcache_bsize = 32,
977 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600978 .oprofile_cpu_type = "ppc/e500",
Anton Blanchard32a33992006-01-09 15:41:31 +1100979 .oprofile_type = BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700980 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000981 { /* e500v2 */
Kumar Gala5b37b702005-06-21 17:15:18 -0700982 .pvr_mask = 0xffff0000,
983 .pvr_value = 0x80210000,
984 .cpu_name = "e500v2",
985 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -0500986 .cpu_features = CPU_FTRS_E500_2,
Kumar Gala5b37b702005-06-21 17:15:18 -0700987 .cpu_user_features = PPC_FEATURE_32 |
988 PPC_FEATURE_HAS_MMU | PPC_FEATURE_SPE_COMP |
989 PPC_FEATURE_HAS_EFP_SINGLE | PPC_FEATURE_HAS_EFP_DOUBLE,
990 .icache_bsize = 32,
991 .dcache_bsize = 32,
992 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600993 .oprofile_cpu_type = "ppc/e500",
Anton Blanchard32a33992006-01-09 15:41:31 +1100994 .oprofile_type = BOOKE,
Kumar Gala5b37b702005-06-21 17:15:18 -0700995 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700996#endif
997#if !CLASSIC_PPC
998 { /* default match */
999 .pvr_mask = 0x00000000,
1000 .pvr_value = 0x00000000,
1001 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -05001002 .cpu_features = CPU_FTRS_GENERIC_32,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001003 .cpu_user_features = PPC_FEATURE_32,
1004 .icache_bsize = 32,
1005 .dcache_bsize = 32,
1006 }
1007#endif /* !CLASSIC_PPC */
Stephen Rothwell49209602005-10-12 15:55:09 +10001008#endif /* CONFIG_PPC32 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001009};