Initial commit
[wrt350n-kernel.git] / arch / powerpc / kernel / cputable.c
blob2a8f5cc5184f0c02641b7ba78aad7ba3c95367c4
1 /*
2 * Copyright (C) 2001 Ben. Herrenschmidt (benh@kernel.crashing.org)
4 * Modifications for ppc64:
5 * Copyright (C) 2003 Dave Engebretsen <engebret@us.ibm.com>
7 * 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.
13 #include <linux/string.h>
14 #include <linux/sched.h>
15 #include <linux/threads.h>
16 #include <linux/init.h>
17 #include <linux/module.h>
19 #include <asm/oprofile_impl.h>
20 #include <asm/cputable.h>
21 #include <asm/prom.h> /* for PTRRELOC on ARCH=ppc */
23 struct cpu_spec* cur_cpu_spec = NULL;
24 EXPORT_SYMBOL(cur_cpu_spec);
26 /* 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
33 #ifdef CONFIG_PPC32
34 extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
35 extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
36 extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
37 extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
38 extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
39 extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
40 extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
41 extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
42 extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
43 extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
44 extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
45 extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
46 extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
47 #endif /* CONFIG_PPC32 */
48 #ifdef CONFIG_PPC64
49 extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
50 extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
51 extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
52 extern void __restore_cpu_pa6t(void);
53 extern void __restore_cpu_ppc970(void);
54 #endif /* CONFIG_PPC64 */
56 /* This table only contains "desktop" CPUs, it need to be filled with embedded
57 * ones as well...
59 #define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
60 PPC_FEATURE_HAS_MMU)
61 #define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
62 #define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
63 #define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
64 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
65 #define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
66 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
67 #define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
68 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
69 PPC_FEATURE_TRUE_LE)
70 #define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
71 PPC_FEATURE_TRUE_LE | \
72 PPC_FEATURE_HAS_ALTIVEC_COMP)
73 #define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
74 PPC_FEATURE_BOOKE)
76 static struct cpu_spec __initdata cpu_specs[] = {
77 #ifdef CONFIG_PPC64
78 { /* Power3 */
79 .pvr_mask = 0xffff0000,
80 .pvr_value = 0x00400000,
81 .cpu_name = "POWER3 (630)",
82 .cpu_features = CPU_FTRS_POWER3,
83 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
84 .icache_bsize = 128,
85 .dcache_bsize = 128,
86 .num_pmcs = 8,
87 .pmc_type = PPC_PMC_IBM,
88 .oprofile_cpu_type = "ppc64/power3",
89 .oprofile_type = PPC_OPROFILE_RS64,
90 .machine_check = machine_check_generic,
91 .platform = "power3",
93 { /* Power3+ */
94 .pvr_mask = 0xffff0000,
95 .pvr_value = 0x00410000,
96 .cpu_name = "POWER3 (630+)",
97 .cpu_features = CPU_FTRS_POWER3,
98 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
99 .icache_bsize = 128,
100 .dcache_bsize = 128,
101 .num_pmcs = 8,
102 .pmc_type = PPC_PMC_IBM,
103 .oprofile_cpu_type = "ppc64/power3",
104 .oprofile_type = PPC_OPROFILE_RS64,
105 .machine_check = machine_check_generic,
106 .platform = "power3",
108 { /* Northstar */
109 .pvr_mask = 0xffff0000,
110 .pvr_value = 0x00330000,
111 .cpu_name = "RS64-II (northstar)",
112 .cpu_features = CPU_FTRS_RS64,
113 .cpu_user_features = COMMON_USER_PPC64,
114 .icache_bsize = 128,
115 .dcache_bsize = 128,
116 .num_pmcs = 8,
117 .pmc_type = PPC_PMC_IBM,
118 .oprofile_cpu_type = "ppc64/rs64",
119 .oprofile_type = PPC_OPROFILE_RS64,
120 .machine_check = machine_check_generic,
121 .platform = "rs64",
123 { /* Pulsar */
124 .pvr_mask = 0xffff0000,
125 .pvr_value = 0x00340000,
126 .cpu_name = "RS64-III (pulsar)",
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 .pmc_type = PPC_PMC_IBM,
133 .oprofile_cpu_type = "ppc64/rs64",
134 .oprofile_type = PPC_OPROFILE_RS64,
135 .machine_check = machine_check_generic,
136 .platform = "rs64",
138 { /* I-star */
139 .pvr_mask = 0xffff0000,
140 .pvr_value = 0x00360000,
141 .cpu_name = "RS64-III (icestar)",
142 .cpu_features = CPU_FTRS_RS64,
143 .cpu_user_features = COMMON_USER_PPC64,
144 .icache_bsize = 128,
145 .dcache_bsize = 128,
146 .num_pmcs = 8,
147 .pmc_type = PPC_PMC_IBM,
148 .oprofile_cpu_type = "ppc64/rs64",
149 .oprofile_type = PPC_OPROFILE_RS64,
150 .machine_check = machine_check_generic,
151 .platform = "rs64",
153 { /* S-star */
154 .pvr_mask = 0xffff0000,
155 .pvr_value = 0x00370000,
156 .cpu_name = "RS64-IV (sstar)",
157 .cpu_features = CPU_FTRS_RS64,
158 .cpu_user_features = COMMON_USER_PPC64,
159 .icache_bsize = 128,
160 .dcache_bsize = 128,
161 .num_pmcs = 8,
162 .pmc_type = PPC_PMC_IBM,
163 .oprofile_cpu_type = "ppc64/rs64",
164 .oprofile_type = PPC_OPROFILE_RS64,
165 .machine_check = machine_check_generic,
166 .platform = "rs64",
168 { /* Power4 */
169 .pvr_mask = 0xffff0000,
170 .pvr_value = 0x00350000,
171 .cpu_name = "POWER4 (gp)",
172 .cpu_features = CPU_FTRS_POWER4,
173 .cpu_user_features = COMMON_USER_POWER4,
174 .icache_bsize = 128,
175 .dcache_bsize = 128,
176 .num_pmcs = 8,
177 .pmc_type = PPC_PMC_IBM,
178 .oprofile_cpu_type = "ppc64/power4",
179 .oprofile_type = PPC_OPROFILE_POWER4,
180 .machine_check = machine_check_generic,
181 .platform = "power4",
183 { /* Power4+ */
184 .pvr_mask = 0xffff0000,
185 .pvr_value = 0x00380000,
186 .cpu_name = "POWER4+ (gq)",
187 .cpu_features = CPU_FTRS_POWER4,
188 .cpu_user_features = COMMON_USER_POWER4,
189 .icache_bsize = 128,
190 .dcache_bsize = 128,
191 .num_pmcs = 8,
192 .pmc_type = PPC_PMC_IBM,
193 .oprofile_cpu_type = "ppc64/power4",
194 .oprofile_type = PPC_OPROFILE_POWER4,
195 .machine_check = machine_check_generic,
196 .platform = "power4",
198 { /* PPC970 */
199 .pvr_mask = 0xffff0000,
200 .pvr_value = 0x00390000,
201 .cpu_name = "PPC970",
202 .cpu_features = CPU_FTRS_PPC970,
203 .cpu_user_features = COMMON_USER_POWER4 |
204 PPC_FEATURE_HAS_ALTIVEC_COMP,
205 .icache_bsize = 128,
206 .dcache_bsize = 128,
207 .num_pmcs = 8,
208 .pmc_type = PPC_PMC_IBM,
209 .cpu_setup = __setup_cpu_ppc970,
210 .cpu_restore = __restore_cpu_ppc970,
211 .oprofile_cpu_type = "ppc64/970",
212 .oprofile_type = PPC_OPROFILE_POWER4,
213 .machine_check = machine_check_generic,
214 .platform = "ppc970",
216 { /* PPC970FX */
217 .pvr_mask = 0xffff0000,
218 .pvr_value = 0x003c0000,
219 .cpu_name = "PPC970FX",
220 .cpu_features = CPU_FTRS_PPC970,
221 .cpu_user_features = COMMON_USER_POWER4 |
222 PPC_FEATURE_HAS_ALTIVEC_COMP,
223 .icache_bsize = 128,
224 .dcache_bsize = 128,
225 .num_pmcs = 8,
226 .pmc_type = PPC_PMC_IBM,
227 .cpu_setup = __setup_cpu_ppc970,
228 .cpu_restore = __restore_cpu_ppc970,
229 .oprofile_cpu_type = "ppc64/970",
230 .oprofile_type = PPC_OPROFILE_POWER4,
231 .machine_check = machine_check_generic,
232 .platform = "ppc970",
234 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
235 .pvr_mask = 0xffffffff,
236 .pvr_value = 0x00440100,
237 .cpu_name = "PPC970MP",
238 .cpu_features = CPU_FTRS_PPC970,
239 .cpu_user_features = COMMON_USER_POWER4 |
240 PPC_FEATURE_HAS_ALTIVEC_COMP,
241 .icache_bsize = 128,
242 .dcache_bsize = 128,
243 .num_pmcs = 8,
244 .pmc_type = PPC_PMC_IBM,
245 .cpu_setup = __setup_cpu_ppc970,
246 .cpu_restore = __restore_cpu_ppc970,
247 .oprofile_cpu_type = "ppc64/970MP",
248 .oprofile_type = PPC_OPROFILE_POWER4,
249 .machine_check = machine_check_generic,
250 .platform = "ppc970",
252 { /* PPC970MP */
253 .pvr_mask = 0xffff0000,
254 .pvr_value = 0x00440000,
255 .cpu_name = "PPC970MP",
256 .cpu_features = CPU_FTRS_PPC970,
257 .cpu_user_features = COMMON_USER_POWER4 |
258 PPC_FEATURE_HAS_ALTIVEC_COMP,
259 .icache_bsize = 128,
260 .dcache_bsize = 128,
261 .num_pmcs = 8,
262 .pmc_type = PPC_PMC_IBM,
263 .cpu_setup = __setup_cpu_ppc970MP,
264 .cpu_restore = __restore_cpu_ppc970,
265 .oprofile_cpu_type = "ppc64/970MP",
266 .oprofile_type = PPC_OPROFILE_POWER4,
267 .machine_check = machine_check_generic,
268 .platform = "ppc970",
270 { /* PPC970GX */
271 .pvr_mask = 0xffff0000,
272 .pvr_value = 0x00450000,
273 .cpu_name = "PPC970GX",
274 .cpu_features = CPU_FTRS_PPC970,
275 .cpu_user_features = COMMON_USER_POWER4 |
276 PPC_FEATURE_HAS_ALTIVEC_COMP,
277 .icache_bsize = 128,
278 .dcache_bsize = 128,
279 .num_pmcs = 8,
280 .pmc_type = PPC_PMC_IBM,
281 .cpu_setup = __setup_cpu_ppc970,
282 .oprofile_cpu_type = "ppc64/970",
283 .oprofile_type = PPC_OPROFILE_POWER4,
284 .machine_check = machine_check_generic,
285 .platform = "ppc970",
287 { /* Power5 GR */
288 .pvr_mask = 0xffff0000,
289 .pvr_value = 0x003a0000,
290 .cpu_name = "POWER5 (gr)",
291 .cpu_features = CPU_FTRS_POWER5,
292 .cpu_user_features = COMMON_USER_POWER5,
293 .icache_bsize = 128,
294 .dcache_bsize = 128,
295 .num_pmcs = 6,
296 .pmc_type = PPC_PMC_IBM,
297 .oprofile_cpu_type = "ppc64/power5",
298 .oprofile_type = PPC_OPROFILE_POWER4,
299 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
300 * and above but only works on POWER5 and above
302 .oprofile_mmcra_sihv = MMCRA_SIHV,
303 .oprofile_mmcra_sipr = MMCRA_SIPR,
304 .machine_check = machine_check_generic,
305 .platform = "power5",
307 { /* Power5++ */
308 .pvr_mask = 0xffffff00,
309 .pvr_value = 0x003b0300,
310 .cpu_name = "POWER5+ (gs)",
311 .cpu_features = CPU_FTRS_POWER5,
312 .cpu_user_features = COMMON_USER_POWER5_PLUS,
313 .icache_bsize = 128,
314 .dcache_bsize = 128,
315 .num_pmcs = 6,
316 .oprofile_cpu_type = "ppc64/power5++",
317 .oprofile_type = PPC_OPROFILE_POWER4,
318 .oprofile_mmcra_sihv = MMCRA_SIHV,
319 .oprofile_mmcra_sipr = MMCRA_SIPR,
320 .machine_check = machine_check_generic,
321 .platform = "power5+",
323 { /* Power5 GS */
324 .pvr_mask = 0xffff0000,
325 .pvr_value = 0x003b0000,
326 .cpu_name = "POWER5+ (gs)",
327 .cpu_features = CPU_FTRS_POWER5,
328 .cpu_user_features = COMMON_USER_POWER5_PLUS,
329 .icache_bsize = 128,
330 .dcache_bsize = 128,
331 .num_pmcs = 6,
332 .pmc_type = PPC_PMC_IBM,
333 .oprofile_cpu_type = "ppc64/power5+",
334 .oprofile_type = PPC_OPROFILE_POWER4,
335 .oprofile_mmcra_sihv = MMCRA_SIHV,
336 .oprofile_mmcra_sipr = MMCRA_SIPR,
337 .machine_check = machine_check_generic,
338 .platform = "power5+",
340 { /* POWER6 in P5+ mode; 2.04-compliant processor */
341 .pvr_mask = 0xffffffff,
342 .pvr_value = 0x0f000001,
343 .cpu_name = "POWER5+",
344 .cpu_features = CPU_FTRS_POWER5,
345 .cpu_user_features = COMMON_USER_POWER5_PLUS,
346 .icache_bsize = 128,
347 .dcache_bsize = 128,
348 .machine_check = machine_check_generic,
349 .platform = "power5+",
351 { /* Power6 */
352 .pvr_mask = 0xffff0000,
353 .pvr_value = 0x003e0000,
354 .cpu_name = "POWER6 (raw)",
355 .cpu_features = CPU_FTRS_POWER6,
356 .cpu_user_features = COMMON_USER_POWER6 |
357 PPC_FEATURE_POWER6_EXT,
358 .icache_bsize = 128,
359 .dcache_bsize = 128,
360 .num_pmcs = 6,
361 .pmc_type = PPC_PMC_IBM,
362 .oprofile_cpu_type = "ppc64/power6",
363 .oprofile_type = PPC_OPROFILE_POWER4,
364 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
365 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
366 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
367 POWER6_MMCRA_OTHER,
368 .machine_check = machine_check_generic,
369 .platform = "power6x",
371 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
372 .pvr_mask = 0xffffffff,
373 .pvr_value = 0x0f000002,
374 .cpu_name = "POWER6 (architected)",
375 .cpu_features = CPU_FTRS_POWER6,
376 .cpu_user_features = COMMON_USER_POWER6,
377 .icache_bsize = 128,
378 .dcache_bsize = 128,
379 .machine_check = machine_check_generic,
380 .platform = "power6",
382 { /* Cell Broadband Engine */
383 .pvr_mask = 0xffff0000,
384 .pvr_value = 0x00700000,
385 .cpu_name = "Cell Broadband Engine",
386 .cpu_features = CPU_FTRS_CELL,
387 .cpu_user_features = COMMON_USER_PPC64 |
388 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
389 PPC_FEATURE_SMT,
390 .icache_bsize = 128,
391 .dcache_bsize = 128,
392 .num_pmcs = 4,
393 .pmc_type = PPC_PMC_IBM,
394 .oprofile_cpu_type = "ppc64/cell-be",
395 .oprofile_type = PPC_OPROFILE_CELL,
396 .machine_check = machine_check_generic,
397 .platform = "ppc-cell-be",
399 { /* PA Semi PA6T */
400 .pvr_mask = 0x7fff0000,
401 .pvr_value = 0x00900000,
402 .cpu_name = "PA6T",
403 .cpu_features = CPU_FTRS_PA6T,
404 .cpu_user_features = COMMON_USER_PA6T,
405 .icache_bsize = 64,
406 .dcache_bsize = 64,
407 .num_pmcs = 6,
408 .pmc_type = PPC_PMC_PA6T,
409 .cpu_setup = __setup_cpu_pa6t,
410 .cpu_restore = __restore_cpu_pa6t,
411 .oprofile_cpu_type = "ppc64/pa6t",
412 .oprofile_type = PPC_OPROFILE_PA6T,
413 .machine_check = machine_check_generic,
414 .platform = "pa6t",
416 { /* default match */
417 .pvr_mask = 0x00000000,
418 .pvr_value = 0x00000000,
419 .cpu_name = "POWER4 (compatible)",
420 .cpu_features = CPU_FTRS_COMPATIBLE,
421 .cpu_user_features = COMMON_USER_PPC64,
422 .icache_bsize = 128,
423 .dcache_bsize = 128,
424 .num_pmcs = 6,
425 .pmc_type = PPC_PMC_IBM,
426 .machine_check = machine_check_generic,
427 .platform = "power4",
429 #endif /* CONFIG_PPC64 */
430 #ifdef CONFIG_PPC32
431 #if CLASSIC_PPC
432 { /* 601 */
433 .pvr_mask = 0xffff0000,
434 .pvr_value = 0x00010000,
435 .cpu_name = "601",
436 .cpu_features = CPU_FTRS_PPC601,
437 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
438 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
439 .icache_bsize = 32,
440 .dcache_bsize = 32,
441 .machine_check = machine_check_generic,
442 .platform = "ppc601",
444 { /* 603 */
445 .pvr_mask = 0xffff0000,
446 .pvr_value = 0x00030000,
447 .cpu_name = "603",
448 .cpu_features = CPU_FTRS_603,
449 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
450 .icache_bsize = 32,
451 .dcache_bsize = 32,
452 .cpu_setup = __setup_cpu_603,
453 .machine_check = machine_check_generic,
454 .platform = "ppc603",
456 { /* 603e */
457 .pvr_mask = 0xffff0000,
458 .pvr_value = 0x00060000,
459 .cpu_name = "603e",
460 .cpu_features = CPU_FTRS_603,
461 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
462 .icache_bsize = 32,
463 .dcache_bsize = 32,
464 .cpu_setup = __setup_cpu_603,
465 .machine_check = machine_check_generic,
466 .platform = "ppc603",
468 { /* 603ev */
469 .pvr_mask = 0xffff0000,
470 .pvr_value = 0x00070000,
471 .cpu_name = "603ev",
472 .cpu_features = CPU_FTRS_603,
473 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
474 .icache_bsize = 32,
475 .dcache_bsize = 32,
476 .cpu_setup = __setup_cpu_603,
477 .machine_check = machine_check_generic,
478 .platform = "ppc603",
480 { /* 604 */
481 .pvr_mask = 0xffff0000,
482 .pvr_value = 0x00040000,
483 .cpu_name = "604",
484 .cpu_features = CPU_FTRS_604,
485 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
486 .icache_bsize = 32,
487 .dcache_bsize = 32,
488 .num_pmcs = 2,
489 .cpu_setup = __setup_cpu_604,
490 .machine_check = machine_check_generic,
491 .platform = "ppc604",
493 { /* 604e */
494 .pvr_mask = 0xfffff000,
495 .pvr_value = 0x00090000,
496 .cpu_name = "604e",
497 .cpu_features = CPU_FTRS_604,
498 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
499 .icache_bsize = 32,
500 .dcache_bsize = 32,
501 .num_pmcs = 4,
502 .cpu_setup = __setup_cpu_604,
503 .machine_check = machine_check_generic,
504 .platform = "ppc604",
506 { /* 604r */
507 .pvr_mask = 0xffff0000,
508 .pvr_value = 0x00090000,
509 .cpu_name = "604r",
510 .cpu_features = CPU_FTRS_604,
511 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
512 .icache_bsize = 32,
513 .dcache_bsize = 32,
514 .num_pmcs = 4,
515 .cpu_setup = __setup_cpu_604,
516 .machine_check = machine_check_generic,
517 .platform = "ppc604",
519 { /* 604ev */
520 .pvr_mask = 0xffff0000,
521 .pvr_value = 0x000a0000,
522 .cpu_name = "604ev",
523 .cpu_features = CPU_FTRS_604,
524 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
525 .icache_bsize = 32,
526 .dcache_bsize = 32,
527 .num_pmcs = 4,
528 .cpu_setup = __setup_cpu_604,
529 .machine_check = machine_check_generic,
530 .platform = "ppc604",
532 { /* 740/750 (0x4202, don't support TAU ?) */
533 .pvr_mask = 0xffffffff,
534 .pvr_value = 0x00084202,
535 .cpu_name = "740/750",
536 .cpu_features = CPU_FTRS_740_NOTAU,
537 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
538 .icache_bsize = 32,
539 .dcache_bsize = 32,
540 .num_pmcs = 4,
541 .cpu_setup = __setup_cpu_750,
542 .machine_check = machine_check_generic,
543 .platform = "ppc750",
545 { /* 750CX (80100 and 8010x?) */
546 .pvr_mask = 0xfffffff0,
547 .pvr_value = 0x00080100,
548 .cpu_name = "750CX",
549 .cpu_features = CPU_FTRS_750,
550 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
551 .icache_bsize = 32,
552 .dcache_bsize = 32,
553 .num_pmcs = 4,
554 .cpu_setup = __setup_cpu_750cx,
555 .machine_check = machine_check_generic,
556 .platform = "ppc750",
558 { /* 750CX (82201 and 82202) */
559 .pvr_mask = 0xfffffff0,
560 .pvr_value = 0x00082200,
561 .cpu_name = "750CX",
562 .cpu_features = CPU_FTRS_750,
563 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
564 .icache_bsize = 32,
565 .dcache_bsize = 32,
566 .num_pmcs = 4,
567 .cpu_setup = __setup_cpu_750cx,
568 .machine_check = machine_check_generic,
569 .platform = "ppc750",
571 { /* 750CXe (82214) */
572 .pvr_mask = 0xfffffff0,
573 .pvr_value = 0x00082210,
574 .cpu_name = "750CXe",
575 .cpu_features = CPU_FTRS_750,
576 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
577 .icache_bsize = 32,
578 .dcache_bsize = 32,
579 .num_pmcs = 4,
580 .cpu_setup = __setup_cpu_750cx,
581 .machine_check = machine_check_generic,
582 .platform = "ppc750",
584 { /* 750CXe "Gekko" (83214) */
585 .pvr_mask = 0xffffffff,
586 .pvr_value = 0x00083214,
587 .cpu_name = "750CXe",
588 .cpu_features = CPU_FTRS_750,
589 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
590 .icache_bsize = 32,
591 .dcache_bsize = 32,
592 .num_pmcs = 4,
593 .cpu_setup = __setup_cpu_750cx,
594 .machine_check = machine_check_generic,
595 .platform = "ppc750",
597 { /* 750CL */
598 .pvr_mask = 0xfffff0f0,
599 .pvr_value = 0x00087010,
600 .cpu_name = "750CL",
601 .cpu_features = CPU_FTRS_750CL,
602 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
603 .icache_bsize = 32,
604 .dcache_bsize = 32,
605 .num_pmcs = 4,
606 .cpu_setup = __setup_cpu_750,
607 .machine_check = machine_check_generic,
608 .platform = "ppc750",
610 { /* 745/755 */
611 .pvr_mask = 0xfffff000,
612 .pvr_value = 0x00083000,
613 .cpu_name = "745/755",
614 .cpu_features = CPU_FTRS_750,
615 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
616 .icache_bsize = 32,
617 .dcache_bsize = 32,
618 .num_pmcs = 4,
619 .cpu_setup = __setup_cpu_750,
620 .machine_check = machine_check_generic,
621 .platform = "ppc750",
623 { /* 750FX rev 1.x */
624 .pvr_mask = 0xffffff00,
625 .pvr_value = 0x70000100,
626 .cpu_name = "750FX",
627 .cpu_features = CPU_FTRS_750FX1,
628 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
629 .icache_bsize = 32,
630 .dcache_bsize = 32,
631 .num_pmcs = 4,
632 .cpu_setup = __setup_cpu_750,
633 .machine_check = machine_check_generic,
634 .platform = "ppc750",
636 { /* 750FX rev 2.0 must disable HID0[DPM] */
637 .pvr_mask = 0xffffffff,
638 .pvr_value = 0x70000200,
639 .cpu_name = "750FX",
640 .cpu_features = CPU_FTRS_750FX2,
641 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
642 .icache_bsize = 32,
643 .dcache_bsize = 32,
644 .num_pmcs = 4,
645 .cpu_setup = __setup_cpu_750,
646 .machine_check = machine_check_generic,
647 .platform = "ppc750",
649 { /* 750FX (All revs except 2.0) */
650 .pvr_mask = 0xffff0000,
651 .pvr_value = 0x70000000,
652 .cpu_name = "750FX",
653 .cpu_features = CPU_FTRS_750FX,
654 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
655 .icache_bsize = 32,
656 .dcache_bsize = 32,
657 .num_pmcs = 4,
658 .cpu_setup = __setup_cpu_750fx,
659 .machine_check = machine_check_generic,
660 .platform = "ppc750",
662 { /* 750GX */
663 .pvr_mask = 0xffff0000,
664 .pvr_value = 0x70020000,
665 .cpu_name = "750GX",
666 .cpu_features = CPU_FTRS_750GX,
667 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
668 .icache_bsize = 32,
669 .dcache_bsize = 32,
670 .num_pmcs = 4,
671 .cpu_setup = __setup_cpu_750fx,
672 .machine_check = machine_check_generic,
673 .platform = "ppc750",
675 { /* 740/750 (L2CR bit need fixup for 740) */
676 .pvr_mask = 0xffff0000,
677 .pvr_value = 0x00080000,
678 .cpu_name = "740/750",
679 .cpu_features = CPU_FTRS_740,
680 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
681 .icache_bsize = 32,
682 .dcache_bsize = 32,
683 .num_pmcs = 4,
684 .cpu_setup = __setup_cpu_750,
685 .machine_check = machine_check_generic,
686 .platform = "ppc750",
688 { /* 7400 rev 1.1 ? (no TAU) */
689 .pvr_mask = 0xffffffff,
690 .pvr_value = 0x000c1101,
691 .cpu_name = "7400 (1.1)",
692 .cpu_features = CPU_FTRS_7400_NOTAU,
693 .cpu_user_features = COMMON_USER |
694 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
695 .icache_bsize = 32,
696 .dcache_bsize = 32,
697 .num_pmcs = 4,
698 .cpu_setup = __setup_cpu_7400,
699 .machine_check = machine_check_generic,
700 .platform = "ppc7400",
702 { /* 7400 */
703 .pvr_mask = 0xffff0000,
704 .pvr_value = 0x000c0000,
705 .cpu_name = "7400",
706 .cpu_features = CPU_FTRS_7400,
707 .cpu_user_features = COMMON_USER |
708 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
709 .icache_bsize = 32,
710 .dcache_bsize = 32,
711 .num_pmcs = 4,
712 .cpu_setup = __setup_cpu_7400,
713 .machine_check = machine_check_generic,
714 .platform = "ppc7400",
716 { /* 7410 */
717 .pvr_mask = 0xffff0000,
718 .pvr_value = 0x800c0000,
719 .cpu_name = "7410",
720 .cpu_features = CPU_FTRS_7400,
721 .cpu_user_features = COMMON_USER |
722 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
723 .icache_bsize = 32,
724 .dcache_bsize = 32,
725 .num_pmcs = 4,
726 .cpu_setup = __setup_cpu_7410,
727 .machine_check = machine_check_generic,
728 .platform = "ppc7400",
730 { /* 7450 2.0 - no doze/nap */
731 .pvr_mask = 0xffffffff,
732 .pvr_value = 0x80000200,
733 .cpu_name = "7450",
734 .cpu_features = CPU_FTRS_7450_20,
735 .cpu_user_features = COMMON_USER |
736 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
737 .icache_bsize = 32,
738 .dcache_bsize = 32,
739 .num_pmcs = 6,
740 .cpu_setup = __setup_cpu_745x,
741 .oprofile_cpu_type = "ppc/7450",
742 .oprofile_type = PPC_OPROFILE_G4,
743 .machine_check = machine_check_generic,
744 .platform = "ppc7450",
746 { /* 7450 2.1 */
747 .pvr_mask = 0xffffffff,
748 .pvr_value = 0x80000201,
749 .cpu_name = "7450",
750 .cpu_features = CPU_FTRS_7450_21,
751 .cpu_user_features = COMMON_USER |
752 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
753 .icache_bsize = 32,
754 .dcache_bsize = 32,
755 .num_pmcs = 6,
756 .cpu_setup = __setup_cpu_745x,
757 .oprofile_cpu_type = "ppc/7450",
758 .oprofile_type = PPC_OPROFILE_G4,
759 .machine_check = machine_check_generic,
760 .platform = "ppc7450",
762 { /* 7450 2.3 and newer */
763 .pvr_mask = 0xffff0000,
764 .pvr_value = 0x80000000,
765 .cpu_name = "7450",
766 .cpu_features = CPU_FTRS_7450_23,
767 .cpu_user_features = COMMON_USER |
768 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
769 .icache_bsize = 32,
770 .dcache_bsize = 32,
771 .num_pmcs = 6,
772 .cpu_setup = __setup_cpu_745x,
773 .oprofile_cpu_type = "ppc/7450",
774 .oprofile_type = PPC_OPROFILE_G4,
775 .machine_check = machine_check_generic,
776 .platform = "ppc7450",
778 { /* 7455 rev 1.x */
779 .pvr_mask = 0xffffff00,
780 .pvr_value = 0x80010100,
781 .cpu_name = "7455",
782 .cpu_features = CPU_FTRS_7455_1,
783 .cpu_user_features = COMMON_USER |
784 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
785 .icache_bsize = 32,
786 .dcache_bsize = 32,
787 .num_pmcs = 6,
788 .cpu_setup = __setup_cpu_745x,
789 .oprofile_cpu_type = "ppc/7450",
790 .oprofile_type = PPC_OPROFILE_G4,
791 .machine_check = machine_check_generic,
792 .platform = "ppc7450",
794 { /* 7455 rev 2.0 */
795 .pvr_mask = 0xffffffff,
796 .pvr_value = 0x80010200,
797 .cpu_name = "7455",
798 .cpu_features = CPU_FTRS_7455_20,
799 .cpu_user_features = COMMON_USER |
800 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
801 .icache_bsize = 32,
802 .dcache_bsize = 32,
803 .num_pmcs = 6,
804 .cpu_setup = __setup_cpu_745x,
805 .oprofile_cpu_type = "ppc/7450",
806 .oprofile_type = PPC_OPROFILE_G4,
807 .machine_check = machine_check_generic,
808 .platform = "ppc7450",
810 { /* 7455 others */
811 .pvr_mask = 0xffff0000,
812 .pvr_value = 0x80010000,
813 .cpu_name = "7455",
814 .cpu_features = CPU_FTRS_7455,
815 .cpu_user_features = COMMON_USER |
816 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
817 .icache_bsize = 32,
818 .dcache_bsize = 32,
819 .num_pmcs = 6,
820 .cpu_setup = __setup_cpu_745x,
821 .oprofile_cpu_type = "ppc/7450",
822 .oprofile_type = PPC_OPROFILE_G4,
823 .machine_check = machine_check_generic,
824 .platform = "ppc7450",
826 { /* 7447/7457 Rev 1.0 */
827 .pvr_mask = 0xffffffff,
828 .pvr_value = 0x80020100,
829 .cpu_name = "7447/7457",
830 .cpu_features = CPU_FTRS_7447_10,
831 .cpu_user_features = COMMON_USER |
832 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
833 .icache_bsize = 32,
834 .dcache_bsize = 32,
835 .num_pmcs = 6,
836 .cpu_setup = __setup_cpu_745x,
837 .oprofile_cpu_type = "ppc/7450",
838 .oprofile_type = PPC_OPROFILE_G4,
839 .machine_check = machine_check_generic,
840 .platform = "ppc7450",
842 { /* 7447/7457 Rev 1.1 */
843 .pvr_mask = 0xffffffff,
844 .pvr_value = 0x80020101,
845 .cpu_name = "7447/7457",
846 .cpu_features = CPU_FTRS_7447_10,
847 .cpu_user_features = COMMON_USER |
848 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
849 .icache_bsize = 32,
850 .dcache_bsize = 32,
851 .num_pmcs = 6,
852 .cpu_setup = __setup_cpu_745x,
853 .oprofile_cpu_type = "ppc/7450",
854 .oprofile_type = PPC_OPROFILE_G4,
855 .machine_check = machine_check_generic,
856 .platform = "ppc7450",
858 { /* 7447/7457 Rev 1.2 and later */
859 .pvr_mask = 0xffff0000,
860 .pvr_value = 0x80020000,
861 .cpu_name = "7447/7457",
862 .cpu_features = CPU_FTRS_7447,
863 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
864 .icache_bsize = 32,
865 .dcache_bsize = 32,
866 .num_pmcs = 6,
867 .cpu_setup = __setup_cpu_745x,
868 .oprofile_cpu_type = "ppc/7450",
869 .oprofile_type = PPC_OPROFILE_G4,
870 .machine_check = machine_check_generic,
871 .platform = "ppc7450",
873 { /* 7447A */
874 .pvr_mask = 0xffff0000,
875 .pvr_value = 0x80030000,
876 .cpu_name = "7447A",
877 .cpu_features = CPU_FTRS_7447A,
878 .cpu_user_features = COMMON_USER |
879 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
880 .icache_bsize = 32,
881 .dcache_bsize = 32,
882 .num_pmcs = 6,
883 .cpu_setup = __setup_cpu_745x,
884 .oprofile_cpu_type = "ppc/7450",
885 .oprofile_type = PPC_OPROFILE_G4,
886 .machine_check = machine_check_generic,
887 .platform = "ppc7450",
889 { /* 7448 */
890 .pvr_mask = 0xffff0000,
891 .pvr_value = 0x80040000,
892 .cpu_name = "7448",
893 .cpu_features = CPU_FTRS_7448,
894 .cpu_user_features = COMMON_USER |
895 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
896 .icache_bsize = 32,
897 .dcache_bsize = 32,
898 .num_pmcs = 6,
899 .cpu_setup = __setup_cpu_745x,
900 .oprofile_cpu_type = "ppc/7450",
901 .oprofile_type = PPC_OPROFILE_G4,
902 .machine_check = machine_check_generic,
903 .platform = "ppc7450",
905 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
906 .pvr_mask = 0x7fff0000,
907 .pvr_value = 0x00810000,
908 .cpu_name = "82xx",
909 .cpu_features = CPU_FTRS_82XX,
910 .cpu_user_features = COMMON_USER,
911 .icache_bsize = 32,
912 .dcache_bsize = 32,
913 .cpu_setup = __setup_cpu_603,
914 .machine_check = machine_check_generic,
915 .platform = "ppc603",
917 { /* All G2_LE (603e core, plus some) have the same pvr */
918 .pvr_mask = 0x7fff0000,
919 .pvr_value = 0x00820000,
920 .cpu_name = "G2_LE",
921 .cpu_features = CPU_FTRS_G2_LE,
922 .cpu_user_features = COMMON_USER,
923 .icache_bsize = 32,
924 .dcache_bsize = 32,
925 .cpu_setup = __setup_cpu_603,
926 .machine_check = machine_check_generic,
927 .platform = "ppc603",
929 { /* e300c1 (a 603e core, plus some) on 83xx */
930 .pvr_mask = 0x7fff0000,
931 .pvr_value = 0x00830000,
932 .cpu_name = "e300c1",
933 .cpu_features = CPU_FTRS_E300,
934 .cpu_user_features = COMMON_USER,
935 .icache_bsize = 32,
936 .dcache_bsize = 32,
937 .cpu_setup = __setup_cpu_603,
938 .machine_check = machine_check_generic,
939 .platform = "ppc603",
941 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
942 .pvr_mask = 0x7fff0000,
943 .pvr_value = 0x00840000,
944 .cpu_name = "e300c2",
945 .cpu_features = CPU_FTRS_E300C2,
946 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
947 .icache_bsize = 32,
948 .dcache_bsize = 32,
949 .cpu_setup = __setup_cpu_603,
950 .machine_check = machine_check_generic,
951 .platform = "ppc603",
953 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
954 .pvr_mask = 0x7fff0000,
955 .pvr_value = 0x00850000,
956 .cpu_name = "e300c3",
957 .cpu_features = CPU_FTRS_E300,
958 .cpu_user_features = COMMON_USER,
959 .icache_bsize = 32,
960 .dcache_bsize = 32,
961 .cpu_setup = __setup_cpu_603,
962 .num_pmcs = 4,
963 .oprofile_cpu_type = "ppc/e300",
964 .oprofile_type = PPC_OPROFILE_FSL_EMB,
965 .platform = "ppc603",
967 { /* e300c4 (e300c1, plus one IU) */
968 .pvr_mask = 0x7fff0000,
969 .pvr_value = 0x00860000,
970 .cpu_name = "e300c4",
971 .cpu_features = CPU_FTRS_E300,
972 .cpu_user_features = COMMON_USER,
973 .icache_bsize = 32,
974 .dcache_bsize = 32,
975 .cpu_setup = __setup_cpu_603,
976 .machine_check = machine_check_generic,
977 .num_pmcs = 4,
978 .oprofile_cpu_type = "ppc/e300",
979 .oprofile_type = PPC_OPROFILE_FSL_EMB,
980 .platform = "ppc603",
982 { /* default match, we assume split I/D cache & TB (non-601)... */
983 .pvr_mask = 0x00000000,
984 .pvr_value = 0x00000000,
985 .cpu_name = "(generic PPC)",
986 .cpu_features = CPU_FTRS_CLASSIC32,
987 .cpu_user_features = COMMON_USER,
988 .icache_bsize = 32,
989 .dcache_bsize = 32,
990 .machine_check = machine_check_generic,
991 .platform = "ppc603",
993 #endif /* CLASSIC_PPC */
994 #ifdef CONFIG_8xx
995 { /* 8xx */
996 .pvr_mask = 0xffff0000,
997 .pvr_value = 0x00500000,
998 .cpu_name = "8xx",
999 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1000 * if the 8xx code is there.... */
1001 .cpu_features = CPU_FTRS_8XX,
1002 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1003 .icache_bsize = 16,
1004 .dcache_bsize = 16,
1005 .platform = "ppc823",
1007 #endif /* CONFIG_8xx */
1008 #ifdef CONFIG_40x
1009 { /* 403GC */
1010 .pvr_mask = 0xffffff00,
1011 .pvr_value = 0x00200200,
1012 .cpu_name = "403GC",
1013 .cpu_features = CPU_FTRS_40X,
1014 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1015 .icache_bsize = 16,
1016 .dcache_bsize = 16,
1017 .machine_check = machine_check_4xx,
1018 .platform = "ppc403",
1020 { /* 403GCX */
1021 .pvr_mask = 0xffffff00,
1022 .pvr_value = 0x00201400,
1023 .cpu_name = "403GCX",
1024 .cpu_features = CPU_FTRS_40X,
1025 .cpu_user_features = PPC_FEATURE_32 |
1026 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
1027 .icache_bsize = 16,
1028 .dcache_bsize = 16,
1029 .machine_check = machine_check_4xx,
1030 .platform = "ppc403",
1032 { /* 403G ?? */
1033 .pvr_mask = 0xffff0000,
1034 .pvr_value = 0x00200000,
1035 .cpu_name = "403G ??",
1036 .cpu_features = CPU_FTRS_40X,
1037 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1038 .icache_bsize = 16,
1039 .dcache_bsize = 16,
1040 .machine_check = machine_check_4xx,
1041 .platform = "ppc403",
1043 { /* 405GP */
1044 .pvr_mask = 0xffff0000,
1045 .pvr_value = 0x40110000,
1046 .cpu_name = "405GP",
1047 .cpu_features = CPU_FTRS_40X,
1048 .cpu_user_features = PPC_FEATURE_32 |
1049 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1050 .icache_bsize = 32,
1051 .dcache_bsize = 32,
1052 .machine_check = machine_check_4xx,
1053 .platform = "ppc405",
1055 { /* STB 03xxx */
1056 .pvr_mask = 0xffff0000,
1057 .pvr_value = 0x40130000,
1058 .cpu_name = "STB03xxx",
1059 .cpu_features = CPU_FTRS_40X,
1060 .cpu_user_features = PPC_FEATURE_32 |
1061 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1062 .icache_bsize = 32,
1063 .dcache_bsize = 32,
1064 .machine_check = machine_check_4xx,
1065 .platform = "ppc405",
1067 { /* STB 04xxx */
1068 .pvr_mask = 0xffff0000,
1069 .pvr_value = 0x41810000,
1070 .cpu_name = "STB04xxx",
1071 .cpu_features = CPU_FTRS_40X,
1072 .cpu_user_features = PPC_FEATURE_32 |
1073 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1074 .icache_bsize = 32,
1075 .dcache_bsize = 32,
1076 .machine_check = machine_check_4xx,
1077 .platform = "ppc405",
1079 { /* NP405L */
1080 .pvr_mask = 0xffff0000,
1081 .pvr_value = 0x41610000,
1082 .cpu_name = "NP405L",
1083 .cpu_features = CPU_FTRS_40X,
1084 .cpu_user_features = PPC_FEATURE_32 |
1085 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1086 .icache_bsize = 32,
1087 .dcache_bsize = 32,
1088 .machine_check = machine_check_4xx,
1089 .platform = "ppc405",
1091 { /* NP4GS3 */
1092 .pvr_mask = 0xffff0000,
1093 .pvr_value = 0x40B10000,
1094 .cpu_name = "NP4GS3",
1095 .cpu_features = CPU_FTRS_40X,
1096 .cpu_user_features = PPC_FEATURE_32 |
1097 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1098 .icache_bsize = 32,
1099 .dcache_bsize = 32,
1100 .machine_check = machine_check_4xx,
1101 .platform = "ppc405",
1103 { /* NP405H */
1104 .pvr_mask = 0xffff0000,
1105 .pvr_value = 0x41410000,
1106 .cpu_name = "NP405H",
1107 .cpu_features = CPU_FTRS_40X,
1108 .cpu_user_features = PPC_FEATURE_32 |
1109 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1110 .icache_bsize = 32,
1111 .dcache_bsize = 32,
1112 .machine_check = machine_check_4xx,
1113 .platform = "ppc405",
1115 { /* 405GPr */
1116 .pvr_mask = 0xffff0000,
1117 .pvr_value = 0x50910000,
1118 .cpu_name = "405GPr",
1119 .cpu_features = CPU_FTRS_40X,
1120 .cpu_user_features = PPC_FEATURE_32 |
1121 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1122 .icache_bsize = 32,
1123 .dcache_bsize = 32,
1124 .machine_check = machine_check_4xx,
1125 .platform = "ppc405",
1127 { /* STBx25xx */
1128 .pvr_mask = 0xffff0000,
1129 .pvr_value = 0x51510000,
1130 .cpu_name = "STBx25xx",
1131 .cpu_features = CPU_FTRS_40X,
1132 .cpu_user_features = PPC_FEATURE_32 |
1133 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1134 .icache_bsize = 32,
1135 .dcache_bsize = 32,
1136 .machine_check = machine_check_4xx,
1137 .platform = "ppc405",
1139 { /* 405LP */
1140 .pvr_mask = 0xffff0000,
1141 .pvr_value = 0x41F10000,
1142 .cpu_name = "405LP",
1143 .cpu_features = CPU_FTRS_40X,
1144 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1145 .icache_bsize = 32,
1146 .dcache_bsize = 32,
1147 .machine_check = machine_check_4xx,
1148 .platform = "ppc405",
1150 { /* Xilinx Virtex-II Pro */
1151 .pvr_mask = 0xfffff000,
1152 .pvr_value = 0x20010000,
1153 .cpu_name = "Virtex-II Pro",
1154 .cpu_features = CPU_FTRS_40X,
1155 .cpu_user_features = PPC_FEATURE_32 |
1156 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1157 .icache_bsize = 32,
1158 .dcache_bsize = 32,
1159 .machine_check = machine_check_4xx,
1160 .platform = "ppc405",
1162 { /* Xilinx Virtex-4 FX */
1163 .pvr_mask = 0xfffff000,
1164 .pvr_value = 0x20011000,
1165 .cpu_name = "Virtex-4 FX",
1166 .cpu_features = CPU_FTRS_40X,
1167 .cpu_user_features = PPC_FEATURE_32 |
1168 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1169 .icache_bsize = 32,
1170 .dcache_bsize = 32,
1171 .machine_check = machine_check_4xx,
1172 .platform = "ppc405",
1174 { /* 405EP */
1175 .pvr_mask = 0xffff0000,
1176 .pvr_value = 0x51210000,
1177 .cpu_name = "405EP",
1178 .cpu_features = CPU_FTRS_40X,
1179 .cpu_user_features = PPC_FEATURE_32 |
1180 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1181 .icache_bsize = 32,
1182 .dcache_bsize = 32,
1183 .machine_check = machine_check_4xx,
1184 .platform = "ppc405",
1186 { /* 405EX */
1187 .pvr_mask = 0xffff0004,
1188 .pvr_value = 0x12910004,
1189 .cpu_name = "405EX",
1190 .cpu_features = CPU_FTRS_40X,
1191 .cpu_user_features = PPC_FEATURE_32 |
1192 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1193 .icache_bsize = 32,
1194 .dcache_bsize = 32,
1195 .machine_check = machine_check_4xx,
1196 .platform = "ppc405",
1198 { /* 405EXr */
1199 .pvr_mask = 0xffff0004,
1200 .pvr_value = 0x12910000,
1201 .cpu_name = "405EXr",
1202 .cpu_features = CPU_FTRS_40X,
1203 .cpu_user_features = PPC_FEATURE_32 |
1204 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1205 .icache_bsize = 32,
1206 .dcache_bsize = 32,
1207 .machine_check = machine_check_4xx,
1208 .platform = "ppc405",
1211 #endif /* CONFIG_40x */
1212 #ifdef CONFIG_44x
1214 .pvr_mask = 0xf0000fff,
1215 .pvr_value = 0x40000850,
1216 .cpu_name = "440GR Rev. A",
1217 .cpu_features = CPU_FTRS_44X,
1218 .cpu_user_features = COMMON_USER_BOOKE,
1219 .icache_bsize = 32,
1220 .dcache_bsize = 32,
1221 .machine_check = machine_check_4xx,
1222 .platform = "ppc440",
1224 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1225 .pvr_mask = 0xf0000fff,
1226 .pvr_value = 0x40000858,
1227 .cpu_name = "440EP Rev. A",
1228 .cpu_features = CPU_FTRS_44X,
1229 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1230 .icache_bsize = 32,
1231 .dcache_bsize = 32,
1232 .cpu_setup = __setup_cpu_440ep,
1233 .machine_check = machine_check_4xx,
1234 .platform = "ppc440",
1237 .pvr_mask = 0xf0000fff,
1238 .pvr_value = 0x400008d3,
1239 .cpu_name = "440GR Rev. B",
1240 .cpu_features = CPU_FTRS_44X,
1241 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1242 .icache_bsize = 32,
1243 .dcache_bsize = 32,
1244 .machine_check = machine_check_4xx,
1245 .platform = "ppc440",
1247 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1248 .pvr_mask = 0xf0000ff7,
1249 .pvr_value = 0x400008d4,
1250 .cpu_name = "440EP Rev. C",
1251 .cpu_features = CPU_FTRS_44X,
1252 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1253 .icache_bsize = 32,
1254 .dcache_bsize = 32,
1255 .cpu_setup = __setup_cpu_440ep,
1256 .machine_check = machine_check_4xx,
1257 .platform = "ppc440",
1259 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1260 .pvr_mask = 0xf0000fff,
1261 .pvr_value = 0x400008db,
1262 .cpu_name = "440EP Rev. B",
1263 .cpu_features = CPU_FTRS_44X,
1264 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1265 .icache_bsize = 32,
1266 .dcache_bsize = 32,
1267 .cpu_setup = __setup_cpu_440ep,
1268 .machine_check = machine_check_4xx,
1269 .platform = "ppc440",
1271 { /* 440GRX */
1272 .pvr_mask = 0xf0000ffb,
1273 .pvr_value = 0x200008D0,
1274 .cpu_name = "440GRX",
1275 .cpu_features = CPU_FTRS_44X,
1276 .cpu_user_features = COMMON_USER_BOOKE,
1277 .icache_bsize = 32,
1278 .dcache_bsize = 32,
1279 .cpu_setup = __setup_cpu_440grx,
1280 .machine_check = machine_check_440A,
1281 .platform = "ppc440",
1283 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1284 .pvr_mask = 0xf0000ffb,
1285 .pvr_value = 0x200008D8,
1286 .cpu_name = "440EPX",
1287 .cpu_features = CPU_FTRS_44X,
1288 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1289 .icache_bsize = 32,
1290 .dcache_bsize = 32,
1291 .cpu_setup = __setup_cpu_440epx,
1292 .machine_check = machine_check_440A,
1293 .platform = "ppc440",
1295 { /* 440GP Rev. B */
1296 .pvr_mask = 0xf0000fff,
1297 .pvr_value = 0x40000440,
1298 .cpu_name = "440GP Rev. B",
1299 .cpu_features = CPU_FTRS_44X,
1300 .cpu_user_features = COMMON_USER_BOOKE,
1301 .icache_bsize = 32,
1302 .dcache_bsize = 32,
1303 .machine_check = machine_check_4xx,
1304 .platform = "ppc440gp",
1306 { /* 440GP Rev. C */
1307 .pvr_mask = 0xf0000fff,
1308 .pvr_value = 0x40000481,
1309 .cpu_name = "440GP Rev. C",
1310 .cpu_features = CPU_FTRS_44X,
1311 .cpu_user_features = COMMON_USER_BOOKE,
1312 .icache_bsize = 32,
1313 .dcache_bsize = 32,
1314 .machine_check = machine_check_4xx,
1315 .platform = "ppc440gp",
1317 { /* 440GX Rev. A */
1318 .pvr_mask = 0xf0000fff,
1319 .pvr_value = 0x50000850,
1320 .cpu_name = "440GX Rev. A",
1321 .cpu_features = CPU_FTRS_44X,
1322 .cpu_user_features = COMMON_USER_BOOKE,
1323 .icache_bsize = 32,
1324 .dcache_bsize = 32,
1325 .cpu_setup = __setup_cpu_440gx,
1326 .machine_check = machine_check_440A,
1327 .platform = "ppc440",
1329 { /* 440GX Rev. B */
1330 .pvr_mask = 0xf0000fff,
1331 .pvr_value = 0x50000851,
1332 .cpu_name = "440GX Rev. B",
1333 .cpu_features = CPU_FTRS_44X,
1334 .cpu_user_features = COMMON_USER_BOOKE,
1335 .icache_bsize = 32,
1336 .dcache_bsize = 32,
1337 .cpu_setup = __setup_cpu_440gx,
1338 .machine_check = machine_check_440A,
1339 .platform = "ppc440",
1341 { /* 440GX Rev. C */
1342 .pvr_mask = 0xf0000fff,
1343 .pvr_value = 0x50000892,
1344 .cpu_name = "440GX Rev. C",
1345 .cpu_features = CPU_FTRS_44X,
1346 .cpu_user_features = COMMON_USER_BOOKE,
1347 .icache_bsize = 32,
1348 .dcache_bsize = 32,
1349 .cpu_setup = __setup_cpu_440gx,
1350 .machine_check = machine_check_440A,
1351 .platform = "ppc440",
1353 { /* 440GX Rev. F */
1354 .pvr_mask = 0xf0000fff,
1355 .pvr_value = 0x50000894,
1356 .cpu_name = "440GX Rev. F",
1357 .cpu_features = CPU_FTRS_44X,
1358 .cpu_user_features = COMMON_USER_BOOKE,
1359 .icache_bsize = 32,
1360 .dcache_bsize = 32,
1361 .cpu_setup = __setup_cpu_440gx,
1362 .machine_check = machine_check_440A,
1363 .platform = "ppc440",
1365 { /* 440SP Rev. A */
1366 .pvr_mask = 0xfff00fff,
1367 .pvr_value = 0x53200891,
1368 .cpu_name = "440SP Rev. A",
1369 .cpu_features = CPU_FTRS_44X,
1370 .cpu_user_features = COMMON_USER_BOOKE,
1371 .icache_bsize = 32,
1372 .dcache_bsize = 32,
1373 .machine_check = machine_check_4xx,
1374 .platform = "ppc440",
1376 { /* 440SPe Rev. A */
1377 .pvr_mask = 0xfff00fff,
1378 .pvr_value = 0x53400890,
1379 .cpu_name = "440SPe Rev. A",
1380 .cpu_features = CPU_FTRS_44X,
1381 .cpu_user_features = COMMON_USER_BOOKE,
1382 .icache_bsize = 32,
1383 .dcache_bsize = 32,
1384 .cpu_setup = __setup_cpu_440spe,
1385 .machine_check = machine_check_440A,
1386 .platform = "ppc440",
1388 { /* 440SPe Rev. B */
1389 .pvr_mask = 0xfff00fff,
1390 .pvr_value = 0x53400891,
1391 .cpu_name = "440SPe Rev. B",
1392 .cpu_features = CPU_FTRS_44X,
1393 .cpu_user_features = COMMON_USER_BOOKE,
1394 .icache_bsize = 32,
1395 .dcache_bsize = 32,
1396 .cpu_setup = __setup_cpu_440spe,
1397 .machine_check = machine_check_440A,
1398 .platform = "ppc440",
1400 #endif /* CONFIG_44x */
1401 #ifdef CONFIG_FSL_BOOKE
1402 #ifdef CONFIG_E200
1403 { /* e200z5 */
1404 .pvr_mask = 0xfff00000,
1405 .pvr_value = 0x81000000,
1406 .cpu_name = "e200z5",
1407 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1408 .cpu_features = CPU_FTRS_E200,
1409 .cpu_user_features = COMMON_USER_BOOKE |
1410 PPC_FEATURE_HAS_EFP_SINGLE |
1411 PPC_FEATURE_UNIFIED_CACHE,
1412 .dcache_bsize = 32,
1413 .machine_check = machine_check_e200,
1414 .platform = "ppc5554",
1416 { /* e200z6 */
1417 .pvr_mask = 0xfff00000,
1418 .pvr_value = 0x81100000,
1419 .cpu_name = "e200z6",
1420 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1421 .cpu_features = CPU_FTRS_E200,
1422 .cpu_user_features = COMMON_USER_BOOKE |
1423 PPC_FEATURE_HAS_SPE_COMP |
1424 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1425 PPC_FEATURE_UNIFIED_CACHE,
1426 .dcache_bsize = 32,
1427 .machine_check = machine_check_e200,
1428 .platform = "ppc5554",
1430 #elif defined(CONFIG_E500)
1431 { /* e500 */
1432 .pvr_mask = 0xffff0000,
1433 .pvr_value = 0x80200000,
1434 .cpu_name = "e500",
1435 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1436 .cpu_features = CPU_FTRS_E500,
1437 .cpu_user_features = COMMON_USER_BOOKE |
1438 PPC_FEATURE_HAS_SPE_COMP |
1439 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
1440 .icache_bsize = 32,
1441 .dcache_bsize = 32,
1442 .num_pmcs = 4,
1443 .oprofile_cpu_type = "ppc/e500",
1444 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1445 .machine_check = machine_check_e500,
1446 .platform = "ppc8540",
1448 { /* e500v2 */
1449 .pvr_mask = 0xffff0000,
1450 .pvr_value = 0x80210000,
1451 .cpu_name = "e500v2",
1452 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1453 .cpu_features = CPU_FTRS_E500_2,
1454 .cpu_user_features = COMMON_USER_BOOKE |
1455 PPC_FEATURE_HAS_SPE_COMP |
1456 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1457 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
1458 .icache_bsize = 32,
1459 .dcache_bsize = 32,
1460 .num_pmcs = 4,
1461 .oprofile_cpu_type = "ppc/e500",
1462 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1463 .machine_check = machine_check_e500,
1464 .platform = "ppc8548",
1466 #endif
1467 #endif
1468 #if !CLASSIC_PPC
1469 { /* default match */
1470 .pvr_mask = 0x00000000,
1471 .pvr_value = 0x00000000,
1472 .cpu_name = "(generic PPC)",
1473 .cpu_features = CPU_FTRS_GENERIC_32,
1474 .cpu_user_features = PPC_FEATURE_32,
1475 .icache_bsize = 32,
1476 .dcache_bsize = 32,
1477 .platform = "powerpc",
1479 #endif /* !CLASSIC_PPC */
1480 #endif /* CONFIG_PPC32 */
1483 static struct cpu_spec the_cpu_spec;
1485 struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
1487 struct cpu_spec *s = cpu_specs;
1488 struct cpu_spec *t = &the_cpu_spec;
1489 int i;
1491 s = PTRRELOC(s);
1492 t = PTRRELOC(t);
1494 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
1495 if ((pvr & s->pvr_mask) == s->pvr_value) {
1497 * If we are overriding a previous value derived
1498 * from the real PVR with a new value obtained
1499 * using a logical PVR value, don't modify the
1500 * performance monitor fields.
1502 if (t->num_pmcs && !s->num_pmcs) {
1503 t->cpu_name = s->cpu_name;
1504 t->cpu_features = s->cpu_features;
1505 t->cpu_user_features = s->cpu_user_features;
1506 t->icache_bsize = s->icache_bsize;
1507 t->dcache_bsize = s->dcache_bsize;
1508 t->cpu_setup = s->cpu_setup;
1509 t->cpu_restore = s->cpu_restore;
1510 t->platform = s->platform;
1511 } else
1512 *t = *s;
1513 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
1514 #if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
1515 /* ppc64 and booke expect identify_cpu to also call
1516 * setup_cpu for that processor. I will consolidate
1517 * that at a later time, for now, just use #ifdef.
1518 * we also don't need to PTRRELOC the function pointer
1519 * on ppc64 and booke as we are running at 0 in real
1520 * mode on ppc64 and reloc_offset is always 0 on booke.
1522 if (s->cpu_setup) {
1523 s->cpu_setup(offset, s);
1525 #endif /* CONFIG_PPC64 || CONFIG_BOOKE */
1526 return s;
1528 BUG();
1529 return NULL;
1532 void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)
1534 struct fixup_entry {
1535 unsigned long mask;
1536 unsigned long value;
1537 long start_off;
1538 long end_off;
1539 } *fcur, *fend;
1541 fcur = fixup_start;
1542 fend = fixup_end;
1544 for (; fcur < fend; fcur++) {
1545 unsigned int *pstart, *pend, *p;
1547 if ((value & fcur->mask) == fcur->value)
1548 continue;
1550 /* These PTRRELOCs will disappear once the new scheme for
1551 * modules and vdso is implemented
1553 pstart = ((unsigned int *)fcur) + (fcur->start_off / 4);
1554 pend = ((unsigned int *)fcur) + (fcur->end_off / 4);
1556 for (p = pstart; p < pend; p++) {
1557 *p = 0x60000000u;
1558 asm volatile ("dcbst 0, %0" : : "r" (p));
1560 asm volatile ("sync" : : : "memory");
1561 for (p = pstart; p < pend; p++)
1562 asm volatile ("icbi 0,%0" : : "r" (p));
1563 asm volatile ("sync; isync" : : : "memory");