[POWERPC] 4xx: Add aliases node to 4xx dts files
[linux/fpc-iii.git] / arch / powerpc / kernel / cputable.c
blob85868fc6b290290bd399c991079c41e72c0ab9fe
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 .platform = "ppc603",
964 { /* e300c4 (e300c1, plus one IU) */
965 .pvr_mask = 0x7fff0000,
966 .pvr_value = 0x00860000,
967 .cpu_name = "e300c4",
968 .cpu_features = CPU_FTRS_E300,
969 .cpu_user_features = COMMON_USER,
970 .icache_bsize = 32,
971 .dcache_bsize = 32,
972 .cpu_setup = __setup_cpu_603,
973 .machine_check = machine_check_generic,
974 .platform = "ppc603",
976 { /* default match, we assume split I/D cache & TB (non-601)... */
977 .pvr_mask = 0x00000000,
978 .pvr_value = 0x00000000,
979 .cpu_name = "(generic PPC)",
980 .cpu_features = CPU_FTRS_CLASSIC32,
981 .cpu_user_features = COMMON_USER,
982 .icache_bsize = 32,
983 .dcache_bsize = 32,
984 .machine_check = machine_check_generic,
985 .platform = "ppc603",
987 #endif /* CLASSIC_PPC */
988 #ifdef CONFIG_8xx
989 { /* 8xx */
990 .pvr_mask = 0xffff0000,
991 .pvr_value = 0x00500000,
992 .cpu_name = "8xx",
993 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
994 * if the 8xx code is there.... */
995 .cpu_features = CPU_FTRS_8XX,
996 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
997 .icache_bsize = 16,
998 .dcache_bsize = 16,
999 .platform = "ppc823",
1001 #endif /* CONFIG_8xx */
1002 #ifdef CONFIG_40x
1003 { /* 403GC */
1004 .pvr_mask = 0xffffff00,
1005 .pvr_value = 0x00200200,
1006 .cpu_name = "403GC",
1007 .cpu_features = CPU_FTRS_40X,
1008 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1009 .icache_bsize = 16,
1010 .dcache_bsize = 16,
1011 .machine_check = machine_check_4xx,
1012 .platform = "ppc403",
1014 { /* 403GCX */
1015 .pvr_mask = 0xffffff00,
1016 .pvr_value = 0x00201400,
1017 .cpu_name = "403GCX",
1018 .cpu_features = CPU_FTRS_40X,
1019 .cpu_user_features = PPC_FEATURE_32 |
1020 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
1021 .icache_bsize = 16,
1022 .dcache_bsize = 16,
1023 .machine_check = machine_check_4xx,
1024 .platform = "ppc403",
1026 { /* 403G ?? */
1027 .pvr_mask = 0xffff0000,
1028 .pvr_value = 0x00200000,
1029 .cpu_name = "403G ??",
1030 .cpu_features = CPU_FTRS_40X,
1031 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1032 .icache_bsize = 16,
1033 .dcache_bsize = 16,
1034 .machine_check = machine_check_4xx,
1035 .platform = "ppc403",
1037 { /* 405GP */
1038 .pvr_mask = 0xffff0000,
1039 .pvr_value = 0x40110000,
1040 .cpu_name = "405GP",
1041 .cpu_features = CPU_FTRS_40X,
1042 .cpu_user_features = PPC_FEATURE_32 |
1043 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1044 .icache_bsize = 32,
1045 .dcache_bsize = 32,
1046 .machine_check = machine_check_4xx,
1047 .platform = "ppc405",
1049 { /* STB 03xxx */
1050 .pvr_mask = 0xffff0000,
1051 .pvr_value = 0x40130000,
1052 .cpu_name = "STB03xxx",
1053 .cpu_features = CPU_FTRS_40X,
1054 .cpu_user_features = PPC_FEATURE_32 |
1055 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1056 .icache_bsize = 32,
1057 .dcache_bsize = 32,
1058 .machine_check = machine_check_4xx,
1059 .platform = "ppc405",
1061 { /* STB 04xxx */
1062 .pvr_mask = 0xffff0000,
1063 .pvr_value = 0x41810000,
1064 .cpu_name = "STB04xxx",
1065 .cpu_features = CPU_FTRS_40X,
1066 .cpu_user_features = PPC_FEATURE_32 |
1067 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1068 .icache_bsize = 32,
1069 .dcache_bsize = 32,
1070 .machine_check = machine_check_4xx,
1071 .platform = "ppc405",
1073 { /* NP405L */
1074 .pvr_mask = 0xffff0000,
1075 .pvr_value = 0x41610000,
1076 .cpu_name = "NP405L",
1077 .cpu_features = CPU_FTRS_40X,
1078 .cpu_user_features = PPC_FEATURE_32 |
1079 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1080 .icache_bsize = 32,
1081 .dcache_bsize = 32,
1082 .machine_check = machine_check_4xx,
1083 .platform = "ppc405",
1085 { /* NP4GS3 */
1086 .pvr_mask = 0xffff0000,
1087 .pvr_value = 0x40B10000,
1088 .cpu_name = "NP4GS3",
1089 .cpu_features = CPU_FTRS_40X,
1090 .cpu_user_features = PPC_FEATURE_32 |
1091 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1092 .icache_bsize = 32,
1093 .dcache_bsize = 32,
1094 .machine_check = machine_check_4xx,
1095 .platform = "ppc405",
1097 { /* NP405H */
1098 .pvr_mask = 0xffff0000,
1099 .pvr_value = 0x41410000,
1100 .cpu_name = "NP405H",
1101 .cpu_features = CPU_FTRS_40X,
1102 .cpu_user_features = PPC_FEATURE_32 |
1103 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1104 .icache_bsize = 32,
1105 .dcache_bsize = 32,
1106 .machine_check = machine_check_4xx,
1107 .platform = "ppc405",
1109 { /* 405GPr */
1110 .pvr_mask = 0xffff0000,
1111 .pvr_value = 0x50910000,
1112 .cpu_name = "405GPr",
1113 .cpu_features = CPU_FTRS_40X,
1114 .cpu_user_features = PPC_FEATURE_32 |
1115 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1116 .icache_bsize = 32,
1117 .dcache_bsize = 32,
1118 .machine_check = machine_check_4xx,
1119 .platform = "ppc405",
1121 { /* STBx25xx */
1122 .pvr_mask = 0xffff0000,
1123 .pvr_value = 0x51510000,
1124 .cpu_name = "STBx25xx",
1125 .cpu_features = CPU_FTRS_40X,
1126 .cpu_user_features = PPC_FEATURE_32 |
1127 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1128 .icache_bsize = 32,
1129 .dcache_bsize = 32,
1130 .machine_check = machine_check_4xx,
1131 .platform = "ppc405",
1133 { /* 405LP */
1134 .pvr_mask = 0xffff0000,
1135 .pvr_value = 0x41F10000,
1136 .cpu_name = "405LP",
1137 .cpu_features = CPU_FTRS_40X,
1138 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1139 .icache_bsize = 32,
1140 .dcache_bsize = 32,
1141 .machine_check = machine_check_4xx,
1142 .platform = "ppc405",
1144 { /* Xilinx Virtex-II Pro */
1145 .pvr_mask = 0xfffff000,
1146 .pvr_value = 0x20010000,
1147 .cpu_name = "Virtex-II Pro",
1148 .cpu_features = CPU_FTRS_40X,
1149 .cpu_user_features = PPC_FEATURE_32 |
1150 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1151 .icache_bsize = 32,
1152 .dcache_bsize = 32,
1153 .machine_check = machine_check_4xx,
1154 .platform = "ppc405",
1156 { /* Xilinx Virtex-4 FX */
1157 .pvr_mask = 0xfffff000,
1158 .pvr_value = 0x20011000,
1159 .cpu_name = "Virtex-4 FX",
1160 .cpu_features = CPU_FTRS_40X,
1161 .cpu_user_features = PPC_FEATURE_32 |
1162 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1163 .icache_bsize = 32,
1164 .dcache_bsize = 32,
1165 .machine_check = machine_check_4xx,
1166 .platform = "ppc405",
1168 { /* 405EP */
1169 .pvr_mask = 0xffff0000,
1170 .pvr_value = 0x51210000,
1171 .cpu_name = "405EP",
1172 .cpu_features = CPU_FTRS_40X,
1173 .cpu_user_features = PPC_FEATURE_32 |
1174 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1175 .icache_bsize = 32,
1176 .dcache_bsize = 32,
1177 .machine_check = machine_check_4xx,
1178 .platform = "ppc405",
1180 { /* 405EX */
1181 .pvr_mask = 0xffff0000,
1182 .pvr_value = 0x12910000,
1183 .cpu_name = "405EX",
1184 .cpu_features = CPU_FTRS_40X,
1185 .cpu_user_features = PPC_FEATURE_32 |
1186 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1187 .icache_bsize = 32,
1188 .dcache_bsize = 32,
1189 .machine_check = machine_check_4xx,
1190 .platform = "ppc405",
1193 #endif /* CONFIG_40x */
1194 #ifdef CONFIG_44x
1196 .pvr_mask = 0xf0000fff,
1197 .pvr_value = 0x40000850,
1198 .cpu_name = "440GR Rev. A",
1199 .cpu_features = CPU_FTRS_44X,
1200 .cpu_user_features = COMMON_USER_BOOKE,
1201 .icache_bsize = 32,
1202 .dcache_bsize = 32,
1203 .machine_check = machine_check_4xx,
1204 .platform = "ppc440",
1206 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1207 .pvr_mask = 0xf0000fff,
1208 .pvr_value = 0x40000858,
1209 .cpu_name = "440EP Rev. A",
1210 .cpu_features = CPU_FTRS_44X,
1211 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1212 .icache_bsize = 32,
1213 .dcache_bsize = 32,
1214 .cpu_setup = __setup_cpu_440ep,
1215 .machine_check = machine_check_4xx,
1216 .platform = "ppc440",
1219 .pvr_mask = 0xf0000fff,
1220 .pvr_value = 0x400008d3,
1221 .cpu_name = "440GR Rev. B",
1222 .cpu_features = CPU_FTRS_44X,
1223 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1224 .icache_bsize = 32,
1225 .dcache_bsize = 32,
1226 .machine_check = machine_check_4xx,
1227 .platform = "ppc440",
1229 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1230 .pvr_mask = 0xf0000fff,
1231 .pvr_value = 0x400008db,
1232 .cpu_name = "440EP Rev. B",
1233 .cpu_features = CPU_FTRS_44X,
1234 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1235 .icache_bsize = 32,
1236 .dcache_bsize = 32,
1237 .cpu_setup = __setup_cpu_440ep,
1238 .machine_check = machine_check_4xx,
1239 .platform = "ppc440",
1241 { /* 440GRX */
1242 .pvr_mask = 0xf0000ffb,
1243 .pvr_value = 0x200008D0,
1244 .cpu_name = "440GRX",
1245 .cpu_features = CPU_FTRS_44X,
1246 .cpu_user_features = COMMON_USER_BOOKE,
1247 .icache_bsize = 32,
1248 .dcache_bsize = 32,
1249 .cpu_setup = __setup_cpu_440grx,
1250 .machine_check = machine_check_440A,
1251 .platform = "ppc440",
1253 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1254 .pvr_mask = 0xf0000ffb,
1255 .pvr_value = 0x200008D8,
1256 .cpu_name = "440EPX",
1257 .cpu_features = CPU_FTRS_44X,
1258 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1259 .icache_bsize = 32,
1260 .dcache_bsize = 32,
1261 .cpu_setup = __setup_cpu_440epx,
1262 .machine_check = machine_check_440A,
1263 .platform = "ppc440",
1265 { /* 440GP Rev. B */
1266 .pvr_mask = 0xf0000fff,
1267 .pvr_value = 0x40000440,
1268 .cpu_name = "440GP Rev. B",
1269 .cpu_features = CPU_FTRS_44X,
1270 .cpu_user_features = COMMON_USER_BOOKE,
1271 .icache_bsize = 32,
1272 .dcache_bsize = 32,
1273 .machine_check = machine_check_4xx,
1274 .platform = "ppc440gp",
1276 { /* 440GP Rev. C */
1277 .pvr_mask = 0xf0000fff,
1278 .pvr_value = 0x40000481,
1279 .cpu_name = "440GP Rev. C",
1280 .cpu_features = CPU_FTRS_44X,
1281 .cpu_user_features = COMMON_USER_BOOKE,
1282 .icache_bsize = 32,
1283 .dcache_bsize = 32,
1284 .machine_check = machine_check_4xx,
1285 .platform = "ppc440gp",
1287 { /* 440GX Rev. A */
1288 .pvr_mask = 0xf0000fff,
1289 .pvr_value = 0x50000850,
1290 .cpu_name = "440GX Rev. A",
1291 .cpu_features = CPU_FTRS_44X,
1292 .cpu_user_features = COMMON_USER_BOOKE,
1293 .icache_bsize = 32,
1294 .dcache_bsize = 32,
1295 .cpu_setup = __setup_cpu_440gx,
1296 .machine_check = machine_check_440A,
1297 .platform = "ppc440",
1299 { /* 440GX Rev. B */
1300 .pvr_mask = 0xf0000fff,
1301 .pvr_value = 0x50000851,
1302 .cpu_name = "440GX Rev. B",
1303 .cpu_features = CPU_FTRS_44X,
1304 .cpu_user_features = COMMON_USER_BOOKE,
1305 .icache_bsize = 32,
1306 .dcache_bsize = 32,
1307 .cpu_setup = __setup_cpu_440gx,
1308 .machine_check = machine_check_440A,
1309 .platform = "ppc440",
1311 { /* 440GX Rev. C */
1312 .pvr_mask = 0xf0000fff,
1313 .pvr_value = 0x50000892,
1314 .cpu_name = "440GX Rev. C",
1315 .cpu_features = CPU_FTRS_44X,
1316 .cpu_user_features = COMMON_USER_BOOKE,
1317 .icache_bsize = 32,
1318 .dcache_bsize = 32,
1319 .cpu_setup = __setup_cpu_440gx,
1320 .machine_check = machine_check_440A,
1321 .platform = "ppc440",
1323 { /* 440GX Rev. F */
1324 .pvr_mask = 0xf0000fff,
1325 .pvr_value = 0x50000894,
1326 .cpu_name = "440GX Rev. F",
1327 .cpu_features = CPU_FTRS_44X,
1328 .cpu_user_features = COMMON_USER_BOOKE,
1329 .icache_bsize = 32,
1330 .dcache_bsize = 32,
1331 .cpu_setup = __setup_cpu_440gx,
1332 .machine_check = machine_check_440A,
1333 .platform = "ppc440",
1335 { /* 440SP Rev. A */
1336 .pvr_mask = 0xfff00fff,
1337 .pvr_value = 0x53200891,
1338 .cpu_name = "440SP Rev. A",
1339 .cpu_features = CPU_FTRS_44X,
1340 .cpu_user_features = COMMON_USER_BOOKE,
1341 .icache_bsize = 32,
1342 .dcache_bsize = 32,
1343 .machine_check = machine_check_4xx,
1344 .platform = "ppc440",
1346 { /* 440SPe Rev. A */
1347 .pvr_mask = 0xfff00fff,
1348 .pvr_value = 0x53400890,
1349 .cpu_name = "440SPe Rev. A",
1350 .cpu_features = CPU_FTRS_44X,
1351 .cpu_user_features = COMMON_USER_BOOKE,
1352 .icache_bsize = 32,
1353 .dcache_bsize = 32,
1354 .cpu_setup = __setup_cpu_440spe,
1355 .machine_check = machine_check_440A,
1356 .platform = "ppc440",
1358 { /* 440SPe Rev. B */
1359 .pvr_mask = 0xfff00fff,
1360 .pvr_value = 0x53400891,
1361 .cpu_name = "440SPe Rev. B",
1362 .cpu_features = CPU_FTRS_44X,
1363 .cpu_user_features = COMMON_USER_BOOKE,
1364 .icache_bsize = 32,
1365 .dcache_bsize = 32,
1366 .cpu_setup = __setup_cpu_440spe,
1367 .machine_check = machine_check_440A,
1368 .platform = "ppc440",
1370 #endif /* CONFIG_44x */
1371 #ifdef CONFIG_FSL_BOOKE
1372 { /* e200z5 */
1373 .pvr_mask = 0xfff00000,
1374 .pvr_value = 0x81000000,
1375 .cpu_name = "e200z5",
1376 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1377 .cpu_features = CPU_FTRS_E200,
1378 .cpu_user_features = COMMON_USER_BOOKE |
1379 PPC_FEATURE_HAS_EFP_SINGLE |
1380 PPC_FEATURE_UNIFIED_CACHE,
1381 .dcache_bsize = 32,
1382 .machine_check = machine_check_e200,
1383 .platform = "ppc5554",
1385 { /* e200z6 */
1386 .pvr_mask = 0xfff00000,
1387 .pvr_value = 0x81100000,
1388 .cpu_name = "e200z6",
1389 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1390 .cpu_features = CPU_FTRS_E200,
1391 .cpu_user_features = COMMON_USER_BOOKE |
1392 PPC_FEATURE_HAS_SPE_COMP |
1393 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1394 PPC_FEATURE_UNIFIED_CACHE,
1395 .dcache_bsize = 32,
1396 .machine_check = machine_check_e200,
1397 .platform = "ppc5554",
1399 { /* e500 */
1400 .pvr_mask = 0xffff0000,
1401 .pvr_value = 0x80200000,
1402 .cpu_name = "e500",
1403 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1404 .cpu_features = CPU_FTRS_E500,
1405 .cpu_user_features = COMMON_USER_BOOKE |
1406 PPC_FEATURE_HAS_SPE_COMP |
1407 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
1408 .icache_bsize = 32,
1409 .dcache_bsize = 32,
1410 .num_pmcs = 4,
1411 .oprofile_cpu_type = "ppc/e500",
1412 .oprofile_type = PPC_OPROFILE_BOOKE,
1413 .machine_check = machine_check_e500,
1414 .platform = "ppc8540",
1416 { /* e500v2 */
1417 .pvr_mask = 0xffff0000,
1418 .pvr_value = 0x80210000,
1419 .cpu_name = "e500v2",
1420 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1421 .cpu_features = CPU_FTRS_E500_2,
1422 .cpu_user_features = COMMON_USER_BOOKE |
1423 PPC_FEATURE_HAS_SPE_COMP |
1424 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1425 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
1426 .icache_bsize = 32,
1427 .dcache_bsize = 32,
1428 .num_pmcs = 4,
1429 .oprofile_cpu_type = "ppc/e500",
1430 .oprofile_type = PPC_OPROFILE_BOOKE,
1431 .machine_check = machine_check_e500,
1432 .platform = "ppc8548",
1434 #endif
1435 #if !CLASSIC_PPC
1436 { /* default match */
1437 .pvr_mask = 0x00000000,
1438 .pvr_value = 0x00000000,
1439 .cpu_name = "(generic PPC)",
1440 .cpu_features = CPU_FTRS_GENERIC_32,
1441 .cpu_user_features = PPC_FEATURE_32,
1442 .icache_bsize = 32,
1443 .dcache_bsize = 32,
1444 .platform = "powerpc",
1446 #endif /* !CLASSIC_PPC */
1447 #endif /* CONFIG_PPC32 */
1450 static struct cpu_spec the_cpu_spec;
1452 struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
1454 struct cpu_spec *s = cpu_specs;
1455 struct cpu_spec *t = &the_cpu_spec;
1456 int i;
1458 s = PTRRELOC(s);
1459 t = PTRRELOC(t);
1461 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
1462 if ((pvr & s->pvr_mask) == s->pvr_value) {
1464 * If we are overriding a previous value derived
1465 * from the real PVR with a new value obtained
1466 * using a logical PVR value, don't modify the
1467 * performance monitor fields.
1469 if (t->num_pmcs && !s->num_pmcs) {
1470 t->cpu_name = s->cpu_name;
1471 t->cpu_features = s->cpu_features;
1472 t->cpu_user_features = s->cpu_user_features;
1473 t->icache_bsize = s->icache_bsize;
1474 t->dcache_bsize = s->dcache_bsize;
1475 t->cpu_setup = s->cpu_setup;
1476 t->cpu_restore = s->cpu_restore;
1477 t->platform = s->platform;
1478 } else
1479 *t = *s;
1480 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
1481 #if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
1482 /* ppc64 and booke expect identify_cpu to also call
1483 * setup_cpu for that processor. I will consolidate
1484 * that at a later time, for now, just use #ifdef.
1485 * we also don't need to PTRRELOC the function pointer
1486 * on ppc64 and booke as we are running at 0 in real
1487 * mode on ppc64 and reloc_offset is always 0 on booke.
1489 if (s->cpu_setup) {
1490 s->cpu_setup(offset, s);
1492 #endif /* CONFIG_PPC64 || CONFIG_BOOKE */
1493 return s;
1495 BUG();
1496 return NULL;
1499 void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)
1501 struct fixup_entry {
1502 unsigned long mask;
1503 unsigned long value;
1504 long start_off;
1505 long end_off;
1506 } *fcur, *fend;
1508 fcur = fixup_start;
1509 fend = fixup_end;
1511 for (; fcur < fend; fcur++) {
1512 unsigned int *pstart, *pend, *p;
1514 if ((value & fcur->mask) == fcur->value)
1515 continue;
1517 /* These PTRRELOCs will disappear once the new scheme for
1518 * modules and vdso is implemented
1520 pstart = ((unsigned int *)fcur) + (fcur->start_off / 4);
1521 pend = ((unsigned int *)fcur) + (fcur->end_off / 4);
1523 for (p = pstart; p < pend; p++) {
1524 *p = 0x60000000u;
1525 asm volatile ("dcbst 0, %0" : : "r" (p));
1527 asm volatile ("sync" : : : "memory");
1528 for (p = pstart; p < pend; p++)
1529 asm volatile ("icbi 0,%0" : : "r" (p));
1530 asm volatile ("sync; isync" : : : "memory");