Commit | Line | Data |
---|---|---|
1da177e4 | 1 | /* |
1da177e4 LT |
2 | * Copyright (C) 2001 Ben. Herrenschmidt (benh@kernel.crashing.org) |
3 | * | |
4920960f SR |
4 | * Modifications for ppc64: |
5 | * Copyright (C) 2003 Dave Engebretsen <engebret@us.ibm.com> | |
6 | * | |
1da177e4 LT |
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. | |
11 | */ | |
12 | ||
1da177e4 LT |
13 | #include <linux/string.h> |
14 | #include <linux/sched.h> | |
15 | #include <linux/threads.h> | |
16 | #include <linux/init.h> | |
400d2212 KG |
17 | #include <linux/module.h> |
18 | ||
19 | #include <asm/oprofile_impl.h> | |
1da177e4 | 20 | #include <asm/cputable.h> |
42c4aaad | 21 | #include <asm/prom.h> /* for PTRRELOC on ARCH=ppc */ |
1da177e4 | 22 | |
400d2212 | 23 | struct cpu_spec* cur_cpu_spec = NULL; |
4920960f | 24 | EXPORT_SYMBOL(cur_cpu_spec); |
1da177e4 | 25 | |
4920960f SR |
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 | |
32 | */ | |
b26f100d | 33 | #ifdef CONFIG_PPC32 |
8112753b VB |
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); | |
47c0bd1a | 36 | extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec); |
340ffd26 | 37 | extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec); |
47c0bd1a | 38 | extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec); |
400d2212 KG |
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); | |
4920960f | 47 | #endif /* CONFIG_PPC32 */ |
f39b7a55 | 48 | #ifdef CONFIG_PPC64 |
400d2212 | 49 | extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec); |
5b43d20a | 50 | extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec); |
1199919b | 51 | extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec); |
40d244d6 | 52 | extern void __restore_cpu_pa6t(void); |
f39b7a55 OJ |
53 | extern void __restore_cpu_ppc970(void); |
54 | #endif /* CONFIG_PPC64 */ | |
1da177e4 | 55 | |
1da177e4 LT |
56 | /* This table only contains "desktop" CPUs, it need to be filled with embedded |
57 | * ones as well... | |
58 | */ | |
4920960f SR |
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) | |
a7ddc5e8 | 62 | #define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4) |
aa5cb021 BH |
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) | |
03054d51 | 67 | #define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\ |
fab5db97 PM |
68 | PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \ |
69 | PPC_FEATURE_TRUE_LE) | |
b3ebd1d8 OJ |
70 | #define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\ |
71 | PPC_FEATURE_TRUE_LE | \ | |
72 | PPC_FEATURE_HAS_ALTIVEC_COMP) | |
80f15dc7 PM |
73 | #define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \ |
74 | PPC_FEATURE_BOOKE) | |
1da177e4 | 75 | |
87a72f9e | 76 | static struct cpu_spec __initdata cpu_specs[] = { |
4920960f SR |
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, | |
fab5db97 | 83 | .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE, |
4920960f SR |
84 | .icache_bsize = 128, |
85 | .dcache_bsize = 128, | |
86 | .num_pmcs = 8, | |
1bd2e5ae | 87 | .pmc_type = PPC_PMC_IBM, |
4920960f | 88 | .oprofile_cpu_type = "ppc64/power3", |
7a45fb19 | 89 | .oprofile_type = PPC_OPROFILE_RS64, |
47c0bd1a | 90 | .machine_check = machine_check_generic, |
80f15dc7 | 91 | .platform = "power3", |
4920960f SR |
92 | }, |
93 | { /* Power3+ */ | |
94 | .pvr_mask = 0xffff0000, | |
95 | .pvr_value = 0x00410000, | |
96 | .cpu_name = "POWER3 (630+)", | |
97 | .cpu_features = CPU_FTRS_POWER3, | |
fab5db97 | 98 | .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE, |
4920960f SR |
99 | .icache_bsize = 128, |
100 | .dcache_bsize = 128, | |
101 | .num_pmcs = 8, | |
1bd2e5ae | 102 | .pmc_type = PPC_PMC_IBM, |
4920960f | 103 | .oprofile_cpu_type = "ppc64/power3", |
7a45fb19 | 104 | .oprofile_type = PPC_OPROFILE_RS64, |
47c0bd1a | 105 | .machine_check = machine_check_generic, |
80f15dc7 | 106 | .platform = "power3", |
4920960f SR |
107 | }, |
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, | |
1bd2e5ae | 117 | .pmc_type = PPC_PMC_IBM, |
4920960f | 118 | .oprofile_cpu_type = "ppc64/rs64", |
7a45fb19 | 119 | .oprofile_type = PPC_OPROFILE_RS64, |
47c0bd1a | 120 | .machine_check = machine_check_generic, |
80f15dc7 | 121 | .platform = "rs64", |
4920960f SR |
122 | }, |
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, | |
1bd2e5ae | 132 | .pmc_type = PPC_PMC_IBM, |
4920960f | 133 | .oprofile_cpu_type = "ppc64/rs64", |
7a45fb19 | 134 | .oprofile_type = PPC_OPROFILE_RS64, |
47c0bd1a | 135 | .machine_check = machine_check_generic, |
80f15dc7 | 136 | .platform = "rs64", |
4920960f SR |
137 | }, |
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, | |
1bd2e5ae | 147 | .pmc_type = PPC_PMC_IBM, |
4920960f | 148 | .oprofile_cpu_type = "ppc64/rs64", |
7a45fb19 | 149 | .oprofile_type = PPC_OPROFILE_RS64, |
47c0bd1a | 150 | .machine_check = machine_check_generic, |
80f15dc7 | 151 | .platform = "rs64", |
4920960f SR |
152 | }, |
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, | |
1bd2e5ae | 162 | .pmc_type = PPC_PMC_IBM, |
4920960f | 163 | .oprofile_cpu_type = "ppc64/rs64", |
7a45fb19 | 164 | .oprofile_type = PPC_OPROFILE_RS64, |
47c0bd1a | 165 | .machine_check = machine_check_generic, |
80f15dc7 | 166 | .platform = "rs64", |
4920960f SR |
167 | }, |
168 | { /* Power4 */ | |
169 | .pvr_mask = 0xffff0000, | |
170 | .pvr_value = 0x00350000, | |
171 | .cpu_name = "POWER4 (gp)", | |
172 | .cpu_features = CPU_FTRS_POWER4, | |
a7ddc5e8 | 173 | .cpu_user_features = COMMON_USER_POWER4, |
4920960f SR |
174 | .icache_bsize = 128, |
175 | .dcache_bsize = 128, | |
176 | .num_pmcs = 8, | |
1bd2e5ae | 177 | .pmc_type = PPC_PMC_IBM, |
4920960f | 178 | .oprofile_cpu_type = "ppc64/power4", |
7a45fb19 | 179 | .oprofile_type = PPC_OPROFILE_POWER4, |
47c0bd1a | 180 | .machine_check = machine_check_generic, |
80f15dc7 | 181 | .platform = "power4", |
4920960f SR |
182 | }, |
183 | { /* Power4+ */ | |
184 | .pvr_mask = 0xffff0000, | |
185 | .pvr_value = 0x00380000, | |
186 | .cpu_name = "POWER4+ (gq)", | |
187 | .cpu_features = CPU_FTRS_POWER4, | |
a7ddc5e8 | 188 | .cpu_user_features = COMMON_USER_POWER4, |
4920960f SR |
189 | .icache_bsize = 128, |
190 | .dcache_bsize = 128, | |
191 | .num_pmcs = 8, | |
1bd2e5ae | 192 | .pmc_type = PPC_PMC_IBM, |
4920960f | 193 | .oprofile_cpu_type = "ppc64/power4", |
7a45fb19 | 194 | .oprofile_type = PPC_OPROFILE_POWER4, |
47c0bd1a | 195 | .machine_check = machine_check_generic, |
80f15dc7 | 196 | .platform = "power4", |
4920960f SR |
197 | }, |
198 | { /* PPC970 */ | |
199 | .pvr_mask = 0xffff0000, | |
200 | .pvr_value = 0x00390000, | |
201 | .cpu_name = "PPC970", | |
202 | .cpu_features = CPU_FTRS_PPC970, | |
a7ddc5e8 | 203 | .cpu_user_features = COMMON_USER_POWER4 | |
4920960f SR |
204 | PPC_FEATURE_HAS_ALTIVEC_COMP, |
205 | .icache_bsize = 128, | |
206 | .dcache_bsize = 128, | |
207 | .num_pmcs = 8, | |
1bd2e5ae | 208 | .pmc_type = PPC_PMC_IBM, |
4920960f | 209 | .cpu_setup = __setup_cpu_ppc970, |
f39b7a55 | 210 | .cpu_restore = __restore_cpu_ppc970, |
4920960f | 211 | .oprofile_cpu_type = "ppc64/970", |
7a45fb19 | 212 | .oprofile_type = PPC_OPROFILE_POWER4, |
47c0bd1a | 213 | .machine_check = machine_check_generic, |
80f15dc7 | 214 | .platform = "ppc970", |
4920960f | 215 | }, |
4920960f SR |
216 | { /* PPC970FX */ |
217 | .pvr_mask = 0xffff0000, | |
218 | .pvr_value = 0x003c0000, | |
219 | .cpu_name = "PPC970FX", | |
4920960f | 220 | .cpu_features = CPU_FTRS_PPC970, |
a7ddc5e8 | 221 | .cpu_user_features = COMMON_USER_POWER4 | |
4920960f SR |
222 | PPC_FEATURE_HAS_ALTIVEC_COMP, |
223 | .icache_bsize = 128, | |
224 | .dcache_bsize = 128, | |
225 | .num_pmcs = 8, | |
1bd2e5ae | 226 | .pmc_type = PPC_PMC_IBM, |
4920960f | 227 | .cpu_setup = __setup_cpu_ppc970, |
f39b7a55 | 228 | .cpu_restore = __restore_cpu_ppc970, |
4920960f | 229 | .oprofile_cpu_type = "ppc64/970", |
7a45fb19 | 230 | .oprofile_type = PPC_OPROFILE_POWER4, |
47c0bd1a | 231 | .machine_check = machine_check_generic, |
80f15dc7 | 232 | .platform = "ppc970", |
3546e811 OJ |
233 | }, |
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, | |
2fae4985 | 244 | .pmc_type = PPC_PMC_IBM, |
3546e811 OJ |
245 | .cpu_setup = __setup_cpu_ppc970, |
246 | .cpu_restore = __restore_cpu_ppc970, | |
247 | .oprofile_cpu_type = "ppc64/970MP", | |
248 | .oprofile_type = PPC_OPROFILE_POWER4, | |
47c0bd1a | 249 | .machine_check = machine_check_generic, |
3546e811 | 250 | .platform = "ppc970", |
4920960f | 251 | }, |
4920960f SR |
252 | { /* PPC970MP */ |
253 | .pvr_mask = 0xffff0000, | |
254 | .pvr_value = 0x00440000, | |
255 | .cpu_name = "PPC970MP", | |
256 | .cpu_features = CPU_FTRS_PPC970, | |
a7ddc5e8 | 257 | .cpu_user_features = COMMON_USER_POWER4 | |
4920960f SR |
258 | PPC_FEATURE_HAS_ALTIVEC_COMP, |
259 | .icache_bsize = 128, | |
260 | .dcache_bsize = 128, | |
87af41be | 261 | .num_pmcs = 8, |
2fae4985 | 262 | .pmc_type = PPC_PMC_IBM, |
5b43d20a | 263 | .cpu_setup = __setup_cpu_ppc970MP, |
f39b7a55 | 264 | .cpu_restore = __restore_cpu_ppc970, |
fecb352f | 265 | .oprofile_cpu_type = "ppc64/970MP", |
7a45fb19 | 266 | .oprofile_type = PPC_OPROFILE_POWER4, |
47c0bd1a | 267 | .machine_check = machine_check_generic, |
80f15dc7 | 268 | .platform = "ppc970", |
4920960f | 269 | }, |
362ff7b2 JM |
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, | |
1bd2e5ae | 280 | .pmc_type = PPC_PMC_IBM, |
362ff7b2 JM |
281 | .cpu_setup = __setup_cpu_ppc970, |
282 | .oprofile_cpu_type = "ppc64/970", | |
283 | .oprofile_type = PPC_OPROFILE_POWER4, | |
47c0bd1a | 284 | .machine_check = machine_check_generic, |
362ff7b2 JM |
285 | .platform = "ppc970", |
286 | }, | |
3c726f8d | 287 | { /* Power5 GR */ |
4920960f SR |
288 | .pvr_mask = 0xffff0000, |
289 | .pvr_value = 0x003a0000, | |
290 | .cpu_name = "POWER5 (gr)", | |
291 | .cpu_features = CPU_FTRS_POWER5, | |
a7ddc5e8 | 292 | .cpu_user_features = COMMON_USER_POWER5, |
4920960f SR |
293 | .icache_bsize = 128, |
294 | .dcache_bsize = 128, | |
295 | .num_pmcs = 6, | |
1bd2e5ae | 296 | .pmc_type = PPC_PMC_IBM, |
4920960f | 297 | .oprofile_cpu_type = "ppc64/power5", |
7a45fb19 | 298 | .oprofile_type = PPC_OPROFILE_POWER4, |
e78dbc80 MN |
299 | /* SIHV / SIPR bits are implemented on POWER4+ (GQ) |
300 | * and above but only works on POWER5 and above | |
301 | */ | |
302 | .oprofile_mmcra_sihv = MMCRA_SIHV, | |
303 | .oprofile_mmcra_sipr = MMCRA_SIPR, | |
47c0bd1a | 304 | .machine_check = machine_check_generic, |
80f15dc7 | 305 | .platform = "power5", |
4920960f | 306 | }, |
31a12cec MW |
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, | |
47c0bd1a | 320 | .machine_check = machine_check_generic, |
31a12cec MW |
321 | .platform = "power5+", |
322 | }, | |
3c726f8d | 323 | { /* Power5 GS */ |
4920960f SR |
324 | .pvr_mask = 0xffff0000, |
325 | .pvr_value = 0x003b0000, | |
834608f7 | 326 | .cpu_name = "POWER5+ (gs)", |
4920960f | 327 | .cpu_features = CPU_FTRS_POWER5, |
a7ddc5e8 | 328 | .cpu_user_features = COMMON_USER_POWER5_PLUS, |
4920960f SR |
329 | .icache_bsize = 128, |
330 | .dcache_bsize = 128, | |
331 | .num_pmcs = 6, | |
1bd2e5ae | 332 | .pmc_type = PPC_PMC_IBM, |
834608f7 | 333 | .oprofile_cpu_type = "ppc64/power5+", |
7a45fb19 | 334 | .oprofile_type = PPC_OPROFILE_POWER4, |
e78dbc80 MN |
335 | .oprofile_mmcra_sihv = MMCRA_SIHV, |
336 | .oprofile_mmcra_sipr = MMCRA_SIPR, | |
47c0bd1a | 337 | .machine_check = machine_check_generic, |
80f15dc7 | 338 | .platform = "power5+", |
4920960f | 339 | }, |
974a76f5 PM |
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, | |
47c0bd1a | 348 | .machine_check = machine_check_generic, |
974a76f5 PM |
349 | .platform = "power5+", |
350 | }, | |
03054d51 AB |
351 | { /* Power6 */ |
352 | .pvr_mask = 0xffff0000, | |
353 | .pvr_value = 0x003e0000, | |
974a76f5 PM |
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, | |
2fae4985 | 361 | .pmc_type = PPC_PMC_IBM, |
974a76f5 PM |
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, | |
47c0bd1a | 368 | .machine_check = machine_check_generic, |
974a76f5 PM |
369 | .platform = "power6x", |
370 | }, | |
371 | { /* 2.05-compliant processor, i.e. Power6 "architected" mode */ | |
372 | .pvr_mask = 0xffffffff, | |
373 | .pvr_value = 0x0f000002, | |
374 | .cpu_name = "POWER6 (architected)", | |
03054d51 AB |
375 | .cpu_features = CPU_FTRS_POWER6, |
376 | .cpu_user_features = COMMON_USER_POWER6, | |
377 | .icache_bsize = 128, | |
378 | .dcache_bsize = 128, | |
47c0bd1a | 379 | .machine_check = machine_check_generic, |
03054d51 AB |
380 | .platform = "power6", |
381 | }, | |
c902be71 | 382 | { /* Cell Broadband Engine */ |
4920960f SR |
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 | | |
aa5cb021 BH |
388 | PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP | |
389 | PPC_FEATURE_SMT, | |
4920960f SR |
390 | .icache_bsize = 128, |
391 | .dcache_bsize = 128, | |
18f2190d | 392 | .num_pmcs = 4, |
1bd2e5ae | 393 | .pmc_type = PPC_PMC_IBM, |
18f2190d MJ |
394 | .oprofile_cpu_type = "ppc64/cell-be", |
395 | .oprofile_type = PPC_OPROFILE_CELL, | |
47c0bd1a | 396 | .machine_check = machine_check_generic, |
80f15dc7 | 397 | .platform = "ppc-cell-be", |
4920960f | 398 | }, |
b3ebd1d8 OJ |
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, | |
1bd2e5ae | 408 | .pmc_type = PPC_PMC_PA6T, |
1199919b OJ |
409 | .cpu_setup = __setup_cpu_pa6t, |
410 | .cpu_restore = __restore_cpu_pa6t, | |
25fc530e OJ |
411 | .oprofile_cpu_type = "ppc64/pa6t", |
412 | .oprofile_type = PPC_OPROFILE_PA6T, | |
47c0bd1a | 413 | .machine_check = machine_check_generic, |
b3ebd1d8 OJ |
414 | .platform = "pa6t", |
415 | }, | |
4920960f SR |
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, | |
1bd2e5ae | 425 | .pmc_type = PPC_PMC_IBM, |
47c0bd1a | 426 | .machine_check = machine_check_generic, |
80f15dc7 | 427 | .platform = "power4", |
4920960f SR |
428 | } |
429 | #endif /* CONFIG_PPC64 */ | |
430 | #ifdef CONFIG_PPC32 | |
1da177e4 | 431 | #if CLASSIC_PPC |
4920960f | 432 | { /* 601 */ |
1da177e4 LT |
433 | .pvr_mask = 0xffff0000, |
434 | .pvr_value = 0x00010000, | |
435 | .cpu_name = "601", | |
10b35d99 | 436 | .cpu_features = CPU_FTRS_PPC601, |
4920960f | 437 | .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR | |
d8e998c5 | 438 | PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB, |
1da177e4 LT |
439 | .icache_bsize = 32, |
440 | .dcache_bsize = 32, | |
47c0bd1a | 441 | .machine_check = machine_check_generic, |
80f15dc7 | 442 | .platform = "ppc601", |
1da177e4 LT |
443 | }, |
444 | { /* 603 */ | |
445 | .pvr_mask = 0xffff0000, | |
446 | .pvr_value = 0x00030000, | |
447 | .cpu_name = "603", | |
10b35d99 | 448 | .cpu_features = CPU_FTRS_603, |
fab5db97 | 449 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
450 | .icache_bsize = 32, |
451 | .dcache_bsize = 32, | |
80f15dc7 | 452 | .cpu_setup = __setup_cpu_603, |
47c0bd1a | 453 | .machine_check = machine_check_generic, |
80f15dc7 | 454 | .platform = "ppc603", |
1da177e4 LT |
455 | }, |
456 | { /* 603e */ | |
457 | .pvr_mask = 0xffff0000, | |
458 | .pvr_value = 0x00060000, | |
459 | .cpu_name = "603e", | |
10b35d99 | 460 | .cpu_features = CPU_FTRS_603, |
fab5db97 | 461 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
462 | .icache_bsize = 32, |
463 | .dcache_bsize = 32, | |
80f15dc7 | 464 | .cpu_setup = __setup_cpu_603, |
47c0bd1a | 465 | .machine_check = machine_check_generic, |
80f15dc7 | 466 | .platform = "ppc603", |
1da177e4 LT |
467 | }, |
468 | { /* 603ev */ | |
469 | .pvr_mask = 0xffff0000, | |
470 | .pvr_value = 0x00070000, | |
471 | .cpu_name = "603ev", | |
10b35d99 | 472 | .cpu_features = CPU_FTRS_603, |
fab5db97 | 473 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
474 | .icache_bsize = 32, |
475 | .dcache_bsize = 32, | |
80f15dc7 | 476 | .cpu_setup = __setup_cpu_603, |
47c0bd1a | 477 | .machine_check = machine_check_generic, |
80f15dc7 | 478 | .platform = "ppc603", |
1da177e4 LT |
479 | }, |
480 | { /* 604 */ | |
481 | .pvr_mask = 0xffff0000, | |
482 | .pvr_value = 0x00040000, | |
483 | .cpu_name = "604", | |
10b35d99 | 484 | .cpu_features = CPU_FTRS_604, |
fab5db97 | 485 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
486 | .icache_bsize = 32, |
487 | .dcache_bsize = 32, | |
488 | .num_pmcs = 2, | |
80f15dc7 | 489 | .cpu_setup = __setup_cpu_604, |
47c0bd1a | 490 | .machine_check = machine_check_generic, |
80f15dc7 | 491 | .platform = "ppc604", |
1da177e4 LT |
492 | }, |
493 | { /* 604e */ | |
494 | .pvr_mask = 0xfffff000, | |
495 | .pvr_value = 0x00090000, | |
496 | .cpu_name = "604e", | |
10b35d99 | 497 | .cpu_features = CPU_FTRS_604, |
fab5db97 | 498 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
499 | .icache_bsize = 32, |
500 | .dcache_bsize = 32, | |
501 | .num_pmcs = 4, | |
80f15dc7 | 502 | .cpu_setup = __setup_cpu_604, |
47c0bd1a | 503 | .machine_check = machine_check_generic, |
80f15dc7 | 504 | .platform = "ppc604", |
1da177e4 LT |
505 | }, |
506 | { /* 604r */ | |
507 | .pvr_mask = 0xffff0000, | |
508 | .pvr_value = 0x00090000, | |
509 | .cpu_name = "604r", | |
10b35d99 | 510 | .cpu_features = CPU_FTRS_604, |
fab5db97 | 511 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
512 | .icache_bsize = 32, |
513 | .dcache_bsize = 32, | |
514 | .num_pmcs = 4, | |
80f15dc7 | 515 | .cpu_setup = __setup_cpu_604, |
47c0bd1a | 516 | .machine_check = machine_check_generic, |
80f15dc7 | 517 | .platform = "ppc604", |
1da177e4 LT |
518 | }, |
519 | { /* 604ev */ | |
520 | .pvr_mask = 0xffff0000, | |
521 | .pvr_value = 0x000a0000, | |
522 | .cpu_name = "604ev", | |
10b35d99 | 523 | .cpu_features = CPU_FTRS_604, |
fab5db97 | 524 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
525 | .icache_bsize = 32, |
526 | .dcache_bsize = 32, | |
527 | .num_pmcs = 4, | |
80f15dc7 | 528 | .cpu_setup = __setup_cpu_604, |
47c0bd1a | 529 | .machine_check = machine_check_generic, |
80f15dc7 | 530 | .platform = "ppc604", |
1da177e4 LT |
531 | }, |
532 | { /* 740/750 (0x4202, don't support TAU ?) */ | |
533 | .pvr_mask = 0xffffffff, | |
534 | .pvr_value = 0x00084202, | |
535 | .cpu_name = "740/750", | |
10b35d99 | 536 | .cpu_features = CPU_FTRS_740_NOTAU, |
fab5db97 | 537 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
538 | .icache_bsize = 32, |
539 | .dcache_bsize = 32, | |
540 | .num_pmcs = 4, | |
80f15dc7 | 541 | .cpu_setup = __setup_cpu_750, |
47c0bd1a | 542 | .machine_check = machine_check_generic, |
80f15dc7 | 543 | .platform = "ppc750", |
1da177e4 | 544 | }, |
1da177e4 LT |
545 | { /* 750CX (80100 and 8010x?) */ |
546 | .pvr_mask = 0xfffffff0, | |
547 | .pvr_value = 0x00080100, | |
548 | .cpu_name = "750CX", | |
10b35d99 | 549 | .cpu_features = CPU_FTRS_750, |
fab5db97 | 550 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
551 | .icache_bsize = 32, |
552 | .dcache_bsize = 32, | |
553 | .num_pmcs = 4, | |
80f15dc7 | 554 | .cpu_setup = __setup_cpu_750cx, |
47c0bd1a | 555 | .machine_check = machine_check_generic, |
80f15dc7 | 556 | .platform = "ppc750", |
1da177e4 LT |
557 | }, |
558 | { /* 750CX (82201 and 82202) */ | |
559 | .pvr_mask = 0xfffffff0, | |
560 | .pvr_value = 0x00082200, | |
561 | .cpu_name = "750CX", | |
10b35d99 | 562 | .cpu_features = CPU_FTRS_750, |
fab5db97 | 563 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
564 | .icache_bsize = 32, |
565 | .dcache_bsize = 32, | |
566 | .num_pmcs = 4, | |
80f15dc7 | 567 | .cpu_setup = __setup_cpu_750cx, |
47c0bd1a | 568 | .machine_check = machine_check_generic, |
80f15dc7 | 569 | .platform = "ppc750", |
1da177e4 LT |
570 | }, |
571 | { /* 750CXe (82214) */ | |
572 | .pvr_mask = 0xfffffff0, | |
573 | .pvr_value = 0x00082210, | |
574 | .cpu_name = "750CXe", | |
10b35d99 | 575 | .cpu_features = CPU_FTRS_750, |
fab5db97 | 576 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
577 | .icache_bsize = 32, |
578 | .dcache_bsize = 32, | |
579 | .num_pmcs = 4, | |
80f15dc7 | 580 | .cpu_setup = __setup_cpu_750cx, |
47c0bd1a | 581 | .machine_check = machine_check_generic, |
80f15dc7 | 582 | .platform = "ppc750", |
1da177e4 | 583 | }, |
7c31625a AO |
584 | { /* 750CXe "Gekko" (83214) */ |
585 | .pvr_mask = 0xffffffff, | |
586 | .pvr_value = 0x00083214, | |
587 | .cpu_name = "750CXe", | |
10b35d99 | 588 | .cpu_features = CPU_FTRS_750, |
fab5db97 | 589 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
7c31625a AO |
590 | .icache_bsize = 32, |
591 | .dcache_bsize = 32, | |
592 | .num_pmcs = 4, | |
80f15dc7 | 593 | .cpu_setup = __setup_cpu_750cx, |
47c0bd1a | 594 | .machine_check = machine_check_generic, |
80f15dc7 | 595 | .platform = "ppc750", |
7c31625a | 596 | }, |
cfbff8a3 JM |
597 | { /* 750CL */ |
598 | .pvr_mask = 0xfffff0f0, | |
599 | .pvr_value = 0x00087010, | |
600 | .cpu_name = "750CL", | |
a14c4508 | 601 | .cpu_features = CPU_FTRS_750CL, |
cfbff8a3 JM |
602 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
603 | .icache_bsize = 32, | |
604 | .dcache_bsize = 32, | |
605 | .num_pmcs = 4, | |
a14c4508 | 606 | .cpu_setup = __setup_cpu_750, |
47c0bd1a | 607 | .machine_check = machine_check_generic, |
cfbff8a3 JM |
608 | .platform = "ppc750", |
609 | }, | |
ac1ff047 AO |
610 | { /* 745/755 */ |
611 | .pvr_mask = 0xfffff000, | |
612 | .pvr_value = 0x00083000, | |
613 | .cpu_name = "745/755", | |
10b35d99 | 614 | .cpu_features = CPU_FTRS_750, |
fab5db97 | 615 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
ac1ff047 AO |
616 | .icache_bsize = 32, |
617 | .dcache_bsize = 32, | |
618 | .num_pmcs = 4, | |
80f15dc7 | 619 | .cpu_setup = __setup_cpu_750, |
47c0bd1a | 620 | .machine_check = machine_check_generic, |
80f15dc7 | 621 | .platform = "ppc750", |
ac1ff047 | 622 | }, |
1da177e4 LT |
623 | { /* 750FX rev 1.x */ |
624 | .pvr_mask = 0xffffff00, | |
625 | .pvr_value = 0x70000100, | |
626 | .cpu_name = "750FX", | |
10b35d99 | 627 | .cpu_features = CPU_FTRS_750FX1, |
fab5db97 | 628 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
629 | .icache_bsize = 32, |
630 | .dcache_bsize = 32, | |
631 | .num_pmcs = 4, | |
80f15dc7 | 632 | .cpu_setup = __setup_cpu_750, |
47c0bd1a | 633 | .machine_check = machine_check_generic, |
80f15dc7 | 634 | .platform = "ppc750", |
1da177e4 LT |
635 | }, |
636 | { /* 750FX rev 2.0 must disable HID0[DPM] */ | |
637 | .pvr_mask = 0xffffffff, | |
638 | .pvr_value = 0x70000200, | |
639 | .cpu_name = "750FX", | |
10b35d99 | 640 | .cpu_features = CPU_FTRS_750FX2, |
fab5db97 | 641 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
642 | .icache_bsize = 32, |
643 | .dcache_bsize = 32, | |
644 | .num_pmcs = 4, | |
80f15dc7 | 645 | .cpu_setup = __setup_cpu_750, |
47c0bd1a | 646 | .machine_check = machine_check_generic, |
80f15dc7 | 647 | .platform = "ppc750", |
1da177e4 LT |
648 | }, |
649 | { /* 750FX (All revs except 2.0) */ | |
650 | .pvr_mask = 0xffff0000, | |
651 | .pvr_value = 0x70000000, | |
652 | .cpu_name = "750FX", | |
10b35d99 | 653 | .cpu_features = CPU_FTRS_750FX, |
fab5db97 | 654 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
655 | .icache_bsize = 32, |
656 | .dcache_bsize = 32, | |
657 | .num_pmcs = 4, | |
80f15dc7 | 658 | .cpu_setup = __setup_cpu_750fx, |
47c0bd1a | 659 | .machine_check = machine_check_generic, |
80f15dc7 | 660 | .platform = "ppc750", |
1da177e4 LT |
661 | }, |
662 | { /* 750GX */ | |
663 | .pvr_mask = 0xffff0000, | |
664 | .pvr_value = 0x70020000, | |
665 | .cpu_name = "750GX", | |
10b35d99 | 666 | .cpu_features = CPU_FTRS_750GX, |
fab5db97 | 667 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
668 | .icache_bsize = 32, |
669 | .dcache_bsize = 32, | |
670 | .num_pmcs = 4, | |
80f15dc7 | 671 | .cpu_setup = __setup_cpu_750fx, |
47c0bd1a | 672 | .machine_check = machine_check_generic, |
80f15dc7 | 673 | .platform = "ppc750", |
1da177e4 LT |
674 | }, |
675 | { /* 740/750 (L2CR bit need fixup for 740) */ | |
676 | .pvr_mask = 0xffff0000, | |
677 | .pvr_value = 0x00080000, | |
678 | .cpu_name = "740/750", | |
10b35d99 | 679 | .cpu_features = CPU_FTRS_740, |
fab5db97 | 680 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
681 | .icache_bsize = 32, |
682 | .dcache_bsize = 32, | |
683 | .num_pmcs = 4, | |
80f15dc7 | 684 | .cpu_setup = __setup_cpu_750, |
47c0bd1a | 685 | .machine_check = machine_check_generic, |
80f15dc7 | 686 | .platform = "ppc750", |
1da177e4 LT |
687 | }, |
688 | { /* 7400 rev 1.1 ? (no TAU) */ | |
689 | .pvr_mask = 0xffffffff, | |
690 | .pvr_value = 0x000c1101, | |
691 | .cpu_name = "7400 (1.1)", | |
10b35d99 | 692 | .cpu_features = CPU_FTRS_7400_NOTAU, |
fab5db97 PM |
693 | .cpu_user_features = COMMON_USER | |
694 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, | |
1da177e4 LT |
695 | .icache_bsize = 32, |
696 | .dcache_bsize = 32, | |
697 | .num_pmcs = 4, | |
80f15dc7 | 698 | .cpu_setup = __setup_cpu_7400, |
47c0bd1a | 699 | .machine_check = machine_check_generic, |
80f15dc7 | 700 | .platform = "ppc7400", |
1da177e4 LT |
701 | }, |
702 | { /* 7400 */ | |
703 | .pvr_mask = 0xffff0000, | |
704 | .pvr_value = 0x000c0000, | |
705 | .cpu_name = "7400", | |
10b35d99 | 706 | .cpu_features = CPU_FTRS_7400, |
fab5db97 PM |
707 | .cpu_user_features = COMMON_USER | |
708 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, | |
1da177e4 LT |
709 | .icache_bsize = 32, |
710 | .dcache_bsize = 32, | |
711 | .num_pmcs = 4, | |
80f15dc7 | 712 | .cpu_setup = __setup_cpu_7400, |
47c0bd1a | 713 | .machine_check = machine_check_generic, |
80f15dc7 | 714 | .platform = "ppc7400", |
1da177e4 LT |
715 | }, |
716 | { /* 7410 */ | |
717 | .pvr_mask = 0xffff0000, | |
718 | .pvr_value = 0x800c0000, | |
719 | .cpu_name = "7410", | |
10b35d99 | 720 | .cpu_features = CPU_FTRS_7400, |
fab5db97 PM |
721 | .cpu_user_features = COMMON_USER | |
722 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, | |
1da177e4 LT |
723 | .icache_bsize = 32, |
724 | .dcache_bsize = 32, | |
725 | .num_pmcs = 4, | |
80f15dc7 | 726 | .cpu_setup = __setup_cpu_7410, |
47c0bd1a | 727 | .machine_check = machine_check_generic, |
80f15dc7 | 728 | .platform = "ppc7400", |
1da177e4 LT |
729 | }, |
730 | { /* 7450 2.0 - no doze/nap */ | |
731 | .pvr_mask = 0xffffffff, | |
732 | .pvr_value = 0x80000200, | |
733 | .cpu_name = "7450", | |
10b35d99 | 734 | .cpu_features = CPU_FTRS_7450_20, |
fab5db97 PM |
735 | .cpu_user_features = COMMON_USER | |
736 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, | |
1da177e4 LT |
737 | .icache_bsize = 32, |
738 | .dcache_bsize = 32, | |
739 | .num_pmcs = 6, | |
555d97ac | 740 | .cpu_setup = __setup_cpu_745x, |
555d97ac | 741 | .oprofile_cpu_type = "ppc/7450", |
7a45fb19 | 742 | .oprofile_type = PPC_OPROFILE_G4, |
47c0bd1a | 743 | .machine_check = machine_check_generic, |
80f15dc7 | 744 | .platform = "ppc7450", |
1da177e4 LT |
745 | }, |
746 | { /* 7450 2.1 */ | |
747 | .pvr_mask = 0xffffffff, | |
748 | .pvr_value = 0x80000201, | |
749 | .cpu_name = "7450", | |
10b35d99 | 750 | .cpu_features = CPU_FTRS_7450_21, |
fab5db97 PM |
751 | .cpu_user_features = COMMON_USER | |
752 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, | |
1da177e4 LT |
753 | .icache_bsize = 32, |
754 | .dcache_bsize = 32, | |
755 | .num_pmcs = 6, | |
555d97ac | 756 | .cpu_setup = __setup_cpu_745x, |
555d97ac | 757 | .oprofile_cpu_type = "ppc/7450", |
7a45fb19 | 758 | .oprofile_type = PPC_OPROFILE_G4, |
47c0bd1a | 759 | .machine_check = machine_check_generic, |
80f15dc7 | 760 | .platform = "ppc7450", |
1da177e4 LT |
761 | }, |
762 | { /* 7450 2.3 and newer */ | |
763 | .pvr_mask = 0xffff0000, | |
764 | .pvr_value = 0x80000000, | |
765 | .cpu_name = "7450", | |
10b35d99 | 766 | .cpu_features = CPU_FTRS_7450_23, |
fab5db97 PM |
767 | .cpu_user_features = COMMON_USER | |
768 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, | |
1da177e4 LT |
769 | .icache_bsize = 32, |
770 | .dcache_bsize = 32, | |
771 | .num_pmcs = 6, | |
555d97ac | 772 | .cpu_setup = __setup_cpu_745x, |
555d97ac | 773 | .oprofile_cpu_type = "ppc/7450", |
7a45fb19 | 774 | .oprofile_type = PPC_OPROFILE_G4, |
47c0bd1a | 775 | .machine_check = machine_check_generic, |
80f15dc7 | 776 | .platform = "ppc7450", |
1da177e4 LT |
777 | }, |
778 | { /* 7455 rev 1.x */ | |
779 | .pvr_mask = 0xffffff00, | |
780 | .pvr_value = 0x80010100, | |
781 | .cpu_name = "7455", | |
10b35d99 | 782 | .cpu_features = CPU_FTRS_7455_1, |
fab5db97 PM |
783 | .cpu_user_features = COMMON_USER | |
784 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, | |
1da177e4 LT |
785 | .icache_bsize = 32, |
786 | .dcache_bsize = 32, | |
787 | .num_pmcs = 6, | |
555d97ac | 788 | .cpu_setup = __setup_cpu_745x, |
555d97ac | 789 | .oprofile_cpu_type = "ppc/7450", |
7a45fb19 | 790 | .oprofile_type = PPC_OPROFILE_G4, |
47c0bd1a | 791 | .machine_check = machine_check_generic, |
80f15dc7 | 792 | .platform = "ppc7450", |
1da177e4 LT |
793 | }, |
794 | { /* 7455 rev 2.0 */ | |
795 | .pvr_mask = 0xffffffff, | |
796 | .pvr_value = 0x80010200, | |
797 | .cpu_name = "7455", | |
10b35d99 | 798 | .cpu_features = CPU_FTRS_7455_20, |
fab5db97 PM |
799 | .cpu_user_features = COMMON_USER | |
800 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, | |
1da177e4 LT |
801 | .icache_bsize = 32, |
802 | .dcache_bsize = 32, | |
803 | .num_pmcs = 6, | |
555d97ac | 804 | .cpu_setup = __setup_cpu_745x, |
555d97ac | 805 | .oprofile_cpu_type = "ppc/7450", |
7a45fb19 | 806 | .oprofile_type = PPC_OPROFILE_G4, |
47c0bd1a | 807 | .machine_check = machine_check_generic, |
80f15dc7 | 808 | .platform = "ppc7450", |
1da177e4 LT |
809 | }, |
810 | { /* 7455 others */ | |
811 | .pvr_mask = 0xffff0000, | |
812 | .pvr_value = 0x80010000, | |
813 | .cpu_name = "7455", | |
10b35d99 | 814 | .cpu_features = CPU_FTRS_7455, |
fab5db97 PM |
815 | .cpu_user_features = COMMON_USER | |
816 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, | |
1da177e4 LT |
817 | .icache_bsize = 32, |
818 | .dcache_bsize = 32, | |
819 | .num_pmcs = 6, | |
555d97ac | 820 | .cpu_setup = __setup_cpu_745x, |
555d97ac | 821 | .oprofile_cpu_type = "ppc/7450", |
7a45fb19 | 822 | .oprofile_type = PPC_OPROFILE_G4, |
47c0bd1a | 823 | .machine_check = machine_check_generic, |
80f15dc7 | 824 | .platform = "ppc7450", |
1da177e4 LT |
825 | }, |
826 | { /* 7447/7457 Rev 1.0 */ | |
827 | .pvr_mask = 0xffffffff, | |
828 | .pvr_value = 0x80020100, | |
829 | .cpu_name = "7447/7457", | |
10b35d99 | 830 | .cpu_features = CPU_FTRS_7447_10, |
fab5db97 PM |
831 | .cpu_user_features = COMMON_USER | |
832 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, | |
1da177e4 LT |
833 | .icache_bsize = 32, |
834 | .dcache_bsize = 32, | |
835 | .num_pmcs = 6, | |
555d97ac | 836 | .cpu_setup = __setup_cpu_745x, |
555d97ac | 837 | .oprofile_cpu_type = "ppc/7450", |
7a45fb19 | 838 | .oprofile_type = PPC_OPROFILE_G4, |
47c0bd1a | 839 | .machine_check = machine_check_generic, |
80f15dc7 | 840 | .platform = "ppc7450", |
1da177e4 LT |
841 | }, |
842 | { /* 7447/7457 Rev 1.1 */ | |
843 | .pvr_mask = 0xffffffff, | |
844 | .pvr_value = 0x80020101, | |
845 | .cpu_name = "7447/7457", | |
10b35d99 | 846 | .cpu_features = CPU_FTRS_7447_10, |
fab5db97 PM |
847 | .cpu_user_features = COMMON_USER | |
848 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, | |
1da177e4 LT |
849 | .icache_bsize = 32, |
850 | .dcache_bsize = 32, | |
851 | .num_pmcs = 6, | |
555d97ac | 852 | .cpu_setup = __setup_cpu_745x, |
555d97ac | 853 | .oprofile_cpu_type = "ppc/7450", |
7a45fb19 | 854 | .oprofile_type = PPC_OPROFILE_G4, |
47c0bd1a | 855 | .machine_check = machine_check_generic, |
80f15dc7 | 856 | .platform = "ppc7450", |
1da177e4 LT |
857 | }, |
858 | { /* 7447/7457 Rev 1.2 and later */ | |
859 | .pvr_mask = 0xffff0000, | |
860 | .pvr_value = 0x80020000, | |
861 | .cpu_name = "7447/7457", | |
10b35d99 | 862 | .cpu_features = CPU_FTRS_7447, |
fab5db97 | 863 | .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
864 | .icache_bsize = 32, |
865 | .dcache_bsize = 32, | |
866 | .num_pmcs = 6, | |
555d97ac | 867 | .cpu_setup = __setup_cpu_745x, |
555d97ac | 868 | .oprofile_cpu_type = "ppc/7450", |
7a45fb19 | 869 | .oprofile_type = PPC_OPROFILE_G4, |
47c0bd1a | 870 | .machine_check = machine_check_generic, |
80f15dc7 | 871 | .platform = "ppc7450", |
1da177e4 LT |
872 | }, |
873 | { /* 7447A */ | |
874 | .pvr_mask = 0xffff0000, | |
875 | .pvr_value = 0x80030000, | |
876 | .cpu_name = "7447A", | |
10b35d99 | 877 | .cpu_features = CPU_FTRS_7447A, |
fab5db97 PM |
878 | .cpu_user_features = COMMON_USER | |
879 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, | |
bbde630b KG |
880 | .icache_bsize = 32, |
881 | .dcache_bsize = 32, | |
882 | .num_pmcs = 6, | |
555d97ac | 883 | .cpu_setup = __setup_cpu_745x, |
555d97ac | 884 | .oprofile_cpu_type = "ppc/7450", |
7a45fb19 | 885 | .oprofile_type = PPC_OPROFILE_G4, |
47c0bd1a | 886 | .machine_check = machine_check_generic, |
80f15dc7 | 887 | .platform = "ppc7450", |
bbde630b KG |
888 | }, |
889 | { /* 7448 */ | |
890 | .pvr_mask = 0xffff0000, | |
891 | .pvr_value = 0x80040000, | |
892 | .cpu_name = "7448", | |
3d372548 | 893 | .cpu_features = CPU_FTRS_7448, |
fab5db97 PM |
894 | .cpu_user_features = COMMON_USER | |
895 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, | |
1da177e4 LT |
896 | .icache_bsize = 32, |
897 | .dcache_bsize = 32, | |
898 | .num_pmcs = 6, | |
555d97ac | 899 | .cpu_setup = __setup_cpu_745x, |
555d97ac | 900 | .oprofile_cpu_type = "ppc/7450", |
7a45fb19 | 901 | .oprofile_type = PPC_OPROFILE_G4, |
47c0bd1a | 902 | .machine_check = machine_check_generic, |
80f15dc7 | 903 | .platform = "ppc7450", |
1da177e4 LT |
904 | }, |
905 | { /* 82xx (8240, 8245, 8260 are all 603e cores) */ | |
906 | .pvr_mask = 0x7fff0000, | |
907 | .pvr_value = 0x00810000, | |
908 | .cpu_name = "82xx", | |
10b35d99 | 909 | .cpu_features = CPU_FTRS_82XX, |
4920960f | 910 | .cpu_user_features = COMMON_USER, |
1da177e4 LT |
911 | .icache_bsize = 32, |
912 | .dcache_bsize = 32, | |
80f15dc7 | 913 | .cpu_setup = __setup_cpu_603, |
47c0bd1a | 914 | .machine_check = machine_check_generic, |
80f15dc7 | 915 | .platform = "ppc603", |
1da177e4 LT |
916 | }, |
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", | |
10b35d99 | 921 | .cpu_features = CPU_FTRS_G2_LE, |
4920960f | 922 | .cpu_user_features = COMMON_USER, |
1da177e4 LT |
923 | .icache_bsize = 32, |
924 | .dcache_bsize = 32, | |
80f15dc7 | 925 | .cpu_setup = __setup_cpu_603, |
47c0bd1a | 926 | .machine_check = machine_check_generic, |
80f15dc7 | 927 | .platform = "ppc603", |
1da177e4 | 928 | }, |
6c4a2501 | 929 | { /* e300c1 (a 603e core, plus some) on 83xx */ |
1da177e4 LT |
930 | .pvr_mask = 0x7fff0000, |
931 | .pvr_value = 0x00830000, | |
6c4a2501 | 932 | .cpu_name = "e300c1", |
10b35d99 | 933 | .cpu_features = CPU_FTRS_E300, |
4920960f | 934 | .cpu_user_features = COMMON_USER, |
1da177e4 LT |
935 | .icache_bsize = 32, |
936 | .dcache_bsize = 32, | |
80f15dc7 | 937 | .cpu_setup = __setup_cpu_603, |
47c0bd1a | 938 | .machine_check = machine_check_generic, |
80f15dc7 | 939 | .platform = "ppc603", |
1da177e4 | 940 | }, |
6c4a2501 KP |
941 | { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */ |
942 | .pvr_mask = 0x7fff0000, | |
943 | .pvr_value = 0x00840000, | |
944 | .cpu_name = "e300c2", | |
aa42c69c | 945 | .cpu_features = CPU_FTRS_E300C2, |
6c4a2501 KP |
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, | |
47c0bd1a | 950 | .machine_check = machine_check_generic, |
6c4a2501 KP |
951 | .platform = "ppc603", |
952 | }, | |
a58d5244 | 953 | { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */ |
57933f8f SW |
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", | |
963 | }, | |
a58d5244 LY |
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, | |
47c0bd1a | 973 | .machine_check = machine_check_generic, |
a58d5244 LY |
974 | .platform = "ppc603", |
975 | }, | |
1da177e4 LT |
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)", | |
10b35d99 | 980 | .cpu_features = CPU_FTRS_CLASSIC32, |
4920960f | 981 | .cpu_user_features = COMMON_USER, |
1da177e4 LT |
982 | .icache_bsize = 32, |
983 | .dcache_bsize = 32, | |
47c0bd1a | 984 | .machine_check = machine_check_generic, |
80f15dc7 | 985 | .platform = "ppc603", |
1da177e4 LT |
986 | }, |
987 | #endif /* CLASSIC_PPC */ | |
1da177e4 LT |
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.... */ | |
10b35d99 | 995 | .cpu_features = CPU_FTRS_8XX, |
1da177e4 LT |
996 | .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, |
997 | .icache_bsize = 16, | |
998 | .dcache_bsize = 16, | |
80f15dc7 | 999 | .platform = "ppc823", |
1da177e4 LT |
1000 | }, |
1001 | #endif /* CONFIG_8xx */ | |
1002 | #ifdef CONFIG_40x | |
1003 | { /* 403GC */ | |
1004 | .pvr_mask = 0xffffff00, | |
1005 | .pvr_value = 0x00200200, | |
1006 | .cpu_name = "403GC", | |
10b35d99 | 1007 | .cpu_features = CPU_FTRS_40X, |
1da177e4 LT |
1008 | .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, |
1009 | .icache_bsize = 16, | |
1010 | .dcache_bsize = 16, | |
47c0bd1a | 1011 | .machine_check = machine_check_4xx, |
80f15dc7 | 1012 | .platform = "ppc403", |
1da177e4 LT |
1013 | }, |
1014 | { /* 403GCX */ | |
1015 | .pvr_mask = 0xffffff00, | |
1016 | .pvr_value = 0x00201400, | |
1017 | .cpu_name = "403GCX", | |
10b35d99 | 1018 | .cpu_features = CPU_FTRS_40X, |
d8e998c5 BH |
1019 | .cpu_user_features = PPC_FEATURE_32 | |
1020 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB, | |
1da177e4 LT |
1021 | .icache_bsize = 16, |
1022 | .dcache_bsize = 16, | |
47c0bd1a | 1023 | .machine_check = machine_check_4xx, |
80f15dc7 | 1024 | .platform = "ppc403", |
1da177e4 LT |
1025 | }, |
1026 | { /* 403G ?? */ | |
1027 | .pvr_mask = 0xffff0000, | |
1028 | .pvr_value = 0x00200000, | |
1029 | .cpu_name = "403G ??", | |
10b35d99 | 1030 | .cpu_features = CPU_FTRS_40X, |
1da177e4 LT |
1031 | .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, |
1032 | .icache_bsize = 16, | |
1033 | .dcache_bsize = 16, | |
47c0bd1a | 1034 | .machine_check = machine_check_4xx, |
80f15dc7 | 1035 | .platform = "ppc403", |
1da177e4 LT |
1036 | }, |
1037 | { /* 405GP */ | |
1038 | .pvr_mask = 0xffff0000, | |
1039 | .pvr_value = 0x40110000, | |
1040 | .cpu_name = "405GP", | |
10b35d99 | 1041 | .cpu_features = CPU_FTRS_40X, |
1da177e4 LT |
1042 | .cpu_user_features = PPC_FEATURE_32 | |
1043 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | |
1044 | .icache_bsize = 32, | |
1045 | .dcache_bsize = 32, | |
47c0bd1a | 1046 | .machine_check = machine_check_4xx, |
80f15dc7 | 1047 | .platform = "ppc405", |
1da177e4 LT |
1048 | }, |
1049 | { /* STB 03xxx */ | |
1050 | .pvr_mask = 0xffff0000, | |
1051 | .pvr_value = 0x40130000, | |
1052 | .cpu_name = "STB03xxx", | |
10b35d99 | 1053 | .cpu_features = CPU_FTRS_40X, |
1da177e4 LT |
1054 | .cpu_user_features = PPC_FEATURE_32 | |
1055 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | |
1056 | .icache_bsize = 32, | |
1057 | .dcache_bsize = 32, | |
47c0bd1a | 1058 | .machine_check = machine_check_4xx, |
80f15dc7 | 1059 | .platform = "ppc405", |
1da177e4 LT |
1060 | }, |
1061 | { /* STB 04xxx */ | |
1062 | .pvr_mask = 0xffff0000, | |
1063 | .pvr_value = 0x41810000, | |
1064 | .cpu_name = "STB04xxx", | |
10b35d99 | 1065 | .cpu_features = CPU_FTRS_40X, |
1da177e4 LT |
1066 | .cpu_user_features = PPC_FEATURE_32 | |
1067 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | |
1068 | .icache_bsize = 32, | |
1069 | .dcache_bsize = 32, | |
47c0bd1a | 1070 | .machine_check = machine_check_4xx, |
80f15dc7 | 1071 | .platform = "ppc405", |
1da177e4 LT |
1072 | }, |
1073 | { /* NP405L */ | |
1074 | .pvr_mask = 0xffff0000, | |
1075 | .pvr_value = 0x41610000, | |
1076 | .cpu_name = "NP405L", | |
10b35d99 | 1077 | .cpu_features = CPU_FTRS_40X, |
1da177e4 LT |
1078 | .cpu_user_features = PPC_FEATURE_32 | |
1079 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | |
1080 | .icache_bsize = 32, | |
1081 | .dcache_bsize = 32, | |
47c0bd1a | 1082 | .machine_check = machine_check_4xx, |
80f15dc7 | 1083 | .platform = "ppc405", |
1da177e4 LT |
1084 | }, |
1085 | { /* NP4GS3 */ | |
1086 | .pvr_mask = 0xffff0000, | |
1087 | .pvr_value = 0x40B10000, | |
1088 | .cpu_name = "NP4GS3", | |
10b35d99 | 1089 | .cpu_features = CPU_FTRS_40X, |
1da177e4 LT |
1090 | .cpu_user_features = PPC_FEATURE_32 | |
1091 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | |
1092 | .icache_bsize = 32, | |
1093 | .dcache_bsize = 32, | |
47c0bd1a | 1094 | .machine_check = machine_check_4xx, |
80f15dc7 | 1095 | .platform = "ppc405", |
1da177e4 LT |
1096 | }, |
1097 | { /* NP405H */ | |
1098 | .pvr_mask = 0xffff0000, | |
1099 | .pvr_value = 0x41410000, | |
1100 | .cpu_name = "NP405H", | |
10b35d99 | 1101 | .cpu_features = CPU_FTRS_40X, |
1da177e4 LT |
1102 | .cpu_user_features = PPC_FEATURE_32 | |
1103 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | |
1104 | .icache_bsize = 32, | |
1105 | .dcache_bsize = 32, | |
47c0bd1a | 1106 | .machine_check = machine_check_4xx, |
80f15dc7 | 1107 | .platform = "ppc405", |
1da177e4 LT |
1108 | }, |
1109 | { /* 405GPr */ | |
1110 | .pvr_mask = 0xffff0000, | |
1111 | .pvr_value = 0x50910000, | |
1112 | .cpu_name = "405GPr", | |
10b35d99 | 1113 | .cpu_features = CPU_FTRS_40X, |
1da177e4 LT |
1114 | .cpu_user_features = PPC_FEATURE_32 | |
1115 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | |
1116 | .icache_bsize = 32, | |
1117 | .dcache_bsize = 32, | |
47c0bd1a | 1118 | .machine_check = machine_check_4xx, |
80f15dc7 | 1119 | .platform = "ppc405", |
1da177e4 LT |
1120 | }, |
1121 | { /* STBx25xx */ | |
1122 | .pvr_mask = 0xffff0000, | |
1123 | .pvr_value = 0x51510000, | |
1124 | .cpu_name = "STBx25xx", | |
10b35d99 | 1125 | .cpu_features = CPU_FTRS_40X, |
1da177e4 LT |
1126 | .cpu_user_features = PPC_FEATURE_32 | |
1127 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | |
1128 | .icache_bsize = 32, | |
1129 | .dcache_bsize = 32, | |
47c0bd1a | 1130 | .machine_check = machine_check_4xx, |
80f15dc7 | 1131 | .platform = "ppc405", |
1da177e4 LT |
1132 | }, |
1133 | { /* 405LP */ | |
1134 | .pvr_mask = 0xffff0000, | |
1135 | .pvr_value = 0x41F10000, | |
1136 | .cpu_name = "405LP", | |
10b35d99 | 1137 | .cpu_features = CPU_FTRS_40X, |
1da177e4 LT |
1138 | .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, |
1139 | .icache_bsize = 32, | |
1140 | .dcache_bsize = 32, | |
47c0bd1a | 1141 | .machine_check = machine_check_4xx, |
80f15dc7 | 1142 | .platform = "ppc405", |
1da177e4 LT |
1143 | }, |
1144 | { /* Xilinx Virtex-II Pro */ | |
72646c7f | 1145 | .pvr_mask = 0xfffff000, |
1da177e4 LT |
1146 | .pvr_value = 0x20010000, |
1147 | .cpu_name = "Virtex-II Pro", | |
10b35d99 | 1148 | .cpu_features = CPU_FTRS_40X, |
1da177e4 LT |
1149 | .cpu_user_features = PPC_FEATURE_32 | |
1150 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | |
1151 | .icache_bsize = 32, | |
1152 | .dcache_bsize = 32, | |
47c0bd1a | 1153 | .machine_check = machine_check_4xx, |
80f15dc7 | 1154 | .platform = "ppc405", |
1da177e4 | 1155 | }, |
72646c7f GL |
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, | |
47c0bd1a | 1165 | .machine_check = machine_check_4xx, |
838fdb4d | 1166 | .platform = "ppc405", |
72646c7f | 1167 | }, |
ad95d609 ES |
1168 | { /* 405EP */ |
1169 | .pvr_mask = 0xffff0000, | |
1170 | .pvr_value = 0x51210000, | |
1171 | .cpu_name = "405EP", | |
10b35d99 | 1172 | .cpu_features = CPU_FTRS_40X, |
5d8476c8 SR |
1173 | .cpu_user_features = PPC_FEATURE_32 | |
1174 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | |
1175 | .icache_bsize = 32, | |
1176 | .dcache_bsize = 32, | |
47c0bd1a | 1177 | .machine_check = machine_check_4xx, |
5d8476c8 SR |
1178 | .platform = "ppc405", |
1179 | }, | |
1180 | { /* 405EX */ | |
b676d84e SR |
1181 | .pvr_mask = 0xffff0004, |
1182 | .pvr_value = 0x12910004, | |
5d8476c8 SR |
1183 | .cpu_name = "405EX", |
1184 | .cpu_features = CPU_FTRS_40X, | |
ad95d609 ES |
1185 | .cpu_user_features = PPC_FEATURE_32 | |
1186 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | |
1187 | .icache_bsize = 32, | |
1188 | .dcache_bsize = 32, | |
47c0bd1a | 1189 | .machine_check = machine_check_4xx, |
80f15dc7 | 1190 | .platform = "ppc405", |
ad95d609 | 1191 | }, |
b676d84e SR |
1192 | { /* 405EXr */ |
1193 | .pvr_mask = 0xffff0004, | |
1194 | .pvr_value = 0x12910000, | |
1195 | .cpu_name = "405EXr", | |
1196 | .cpu_features = CPU_FTRS_40X, | |
1197 | .cpu_user_features = PPC_FEATURE_32 | | |
1198 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | |
1199 | .icache_bsize = 32, | |
1200 | .dcache_bsize = 32, | |
1201 | .machine_check = machine_check_4xx, | |
1202 | .platform = "ppc405", | |
1203 | }, | |
1da177e4 LT |
1204 | |
1205 | #endif /* CONFIG_40x */ | |
1206 | #ifdef CONFIG_44x | |
c9cf73ae MP |
1207 | { |
1208 | .pvr_mask = 0xf0000fff, | |
1209 | .pvr_value = 0x40000850, | |
d1dfc35d VB |
1210 | .cpu_name = "440GR Rev. A", |
1211 | .cpu_features = CPU_FTRS_44X, | |
1212 | .cpu_user_features = COMMON_USER_BOOKE, | |
1213 | .icache_bsize = 32, | |
1214 | .dcache_bsize = 32, | |
47c0bd1a | 1215 | .machine_check = machine_check_4xx, |
d1dfc35d VB |
1216 | .platform = "ppc440", |
1217 | }, | |
1218 | { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */ | |
1219 | .pvr_mask = 0xf0000fff, | |
1220 | .pvr_value = 0x40000858, | |
c9cf73ae | 1221 | .cpu_name = "440EP Rev. A", |
10b35d99 | 1222 | .cpu_features = CPU_FTRS_44X, |
80f15dc7 | 1223 | .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU, |
c9cf73ae MP |
1224 | .icache_bsize = 32, |
1225 | .dcache_bsize = 32, | |
8112753b | 1226 | .cpu_setup = __setup_cpu_440ep, |
47c0bd1a | 1227 | .machine_check = machine_check_4xx, |
80f15dc7 | 1228 | .platform = "ppc440", |
c9cf73ae MP |
1229 | }, |
1230 | { | |
1231 | .pvr_mask = 0xf0000fff, | |
1232 | .pvr_value = 0x400008d3, | |
d1dfc35d | 1233 | .cpu_name = "440GR Rev. B", |
10b35d99 | 1234 | .cpu_features = CPU_FTRS_44X, |
80f15dc7 | 1235 | .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU, |
c9cf73ae MP |
1236 | .icache_bsize = 32, |
1237 | .dcache_bsize = 32, | |
47c0bd1a | 1238 | .machine_check = machine_check_4xx, |
80f15dc7 | 1239 | .platform = "ppc440", |
c9cf73ae | 1240 | }, |
3f8fc3e0 SM |
1241 | { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */ |
1242 | .pvr_mask = 0xf0000ff7, | |
1243 | .pvr_value = 0x400008d4, | |
1244 | .cpu_name = "440EP Rev. C", | |
1245 | .cpu_features = CPU_FTRS_44X, | |
1246 | .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU, | |
1247 | .icache_bsize = 32, | |
1248 | .dcache_bsize = 32, | |
1249 | .cpu_setup = __setup_cpu_440ep, | |
1250 | .machine_check = machine_check_4xx, | |
1251 | .platform = "ppc440", | |
1252 | }, | |
d1dfc35d VB |
1253 | { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */ |
1254 | .pvr_mask = 0xf0000fff, | |
1255 | .pvr_value = 0x400008db, | |
1256 | .cpu_name = "440EP Rev. B", | |
15fc993e VB |
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, | |
d1dfc35d | 1261 | .cpu_setup = __setup_cpu_440ep, |
47c0bd1a | 1262 | .machine_check = machine_check_4xx, |
8112753b | 1263 | .platform = "ppc440", |
15fc993e VB |
1264 | }, |
1265 | { /* 440GRX */ | |
1266 | .pvr_mask = 0xf0000ffb, | |
d1dfc35d | 1267 | .pvr_value = 0x200008D0, |
15fc993e VB |
1268 | .cpu_name = "440GRX", |
1269 | .cpu_features = CPU_FTRS_44X, | |
1270 | .cpu_user_features = COMMON_USER_BOOKE, | |
1271 | .icache_bsize = 32, | |
1272 | .dcache_bsize = 32, | |
340ffd26 | 1273 | .cpu_setup = __setup_cpu_440grx, |
b2be3b15 | 1274 | .machine_check = machine_check_440A, |
340ffd26 | 1275 | .platform = "ppc440", |
15fc993e | 1276 | }, |
d1dfc35d VB |
1277 | { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */ |
1278 | .pvr_mask = 0xf0000ffb, | |
1279 | .pvr_value = 0x200008D8, | |
1280 | .cpu_name = "440EPX", | |
1281 | .cpu_features = CPU_FTRS_44X, | |
1282 | .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU, | |
1283 | .icache_bsize = 32, | |
1284 | .dcache_bsize = 32, | |
1285 | .cpu_setup = __setup_cpu_440epx, | |
47c0bd1a | 1286 | .machine_check = machine_check_440A, |
d1dfc35d VB |
1287 | .platform = "ppc440", |
1288 | }, | |
4920960f | 1289 | { /* 440GP Rev. B */ |
1da177e4 LT |
1290 | .pvr_mask = 0xf0000fff, |
1291 | .pvr_value = 0x40000440, | |
1292 | .cpu_name = "440GP Rev. B", | |
10b35d99 | 1293 | .cpu_features = CPU_FTRS_44X, |
80f15dc7 | 1294 | .cpu_user_features = COMMON_USER_BOOKE, |
1da177e4 LT |
1295 | .icache_bsize = 32, |
1296 | .dcache_bsize = 32, | |
47c0bd1a | 1297 | .machine_check = machine_check_4xx, |
80f15dc7 | 1298 | .platform = "ppc440gp", |
1da177e4 | 1299 | }, |
4920960f | 1300 | { /* 440GP Rev. C */ |
1da177e4 LT |
1301 | .pvr_mask = 0xf0000fff, |
1302 | .pvr_value = 0x40000481, | |
1303 | .cpu_name = "440GP Rev. C", | |
10b35d99 | 1304 | .cpu_features = CPU_FTRS_44X, |
80f15dc7 | 1305 | .cpu_user_features = COMMON_USER_BOOKE, |
1da177e4 LT |
1306 | .icache_bsize = 32, |
1307 | .dcache_bsize = 32, | |
47c0bd1a | 1308 | .machine_check = machine_check_4xx, |
80f15dc7 | 1309 | .platform = "ppc440gp", |
1da177e4 LT |
1310 | }, |
1311 | { /* 440GX Rev. A */ | |
1312 | .pvr_mask = 0xf0000fff, | |
1313 | .pvr_value = 0x50000850, | |
1314 | .cpu_name = "440GX Rev. A", | |
10b35d99 | 1315 | .cpu_features = CPU_FTRS_44X, |
80f15dc7 | 1316 | .cpu_user_features = COMMON_USER_BOOKE, |
1da177e4 LT |
1317 | .icache_bsize = 32, |
1318 | .dcache_bsize = 32, | |
47c0bd1a BH |
1319 | .cpu_setup = __setup_cpu_440gx, |
1320 | .machine_check = machine_check_440A, | |
80f15dc7 | 1321 | .platform = "ppc440", |
1da177e4 LT |
1322 | }, |
1323 | { /* 440GX Rev. B */ | |
1324 | .pvr_mask = 0xf0000fff, | |
1325 | .pvr_value = 0x50000851, | |
1326 | .cpu_name = "440GX Rev. B", | |
10b35d99 | 1327 | .cpu_features = CPU_FTRS_44X, |
80f15dc7 | 1328 | .cpu_user_features = COMMON_USER_BOOKE, |
1da177e4 LT |
1329 | .icache_bsize = 32, |
1330 | .dcache_bsize = 32, | |
47c0bd1a BH |
1331 | .cpu_setup = __setup_cpu_440gx, |
1332 | .machine_check = machine_check_440A, | |
80f15dc7 | 1333 | .platform = "ppc440", |
1da177e4 LT |
1334 | }, |
1335 | { /* 440GX Rev. C */ | |
1336 | .pvr_mask = 0xf0000fff, | |
1337 | .pvr_value = 0x50000892, | |
1338 | .cpu_name = "440GX Rev. C", | |
10b35d99 | 1339 | .cpu_features = CPU_FTRS_44X, |
80f15dc7 | 1340 | .cpu_user_features = COMMON_USER_BOOKE, |
1da177e4 LT |
1341 | .icache_bsize = 32, |
1342 | .dcache_bsize = 32, | |
47c0bd1a BH |
1343 | .cpu_setup = __setup_cpu_440gx, |
1344 | .machine_check = machine_check_440A, | |
80f15dc7 | 1345 | .platform = "ppc440", |
1da177e4 | 1346 | }, |
9149fb3b ES |
1347 | { /* 440GX Rev. F */ |
1348 | .pvr_mask = 0xf0000fff, | |
1349 | .pvr_value = 0x50000894, | |
1350 | .cpu_name = "440GX Rev. F", | |
10b35d99 | 1351 | .cpu_features = CPU_FTRS_44X, |
80f15dc7 | 1352 | .cpu_user_features = COMMON_USER_BOOKE, |
9149fb3b ES |
1353 | .icache_bsize = 32, |
1354 | .dcache_bsize = 32, | |
47c0bd1a BH |
1355 | .cpu_setup = __setup_cpu_440gx, |
1356 | .machine_check = machine_check_440A, | |
80f15dc7 | 1357 | .platform = "ppc440", |
9149fb3b | 1358 | }, |
656de7e4 | 1359 | { /* 440SP Rev. A */ |
333e6154 RD |
1360 | .pvr_mask = 0xfff00fff, |
1361 | .pvr_value = 0x53200891, | |
656de7e4 | 1362 | .cpu_name = "440SP Rev. A", |
10b35d99 | 1363 | .cpu_features = CPU_FTRS_44X, |
80f15dc7 | 1364 | .cpu_user_features = COMMON_USER_BOOKE, |
656de7e4 MP |
1365 | .icache_bsize = 32, |
1366 | .dcache_bsize = 32, | |
47c0bd1a | 1367 | .machine_check = machine_check_4xx, |
80f15dc7 | 1368 | .platform = "ppc440", |
656de7e4 | 1369 | }, |
b0f7b8bc | 1370 | { /* 440SPe Rev. A */ |
333e6154 RD |
1371 | .pvr_mask = 0xfff00fff, |
1372 | .pvr_value = 0x53400890, | |
1373 | .cpu_name = "440SPe Rev. A", | |
1374 | .cpu_features = CPU_FTRS_44X, | |
1375 | .cpu_user_features = COMMON_USER_BOOKE, | |
1376 | .icache_bsize = 32, | |
1377 | .dcache_bsize = 32, | |
47c0bd1a BH |
1378 | .cpu_setup = __setup_cpu_440spe, |
1379 | .machine_check = machine_check_440A, | |
333e6154 RD |
1380 | .platform = "ppc440", |
1381 | }, | |
1382 | { /* 440SPe Rev. B */ | |
1383 | .pvr_mask = 0xfff00fff, | |
1384 | .pvr_value = 0x53400891, | |
1385 | .cpu_name = "440SPe Rev. B", | |
a147c585 | 1386 | .cpu_features = CPU_FTRS_44X, |
80f15dc7 | 1387 | .cpu_user_features = COMMON_USER_BOOKE, |
b0f7b8bc RD |
1388 | .icache_bsize = 32, |
1389 | .dcache_bsize = 32, | |
47c0bd1a BH |
1390 | .cpu_setup = __setup_cpu_440spe, |
1391 | .machine_check = machine_check_440A, | |
80f15dc7 | 1392 | .platform = "ppc440", |
b0f7b8bc | 1393 | }, |
1da177e4 | 1394 | #endif /* CONFIG_44x */ |
33d9e9b5 | 1395 | #ifdef CONFIG_FSL_BOOKE |
e3e414bc | 1396 | #ifdef CONFIG_E200 |
4920960f | 1397 | { /* e200z5 */ |
33d9e9b5 KG |
1398 | .pvr_mask = 0xfff00000, |
1399 | .pvr_value = 0x81000000, | |
1400 | .cpu_name = "e200z5", | |
1401 | /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */ | |
10b35d99 | 1402 | .cpu_features = CPU_FTRS_E200, |
80f15dc7 PM |
1403 | .cpu_user_features = COMMON_USER_BOOKE | |
1404 | PPC_FEATURE_HAS_EFP_SINGLE | | |
33d9e9b5 KG |
1405 | PPC_FEATURE_UNIFIED_CACHE, |
1406 | .dcache_bsize = 32, | |
47c0bd1a | 1407 | .machine_check = machine_check_e200, |
80f15dc7 | 1408 | .platform = "ppc5554", |
33d9e9b5 | 1409 | }, |
4920960f | 1410 | { /* e200z6 */ |
33d9e9b5 KG |
1411 | .pvr_mask = 0xfff00000, |
1412 | .pvr_value = 0x81100000, | |
1413 | .cpu_name = "e200z6", | |
1414 | /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */ | |
10b35d99 | 1415 | .cpu_features = CPU_FTRS_E200, |
80f15dc7 | 1416 | .cpu_user_features = COMMON_USER_BOOKE | |
5e14d21e KG |
1417 | PPC_FEATURE_HAS_SPE_COMP | |
1418 | PPC_FEATURE_HAS_EFP_SINGLE_COMP | | |
33d9e9b5 KG |
1419 | PPC_FEATURE_UNIFIED_CACHE, |
1420 | .dcache_bsize = 32, | |
47c0bd1a | 1421 | .machine_check = machine_check_e200, |
80f15dc7 | 1422 | .platform = "ppc5554", |
33d9e9b5 | 1423 | }, |
e3e414bc | 1424 | #elif defined(CONFIG_E500) |
4920960f | 1425 | { /* e500 */ |
1da177e4 LT |
1426 | .pvr_mask = 0xffff0000, |
1427 | .pvr_value = 0x80200000, | |
1428 | .cpu_name = "e500", | |
1429 | /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */ | |
10b35d99 | 1430 | .cpu_features = CPU_FTRS_E500, |
80f15dc7 | 1431 | .cpu_user_features = COMMON_USER_BOOKE | |
5e14d21e KG |
1432 | PPC_FEATURE_HAS_SPE_COMP | |
1433 | PPC_FEATURE_HAS_EFP_SINGLE_COMP, | |
1da177e4 LT |
1434 | .icache_bsize = 32, |
1435 | .dcache_bsize = 32, | |
1436 | .num_pmcs = 4, | |
555d97ac | 1437 | .oprofile_cpu_type = "ppc/e500", |
39aef685 | 1438 | .oprofile_type = PPC_OPROFILE_FSL_EMB, |
47c0bd1a | 1439 | .machine_check = machine_check_e500, |
80f15dc7 | 1440 | .platform = "ppc8540", |
1da177e4 | 1441 | }, |
4920960f | 1442 | { /* e500v2 */ |
5b37b700 KG |
1443 | .pvr_mask = 0xffff0000, |
1444 | .pvr_value = 0x80210000, | |
1445 | .cpu_name = "e500v2", | |
1446 | /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */ | |
10b35d99 | 1447 | .cpu_features = CPU_FTRS_E500_2, |
80f15dc7 | 1448 | .cpu_user_features = COMMON_USER_BOOKE | |
5e14d21e KG |
1449 | PPC_FEATURE_HAS_SPE_COMP | |
1450 | PPC_FEATURE_HAS_EFP_SINGLE_COMP | | |
1451 | PPC_FEATURE_HAS_EFP_DOUBLE_COMP, | |
5b37b700 KG |
1452 | .icache_bsize = 32, |
1453 | .dcache_bsize = 32, | |
1454 | .num_pmcs = 4, | |
555d97ac | 1455 | .oprofile_cpu_type = "ppc/e500", |
39aef685 | 1456 | .oprofile_type = PPC_OPROFILE_FSL_EMB, |
47c0bd1a | 1457 | .machine_check = machine_check_e500, |
80f15dc7 | 1458 | .platform = "ppc8548", |
5b37b700 | 1459 | }, |
1da177e4 | 1460 | #endif |
e3e414bc | 1461 | #endif |
1da177e4 LT |
1462 | #if !CLASSIC_PPC |
1463 | { /* default match */ | |
1464 | .pvr_mask = 0x00000000, | |
1465 | .pvr_value = 0x00000000, | |
1466 | .cpu_name = "(generic PPC)", | |
10b35d99 | 1467 | .cpu_features = CPU_FTRS_GENERIC_32, |
1da177e4 LT |
1468 | .cpu_user_features = PPC_FEATURE_32, |
1469 | .icache_bsize = 32, | |
1470 | .dcache_bsize = 32, | |
80f15dc7 | 1471 | .platform = "powerpc", |
1da177e4 LT |
1472 | } |
1473 | #endif /* !CLASSIC_PPC */ | |
4920960f | 1474 | #endif /* CONFIG_PPC32 */ |
1da177e4 | 1475 | }; |
42c4aaad | 1476 | |
87a72f9e PM |
1477 | static struct cpu_spec the_cpu_spec; |
1478 | ||
1479 | struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr) | |
42c4aaad BH |
1480 | { |
1481 | struct cpu_spec *s = cpu_specs; | |
87a72f9e | 1482 | struct cpu_spec *t = &the_cpu_spec; |
42c4aaad BH |
1483 | int i; |
1484 | ||
1485 | s = PTRRELOC(s); | |
87a72f9e | 1486 | t = PTRRELOC(t); |
42c4aaad | 1487 | |
42c4aaad BH |
1488 | for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) |
1489 | if ((pvr & s->pvr_mask) == s->pvr_value) { | |
87a72f9e PM |
1490 | /* |
1491 | * If we are overriding a previous value derived | |
1492 | * from the real PVR with a new value obtained | |
1493 | * using a logical PVR value, don't modify the | |
1494 | * performance monitor fields. | |
1495 | */ | |
1496 | if (t->num_pmcs && !s->num_pmcs) { | |
1497 | t->cpu_name = s->cpu_name; | |
1498 | t->cpu_features = s->cpu_features; | |
1499 | t->cpu_user_features = s->cpu_user_features; | |
1500 | t->icache_bsize = s->icache_bsize; | |
1501 | t->dcache_bsize = s->dcache_bsize; | |
1502 | t->cpu_setup = s->cpu_setup; | |
1503 | t->cpu_restore = s->cpu_restore; | |
1504 | t->platform = s->platform; | |
1505 | } else | |
1506 | *t = *s; | |
1507 | *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec; | |
84e3ad5b VB |
1508 | #if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE) |
1509 | /* ppc64 and booke expect identify_cpu to also call | |
1510 | * setup_cpu for that processor. I will consolidate | |
1511 | * that at a later time, for now, just use #ifdef. | |
42c4aaad | 1512 | * we also don't need to PTRRELOC the function pointer |
84e3ad5b VB |
1513 | * on ppc64 and booke as we are running at 0 in real |
1514 | * mode on ppc64 and reloc_offset is always 0 on booke. | |
42c4aaad BH |
1515 | */ |
1516 | if (s->cpu_setup) { | |
1517 | s->cpu_setup(offset, s); | |
1518 | } | |
84e3ad5b | 1519 | #endif /* CONFIG_PPC64 || CONFIG_BOOKE */ |
42c4aaad BH |
1520 | return s; |
1521 | } | |
1522 | BUG(); | |
1523 | return NULL; | |
1524 | } | |
1525 | ||
0909c8c2 | 1526 | void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end) |
42c4aaad BH |
1527 | { |
1528 | struct fixup_entry { | |
1529 | unsigned long mask; | |
1530 | unsigned long value; | |
0909c8c2 BH |
1531 | long start_off; |
1532 | long end_off; | |
42c4aaad BH |
1533 | } *fcur, *fend; |
1534 | ||
1535 | fcur = fixup_start; | |
1536 | fend = fixup_end; | |
1537 | ||
1538 | for (; fcur < fend; fcur++) { | |
1539 | unsigned int *pstart, *pend, *p; | |
1540 | ||
1541 | if ((value & fcur->mask) == fcur->value) | |
1542 | continue; | |
1543 | ||
1544 | /* These PTRRELOCs will disappear once the new scheme for | |
1545 | * modules and vdso is implemented | |
1546 | */ | |
0909c8c2 BH |
1547 | pstart = ((unsigned int *)fcur) + (fcur->start_off / 4); |
1548 | pend = ((unsigned int *)fcur) + (fcur->end_off / 4); | |
42c4aaad BH |
1549 | |
1550 | for (p = pstart; p < pend; p++) { | |
1551 | *p = 0x60000000u; | |
1552 | asm volatile ("dcbst 0, %0" : : "r" (p)); | |
1553 | } | |
1554 | asm volatile ("sync" : : : "memory"); | |
1555 | for (p = pstart; p < pend; p++) | |
1556 | asm volatile ("icbi 0,%0" : : "r" (p)); | |
1557 | asm volatile ("sync; isync" : : : "memory"); | |
1558 | } | |
1559 | } |