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 |
400d2212 KG |
34 | extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec); |
35 | extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec); | |
36 | extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec); | |
37 | extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec); | |
38 | extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec); | |
39 | extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec); | |
40 | extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec); | |
41 | extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec); | |
4920960f | 42 | #endif /* CONFIG_PPC32 */ |
f39b7a55 | 43 | #ifdef CONFIG_PPC64 |
400d2212 | 44 | extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec); |
5b43d20a | 45 | extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec); |
f39b7a55 OJ |
46 | extern void __restore_cpu_ppc970(void); |
47 | #endif /* CONFIG_PPC64 */ | |
1da177e4 | 48 | |
1da177e4 LT |
49 | /* This table only contains "desktop" CPUs, it need to be filled with embedded |
50 | * ones as well... | |
51 | */ | |
4920960f SR |
52 | #define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \ |
53 | PPC_FEATURE_HAS_MMU) | |
54 | #define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64) | |
a7ddc5e8 | 55 | #define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4) |
aa5cb021 BH |
56 | #define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\ |
57 | PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP) | |
58 | #define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\ | |
59 | PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP) | |
03054d51 | 60 | #define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\ |
fab5db97 PM |
61 | PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \ |
62 | PPC_FEATURE_TRUE_LE) | |
b3ebd1d8 OJ |
63 | #define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\ |
64 | PPC_FEATURE_TRUE_LE | \ | |
65 | PPC_FEATURE_HAS_ALTIVEC_COMP) | |
80f15dc7 PM |
66 | #define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \ |
67 | PPC_FEATURE_BOOKE) | |
1da177e4 | 68 | |
1da177e4 LT |
69 | /* We only set the spe features if the kernel was compiled with |
70 | * spe support | |
71 | */ | |
72 | #ifdef CONFIG_SPE | |
4920960f | 73 | #define PPC_FEATURE_SPE_COMP PPC_FEATURE_HAS_SPE |
1da177e4 | 74 | #else |
4920960f | 75 | #define PPC_FEATURE_SPE_COMP 0 |
1da177e4 LT |
76 | #endif |
77 | ||
42c4aaad | 78 | static struct cpu_spec cpu_specs[] = { |
4920960f SR |
79 | #ifdef CONFIG_PPC64 |
80 | { /* Power3 */ | |
81 | .pvr_mask = 0xffff0000, | |
82 | .pvr_value = 0x00400000, | |
83 | .cpu_name = "POWER3 (630)", | |
84 | .cpu_features = CPU_FTRS_POWER3, | |
fab5db97 | 85 | .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE, |
4920960f SR |
86 | .icache_bsize = 128, |
87 | .dcache_bsize = 128, | |
88 | .num_pmcs = 8, | |
4920960f | 89 | .oprofile_cpu_type = "ppc64/power3", |
7a45fb19 | 90 | .oprofile_type = PPC_OPROFILE_RS64, |
80f15dc7 | 91 | .platform = "power3", |
4920960f SR |
92 | }, |
93 | { /* Power3+ */ | |
94 | .pvr_mask = 0xffff0000, | |
95 | .pvr_value = 0x00410000, | |
96 | .cpu_name = "POWER3 (630+)", | |
97 | .cpu_features = CPU_FTRS_POWER3, | |
fab5db97 | 98 | .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE, |
4920960f SR |
99 | .icache_bsize = 128, |
100 | .dcache_bsize = 128, | |
101 | .num_pmcs = 8, | |
4920960f | 102 | .oprofile_cpu_type = "ppc64/power3", |
7a45fb19 | 103 | .oprofile_type = PPC_OPROFILE_RS64, |
80f15dc7 | 104 | .platform = "power3", |
4920960f SR |
105 | }, |
106 | { /* Northstar */ | |
107 | .pvr_mask = 0xffff0000, | |
108 | .pvr_value = 0x00330000, | |
109 | .cpu_name = "RS64-II (northstar)", | |
110 | .cpu_features = CPU_FTRS_RS64, | |
111 | .cpu_user_features = COMMON_USER_PPC64, | |
112 | .icache_bsize = 128, | |
113 | .dcache_bsize = 128, | |
114 | .num_pmcs = 8, | |
4920960f | 115 | .oprofile_cpu_type = "ppc64/rs64", |
7a45fb19 | 116 | .oprofile_type = PPC_OPROFILE_RS64, |
80f15dc7 | 117 | .platform = "rs64", |
4920960f SR |
118 | }, |
119 | { /* Pulsar */ | |
120 | .pvr_mask = 0xffff0000, | |
121 | .pvr_value = 0x00340000, | |
122 | .cpu_name = "RS64-III (pulsar)", | |
123 | .cpu_features = CPU_FTRS_RS64, | |
124 | .cpu_user_features = COMMON_USER_PPC64, | |
125 | .icache_bsize = 128, | |
126 | .dcache_bsize = 128, | |
127 | .num_pmcs = 8, | |
4920960f | 128 | .oprofile_cpu_type = "ppc64/rs64", |
7a45fb19 | 129 | .oprofile_type = PPC_OPROFILE_RS64, |
80f15dc7 | 130 | .platform = "rs64", |
4920960f SR |
131 | }, |
132 | { /* I-star */ | |
133 | .pvr_mask = 0xffff0000, | |
134 | .pvr_value = 0x00360000, | |
135 | .cpu_name = "RS64-III (icestar)", | |
136 | .cpu_features = CPU_FTRS_RS64, | |
137 | .cpu_user_features = COMMON_USER_PPC64, | |
138 | .icache_bsize = 128, | |
139 | .dcache_bsize = 128, | |
140 | .num_pmcs = 8, | |
4920960f | 141 | .oprofile_cpu_type = "ppc64/rs64", |
7a45fb19 | 142 | .oprofile_type = PPC_OPROFILE_RS64, |
80f15dc7 | 143 | .platform = "rs64", |
4920960f SR |
144 | }, |
145 | { /* S-star */ | |
146 | .pvr_mask = 0xffff0000, | |
147 | .pvr_value = 0x00370000, | |
148 | .cpu_name = "RS64-IV (sstar)", | |
149 | .cpu_features = CPU_FTRS_RS64, | |
150 | .cpu_user_features = COMMON_USER_PPC64, | |
151 | .icache_bsize = 128, | |
152 | .dcache_bsize = 128, | |
153 | .num_pmcs = 8, | |
4920960f | 154 | .oprofile_cpu_type = "ppc64/rs64", |
7a45fb19 | 155 | .oprofile_type = PPC_OPROFILE_RS64, |
80f15dc7 | 156 | .platform = "rs64", |
4920960f SR |
157 | }, |
158 | { /* Power4 */ | |
159 | .pvr_mask = 0xffff0000, | |
160 | .pvr_value = 0x00350000, | |
161 | .cpu_name = "POWER4 (gp)", | |
162 | .cpu_features = CPU_FTRS_POWER4, | |
a7ddc5e8 | 163 | .cpu_user_features = COMMON_USER_POWER4, |
4920960f SR |
164 | .icache_bsize = 128, |
165 | .dcache_bsize = 128, | |
166 | .num_pmcs = 8, | |
4920960f | 167 | .oprofile_cpu_type = "ppc64/power4", |
7a45fb19 | 168 | .oprofile_type = PPC_OPROFILE_POWER4, |
80f15dc7 | 169 | .platform = "power4", |
4920960f SR |
170 | }, |
171 | { /* Power4+ */ | |
172 | .pvr_mask = 0xffff0000, | |
173 | .pvr_value = 0x00380000, | |
174 | .cpu_name = "POWER4+ (gq)", | |
175 | .cpu_features = CPU_FTRS_POWER4, | |
a7ddc5e8 | 176 | .cpu_user_features = COMMON_USER_POWER4, |
4920960f SR |
177 | .icache_bsize = 128, |
178 | .dcache_bsize = 128, | |
179 | .num_pmcs = 8, | |
4920960f | 180 | .oprofile_cpu_type = "ppc64/power4", |
7a45fb19 | 181 | .oprofile_type = PPC_OPROFILE_POWER4, |
80f15dc7 | 182 | .platform = "power4", |
4920960f SR |
183 | }, |
184 | { /* PPC970 */ | |
185 | .pvr_mask = 0xffff0000, | |
186 | .pvr_value = 0x00390000, | |
187 | .cpu_name = "PPC970", | |
188 | .cpu_features = CPU_FTRS_PPC970, | |
a7ddc5e8 | 189 | .cpu_user_features = COMMON_USER_POWER4 | |
4920960f SR |
190 | PPC_FEATURE_HAS_ALTIVEC_COMP, |
191 | .icache_bsize = 128, | |
192 | .dcache_bsize = 128, | |
193 | .num_pmcs = 8, | |
194 | .cpu_setup = __setup_cpu_ppc970, | |
f39b7a55 | 195 | .cpu_restore = __restore_cpu_ppc970, |
4920960f | 196 | .oprofile_cpu_type = "ppc64/970", |
7a45fb19 | 197 | .oprofile_type = PPC_OPROFILE_POWER4, |
80f15dc7 | 198 | .platform = "ppc970", |
4920960f | 199 | }, |
4920960f SR |
200 | { /* PPC970FX */ |
201 | .pvr_mask = 0xffff0000, | |
202 | .pvr_value = 0x003c0000, | |
203 | .cpu_name = "PPC970FX", | |
4920960f | 204 | .cpu_features = CPU_FTRS_PPC970, |
a7ddc5e8 | 205 | .cpu_user_features = COMMON_USER_POWER4 | |
4920960f SR |
206 | PPC_FEATURE_HAS_ALTIVEC_COMP, |
207 | .icache_bsize = 128, | |
208 | .dcache_bsize = 128, | |
209 | .num_pmcs = 8, | |
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, |
80f15dc7 | 214 | .platform = "ppc970", |
4920960f | 215 | }, |
4920960f SR |
216 | { /* PPC970MP */ |
217 | .pvr_mask = 0xffff0000, | |
218 | .pvr_value = 0x00440000, | |
219 | .cpu_name = "PPC970MP", | |
220 | .cpu_features = CPU_FTRS_PPC970, | |
a7ddc5e8 | 221 | .cpu_user_features = COMMON_USER_POWER4 | |
4920960f SR |
222 | PPC_FEATURE_HAS_ALTIVEC_COMP, |
223 | .icache_bsize = 128, | |
224 | .dcache_bsize = 128, | |
87af41be | 225 | .num_pmcs = 8, |
5b43d20a | 226 | .cpu_setup = __setup_cpu_ppc970MP, |
f39b7a55 | 227 | .cpu_restore = __restore_cpu_ppc970, |
4920960f | 228 | .oprofile_cpu_type = "ppc64/970", |
7a45fb19 | 229 | .oprofile_type = PPC_OPROFILE_POWER4, |
80f15dc7 | 230 | .platform = "ppc970", |
4920960f | 231 | }, |
362ff7b2 JM |
232 | { /* PPC970GX */ |
233 | .pvr_mask = 0xffff0000, | |
234 | .pvr_value = 0x00450000, | |
235 | .cpu_name = "PPC970GX", | |
236 | .cpu_features = CPU_FTRS_PPC970, | |
237 | .cpu_user_features = COMMON_USER_POWER4 | | |
238 | PPC_FEATURE_HAS_ALTIVEC_COMP, | |
239 | .icache_bsize = 128, | |
240 | .dcache_bsize = 128, | |
241 | .num_pmcs = 8, | |
242 | .cpu_setup = __setup_cpu_ppc970, | |
243 | .oprofile_cpu_type = "ppc64/970", | |
244 | .oprofile_type = PPC_OPROFILE_POWER4, | |
245 | .platform = "ppc970", | |
246 | }, | |
3c726f8d | 247 | { /* Power5 GR */ |
4920960f SR |
248 | .pvr_mask = 0xffff0000, |
249 | .pvr_value = 0x003a0000, | |
250 | .cpu_name = "POWER5 (gr)", | |
251 | .cpu_features = CPU_FTRS_POWER5, | |
a7ddc5e8 | 252 | .cpu_user_features = COMMON_USER_POWER5, |
4920960f SR |
253 | .icache_bsize = 128, |
254 | .dcache_bsize = 128, | |
255 | .num_pmcs = 6, | |
4920960f | 256 | .oprofile_cpu_type = "ppc64/power5", |
7a45fb19 | 257 | .oprofile_type = PPC_OPROFILE_POWER4, |
e78dbc80 MN |
258 | /* SIHV / SIPR bits are implemented on POWER4+ (GQ) |
259 | * and above but only works on POWER5 and above | |
260 | */ | |
261 | .oprofile_mmcra_sihv = MMCRA_SIHV, | |
262 | .oprofile_mmcra_sipr = MMCRA_SIPR, | |
80f15dc7 | 263 | .platform = "power5", |
4920960f | 264 | }, |
3c726f8d | 265 | { /* Power5 GS */ |
4920960f SR |
266 | .pvr_mask = 0xffff0000, |
267 | .pvr_value = 0x003b0000, | |
834608f7 | 268 | .cpu_name = "POWER5+ (gs)", |
4920960f | 269 | .cpu_features = CPU_FTRS_POWER5, |
a7ddc5e8 | 270 | .cpu_user_features = COMMON_USER_POWER5_PLUS, |
4920960f SR |
271 | .icache_bsize = 128, |
272 | .dcache_bsize = 128, | |
273 | .num_pmcs = 6, | |
834608f7 | 274 | .oprofile_cpu_type = "ppc64/power5+", |
7a45fb19 | 275 | .oprofile_type = PPC_OPROFILE_POWER4, |
e78dbc80 MN |
276 | .oprofile_mmcra_sihv = MMCRA_SIHV, |
277 | .oprofile_mmcra_sipr = MMCRA_SIPR, | |
80f15dc7 | 278 | .platform = "power5+", |
4920960f | 279 | }, |
03054d51 AB |
280 | { /* Power6 */ |
281 | .pvr_mask = 0xffff0000, | |
282 | .pvr_value = 0x003e0000, | |
283 | .cpu_name = "POWER6", | |
284 | .cpu_features = CPU_FTRS_POWER6, | |
285 | .cpu_user_features = COMMON_USER_POWER6, | |
286 | .icache_bsize = 128, | |
287 | .dcache_bsize = 128, | |
99f48610 | 288 | .num_pmcs = 6, |
03054d51 AB |
289 | .oprofile_cpu_type = "ppc64/power6", |
290 | .oprofile_type = PPC_OPROFILE_POWER4, | |
e78dbc80 MN |
291 | .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV, |
292 | .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR, | |
293 | .oprofile_mmcra_clear = POWER6_MMCRA_THRM | | |
294 | POWER6_MMCRA_OTHER, | |
03054d51 AB |
295 | .platform = "power6", |
296 | }, | |
c902be71 | 297 | { /* Cell Broadband Engine */ |
4920960f SR |
298 | .pvr_mask = 0xffff0000, |
299 | .pvr_value = 0x00700000, | |
300 | .cpu_name = "Cell Broadband Engine", | |
301 | .cpu_features = CPU_FTRS_CELL, | |
302 | .cpu_user_features = COMMON_USER_PPC64 | | |
aa5cb021 BH |
303 | PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP | |
304 | PPC_FEATURE_SMT, | |
4920960f SR |
305 | .icache_bsize = 128, |
306 | .dcache_bsize = 128, | |
80f15dc7 | 307 | .platform = "ppc-cell-be", |
4920960f | 308 | }, |
b3ebd1d8 OJ |
309 | { /* PA Semi PA6T */ |
310 | .pvr_mask = 0x7fff0000, | |
311 | .pvr_value = 0x00900000, | |
312 | .cpu_name = "PA6T", | |
313 | .cpu_features = CPU_FTRS_PA6T, | |
314 | .cpu_user_features = COMMON_USER_PA6T, | |
315 | .icache_bsize = 64, | |
316 | .dcache_bsize = 64, | |
317 | .num_pmcs = 6, | |
318 | .platform = "pa6t", | |
319 | }, | |
4920960f SR |
320 | { /* default match */ |
321 | .pvr_mask = 0x00000000, | |
322 | .pvr_value = 0x00000000, | |
323 | .cpu_name = "POWER4 (compatible)", | |
324 | .cpu_features = CPU_FTRS_COMPATIBLE, | |
325 | .cpu_user_features = COMMON_USER_PPC64, | |
326 | .icache_bsize = 128, | |
327 | .dcache_bsize = 128, | |
328 | .num_pmcs = 6, | |
80f15dc7 | 329 | .platform = "power4", |
4920960f SR |
330 | } |
331 | #endif /* CONFIG_PPC64 */ | |
332 | #ifdef CONFIG_PPC32 | |
1da177e4 | 333 | #if CLASSIC_PPC |
4920960f | 334 | { /* 601 */ |
1da177e4 LT |
335 | .pvr_mask = 0xffff0000, |
336 | .pvr_value = 0x00010000, | |
337 | .cpu_name = "601", | |
10b35d99 | 338 | .cpu_features = CPU_FTRS_PPC601, |
4920960f | 339 | .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR | |
d8e998c5 | 340 | PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB, |
1da177e4 LT |
341 | .icache_bsize = 32, |
342 | .dcache_bsize = 32, | |
80f15dc7 | 343 | .platform = "ppc601", |
1da177e4 LT |
344 | }, |
345 | { /* 603 */ | |
346 | .pvr_mask = 0xffff0000, | |
347 | .pvr_value = 0x00030000, | |
348 | .cpu_name = "603", | |
10b35d99 | 349 | .cpu_features = CPU_FTRS_603, |
fab5db97 | 350 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
351 | .icache_bsize = 32, |
352 | .dcache_bsize = 32, | |
80f15dc7 PM |
353 | .cpu_setup = __setup_cpu_603, |
354 | .platform = "ppc603", | |
1da177e4 LT |
355 | }, |
356 | { /* 603e */ | |
357 | .pvr_mask = 0xffff0000, | |
358 | .pvr_value = 0x00060000, | |
359 | .cpu_name = "603e", | |
10b35d99 | 360 | .cpu_features = CPU_FTRS_603, |
fab5db97 | 361 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
362 | .icache_bsize = 32, |
363 | .dcache_bsize = 32, | |
80f15dc7 PM |
364 | .cpu_setup = __setup_cpu_603, |
365 | .platform = "ppc603", | |
1da177e4 LT |
366 | }, |
367 | { /* 603ev */ | |
368 | .pvr_mask = 0xffff0000, | |
369 | .pvr_value = 0x00070000, | |
370 | .cpu_name = "603ev", | |
10b35d99 | 371 | .cpu_features = CPU_FTRS_603, |
fab5db97 | 372 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
373 | .icache_bsize = 32, |
374 | .dcache_bsize = 32, | |
80f15dc7 PM |
375 | .cpu_setup = __setup_cpu_603, |
376 | .platform = "ppc603", | |
1da177e4 LT |
377 | }, |
378 | { /* 604 */ | |
379 | .pvr_mask = 0xffff0000, | |
380 | .pvr_value = 0x00040000, | |
381 | .cpu_name = "604", | |
10b35d99 | 382 | .cpu_features = CPU_FTRS_604, |
fab5db97 | 383 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
384 | .icache_bsize = 32, |
385 | .dcache_bsize = 32, | |
386 | .num_pmcs = 2, | |
80f15dc7 PM |
387 | .cpu_setup = __setup_cpu_604, |
388 | .platform = "ppc604", | |
1da177e4 LT |
389 | }, |
390 | { /* 604e */ | |
391 | .pvr_mask = 0xfffff000, | |
392 | .pvr_value = 0x00090000, | |
393 | .cpu_name = "604e", | |
10b35d99 | 394 | .cpu_features = CPU_FTRS_604, |
fab5db97 | 395 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
396 | .icache_bsize = 32, |
397 | .dcache_bsize = 32, | |
398 | .num_pmcs = 4, | |
80f15dc7 PM |
399 | .cpu_setup = __setup_cpu_604, |
400 | .platform = "ppc604", | |
1da177e4 LT |
401 | }, |
402 | { /* 604r */ | |
403 | .pvr_mask = 0xffff0000, | |
404 | .pvr_value = 0x00090000, | |
405 | .cpu_name = "604r", | |
10b35d99 | 406 | .cpu_features = CPU_FTRS_604, |
fab5db97 | 407 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
408 | .icache_bsize = 32, |
409 | .dcache_bsize = 32, | |
410 | .num_pmcs = 4, | |
80f15dc7 PM |
411 | .cpu_setup = __setup_cpu_604, |
412 | .platform = "ppc604", | |
1da177e4 LT |
413 | }, |
414 | { /* 604ev */ | |
415 | .pvr_mask = 0xffff0000, | |
416 | .pvr_value = 0x000a0000, | |
417 | .cpu_name = "604ev", | |
10b35d99 | 418 | .cpu_features = CPU_FTRS_604, |
fab5db97 | 419 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
420 | .icache_bsize = 32, |
421 | .dcache_bsize = 32, | |
422 | .num_pmcs = 4, | |
80f15dc7 PM |
423 | .cpu_setup = __setup_cpu_604, |
424 | .platform = "ppc604", | |
1da177e4 LT |
425 | }, |
426 | { /* 740/750 (0x4202, don't support TAU ?) */ | |
427 | .pvr_mask = 0xffffffff, | |
428 | .pvr_value = 0x00084202, | |
429 | .cpu_name = "740/750", | |
10b35d99 | 430 | .cpu_features = CPU_FTRS_740_NOTAU, |
fab5db97 | 431 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
432 | .icache_bsize = 32, |
433 | .dcache_bsize = 32, | |
434 | .num_pmcs = 4, | |
80f15dc7 PM |
435 | .cpu_setup = __setup_cpu_750, |
436 | .platform = "ppc750", | |
1da177e4 | 437 | }, |
1da177e4 LT |
438 | { /* 750CX (80100 and 8010x?) */ |
439 | .pvr_mask = 0xfffffff0, | |
440 | .pvr_value = 0x00080100, | |
441 | .cpu_name = "750CX", | |
10b35d99 | 442 | .cpu_features = CPU_FTRS_750, |
fab5db97 | 443 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
444 | .icache_bsize = 32, |
445 | .dcache_bsize = 32, | |
446 | .num_pmcs = 4, | |
80f15dc7 PM |
447 | .cpu_setup = __setup_cpu_750cx, |
448 | .platform = "ppc750", | |
1da177e4 LT |
449 | }, |
450 | { /* 750CX (82201 and 82202) */ | |
451 | .pvr_mask = 0xfffffff0, | |
452 | .pvr_value = 0x00082200, | |
453 | .cpu_name = "750CX", | |
10b35d99 | 454 | .cpu_features = CPU_FTRS_750, |
fab5db97 | 455 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
456 | .icache_bsize = 32, |
457 | .dcache_bsize = 32, | |
458 | .num_pmcs = 4, | |
80f15dc7 PM |
459 | .cpu_setup = __setup_cpu_750cx, |
460 | .platform = "ppc750", | |
1da177e4 LT |
461 | }, |
462 | { /* 750CXe (82214) */ | |
463 | .pvr_mask = 0xfffffff0, | |
464 | .pvr_value = 0x00082210, | |
465 | .cpu_name = "750CXe", | |
10b35d99 | 466 | .cpu_features = CPU_FTRS_750, |
fab5db97 | 467 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
468 | .icache_bsize = 32, |
469 | .dcache_bsize = 32, | |
470 | .num_pmcs = 4, | |
80f15dc7 PM |
471 | .cpu_setup = __setup_cpu_750cx, |
472 | .platform = "ppc750", | |
1da177e4 | 473 | }, |
7c31625a AO |
474 | { /* 750CXe "Gekko" (83214) */ |
475 | .pvr_mask = 0xffffffff, | |
476 | .pvr_value = 0x00083214, | |
477 | .cpu_name = "750CXe", | |
10b35d99 | 478 | .cpu_features = CPU_FTRS_750, |
fab5db97 | 479 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
7c31625a AO |
480 | .icache_bsize = 32, |
481 | .dcache_bsize = 32, | |
482 | .num_pmcs = 4, | |
80f15dc7 PM |
483 | .cpu_setup = __setup_cpu_750cx, |
484 | .platform = "ppc750", | |
7c31625a | 485 | }, |
ac1ff047 AO |
486 | { /* 745/755 */ |
487 | .pvr_mask = 0xfffff000, | |
488 | .pvr_value = 0x00083000, | |
489 | .cpu_name = "745/755", | |
10b35d99 | 490 | .cpu_features = CPU_FTRS_750, |
fab5db97 | 491 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
ac1ff047 AO |
492 | .icache_bsize = 32, |
493 | .dcache_bsize = 32, | |
494 | .num_pmcs = 4, | |
80f15dc7 PM |
495 | .cpu_setup = __setup_cpu_750, |
496 | .platform = "ppc750", | |
ac1ff047 | 497 | }, |
1da177e4 LT |
498 | { /* 750FX rev 1.x */ |
499 | .pvr_mask = 0xffffff00, | |
500 | .pvr_value = 0x70000100, | |
501 | .cpu_name = "750FX", | |
10b35d99 | 502 | .cpu_features = CPU_FTRS_750FX1, |
fab5db97 | 503 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
504 | .icache_bsize = 32, |
505 | .dcache_bsize = 32, | |
506 | .num_pmcs = 4, | |
80f15dc7 PM |
507 | .cpu_setup = __setup_cpu_750, |
508 | .platform = "ppc750", | |
1da177e4 LT |
509 | }, |
510 | { /* 750FX rev 2.0 must disable HID0[DPM] */ | |
511 | .pvr_mask = 0xffffffff, | |
512 | .pvr_value = 0x70000200, | |
513 | .cpu_name = "750FX", | |
10b35d99 | 514 | .cpu_features = CPU_FTRS_750FX2, |
fab5db97 | 515 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
516 | .icache_bsize = 32, |
517 | .dcache_bsize = 32, | |
518 | .num_pmcs = 4, | |
80f15dc7 PM |
519 | .cpu_setup = __setup_cpu_750, |
520 | .platform = "ppc750", | |
1da177e4 LT |
521 | }, |
522 | { /* 750FX (All revs except 2.0) */ | |
523 | .pvr_mask = 0xffff0000, | |
524 | .pvr_value = 0x70000000, | |
525 | .cpu_name = "750FX", | |
10b35d99 | 526 | .cpu_features = CPU_FTRS_750FX, |
fab5db97 | 527 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
528 | .icache_bsize = 32, |
529 | .dcache_bsize = 32, | |
530 | .num_pmcs = 4, | |
80f15dc7 PM |
531 | .cpu_setup = __setup_cpu_750fx, |
532 | .platform = "ppc750", | |
1da177e4 LT |
533 | }, |
534 | { /* 750GX */ | |
535 | .pvr_mask = 0xffff0000, | |
536 | .pvr_value = 0x70020000, | |
537 | .cpu_name = "750GX", | |
10b35d99 | 538 | .cpu_features = CPU_FTRS_750GX, |
fab5db97 | 539 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
540 | .icache_bsize = 32, |
541 | .dcache_bsize = 32, | |
542 | .num_pmcs = 4, | |
80f15dc7 PM |
543 | .cpu_setup = __setup_cpu_750fx, |
544 | .platform = "ppc750", | |
1da177e4 LT |
545 | }, |
546 | { /* 740/750 (L2CR bit need fixup for 740) */ | |
547 | .pvr_mask = 0xffff0000, | |
548 | .pvr_value = 0x00080000, | |
549 | .cpu_name = "740/750", | |
10b35d99 | 550 | .cpu_features = CPU_FTRS_740, |
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 PM |
555 | .cpu_setup = __setup_cpu_750, |
556 | .platform = "ppc750", | |
1da177e4 LT |
557 | }, |
558 | { /* 7400 rev 1.1 ? (no TAU) */ | |
559 | .pvr_mask = 0xffffffff, | |
560 | .pvr_value = 0x000c1101, | |
561 | .cpu_name = "7400 (1.1)", | |
10b35d99 | 562 | .cpu_features = CPU_FTRS_7400_NOTAU, |
fab5db97 PM |
563 | .cpu_user_features = COMMON_USER | |
564 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, | |
1da177e4 LT |
565 | .icache_bsize = 32, |
566 | .dcache_bsize = 32, | |
567 | .num_pmcs = 4, | |
80f15dc7 PM |
568 | .cpu_setup = __setup_cpu_7400, |
569 | .platform = "ppc7400", | |
1da177e4 LT |
570 | }, |
571 | { /* 7400 */ | |
572 | .pvr_mask = 0xffff0000, | |
573 | .pvr_value = 0x000c0000, | |
574 | .cpu_name = "7400", | |
10b35d99 | 575 | .cpu_features = CPU_FTRS_7400, |
fab5db97 PM |
576 | .cpu_user_features = COMMON_USER | |
577 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, | |
1da177e4 LT |
578 | .icache_bsize = 32, |
579 | .dcache_bsize = 32, | |
580 | .num_pmcs = 4, | |
80f15dc7 PM |
581 | .cpu_setup = __setup_cpu_7400, |
582 | .platform = "ppc7400", | |
1da177e4 LT |
583 | }, |
584 | { /* 7410 */ | |
585 | .pvr_mask = 0xffff0000, | |
586 | .pvr_value = 0x800c0000, | |
587 | .cpu_name = "7410", | |
10b35d99 | 588 | .cpu_features = CPU_FTRS_7400, |
fab5db97 PM |
589 | .cpu_user_features = COMMON_USER | |
590 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, | |
1da177e4 LT |
591 | .icache_bsize = 32, |
592 | .dcache_bsize = 32, | |
593 | .num_pmcs = 4, | |
80f15dc7 PM |
594 | .cpu_setup = __setup_cpu_7410, |
595 | .platform = "ppc7400", | |
1da177e4 LT |
596 | }, |
597 | { /* 7450 2.0 - no doze/nap */ | |
598 | .pvr_mask = 0xffffffff, | |
599 | .pvr_value = 0x80000200, | |
600 | .cpu_name = "7450", | |
10b35d99 | 601 | .cpu_features = CPU_FTRS_7450_20, |
fab5db97 PM |
602 | .cpu_user_features = COMMON_USER | |
603 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, | |
1da177e4 LT |
604 | .icache_bsize = 32, |
605 | .dcache_bsize = 32, | |
606 | .num_pmcs = 6, | |
555d97ac | 607 | .cpu_setup = __setup_cpu_745x, |
555d97ac | 608 | .oprofile_cpu_type = "ppc/7450", |
7a45fb19 | 609 | .oprofile_type = PPC_OPROFILE_G4, |
80f15dc7 | 610 | .platform = "ppc7450", |
1da177e4 LT |
611 | }, |
612 | { /* 7450 2.1 */ | |
613 | .pvr_mask = 0xffffffff, | |
614 | .pvr_value = 0x80000201, | |
615 | .cpu_name = "7450", | |
10b35d99 | 616 | .cpu_features = CPU_FTRS_7450_21, |
fab5db97 PM |
617 | .cpu_user_features = COMMON_USER | |
618 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, | |
1da177e4 LT |
619 | .icache_bsize = 32, |
620 | .dcache_bsize = 32, | |
621 | .num_pmcs = 6, | |
555d97ac | 622 | .cpu_setup = __setup_cpu_745x, |
555d97ac | 623 | .oprofile_cpu_type = "ppc/7450", |
7a45fb19 | 624 | .oprofile_type = PPC_OPROFILE_G4, |
80f15dc7 | 625 | .platform = "ppc7450", |
1da177e4 LT |
626 | }, |
627 | { /* 7450 2.3 and newer */ | |
628 | .pvr_mask = 0xffff0000, | |
629 | .pvr_value = 0x80000000, | |
630 | .cpu_name = "7450", | |
10b35d99 | 631 | .cpu_features = CPU_FTRS_7450_23, |
fab5db97 PM |
632 | .cpu_user_features = COMMON_USER | |
633 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, | |
1da177e4 LT |
634 | .icache_bsize = 32, |
635 | .dcache_bsize = 32, | |
636 | .num_pmcs = 6, | |
555d97ac | 637 | .cpu_setup = __setup_cpu_745x, |
555d97ac | 638 | .oprofile_cpu_type = "ppc/7450", |
7a45fb19 | 639 | .oprofile_type = PPC_OPROFILE_G4, |
80f15dc7 | 640 | .platform = "ppc7450", |
1da177e4 LT |
641 | }, |
642 | { /* 7455 rev 1.x */ | |
643 | .pvr_mask = 0xffffff00, | |
644 | .pvr_value = 0x80010100, | |
645 | .cpu_name = "7455", | |
10b35d99 | 646 | .cpu_features = CPU_FTRS_7455_1, |
fab5db97 PM |
647 | .cpu_user_features = COMMON_USER | |
648 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, | |
1da177e4 LT |
649 | .icache_bsize = 32, |
650 | .dcache_bsize = 32, | |
651 | .num_pmcs = 6, | |
555d97ac | 652 | .cpu_setup = __setup_cpu_745x, |
555d97ac | 653 | .oprofile_cpu_type = "ppc/7450", |
7a45fb19 | 654 | .oprofile_type = PPC_OPROFILE_G4, |
80f15dc7 | 655 | .platform = "ppc7450", |
1da177e4 LT |
656 | }, |
657 | { /* 7455 rev 2.0 */ | |
658 | .pvr_mask = 0xffffffff, | |
659 | .pvr_value = 0x80010200, | |
660 | .cpu_name = "7455", | |
10b35d99 | 661 | .cpu_features = CPU_FTRS_7455_20, |
fab5db97 PM |
662 | .cpu_user_features = COMMON_USER | |
663 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, | |
1da177e4 LT |
664 | .icache_bsize = 32, |
665 | .dcache_bsize = 32, | |
666 | .num_pmcs = 6, | |
555d97ac | 667 | .cpu_setup = __setup_cpu_745x, |
555d97ac | 668 | .oprofile_cpu_type = "ppc/7450", |
7a45fb19 | 669 | .oprofile_type = PPC_OPROFILE_G4, |
80f15dc7 | 670 | .platform = "ppc7450", |
1da177e4 LT |
671 | }, |
672 | { /* 7455 others */ | |
673 | .pvr_mask = 0xffff0000, | |
674 | .pvr_value = 0x80010000, | |
675 | .cpu_name = "7455", | |
10b35d99 | 676 | .cpu_features = CPU_FTRS_7455, |
fab5db97 PM |
677 | .cpu_user_features = COMMON_USER | |
678 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, | |
1da177e4 LT |
679 | .icache_bsize = 32, |
680 | .dcache_bsize = 32, | |
681 | .num_pmcs = 6, | |
555d97ac | 682 | .cpu_setup = __setup_cpu_745x, |
555d97ac | 683 | .oprofile_cpu_type = "ppc/7450", |
7a45fb19 | 684 | .oprofile_type = PPC_OPROFILE_G4, |
80f15dc7 | 685 | .platform = "ppc7450", |
1da177e4 LT |
686 | }, |
687 | { /* 7447/7457 Rev 1.0 */ | |
688 | .pvr_mask = 0xffffffff, | |
689 | .pvr_value = 0x80020100, | |
690 | .cpu_name = "7447/7457", | |
10b35d99 | 691 | .cpu_features = CPU_FTRS_7447_10, |
fab5db97 PM |
692 | .cpu_user_features = COMMON_USER | |
693 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, | |
1da177e4 LT |
694 | .icache_bsize = 32, |
695 | .dcache_bsize = 32, | |
696 | .num_pmcs = 6, | |
555d97ac | 697 | .cpu_setup = __setup_cpu_745x, |
555d97ac | 698 | .oprofile_cpu_type = "ppc/7450", |
7a45fb19 | 699 | .oprofile_type = PPC_OPROFILE_G4, |
80f15dc7 | 700 | .platform = "ppc7450", |
1da177e4 LT |
701 | }, |
702 | { /* 7447/7457 Rev 1.1 */ | |
703 | .pvr_mask = 0xffffffff, | |
704 | .pvr_value = 0x80020101, | |
705 | .cpu_name = "7447/7457", | |
10b35d99 | 706 | .cpu_features = CPU_FTRS_7447_10, |
fab5db97 PM |
707 | .cpu_user_features = COMMON_USER | |
708 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, | |
1da177e4 LT |
709 | .icache_bsize = 32, |
710 | .dcache_bsize = 32, | |
711 | .num_pmcs = 6, | |
555d97ac | 712 | .cpu_setup = __setup_cpu_745x, |
555d97ac | 713 | .oprofile_cpu_type = "ppc/7450", |
7a45fb19 | 714 | .oprofile_type = PPC_OPROFILE_G4, |
80f15dc7 | 715 | .platform = "ppc7450", |
1da177e4 LT |
716 | }, |
717 | { /* 7447/7457 Rev 1.2 and later */ | |
718 | .pvr_mask = 0xffff0000, | |
719 | .pvr_value = 0x80020000, | |
720 | .cpu_name = "7447/7457", | |
10b35d99 | 721 | .cpu_features = CPU_FTRS_7447, |
fab5db97 | 722 | .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, |
1da177e4 LT |
723 | .icache_bsize = 32, |
724 | .dcache_bsize = 32, | |
725 | .num_pmcs = 6, | |
555d97ac | 726 | .cpu_setup = __setup_cpu_745x, |
555d97ac | 727 | .oprofile_cpu_type = "ppc/7450", |
7a45fb19 | 728 | .oprofile_type = PPC_OPROFILE_G4, |
80f15dc7 | 729 | .platform = "ppc7450", |
1da177e4 LT |
730 | }, |
731 | { /* 7447A */ | |
732 | .pvr_mask = 0xffff0000, | |
733 | .pvr_value = 0x80030000, | |
734 | .cpu_name = "7447A", | |
10b35d99 | 735 | .cpu_features = CPU_FTRS_7447A, |
fab5db97 PM |
736 | .cpu_user_features = COMMON_USER | |
737 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, | |
bbde630b KG |
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, |
80f15dc7 | 744 | .platform = "ppc7450", |
bbde630b KG |
745 | }, |
746 | { /* 7448 */ | |
747 | .pvr_mask = 0xffff0000, | |
748 | .pvr_value = 0x80040000, | |
749 | .cpu_name = "7448", | |
10b35d99 | 750 | .cpu_features = CPU_FTRS_7447A, |
fab5db97 PM |
751 | .cpu_user_features = COMMON_USER | |
752 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, | |
1da177e4 LT |
753 | .icache_bsize = 32, |
754 | .dcache_bsize = 32, | |
755 | .num_pmcs = 6, | |
555d97ac | 756 | .cpu_setup = __setup_cpu_745x, |
555d97ac | 757 | .oprofile_cpu_type = "ppc/7450", |
7a45fb19 | 758 | .oprofile_type = PPC_OPROFILE_G4, |
80f15dc7 | 759 | .platform = "ppc7450", |
1da177e4 LT |
760 | }, |
761 | { /* 82xx (8240, 8245, 8260 are all 603e cores) */ | |
762 | .pvr_mask = 0x7fff0000, | |
763 | .pvr_value = 0x00810000, | |
764 | .cpu_name = "82xx", | |
10b35d99 | 765 | .cpu_features = CPU_FTRS_82XX, |
4920960f | 766 | .cpu_user_features = COMMON_USER, |
1da177e4 LT |
767 | .icache_bsize = 32, |
768 | .dcache_bsize = 32, | |
80f15dc7 PM |
769 | .cpu_setup = __setup_cpu_603, |
770 | .platform = "ppc603", | |
1da177e4 LT |
771 | }, |
772 | { /* All G2_LE (603e core, plus some) have the same pvr */ | |
773 | .pvr_mask = 0x7fff0000, | |
774 | .pvr_value = 0x00820000, | |
775 | .cpu_name = "G2_LE", | |
10b35d99 | 776 | .cpu_features = CPU_FTRS_G2_LE, |
4920960f | 777 | .cpu_user_features = COMMON_USER, |
1da177e4 LT |
778 | .icache_bsize = 32, |
779 | .dcache_bsize = 32, | |
80f15dc7 PM |
780 | .cpu_setup = __setup_cpu_603, |
781 | .platform = "ppc603", | |
1da177e4 | 782 | }, |
6c4a2501 | 783 | { /* e300c1 (a 603e core, plus some) on 83xx */ |
1da177e4 LT |
784 | .pvr_mask = 0x7fff0000, |
785 | .pvr_value = 0x00830000, | |
6c4a2501 | 786 | .cpu_name = "e300c1", |
10b35d99 | 787 | .cpu_features = CPU_FTRS_E300, |
4920960f | 788 | .cpu_user_features = COMMON_USER, |
1da177e4 LT |
789 | .icache_bsize = 32, |
790 | .dcache_bsize = 32, | |
80f15dc7 PM |
791 | .cpu_setup = __setup_cpu_603, |
792 | .platform = "ppc603", | |
1da177e4 | 793 | }, |
6c4a2501 KP |
794 | { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */ |
795 | .pvr_mask = 0x7fff0000, | |
796 | .pvr_value = 0x00840000, | |
797 | .cpu_name = "e300c2", | |
798 | .cpu_features = CPU_FTRS_E300, | |
799 | .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, | |
800 | .icache_bsize = 32, | |
801 | .dcache_bsize = 32, | |
802 | .cpu_setup = __setup_cpu_603, | |
803 | .platform = "ppc603", | |
804 | }, | |
1da177e4 LT |
805 | { /* default match, we assume split I/D cache & TB (non-601)... */ |
806 | .pvr_mask = 0x00000000, | |
807 | .pvr_value = 0x00000000, | |
808 | .cpu_name = "(generic PPC)", | |
10b35d99 | 809 | .cpu_features = CPU_FTRS_CLASSIC32, |
4920960f | 810 | .cpu_user_features = COMMON_USER, |
1da177e4 LT |
811 | .icache_bsize = 32, |
812 | .dcache_bsize = 32, | |
80f15dc7 | 813 | .platform = "ppc603", |
1da177e4 LT |
814 | }, |
815 | #endif /* CLASSIC_PPC */ | |
1da177e4 LT |
816 | #ifdef CONFIG_8xx |
817 | { /* 8xx */ | |
818 | .pvr_mask = 0xffff0000, | |
819 | .pvr_value = 0x00500000, | |
820 | .cpu_name = "8xx", | |
821 | /* CPU_FTR_MAYBE_CAN_DOZE is possible, | |
822 | * if the 8xx code is there.... */ | |
10b35d99 | 823 | .cpu_features = CPU_FTRS_8XX, |
1da177e4 LT |
824 | .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, |
825 | .icache_bsize = 16, | |
826 | .dcache_bsize = 16, | |
80f15dc7 | 827 | .platform = "ppc823", |
1da177e4 LT |
828 | }, |
829 | #endif /* CONFIG_8xx */ | |
830 | #ifdef CONFIG_40x | |
831 | { /* 403GC */ | |
832 | .pvr_mask = 0xffffff00, | |
833 | .pvr_value = 0x00200200, | |
834 | .cpu_name = "403GC", | |
10b35d99 | 835 | .cpu_features = CPU_FTRS_40X, |
1da177e4 LT |
836 | .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, |
837 | .icache_bsize = 16, | |
838 | .dcache_bsize = 16, | |
80f15dc7 | 839 | .platform = "ppc403", |
1da177e4 LT |
840 | }, |
841 | { /* 403GCX */ | |
842 | .pvr_mask = 0xffffff00, | |
843 | .pvr_value = 0x00201400, | |
844 | .cpu_name = "403GCX", | |
10b35d99 | 845 | .cpu_features = CPU_FTRS_40X, |
d8e998c5 BH |
846 | .cpu_user_features = PPC_FEATURE_32 | |
847 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB, | |
1da177e4 LT |
848 | .icache_bsize = 16, |
849 | .dcache_bsize = 16, | |
80f15dc7 | 850 | .platform = "ppc403", |
1da177e4 LT |
851 | }, |
852 | { /* 403G ?? */ | |
853 | .pvr_mask = 0xffff0000, | |
854 | .pvr_value = 0x00200000, | |
855 | .cpu_name = "403G ??", | |
10b35d99 | 856 | .cpu_features = CPU_FTRS_40X, |
1da177e4 LT |
857 | .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, |
858 | .icache_bsize = 16, | |
859 | .dcache_bsize = 16, | |
80f15dc7 | 860 | .platform = "ppc403", |
1da177e4 LT |
861 | }, |
862 | { /* 405GP */ | |
863 | .pvr_mask = 0xffff0000, | |
864 | .pvr_value = 0x40110000, | |
865 | .cpu_name = "405GP", | |
10b35d99 | 866 | .cpu_features = CPU_FTRS_40X, |
1da177e4 LT |
867 | .cpu_user_features = PPC_FEATURE_32 | |
868 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | |
869 | .icache_bsize = 32, | |
870 | .dcache_bsize = 32, | |
80f15dc7 | 871 | .platform = "ppc405", |
1da177e4 LT |
872 | }, |
873 | { /* STB 03xxx */ | |
874 | .pvr_mask = 0xffff0000, | |
875 | .pvr_value = 0x40130000, | |
876 | .cpu_name = "STB03xxx", | |
10b35d99 | 877 | .cpu_features = CPU_FTRS_40X, |
1da177e4 LT |
878 | .cpu_user_features = PPC_FEATURE_32 | |
879 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | |
880 | .icache_bsize = 32, | |
881 | .dcache_bsize = 32, | |
80f15dc7 | 882 | .platform = "ppc405", |
1da177e4 LT |
883 | }, |
884 | { /* STB 04xxx */ | |
885 | .pvr_mask = 0xffff0000, | |
886 | .pvr_value = 0x41810000, | |
887 | .cpu_name = "STB04xxx", | |
10b35d99 | 888 | .cpu_features = CPU_FTRS_40X, |
1da177e4 LT |
889 | .cpu_user_features = PPC_FEATURE_32 | |
890 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | |
891 | .icache_bsize = 32, | |
892 | .dcache_bsize = 32, | |
80f15dc7 | 893 | .platform = "ppc405", |
1da177e4 LT |
894 | }, |
895 | { /* NP405L */ | |
896 | .pvr_mask = 0xffff0000, | |
897 | .pvr_value = 0x41610000, | |
898 | .cpu_name = "NP405L", | |
10b35d99 | 899 | .cpu_features = CPU_FTRS_40X, |
1da177e4 LT |
900 | .cpu_user_features = PPC_FEATURE_32 | |
901 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | |
902 | .icache_bsize = 32, | |
903 | .dcache_bsize = 32, | |
80f15dc7 | 904 | .platform = "ppc405", |
1da177e4 LT |
905 | }, |
906 | { /* NP4GS3 */ | |
907 | .pvr_mask = 0xffff0000, | |
908 | .pvr_value = 0x40B10000, | |
909 | .cpu_name = "NP4GS3", | |
10b35d99 | 910 | .cpu_features = CPU_FTRS_40X, |
1da177e4 LT |
911 | .cpu_user_features = PPC_FEATURE_32 | |
912 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | |
913 | .icache_bsize = 32, | |
914 | .dcache_bsize = 32, | |
80f15dc7 | 915 | .platform = "ppc405", |
1da177e4 LT |
916 | }, |
917 | { /* NP405H */ | |
918 | .pvr_mask = 0xffff0000, | |
919 | .pvr_value = 0x41410000, | |
920 | .cpu_name = "NP405H", | |
10b35d99 | 921 | .cpu_features = CPU_FTRS_40X, |
1da177e4 LT |
922 | .cpu_user_features = PPC_FEATURE_32 | |
923 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | |
924 | .icache_bsize = 32, | |
925 | .dcache_bsize = 32, | |
80f15dc7 | 926 | .platform = "ppc405", |
1da177e4 LT |
927 | }, |
928 | { /* 405GPr */ | |
929 | .pvr_mask = 0xffff0000, | |
930 | .pvr_value = 0x50910000, | |
931 | .cpu_name = "405GPr", | |
10b35d99 | 932 | .cpu_features = CPU_FTRS_40X, |
1da177e4 LT |
933 | .cpu_user_features = PPC_FEATURE_32 | |
934 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | |
935 | .icache_bsize = 32, | |
936 | .dcache_bsize = 32, | |
80f15dc7 | 937 | .platform = "ppc405", |
1da177e4 LT |
938 | }, |
939 | { /* STBx25xx */ | |
940 | .pvr_mask = 0xffff0000, | |
941 | .pvr_value = 0x51510000, | |
942 | .cpu_name = "STBx25xx", | |
10b35d99 | 943 | .cpu_features = CPU_FTRS_40X, |
1da177e4 LT |
944 | .cpu_user_features = PPC_FEATURE_32 | |
945 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | |
946 | .icache_bsize = 32, | |
947 | .dcache_bsize = 32, | |
80f15dc7 | 948 | .platform = "ppc405", |
1da177e4 LT |
949 | }, |
950 | { /* 405LP */ | |
951 | .pvr_mask = 0xffff0000, | |
952 | .pvr_value = 0x41F10000, | |
953 | .cpu_name = "405LP", | |
10b35d99 | 954 | .cpu_features = CPU_FTRS_40X, |
1da177e4 LT |
955 | .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, |
956 | .icache_bsize = 32, | |
957 | .dcache_bsize = 32, | |
80f15dc7 | 958 | .platform = "ppc405", |
1da177e4 LT |
959 | }, |
960 | { /* Xilinx Virtex-II Pro */ | |
72646c7f | 961 | .pvr_mask = 0xfffff000, |
1da177e4 LT |
962 | .pvr_value = 0x20010000, |
963 | .cpu_name = "Virtex-II Pro", | |
10b35d99 | 964 | .cpu_features = CPU_FTRS_40X, |
1da177e4 LT |
965 | .cpu_user_features = PPC_FEATURE_32 | |
966 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | |
967 | .icache_bsize = 32, | |
968 | .dcache_bsize = 32, | |
80f15dc7 | 969 | .platform = "ppc405", |
1da177e4 | 970 | }, |
72646c7f GL |
971 | { /* Xilinx Virtex-4 FX */ |
972 | .pvr_mask = 0xfffff000, | |
973 | .pvr_value = 0x20011000, | |
974 | .cpu_name = "Virtex-4 FX", | |
975 | .cpu_features = CPU_FTRS_40X, | |
976 | .cpu_user_features = PPC_FEATURE_32 | | |
977 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | |
978 | .icache_bsize = 32, | |
979 | .dcache_bsize = 32, | |
838fdb4d | 980 | .platform = "ppc405", |
72646c7f | 981 | }, |
ad95d609 ES |
982 | { /* 405EP */ |
983 | .pvr_mask = 0xffff0000, | |
984 | .pvr_value = 0x51210000, | |
985 | .cpu_name = "405EP", | |
10b35d99 | 986 | .cpu_features = CPU_FTRS_40X, |
ad95d609 ES |
987 | .cpu_user_features = PPC_FEATURE_32 | |
988 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | |
989 | .icache_bsize = 32, | |
990 | .dcache_bsize = 32, | |
80f15dc7 | 991 | .platform = "ppc405", |
ad95d609 | 992 | }, |
1da177e4 LT |
993 | |
994 | #endif /* CONFIG_40x */ | |
995 | #ifdef CONFIG_44x | |
c9cf73ae MP |
996 | { |
997 | .pvr_mask = 0xf0000fff, | |
998 | .pvr_value = 0x40000850, | |
999 | .cpu_name = "440EP Rev. A", | |
10b35d99 | 1000 | .cpu_features = CPU_FTRS_44X, |
80f15dc7 | 1001 | .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU, |
c9cf73ae MP |
1002 | .icache_bsize = 32, |
1003 | .dcache_bsize = 32, | |
80f15dc7 | 1004 | .platform = "ppc440", |
c9cf73ae MP |
1005 | }, |
1006 | { | |
1007 | .pvr_mask = 0xf0000fff, | |
1008 | .pvr_value = 0x400008d3, | |
1009 | .cpu_name = "440EP Rev. B", | |
10b35d99 | 1010 | .cpu_features = CPU_FTRS_44X, |
80f15dc7 | 1011 | .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU, |
c9cf73ae MP |
1012 | .icache_bsize = 32, |
1013 | .dcache_bsize = 32, | |
80f15dc7 | 1014 | .platform = "ppc440", |
c9cf73ae | 1015 | }, |
4920960f | 1016 | { /* 440GP Rev. B */ |
1da177e4 LT |
1017 | .pvr_mask = 0xf0000fff, |
1018 | .pvr_value = 0x40000440, | |
1019 | .cpu_name = "440GP Rev. B", | |
10b35d99 | 1020 | .cpu_features = CPU_FTRS_44X, |
80f15dc7 | 1021 | .cpu_user_features = COMMON_USER_BOOKE, |
1da177e4 LT |
1022 | .icache_bsize = 32, |
1023 | .dcache_bsize = 32, | |
80f15dc7 | 1024 | .platform = "ppc440gp", |
1da177e4 | 1025 | }, |
4920960f | 1026 | { /* 440GP Rev. C */ |
1da177e4 LT |
1027 | .pvr_mask = 0xf0000fff, |
1028 | .pvr_value = 0x40000481, | |
1029 | .cpu_name = "440GP Rev. C", | |
10b35d99 | 1030 | .cpu_features = CPU_FTRS_44X, |
80f15dc7 | 1031 | .cpu_user_features = COMMON_USER_BOOKE, |
1da177e4 LT |
1032 | .icache_bsize = 32, |
1033 | .dcache_bsize = 32, | |
80f15dc7 | 1034 | .platform = "ppc440gp", |
1da177e4 LT |
1035 | }, |
1036 | { /* 440GX Rev. A */ | |
1037 | .pvr_mask = 0xf0000fff, | |
1038 | .pvr_value = 0x50000850, | |
1039 | .cpu_name = "440GX Rev. A", | |
10b35d99 | 1040 | .cpu_features = CPU_FTRS_44X, |
80f15dc7 | 1041 | .cpu_user_features = COMMON_USER_BOOKE, |
1da177e4 LT |
1042 | .icache_bsize = 32, |
1043 | .dcache_bsize = 32, | |
80f15dc7 | 1044 | .platform = "ppc440", |
1da177e4 LT |
1045 | }, |
1046 | { /* 440GX Rev. B */ | |
1047 | .pvr_mask = 0xf0000fff, | |
1048 | .pvr_value = 0x50000851, | |
1049 | .cpu_name = "440GX Rev. B", | |
10b35d99 | 1050 | .cpu_features = CPU_FTRS_44X, |
80f15dc7 | 1051 | .cpu_user_features = COMMON_USER_BOOKE, |
1da177e4 LT |
1052 | .icache_bsize = 32, |
1053 | .dcache_bsize = 32, | |
80f15dc7 | 1054 | .platform = "ppc440", |
1da177e4 LT |
1055 | }, |
1056 | { /* 440GX Rev. C */ | |
1057 | .pvr_mask = 0xf0000fff, | |
1058 | .pvr_value = 0x50000892, | |
1059 | .cpu_name = "440GX Rev. C", | |
10b35d99 | 1060 | .cpu_features = CPU_FTRS_44X, |
80f15dc7 | 1061 | .cpu_user_features = COMMON_USER_BOOKE, |
1da177e4 LT |
1062 | .icache_bsize = 32, |
1063 | .dcache_bsize = 32, | |
80f15dc7 | 1064 | .platform = "ppc440", |
1da177e4 | 1065 | }, |
9149fb3b ES |
1066 | { /* 440GX Rev. F */ |
1067 | .pvr_mask = 0xf0000fff, | |
1068 | .pvr_value = 0x50000894, | |
1069 | .cpu_name = "440GX Rev. F", | |
10b35d99 | 1070 | .cpu_features = CPU_FTRS_44X, |
80f15dc7 | 1071 | .cpu_user_features = COMMON_USER_BOOKE, |
9149fb3b ES |
1072 | .icache_bsize = 32, |
1073 | .dcache_bsize = 32, | |
80f15dc7 | 1074 | .platform = "ppc440", |
9149fb3b | 1075 | }, |
656de7e4 MP |
1076 | { /* 440SP Rev. A */ |
1077 | .pvr_mask = 0xff000fff, | |
1078 | .pvr_value = 0x53000891, | |
1079 | .cpu_name = "440SP Rev. A", | |
10b35d99 | 1080 | .cpu_features = CPU_FTRS_44X, |
80f15dc7 | 1081 | .cpu_user_features = COMMON_USER_BOOKE, |
656de7e4 MP |
1082 | .icache_bsize = 32, |
1083 | .dcache_bsize = 32, | |
80f15dc7 | 1084 | .platform = "ppc440", |
656de7e4 | 1085 | }, |
b0f7b8bc RD |
1086 | { /* 440SPe Rev. A */ |
1087 | .pvr_mask = 0xff000fff, | |
1088 | .pvr_value = 0x53000890, | |
1089 | .cpu_name = "440SPe Rev. A", | |
1090 | .cpu_features = CPU_FTR_SPLIT_ID_CACHE | | |
1091 | CPU_FTR_USE_TB, | |
80f15dc7 | 1092 | .cpu_user_features = COMMON_USER_BOOKE, |
b0f7b8bc RD |
1093 | .icache_bsize = 32, |
1094 | .dcache_bsize = 32, | |
80f15dc7 | 1095 | .platform = "ppc440", |
b0f7b8bc | 1096 | }, |
1da177e4 | 1097 | #endif /* CONFIG_44x */ |
33d9e9b5 | 1098 | #ifdef CONFIG_FSL_BOOKE |
4920960f | 1099 | { /* e200z5 */ |
33d9e9b5 KG |
1100 | .pvr_mask = 0xfff00000, |
1101 | .pvr_value = 0x81000000, | |
1102 | .cpu_name = "e200z5", | |
1103 | /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */ | |
10b35d99 | 1104 | .cpu_features = CPU_FTRS_E200, |
80f15dc7 PM |
1105 | .cpu_user_features = COMMON_USER_BOOKE | |
1106 | PPC_FEATURE_HAS_EFP_SINGLE | | |
33d9e9b5 KG |
1107 | PPC_FEATURE_UNIFIED_CACHE, |
1108 | .dcache_bsize = 32, | |
80f15dc7 | 1109 | .platform = "ppc5554", |
33d9e9b5 | 1110 | }, |
4920960f | 1111 | { /* e200z6 */ |
33d9e9b5 KG |
1112 | .pvr_mask = 0xfff00000, |
1113 | .pvr_value = 0x81100000, | |
1114 | .cpu_name = "e200z6", | |
1115 | /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */ | |
10b35d99 | 1116 | .cpu_features = CPU_FTRS_E200, |
80f15dc7 PM |
1117 | .cpu_user_features = COMMON_USER_BOOKE | |
1118 | PPC_FEATURE_SPE_COMP | | |
33d9e9b5 KG |
1119 | PPC_FEATURE_HAS_EFP_SINGLE | |
1120 | PPC_FEATURE_UNIFIED_CACHE, | |
1121 | .dcache_bsize = 32, | |
80f15dc7 | 1122 | .platform = "ppc5554", |
33d9e9b5 | 1123 | }, |
4920960f | 1124 | { /* e500 */ |
1da177e4 LT |
1125 | .pvr_mask = 0xffff0000, |
1126 | .pvr_value = 0x80200000, | |
1127 | .cpu_name = "e500", | |
1128 | /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */ | |
10b35d99 | 1129 | .cpu_features = CPU_FTRS_E500, |
80f15dc7 PM |
1130 | .cpu_user_features = COMMON_USER_BOOKE | |
1131 | PPC_FEATURE_SPE_COMP | | |
1da177e4 LT |
1132 | PPC_FEATURE_HAS_EFP_SINGLE, |
1133 | .icache_bsize = 32, | |
1134 | .dcache_bsize = 32, | |
1135 | .num_pmcs = 4, | |
555d97ac | 1136 | .oprofile_cpu_type = "ppc/e500", |
7a45fb19 | 1137 | .oprofile_type = PPC_OPROFILE_BOOKE, |
80f15dc7 | 1138 | .platform = "ppc8540", |
1da177e4 | 1139 | }, |
4920960f | 1140 | { /* e500v2 */ |
5b37b700 KG |
1141 | .pvr_mask = 0xffff0000, |
1142 | .pvr_value = 0x80210000, | |
1143 | .cpu_name = "e500v2", | |
1144 | /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */ | |
10b35d99 | 1145 | .cpu_features = CPU_FTRS_E500_2, |
80f15dc7 PM |
1146 | .cpu_user_features = COMMON_USER_BOOKE | |
1147 | PPC_FEATURE_SPE_COMP | | |
1148 | PPC_FEATURE_HAS_EFP_SINGLE | | |
1149 | PPC_FEATURE_HAS_EFP_DOUBLE, | |
5b37b700 KG |
1150 | .icache_bsize = 32, |
1151 | .dcache_bsize = 32, | |
1152 | .num_pmcs = 4, | |
555d97ac | 1153 | .oprofile_cpu_type = "ppc/e500", |
7a45fb19 | 1154 | .oprofile_type = PPC_OPROFILE_BOOKE, |
80f15dc7 | 1155 | .platform = "ppc8548", |
5b37b700 | 1156 | }, |
1da177e4 LT |
1157 | #endif |
1158 | #if !CLASSIC_PPC | |
1159 | { /* default match */ | |
1160 | .pvr_mask = 0x00000000, | |
1161 | .pvr_value = 0x00000000, | |
1162 | .cpu_name = "(generic PPC)", | |
10b35d99 | 1163 | .cpu_features = CPU_FTRS_GENERIC_32, |
1da177e4 LT |
1164 | .cpu_user_features = PPC_FEATURE_32, |
1165 | .icache_bsize = 32, | |
1166 | .dcache_bsize = 32, | |
80f15dc7 | 1167 | .platform = "powerpc", |
1da177e4 LT |
1168 | } |
1169 | #endif /* !CLASSIC_PPC */ | |
4920960f | 1170 | #endif /* CONFIG_PPC32 */ |
1da177e4 | 1171 | }; |
42c4aaad BH |
1172 | |
1173 | struct cpu_spec *identify_cpu(unsigned long offset) | |
1174 | { | |
1175 | struct cpu_spec *s = cpu_specs; | |
1176 | struct cpu_spec **cur = &cur_cpu_spec; | |
1177 | unsigned int pvr = mfspr(SPRN_PVR); | |
1178 | int i; | |
1179 | ||
1180 | s = PTRRELOC(s); | |
1181 | cur = PTRRELOC(cur); | |
1182 | ||
1183 | if (*cur != NULL) | |
1184 | return PTRRELOC(*cur); | |
1185 | ||
1186 | for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) | |
1187 | if ((pvr & s->pvr_mask) == s->pvr_value) { | |
1188 | *cur = cpu_specs + i; | |
1189 | #ifdef CONFIG_PPC64 | |
1190 | /* ppc64 expects identify_cpu to also call setup_cpu | |
1191 | * for that processor. I will consolidate that at a | |
1192 | * later time, for now, just use our friend #ifdef. | |
1193 | * we also don't need to PTRRELOC the function pointer | |
1194 | * on ppc64 as we are running at 0 in real mode. | |
1195 | */ | |
1196 | if (s->cpu_setup) { | |
1197 | s->cpu_setup(offset, s); | |
1198 | } | |
1199 | #endif /* CONFIG_PPC64 */ | |
1200 | return s; | |
1201 | } | |
1202 | BUG(); | |
1203 | return NULL; | |
1204 | } | |
1205 | ||
0909c8c2 | 1206 | void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end) |
42c4aaad BH |
1207 | { |
1208 | struct fixup_entry { | |
1209 | unsigned long mask; | |
1210 | unsigned long value; | |
0909c8c2 BH |
1211 | long start_off; |
1212 | long end_off; | |
42c4aaad BH |
1213 | } *fcur, *fend; |
1214 | ||
1215 | fcur = fixup_start; | |
1216 | fend = fixup_end; | |
1217 | ||
1218 | for (; fcur < fend; fcur++) { | |
1219 | unsigned int *pstart, *pend, *p; | |
1220 | ||
1221 | if ((value & fcur->mask) == fcur->value) | |
1222 | continue; | |
1223 | ||
1224 | /* These PTRRELOCs will disappear once the new scheme for | |
1225 | * modules and vdso is implemented | |
1226 | */ | |
0909c8c2 BH |
1227 | pstart = ((unsigned int *)fcur) + (fcur->start_off / 4); |
1228 | pend = ((unsigned int *)fcur) + (fcur->end_off / 4); | |
42c4aaad BH |
1229 | |
1230 | for (p = pstart; p < pend; p++) { | |
1231 | *p = 0x60000000u; | |
1232 | asm volatile ("dcbst 0, %0" : : "r" (p)); | |
1233 | } | |
1234 | asm volatile ("sync" : : : "memory"); | |
1235 | for (p = pstart; p < pend; p++) | |
1236 | asm volatile ("icbi 0,%0" : : "r" (p)); | |
1237 | asm volatile ("sync; isync" : : : "memory"); | |
1238 | } | |
1239 | } |