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 | |
9115d134 NL |
26 | /* The platform string corresponding to the real PVR */ |
27 | const char *powerpc_base_platform; | |
28 | ||
4920960f SR |
29 | /* NOTE: |
30 | * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's | |
31 | * the responsibility of the appropriate CPU save/restore functions to | |
32 | * eventually copy these settings over. Those save/restore aren't yet | |
33 | * part of the cputable though. That has to be fixed for both ppc32 | |
34 | * and ppc64 | |
35 | */ | |
b26f100d | 36 | #ifdef CONFIG_PPC32 |
8112753b VB |
37 | extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec); |
38 | extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec); | |
47c0bd1a | 39 | extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec); |
340ffd26 | 40 | extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec); |
47c0bd1a | 41 | extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec); |
640d17d6 | 42 | extern void __setup_cpu_440x5(unsigned long offset, struct cpu_spec* spec); |
464076a4 | 43 | extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec); |
939e622c | 44 | extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec); |
400d2212 KG |
45 | extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec); |
46 | extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec); | |
47 | extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec); | |
48 | extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec); | |
49 | extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec); | |
50 | extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec); | |
51 | extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec); | |
52 | extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec); | |
4920960f | 53 | #endif /* CONFIG_PPC32 */ |
f39b7a55 | 54 | #ifdef CONFIG_PPC64 |
400d2212 | 55 | extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec); |
5b43d20a | 56 | extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec); |
1199919b | 57 | extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec); |
40d244d6 | 58 | extern void __restore_cpu_pa6t(void); |
f39b7a55 | 59 | extern void __restore_cpu_ppc970(void); |
e952e6c4 MN |
60 | extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec); |
61 | extern void __restore_cpu_power7(void); | |
f39b7a55 | 62 | #endif /* CONFIG_PPC64 */ |
1da177e4 | 63 | |
1da177e4 LT |
64 | /* This table only contains "desktop" CPUs, it need to be filled with embedded |
65 | * ones as well... | |
66 | */ | |
4920960f SR |
67 | #define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \ |
68 | PPC_FEATURE_HAS_MMU) | |
69 | #define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64) | |
a7ddc5e8 | 70 | #define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4) |
aa5cb021 BH |
71 | #define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\ |
72 | PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP) | |
73 | #define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\ | |
74 | PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP) | |
03054d51 | 75 | #define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\ |
fab5db97 | 76 | PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \ |
0f473314 NL |
77 | PPC_FEATURE_TRUE_LE | \ |
78 | PPC_FEATURE_PSERIES_PERFMON_COMPAT) | |
e952e6c4 MN |
79 | #define COMMON_USER_POWER7 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\ |
80 | PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \ | |
0f473314 NL |
81 | PPC_FEATURE_TRUE_LE | \ |
82 | PPC_FEATURE_PSERIES_PERFMON_COMPAT) | |
b3ebd1d8 OJ |
83 | #define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\ |
84 | PPC_FEATURE_TRUE_LE | \ | |
85 | PPC_FEATURE_HAS_ALTIVEC_COMP) | |
80f15dc7 PM |
86 | #define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \ |
87 | PPC_FEATURE_BOOKE) | |
1da177e4 | 88 | |
87a72f9e | 89 | static struct cpu_spec __initdata cpu_specs[] = { |
4920960f SR |
90 | #ifdef CONFIG_PPC64 |
91 | { /* Power3 */ | |
92 | .pvr_mask = 0xffff0000, | |
93 | .pvr_value = 0x00400000, | |
94 | .cpu_name = "POWER3 (630)", | |
95 | .cpu_features = CPU_FTRS_POWER3, | |
fab5db97 | 96 | .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE, |
4920960f SR |
97 | .icache_bsize = 128, |
98 | .dcache_bsize = 128, | |
99 | .num_pmcs = 8, | |
1bd2e5ae | 100 | .pmc_type = PPC_PMC_IBM, |
4920960f | 101 | .oprofile_cpu_type = "ppc64/power3", |
7a45fb19 | 102 | .oprofile_type = PPC_OPROFILE_RS64, |
47c0bd1a | 103 | .machine_check = machine_check_generic, |
80f15dc7 | 104 | .platform = "power3", |
4920960f SR |
105 | }, |
106 | { /* Power3+ */ | |
107 | .pvr_mask = 0xffff0000, | |
108 | .pvr_value = 0x00410000, | |
109 | .cpu_name = "POWER3 (630+)", | |
110 | .cpu_features = CPU_FTRS_POWER3, | |
fab5db97 | 111 | .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE, |
4920960f SR |
112 | .icache_bsize = 128, |
113 | .dcache_bsize = 128, | |
114 | .num_pmcs = 8, | |
1bd2e5ae | 115 | .pmc_type = PPC_PMC_IBM, |
4920960f | 116 | .oprofile_cpu_type = "ppc64/power3", |
7a45fb19 | 117 | .oprofile_type = PPC_OPROFILE_RS64, |
47c0bd1a | 118 | .machine_check = machine_check_generic, |
80f15dc7 | 119 | .platform = "power3", |
4920960f SR |
120 | }, |
121 | { /* Northstar */ | |
122 | .pvr_mask = 0xffff0000, | |
123 | .pvr_value = 0x00330000, | |
124 | .cpu_name = "RS64-II (northstar)", | |
125 | .cpu_features = CPU_FTRS_RS64, | |
126 | .cpu_user_features = COMMON_USER_PPC64, | |
127 | .icache_bsize = 128, | |
128 | .dcache_bsize = 128, | |
129 | .num_pmcs = 8, | |
1bd2e5ae | 130 | .pmc_type = PPC_PMC_IBM, |
4920960f | 131 | .oprofile_cpu_type = "ppc64/rs64", |
7a45fb19 | 132 | .oprofile_type = PPC_OPROFILE_RS64, |
47c0bd1a | 133 | .machine_check = machine_check_generic, |
80f15dc7 | 134 | .platform = "rs64", |
4920960f SR |
135 | }, |
136 | { /* Pulsar */ | |
137 | .pvr_mask = 0xffff0000, | |
138 | .pvr_value = 0x00340000, | |
139 | .cpu_name = "RS64-III (pulsar)", | |
140 | .cpu_features = CPU_FTRS_RS64, | |
141 | .cpu_user_features = COMMON_USER_PPC64, | |
142 | .icache_bsize = 128, | |
143 | .dcache_bsize = 128, | |
144 | .num_pmcs = 8, | |
1bd2e5ae | 145 | .pmc_type = PPC_PMC_IBM, |
4920960f | 146 | .oprofile_cpu_type = "ppc64/rs64", |
7a45fb19 | 147 | .oprofile_type = PPC_OPROFILE_RS64, |
47c0bd1a | 148 | .machine_check = machine_check_generic, |
80f15dc7 | 149 | .platform = "rs64", |
4920960f SR |
150 | }, |
151 | { /* I-star */ | |
152 | .pvr_mask = 0xffff0000, | |
153 | .pvr_value = 0x00360000, | |
154 | .cpu_name = "RS64-III (icestar)", | |
155 | .cpu_features = CPU_FTRS_RS64, | |
156 | .cpu_user_features = COMMON_USER_PPC64, | |
157 | .icache_bsize = 128, | |
158 | .dcache_bsize = 128, | |
159 | .num_pmcs = 8, | |
1bd2e5ae | 160 | .pmc_type = PPC_PMC_IBM, |
4920960f | 161 | .oprofile_cpu_type = "ppc64/rs64", |
7a45fb19 | 162 | .oprofile_type = PPC_OPROFILE_RS64, |
47c0bd1a | 163 | .machine_check = machine_check_generic, |
80f15dc7 | 164 | .platform = "rs64", |
4920960f SR |
165 | }, |
166 | { /* S-star */ | |
167 | .pvr_mask = 0xffff0000, | |
168 | .pvr_value = 0x00370000, | |
169 | .cpu_name = "RS64-IV (sstar)", | |
170 | .cpu_features = CPU_FTRS_RS64, | |
171 | .cpu_user_features = COMMON_USER_PPC64, | |
172 | .icache_bsize = 128, | |
173 | .dcache_bsize = 128, | |
174 | .num_pmcs = 8, | |
1bd2e5ae | 175 | .pmc_type = PPC_PMC_IBM, |
4920960f | 176 | .oprofile_cpu_type = "ppc64/rs64", |
7a45fb19 | 177 | .oprofile_type = PPC_OPROFILE_RS64, |
47c0bd1a | 178 | .machine_check = machine_check_generic, |
80f15dc7 | 179 | .platform = "rs64", |
4920960f SR |
180 | }, |
181 | { /* Power4 */ | |
182 | .pvr_mask = 0xffff0000, | |
183 | .pvr_value = 0x00350000, | |
184 | .cpu_name = "POWER4 (gp)", | |
185 | .cpu_features = CPU_FTRS_POWER4, | |
a7ddc5e8 | 186 | .cpu_user_features = COMMON_USER_POWER4, |
4920960f SR |
187 | .icache_bsize = 128, |
188 | .dcache_bsize = 128, | |
189 | .num_pmcs = 8, | |
1bd2e5ae | 190 | .pmc_type = PPC_PMC_IBM, |
4920960f | 191 | .oprofile_cpu_type = "ppc64/power4", |
7a45fb19 | 192 | .oprofile_type = PPC_OPROFILE_POWER4, |
47c0bd1a | 193 | .machine_check = machine_check_generic, |
80f15dc7 | 194 | .platform = "power4", |
4920960f SR |
195 | }, |
196 | { /* Power4+ */ | |
197 | .pvr_mask = 0xffff0000, | |
198 | .pvr_value = 0x00380000, | |
199 | .cpu_name = "POWER4+ (gq)", | |
200 | .cpu_features = CPU_FTRS_POWER4, | |
a7ddc5e8 | 201 | .cpu_user_features = COMMON_USER_POWER4, |
4920960f SR |
202 | .icache_bsize = 128, |
203 | .dcache_bsize = 128, | |
204 | .num_pmcs = 8, | |
1bd2e5ae | 205 | .pmc_type = PPC_PMC_IBM, |
4920960f | 206 | .oprofile_cpu_type = "ppc64/power4", |
7a45fb19 | 207 | .oprofile_type = PPC_OPROFILE_POWER4, |
47c0bd1a | 208 | .machine_check = machine_check_generic, |
80f15dc7 | 209 | .platform = "power4", |
4920960f SR |
210 | }, |
211 | { /* PPC970 */ | |
212 | .pvr_mask = 0xffff0000, | |
213 | .pvr_value = 0x00390000, | |
214 | .cpu_name = "PPC970", | |
215 | .cpu_features = CPU_FTRS_PPC970, | |
a7ddc5e8 | 216 | .cpu_user_features = COMMON_USER_POWER4 | |
4920960f SR |
217 | PPC_FEATURE_HAS_ALTIVEC_COMP, |
218 | .icache_bsize = 128, | |
219 | .dcache_bsize = 128, | |
220 | .num_pmcs = 8, | |
1bd2e5ae | 221 | .pmc_type = PPC_PMC_IBM, |
4920960f | 222 | .cpu_setup = __setup_cpu_ppc970, |
f39b7a55 | 223 | .cpu_restore = __restore_cpu_ppc970, |
4920960f | 224 | .oprofile_cpu_type = "ppc64/970", |
7a45fb19 | 225 | .oprofile_type = PPC_OPROFILE_POWER4, |
47c0bd1a | 226 | .machine_check = machine_check_generic, |
80f15dc7 | 227 | .platform = "ppc970", |
4920960f | 228 | }, |
4920960f SR |
229 | { /* PPC970FX */ |
230 | .pvr_mask = 0xffff0000, | |
231 | .pvr_value = 0x003c0000, | |
232 | .cpu_name = "PPC970FX", | |
4920960f | 233 | .cpu_features = CPU_FTRS_PPC970, |
a7ddc5e8 | 234 | .cpu_user_features = COMMON_USER_POWER4 | |
4920960f SR |
235 | PPC_FEATURE_HAS_ALTIVEC_COMP, |
236 | .icache_bsize = 128, | |
237 | .dcache_bsize = 128, | |
238 | .num_pmcs = 8, | |
1bd2e5ae | 239 | .pmc_type = PPC_PMC_IBM, |
4920960f | 240 | .cpu_setup = __setup_cpu_ppc970, |
f39b7a55 | 241 | .cpu_restore = __restore_cpu_ppc970, |
4920960f | 242 | .oprofile_cpu_type = "ppc64/970", |
7a45fb19 | 243 | .oprofile_type = PPC_OPROFILE_POWER4, |
47c0bd1a | 244 | .machine_check = machine_check_generic, |
80f15dc7 | 245 | .platform = "ppc970", |
3546e811 OJ |
246 | }, |
247 | { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */ | |
248 | .pvr_mask = 0xffffffff, | |
249 | .pvr_value = 0x00440100, | |
250 | .cpu_name = "PPC970MP", | |
251 | .cpu_features = CPU_FTRS_PPC970, | |
252 | .cpu_user_features = COMMON_USER_POWER4 | | |
253 | PPC_FEATURE_HAS_ALTIVEC_COMP, | |
254 | .icache_bsize = 128, | |
255 | .dcache_bsize = 128, | |
256 | .num_pmcs = 8, | |
2fae4985 | 257 | .pmc_type = PPC_PMC_IBM, |
3546e811 OJ |
258 | .cpu_setup = __setup_cpu_ppc970, |
259 | .cpu_restore = __restore_cpu_ppc970, | |
260 | .oprofile_cpu_type = "ppc64/970MP", | |
261 | .oprofile_type = PPC_OPROFILE_POWER4, | |
47c0bd1a | 262 | .machine_check = machine_check_generic, |
3546e811 | 263 | .platform = "ppc970", |
4920960f | 264 | }, |
4920960f SR |
265 | { /* PPC970MP */ |
266 | .pvr_mask = 0xffff0000, | |
267 | .pvr_value = 0x00440000, | |
268 | .cpu_name = "PPC970MP", | |
269 | .cpu_features = CPU_FTRS_PPC970, | |
a7ddc5e8 | 270 | .cpu_user_features = COMMON_USER_POWER4 | |
4920960f SR |
271 | PPC_FEATURE_HAS_ALTIVEC_COMP, |
272 | .icache_bsize = 128, | |
273 | .dcache_bsize = 128, | |
87af41be | 274 | .num_pmcs = 8, |
2fae4985 | 275 | .pmc_type = PPC_PMC_IBM, |
5b43d20a | 276 | .cpu_setup = __setup_cpu_ppc970MP, |
f39b7a55 | 277 | .cpu_restore = __restore_cpu_ppc970, |
fecb352f | 278 | .oprofile_cpu_type = "ppc64/970MP", |
7a45fb19 | 279 | .oprofile_type = PPC_OPROFILE_POWER4, |
47c0bd1a | 280 | .machine_check = machine_check_generic, |
80f15dc7 | 281 | .platform = "ppc970", |
4920960f | 282 | }, |
362ff7b2 JM |
283 | { /* PPC970GX */ |
284 | .pvr_mask = 0xffff0000, | |
285 | .pvr_value = 0x00450000, | |
286 | .cpu_name = "PPC970GX", | |
287 | .cpu_features = CPU_FTRS_PPC970, | |
288 | .cpu_user_features = COMMON_USER_POWER4 | | |
289 | PPC_FEATURE_HAS_ALTIVEC_COMP, | |
290 | .icache_bsize = 128, | |
291 | .dcache_bsize = 128, | |
292 | .num_pmcs = 8, | |
1bd2e5ae | 293 | .pmc_type = PPC_PMC_IBM, |
362ff7b2 JM |
294 | .cpu_setup = __setup_cpu_ppc970, |
295 | .oprofile_cpu_type = "ppc64/970", | |
296 | .oprofile_type = PPC_OPROFILE_POWER4, | |
47c0bd1a | 297 | .machine_check = machine_check_generic, |
362ff7b2 JM |
298 | .platform = "ppc970", |
299 | }, | |
3c726f8d | 300 | { /* Power5 GR */ |
4920960f SR |
301 | .pvr_mask = 0xffff0000, |
302 | .pvr_value = 0x003a0000, | |
303 | .cpu_name = "POWER5 (gr)", | |
304 | .cpu_features = CPU_FTRS_POWER5, | |
a7ddc5e8 | 305 | .cpu_user_features = COMMON_USER_POWER5, |
4920960f SR |
306 | .icache_bsize = 128, |
307 | .dcache_bsize = 128, | |
308 | .num_pmcs = 6, | |
1bd2e5ae | 309 | .pmc_type = PPC_PMC_IBM, |
4920960f | 310 | .oprofile_cpu_type = "ppc64/power5", |
7a45fb19 | 311 | .oprofile_type = PPC_OPROFILE_POWER4, |
e78dbc80 MN |
312 | /* SIHV / SIPR bits are implemented on POWER4+ (GQ) |
313 | * and above but only works on POWER5 and above | |
314 | */ | |
315 | .oprofile_mmcra_sihv = MMCRA_SIHV, | |
316 | .oprofile_mmcra_sipr = MMCRA_SIPR, | |
47c0bd1a | 317 | .machine_check = machine_check_generic, |
80f15dc7 | 318 | .platform = "power5", |
4920960f | 319 | }, |
31a12cec MW |
320 | { /* Power5++ */ |
321 | .pvr_mask = 0xffffff00, | |
322 | .pvr_value = 0x003b0300, | |
323 | .cpu_name = "POWER5+ (gs)", | |
324 | .cpu_features = CPU_FTRS_POWER5, | |
325 | .cpu_user_features = COMMON_USER_POWER5_PLUS, | |
326 | .icache_bsize = 128, | |
327 | .dcache_bsize = 128, | |
328 | .num_pmcs = 6, | |
329 | .oprofile_cpu_type = "ppc64/power5++", | |
330 | .oprofile_type = PPC_OPROFILE_POWER4, | |
331 | .oprofile_mmcra_sihv = MMCRA_SIHV, | |
332 | .oprofile_mmcra_sipr = MMCRA_SIPR, | |
47c0bd1a | 333 | .machine_check = machine_check_generic, |
31a12cec MW |
334 | .platform = "power5+", |
335 | }, | |
3c726f8d | 336 | { /* Power5 GS */ |
4920960f SR |
337 | .pvr_mask = 0xffff0000, |
338 | .pvr_value = 0x003b0000, | |
834608f7 | 339 | .cpu_name = "POWER5+ (gs)", |
4920960f | 340 | .cpu_features = CPU_FTRS_POWER5, |
a7ddc5e8 | 341 | .cpu_user_features = COMMON_USER_POWER5_PLUS, |
4920960f SR |
342 | .icache_bsize = 128, |
343 | .dcache_bsize = 128, | |
344 | .num_pmcs = 6, | |
1bd2e5ae | 345 | .pmc_type = PPC_PMC_IBM, |
834608f7 | 346 | .oprofile_cpu_type = "ppc64/power5+", |
7a45fb19 | 347 | .oprofile_type = PPC_OPROFILE_POWER4, |
e78dbc80 MN |
348 | .oprofile_mmcra_sihv = MMCRA_SIHV, |
349 | .oprofile_mmcra_sipr = MMCRA_SIPR, | |
47c0bd1a | 350 | .machine_check = machine_check_generic, |
80f15dc7 | 351 | .platform = "power5+", |
4920960f | 352 | }, |
974a76f5 PM |
353 | { /* POWER6 in P5+ mode; 2.04-compliant processor */ |
354 | .pvr_mask = 0xffffffff, | |
355 | .pvr_value = 0x0f000001, | |
356 | .cpu_name = "POWER5+", | |
357 | .cpu_features = CPU_FTRS_POWER5, | |
358 | .cpu_user_features = COMMON_USER_POWER5_PLUS, | |
359 | .icache_bsize = 128, | |
360 | .dcache_bsize = 128, | |
47c0bd1a | 361 | .machine_check = machine_check_generic, |
79e25bac | 362 | .oprofile_cpu_type = "ppc64/compat-power5+", |
974a76f5 PM |
363 | .platform = "power5+", |
364 | }, | |
03054d51 AB |
365 | { /* Power6 */ |
366 | .pvr_mask = 0xffff0000, | |
367 | .pvr_value = 0x003e0000, | |
974a76f5 PM |
368 | .cpu_name = "POWER6 (raw)", |
369 | .cpu_features = CPU_FTRS_POWER6, | |
370 | .cpu_user_features = COMMON_USER_POWER6 | | |
371 | PPC_FEATURE_POWER6_EXT, | |
372 | .icache_bsize = 128, | |
373 | .dcache_bsize = 128, | |
374 | .num_pmcs = 6, | |
2fae4985 | 375 | .pmc_type = PPC_PMC_IBM, |
974a76f5 PM |
376 | .oprofile_cpu_type = "ppc64/power6", |
377 | .oprofile_type = PPC_OPROFILE_POWER4, | |
378 | .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV, | |
379 | .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR, | |
380 | .oprofile_mmcra_clear = POWER6_MMCRA_THRM | | |
381 | POWER6_MMCRA_OTHER, | |
47c0bd1a | 382 | .machine_check = machine_check_generic, |
974a76f5 PM |
383 | .platform = "power6x", |
384 | }, | |
385 | { /* 2.05-compliant processor, i.e. Power6 "architected" mode */ | |
386 | .pvr_mask = 0xffffffff, | |
387 | .pvr_value = 0x0f000002, | |
388 | .cpu_name = "POWER6 (architected)", | |
03054d51 AB |
389 | .cpu_features = CPU_FTRS_POWER6, |
390 | .cpu_user_features = COMMON_USER_POWER6, | |
391 | .icache_bsize = 128, | |
392 | .dcache_bsize = 128, | |
47c0bd1a | 393 | .machine_check = machine_check_generic, |
79e25bac | 394 | .oprofile_cpu_type = "ppc64/compat-power6", |
03054d51 AB |
395 | .platform = "power6", |
396 | }, | |
635f5a63 JS |
397 | { /* 2.06-compliant processor, i.e. Power7 "architected" mode */ |
398 | .pvr_mask = 0xffffffff, | |
399 | .pvr_value = 0x0f000003, | |
400 | .cpu_name = "POWER7 (architected)", | |
401 | .cpu_features = CPU_FTRS_POWER7, | |
402 | .cpu_user_features = COMMON_USER_POWER7, | |
403 | .icache_bsize = 128, | |
404 | .dcache_bsize = 128, | |
405 | .machine_check = machine_check_generic, | |
79e25bac | 406 | .oprofile_cpu_type = "ppc64/compat-power7", |
635f5a63 JS |
407 | .platform = "power7", |
408 | }, | |
e952e6c4 MN |
409 | { /* Power7 */ |
410 | .pvr_mask = 0xffff0000, | |
411 | .pvr_value = 0x003f0000, | |
635f5a63 | 412 | .cpu_name = "POWER7 (raw)", |
e952e6c4 MN |
413 | .cpu_features = CPU_FTRS_POWER7, |
414 | .cpu_user_features = COMMON_USER_POWER7, | |
415 | .icache_bsize = 128, | |
416 | .dcache_bsize = 128, | |
417 | .num_pmcs = 6, | |
418 | .pmc_type = PPC_PMC_IBM, | |
419 | .cpu_setup = __setup_cpu_power7, | |
420 | .cpu_restore = __restore_cpu_power7, | |
421 | .oprofile_cpu_type = "ppc64/power7", | |
422 | .oprofile_type = PPC_OPROFILE_POWER4, | |
423 | .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV, | |
424 | .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR, | |
425 | .oprofile_mmcra_clear = POWER6_MMCRA_THRM | | |
426 | POWER6_MMCRA_OTHER, | |
427 | .platform = "power7", | |
428 | }, | |
c902be71 | 429 | { /* Cell Broadband Engine */ |
4920960f SR |
430 | .pvr_mask = 0xffff0000, |
431 | .pvr_value = 0x00700000, | |
432 | .cpu_name = "Cell Broadband Engine", | |
433 | .cpu_features = CPU_FTRS_CELL, | |
434 | .cpu_user_features = COMMON_USER_PPC64 | | |
aa5cb021 BH |
435 | PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP | |
436 | PPC_FEATURE_SMT, | |
4920960f SR |
437 | .icache_bsize = 128, |
438 | .dcache_bsize = 128, | |
18f2190d | 439 | .num_pmcs = 4, |
1bd2e5ae | 440 | .pmc_type = PPC_PMC_IBM, |
18f2190d MJ |
441 | .oprofile_cpu_type = "ppc64/cell-be", |
442 | .oprofile_type = PPC_OPROFILE_CELL, | |
47c0bd1a | 443 | .machine_check = machine_check_generic, |
80f15dc7 | 444 | .platform = "ppc-cell-be", |
4920960f | 445 | }, |
b3ebd1d8 OJ |
446 | { /* PA Semi PA6T */ |
447 | .pvr_mask = 0x7fff0000, | |
448 | .pvr_value = 0x00900000, | |
449 | .cpu_name = "PA6T", | |
450 | .cpu_features = CPU_FTRS_PA6T, | |
451 | .cpu_user_features = COMMON_USER_PA6T, | |
452 | .icache_bsize = 64, | |
453 | .dcache_bsize = 64, | |
454 | .num_pmcs = 6, | |
1bd2e5ae | 455 | .pmc_type = PPC_PMC_PA6T, |
1199919b OJ |
456 | .cpu_setup = __setup_cpu_pa6t, |
457 | .cpu_restore = __restore_cpu_pa6t, | |
25fc530e OJ |
458 | .oprofile_cpu_type = "ppc64/pa6t", |
459 | .oprofile_type = PPC_OPROFILE_PA6T, | |
47c0bd1a | 460 | .machine_check = machine_check_generic, |
b3ebd1d8 OJ |
461 | .platform = "pa6t", |
462 | }, | |
4920960f SR |
463 | { /* default match */ |
464 | .pvr_mask = 0x00000000, | |
465 | .pvr_value = 0x00000000, | |
466 | .cpu_name = "POWER4 (compatible)", | |
467 | .cpu_features = CPU_FTRS_COMPATIBLE, | |
468 | .cpu_user_features = COMMON_USER_PPC64, | |
469 | .icache_bsize = 128, | |
470 | .dcache_bsize = 128, | |
471 | .num_pmcs = 6, | |
1bd2e5ae | 472 | .pmc_type = PPC_PMC_IBM, |
47c0bd1a | 473 | .machine_check = machine_check_generic, |
80f15dc7 | 474 | .platform = "power4", |
4920960f SR |
475 | } |
476 | #endif /* CONFIG_PPC64 */ | |
477 | #ifdef CONFIG_PPC32 | |
1da177e4 | 478 | #if CLASSIC_PPC |
4920960f | 479 | { /* 601 */ |
1da177e4 LT |
480 | .pvr_mask = 0xffff0000, |
481 | .pvr_value = 0x00010000, | |
482 | .cpu_name = "601", | |
10b35d99 | 483 | .cpu_features = CPU_FTRS_PPC601, |
4920960f | 484 | .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR | |
d8e998c5 | 485 | PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB, |
1da177e4 LT |
486 | .icache_bsize = 32, |
487 | .dcache_bsize = 32, | |
47c0bd1a | 488 | .machine_check = machine_check_generic, |
80f15dc7 | 489 | .platform = "ppc601", |
1da177e4 LT |
490 | }, |
491 | { /* 603 */ | |
492 | .pvr_mask = 0xffff0000, | |
493 | .pvr_value = 0x00030000, | |
494 | .cpu_name = "603", | |
10b35d99 | 495 | .cpu_features = CPU_FTRS_603, |
fab5db97 | 496 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
497 | .icache_bsize = 32, |
498 | .dcache_bsize = 32, | |
80f15dc7 | 499 | .cpu_setup = __setup_cpu_603, |
47c0bd1a | 500 | .machine_check = machine_check_generic, |
80f15dc7 | 501 | .platform = "ppc603", |
1da177e4 LT |
502 | }, |
503 | { /* 603e */ | |
504 | .pvr_mask = 0xffff0000, | |
505 | .pvr_value = 0x00060000, | |
506 | .cpu_name = "603e", | |
10b35d99 | 507 | .cpu_features = CPU_FTRS_603, |
fab5db97 | 508 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
509 | .icache_bsize = 32, |
510 | .dcache_bsize = 32, | |
80f15dc7 | 511 | .cpu_setup = __setup_cpu_603, |
47c0bd1a | 512 | .machine_check = machine_check_generic, |
80f15dc7 | 513 | .platform = "ppc603", |
1da177e4 LT |
514 | }, |
515 | { /* 603ev */ | |
516 | .pvr_mask = 0xffff0000, | |
517 | .pvr_value = 0x00070000, | |
518 | .cpu_name = "603ev", | |
10b35d99 | 519 | .cpu_features = CPU_FTRS_603, |
fab5db97 | 520 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
521 | .icache_bsize = 32, |
522 | .dcache_bsize = 32, | |
80f15dc7 | 523 | .cpu_setup = __setup_cpu_603, |
47c0bd1a | 524 | .machine_check = machine_check_generic, |
80f15dc7 | 525 | .platform = "ppc603", |
1da177e4 LT |
526 | }, |
527 | { /* 604 */ | |
528 | .pvr_mask = 0xffff0000, | |
529 | .pvr_value = 0x00040000, | |
530 | .cpu_name = "604", | |
10b35d99 | 531 | .cpu_features = CPU_FTRS_604, |
fab5db97 | 532 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
533 | .icache_bsize = 32, |
534 | .dcache_bsize = 32, | |
535 | .num_pmcs = 2, | |
80f15dc7 | 536 | .cpu_setup = __setup_cpu_604, |
47c0bd1a | 537 | .machine_check = machine_check_generic, |
80f15dc7 | 538 | .platform = "ppc604", |
1da177e4 LT |
539 | }, |
540 | { /* 604e */ | |
541 | .pvr_mask = 0xfffff000, | |
542 | .pvr_value = 0x00090000, | |
543 | .cpu_name = "604e", | |
10b35d99 | 544 | .cpu_features = CPU_FTRS_604, |
fab5db97 | 545 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
546 | .icache_bsize = 32, |
547 | .dcache_bsize = 32, | |
548 | .num_pmcs = 4, | |
80f15dc7 | 549 | .cpu_setup = __setup_cpu_604, |
47c0bd1a | 550 | .machine_check = machine_check_generic, |
80f15dc7 | 551 | .platform = "ppc604", |
1da177e4 LT |
552 | }, |
553 | { /* 604r */ | |
554 | .pvr_mask = 0xffff0000, | |
555 | .pvr_value = 0x00090000, | |
556 | .cpu_name = "604r", | |
10b35d99 | 557 | .cpu_features = CPU_FTRS_604, |
fab5db97 | 558 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
559 | .icache_bsize = 32, |
560 | .dcache_bsize = 32, | |
561 | .num_pmcs = 4, | |
80f15dc7 | 562 | .cpu_setup = __setup_cpu_604, |
47c0bd1a | 563 | .machine_check = machine_check_generic, |
80f15dc7 | 564 | .platform = "ppc604", |
1da177e4 LT |
565 | }, |
566 | { /* 604ev */ | |
567 | .pvr_mask = 0xffff0000, | |
568 | .pvr_value = 0x000a0000, | |
569 | .cpu_name = "604ev", | |
10b35d99 | 570 | .cpu_features = CPU_FTRS_604, |
fab5db97 | 571 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
572 | .icache_bsize = 32, |
573 | .dcache_bsize = 32, | |
574 | .num_pmcs = 4, | |
80f15dc7 | 575 | .cpu_setup = __setup_cpu_604, |
47c0bd1a | 576 | .machine_check = machine_check_generic, |
80f15dc7 | 577 | .platform = "ppc604", |
1da177e4 LT |
578 | }, |
579 | { /* 740/750 (0x4202, don't support TAU ?) */ | |
580 | .pvr_mask = 0xffffffff, | |
581 | .pvr_value = 0x00084202, | |
582 | .cpu_name = "740/750", | |
10b35d99 | 583 | .cpu_features = CPU_FTRS_740_NOTAU, |
fab5db97 | 584 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
585 | .icache_bsize = 32, |
586 | .dcache_bsize = 32, | |
587 | .num_pmcs = 4, | |
80f15dc7 | 588 | .cpu_setup = __setup_cpu_750, |
47c0bd1a | 589 | .machine_check = machine_check_generic, |
80f15dc7 | 590 | .platform = "ppc750", |
1da177e4 | 591 | }, |
1da177e4 LT |
592 | { /* 750CX (80100 and 8010x?) */ |
593 | .pvr_mask = 0xfffffff0, | |
594 | .pvr_value = 0x00080100, | |
595 | .cpu_name = "750CX", | |
10b35d99 | 596 | .cpu_features = CPU_FTRS_750, |
fab5db97 | 597 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
598 | .icache_bsize = 32, |
599 | .dcache_bsize = 32, | |
600 | .num_pmcs = 4, | |
80f15dc7 | 601 | .cpu_setup = __setup_cpu_750cx, |
47c0bd1a | 602 | .machine_check = machine_check_generic, |
80f15dc7 | 603 | .platform = "ppc750", |
1da177e4 LT |
604 | }, |
605 | { /* 750CX (82201 and 82202) */ | |
606 | .pvr_mask = 0xfffffff0, | |
607 | .pvr_value = 0x00082200, | |
608 | .cpu_name = "750CX", | |
10b35d99 | 609 | .cpu_features = CPU_FTRS_750, |
fab5db97 | 610 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
611 | .icache_bsize = 32, |
612 | .dcache_bsize = 32, | |
613 | .num_pmcs = 4, | |
b950bdd0 | 614 | .pmc_type = PPC_PMC_IBM, |
80f15dc7 | 615 | .cpu_setup = __setup_cpu_750cx, |
47c0bd1a | 616 | .machine_check = machine_check_generic, |
80f15dc7 | 617 | .platform = "ppc750", |
1da177e4 LT |
618 | }, |
619 | { /* 750CXe (82214) */ | |
620 | .pvr_mask = 0xfffffff0, | |
621 | .pvr_value = 0x00082210, | |
622 | .cpu_name = "750CXe", | |
10b35d99 | 623 | .cpu_features = CPU_FTRS_750, |
fab5db97 | 624 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
625 | .icache_bsize = 32, |
626 | .dcache_bsize = 32, | |
627 | .num_pmcs = 4, | |
b950bdd0 | 628 | .pmc_type = PPC_PMC_IBM, |
80f15dc7 | 629 | .cpu_setup = __setup_cpu_750cx, |
47c0bd1a | 630 | .machine_check = machine_check_generic, |
80f15dc7 | 631 | .platform = "ppc750", |
1da177e4 | 632 | }, |
7c31625a AO |
633 | { /* 750CXe "Gekko" (83214) */ |
634 | .pvr_mask = 0xffffffff, | |
635 | .pvr_value = 0x00083214, | |
636 | .cpu_name = "750CXe", | |
10b35d99 | 637 | .cpu_features = CPU_FTRS_750, |
fab5db97 | 638 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
7c31625a AO |
639 | .icache_bsize = 32, |
640 | .dcache_bsize = 32, | |
641 | .num_pmcs = 4, | |
b950bdd0 | 642 | .pmc_type = PPC_PMC_IBM, |
80f15dc7 | 643 | .cpu_setup = __setup_cpu_750cx, |
47c0bd1a | 644 | .machine_check = machine_check_generic, |
80f15dc7 | 645 | .platform = "ppc750", |
7c31625a | 646 | }, |
cfbff8a3 JM |
647 | { /* 750CL */ |
648 | .pvr_mask = 0xfffff0f0, | |
649 | .pvr_value = 0x00087010, | |
650 | .cpu_name = "750CL", | |
a14c4508 | 651 | .cpu_features = CPU_FTRS_750CL, |
cfbff8a3 JM |
652 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
653 | .icache_bsize = 32, | |
654 | .dcache_bsize = 32, | |
655 | .num_pmcs = 4, | |
b950bdd0 | 656 | .pmc_type = PPC_PMC_IBM, |
a14c4508 | 657 | .cpu_setup = __setup_cpu_750, |
47c0bd1a | 658 | .machine_check = machine_check_generic, |
cfbff8a3 JM |
659 | .platform = "ppc750", |
660 | }, | |
ac1ff047 AO |
661 | { /* 745/755 */ |
662 | .pvr_mask = 0xfffff000, | |
663 | .pvr_value = 0x00083000, | |
664 | .cpu_name = "745/755", | |
10b35d99 | 665 | .cpu_features = CPU_FTRS_750, |
fab5db97 | 666 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
ac1ff047 AO |
667 | .icache_bsize = 32, |
668 | .dcache_bsize = 32, | |
669 | .num_pmcs = 4, | |
b950bdd0 | 670 | .pmc_type = PPC_PMC_IBM, |
80f15dc7 | 671 | .cpu_setup = __setup_cpu_750, |
47c0bd1a | 672 | .machine_check = machine_check_generic, |
80f15dc7 | 673 | .platform = "ppc750", |
ac1ff047 | 674 | }, |
1da177e4 LT |
675 | { /* 750FX rev 1.x */ |
676 | .pvr_mask = 0xffffff00, | |
677 | .pvr_value = 0x70000100, | |
678 | .cpu_name = "750FX", | |
10b35d99 | 679 | .cpu_features = CPU_FTRS_750FX1, |
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, | |
b950bdd0 | 684 | .pmc_type = PPC_PMC_IBM, |
80f15dc7 | 685 | .cpu_setup = __setup_cpu_750, |
47c0bd1a | 686 | .machine_check = machine_check_generic, |
80f15dc7 | 687 | .platform = "ppc750", |
1da177e4 LT |
688 | }, |
689 | { /* 750FX rev 2.0 must disable HID0[DPM] */ | |
690 | .pvr_mask = 0xffffffff, | |
691 | .pvr_value = 0x70000200, | |
692 | .cpu_name = "750FX", | |
10b35d99 | 693 | .cpu_features = CPU_FTRS_750FX2, |
fab5db97 | 694 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
695 | .icache_bsize = 32, |
696 | .dcache_bsize = 32, | |
697 | .num_pmcs = 4, | |
b950bdd0 | 698 | .pmc_type = PPC_PMC_IBM, |
80f15dc7 | 699 | .cpu_setup = __setup_cpu_750, |
47c0bd1a | 700 | .machine_check = machine_check_generic, |
80f15dc7 | 701 | .platform = "ppc750", |
1da177e4 LT |
702 | }, |
703 | { /* 750FX (All revs except 2.0) */ | |
704 | .pvr_mask = 0xffff0000, | |
705 | .pvr_value = 0x70000000, | |
706 | .cpu_name = "750FX", | |
10b35d99 | 707 | .cpu_features = CPU_FTRS_750FX, |
fab5db97 | 708 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
709 | .icache_bsize = 32, |
710 | .dcache_bsize = 32, | |
711 | .num_pmcs = 4, | |
b950bdd0 | 712 | .pmc_type = PPC_PMC_IBM, |
80f15dc7 | 713 | .cpu_setup = __setup_cpu_750fx, |
47c0bd1a | 714 | .machine_check = machine_check_generic, |
80f15dc7 | 715 | .platform = "ppc750", |
1da177e4 LT |
716 | }, |
717 | { /* 750GX */ | |
718 | .pvr_mask = 0xffff0000, | |
719 | .pvr_value = 0x70020000, | |
720 | .cpu_name = "750GX", | |
10b35d99 | 721 | .cpu_features = CPU_FTRS_750GX, |
fab5db97 | 722 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
723 | .icache_bsize = 32, |
724 | .dcache_bsize = 32, | |
725 | .num_pmcs = 4, | |
b950bdd0 | 726 | .pmc_type = PPC_PMC_IBM, |
80f15dc7 | 727 | .cpu_setup = __setup_cpu_750fx, |
47c0bd1a | 728 | .machine_check = machine_check_generic, |
80f15dc7 | 729 | .platform = "ppc750", |
1da177e4 LT |
730 | }, |
731 | { /* 740/750 (L2CR bit need fixup for 740) */ | |
732 | .pvr_mask = 0xffff0000, | |
733 | .pvr_value = 0x00080000, | |
734 | .cpu_name = "740/750", | |
10b35d99 | 735 | .cpu_features = CPU_FTRS_740, |
fab5db97 | 736 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
737 | .icache_bsize = 32, |
738 | .dcache_bsize = 32, | |
739 | .num_pmcs = 4, | |
b950bdd0 | 740 | .pmc_type = PPC_PMC_IBM, |
80f15dc7 | 741 | .cpu_setup = __setup_cpu_750, |
47c0bd1a | 742 | .machine_check = machine_check_generic, |
80f15dc7 | 743 | .platform = "ppc750", |
1da177e4 LT |
744 | }, |
745 | { /* 7400 rev 1.1 ? (no TAU) */ | |
746 | .pvr_mask = 0xffffffff, | |
747 | .pvr_value = 0x000c1101, | |
748 | .cpu_name = "7400 (1.1)", | |
10b35d99 | 749 | .cpu_features = CPU_FTRS_7400_NOTAU, |
fab5db97 PM |
750 | .cpu_user_features = COMMON_USER | |
751 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, | |
1da177e4 LT |
752 | .icache_bsize = 32, |
753 | .dcache_bsize = 32, | |
754 | .num_pmcs = 4, | |
b950bdd0 | 755 | .pmc_type = PPC_PMC_G4, |
80f15dc7 | 756 | .cpu_setup = __setup_cpu_7400, |
47c0bd1a | 757 | .machine_check = machine_check_generic, |
80f15dc7 | 758 | .platform = "ppc7400", |
1da177e4 LT |
759 | }, |
760 | { /* 7400 */ | |
761 | .pvr_mask = 0xffff0000, | |
762 | .pvr_value = 0x000c0000, | |
763 | .cpu_name = "7400", | |
10b35d99 | 764 | .cpu_features = CPU_FTRS_7400, |
fab5db97 PM |
765 | .cpu_user_features = COMMON_USER | |
766 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, | |
1da177e4 LT |
767 | .icache_bsize = 32, |
768 | .dcache_bsize = 32, | |
769 | .num_pmcs = 4, | |
b950bdd0 | 770 | .pmc_type = PPC_PMC_G4, |
80f15dc7 | 771 | .cpu_setup = __setup_cpu_7400, |
47c0bd1a | 772 | .machine_check = machine_check_generic, |
80f15dc7 | 773 | .platform = "ppc7400", |
1da177e4 LT |
774 | }, |
775 | { /* 7410 */ | |
776 | .pvr_mask = 0xffff0000, | |
777 | .pvr_value = 0x800c0000, | |
778 | .cpu_name = "7410", | |
10b35d99 | 779 | .cpu_features = CPU_FTRS_7400, |
fab5db97 PM |
780 | .cpu_user_features = COMMON_USER | |
781 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, | |
1da177e4 LT |
782 | .icache_bsize = 32, |
783 | .dcache_bsize = 32, | |
784 | .num_pmcs = 4, | |
b950bdd0 | 785 | .pmc_type = PPC_PMC_G4, |
80f15dc7 | 786 | .cpu_setup = __setup_cpu_7410, |
47c0bd1a | 787 | .machine_check = machine_check_generic, |
80f15dc7 | 788 | .platform = "ppc7400", |
1da177e4 LT |
789 | }, |
790 | { /* 7450 2.0 - no doze/nap */ | |
791 | .pvr_mask = 0xffffffff, | |
792 | .pvr_value = 0x80000200, | |
793 | .cpu_name = "7450", | |
10b35d99 | 794 | .cpu_features = CPU_FTRS_7450_20, |
fab5db97 PM |
795 | .cpu_user_features = COMMON_USER | |
796 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, | |
1da177e4 LT |
797 | .icache_bsize = 32, |
798 | .dcache_bsize = 32, | |
799 | .num_pmcs = 6, | |
b950bdd0 | 800 | .pmc_type = PPC_PMC_G4, |
555d97ac | 801 | .cpu_setup = __setup_cpu_745x, |
555d97ac | 802 | .oprofile_cpu_type = "ppc/7450", |
7a45fb19 | 803 | .oprofile_type = PPC_OPROFILE_G4, |
47c0bd1a | 804 | .machine_check = machine_check_generic, |
80f15dc7 | 805 | .platform = "ppc7450", |
1da177e4 LT |
806 | }, |
807 | { /* 7450 2.1 */ | |
808 | .pvr_mask = 0xffffffff, | |
809 | .pvr_value = 0x80000201, | |
810 | .cpu_name = "7450", | |
10b35d99 | 811 | .cpu_features = CPU_FTRS_7450_21, |
fab5db97 PM |
812 | .cpu_user_features = COMMON_USER | |
813 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, | |
1da177e4 LT |
814 | .icache_bsize = 32, |
815 | .dcache_bsize = 32, | |
816 | .num_pmcs = 6, | |
b950bdd0 | 817 | .pmc_type = PPC_PMC_G4, |
555d97ac | 818 | .cpu_setup = __setup_cpu_745x, |
555d97ac | 819 | .oprofile_cpu_type = "ppc/7450", |
7a45fb19 | 820 | .oprofile_type = PPC_OPROFILE_G4, |
47c0bd1a | 821 | .machine_check = machine_check_generic, |
80f15dc7 | 822 | .platform = "ppc7450", |
1da177e4 LT |
823 | }, |
824 | { /* 7450 2.3 and newer */ | |
825 | .pvr_mask = 0xffff0000, | |
826 | .pvr_value = 0x80000000, | |
827 | .cpu_name = "7450", | |
10b35d99 | 828 | .cpu_features = CPU_FTRS_7450_23, |
fab5db97 PM |
829 | .cpu_user_features = COMMON_USER | |
830 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, | |
1da177e4 LT |
831 | .icache_bsize = 32, |
832 | .dcache_bsize = 32, | |
833 | .num_pmcs = 6, | |
b950bdd0 | 834 | .pmc_type = PPC_PMC_G4, |
555d97ac | 835 | .cpu_setup = __setup_cpu_745x, |
555d97ac | 836 | .oprofile_cpu_type = "ppc/7450", |
7a45fb19 | 837 | .oprofile_type = PPC_OPROFILE_G4, |
47c0bd1a | 838 | .machine_check = machine_check_generic, |
80f15dc7 | 839 | .platform = "ppc7450", |
1da177e4 LT |
840 | }, |
841 | { /* 7455 rev 1.x */ | |
842 | .pvr_mask = 0xffffff00, | |
843 | .pvr_value = 0x80010100, | |
844 | .cpu_name = "7455", | |
10b35d99 | 845 | .cpu_features = CPU_FTRS_7455_1, |
fab5db97 PM |
846 | .cpu_user_features = COMMON_USER | |
847 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, | |
1da177e4 LT |
848 | .icache_bsize = 32, |
849 | .dcache_bsize = 32, | |
850 | .num_pmcs = 6, | |
b950bdd0 | 851 | .pmc_type = PPC_PMC_G4, |
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 | { /* 7455 rev 2.0 */ | |
859 | .pvr_mask = 0xffffffff, | |
860 | .pvr_value = 0x80010200, | |
861 | .cpu_name = "7455", | |
10b35d99 | 862 | .cpu_features = CPU_FTRS_7455_20, |
fab5db97 PM |
863 | .cpu_user_features = COMMON_USER | |
864 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, | |
1da177e4 LT |
865 | .icache_bsize = 32, |
866 | .dcache_bsize = 32, | |
867 | .num_pmcs = 6, | |
b950bdd0 | 868 | .pmc_type = PPC_PMC_G4, |
555d97ac | 869 | .cpu_setup = __setup_cpu_745x, |
555d97ac | 870 | .oprofile_cpu_type = "ppc/7450", |
7a45fb19 | 871 | .oprofile_type = PPC_OPROFILE_G4, |
47c0bd1a | 872 | .machine_check = machine_check_generic, |
80f15dc7 | 873 | .platform = "ppc7450", |
1da177e4 LT |
874 | }, |
875 | { /* 7455 others */ | |
876 | .pvr_mask = 0xffff0000, | |
877 | .pvr_value = 0x80010000, | |
878 | .cpu_name = "7455", | |
10b35d99 | 879 | .cpu_features = CPU_FTRS_7455, |
fab5db97 PM |
880 | .cpu_user_features = COMMON_USER | |
881 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, | |
1da177e4 LT |
882 | .icache_bsize = 32, |
883 | .dcache_bsize = 32, | |
884 | .num_pmcs = 6, | |
b950bdd0 | 885 | .pmc_type = PPC_PMC_G4, |
555d97ac | 886 | .cpu_setup = __setup_cpu_745x, |
555d97ac | 887 | .oprofile_cpu_type = "ppc/7450", |
7a45fb19 | 888 | .oprofile_type = PPC_OPROFILE_G4, |
47c0bd1a | 889 | .machine_check = machine_check_generic, |
80f15dc7 | 890 | .platform = "ppc7450", |
1da177e4 LT |
891 | }, |
892 | { /* 7447/7457 Rev 1.0 */ | |
893 | .pvr_mask = 0xffffffff, | |
894 | .pvr_value = 0x80020100, | |
895 | .cpu_name = "7447/7457", | |
10b35d99 | 896 | .cpu_features = CPU_FTRS_7447_10, |
fab5db97 PM |
897 | .cpu_user_features = COMMON_USER | |
898 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, | |
1da177e4 LT |
899 | .icache_bsize = 32, |
900 | .dcache_bsize = 32, | |
901 | .num_pmcs = 6, | |
b950bdd0 | 902 | .pmc_type = PPC_PMC_G4, |
555d97ac | 903 | .cpu_setup = __setup_cpu_745x, |
555d97ac | 904 | .oprofile_cpu_type = "ppc/7450", |
7a45fb19 | 905 | .oprofile_type = PPC_OPROFILE_G4, |
47c0bd1a | 906 | .machine_check = machine_check_generic, |
80f15dc7 | 907 | .platform = "ppc7450", |
1da177e4 LT |
908 | }, |
909 | { /* 7447/7457 Rev 1.1 */ | |
910 | .pvr_mask = 0xffffffff, | |
911 | .pvr_value = 0x80020101, | |
912 | .cpu_name = "7447/7457", | |
10b35d99 | 913 | .cpu_features = CPU_FTRS_7447_10, |
fab5db97 PM |
914 | .cpu_user_features = COMMON_USER | |
915 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, | |
1da177e4 LT |
916 | .icache_bsize = 32, |
917 | .dcache_bsize = 32, | |
918 | .num_pmcs = 6, | |
b950bdd0 | 919 | .pmc_type = PPC_PMC_G4, |
555d97ac | 920 | .cpu_setup = __setup_cpu_745x, |
555d97ac | 921 | .oprofile_cpu_type = "ppc/7450", |
7a45fb19 | 922 | .oprofile_type = PPC_OPROFILE_G4, |
47c0bd1a | 923 | .machine_check = machine_check_generic, |
80f15dc7 | 924 | .platform = "ppc7450", |
1da177e4 LT |
925 | }, |
926 | { /* 7447/7457 Rev 1.2 and later */ | |
927 | .pvr_mask = 0xffff0000, | |
928 | .pvr_value = 0x80020000, | |
929 | .cpu_name = "7447/7457", | |
10b35d99 | 930 | .cpu_features = CPU_FTRS_7447, |
fab5db97 | 931 | .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
932 | .icache_bsize = 32, |
933 | .dcache_bsize = 32, | |
934 | .num_pmcs = 6, | |
b950bdd0 | 935 | .pmc_type = PPC_PMC_G4, |
555d97ac | 936 | .cpu_setup = __setup_cpu_745x, |
555d97ac | 937 | .oprofile_cpu_type = "ppc/7450", |
7a45fb19 | 938 | .oprofile_type = PPC_OPROFILE_G4, |
47c0bd1a | 939 | .machine_check = machine_check_generic, |
80f15dc7 | 940 | .platform = "ppc7450", |
1da177e4 LT |
941 | }, |
942 | { /* 7447A */ | |
943 | .pvr_mask = 0xffff0000, | |
944 | .pvr_value = 0x80030000, | |
945 | .cpu_name = "7447A", | |
10b35d99 | 946 | .cpu_features = CPU_FTRS_7447A, |
fab5db97 PM |
947 | .cpu_user_features = COMMON_USER | |
948 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, | |
bbde630b KG |
949 | .icache_bsize = 32, |
950 | .dcache_bsize = 32, | |
951 | .num_pmcs = 6, | |
b950bdd0 | 952 | .pmc_type = PPC_PMC_G4, |
555d97ac | 953 | .cpu_setup = __setup_cpu_745x, |
555d97ac | 954 | .oprofile_cpu_type = "ppc/7450", |
7a45fb19 | 955 | .oprofile_type = PPC_OPROFILE_G4, |
47c0bd1a | 956 | .machine_check = machine_check_generic, |
80f15dc7 | 957 | .platform = "ppc7450", |
bbde630b KG |
958 | }, |
959 | { /* 7448 */ | |
960 | .pvr_mask = 0xffff0000, | |
961 | .pvr_value = 0x80040000, | |
962 | .cpu_name = "7448", | |
3d372548 | 963 | .cpu_features = CPU_FTRS_7448, |
fab5db97 PM |
964 | .cpu_user_features = COMMON_USER | |
965 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, | |
1da177e4 LT |
966 | .icache_bsize = 32, |
967 | .dcache_bsize = 32, | |
968 | .num_pmcs = 6, | |
b950bdd0 | 969 | .pmc_type = PPC_PMC_G4, |
555d97ac | 970 | .cpu_setup = __setup_cpu_745x, |
555d97ac | 971 | .oprofile_cpu_type = "ppc/7450", |
7a45fb19 | 972 | .oprofile_type = PPC_OPROFILE_G4, |
47c0bd1a | 973 | .machine_check = machine_check_generic, |
80f15dc7 | 974 | .platform = "ppc7450", |
1da177e4 LT |
975 | }, |
976 | { /* 82xx (8240, 8245, 8260 are all 603e cores) */ | |
977 | .pvr_mask = 0x7fff0000, | |
978 | .pvr_value = 0x00810000, | |
979 | .cpu_name = "82xx", | |
10b35d99 | 980 | .cpu_features = CPU_FTRS_82XX, |
4920960f | 981 | .cpu_user_features = COMMON_USER, |
1da177e4 LT |
982 | .icache_bsize = 32, |
983 | .dcache_bsize = 32, | |
80f15dc7 | 984 | .cpu_setup = __setup_cpu_603, |
47c0bd1a | 985 | .machine_check = machine_check_generic, |
80f15dc7 | 986 | .platform = "ppc603", |
1da177e4 LT |
987 | }, |
988 | { /* All G2_LE (603e core, plus some) have the same pvr */ | |
989 | .pvr_mask = 0x7fff0000, | |
990 | .pvr_value = 0x00820000, | |
991 | .cpu_name = "G2_LE", | |
10b35d99 | 992 | .cpu_features = CPU_FTRS_G2_LE, |
4920960f | 993 | .cpu_user_features = COMMON_USER, |
1da177e4 LT |
994 | .icache_bsize = 32, |
995 | .dcache_bsize = 32, | |
80f15dc7 | 996 | .cpu_setup = __setup_cpu_603, |
47c0bd1a | 997 | .machine_check = machine_check_generic, |
80f15dc7 | 998 | .platform = "ppc603", |
1da177e4 | 999 | }, |
6c4a2501 | 1000 | { /* e300c1 (a 603e core, plus some) on 83xx */ |
1da177e4 LT |
1001 | .pvr_mask = 0x7fff0000, |
1002 | .pvr_value = 0x00830000, | |
6c4a2501 | 1003 | .cpu_name = "e300c1", |
10b35d99 | 1004 | .cpu_features = CPU_FTRS_E300, |
4920960f | 1005 | .cpu_user_features = COMMON_USER, |
1da177e4 LT |
1006 | .icache_bsize = 32, |
1007 | .dcache_bsize = 32, | |
80f15dc7 | 1008 | .cpu_setup = __setup_cpu_603, |
47c0bd1a | 1009 | .machine_check = machine_check_generic, |
80f15dc7 | 1010 | .platform = "ppc603", |
1da177e4 | 1011 | }, |
6c4a2501 KP |
1012 | { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */ |
1013 | .pvr_mask = 0x7fff0000, | |
1014 | .pvr_value = 0x00840000, | |
1015 | .cpu_name = "e300c2", | |
aa42c69c | 1016 | .cpu_features = CPU_FTRS_E300C2, |
6c4a2501 KP |
1017 | .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, |
1018 | .icache_bsize = 32, | |
1019 | .dcache_bsize = 32, | |
1020 | .cpu_setup = __setup_cpu_603, | |
47c0bd1a | 1021 | .machine_check = machine_check_generic, |
6c4a2501 KP |
1022 | .platform = "ppc603", |
1023 | }, | |
a58d5244 | 1024 | { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */ |
57933f8f SW |
1025 | .pvr_mask = 0x7fff0000, |
1026 | .pvr_value = 0x00850000, | |
1027 | .cpu_name = "e300c3", | |
1028 | .cpu_features = CPU_FTRS_E300, | |
1029 | .cpu_user_features = COMMON_USER, | |
1030 | .icache_bsize = 32, | |
1031 | .dcache_bsize = 32, | |
1032 | .cpu_setup = __setup_cpu_603, | |
1347a2c1 AF |
1033 | .num_pmcs = 4, |
1034 | .oprofile_cpu_type = "ppc/e300", | |
1035 | .oprofile_type = PPC_OPROFILE_FSL_EMB, | |
57933f8f SW |
1036 | .platform = "ppc603", |
1037 | }, | |
a58d5244 LY |
1038 | { /* e300c4 (e300c1, plus one IU) */ |
1039 | .pvr_mask = 0x7fff0000, | |
1040 | .pvr_value = 0x00860000, | |
1041 | .cpu_name = "e300c4", | |
1042 | .cpu_features = CPU_FTRS_E300, | |
1043 | .cpu_user_features = COMMON_USER, | |
1044 | .icache_bsize = 32, | |
1045 | .dcache_bsize = 32, | |
1046 | .cpu_setup = __setup_cpu_603, | |
47c0bd1a | 1047 | .machine_check = machine_check_generic, |
1347a2c1 AF |
1048 | .num_pmcs = 4, |
1049 | .oprofile_cpu_type = "ppc/e300", | |
1050 | .oprofile_type = PPC_OPROFILE_FSL_EMB, | |
a58d5244 LY |
1051 | .platform = "ppc603", |
1052 | }, | |
1da177e4 LT |
1053 | { /* default match, we assume split I/D cache & TB (non-601)... */ |
1054 | .pvr_mask = 0x00000000, | |
1055 | .pvr_value = 0x00000000, | |
1056 | .cpu_name = "(generic PPC)", | |
10b35d99 | 1057 | .cpu_features = CPU_FTRS_CLASSIC32, |
4920960f | 1058 | .cpu_user_features = COMMON_USER, |
1da177e4 LT |
1059 | .icache_bsize = 32, |
1060 | .dcache_bsize = 32, | |
47c0bd1a | 1061 | .machine_check = machine_check_generic, |
80f15dc7 | 1062 | .platform = "ppc603", |
1da177e4 LT |
1063 | }, |
1064 | #endif /* CLASSIC_PPC */ | |
1da177e4 LT |
1065 | #ifdef CONFIG_8xx |
1066 | { /* 8xx */ | |
1067 | .pvr_mask = 0xffff0000, | |
1068 | .pvr_value = 0x00500000, | |
1069 | .cpu_name = "8xx", | |
1070 | /* CPU_FTR_MAYBE_CAN_DOZE is possible, | |
1071 | * if the 8xx code is there.... */ | |
10b35d99 | 1072 | .cpu_features = CPU_FTRS_8XX, |
1da177e4 LT |
1073 | .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, |
1074 | .icache_bsize = 16, | |
1075 | .dcache_bsize = 16, | |
80f15dc7 | 1076 | .platform = "ppc823", |
1da177e4 LT |
1077 | }, |
1078 | #endif /* CONFIG_8xx */ | |
1079 | #ifdef CONFIG_40x | |
1080 | { /* 403GC */ | |
1081 | .pvr_mask = 0xffffff00, | |
1082 | .pvr_value = 0x00200200, | |
1083 | .cpu_name = "403GC", | |
10b35d99 | 1084 | .cpu_features = CPU_FTRS_40X, |
1da177e4 LT |
1085 | .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, |
1086 | .icache_bsize = 16, | |
1087 | .dcache_bsize = 16, | |
47c0bd1a | 1088 | .machine_check = machine_check_4xx, |
80f15dc7 | 1089 | .platform = "ppc403", |
1da177e4 LT |
1090 | }, |
1091 | { /* 403GCX */ | |
1092 | .pvr_mask = 0xffffff00, | |
1093 | .pvr_value = 0x00201400, | |
1094 | .cpu_name = "403GCX", | |
10b35d99 | 1095 | .cpu_features = CPU_FTRS_40X, |
d8e998c5 BH |
1096 | .cpu_user_features = PPC_FEATURE_32 | |
1097 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB, | |
1da177e4 LT |
1098 | .icache_bsize = 16, |
1099 | .dcache_bsize = 16, | |
47c0bd1a | 1100 | .machine_check = machine_check_4xx, |
80f15dc7 | 1101 | .platform = "ppc403", |
1da177e4 LT |
1102 | }, |
1103 | { /* 403G ?? */ | |
1104 | .pvr_mask = 0xffff0000, | |
1105 | .pvr_value = 0x00200000, | |
1106 | .cpu_name = "403G ??", | |
10b35d99 | 1107 | .cpu_features = CPU_FTRS_40X, |
1da177e4 LT |
1108 | .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, |
1109 | .icache_bsize = 16, | |
1110 | .dcache_bsize = 16, | |
47c0bd1a | 1111 | .machine_check = machine_check_4xx, |
80f15dc7 | 1112 | .platform = "ppc403", |
1da177e4 LT |
1113 | }, |
1114 | { /* 405GP */ | |
1115 | .pvr_mask = 0xffff0000, | |
1116 | .pvr_value = 0x40110000, | |
1117 | .cpu_name = "405GP", | |
10b35d99 | 1118 | .cpu_features = CPU_FTRS_40X, |
1da177e4 LT |
1119 | .cpu_user_features = PPC_FEATURE_32 | |
1120 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | |
1121 | .icache_bsize = 32, | |
1122 | .dcache_bsize = 32, | |
47c0bd1a | 1123 | .machine_check = machine_check_4xx, |
80f15dc7 | 1124 | .platform = "ppc405", |
1da177e4 LT |
1125 | }, |
1126 | { /* STB 03xxx */ | |
1127 | .pvr_mask = 0xffff0000, | |
1128 | .pvr_value = 0x40130000, | |
1129 | .cpu_name = "STB03xxx", | |
10b35d99 | 1130 | .cpu_features = CPU_FTRS_40X, |
1da177e4 LT |
1131 | .cpu_user_features = PPC_FEATURE_32 | |
1132 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | |
1133 | .icache_bsize = 32, | |
1134 | .dcache_bsize = 32, | |
47c0bd1a | 1135 | .machine_check = machine_check_4xx, |
80f15dc7 | 1136 | .platform = "ppc405", |
1da177e4 LT |
1137 | }, |
1138 | { /* STB 04xxx */ | |
1139 | .pvr_mask = 0xffff0000, | |
1140 | .pvr_value = 0x41810000, | |
1141 | .cpu_name = "STB04xxx", | |
10b35d99 | 1142 | .cpu_features = CPU_FTRS_40X, |
1da177e4 LT |
1143 | .cpu_user_features = PPC_FEATURE_32 | |
1144 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | |
1145 | .icache_bsize = 32, | |
1146 | .dcache_bsize = 32, | |
47c0bd1a | 1147 | .machine_check = machine_check_4xx, |
80f15dc7 | 1148 | .platform = "ppc405", |
1da177e4 LT |
1149 | }, |
1150 | { /* NP405L */ | |
1151 | .pvr_mask = 0xffff0000, | |
1152 | .pvr_value = 0x41610000, | |
1153 | .cpu_name = "NP405L", | |
10b35d99 | 1154 | .cpu_features = CPU_FTRS_40X, |
1da177e4 LT |
1155 | .cpu_user_features = PPC_FEATURE_32 | |
1156 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | |
1157 | .icache_bsize = 32, | |
1158 | .dcache_bsize = 32, | |
47c0bd1a | 1159 | .machine_check = machine_check_4xx, |
80f15dc7 | 1160 | .platform = "ppc405", |
1da177e4 LT |
1161 | }, |
1162 | { /* NP4GS3 */ | |
1163 | .pvr_mask = 0xffff0000, | |
1164 | .pvr_value = 0x40B10000, | |
1165 | .cpu_name = "NP4GS3", | |
10b35d99 | 1166 | .cpu_features = CPU_FTRS_40X, |
1da177e4 LT |
1167 | .cpu_user_features = PPC_FEATURE_32 | |
1168 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | |
1169 | .icache_bsize = 32, | |
1170 | .dcache_bsize = 32, | |
47c0bd1a | 1171 | .machine_check = machine_check_4xx, |
80f15dc7 | 1172 | .platform = "ppc405", |
1da177e4 LT |
1173 | }, |
1174 | { /* NP405H */ | |
1175 | .pvr_mask = 0xffff0000, | |
1176 | .pvr_value = 0x41410000, | |
1177 | .cpu_name = "NP405H", | |
10b35d99 | 1178 | .cpu_features = CPU_FTRS_40X, |
1da177e4 LT |
1179 | .cpu_user_features = PPC_FEATURE_32 | |
1180 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | |
1181 | .icache_bsize = 32, | |
1182 | .dcache_bsize = 32, | |
47c0bd1a | 1183 | .machine_check = machine_check_4xx, |
80f15dc7 | 1184 | .platform = "ppc405", |
1da177e4 LT |
1185 | }, |
1186 | { /* 405GPr */ | |
1187 | .pvr_mask = 0xffff0000, | |
1188 | .pvr_value = 0x50910000, | |
1189 | .cpu_name = "405GPr", | |
10b35d99 | 1190 | .cpu_features = CPU_FTRS_40X, |
1da177e4 LT |
1191 | .cpu_user_features = PPC_FEATURE_32 | |
1192 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | |
1193 | .icache_bsize = 32, | |
1194 | .dcache_bsize = 32, | |
47c0bd1a | 1195 | .machine_check = machine_check_4xx, |
80f15dc7 | 1196 | .platform = "ppc405", |
1da177e4 LT |
1197 | }, |
1198 | { /* STBx25xx */ | |
1199 | .pvr_mask = 0xffff0000, | |
1200 | .pvr_value = 0x51510000, | |
1201 | .cpu_name = "STBx25xx", | |
10b35d99 | 1202 | .cpu_features = CPU_FTRS_40X, |
1da177e4 LT |
1203 | .cpu_user_features = PPC_FEATURE_32 | |
1204 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | |
1205 | .icache_bsize = 32, | |
1206 | .dcache_bsize = 32, | |
47c0bd1a | 1207 | .machine_check = machine_check_4xx, |
80f15dc7 | 1208 | .platform = "ppc405", |
1da177e4 LT |
1209 | }, |
1210 | { /* 405LP */ | |
1211 | .pvr_mask = 0xffff0000, | |
1212 | .pvr_value = 0x41F10000, | |
1213 | .cpu_name = "405LP", | |
10b35d99 | 1214 | .cpu_features = CPU_FTRS_40X, |
1da177e4 LT |
1215 | .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, |
1216 | .icache_bsize = 32, | |
1217 | .dcache_bsize = 32, | |
47c0bd1a | 1218 | .machine_check = machine_check_4xx, |
80f15dc7 | 1219 | .platform = "ppc405", |
1da177e4 LT |
1220 | }, |
1221 | { /* Xilinx Virtex-II Pro */ | |
72646c7f | 1222 | .pvr_mask = 0xfffff000, |
1da177e4 LT |
1223 | .pvr_value = 0x20010000, |
1224 | .cpu_name = "Virtex-II Pro", | |
10b35d99 | 1225 | .cpu_features = CPU_FTRS_40X, |
1da177e4 LT |
1226 | .cpu_user_features = PPC_FEATURE_32 | |
1227 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | |
1228 | .icache_bsize = 32, | |
1229 | .dcache_bsize = 32, | |
47c0bd1a | 1230 | .machine_check = machine_check_4xx, |
80f15dc7 | 1231 | .platform = "ppc405", |
1da177e4 | 1232 | }, |
72646c7f GL |
1233 | { /* Xilinx Virtex-4 FX */ |
1234 | .pvr_mask = 0xfffff000, | |
1235 | .pvr_value = 0x20011000, | |
1236 | .cpu_name = "Virtex-4 FX", | |
1237 | .cpu_features = CPU_FTRS_40X, | |
1238 | .cpu_user_features = PPC_FEATURE_32 | | |
1239 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | |
1240 | .icache_bsize = 32, | |
1241 | .dcache_bsize = 32, | |
47c0bd1a | 1242 | .machine_check = machine_check_4xx, |
838fdb4d | 1243 | .platform = "ppc405", |
72646c7f | 1244 | }, |
ad95d609 ES |
1245 | { /* 405EP */ |
1246 | .pvr_mask = 0xffff0000, | |
1247 | .pvr_value = 0x51210000, | |
1248 | .cpu_name = "405EP", | |
10b35d99 | 1249 | .cpu_features = CPU_FTRS_40X, |
5d8476c8 SR |
1250 | .cpu_user_features = PPC_FEATURE_32 | |
1251 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | |
1252 | .icache_bsize = 32, | |
1253 | .dcache_bsize = 32, | |
47c0bd1a | 1254 | .machine_check = machine_check_4xx, |
5d8476c8 SR |
1255 | .platform = "ppc405", |
1256 | }, | |
1257 | { /* 405EX */ | |
b676d84e SR |
1258 | .pvr_mask = 0xffff0004, |
1259 | .pvr_value = 0x12910004, | |
5d8476c8 SR |
1260 | .cpu_name = "405EX", |
1261 | .cpu_features = CPU_FTRS_40X, | |
ad95d609 ES |
1262 | .cpu_user_features = PPC_FEATURE_32 | |
1263 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | |
1264 | .icache_bsize = 32, | |
1265 | .dcache_bsize = 32, | |
47c0bd1a | 1266 | .machine_check = machine_check_4xx, |
80f15dc7 | 1267 | .platform = "ppc405", |
ad95d609 | 1268 | }, |
b676d84e SR |
1269 | { /* 405EXr */ |
1270 | .pvr_mask = 0xffff0004, | |
1271 | .pvr_value = 0x12910000, | |
1272 | .cpu_name = "405EXr", | |
1273 | .cpu_features = CPU_FTRS_40X, | |
1274 | .cpu_user_features = PPC_FEATURE_32 | | |
1275 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | |
1276 | .icache_bsize = 32, | |
1277 | .dcache_bsize = 32, | |
1278 | .machine_check = machine_check_4xx, | |
1279 | .platform = "ppc405", | |
1280 | }, | |
df8f71fa JB |
1281 | { |
1282 | /* 405EZ */ | |
1283 | .pvr_mask = 0xffff0000, | |
1284 | .pvr_value = 0x41510000, | |
1285 | .cpu_name = "405EZ", | |
1286 | .cpu_features = CPU_FTRS_40X, | |
1287 | .cpu_user_features = PPC_FEATURE_32 | | |
1288 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | |
1289 | .icache_bsize = 32, | |
1290 | .dcache_bsize = 32, | |
1291 | .machine_check = machine_check_4xx, | |
1292 | .platform = "ppc405", | |
1293 | }, | |
76bc080e BH |
1294 | { /* default match */ |
1295 | .pvr_mask = 0x00000000, | |
1296 | .pvr_value = 0x00000000, | |
1297 | .cpu_name = "(generic 40x PPC)", | |
1298 | .cpu_features = CPU_FTRS_40X, | |
1299 | .cpu_user_features = PPC_FEATURE_32 | | |
1300 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | |
1301 | .icache_bsize = 32, | |
1302 | .dcache_bsize = 32, | |
1303 | .machine_check = machine_check_4xx, | |
1304 | .platform = "ppc405", | |
1305 | } | |
1da177e4 LT |
1306 | |
1307 | #endif /* CONFIG_40x */ | |
1308 | #ifdef CONFIG_44x | |
c9cf73ae MP |
1309 | { |
1310 | .pvr_mask = 0xf0000fff, | |
1311 | .pvr_value = 0x40000850, | |
d1dfc35d VB |
1312 | .cpu_name = "440GR Rev. A", |
1313 | .cpu_features = CPU_FTRS_44X, | |
1314 | .cpu_user_features = COMMON_USER_BOOKE, | |
1315 | .icache_bsize = 32, | |
1316 | .dcache_bsize = 32, | |
47c0bd1a | 1317 | .machine_check = machine_check_4xx, |
d1dfc35d VB |
1318 | .platform = "ppc440", |
1319 | }, | |
1320 | { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */ | |
1321 | .pvr_mask = 0xf0000fff, | |
1322 | .pvr_value = 0x40000858, | |
c9cf73ae | 1323 | .cpu_name = "440EP Rev. A", |
10b35d99 | 1324 | .cpu_features = CPU_FTRS_44X, |
80f15dc7 | 1325 | .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU, |
c9cf73ae MP |
1326 | .icache_bsize = 32, |
1327 | .dcache_bsize = 32, | |
8112753b | 1328 | .cpu_setup = __setup_cpu_440ep, |
47c0bd1a | 1329 | .machine_check = machine_check_4xx, |
80f15dc7 | 1330 | .platform = "ppc440", |
c9cf73ae MP |
1331 | }, |
1332 | { | |
1333 | .pvr_mask = 0xf0000fff, | |
1334 | .pvr_value = 0x400008d3, | |
d1dfc35d | 1335 | .cpu_name = "440GR Rev. B", |
10b35d99 | 1336 | .cpu_features = CPU_FTRS_44X, |
80f15dc7 | 1337 | .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU, |
c9cf73ae MP |
1338 | .icache_bsize = 32, |
1339 | .dcache_bsize = 32, | |
47c0bd1a | 1340 | .machine_check = machine_check_4xx, |
80f15dc7 | 1341 | .platform = "ppc440", |
c9cf73ae | 1342 | }, |
3f8fc3e0 SM |
1343 | { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */ |
1344 | .pvr_mask = 0xf0000ff7, | |
1345 | .pvr_value = 0x400008d4, | |
1346 | .cpu_name = "440EP Rev. C", | |
1347 | .cpu_features = CPU_FTRS_44X, | |
1348 | .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU, | |
1349 | .icache_bsize = 32, | |
1350 | .dcache_bsize = 32, | |
1351 | .cpu_setup = __setup_cpu_440ep, | |
1352 | .machine_check = machine_check_4xx, | |
1353 | .platform = "ppc440", | |
1354 | }, | |
d1dfc35d VB |
1355 | { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */ |
1356 | .pvr_mask = 0xf0000fff, | |
1357 | .pvr_value = 0x400008db, | |
1358 | .cpu_name = "440EP Rev. B", | |
15fc993e VB |
1359 | .cpu_features = CPU_FTRS_44X, |
1360 | .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU, | |
1361 | .icache_bsize = 32, | |
1362 | .dcache_bsize = 32, | |
d1dfc35d | 1363 | .cpu_setup = __setup_cpu_440ep, |
47c0bd1a | 1364 | .machine_check = machine_check_4xx, |
8112753b | 1365 | .platform = "ppc440", |
15fc993e VB |
1366 | }, |
1367 | { /* 440GRX */ | |
1368 | .pvr_mask = 0xf0000ffb, | |
d1dfc35d | 1369 | .pvr_value = 0x200008D0, |
15fc993e VB |
1370 | .cpu_name = "440GRX", |
1371 | .cpu_features = CPU_FTRS_44X, | |
1372 | .cpu_user_features = COMMON_USER_BOOKE, | |
1373 | .icache_bsize = 32, | |
1374 | .dcache_bsize = 32, | |
340ffd26 | 1375 | .cpu_setup = __setup_cpu_440grx, |
b2be3b15 | 1376 | .machine_check = machine_check_440A, |
340ffd26 | 1377 | .platform = "ppc440", |
15fc993e | 1378 | }, |
d1dfc35d VB |
1379 | { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */ |
1380 | .pvr_mask = 0xf0000ffb, | |
1381 | .pvr_value = 0x200008D8, | |
1382 | .cpu_name = "440EPX", | |
1383 | .cpu_features = CPU_FTRS_44X, | |
1384 | .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU, | |
1385 | .icache_bsize = 32, | |
1386 | .dcache_bsize = 32, | |
1387 | .cpu_setup = __setup_cpu_440epx, | |
47c0bd1a | 1388 | .machine_check = machine_check_440A, |
d1dfc35d VB |
1389 | .platform = "ppc440", |
1390 | }, | |
4920960f | 1391 | { /* 440GP Rev. B */ |
1da177e4 LT |
1392 | .pvr_mask = 0xf0000fff, |
1393 | .pvr_value = 0x40000440, | |
1394 | .cpu_name = "440GP Rev. B", | |
10b35d99 | 1395 | .cpu_features = CPU_FTRS_44X, |
80f15dc7 | 1396 | .cpu_user_features = COMMON_USER_BOOKE, |
1da177e4 LT |
1397 | .icache_bsize = 32, |
1398 | .dcache_bsize = 32, | |
47c0bd1a | 1399 | .machine_check = machine_check_4xx, |
80f15dc7 | 1400 | .platform = "ppc440gp", |
1da177e4 | 1401 | }, |
4920960f | 1402 | { /* 440GP Rev. C */ |
1da177e4 LT |
1403 | .pvr_mask = 0xf0000fff, |
1404 | .pvr_value = 0x40000481, | |
1405 | .cpu_name = "440GP Rev. C", | |
10b35d99 | 1406 | .cpu_features = CPU_FTRS_44X, |
80f15dc7 | 1407 | .cpu_user_features = COMMON_USER_BOOKE, |
1da177e4 LT |
1408 | .icache_bsize = 32, |
1409 | .dcache_bsize = 32, | |
47c0bd1a | 1410 | .machine_check = machine_check_4xx, |
80f15dc7 | 1411 | .platform = "ppc440gp", |
1da177e4 LT |
1412 | }, |
1413 | { /* 440GX Rev. A */ | |
1414 | .pvr_mask = 0xf0000fff, | |
1415 | .pvr_value = 0x50000850, | |
1416 | .cpu_name = "440GX Rev. A", | |
10b35d99 | 1417 | .cpu_features = CPU_FTRS_44X, |
80f15dc7 | 1418 | .cpu_user_features = COMMON_USER_BOOKE, |
1da177e4 LT |
1419 | .icache_bsize = 32, |
1420 | .dcache_bsize = 32, | |
47c0bd1a BH |
1421 | .cpu_setup = __setup_cpu_440gx, |
1422 | .machine_check = machine_check_440A, | |
80f15dc7 | 1423 | .platform = "ppc440", |
1da177e4 LT |
1424 | }, |
1425 | { /* 440GX Rev. B */ | |
1426 | .pvr_mask = 0xf0000fff, | |
1427 | .pvr_value = 0x50000851, | |
1428 | .cpu_name = "440GX Rev. B", | |
10b35d99 | 1429 | .cpu_features = CPU_FTRS_44X, |
80f15dc7 | 1430 | .cpu_user_features = COMMON_USER_BOOKE, |
1da177e4 LT |
1431 | .icache_bsize = 32, |
1432 | .dcache_bsize = 32, | |
47c0bd1a BH |
1433 | .cpu_setup = __setup_cpu_440gx, |
1434 | .machine_check = machine_check_440A, | |
80f15dc7 | 1435 | .platform = "ppc440", |
1da177e4 LT |
1436 | }, |
1437 | { /* 440GX Rev. C */ | |
1438 | .pvr_mask = 0xf0000fff, | |
1439 | .pvr_value = 0x50000892, | |
1440 | .cpu_name = "440GX Rev. C", | |
10b35d99 | 1441 | .cpu_features = CPU_FTRS_44X, |
80f15dc7 | 1442 | .cpu_user_features = COMMON_USER_BOOKE, |
1da177e4 LT |
1443 | .icache_bsize = 32, |
1444 | .dcache_bsize = 32, | |
47c0bd1a BH |
1445 | .cpu_setup = __setup_cpu_440gx, |
1446 | .machine_check = machine_check_440A, | |
80f15dc7 | 1447 | .platform = "ppc440", |
1da177e4 | 1448 | }, |
9149fb3b ES |
1449 | { /* 440GX Rev. F */ |
1450 | .pvr_mask = 0xf0000fff, | |
1451 | .pvr_value = 0x50000894, | |
1452 | .cpu_name = "440GX Rev. F", | |
10b35d99 | 1453 | .cpu_features = CPU_FTRS_44X, |
80f15dc7 | 1454 | .cpu_user_features = COMMON_USER_BOOKE, |
9149fb3b ES |
1455 | .icache_bsize = 32, |
1456 | .dcache_bsize = 32, | |
47c0bd1a BH |
1457 | .cpu_setup = __setup_cpu_440gx, |
1458 | .machine_check = machine_check_440A, | |
80f15dc7 | 1459 | .platform = "ppc440", |
9149fb3b | 1460 | }, |
656de7e4 | 1461 | { /* 440SP Rev. A */ |
333e6154 RD |
1462 | .pvr_mask = 0xfff00fff, |
1463 | .pvr_value = 0x53200891, | |
656de7e4 | 1464 | .cpu_name = "440SP Rev. A", |
10b35d99 | 1465 | .cpu_features = CPU_FTRS_44X, |
80f15dc7 | 1466 | .cpu_user_features = COMMON_USER_BOOKE, |
656de7e4 MP |
1467 | .icache_bsize = 32, |
1468 | .dcache_bsize = 32, | |
47c0bd1a | 1469 | .machine_check = machine_check_4xx, |
80f15dc7 | 1470 | .platform = "ppc440", |
656de7e4 | 1471 | }, |
b0f7b8bc | 1472 | { /* 440SPe Rev. A */ |
333e6154 RD |
1473 | .pvr_mask = 0xfff00fff, |
1474 | .pvr_value = 0x53400890, | |
1475 | .cpu_name = "440SPe Rev. A", | |
1476 | .cpu_features = CPU_FTRS_44X, | |
1477 | .cpu_user_features = COMMON_USER_BOOKE, | |
1478 | .icache_bsize = 32, | |
1479 | .dcache_bsize = 32, | |
47c0bd1a BH |
1480 | .cpu_setup = __setup_cpu_440spe, |
1481 | .machine_check = machine_check_440A, | |
333e6154 RD |
1482 | .platform = "ppc440", |
1483 | }, | |
1484 | { /* 440SPe Rev. B */ | |
1485 | .pvr_mask = 0xfff00fff, | |
1486 | .pvr_value = 0x53400891, | |
1487 | .cpu_name = "440SPe Rev. B", | |
a147c585 | 1488 | .cpu_features = CPU_FTRS_44X, |
80f15dc7 | 1489 | .cpu_user_features = COMMON_USER_BOOKE, |
b0f7b8bc RD |
1490 | .icache_bsize = 32, |
1491 | .dcache_bsize = 32, | |
47c0bd1a BH |
1492 | .cpu_setup = __setup_cpu_440spe, |
1493 | .machine_check = machine_check_440A, | |
80f15dc7 | 1494 | .platform = "ppc440", |
b0f7b8bc | 1495 | }, |
23e7237e JL |
1496 | { /* 440 in Xilinx Virtex-5 FXT */ |
1497 | .pvr_mask = 0xfffffff0, | |
1498 | .pvr_value = 0x7ff21910, | |
1499 | .cpu_name = "440 in Virtex-5 FXT", | |
1500 | .cpu_features = CPU_FTRS_44X, | |
1501 | .cpu_user_features = COMMON_USER_BOOKE, | |
1502 | .icache_bsize = 32, | |
1503 | .dcache_bsize = 32, | |
640d17d6 GL |
1504 | .cpu_setup = __setup_cpu_440x5, |
1505 | .machine_check = machine_check_440A, | |
23e7237e JL |
1506 | .platform = "ppc440", |
1507 | }, | |
464076a4 SR |
1508 | { /* 460EX */ |
1509 | .pvr_mask = 0xffff0002, | |
1510 | .pvr_value = 0x13020002, | |
1511 | .cpu_name = "460EX", | |
6d2170be | 1512 | .cpu_features = CPU_FTRS_440x6, |
464076a4 SR |
1513 | .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU, |
1514 | .icache_bsize = 32, | |
1515 | .dcache_bsize = 32, | |
1516 | .cpu_setup = __setup_cpu_460ex, | |
1517 | .machine_check = machine_check_440A, | |
1518 | .platform = "ppc440", | |
1519 | }, | |
1520 | { /* 460GT */ | |
1521 | .pvr_mask = 0xffff0002, | |
1522 | .pvr_value = 0x13020000, | |
1523 | .cpu_name = "460GT", | |
6d2170be | 1524 | .cpu_features = CPU_FTRS_440x6, |
939e622c | 1525 | .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU, |
464076a4 SR |
1526 | .icache_bsize = 32, |
1527 | .dcache_bsize = 32, | |
939e622c | 1528 | .cpu_setup = __setup_cpu_460gt, |
464076a4 SR |
1529 | .machine_check = machine_check_440A, |
1530 | .platform = "ppc440", | |
1531 | }, | |
76bc080e BH |
1532 | { /* default match */ |
1533 | .pvr_mask = 0x00000000, | |
1534 | .pvr_value = 0x00000000, | |
1535 | .cpu_name = "(generic 44x PPC)", | |
1536 | .cpu_features = CPU_FTRS_44X, | |
1537 | .cpu_user_features = COMMON_USER_BOOKE, | |
1538 | .icache_bsize = 32, | |
1539 | .dcache_bsize = 32, | |
1540 | .machine_check = machine_check_4xx, | |
1541 | .platform = "ppc440", | |
1542 | } | |
1da177e4 | 1543 | #endif /* CONFIG_44x */ |
e3e414bc | 1544 | #ifdef CONFIG_E200 |
4920960f | 1545 | { /* e200z5 */ |
33d9e9b5 KG |
1546 | .pvr_mask = 0xfff00000, |
1547 | .pvr_value = 0x81000000, | |
1548 | .cpu_name = "e200z5", | |
1549 | /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */ | |
10b35d99 | 1550 | .cpu_features = CPU_FTRS_E200, |
80f15dc7 PM |
1551 | .cpu_user_features = COMMON_USER_BOOKE | |
1552 | PPC_FEATURE_HAS_EFP_SINGLE | | |
33d9e9b5 KG |
1553 | PPC_FEATURE_UNIFIED_CACHE, |
1554 | .dcache_bsize = 32, | |
47c0bd1a | 1555 | .machine_check = machine_check_e200, |
80f15dc7 | 1556 | .platform = "ppc5554", |
33d9e9b5 | 1557 | }, |
4920960f | 1558 | { /* e200z6 */ |
33d9e9b5 KG |
1559 | .pvr_mask = 0xfff00000, |
1560 | .pvr_value = 0x81100000, | |
1561 | .cpu_name = "e200z6", | |
1562 | /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */ | |
10b35d99 | 1563 | .cpu_features = CPU_FTRS_E200, |
80f15dc7 | 1564 | .cpu_user_features = COMMON_USER_BOOKE | |
5e14d21e KG |
1565 | PPC_FEATURE_HAS_SPE_COMP | |
1566 | PPC_FEATURE_HAS_EFP_SINGLE_COMP | | |
33d9e9b5 KG |
1567 | PPC_FEATURE_UNIFIED_CACHE, |
1568 | .dcache_bsize = 32, | |
47c0bd1a | 1569 | .machine_check = machine_check_e200, |
80f15dc7 | 1570 | .platform = "ppc5554", |
33d9e9b5 | 1571 | }, |
76bc080e BH |
1572 | { /* default match */ |
1573 | .pvr_mask = 0x00000000, | |
1574 | .pvr_value = 0x00000000, | |
1575 | .cpu_name = "(generic E200 PPC)", | |
1576 | .cpu_features = CPU_FTRS_E200, | |
1577 | .cpu_user_features = COMMON_USER_BOOKE | | |
1578 | PPC_FEATURE_HAS_EFP_SINGLE | | |
1579 | PPC_FEATURE_UNIFIED_CACHE, | |
1580 | .dcache_bsize = 32, | |
1581 | .machine_check = machine_check_e200, | |
1582 | .platform = "ppc5554", | |
516c8be3 | 1583 | } |
76bc080e BH |
1584 | #endif /* CONFIG_E200 */ |
1585 | #ifdef CONFIG_E500 | |
4920960f | 1586 | { /* e500 */ |
1da177e4 LT |
1587 | .pvr_mask = 0xffff0000, |
1588 | .pvr_value = 0x80200000, | |
1589 | .cpu_name = "e500", | |
10b35d99 | 1590 | .cpu_features = CPU_FTRS_E500, |
80f15dc7 | 1591 | .cpu_user_features = COMMON_USER_BOOKE | |
5e14d21e KG |
1592 | PPC_FEATURE_HAS_SPE_COMP | |
1593 | PPC_FEATURE_HAS_EFP_SINGLE_COMP, | |
1da177e4 LT |
1594 | .icache_bsize = 32, |
1595 | .dcache_bsize = 32, | |
1596 | .num_pmcs = 4, | |
555d97ac | 1597 | .oprofile_cpu_type = "ppc/e500", |
39aef685 | 1598 | .oprofile_type = PPC_OPROFILE_FSL_EMB, |
47c0bd1a | 1599 | .machine_check = machine_check_e500, |
80f15dc7 | 1600 | .platform = "ppc8540", |
1da177e4 | 1601 | }, |
4920960f | 1602 | { /* e500v2 */ |
5b37b700 KG |
1603 | .pvr_mask = 0xffff0000, |
1604 | .pvr_value = 0x80210000, | |
1605 | .cpu_name = "e500v2", | |
10b35d99 | 1606 | .cpu_features = CPU_FTRS_E500_2, |
80f15dc7 | 1607 | .cpu_user_features = COMMON_USER_BOOKE | |
5e14d21e KG |
1608 | PPC_FEATURE_HAS_SPE_COMP | |
1609 | PPC_FEATURE_HAS_EFP_SINGLE_COMP | | |
1610 | PPC_FEATURE_HAS_EFP_DOUBLE_COMP, | |
5b37b700 KG |
1611 | .icache_bsize = 32, |
1612 | .dcache_bsize = 32, | |
1613 | .num_pmcs = 4, | |
555d97ac | 1614 | .oprofile_cpu_type = "ppc/e500", |
39aef685 | 1615 | .oprofile_type = PPC_OPROFILE_FSL_EMB, |
47c0bd1a | 1616 | .machine_check = machine_check_e500, |
80f15dc7 | 1617 | .platform = "ppc8548", |
5b37b700 | 1618 | }, |
3dfa8773 KG |
1619 | { /* e500mc */ |
1620 | .pvr_mask = 0xffff0000, | |
1621 | .pvr_value = 0x80230000, | |
1622 | .cpu_name = "e500mc", | |
3dfa8773 KG |
1623 | .cpu_features = CPU_FTRS_E500MC, |
1624 | .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU, | |
1625 | .icache_bsize = 64, | |
1626 | .dcache_bsize = 64, | |
1627 | .num_pmcs = 4, | |
1628 | .oprofile_cpu_type = "ppc/e500", /* xxx - galak, e500mc? */ | |
1629 | .oprofile_type = PPC_OPROFILE_FSL_EMB, | |
1630 | .machine_check = machine_check_e500, | |
1631 | .platform = "ppce500mc", | |
1632 | }, | |
1da177e4 LT |
1633 | { /* default match */ |
1634 | .pvr_mask = 0x00000000, | |
1635 | .pvr_value = 0x00000000, | |
76bc080e BH |
1636 | .cpu_name = "(generic E500 PPC)", |
1637 | .cpu_features = CPU_FTRS_E500, | |
1638 | .cpu_user_features = COMMON_USER_BOOKE | | |
1639 | PPC_FEATURE_HAS_SPE_COMP | | |
1640 | PPC_FEATURE_HAS_EFP_SINGLE_COMP, | |
1da177e4 LT |
1641 | .icache_bsize = 32, |
1642 | .dcache_bsize = 32, | |
76bc080e | 1643 | .machine_check = machine_check_e500, |
80f15dc7 | 1644 | .platform = "powerpc", |
516c8be3 | 1645 | } |
76bc080e | 1646 | #endif /* CONFIG_E500 */ |
4920960f | 1647 | #endif /* CONFIG_PPC32 */ |
1da177e4 | 1648 | }; |
42c4aaad | 1649 | |
87a72f9e PM |
1650 | static struct cpu_spec the_cpu_spec; |
1651 | ||
1652 | struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr) | |
42c4aaad BH |
1653 | { |
1654 | struct cpu_spec *s = cpu_specs; | |
87a72f9e | 1655 | struct cpu_spec *t = &the_cpu_spec; |
42c4aaad BH |
1656 | int i; |
1657 | ||
1658 | s = PTRRELOC(s); | |
87a72f9e | 1659 | t = PTRRELOC(t); |
42c4aaad | 1660 | |
42c4aaad BH |
1661 | for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) |
1662 | if ((pvr & s->pvr_mask) == s->pvr_value) { | |
87a72f9e PM |
1663 | /* |
1664 | * If we are overriding a previous value derived | |
1665 | * from the real PVR with a new value obtained | |
1666 | * using a logical PVR value, don't modify the | |
1667 | * performance monitor fields. | |
1668 | */ | |
1669 | if (t->num_pmcs && !s->num_pmcs) { | |
1670 | t->cpu_name = s->cpu_name; | |
1671 | t->cpu_features = s->cpu_features; | |
1672 | t->cpu_user_features = s->cpu_user_features; | |
1673 | t->icache_bsize = s->icache_bsize; | |
1674 | t->dcache_bsize = s->dcache_bsize; | |
1675 | t->cpu_setup = s->cpu_setup; | |
1676 | t->cpu_restore = s->cpu_restore; | |
1677 | t->platform = s->platform; | |
79e25bac TS |
1678 | /* |
1679 | * If we have passed through this logic once | |
1680 | * before and have pulled the default case | |
1681 | * because the real PVR was not found inside | |
1682 | * cpu_specs[], then we are possibly running in | |
1683 | * compatibility mode. In that case, let the | |
1684 | * oprofiler know which set of compatibility | |
1685 | * counters to pull from by making sure the | |
1686 | * oprofile_cpu_type string is set to that of | |
1687 | * compatibility mode. If the oprofile_cpu_type | |
1688 | * already has a value, then we are possibly | |
1689 | * overriding a real PVR with a logical one, and, | |
1690 | * in that case, keep the current value for | |
1691 | * oprofile_cpu_type. | |
1692 | */ | |
1693 | if (t->oprofile_cpu_type == NULL) | |
1694 | t->oprofile_cpu_type = s->oprofile_cpu_type; | |
87a72f9e PM |
1695 | } else |
1696 | *t = *s; | |
1697 | *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec; | |
9115d134 NL |
1698 | |
1699 | /* | |
1700 | * Set the base platform string once; assumes | |
1701 | * we're called with real pvr first. | |
1702 | */ | |
fc532f81 NL |
1703 | if (*PTRRELOC(&powerpc_base_platform) == NULL) |
1704 | *PTRRELOC(&powerpc_base_platform) = t->platform; | |
9115d134 | 1705 | |
84e3ad5b | 1706 | #if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE) |
464076a4 | 1707 | /* ppc64 and booke expect identify_cpu to also call |
84e3ad5b VB |
1708 | * setup_cpu for that processor. I will consolidate |
1709 | * that at a later time, for now, just use #ifdef. | |
42c4aaad | 1710 | * we also don't need to PTRRELOC the function pointer |
84e3ad5b VB |
1711 | * on ppc64 and booke as we are running at 0 in real |
1712 | * mode on ppc64 and reloc_offset is always 0 on booke. | |
42c4aaad BH |
1713 | */ |
1714 | if (s->cpu_setup) { | |
1715 | s->cpu_setup(offset, s); | |
1716 | } | |
84e3ad5b | 1717 | #endif /* CONFIG_PPC64 || CONFIG_BOOKE */ |
42c4aaad BH |
1718 | return s; |
1719 | } | |
1720 | BUG(); | |
1721 | return NULL; | |
1722 | } |