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