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