Merge tag 'kbuild-v4.21-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy...
[linux-2.6-block.git] / arch / powerpc / kernel / cputable.c
CommitLineData
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>
4b16f8e2 17#include <linux/export.h>
4db73271 18#include <linux/jump_label.h>
400d2212
KG
19
20#include <asm/oprofile_impl.h>
1da177e4 21#include <asm/cputable.h>
42c4aaad 22#include <asm/prom.h> /* for PTRRELOC on ARCH=ppc */
7c03d653 23#include <asm/mmu.h>
ae3a197e 24#include <asm/setup.h>
1da177e4 25
5a61ef74
NP
26static struct cpu_spec the_cpu_spec __read_mostly;
27
28struct cpu_spec* cur_cpu_spec __read_mostly = NULL;
4920960f 29EXPORT_SYMBOL(cur_cpu_spec);
1da177e4 30
9115d134
NL
31/* The platform string corresponding to the real PVR */
32const char *powerpc_base_platform;
33
4920960f
SR
34/* NOTE:
35 * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's
36 * the responsibility of the appropriate CPU save/restore functions to
37 * eventually copy these settings over. Those save/restore aren't yet
38 * part of the cputable though. That has to be fixed for both ppc32
39 * and ppc64
40 */
b26f100d 41#ifdef CONFIG_PPC32
105c31df
KG
42extern void __setup_cpu_e200(unsigned long offset, struct cpu_spec* spec);
43extern void __setup_cpu_e500v1(unsigned long offset, struct cpu_spec* spec);
44extern void __setup_cpu_e500v2(unsigned long offset, struct cpu_spec* spec);
45extern void __setup_cpu_e500mc(unsigned long offset, struct cpu_spec* spec);
8112753b
VB
46extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
47extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
47c0bd1a 48extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
340ffd26 49extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
47c0bd1a 50extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
640d17d6 51extern void __setup_cpu_440x5(unsigned long offset, struct cpu_spec* spec);
464076a4 52extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec);
939e622c 53extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec);
6c712090 54extern void __setup_cpu_460sx(unsigned long offset, struct cpu_spec *spec);
6edc323d 55extern void __setup_cpu_apm821xx(unsigned long offset, struct cpu_spec *spec);
400d2212
KG
56extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
57extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
58extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
59extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
60extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
61extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
62extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
63extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
4920960f 64#endif /* CONFIG_PPC32 */
f39b7a55 65#ifdef CONFIG_PPC64
400d2212 66extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
5b43d20a 67extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
1199919b 68extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
40d244d6 69extern void __restore_cpu_pa6t(void);
f39b7a55 70extern void __restore_cpu_ppc970(void);
e952e6c4
MN
71extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec);
72extern void __restore_cpu_power7(void);
aec937b1
MN
73extern void __setup_cpu_power8(unsigned long offset, struct cpu_spec* spec);
74extern void __restore_cpu_power8(void);
c3ab300e
MN
75extern void __setup_cpu_power9(unsigned long offset, struct cpu_spec* spec);
76extern void __restore_cpu_power9(void);
e22a2274 77extern long __machine_check_early_realmode_p7(struct pt_regs *regs);
ae744f34 78extern long __machine_check_early_realmode_p8(struct pt_regs *regs);
7b9f71f9 79extern long __machine_check_early_realmode_p9(struct pt_regs *regs);
f39b7a55 80#endif /* CONFIG_PPC64 */
4490c06b
KG
81#if defined(CONFIG_E500)
82extern void __setup_cpu_e5500(unsigned long offset, struct cpu_spec* spec);
cd66cc2e 83extern void __setup_cpu_e6500(unsigned long offset, struct cpu_spec* spec);
4490c06b 84extern void __restore_cpu_e5500(void);
cd66cc2e 85extern void __restore_cpu_e6500(void);
4490c06b 86#endif /* CONFIG_E500 */
1da177e4 87
1da177e4
LT
88/* This table only contains "desktop" CPUs, it need to be filled with embedded
89 * ones as well...
90 */
4920960f
SR
91#define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
92 PPC_FEATURE_HAS_MMU)
93#define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
a7ddc5e8 94#define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
aa5cb021
BH
95#define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
96 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
97#define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
98 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
03054d51 99#define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
fab5db97 100 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
0f473314
NL
101 PPC_FEATURE_TRUE_LE | \
102 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
e952e6c4
MN
103#define COMMON_USER_POWER7 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
104 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
0f473314
NL
105 PPC_FEATURE_TRUE_LE | \
106 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
4a1ae4f3 107#define COMMON_USER2_POWER7 (PPC_FEATURE2_DSCR)
71e18497
MN
108#define COMMON_USER_POWER8 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
109 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
110 PPC_FEATURE_TRUE_LE | \
111 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
748645bf 112#define COMMON_USER2_POWER8 (PPC_FEATURE2_ARCH_2_07 | \
b4b56f9e
S
113 PPC_FEATURE2_HTM_COMP | \
114 PPC_FEATURE2_HTM_NOSC_COMP | \
115 PPC_FEATURE2_DSCR | \
dd58a092
BH
116 PPC_FEATURE2_ISEL | PPC_FEATURE2_TAR | \
117 PPC_FEATURE2_VEC_CRYPTO)
b3ebd1d8
OJ
118#define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
119 PPC_FEATURE_TRUE_LE | \
120 PPC_FEATURE_HAS_ALTIVEC_COMP)
c3ab300e
MN
121#define COMMON_USER_POWER9 COMMON_USER_POWER8
122#define COMMON_USER2_POWER9 (COMMON_USER2_POWER8 | \
123 PPC_FEATURE2_ARCH_3_00 | \
a4700a26
NP
124 PPC_FEATURE2_HAS_IEEE128 | \
125 PPC_FEATURE2_DARN )
c3ab300e 126
f45c4486
KG
127#ifdef CONFIG_PPC_BOOK3E_64
128#define COMMON_USER_BOOKE (COMMON_USER_PPC64 | PPC_FEATURE_BOOKE)
129#else
80f15dc7
PM
130#define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
131 PPC_FEATURE_BOOKE)
f45c4486 132#endif
1da177e4 133
87a72f9e 134static struct cpu_spec __initdata cpu_specs[] = {
2d27cfd3 135#ifdef CONFIG_PPC_BOOK3S_64
4920960f
SR
136 { /* PPC970 */
137 .pvr_mask = 0xffff0000,
138 .pvr_value = 0x00390000,
139 .cpu_name = "PPC970",
140 .cpu_features = CPU_FTRS_PPC970,
a7ddc5e8 141 .cpu_user_features = COMMON_USER_POWER4 |
4920960f 142 PPC_FEATURE_HAS_ALTIVEC_COMP,
44ae3ab3 143 .mmu_features = MMU_FTRS_PPC970,
4920960f
SR
144 .icache_bsize = 128,
145 .dcache_bsize = 128,
146 .num_pmcs = 8,
1bd2e5ae 147 .pmc_type = PPC_PMC_IBM,
4920960f 148 .cpu_setup = __setup_cpu_ppc970,
f39b7a55 149 .cpu_restore = __restore_cpu_ppc970,
4920960f 150 .oprofile_cpu_type = "ppc64/970",
7a45fb19 151 .oprofile_type = PPC_OPROFILE_POWER4,
80f15dc7 152 .platform = "ppc970",
4920960f 153 },
4920960f
SR
154 { /* PPC970FX */
155 .pvr_mask = 0xffff0000,
156 .pvr_value = 0x003c0000,
157 .cpu_name = "PPC970FX",
4920960f 158 .cpu_features = CPU_FTRS_PPC970,
a7ddc5e8 159 .cpu_user_features = COMMON_USER_POWER4 |
4920960f 160 PPC_FEATURE_HAS_ALTIVEC_COMP,
44ae3ab3 161 .mmu_features = MMU_FTRS_PPC970,
4920960f
SR
162 .icache_bsize = 128,
163 .dcache_bsize = 128,
164 .num_pmcs = 8,
1bd2e5ae 165 .pmc_type = PPC_PMC_IBM,
4920960f 166 .cpu_setup = __setup_cpu_ppc970,
f39b7a55 167 .cpu_restore = __restore_cpu_ppc970,
4920960f 168 .oprofile_cpu_type = "ppc64/970",
7a45fb19 169 .oprofile_type = PPC_OPROFILE_POWER4,
80f15dc7 170 .platform = "ppc970",
3546e811
OJ
171 },
172 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
173 .pvr_mask = 0xffffffff,
174 .pvr_value = 0x00440100,
175 .cpu_name = "PPC970MP",
176 .cpu_features = CPU_FTRS_PPC970,
177 .cpu_user_features = COMMON_USER_POWER4 |
178 PPC_FEATURE_HAS_ALTIVEC_COMP,
d63ac5f6 179 .mmu_features = MMU_FTRS_PPC970,
3546e811
OJ
180 .icache_bsize = 128,
181 .dcache_bsize = 128,
182 .num_pmcs = 8,
2fae4985 183 .pmc_type = PPC_PMC_IBM,
3546e811
OJ
184 .cpu_setup = __setup_cpu_ppc970,
185 .cpu_restore = __restore_cpu_ppc970,
186 .oprofile_cpu_type = "ppc64/970MP",
187 .oprofile_type = PPC_OPROFILE_POWER4,
188 .platform = "ppc970",
4920960f 189 },
4920960f
SR
190 { /* PPC970MP */
191 .pvr_mask = 0xffff0000,
192 .pvr_value = 0x00440000,
193 .cpu_name = "PPC970MP",
194 .cpu_features = CPU_FTRS_PPC970,
a7ddc5e8 195 .cpu_user_features = COMMON_USER_POWER4 |
4920960f 196 PPC_FEATURE_HAS_ALTIVEC_COMP,
44ae3ab3 197 .mmu_features = MMU_FTRS_PPC970,
4920960f
SR
198 .icache_bsize = 128,
199 .dcache_bsize = 128,
87af41be 200 .num_pmcs = 8,
2fae4985 201 .pmc_type = PPC_PMC_IBM,
5b43d20a 202 .cpu_setup = __setup_cpu_ppc970MP,
f39b7a55 203 .cpu_restore = __restore_cpu_ppc970,
fecb352f 204 .oprofile_cpu_type = "ppc64/970MP",
7a45fb19 205 .oprofile_type = PPC_OPROFILE_POWER4,
80f15dc7 206 .platform = "ppc970",
4920960f 207 },
362ff7b2
JM
208 { /* PPC970GX */
209 .pvr_mask = 0xffff0000,
210 .pvr_value = 0x00450000,
211 .cpu_name = "PPC970GX",
212 .cpu_features = CPU_FTRS_PPC970,
213 .cpu_user_features = COMMON_USER_POWER4 |
214 PPC_FEATURE_HAS_ALTIVEC_COMP,
44ae3ab3 215 .mmu_features = MMU_FTRS_PPC970,
362ff7b2
JM
216 .icache_bsize = 128,
217 .dcache_bsize = 128,
218 .num_pmcs = 8,
1bd2e5ae 219 .pmc_type = PPC_PMC_IBM,
362ff7b2
JM
220 .cpu_setup = __setup_cpu_ppc970,
221 .oprofile_cpu_type = "ppc64/970",
222 .oprofile_type = PPC_OPROFILE_POWER4,
223 .platform = "ppc970",
224 },
3c726f8d 225 { /* Power5 GR */
4920960f
SR
226 .pvr_mask = 0xffff0000,
227 .pvr_value = 0x003a0000,
228 .cpu_name = "POWER5 (gr)",
229 .cpu_features = CPU_FTRS_POWER5,
a7ddc5e8 230 .cpu_user_features = COMMON_USER_POWER5,
44ae3ab3 231 .mmu_features = MMU_FTRS_POWER5,
4920960f
SR
232 .icache_bsize = 128,
233 .dcache_bsize = 128,
234 .num_pmcs = 6,
1bd2e5ae 235 .pmc_type = PPC_PMC_IBM,
4920960f 236 .oprofile_cpu_type = "ppc64/power5",
7a45fb19 237 .oprofile_type = PPC_OPROFILE_POWER4,
e78dbc80
MN
238 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
239 * and above but only works on POWER5 and above
240 */
241 .oprofile_mmcra_sihv = MMCRA_SIHV,
242 .oprofile_mmcra_sipr = MMCRA_SIPR,
80f15dc7 243 .platform = "power5",
4920960f 244 },
31a12cec
MW
245 { /* Power5++ */
246 .pvr_mask = 0xffffff00,
247 .pvr_value = 0x003b0300,
248 .cpu_name = "POWER5+ (gs)",
249 .cpu_features = CPU_FTRS_POWER5,
250 .cpu_user_features = COMMON_USER_POWER5_PLUS,
44ae3ab3 251 .mmu_features = MMU_FTRS_POWER5,
31a12cec
MW
252 .icache_bsize = 128,
253 .dcache_bsize = 128,
254 .num_pmcs = 6,
255 .oprofile_cpu_type = "ppc64/power5++",
256 .oprofile_type = PPC_OPROFILE_POWER4,
257 .oprofile_mmcra_sihv = MMCRA_SIHV,
258 .oprofile_mmcra_sipr = MMCRA_SIPR,
259 .platform = "power5+",
260 },
3c726f8d 261 { /* Power5 GS */
4920960f
SR
262 .pvr_mask = 0xffff0000,
263 .pvr_value = 0x003b0000,
834608f7 264 .cpu_name = "POWER5+ (gs)",
4920960f 265 .cpu_features = CPU_FTRS_POWER5,
a7ddc5e8 266 .cpu_user_features = COMMON_USER_POWER5_PLUS,
44ae3ab3 267 .mmu_features = MMU_FTRS_POWER5,
4920960f
SR
268 .icache_bsize = 128,
269 .dcache_bsize = 128,
270 .num_pmcs = 6,
1bd2e5ae 271 .pmc_type = PPC_PMC_IBM,
834608f7 272 .oprofile_cpu_type = "ppc64/power5+",
7a45fb19 273 .oprofile_type = PPC_OPROFILE_POWER4,
e78dbc80
MN
274 .oprofile_mmcra_sihv = MMCRA_SIHV,
275 .oprofile_mmcra_sipr = MMCRA_SIPR,
80f15dc7 276 .platform = "power5+",
4920960f 277 },
974a76f5
PM
278 { /* POWER6 in P5+ mode; 2.04-compliant processor */
279 .pvr_mask = 0xffffffff,
280 .pvr_value = 0x0f000001,
281 .cpu_name = "POWER5+",
282 .cpu_features = CPU_FTRS_POWER5,
283 .cpu_user_features = COMMON_USER_POWER5_PLUS,
44ae3ab3 284 .mmu_features = MMU_FTRS_POWER5,
974a76f5
PM
285 .icache_bsize = 128,
286 .dcache_bsize = 128,
79af6c49
MW
287 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
288 .oprofile_type = PPC_OPROFILE_POWER4,
974a76f5
PM
289 .platform = "power5+",
290 },
03054d51
AB
291 { /* Power6 */
292 .pvr_mask = 0xffff0000,
293 .pvr_value = 0x003e0000,
974a76f5
PM
294 .cpu_name = "POWER6 (raw)",
295 .cpu_features = CPU_FTRS_POWER6,
296 .cpu_user_features = COMMON_USER_POWER6 |
297 PPC_FEATURE_POWER6_EXT,
44ae3ab3 298 .mmu_features = MMU_FTRS_POWER6,
974a76f5
PM
299 .icache_bsize = 128,
300 .dcache_bsize = 128,
301 .num_pmcs = 6,
2fae4985 302 .pmc_type = PPC_PMC_IBM,
974a76f5
PM
303 .oprofile_cpu_type = "ppc64/power6",
304 .oprofile_type = PPC_OPROFILE_POWER4,
305 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
306 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
307 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
308 POWER6_MMCRA_OTHER,
309 .platform = "power6x",
310 },
311 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
312 .pvr_mask = 0xffffffff,
313 .pvr_value = 0x0f000002,
314 .cpu_name = "POWER6 (architected)",
03054d51
AB
315 .cpu_features = CPU_FTRS_POWER6,
316 .cpu_user_features = COMMON_USER_POWER6,
44ae3ab3 317 .mmu_features = MMU_FTRS_POWER6,
03054d51
AB
318 .icache_bsize = 128,
319 .dcache_bsize = 128,
79af6c49
MW
320 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
321 .oprofile_type = PPC_OPROFILE_POWER4,
03054d51
AB
322 .platform = "power6",
323 },
635f5a63
JS
324 { /* 2.06-compliant processor, i.e. Power7 "architected" mode */
325 .pvr_mask = 0xffffffff,
326 .pvr_value = 0x0f000003,
327 .cpu_name = "POWER7 (architected)",
328 .cpu_features = CPU_FTRS_POWER7,
329 .cpu_user_features = COMMON_USER_POWER7,
4a1ae4f3 330 .cpu_user_features2 = COMMON_USER2_POWER7,
44ae3ab3 331 .mmu_features = MMU_FTRS_POWER7,
635f5a63
JS
332 .icache_bsize = 128,
333 .dcache_bsize = 128,
79af6c49
MW
334 .oprofile_type = PPC_OPROFILE_POWER4,
335 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
24cc67de
BH
336 .cpu_setup = __setup_cpu_power7,
337 .cpu_restore = __restore_cpu_power7,
e22a2274 338 .machine_check_early = __machine_check_early_realmode_p7,
635f5a63
JS
339 .platform = "power7",
340 },
c674e703
MN
341 { /* 2.07-compliant processor, i.e. Power8 "architected" mode */
342 .pvr_mask = 0xffffffff,
343 .pvr_value = 0x0f000004,
344 .cpu_name = "POWER8 (architected)",
345 .cpu_features = CPU_FTRS_POWER8,
346 .cpu_user_features = COMMON_USER_POWER8,
748645bf 347 .cpu_user_features2 = COMMON_USER2_POWER8,
c674e703
MN
348 .mmu_features = MMU_FTRS_POWER8,
349 .icache_bsize = 128,
350 .dcache_bsize = 128,
6a60f9e7
MN
351 .oprofile_type = PPC_OPROFILE_INVALID,
352 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
c674e703
MN
353 .cpu_setup = __setup_cpu_power8,
354 .cpu_restore = __restore_cpu_power8,
ae744f34 355 .machine_check_early = __machine_check_early_realmode_p8,
c674e703
MN
356 .platform = "power8",
357 },
6ae3f8ad
RC
358 { /* 3.00-compliant processor, i.e. Power9 "architected" mode */
359 .pvr_mask = 0xffffffff,
360 .pvr_value = 0x0f000005,
361 .cpu_name = "POWER9 (architected)",
362 .cpu_features = CPU_FTRS_POWER9,
363 .cpu_user_features = COMMON_USER_POWER9,
364 .cpu_user_features2 = COMMON_USER2_POWER9,
365 .mmu_features = MMU_FTRS_POWER9,
366 .icache_bsize = 128,
367 .dcache_bsize = 128,
368 .oprofile_type = PPC_OPROFILE_INVALID,
369 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
370 .cpu_setup = __setup_cpu_power9,
371 .cpu_restore = __restore_cpu_power9,
6ae3f8ad
RC
372 .platform = "power9",
373 },
e952e6c4
MN
374 { /* Power7 */
375 .pvr_mask = 0xffff0000,
376 .pvr_value = 0x003f0000,
635f5a63 377 .cpu_name = "POWER7 (raw)",
e952e6c4
MN
378 .cpu_features = CPU_FTRS_POWER7,
379 .cpu_user_features = COMMON_USER_POWER7,
4a1ae4f3 380 .cpu_user_features2 = COMMON_USER2_POWER7,
44ae3ab3 381 .mmu_features = MMU_FTRS_POWER7,
e952e6c4
MN
382 .icache_bsize = 128,
383 .dcache_bsize = 128,
384 .num_pmcs = 6,
385 .pmc_type = PPC_PMC_IBM,
e952e6c4
MN
386 .oprofile_cpu_type = "ppc64/power7",
387 .oprofile_type = PPC_OPROFILE_POWER4,
24cc67de
BH
388 .cpu_setup = __setup_cpu_power7,
389 .cpu_restore = __restore_cpu_power7,
e22a2274 390 .machine_check_early = __machine_check_early_realmode_p7,
e952e6c4
MN
391 .platform = "power7",
392 },
6f08cb3b
MN
393 { /* Power7+ */
394 .pvr_mask = 0xffff0000,
395 .pvr_value = 0x004A0000,
396 .cpu_name = "POWER7+ (raw)",
397 .cpu_features = CPU_FTRS_POWER7,
398 .cpu_user_features = COMMON_USER_POWER7,
badec11b 399 .cpu_user_features2 = COMMON_USER2_POWER7,
44ae3ab3 400 .mmu_features = MMU_FTRS_POWER7,
6f08cb3b
MN
401 .icache_bsize = 128,
402 .dcache_bsize = 128,
403 .num_pmcs = 6,
404 .pmc_type = PPC_PMC_IBM,
405 .oprofile_cpu_type = "ppc64/power7",
406 .oprofile_type = PPC_OPROFILE_POWER4,
24cc67de
BH
407 .cpu_setup = __setup_cpu_power7,
408 .cpu_restore = __restore_cpu_power7,
e22a2274 409 .machine_check_early = __machine_check_early_realmode_p7,
6f08cb3b
MN
410 .platform = "power7+",
411 },
33959f88 412 { /* Power8E */
71e18497
MN
413 .pvr_mask = 0xffff0000,
414 .pvr_value = 0x004b0000,
33959f88 415 .cpu_name = "POWER8E (raw)",
68f2f0d4 416 .cpu_features = CPU_FTRS_POWER8E,
33959f88 417 .cpu_user_features = COMMON_USER_POWER8,
bd6ba351
JS
418 .cpu_user_features2 = COMMON_USER2_POWER8,
419 .mmu_features = MMU_FTRS_POWER8,
420 .icache_bsize = 128,
421 .dcache_bsize = 128,
422 .num_pmcs = 6,
423 .pmc_type = PPC_PMC_IBM,
424 .oprofile_cpu_type = "ppc64/power8",
425 .oprofile_type = PPC_OPROFILE_INVALID,
426 .cpu_setup = __setup_cpu_power8,
427 .cpu_restore = __restore_cpu_power8,
bd6ba351
JS
428 .machine_check_early = __machine_check_early_realmode_p8,
429 .platform = "power8",
430 },
ddee09c0
BH
431 { /* Power8NVL */
432 .pvr_mask = 0xffff0000,
433 .pvr_value = 0x004c0000,
434 .cpu_name = "POWER8NVL (raw)",
435 .cpu_features = CPU_FTRS_POWER8,
436 .cpu_user_features = COMMON_USER_POWER8,
437 .cpu_user_features2 = COMMON_USER2_POWER8,
438 .mmu_features = MMU_FTRS_POWER8,
439 .icache_bsize = 128,
440 .dcache_bsize = 128,
33959f88
MN
441 .num_pmcs = 6,
442 .pmc_type = PPC_PMC_IBM,
443 .oprofile_cpu_type = "ppc64/power8",
444 .oprofile_type = PPC_OPROFILE_INVALID,
445 .cpu_setup = __setup_cpu_power8,
446 .cpu_restore = __restore_cpu_power8,
ae744f34 447 .machine_check_early = __machine_check_early_realmode_p8,
33959f88
MN
448 .platform = "power8",
449 },
450 { /* Power8 */
451 .pvr_mask = 0xffff0000,
452 .pvr_value = 0x004d0000,
71e18497
MN
453 .cpu_name = "POWER8 (raw)",
454 .cpu_features = CPU_FTRS_POWER8,
455 .cpu_user_features = COMMON_USER_POWER8,
748645bf 456 .cpu_user_features2 = COMMON_USER2_POWER8,
71e18497
MN
457 .mmu_features = MMU_FTRS_POWER8,
458 .icache_bsize = 128,
459 .dcache_bsize = 128,
460 .num_pmcs = 6,
461 .pmc_type = PPC_PMC_IBM,
6a60f9e7
MN
462 .oprofile_cpu_type = "ppc64/power8",
463 .oprofile_type = PPC_OPROFILE_INVALID,
71e18497
MN
464 .cpu_setup = __setup_cpu_power8,
465 .cpu_restore = __restore_cpu_power8,
ae744f34 466 .machine_check_early = __machine_check_early_realmode_p8,
71e18497
MN
467 .platform = "power8",
468 },
b6b3755e
NP
469 { /* Power9 DD2.0 */
470 .pvr_mask = 0xffffefff,
471 .pvr_value = 0x004e0200,
472 .cpu_name = "POWER9 (raw)",
3ffa9d9e 473 .cpu_features = CPU_FTRS_POWER9_DD2_0,
b6b3755e
NP
474 .cpu_user_features = COMMON_USER_POWER9,
475 .cpu_user_features2 = COMMON_USER2_POWER9,
476 .mmu_features = MMU_FTRS_POWER9,
477 .icache_bsize = 128,
478 .dcache_bsize = 128,
479 .num_pmcs = 6,
480 .pmc_type = PPC_PMC_IBM,
481 .oprofile_cpu_type = "ppc64/power9",
482 .oprofile_type = PPC_OPROFILE_INVALID,
483 .cpu_setup = __setup_cpu_power9,
484 .cpu_restore = __restore_cpu_power9,
b6b3755e
NP
485 .machine_check_early = __machine_check_early_realmode_p9,
486 .platform = "power9",
487 },
b5af4f27
PM
488 { /* Power9 DD 2.1 */
489 .pvr_mask = 0xffffefff,
490 .pvr_value = 0x004e0201,
491 .cpu_name = "POWER9 (raw)",
492 .cpu_features = CPU_FTRS_POWER9_DD2_1,
493 .cpu_user_features = COMMON_USER_POWER9,
494 .cpu_user_features2 = COMMON_USER2_POWER9,
495 .mmu_features = MMU_FTRS_POWER9,
496 .icache_bsize = 128,
497 .dcache_bsize = 128,
498 .num_pmcs = 6,
499 .pmc_type = PPC_PMC_IBM,
500 .oprofile_cpu_type = "ppc64/power9",
501 .oprofile_type = PPC_OPROFILE_INVALID,
502 .cpu_setup = __setup_cpu_power9,
503 .cpu_restore = __restore_cpu_power9,
b5af4f27
PM
504 .machine_check_early = __machine_check_early_realmode_p9,
505 .platform = "power9",
506 },
507 { /* Power9 DD2.2 or later */
c3ab300e
MN
508 .pvr_mask = 0xffff0000,
509 .pvr_value = 0x004e0000,
510 .cpu_name = "POWER9 (raw)",
b5af4f27 511 .cpu_features = CPU_FTRS_POWER9_DD2_2,
c3ab300e
MN
512 .cpu_user_features = COMMON_USER_POWER9,
513 .cpu_user_features2 = COMMON_USER2_POWER9,
514 .mmu_features = MMU_FTRS_POWER9,
515 .icache_bsize = 128,
516 .dcache_bsize = 128,
517 .num_pmcs = 6,
518 .pmc_type = PPC_PMC_IBM,
519 .oprofile_cpu_type = "ppc64/power9",
520 .oprofile_type = PPC_OPROFILE_INVALID,
521 .cpu_setup = __setup_cpu_power9,
522 .cpu_restore = __restore_cpu_power9,
7b9f71f9 523 .machine_check_early = __machine_check_early_realmode_p9,
c3ab300e
MN
524 .platform = "power9",
525 },
c902be71 526 { /* Cell Broadband Engine */
4920960f
SR
527 .pvr_mask = 0xffff0000,
528 .pvr_value = 0x00700000,
529 .cpu_name = "Cell Broadband Engine",
530 .cpu_features = CPU_FTRS_CELL,
531 .cpu_user_features = COMMON_USER_PPC64 |
aa5cb021
BH
532 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
533 PPC_FEATURE_SMT,
44ae3ab3 534 .mmu_features = MMU_FTRS_CELL,
4920960f
SR
535 .icache_bsize = 128,
536 .dcache_bsize = 128,
18f2190d 537 .num_pmcs = 4,
1bd2e5ae 538 .pmc_type = PPC_PMC_IBM,
18f2190d
MJ
539 .oprofile_cpu_type = "ppc64/cell-be",
540 .oprofile_type = PPC_OPROFILE_CELL,
80f15dc7 541 .platform = "ppc-cell-be",
4920960f 542 },
b3ebd1d8
OJ
543 { /* PA Semi PA6T */
544 .pvr_mask = 0x7fff0000,
545 .pvr_value = 0x00900000,
546 .cpu_name = "PA6T",
547 .cpu_features = CPU_FTRS_PA6T,
548 .cpu_user_features = COMMON_USER_PA6T,
44ae3ab3 549 .mmu_features = MMU_FTRS_PA6T,
b3ebd1d8
OJ
550 .icache_bsize = 64,
551 .dcache_bsize = 64,
552 .num_pmcs = 6,
1bd2e5ae 553 .pmc_type = PPC_PMC_PA6T,
1199919b
OJ
554 .cpu_setup = __setup_cpu_pa6t,
555 .cpu_restore = __restore_cpu_pa6t,
25fc530e
OJ
556 .oprofile_cpu_type = "ppc64/pa6t",
557 .oprofile_type = PPC_OPROFILE_PA6T,
b3ebd1d8
OJ
558 .platform = "pa6t",
559 },
4920960f
SR
560 { /* default match */
561 .pvr_mask = 0x00000000,
562 .pvr_value = 0x00000000,
471d7ff8 563 .cpu_name = "POWER5 (compatible)",
4920960f
SR
564 .cpu_features = CPU_FTRS_COMPATIBLE,
565 .cpu_user_features = COMMON_USER_PPC64,
471d7ff8 566 .mmu_features = MMU_FTRS_POWER,
4920960f
SR
567 .icache_bsize = 128,
568 .dcache_bsize = 128,
569 .num_pmcs = 6,
1bd2e5ae 570 .pmc_type = PPC_PMC_IBM,
471d7ff8 571 .platform = "power5",
4920960f 572 }
2d27cfd3 573#endif /* CONFIG_PPC_BOOK3S_64 */
2d27cfd3 574
4920960f 575#ifdef CONFIG_PPC32
1e07a0a0 576#ifdef CONFIG_PPC_BOOK3S_32
4920960f 577 { /* 601 */
1da177e4
LT
578 .pvr_mask = 0xffff0000,
579 .pvr_value = 0x00010000,
580 .cpu_name = "601",
10b35d99 581 .cpu_features = CPU_FTRS_PPC601,
4920960f 582 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
d8e998c5 583 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
7c03d653 584 .mmu_features = MMU_FTR_HPTE_TABLE,
1da177e4
LT
585 .icache_bsize = 32,
586 .dcache_bsize = 32,
47c0bd1a 587 .machine_check = machine_check_generic,
80f15dc7 588 .platform = "ppc601",
1da177e4
LT
589 },
590 { /* 603 */
591 .pvr_mask = 0xffff0000,
592 .pvr_value = 0x00030000,
593 .cpu_name = "603",
10b35d99 594 .cpu_features = CPU_FTRS_603,
fab5db97 595 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
7c03d653 596 .mmu_features = 0,
1da177e4
LT
597 .icache_bsize = 32,
598 .dcache_bsize = 32,
80f15dc7 599 .cpu_setup = __setup_cpu_603,
47c0bd1a 600 .machine_check = machine_check_generic,
80f15dc7 601 .platform = "ppc603",
1da177e4
LT
602 },
603 { /* 603e */
604 .pvr_mask = 0xffff0000,
605 .pvr_value = 0x00060000,
606 .cpu_name = "603e",
10b35d99 607 .cpu_features = CPU_FTRS_603,
fab5db97 608 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
7c03d653 609 .mmu_features = 0,
1da177e4
LT
610 .icache_bsize = 32,
611 .dcache_bsize = 32,
80f15dc7 612 .cpu_setup = __setup_cpu_603,
47c0bd1a 613 .machine_check = machine_check_generic,
80f15dc7 614 .platform = "ppc603",
1da177e4
LT
615 },
616 { /* 603ev */
617 .pvr_mask = 0xffff0000,
618 .pvr_value = 0x00070000,
619 .cpu_name = "603ev",
10b35d99 620 .cpu_features = CPU_FTRS_603,
fab5db97 621 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
7c03d653 622 .mmu_features = 0,
1da177e4
LT
623 .icache_bsize = 32,
624 .dcache_bsize = 32,
80f15dc7 625 .cpu_setup = __setup_cpu_603,
47c0bd1a 626 .machine_check = machine_check_generic,
80f15dc7 627 .platform = "ppc603",
1da177e4
LT
628 },
629 { /* 604 */
630 .pvr_mask = 0xffff0000,
631 .pvr_value = 0x00040000,
632 .cpu_name = "604",
10b35d99 633 .cpu_features = CPU_FTRS_604,
fab5db97 634 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
7c03d653 635 .mmu_features = MMU_FTR_HPTE_TABLE,
1da177e4
LT
636 .icache_bsize = 32,
637 .dcache_bsize = 32,
638 .num_pmcs = 2,
80f15dc7 639 .cpu_setup = __setup_cpu_604,
47c0bd1a 640 .machine_check = machine_check_generic,
80f15dc7 641 .platform = "ppc604",
1da177e4
LT
642 },
643 { /* 604e */
644 .pvr_mask = 0xfffff000,
645 .pvr_value = 0x00090000,
646 .cpu_name = "604e",
10b35d99 647 .cpu_features = CPU_FTRS_604,
fab5db97 648 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
7c03d653 649 .mmu_features = MMU_FTR_HPTE_TABLE,
1da177e4
LT
650 .icache_bsize = 32,
651 .dcache_bsize = 32,
652 .num_pmcs = 4,
80f15dc7 653 .cpu_setup = __setup_cpu_604,
47c0bd1a 654 .machine_check = machine_check_generic,
80f15dc7 655 .platform = "ppc604",
1da177e4
LT
656 },
657 { /* 604r */
658 .pvr_mask = 0xffff0000,
659 .pvr_value = 0x00090000,
660 .cpu_name = "604r",
10b35d99 661 .cpu_features = CPU_FTRS_604,
fab5db97 662 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
7c03d653 663 .mmu_features = MMU_FTR_HPTE_TABLE,
1da177e4
LT
664 .icache_bsize = 32,
665 .dcache_bsize = 32,
666 .num_pmcs = 4,
80f15dc7 667 .cpu_setup = __setup_cpu_604,
47c0bd1a 668 .machine_check = machine_check_generic,
80f15dc7 669 .platform = "ppc604",
1da177e4
LT
670 },
671 { /* 604ev */
672 .pvr_mask = 0xffff0000,
673 .pvr_value = 0x000a0000,
674 .cpu_name = "604ev",
10b35d99 675 .cpu_features = CPU_FTRS_604,
fab5db97 676 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
7c03d653 677 .mmu_features = MMU_FTR_HPTE_TABLE,
1da177e4
LT
678 .icache_bsize = 32,
679 .dcache_bsize = 32,
680 .num_pmcs = 4,
80f15dc7 681 .cpu_setup = __setup_cpu_604,
47c0bd1a 682 .machine_check = machine_check_generic,
80f15dc7 683 .platform = "ppc604",
1da177e4
LT
684 },
685 { /* 740/750 (0x4202, don't support TAU ?) */
686 .pvr_mask = 0xffffffff,
687 .pvr_value = 0x00084202,
688 .cpu_name = "740/750",
10b35d99 689 .cpu_features = CPU_FTRS_740_NOTAU,
fab5db97 690 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
7c03d653 691 .mmu_features = MMU_FTR_HPTE_TABLE,
1da177e4
LT
692 .icache_bsize = 32,
693 .dcache_bsize = 32,
694 .num_pmcs = 4,
80f15dc7 695 .cpu_setup = __setup_cpu_750,
47c0bd1a 696 .machine_check = machine_check_generic,
80f15dc7 697 .platform = "ppc750",
1da177e4 698 },
1da177e4
LT
699 { /* 750CX (80100 and 8010x?) */
700 .pvr_mask = 0xfffffff0,
701 .pvr_value = 0x00080100,
702 .cpu_name = "750CX",
10b35d99 703 .cpu_features = CPU_FTRS_750,
fab5db97 704 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
7c03d653 705 .mmu_features = MMU_FTR_HPTE_TABLE,
1da177e4
LT
706 .icache_bsize = 32,
707 .dcache_bsize = 32,
708 .num_pmcs = 4,
80f15dc7 709 .cpu_setup = __setup_cpu_750cx,
47c0bd1a 710 .machine_check = machine_check_generic,
80f15dc7 711 .platform = "ppc750",
1da177e4
LT
712 },
713 { /* 750CX (82201 and 82202) */
714 .pvr_mask = 0xfffffff0,
715 .pvr_value = 0x00082200,
716 .cpu_name = "750CX",
10b35d99 717 .cpu_features = CPU_FTRS_750,
fab5db97 718 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
7c03d653 719 .mmu_features = MMU_FTR_HPTE_TABLE,
1da177e4
LT
720 .icache_bsize = 32,
721 .dcache_bsize = 32,
722 .num_pmcs = 4,
b950bdd0 723 .pmc_type = PPC_PMC_IBM,
80f15dc7 724 .cpu_setup = __setup_cpu_750cx,
47c0bd1a 725 .machine_check = machine_check_generic,
80f15dc7 726 .platform = "ppc750",
1da177e4
LT
727 },
728 { /* 750CXe (82214) */
729 .pvr_mask = 0xfffffff0,
730 .pvr_value = 0x00082210,
731 .cpu_name = "750CXe",
10b35d99 732 .cpu_features = CPU_FTRS_750,
fab5db97 733 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
7c03d653 734 .mmu_features = MMU_FTR_HPTE_TABLE,
1da177e4
LT
735 .icache_bsize = 32,
736 .dcache_bsize = 32,
737 .num_pmcs = 4,
b950bdd0 738 .pmc_type = PPC_PMC_IBM,
80f15dc7 739 .cpu_setup = __setup_cpu_750cx,
47c0bd1a 740 .machine_check = machine_check_generic,
80f15dc7 741 .platform = "ppc750",
1da177e4 742 },
7c31625a
AO
743 { /* 750CXe "Gekko" (83214) */
744 .pvr_mask = 0xffffffff,
745 .pvr_value = 0x00083214,
746 .cpu_name = "750CXe",
10b35d99 747 .cpu_features = CPU_FTRS_750,
fab5db97 748 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
7c03d653 749 .mmu_features = MMU_FTR_HPTE_TABLE,
7c31625a
AO
750 .icache_bsize = 32,
751 .dcache_bsize = 32,
752 .num_pmcs = 4,
b950bdd0 753 .pmc_type = PPC_PMC_IBM,
80f15dc7 754 .cpu_setup = __setup_cpu_750cx,
47c0bd1a 755 .machine_check = machine_check_generic,
80f15dc7 756 .platform = "ppc750",
7c31625a 757 },
45158dc7
AH
758 { /* 750CL (and "Broadway") */
759 .pvr_mask = 0xfffff0e0,
760 .pvr_value = 0x00087000,
cfbff8a3 761 .cpu_name = "750CL",
a14c4508 762 .cpu_features = CPU_FTRS_750CL,
cfbff8a3 763 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
7c03d653 764 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
cfbff8a3
JM
765 .icache_bsize = 32,
766 .dcache_bsize = 32,
767 .num_pmcs = 4,
b950bdd0 768 .pmc_type = PPC_PMC_IBM,
a14c4508 769 .cpu_setup = __setup_cpu_750,
47c0bd1a 770 .machine_check = machine_check_generic,
cfbff8a3 771 .platform = "ppc750",
04f56534
DT
772 .oprofile_cpu_type = "ppc/750",
773 .oprofile_type = PPC_OPROFILE_G4,
cfbff8a3 774 },
ac1ff047
AO
775 { /* 745/755 */
776 .pvr_mask = 0xfffff000,
777 .pvr_value = 0x00083000,
778 .cpu_name = "745/755",
10b35d99 779 .cpu_features = CPU_FTRS_750,
fab5db97 780 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
7c03d653 781 .mmu_features = MMU_FTR_HPTE_TABLE,
ac1ff047
AO
782 .icache_bsize = 32,
783 .dcache_bsize = 32,
784 .num_pmcs = 4,
b950bdd0 785 .pmc_type = PPC_PMC_IBM,
80f15dc7 786 .cpu_setup = __setup_cpu_750,
47c0bd1a 787 .machine_check = machine_check_generic,
80f15dc7 788 .platform = "ppc750",
ac1ff047 789 },
1da177e4
LT
790 { /* 750FX rev 1.x */
791 .pvr_mask = 0xffffff00,
792 .pvr_value = 0x70000100,
793 .cpu_name = "750FX",
10b35d99 794 .cpu_features = CPU_FTRS_750FX1,
fab5db97 795 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
7c03d653 796 .mmu_features = MMU_FTR_HPTE_TABLE,
1da177e4
LT
797 .icache_bsize = 32,
798 .dcache_bsize = 32,
799 .num_pmcs = 4,
b950bdd0 800 .pmc_type = PPC_PMC_IBM,
80f15dc7 801 .cpu_setup = __setup_cpu_750,
47c0bd1a 802 .machine_check = machine_check_generic,
80f15dc7 803 .platform = "ppc750",
7c9583a4
OP
804 .oprofile_cpu_type = "ppc/750",
805 .oprofile_type = PPC_OPROFILE_G4,
1da177e4
LT
806 },
807 { /* 750FX rev 2.0 must disable HID0[DPM] */
808 .pvr_mask = 0xffffffff,
809 .pvr_value = 0x70000200,
810 .cpu_name = "750FX",
10b35d99 811 .cpu_features = CPU_FTRS_750FX2,
fab5db97 812 .cpu_user_features = COMMON_USER | 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_IBM,
80f15dc7 818 .cpu_setup = __setup_cpu_750,
47c0bd1a 819 .machine_check = machine_check_generic,
80f15dc7 820 .platform = "ppc750",
7c9583a4
OP
821 .oprofile_cpu_type = "ppc/750",
822 .oprofile_type = PPC_OPROFILE_G4,
1da177e4
LT
823 },
824 { /* 750FX (All revs except 2.0) */
825 .pvr_mask = 0xffff0000,
826 .pvr_value = 0x70000000,
827 .cpu_name = "750FX",
10b35d99 828 .cpu_features = CPU_FTRS_750FX,
fab5db97 829 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
7c03d653 830 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
1da177e4
LT
831 .icache_bsize = 32,
832 .dcache_bsize = 32,
833 .num_pmcs = 4,
b950bdd0 834 .pmc_type = PPC_PMC_IBM,
80f15dc7 835 .cpu_setup = __setup_cpu_750fx,
47c0bd1a 836 .machine_check = machine_check_generic,
80f15dc7 837 .platform = "ppc750",
7c9583a4
OP
838 .oprofile_cpu_type = "ppc/750",
839 .oprofile_type = PPC_OPROFILE_G4,
1da177e4
LT
840 },
841 { /* 750GX */
842 .pvr_mask = 0xffff0000,
843 .pvr_value = 0x70020000,
844 .cpu_name = "750GX",
10b35d99 845 .cpu_features = CPU_FTRS_750GX,
fab5db97 846 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
7c03d653 847 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
1da177e4
LT
848 .icache_bsize = 32,
849 .dcache_bsize = 32,
850 .num_pmcs = 4,
b950bdd0 851 .pmc_type = PPC_PMC_IBM,
80f15dc7 852 .cpu_setup = __setup_cpu_750fx,
47c0bd1a 853 .machine_check = machine_check_generic,
80f15dc7 854 .platform = "ppc750",
7c9583a4
OP
855 .oprofile_cpu_type = "ppc/750",
856 .oprofile_type = PPC_OPROFILE_G4,
1da177e4
LT
857 },
858 { /* 740/750 (L2CR bit need fixup for 740) */
859 .pvr_mask = 0xffff0000,
860 .pvr_value = 0x00080000,
861 .cpu_name = "740/750",
10b35d99 862 .cpu_features = CPU_FTRS_740,
fab5db97 863 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
7c03d653 864 .mmu_features = MMU_FTR_HPTE_TABLE,
1da177e4
LT
865 .icache_bsize = 32,
866 .dcache_bsize = 32,
867 .num_pmcs = 4,
b950bdd0 868 .pmc_type = PPC_PMC_IBM,
80f15dc7 869 .cpu_setup = __setup_cpu_750,
47c0bd1a 870 .machine_check = machine_check_generic,
80f15dc7 871 .platform = "ppc750",
1da177e4
LT
872 },
873 { /* 7400 rev 1.1 ? (no TAU) */
874 .pvr_mask = 0xffffffff,
875 .pvr_value = 0x000c1101,
876 .cpu_name = "7400 (1.1)",
10b35d99 877 .cpu_features = CPU_FTRS_7400_NOTAU,
fab5db97
PM
878 .cpu_user_features = COMMON_USER |
879 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
7c03d653 880 .mmu_features = MMU_FTR_HPTE_TABLE,
1da177e4
LT
881 .icache_bsize = 32,
882 .dcache_bsize = 32,
883 .num_pmcs = 4,
b950bdd0 884 .pmc_type = PPC_PMC_G4,
80f15dc7 885 .cpu_setup = __setup_cpu_7400,
47c0bd1a 886 .machine_check = machine_check_generic,
80f15dc7 887 .platform = "ppc7400",
1da177e4
LT
888 },
889 { /* 7400 */
890 .pvr_mask = 0xffff0000,
891 .pvr_value = 0x000c0000,
892 .cpu_name = "7400",
10b35d99 893 .cpu_features = CPU_FTRS_7400,
fab5db97
PM
894 .cpu_user_features = COMMON_USER |
895 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
7c03d653 896 .mmu_features = MMU_FTR_HPTE_TABLE,
1da177e4
LT
897 .icache_bsize = 32,
898 .dcache_bsize = 32,
899 .num_pmcs = 4,
b950bdd0 900 .pmc_type = PPC_PMC_G4,
80f15dc7 901 .cpu_setup = __setup_cpu_7400,
47c0bd1a 902 .machine_check = machine_check_generic,
80f15dc7 903 .platform = "ppc7400",
1da177e4
LT
904 },
905 { /* 7410 */
906 .pvr_mask = 0xffff0000,
907 .pvr_value = 0x800c0000,
908 .cpu_name = "7410",
10b35d99 909 .cpu_features = CPU_FTRS_7400,
fab5db97
PM
910 .cpu_user_features = COMMON_USER |
911 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
7c03d653 912 .mmu_features = MMU_FTR_HPTE_TABLE,
1da177e4
LT
913 .icache_bsize = 32,
914 .dcache_bsize = 32,
915 .num_pmcs = 4,
b950bdd0 916 .pmc_type = PPC_PMC_G4,
80f15dc7 917 .cpu_setup = __setup_cpu_7410,
47c0bd1a 918 .machine_check = machine_check_generic,
80f15dc7 919 .platform = "ppc7400",
1da177e4
LT
920 },
921 { /* 7450 2.0 - no doze/nap */
922 .pvr_mask = 0xffffffff,
923 .pvr_value = 0x80000200,
924 .cpu_name = "7450",
10b35d99 925 .cpu_features = CPU_FTRS_7450_20,
fab5db97
PM
926 .cpu_user_features = COMMON_USER |
927 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
7c03d653 928 .mmu_features = MMU_FTR_HPTE_TABLE,
1da177e4
LT
929 .icache_bsize = 32,
930 .dcache_bsize = 32,
931 .num_pmcs = 6,
b950bdd0 932 .pmc_type = PPC_PMC_G4,
555d97ac 933 .cpu_setup = __setup_cpu_745x,
555d97ac 934 .oprofile_cpu_type = "ppc/7450",
7a45fb19 935 .oprofile_type = PPC_OPROFILE_G4,
47c0bd1a 936 .machine_check = machine_check_generic,
80f15dc7 937 .platform = "ppc7450",
1da177e4
LT
938 },
939 { /* 7450 2.1 */
940 .pvr_mask = 0xffffffff,
941 .pvr_value = 0x80000201,
942 .cpu_name = "7450",
10b35d99 943 .cpu_features = CPU_FTRS_7450_21,
fab5db97
PM
944 .cpu_user_features = COMMON_USER |
945 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
7c03d653 946 .mmu_features = MMU_FTR_HPTE_TABLE,
1da177e4
LT
947 .icache_bsize = 32,
948 .dcache_bsize = 32,
949 .num_pmcs = 6,
b950bdd0 950 .pmc_type = PPC_PMC_G4,
555d97ac 951 .cpu_setup = __setup_cpu_745x,
555d97ac 952 .oprofile_cpu_type = "ppc/7450",
7a45fb19 953 .oprofile_type = PPC_OPROFILE_G4,
47c0bd1a 954 .machine_check = machine_check_generic,
80f15dc7 955 .platform = "ppc7450",
1da177e4
LT
956 },
957 { /* 7450 2.3 and newer */
958 .pvr_mask = 0xffff0000,
959 .pvr_value = 0x80000000,
960 .cpu_name = "7450",
10b35d99 961 .cpu_features = CPU_FTRS_7450_23,
fab5db97
PM
962 .cpu_user_features = COMMON_USER |
963 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
7c03d653 964 .mmu_features = MMU_FTR_HPTE_TABLE,
1da177e4
LT
965 .icache_bsize = 32,
966 .dcache_bsize = 32,
967 .num_pmcs = 6,
b950bdd0 968 .pmc_type = PPC_PMC_G4,
555d97ac 969 .cpu_setup = __setup_cpu_745x,
555d97ac 970 .oprofile_cpu_type = "ppc/7450",
7a45fb19 971 .oprofile_type = PPC_OPROFILE_G4,
47c0bd1a 972 .machine_check = machine_check_generic,
80f15dc7 973 .platform = "ppc7450",
1da177e4
LT
974 },
975 { /* 7455 rev 1.x */
976 .pvr_mask = 0xffffff00,
977 .pvr_value = 0x80010100,
978 .cpu_name = "7455",
10b35d99 979 .cpu_features = CPU_FTRS_7455_1,
fab5db97
PM
980 .cpu_user_features = COMMON_USER |
981 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
7c03d653 982 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
1da177e4
LT
983 .icache_bsize = 32,
984 .dcache_bsize = 32,
985 .num_pmcs = 6,
b950bdd0 986 .pmc_type = PPC_PMC_G4,
555d97ac 987 .cpu_setup = __setup_cpu_745x,
555d97ac 988 .oprofile_cpu_type = "ppc/7450",
7a45fb19 989 .oprofile_type = PPC_OPROFILE_G4,
47c0bd1a 990 .machine_check = machine_check_generic,
80f15dc7 991 .platform = "ppc7450",
1da177e4
LT
992 },
993 { /* 7455 rev 2.0 */
994 .pvr_mask = 0xffffffff,
995 .pvr_value = 0x80010200,
996 .cpu_name = "7455",
10b35d99 997 .cpu_features = CPU_FTRS_7455_20,
fab5db97
PM
998 .cpu_user_features = COMMON_USER |
999 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
7c03d653 1000 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
1da177e4
LT
1001 .icache_bsize = 32,
1002 .dcache_bsize = 32,
1003 .num_pmcs = 6,
b950bdd0 1004 .pmc_type = PPC_PMC_G4,
555d97ac 1005 .cpu_setup = __setup_cpu_745x,
555d97ac 1006 .oprofile_cpu_type = "ppc/7450",
7a45fb19 1007 .oprofile_type = PPC_OPROFILE_G4,
47c0bd1a 1008 .machine_check = machine_check_generic,
80f15dc7 1009 .platform = "ppc7450",
1da177e4
LT
1010 },
1011 { /* 7455 others */
1012 .pvr_mask = 0xffff0000,
1013 .pvr_value = 0x80010000,
1014 .cpu_name = "7455",
10b35d99 1015 .cpu_features = CPU_FTRS_7455,
fab5db97
PM
1016 .cpu_user_features = COMMON_USER |
1017 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
7c03d653 1018 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
1da177e4
LT
1019 .icache_bsize = 32,
1020 .dcache_bsize = 32,
1021 .num_pmcs = 6,
b950bdd0 1022 .pmc_type = PPC_PMC_G4,
555d97ac 1023 .cpu_setup = __setup_cpu_745x,
555d97ac 1024 .oprofile_cpu_type = "ppc/7450",
7a45fb19 1025 .oprofile_type = PPC_OPROFILE_G4,
47c0bd1a 1026 .machine_check = machine_check_generic,
80f15dc7 1027 .platform = "ppc7450",
1da177e4
LT
1028 },
1029 { /* 7447/7457 Rev 1.0 */
1030 .pvr_mask = 0xffffffff,
1031 .pvr_value = 0x80020100,
1032 .cpu_name = "7447/7457",
10b35d99 1033 .cpu_features = CPU_FTRS_7447_10,
fab5db97
PM
1034 .cpu_user_features = COMMON_USER |
1035 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
7c03d653 1036 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
1da177e4
LT
1037 .icache_bsize = 32,
1038 .dcache_bsize = 32,
1039 .num_pmcs = 6,
b950bdd0 1040 .pmc_type = PPC_PMC_G4,
555d97ac 1041 .cpu_setup = __setup_cpu_745x,
555d97ac 1042 .oprofile_cpu_type = "ppc/7450",
7a45fb19 1043 .oprofile_type = PPC_OPROFILE_G4,
47c0bd1a 1044 .machine_check = machine_check_generic,
80f15dc7 1045 .platform = "ppc7450",
1da177e4
LT
1046 },
1047 { /* 7447/7457 Rev 1.1 */
1048 .pvr_mask = 0xffffffff,
1049 .pvr_value = 0x80020101,
1050 .cpu_name = "7447/7457",
10b35d99 1051 .cpu_features = CPU_FTRS_7447_10,
fab5db97
PM
1052 .cpu_user_features = COMMON_USER |
1053 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
7c03d653 1054 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
1da177e4
LT
1055 .icache_bsize = 32,
1056 .dcache_bsize = 32,
1057 .num_pmcs = 6,
b950bdd0 1058 .pmc_type = PPC_PMC_G4,
555d97ac 1059 .cpu_setup = __setup_cpu_745x,
555d97ac 1060 .oprofile_cpu_type = "ppc/7450",
7a45fb19 1061 .oprofile_type = PPC_OPROFILE_G4,
47c0bd1a 1062 .machine_check = machine_check_generic,
80f15dc7 1063 .platform = "ppc7450",
1da177e4
LT
1064 },
1065 { /* 7447/7457 Rev 1.2 and later */
1066 .pvr_mask = 0xffff0000,
1067 .pvr_value = 0x80020000,
1068 .cpu_name = "7447/7457",
10b35d99 1069 .cpu_features = CPU_FTRS_7447,
fab5db97 1070 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
7c03d653 1071 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
1da177e4
LT
1072 .icache_bsize = 32,
1073 .dcache_bsize = 32,
1074 .num_pmcs = 6,
b950bdd0 1075 .pmc_type = PPC_PMC_G4,
555d97ac 1076 .cpu_setup = __setup_cpu_745x,
555d97ac 1077 .oprofile_cpu_type = "ppc/7450",
7a45fb19 1078 .oprofile_type = PPC_OPROFILE_G4,
47c0bd1a 1079 .machine_check = machine_check_generic,
80f15dc7 1080 .platform = "ppc7450",
1da177e4
LT
1081 },
1082 { /* 7447A */
1083 .pvr_mask = 0xffff0000,
1084 .pvr_value = 0x80030000,
1085 .cpu_name = "7447A",
10b35d99 1086 .cpu_features = CPU_FTRS_7447A,
fab5db97
PM
1087 .cpu_user_features = COMMON_USER |
1088 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
7c03d653 1089 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
bbde630b
KG
1090 .icache_bsize = 32,
1091 .dcache_bsize = 32,
1092 .num_pmcs = 6,
b950bdd0 1093 .pmc_type = PPC_PMC_G4,
555d97ac 1094 .cpu_setup = __setup_cpu_745x,
555d97ac 1095 .oprofile_cpu_type = "ppc/7450",
7a45fb19 1096 .oprofile_type = PPC_OPROFILE_G4,
47c0bd1a 1097 .machine_check = machine_check_generic,
80f15dc7 1098 .platform = "ppc7450",
bbde630b
KG
1099 },
1100 { /* 7448 */
1101 .pvr_mask = 0xffff0000,
1102 .pvr_value = 0x80040000,
1103 .cpu_name = "7448",
3d372548 1104 .cpu_features = CPU_FTRS_7448,
fab5db97
PM
1105 .cpu_user_features = COMMON_USER |
1106 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
7c03d653 1107 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
1da177e4
LT
1108 .icache_bsize = 32,
1109 .dcache_bsize = 32,
1110 .num_pmcs = 6,
b950bdd0 1111 .pmc_type = PPC_PMC_G4,
555d97ac 1112 .cpu_setup = __setup_cpu_745x,
555d97ac 1113 .oprofile_cpu_type = "ppc/7450",
7a45fb19 1114 .oprofile_type = PPC_OPROFILE_G4,
47c0bd1a 1115 .machine_check = machine_check_generic,
80f15dc7 1116 .platform = "ppc7450",
1da177e4
LT
1117 },
1118 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
1119 .pvr_mask = 0x7fff0000,
1120 .pvr_value = 0x00810000,
1121 .cpu_name = "82xx",
10b35d99 1122 .cpu_features = CPU_FTRS_82XX,
4920960f 1123 .cpu_user_features = COMMON_USER,
7c03d653 1124 .mmu_features = 0,
1da177e4
LT
1125 .icache_bsize = 32,
1126 .dcache_bsize = 32,
80f15dc7 1127 .cpu_setup = __setup_cpu_603,
47c0bd1a 1128 .machine_check = machine_check_generic,
80f15dc7 1129 .platform = "ppc603",
1da177e4
LT
1130 },
1131 { /* All G2_LE (603e core, plus some) have the same pvr */
1132 .pvr_mask = 0x7fff0000,
1133 .pvr_value = 0x00820000,
1134 .cpu_name = "G2_LE",
10b35d99 1135 .cpu_features = CPU_FTRS_G2_LE,
4920960f 1136 .cpu_user_features = COMMON_USER,
7c03d653 1137 .mmu_features = MMU_FTR_USE_HIGH_BATS,
1da177e4
LT
1138 .icache_bsize = 32,
1139 .dcache_bsize = 32,
80f15dc7 1140 .cpu_setup = __setup_cpu_603,
47c0bd1a 1141 .machine_check = machine_check_generic,
80f15dc7 1142 .platform = "ppc603",
1da177e4 1143 },
0deae39c 1144#ifdef CONFIG_PPC_83xx
6c4a2501 1145 { /* e300c1 (a 603e core, plus some) on 83xx */
1da177e4
LT
1146 .pvr_mask = 0x7fff0000,
1147 .pvr_value = 0x00830000,
6c4a2501 1148 .cpu_name = "e300c1",
10b35d99 1149 .cpu_features = CPU_FTRS_E300,
4920960f 1150 .cpu_user_features = COMMON_USER,
7c03d653 1151 .mmu_features = MMU_FTR_USE_HIGH_BATS,
1da177e4
LT
1152 .icache_bsize = 32,
1153 .dcache_bsize = 32,
80f15dc7 1154 .cpu_setup = __setup_cpu_603,
0deae39c 1155 .machine_check = machine_check_83xx,
80f15dc7 1156 .platform = "ppc603",
1da177e4 1157 },
6c4a2501
KP
1158 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
1159 .pvr_mask = 0x7fff0000,
1160 .pvr_value = 0x00840000,
1161 .cpu_name = "e300c2",
aa42c69c 1162 .cpu_features = CPU_FTRS_E300C2,
6c4a2501 1163 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
2319f123
KG
1164 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1165 MMU_FTR_NEED_DTLB_SW_LRU,
6c4a2501
KP
1166 .icache_bsize = 32,
1167 .dcache_bsize = 32,
1168 .cpu_setup = __setup_cpu_603,
0deae39c 1169 .machine_check = machine_check_83xx,
6c4a2501
KP
1170 .platform = "ppc603",
1171 },
a58d5244 1172 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
57933f8f
SW
1173 .pvr_mask = 0x7fff0000,
1174 .pvr_value = 0x00850000,
1175 .cpu_name = "e300c3",
1176 .cpu_features = CPU_FTRS_E300,
1177 .cpu_user_features = COMMON_USER,
2319f123
KG
1178 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1179 MMU_FTR_NEED_DTLB_SW_LRU,
57933f8f
SW
1180 .icache_bsize = 32,
1181 .dcache_bsize = 32,
1182 .cpu_setup = __setup_cpu_603,
0deae39c 1183 .machine_check = machine_check_83xx,
1347a2c1
AF
1184 .num_pmcs = 4,
1185 .oprofile_cpu_type = "ppc/e300",
1186 .oprofile_type = PPC_OPROFILE_FSL_EMB,
57933f8f
SW
1187 .platform = "ppc603",
1188 },
a58d5244
LY
1189 { /* e300c4 (e300c1, plus one IU) */
1190 .pvr_mask = 0x7fff0000,
1191 .pvr_value = 0x00860000,
1192 .cpu_name = "e300c4",
1193 .cpu_features = CPU_FTRS_E300,
1194 .cpu_user_features = COMMON_USER,
2319f123
KG
1195 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1196 MMU_FTR_NEED_DTLB_SW_LRU,
a58d5244
LY
1197 .icache_bsize = 32,
1198 .dcache_bsize = 32,
1199 .cpu_setup = __setup_cpu_603,
0deae39c 1200 .machine_check = machine_check_83xx,
1347a2c1
AF
1201 .num_pmcs = 4,
1202 .oprofile_cpu_type = "ppc/e300",
1203 .oprofile_type = PPC_OPROFILE_FSL_EMB,
a58d5244
LY
1204 .platform = "ppc603",
1205 },
0deae39c 1206#endif
1da177e4
LT
1207 { /* default match, we assume split I/D cache & TB (non-601)... */
1208 .pvr_mask = 0x00000000,
1209 .pvr_value = 0x00000000,
1210 .cpu_name = "(generic PPC)",
10b35d99 1211 .cpu_features = CPU_FTRS_CLASSIC32,
4920960f 1212 .cpu_user_features = COMMON_USER,
7c03d653 1213 .mmu_features = MMU_FTR_HPTE_TABLE,
1da177e4
LT
1214 .icache_bsize = 32,
1215 .dcache_bsize = 32,
47c0bd1a 1216 .machine_check = machine_check_generic,
80f15dc7 1217 .platform = "ppc603",
1da177e4 1218 },
1e07a0a0 1219#endif /* CONFIG_PPC_BOOK3S_32 */
968159c0 1220#ifdef CONFIG_PPC_8xx
1da177e4
LT
1221 { /* 8xx */
1222 .pvr_mask = 0xffff0000,
3ee87674 1223 .pvr_value = PVR_8xx,
1da177e4
LT
1224 .cpu_name = "8xx",
1225 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1226 * if the 8xx code is there.... */
10b35d99 1227 .cpu_features = CPU_FTRS_8XX,
1da177e4 1228 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
7c03d653 1229 .mmu_features = MMU_FTR_TYPE_8xx,
1da177e4
LT
1230 .icache_bsize = 16,
1231 .dcache_bsize = 16,
e627f8dc 1232 .machine_check = machine_check_8xx,
80f15dc7 1233 .platform = "ppc823",
1da177e4 1234 },
968159c0 1235#endif /* CONFIG_PPC_8xx */
1da177e4
LT
1236#ifdef CONFIG_40x
1237 { /* 403GC */
1238 .pvr_mask = 0xffffff00,
1239 .pvr_value = 0x00200200,
1240 .cpu_name = "403GC",
10b35d99 1241 .cpu_features = CPU_FTRS_40X,
1da177e4 1242 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
7c03d653 1243 .mmu_features = MMU_FTR_TYPE_40x,
1da177e4
LT
1244 .icache_bsize = 16,
1245 .dcache_bsize = 16,
47c0bd1a 1246 .machine_check = machine_check_4xx,
80f15dc7 1247 .platform = "ppc403",
1da177e4
LT
1248 },
1249 { /* 403GCX */
1250 .pvr_mask = 0xffffff00,
1251 .pvr_value = 0x00201400,
1252 .cpu_name = "403GCX",
10b35d99 1253 .cpu_features = CPU_FTRS_40X,
d8e998c5
BH
1254 .cpu_user_features = PPC_FEATURE_32 |
1255 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
7c03d653 1256 .mmu_features = MMU_FTR_TYPE_40x,
1da177e4
LT
1257 .icache_bsize = 16,
1258 .dcache_bsize = 16,
47c0bd1a 1259 .machine_check = machine_check_4xx,
80f15dc7 1260 .platform = "ppc403",
1da177e4
LT
1261 },
1262 { /* 403G ?? */
1263 .pvr_mask = 0xffff0000,
1264 .pvr_value = 0x00200000,
1265 .cpu_name = "403G ??",
10b35d99 1266 .cpu_features = CPU_FTRS_40X,
1da177e4 1267 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
7c03d653 1268 .mmu_features = MMU_FTR_TYPE_40x,
1da177e4
LT
1269 .icache_bsize = 16,
1270 .dcache_bsize = 16,
47c0bd1a 1271 .machine_check = machine_check_4xx,
80f15dc7 1272 .platform = "ppc403",
1da177e4
LT
1273 },
1274 { /* 405GP */
1275 .pvr_mask = 0xffff0000,
1276 .pvr_value = 0x40110000,
1277 .cpu_name = "405GP",
10b35d99 1278 .cpu_features = CPU_FTRS_40X,
1da177e4
LT
1279 .cpu_user_features = PPC_FEATURE_32 |
1280 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
7c03d653 1281 .mmu_features = MMU_FTR_TYPE_40x,
1da177e4
LT
1282 .icache_bsize = 32,
1283 .dcache_bsize = 32,
47c0bd1a 1284 .machine_check = machine_check_4xx,
80f15dc7 1285 .platform = "ppc405",
1da177e4
LT
1286 },
1287 { /* STB 03xxx */
1288 .pvr_mask = 0xffff0000,
1289 .pvr_value = 0x40130000,
1290 .cpu_name = "STB03xxx",
10b35d99 1291 .cpu_features = CPU_FTRS_40X,
1da177e4
LT
1292 .cpu_user_features = PPC_FEATURE_32 |
1293 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
7c03d653 1294 .mmu_features = MMU_FTR_TYPE_40x,
1da177e4
LT
1295 .icache_bsize = 32,
1296 .dcache_bsize = 32,
47c0bd1a 1297 .machine_check = machine_check_4xx,
80f15dc7 1298 .platform = "ppc405",
1da177e4
LT
1299 },
1300 { /* STB 04xxx */
1301 .pvr_mask = 0xffff0000,
1302 .pvr_value = 0x41810000,
1303 .cpu_name = "STB04xxx",
10b35d99 1304 .cpu_features = CPU_FTRS_40X,
1da177e4
LT
1305 .cpu_user_features = PPC_FEATURE_32 |
1306 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
7c03d653 1307 .mmu_features = MMU_FTR_TYPE_40x,
1da177e4
LT
1308 .icache_bsize = 32,
1309 .dcache_bsize = 32,
47c0bd1a 1310 .machine_check = machine_check_4xx,
80f15dc7 1311 .platform = "ppc405",
1da177e4
LT
1312 },
1313 { /* NP405L */
1314 .pvr_mask = 0xffff0000,
1315 .pvr_value = 0x41610000,
1316 .cpu_name = "NP405L",
10b35d99 1317 .cpu_features = CPU_FTRS_40X,
1da177e4
LT
1318 .cpu_user_features = PPC_FEATURE_32 |
1319 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
7c03d653 1320 .mmu_features = MMU_FTR_TYPE_40x,
1da177e4
LT
1321 .icache_bsize = 32,
1322 .dcache_bsize = 32,
47c0bd1a 1323 .machine_check = machine_check_4xx,
80f15dc7 1324 .platform = "ppc405",
1da177e4
LT
1325 },
1326 { /* NP4GS3 */
1327 .pvr_mask = 0xffff0000,
1328 .pvr_value = 0x40B10000,
1329 .cpu_name = "NP4GS3",
10b35d99 1330 .cpu_features = CPU_FTRS_40X,
1da177e4
LT
1331 .cpu_user_features = PPC_FEATURE_32 |
1332 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
7c03d653 1333 .mmu_features = MMU_FTR_TYPE_40x,
1da177e4
LT
1334 .icache_bsize = 32,
1335 .dcache_bsize = 32,
47c0bd1a 1336 .machine_check = machine_check_4xx,
80f15dc7 1337 .platform = "ppc405",
1da177e4
LT
1338 },
1339 { /* NP405H */
1340 .pvr_mask = 0xffff0000,
1341 .pvr_value = 0x41410000,
1342 .cpu_name = "NP405H",
10b35d99 1343 .cpu_features = CPU_FTRS_40X,
1da177e4
LT
1344 .cpu_user_features = PPC_FEATURE_32 |
1345 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
7c03d653 1346 .mmu_features = MMU_FTR_TYPE_40x,
1da177e4
LT
1347 .icache_bsize = 32,
1348 .dcache_bsize = 32,
47c0bd1a 1349 .machine_check = machine_check_4xx,
80f15dc7 1350 .platform = "ppc405",
1da177e4
LT
1351 },
1352 { /* 405GPr */
1353 .pvr_mask = 0xffff0000,
1354 .pvr_value = 0x50910000,
1355 .cpu_name = "405GPr",
10b35d99 1356 .cpu_features = CPU_FTRS_40X,
1da177e4
LT
1357 .cpu_user_features = PPC_FEATURE_32 |
1358 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
7c03d653 1359 .mmu_features = MMU_FTR_TYPE_40x,
1da177e4
LT
1360 .icache_bsize = 32,
1361 .dcache_bsize = 32,
47c0bd1a 1362 .machine_check = machine_check_4xx,
80f15dc7 1363 .platform = "ppc405",
1da177e4
LT
1364 },
1365 { /* STBx25xx */
1366 .pvr_mask = 0xffff0000,
1367 .pvr_value = 0x51510000,
1368 .cpu_name = "STBx25xx",
10b35d99 1369 .cpu_features = CPU_FTRS_40X,
1da177e4
LT
1370 .cpu_user_features = PPC_FEATURE_32 |
1371 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
7c03d653 1372 .mmu_features = MMU_FTR_TYPE_40x,
1da177e4
LT
1373 .icache_bsize = 32,
1374 .dcache_bsize = 32,
47c0bd1a 1375 .machine_check = machine_check_4xx,
80f15dc7 1376 .platform = "ppc405",
1da177e4
LT
1377 },
1378 { /* 405LP */
1379 .pvr_mask = 0xffff0000,
1380 .pvr_value = 0x41F10000,
1381 .cpu_name = "405LP",
10b35d99 1382 .cpu_features = CPU_FTRS_40X,
1da177e4 1383 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
7c03d653 1384 .mmu_features = MMU_FTR_TYPE_40x,
1da177e4
LT
1385 .icache_bsize = 32,
1386 .dcache_bsize = 32,
47c0bd1a 1387 .machine_check = machine_check_4xx,
80f15dc7 1388 .platform = "ppc405",
1da177e4
LT
1389 },
1390 { /* Xilinx Virtex-II Pro */
72646c7f 1391 .pvr_mask = 0xfffff000,
1da177e4
LT
1392 .pvr_value = 0x20010000,
1393 .cpu_name = "Virtex-II Pro",
10b35d99 1394 .cpu_features = CPU_FTRS_40X,
1da177e4
LT
1395 .cpu_user_features = PPC_FEATURE_32 |
1396 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
7c03d653 1397 .mmu_features = MMU_FTR_TYPE_40x,
1da177e4
LT
1398 .icache_bsize = 32,
1399 .dcache_bsize = 32,
47c0bd1a 1400 .machine_check = machine_check_4xx,
80f15dc7 1401 .platform = "ppc405",
1da177e4 1402 },
72646c7f
GL
1403 { /* Xilinx Virtex-4 FX */
1404 .pvr_mask = 0xfffff000,
1405 .pvr_value = 0x20011000,
1406 .cpu_name = "Virtex-4 FX",
1407 .cpu_features = CPU_FTRS_40X,
1408 .cpu_user_features = PPC_FEATURE_32 |
1409 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
7c03d653 1410 .mmu_features = MMU_FTR_TYPE_40x,
72646c7f
GL
1411 .icache_bsize = 32,
1412 .dcache_bsize = 32,
47c0bd1a 1413 .machine_check = machine_check_4xx,
838fdb4d 1414 .platform = "ppc405",
72646c7f 1415 },
ad95d609
ES
1416 { /* 405EP */
1417 .pvr_mask = 0xffff0000,
1418 .pvr_value = 0x51210000,
1419 .cpu_name = "405EP",
10b35d99 1420 .cpu_features = CPU_FTRS_40X,
5d8476c8
SR
1421 .cpu_user_features = PPC_FEATURE_32 |
1422 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
7c03d653 1423 .mmu_features = MMU_FTR_TYPE_40x,
5d8476c8
SR
1424 .icache_bsize = 32,
1425 .dcache_bsize = 32,
47c0bd1a 1426 .machine_check = machine_check_4xx,
5d8476c8
SR
1427 .platform = "ppc405",
1428 },
ff349103
LN
1429 { /* 405EX Rev. A/B with Security */
1430 .pvr_mask = 0xffff000f,
1431 .pvr_value = 0x12910007,
1432 .cpu_name = "405EX Rev. A/B",
5d8476c8 1433 .cpu_features = CPU_FTRS_40X,
ad95d609
ES
1434 .cpu_user_features = PPC_FEATURE_32 |
1435 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
7c03d653 1436 .mmu_features = MMU_FTR_TYPE_40x,
ad95d609
ES
1437 .icache_bsize = 32,
1438 .dcache_bsize = 32,
47c0bd1a 1439 .machine_check = machine_check_4xx,
80f15dc7 1440 .platform = "ppc405",
ad95d609 1441 },
ff349103
LN
1442 { /* 405EX Rev. C without Security */
1443 .pvr_mask = 0xffff000f,
1444 .pvr_value = 0x1291000d,
1445 .cpu_name = "405EX Rev. C",
1446 .cpu_features = CPU_FTRS_40X,
1447 .cpu_user_features = PPC_FEATURE_32 |
1448 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1449 .mmu_features = MMU_FTR_TYPE_40x,
1450 .icache_bsize = 32,
1451 .dcache_bsize = 32,
1452 .machine_check = machine_check_4xx,
1453 .platform = "ppc405",
1454 },
1455 { /* 405EX Rev. C with Security */
1456 .pvr_mask = 0xffff000f,
1457 .pvr_value = 0x1291000f,
1458 .cpu_name = "405EX Rev. C",
1459 .cpu_features = CPU_FTRS_40X,
1460 .cpu_user_features = PPC_FEATURE_32 |
1461 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1462 .mmu_features = MMU_FTR_TYPE_40x,
1463 .icache_bsize = 32,
1464 .dcache_bsize = 32,
1465 .machine_check = machine_check_4xx,
1466 .platform = "ppc405",
1467 },
1468 { /* 405EX Rev. D without Security */
1469 .pvr_mask = 0xffff000f,
1470 .pvr_value = 0x12910003,
1471 .cpu_name = "405EX Rev. D",
1472 .cpu_features = CPU_FTRS_40X,
1473 .cpu_user_features = PPC_FEATURE_32 |
1474 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1475 .mmu_features = MMU_FTR_TYPE_40x,
1476 .icache_bsize = 32,
1477 .dcache_bsize = 32,
1478 .machine_check = machine_check_4xx,
1479 .platform = "ppc405",
1480 },
1481 { /* 405EX Rev. D with Security */
1482 .pvr_mask = 0xffff000f,
1483 .pvr_value = 0x12910005,
1484 .cpu_name = "405EX Rev. D",
1485 .cpu_features = CPU_FTRS_40X,
1486 .cpu_user_features = PPC_FEATURE_32 |
1487 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1488 .mmu_features = MMU_FTR_TYPE_40x,
1489 .icache_bsize = 32,
1490 .dcache_bsize = 32,
1491 .machine_check = machine_check_4xx,
1492 .platform = "ppc405",
1493 },
1494 { /* 405EXr Rev. A/B without Security */
1495 .pvr_mask = 0xffff000f,
1496 .pvr_value = 0x12910001,
1497 .cpu_name = "405EXr Rev. A/B",
1498 .cpu_features = CPU_FTRS_40X,
1499 .cpu_user_features = PPC_FEATURE_32 |
1500 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1501 .mmu_features = MMU_FTR_TYPE_40x,
1502 .icache_bsize = 32,
1503 .dcache_bsize = 32,
1504 .machine_check = machine_check_4xx,
1505 .platform = "ppc405",
1506 },
1507 { /* 405EXr Rev. C without Security */
1508 .pvr_mask = 0xffff000f,
1509 .pvr_value = 0x12910009,
1510 .cpu_name = "405EXr Rev. C",
1511 .cpu_features = CPU_FTRS_40X,
1512 .cpu_user_features = PPC_FEATURE_32 |
1513 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1514 .mmu_features = MMU_FTR_TYPE_40x,
1515 .icache_bsize = 32,
1516 .dcache_bsize = 32,
1517 .machine_check = machine_check_4xx,
1518 .platform = "ppc405",
1519 },
1520 { /* 405EXr Rev. C with Security */
1521 .pvr_mask = 0xffff000f,
1522 .pvr_value = 0x1291000b,
1523 .cpu_name = "405EXr Rev. C",
1524 .cpu_features = CPU_FTRS_40X,
1525 .cpu_user_features = PPC_FEATURE_32 |
1526 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1527 .mmu_features = MMU_FTR_TYPE_40x,
1528 .icache_bsize = 32,
1529 .dcache_bsize = 32,
1530 .machine_check = machine_check_4xx,
1531 .platform = "ppc405",
1532 },
1533 { /* 405EXr Rev. D without Security */
1534 .pvr_mask = 0xffff000f,
b676d84e 1535 .pvr_value = 0x12910000,
ff349103
LN
1536 .cpu_name = "405EXr Rev. D",
1537 .cpu_features = CPU_FTRS_40X,
1538 .cpu_user_features = PPC_FEATURE_32 |
1539 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1540 .mmu_features = MMU_FTR_TYPE_40x,
1541 .icache_bsize = 32,
1542 .dcache_bsize = 32,
1543 .machine_check = machine_check_4xx,
1544 .platform = "ppc405",
1545 },
1546 { /* 405EXr Rev. D with Security */
1547 .pvr_mask = 0xffff000f,
1548 .pvr_value = 0x12910002,
1549 .cpu_name = "405EXr Rev. D",
b676d84e
SR
1550 .cpu_features = CPU_FTRS_40X,
1551 .cpu_user_features = PPC_FEATURE_32 |
1552 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
7c03d653 1553 .mmu_features = MMU_FTR_TYPE_40x,
b676d84e
SR
1554 .icache_bsize = 32,
1555 .dcache_bsize = 32,
1556 .machine_check = machine_check_4xx,
1557 .platform = "ppc405",
1558 },
df8f71fa
JB
1559 {
1560 /* 405EZ */
1561 .pvr_mask = 0xffff0000,
1562 .pvr_value = 0x41510000,
1563 .cpu_name = "405EZ",
1564 .cpu_features = CPU_FTRS_40X,
1565 .cpu_user_features = PPC_FEATURE_32 |
1566 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
7c03d653 1567 .mmu_features = MMU_FTR_TYPE_40x,
df8f71fa
JB
1568 .icache_bsize = 32,
1569 .dcache_bsize = 32,
1570 .machine_check = machine_check_4xx,
1571 .platform = "ppc405",
1572 },
d5b9ee7b
TI
1573 { /* APM8018X */
1574 .pvr_mask = 0xffff0000,
1575 .pvr_value = 0x7ff11432,
1576 .cpu_name = "APM8018X",
1577 .cpu_features = CPU_FTRS_40X,
1578 .cpu_user_features = PPC_FEATURE_32 |
1579 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1580 .mmu_features = MMU_FTR_TYPE_40x,
1581 .icache_bsize = 32,
1582 .dcache_bsize = 32,
1583 .machine_check = machine_check_4xx,
1584 .platform = "ppc405",
1585 },
76bc080e
BH
1586 { /* default match */
1587 .pvr_mask = 0x00000000,
1588 .pvr_value = 0x00000000,
1589 .cpu_name = "(generic 40x PPC)",
1590 .cpu_features = CPU_FTRS_40X,
1591 .cpu_user_features = PPC_FEATURE_32 |
1592 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
7c03d653 1593 .mmu_features = MMU_FTR_TYPE_40x,
76bc080e
BH
1594 .icache_bsize = 32,
1595 .dcache_bsize = 32,
1596 .machine_check = machine_check_4xx,
1597 .platform = "ppc405",
1598 }
1da177e4
LT
1599
1600#endif /* CONFIG_40x */
1601#ifdef CONFIG_44x
c9cf73ae
MP
1602 {
1603 .pvr_mask = 0xf0000fff,
1604 .pvr_value = 0x40000850,
d1dfc35d
VB
1605 .cpu_name = "440GR Rev. A",
1606 .cpu_features = CPU_FTRS_44X,
1607 .cpu_user_features = COMMON_USER_BOOKE,
7c03d653 1608 .mmu_features = MMU_FTR_TYPE_44x,
d1dfc35d
VB
1609 .icache_bsize = 32,
1610 .dcache_bsize = 32,
47c0bd1a 1611 .machine_check = machine_check_4xx,
d1dfc35d
VB
1612 .platform = "ppc440",
1613 },
1614 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1615 .pvr_mask = 0xf0000fff,
1616 .pvr_value = 0x40000858,
c9cf73ae 1617 .cpu_name = "440EP Rev. A",
10b35d99 1618 .cpu_features = CPU_FTRS_44X,
80f15dc7 1619 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
7c03d653 1620 .mmu_features = MMU_FTR_TYPE_44x,
c9cf73ae
MP
1621 .icache_bsize = 32,
1622 .dcache_bsize = 32,
8112753b 1623 .cpu_setup = __setup_cpu_440ep,
47c0bd1a 1624 .machine_check = machine_check_4xx,
80f15dc7 1625 .platform = "ppc440",
c9cf73ae
MP
1626 },
1627 {
1628 .pvr_mask = 0xf0000fff,
1629 .pvr_value = 0x400008d3,
d1dfc35d 1630 .cpu_name = "440GR Rev. B",
10b35d99 1631 .cpu_features = CPU_FTRS_44X,
80f15dc7 1632 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
7c03d653 1633 .mmu_features = MMU_FTR_TYPE_44x,
c9cf73ae
MP
1634 .icache_bsize = 32,
1635 .dcache_bsize = 32,
47c0bd1a 1636 .machine_check = machine_check_4xx,
80f15dc7 1637 .platform = "ppc440",
c9cf73ae 1638 },
3f8fc3e0
SM
1639 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1640 .pvr_mask = 0xf0000ff7,
1641 .pvr_value = 0x400008d4,
1642 .cpu_name = "440EP Rev. C",
1643 .cpu_features = CPU_FTRS_44X,
1644 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
7c03d653 1645 .mmu_features = MMU_FTR_TYPE_44x,
3f8fc3e0
SM
1646 .icache_bsize = 32,
1647 .dcache_bsize = 32,
1648 .cpu_setup = __setup_cpu_440ep,
1649 .machine_check = machine_check_4xx,
1650 .platform = "ppc440",
1651 },
d1dfc35d
VB
1652 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1653 .pvr_mask = 0xf0000fff,
1654 .pvr_value = 0x400008db,
1655 .cpu_name = "440EP Rev. B",
15fc993e
VB
1656 .cpu_features = CPU_FTRS_44X,
1657 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
7c03d653 1658 .mmu_features = MMU_FTR_TYPE_44x,
15fc993e
VB
1659 .icache_bsize = 32,
1660 .dcache_bsize = 32,
d1dfc35d 1661 .cpu_setup = __setup_cpu_440ep,
47c0bd1a 1662 .machine_check = machine_check_4xx,
8112753b 1663 .platform = "ppc440",
15fc993e
VB
1664 },
1665 { /* 440GRX */
1666 .pvr_mask = 0xf0000ffb,
d1dfc35d 1667 .pvr_value = 0x200008D0,
15fc993e
VB
1668 .cpu_name = "440GRX",
1669 .cpu_features = CPU_FTRS_44X,
1670 .cpu_user_features = COMMON_USER_BOOKE,
7c03d653 1671 .mmu_features = MMU_FTR_TYPE_44x,
15fc993e
VB
1672 .icache_bsize = 32,
1673 .dcache_bsize = 32,
340ffd26 1674 .cpu_setup = __setup_cpu_440grx,
b2be3b15 1675 .machine_check = machine_check_440A,
340ffd26 1676 .platform = "ppc440",
15fc993e 1677 },
d1dfc35d
VB
1678 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1679 .pvr_mask = 0xf0000ffb,
1680 .pvr_value = 0x200008D8,
1681 .cpu_name = "440EPX",
1682 .cpu_features = CPU_FTRS_44X,
1683 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
7c03d653 1684 .mmu_features = MMU_FTR_TYPE_44x,
d1dfc35d
VB
1685 .icache_bsize = 32,
1686 .dcache_bsize = 32,
1687 .cpu_setup = __setup_cpu_440epx,
47c0bd1a 1688 .machine_check = machine_check_440A,
d1dfc35d
VB
1689 .platform = "ppc440",
1690 },
4920960f 1691 { /* 440GP Rev. B */
1da177e4
LT
1692 .pvr_mask = 0xf0000fff,
1693 .pvr_value = 0x40000440,
1694 .cpu_name = "440GP Rev. B",
10b35d99 1695 .cpu_features = CPU_FTRS_44X,
80f15dc7 1696 .cpu_user_features = COMMON_USER_BOOKE,
7c03d653 1697 .mmu_features = MMU_FTR_TYPE_44x,
1da177e4
LT
1698 .icache_bsize = 32,
1699 .dcache_bsize = 32,
47c0bd1a 1700 .machine_check = machine_check_4xx,
80f15dc7 1701 .platform = "ppc440gp",
1da177e4 1702 },
4920960f 1703 { /* 440GP Rev. C */
1da177e4
LT
1704 .pvr_mask = 0xf0000fff,
1705 .pvr_value = 0x40000481,
1706 .cpu_name = "440GP Rev. C",
10b35d99 1707 .cpu_features = CPU_FTRS_44X,
80f15dc7 1708 .cpu_user_features = COMMON_USER_BOOKE,
7c03d653 1709 .mmu_features = MMU_FTR_TYPE_44x,
1da177e4
LT
1710 .icache_bsize = 32,
1711 .dcache_bsize = 32,
47c0bd1a 1712 .machine_check = machine_check_4xx,
80f15dc7 1713 .platform = "ppc440gp",
1da177e4
LT
1714 },
1715 { /* 440GX Rev. A */
1716 .pvr_mask = 0xf0000fff,
1717 .pvr_value = 0x50000850,
1718 .cpu_name = "440GX Rev. A",
10b35d99 1719 .cpu_features = CPU_FTRS_44X,
80f15dc7 1720 .cpu_user_features = COMMON_USER_BOOKE,
7c03d653 1721 .mmu_features = MMU_FTR_TYPE_44x,
1da177e4
LT
1722 .icache_bsize = 32,
1723 .dcache_bsize = 32,
47c0bd1a
BH
1724 .cpu_setup = __setup_cpu_440gx,
1725 .machine_check = machine_check_440A,
80f15dc7 1726 .platform = "ppc440",
1da177e4
LT
1727 },
1728 { /* 440GX Rev. B */
1729 .pvr_mask = 0xf0000fff,
1730 .pvr_value = 0x50000851,
1731 .cpu_name = "440GX Rev. B",
10b35d99 1732 .cpu_features = CPU_FTRS_44X,
80f15dc7 1733 .cpu_user_features = COMMON_USER_BOOKE,
7c03d653 1734 .mmu_features = MMU_FTR_TYPE_44x,
1da177e4
LT
1735 .icache_bsize = 32,
1736 .dcache_bsize = 32,
47c0bd1a
BH
1737 .cpu_setup = __setup_cpu_440gx,
1738 .machine_check = machine_check_440A,
80f15dc7 1739 .platform = "ppc440",
1da177e4
LT
1740 },
1741 { /* 440GX Rev. C */
1742 .pvr_mask = 0xf0000fff,
1743 .pvr_value = 0x50000892,
1744 .cpu_name = "440GX Rev. C",
10b35d99 1745 .cpu_features = CPU_FTRS_44X,
80f15dc7 1746 .cpu_user_features = COMMON_USER_BOOKE,
7c03d653 1747 .mmu_features = MMU_FTR_TYPE_44x,
1da177e4
LT
1748 .icache_bsize = 32,
1749 .dcache_bsize = 32,
47c0bd1a
BH
1750 .cpu_setup = __setup_cpu_440gx,
1751 .machine_check = machine_check_440A,
80f15dc7 1752 .platform = "ppc440",
1da177e4 1753 },
9149fb3b
ES
1754 { /* 440GX Rev. F */
1755 .pvr_mask = 0xf0000fff,
1756 .pvr_value = 0x50000894,
1757 .cpu_name = "440GX Rev. F",
10b35d99 1758 .cpu_features = CPU_FTRS_44X,
80f15dc7 1759 .cpu_user_features = COMMON_USER_BOOKE,
7c03d653 1760 .mmu_features = MMU_FTR_TYPE_44x,
9149fb3b
ES
1761 .icache_bsize = 32,
1762 .dcache_bsize = 32,
47c0bd1a
BH
1763 .cpu_setup = __setup_cpu_440gx,
1764 .machine_check = machine_check_440A,
80f15dc7 1765 .platform = "ppc440",
9149fb3b 1766 },
656de7e4 1767 { /* 440SP Rev. A */
333e6154
RD
1768 .pvr_mask = 0xfff00fff,
1769 .pvr_value = 0x53200891,
656de7e4 1770 .cpu_name = "440SP Rev. A",
10b35d99 1771 .cpu_features = CPU_FTRS_44X,
80f15dc7 1772 .cpu_user_features = COMMON_USER_BOOKE,
7c03d653 1773 .mmu_features = MMU_FTR_TYPE_44x,
656de7e4
MP
1774 .icache_bsize = 32,
1775 .dcache_bsize = 32,
47c0bd1a 1776 .machine_check = machine_check_4xx,
80f15dc7 1777 .platform = "ppc440",
656de7e4 1778 },
b0f7b8bc 1779 { /* 440SPe Rev. A */
333e6154
RD
1780 .pvr_mask = 0xfff00fff,
1781 .pvr_value = 0x53400890,
1782 .cpu_name = "440SPe Rev. A",
1783 .cpu_features = CPU_FTRS_44X,
1784 .cpu_user_features = COMMON_USER_BOOKE,
7c03d653 1785 .mmu_features = MMU_FTR_TYPE_44x,
333e6154
RD
1786 .icache_bsize = 32,
1787 .dcache_bsize = 32,
47c0bd1a
BH
1788 .cpu_setup = __setup_cpu_440spe,
1789 .machine_check = machine_check_440A,
333e6154
RD
1790 .platform = "ppc440",
1791 },
1792 { /* 440SPe Rev. B */
1793 .pvr_mask = 0xfff00fff,
1794 .pvr_value = 0x53400891,
1795 .cpu_name = "440SPe Rev. B",
a147c585 1796 .cpu_features = CPU_FTRS_44X,
80f15dc7 1797 .cpu_user_features = COMMON_USER_BOOKE,
7c03d653 1798 .mmu_features = MMU_FTR_TYPE_44x,
b0f7b8bc
RD
1799 .icache_bsize = 32,
1800 .dcache_bsize = 32,
47c0bd1a
BH
1801 .cpu_setup = __setup_cpu_440spe,
1802 .machine_check = machine_check_440A,
80f15dc7 1803 .platform = "ppc440",
b0f7b8bc 1804 },
23e7237e
JL
1805 { /* 440 in Xilinx Virtex-5 FXT */
1806 .pvr_mask = 0xfffffff0,
1807 .pvr_value = 0x7ff21910,
1808 .cpu_name = "440 in Virtex-5 FXT",
1809 .cpu_features = CPU_FTRS_44X,
1810 .cpu_user_features = COMMON_USER_BOOKE,
7c03d653 1811 .mmu_features = MMU_FTR_TYPE_44x,
23e7237e
JL
1812 .icache_bsize = 32,
1813 .dcache_bsize = 32,
640d17d6
GL
1814 .cpu_setup = __setup_cpu_440x5,
1815 .machine_check = machine_check_440A,
23e7237e
JL
1816 .platform = "ppc440",
1817 },
464076a4 1818 { /* 460EX */
20d70345 1819 .pvr_mask = 0xffff0006,
464076a4
SR
1820 .pvr_value = 0x13020002,
1821 .cpu_name = "460EX",
6d2170be 1822 .cpu_features = CPU_FTRS_440x6,
464076a4 1823 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
7c03d653 1824 .mmu_features = MMU_FTR_TYPE_44x,
464076a4
SR
1825 .icache_bsize = 32,
1826 .dcache_bsize = 32,
1827 .cpu_setup = __setup_cpu_460ex,
1828 .machine_check = machine_check_440A,
1829 .platform = "ppc440",
1830 },
20d70345
SR
1831 { /* 460EX Rev B */
1832 .pvr_mask = 0xffff0007,
1833 .pvr_value = 0x13020004,
1834 .cpu_name = "460EX Rev. B",
1835 .cpu_features = CPU_FTRS_440x6,
1836 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1837 .mmu_features = MMU_FTR_TYPE_44x,
1838 .icache_bsize = 32,
1839 .dcache_bsize = 32,
1840 .cpu_setup = __setup_cpu_460ex,
1841 .machine_check = machine_check_440A,
1842 .platform = "ppc440",
1843 },
464076a4 1844 { /* 460GT */
20d70345 1845 .pvr_mask = 0xffff0006,
464076a4
SR
1846 .pvr_value = 0x13020000,
1847 .cpu_name = "460GT",
6d2170be 1848 .cpu_features = CPU_FTRS_440x6,
939e622c 1849 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
7c03d653 1850 .mmu_features = MMU_FTR_TYPE_44x,
464076a4
SR
1851 .icache_bsize = 32,
1852 .dcache_bsize = 32,
939e622c 1853 .cpu_setup = __setup_cpu_460gt,
464076a4
SR
1854 .machine_check = machine_check_440A,
1855 .platform = "ppc440",
1856 },
20d70345
SR
1857 { /* 460GT Rev B */
1858 .pvr_mask = 0xffff0007,
1859 .pvr_value = 0x13020005,
1860 .cpu_name = "460GT Rev. B",
1861 .cpu_features = CPU_FTRS_440x6,
1862 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1863 .mmu_features = MMU_FTR_TYPE_44x,
1864 .icache_bsize = 32,
1865 .dcache_bsize = 32,
1866 .cpu_setup = __setup_cpu_460gt,
1867 .machine_check = machine_check_440A,
1868 .platform = "ppc440",
1869 },
6c712090
MM
1870 { /* 460SX */
1871 .pvr_mask = 0xffffff00,
1872 .pvr_value = 0x13541800,
1873 .cpu_name = "460SX",
1874 .cpu_features = CPU_FTRS_44X,
1875 .cpu_user_features = COMMON_USER_BOOKE,
1876 .mmu_features = MMU_FTR_TYPE_44x,
1877 .icache_bsize = 32,
1878 .dcache_bsize = 32,
1879 .cpu_setup = __setup_cpu_460sx,
1880 .machine_check = machine_check_440A,
1881 .platform = "ppc440",
1882 },
6edc323d 1883 { /* 464 in APM821xx */
7c801160 1884 .pvr_mask = 0xfffffff0,
6edc323d
TM
1885 .pvr_value = 0x12C41C80,
1886 .cpu_name = "APM821XX",
1887 .cpu_features = CPU_FTRS_44X,
1888 .cpu_user_features = COMMON_USER_BOOKE |
1889 PPC_FEATURE_HAS_FPU,
1890 .mmu_features = MMU_FTR_TYPE_44x,
1891 .icache_bsize = 32,
1892 .dcache_bsize = 32,
1893 .cpu_setup = __setup_cpu_apm821xx,
1894 .machine_check = machine_check_440A,
1895 .platform = "ppc440",
1896 },
13fef7f9 1897#ifdef CONFIG_PPC_47x
c48d0dba
DK
1898 { /* 476 DD2 core */
1899 .pvr_mask = 0xffffffff,
1900 .pvr_value = 0x11a52080,
e7f75ad0 1901 .cpu_name = "476",
c48d0dba 1902 .cpu_features = CPU_FTRS_47X | CPU_FTR_476_DD2,
e7f75ad0 1903 .cpu_user_features = COMMON_USER_BOOKE |
df777bd3
TB
1904 PPC_FEATURE_HAS_FPU,
1905 .mmu_features = MMU_FTR_TYPE_47x |
1906 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1907 .icache_bsize = 32,
1908 .dcache_bsize = 128,
1909 .machine_check = machine_check_47x,
1910 .platform = "ppc470",
1911 },
1912 { /* 476fpe */
1913 .pvr_mask = 0xffff0000,
1914 .pvr_value = 0x7ff50000,
1915 .cpu_name = "476fpe",
1916 .cpu_features = CPU_FTRS_47X | CPU_FTR_476_DD2,
1917 .cpu_user_features = COMMON_USER_BOOKE |
e7f75ad0
DK
1918 PPC_FEATURE_HAS_FPU,
1919 .mmu_features = MMU_FTR_TYPE_47x |
1920 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
b4e8c8dd
TS
1921 .icache_bsize = 32,
1922 .dcache_bsize = 128,
1923 .machine_check = machine_check_47x,
1924 .platform = "ppc470",
1925 },
1926 { /* 476 iss */
1927 .pvr_mask = 0xffff0000,
1928 .pvr_value = 0x00050000,
1929 .cpu_name = "476",
1930 .cpu_features = CPU_FTRS_47X,
1931 .cpu_user_features = COMMON_USER_BOOKE |
1932 PPC_FEATURE_HAS_FPU,
b4e8c8dd
TS
1933 .mmu_features = MMU_FTR_TYPE_47x |
1934 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
e7f75ad0
DK
1935 .icache_bsize = 32,
1936 .dcache_bsize = 128,
fc5e7097 1937 .machine_check = machine_check_47x,
e7f75ad0
DK
1938 .platform = "ppc470",
1939 },
c48d0dba
DK
1940 { /* 476 others */
1941 .pvr_mask = 0xffff0000,
1942 .pvr_value = 0x11a50000,
1943 .cpu_name = "476",
1944 .cpu_features = CPU_FTRS_47X,
1945 .cpu_user_features = COMMON_USER_BOOKE |
1946 PPC_FEATURE_HAS_FPU,
1947 .mmu_features = MMU_FTR_TYPE_47x |
1948 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1949 .icache_bsize = 32,
1950 .dcache_bsize = 128,
1951 .machine_check = machine_check_47x,
1952 .platform = "ppc470",
1953 },
13fef7f9 1954#endif /* CONFIG_PPC_47x */
76bc080e
BH
1955 { /* default match */
1956 .pvr_mask = 0x00000000,
1957 .pvr_value = 0x00000000,
1958 .cpu_name = "(generic 44x PPC)",
1959 .cpu_features = CPU_FTRS_44X,
1960 .cpu_user_features = COMMON_USER_BOOKE,
7c03d653 1961 .mmu_features = MMU_FTR_TYPE_44x,
76bc080e
BH
1962 .icache_bsize = 32,
1963 .dcache_bsize = 32,
1964 .machine_check = machine_check_4xx,
1965 .platform = "ppc440",
1966 }
1da177e4 1967#endif /* CONFIG_44x */
e3e414bc 1968#ifdef CONFIG_E200
4920960f 1969 { /* e200z5 */
33d9e9b5
KG
1970 .pvr_mask = 0xfff00000,
1971 .pvr_value = 0x81000000,
1972 .cpu_name = "e200z5",
1973 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
10b35d99 1974 .cpu_features = CPU_FTRS_E200,
80f15dc7
PM
1975 .cpu_user_features = COMMON_USER_BOOKE |
1976 PPC_FEATURE_HAS_EFP_SINGLE |
33d9e9b5 1977 PPC_FEATURE_UNIFIED_CACHE,
7c03d653 1978 .mmu_features = MMU_FTR_TYPE_FSL_E,
33d9e9b5 1979 .dcache_bsize = 32,
47c0bd1a 1980 .machine_check = machine_check_e200,
80f15dc7 1981 .platform = "ppc5554",
33d9e9b5 1982 },
4920960f 1983 { /* e200z6 */
33d9e9b5
KG
1984 .pvr_mask = 0xfff00000,
1985 .pvr_value = 0x81100000,
1986 .cpu_name = "e200z6",
1987 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
10b35d99 1988 .cpu_features = CPU_FTRS_E200,
80f15dc7 1989 .cpu_user_features = COMMON_USER_BOOKE |
5e14d21e
KG
1990 PPC_FEATURE_HAS_SPE_COMP |
1991 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
33d9e9b5 1992 PPC_FEATURE_UNIFIED_CACHE,
7c03d653 1993 .mmu_features = MMU_FTR_TYPE_FSL_E,
33d9e9b5 1994 .dcache_bsize = 32,
47c0bd1a 1995 .machine_check = machine_check_e200,
80f15dc7 1996 .platform = "ppc5554",
33d9e9b5 1997 },
76bc080e
BH
1998 { /* default match */
1999 .pvr_mask = 0x00000000,
2000 .pvr_value = 0x00000000,
2001 .cpu_name = "(generic E200 PPC)",
2002 .cpu_features = CPU_FTRS_E200,
2003 .cpu_user_features = COMMON_USER_BOOKE |
2004 PPC_FEATURE_HAS_EFP_SINGLE |
2005 PPC_FEATURE_UNIFIED_CACHE,
7c03d653 2006 .mmu_features = MMU_FTR_TYPE_FSL_E,
76bc080e 2007 .dcache_bsize = 32,
105c31df 2008 .cpu_setup = __setup_cpu_e200,
76bc080e
BH
2009 .machine_check = machine_check_e200,
2010 .platform = "ppc5554",
516c8be3 2011 }
76bc080e 2012#endif /* CONFIG_E200 */
4490c06b 2013#endif /* CONFIG_PPC32 */
76bc080e 2014#ifdef CONFIG_E500
4490c06b 2015#ifdef CONFIG_PPC32
3477e71d 2016#ifndef CONFIG_PPC_E500MC
4920960f 2017 { /* e500 */
1da177e4
LT
2018 .pvr_mask = 0xffff0000,
2019 .pvr_value = 0x80200000,
2020 .cpu_name = "e500",
10b35d99 2021 .cpu_features = CPU_FTRS_E500,
80f15dc7 2022 .cpu_user_features = COMMON_USER_BOOKE |
5e14d21e
KG
2023 PPC_FEATURE_HAS_SPE_COMP |
2024 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
6c1bf482 2025 .cpu_user_features2 = PPC_FEATURE2_ISEL,
7c03d653 2026 .mmu_features = MMU_FTR_TYPE_FSL_E,
1da177e4
LT
2027 .icache_bsize = 32,
2028 .dcache_bsize = 32,
2029 .num_pmcs = 4,
555d97ac 2030 .oprofile_cpu_type = "ppc/e500",
39aef685 2031 .oprofile_type = PPC_OPROFILE_FSL_EMB,
105c31df 2032 .cpu_setup = __setup_cpu_e500v1,
47c0bd1a 2033 .machine_check = machine_check_e500,
80f15dc7 2034 .platform = "ppc8540",
1da177e4 2035 },
4920960f 2036 { /* e500v2 */
5b37b700
KG
2037 .pvr_mask = 0xffff0000,
2038 .pvr_value = 0x80210000,
2039 .cpu_name = "e500v2",
10b35d99 2040 .cpu_features = CPU_FTRS_E500_2,
80f15dc7 2041 .cpu_user_features = COMMON_USER_BOOKE |
5e14d21e
KG
2042 PPC_FEATURE_HAS_SPE_COMP |
2043 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
2044 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
6c1bf482 2045 .cpu_user_features2 = PPC_FEATURE2_ISEL,
7c03d653 2046 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS,
5b37b700
KG
2047 .icache_bsize = 32,
2048 .dcache_bsize = 32,
2049 .num_pmcs = 4,
555d97ac 2050 .oprofile_cpu_type = "ppc/e500",
39aef685 2051 .oprofile_type = PPC_OPROFILE_FSL_EMB,
105c31df 2052 .cpu_setup = __setup_cpu_e500v2,
47c0bd1a 2053 .machine_check = machine_check_e500,
80f15dc7 2054 .platform = "ppc8548",
e7affb1d 2055 .cpu_down_flush = cpu_down_flush_e500v2,
5b37b700 2056 },
3477e71d 2057#else
3dfa8773
KG
2058 { /* e500mc */
2059 .pvr_mask = 0xffff0000,
2060 .pvr_value = 0x80230000,
2061 .cpu_name = "e500mc",
3dfa8773
KG
2062 .cpu_features = CPU_FTRS_E500MC,
2063 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
6c1bf482 2064 .cpu_user_features2 = PPC_FEATURE2_ISEL,
c3071951 2065 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
323d23ae 2066 MMU_FTR_USE_TLBILX,
3dfa8773
KG
2067 .icache_bsize = 64,
2068 .dcache_bsize = 64,
2069 .num_pmcs = 4,
a1110654 2070 .oprofile_cpu_type = "ppc/e500mc",
3dfa8773 2071 .oprofile_type = PPC_OPROFILE_FSL_EMB,
105c31df 2072 .cpu_setup = __setup_cpu_e500mc,
fe04b112 2073 .machine_check = machine_check_e500mc,
3dfa8773 2074 .platform = "ppce500mc",
e7affb1d 2075 .cpu_down_flush = cpu_down_flush_e500mc,
3dfa8773 2076 },
3477e71d 2077#endif /* CONFIG_PPC_E500MC */
4490c06b 2078#endif /* CONFIG_PPC32 */
3477e71d 2079#ifdef CONFIG_PPC_E500MC
4490c06b
KG
2080 { /* e5500 */
2081 .pvr_mask = 0xffff0000,
2082 .pvr_value = 0x80240000,
2083 .cpu_name = "e5500",
11ed0db9 2084 .cpu_features = CPU_FTRS_E5500,
fb9be234 2085 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
6c1bf482 2086 .cpu_user_features2 = PPC_FEATURE2_ISEL,
4490c06b
KG
2087 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
2088 MMU_FTR_USE_TLBILX,
2089 .icache_bsize = 64,
2090 .dcache_bsize = 64,
2091 .num_pmcs = 4,
2092 .oprofile_cpu_type = "ppc/e500mc",
2093 .oprofile_type = PPC_OPROFILE_FSL_EMB,
2094 .cpu_setup = __setup_cpu_e5500,
2c71b0cc 2095#ifndef CONFIG_PPC32
4490c06b 2096 .cpu_restore = __restore_cpu_e5500,
2c71b0cc 2097#endif
4490c06b
KG
2098 .machine_check = machine_check_e500mc,
2099 .platform = "ppce5500",
e7affb1d 2100 .cpu_down_flush = cpu_down_flush_e5500,
4490c06b 2101 },
10241842
KG
2102 { /* e6500 */
2103 .pvr_mask = 0xffff0000,
2104 .pvr_value = 0x80400000,
2105 .cpu_name = "e6500",
2106 .cpu_features = CPU_FTRS_E6500,
cd66cc2e
KG
2107 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU |
2108 PPC_FEATURE_HAS_ALTIVEC_COMP,
6c1bf482 2109 .cpu_user_features2 = PPC_FEATURE2_ISEL,
10241842
KG
2110 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
2111 MMU_FTR_USE_TLBILX,
2112 .icache_bsize = 64,
2113 .dcache_bsize = 64,
5815c434 2114 .num_pmcs = 6,
10241842
KG
2115 .oprofile_cpu_type = "ppc/e6500",
2116 .oprofile_type = PPC_OPROFILE_FSL_EMB,
cd66cc2e 2117 .cpu_setup = __setup_cpu_e6500,
2c71b0cc 2118#ifndef CONFIG_PPC32
cd66cc2e 2119 .cpu_restore = __restore_cpu_e6500,
2c71b0cc 2120#endif
10241842
KG
2121 .machine_check = machine_check_e500mc,
2122 .platform = "ppce6500",
e7affb1d 2123 .cpu_down_flush = cpu_down_flush_e6500,
10241842 2124 },
3477e71d 2125#endif /* CONFIG_PPC_E500MC */
4490c06b 2126#ifdef CONFIG_PPC32
1da177e4
LT
2127 { /* default match */
2128 .pvr_mask = 0x00000000,
2129 .pvr_value = 0x00000000,
76bc080e
BH
2130 .cpu_name = "(generic E500 PPC)",
2131 .cpu_features = CPU_FTRS_E500,
2132 .cpu_user_features = COMMON_USER_BOOKE |
2133 PPC_FEATURE_HAS_SPE_COMP |
2134 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
7c03d653 2135 .mmu_features = MMU_FTR_TYPE_FSL_E,
1da177e4
LT
2136 .icache_bsize = 32,
2137 .dcache_bsize = 32,
76bc080e 2138 .machine_check = machine_check_e500,
80f15dc7 2139 .platform = "powerpc",
516c8be3 2140 }
4920960f 2141#endif /* CONFIG_PPC32 */
4490c06b 2142#endif /* CONFIG_E500 */
1da177e4 2143};
42c4aaad 2144
5a61ef74
NP
2145void __init set_cur_cpu_spec(struct cpu_spec *s)
2146{
2147 struct cpu_spec *t = &the_cpu_spec;
2148
2149 t = PTRRELOC(t);
2150 *t = *s;
2151
2152 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
2153}
87a72f9e 2154
26ee9767
SW
2155static struct cpu_spec * __init setup_cpu_spec(unsigned long offset,
2156 struct cpu_spec *s)
42c4aaad 2157{
87a72f9e 2158 struct cpu_spec *t = &the_cpu_spec;
2657dd4e
ME
2159 struct cpu_spec old;
2160
87a72f9e 2161 t = PTRRELOC(t);
2657dd4e
ME
2162 old = *t;
2163
2164 /* Copy everything, then do fixups */
2165 *t = *s;
42c4aaad 2166
666435bb
ME
2167 /*
2168 * If we are overriding a previous value derived from the real
2169 * PVR with a new value obtained using a logical PVR value,
2170 * don't modify the performance monitor fields.
2171 */
2657dd4e
ME
2172 if (old.num_pmcs && !s->num_pmcs) {
2173 t->num_pmcs = old.num_pmcs;
2174 t->pmc_type = old.pmc_type;
2175 t->oprofile_type = old.oprofile_type;
2176 t->oprofile_mmcra_sihv = old.oprofile_mmcra_sihv;
2177 t->oprofile_mmcra_sipr = old.oprofile_mmcra_sipr;
2178 t->oprofile_mmcra_clear = old.oprofile_mmcra_clear;
2179
666435bb
ME
2180 /*
2181 * If we have passed through this logic once before and
2182 * have pulled the default case because the real PVR was
2183 * not found inside cpu_specs[], then we are possibly
2184 * running in compatibility mode. In that case, let the
2185 * oprofiler know which set of compatibility counters to
2186 * pull from by making sure the oprofile_cpu_type string
2187 * is set to that of compatibility mode. If the
2188 * oprofile_cpu_type already has a value, then we are
2189 * possibly overriding a real PVR with a logical one,
2190 * and, in that case, keep the current value for
2191 * oprofile_cpu_type.
2192 */
b173f03d 2193 if (old.oprofile_cpu_type != NULL) {
0203d6ec
BH
2194 t->oprofile_cpu_type = old.oprofile_cpu_type;
2195 t->oprofile_type = old.oprofile_type;
79af6c49 2196 }
2657dd4e 2197 }
666435bb
ME
2198
2199 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
9115d134 2200
666435bb
ME
2201 /*
2202 * Set the base platform string once; assumes
2203 * we're called with real pvr first.
2204 */
2205 if (*PTRRELOC(&powerpc_base_platform) == NULL)
2206 *PTRRELOC(&powerpc_base_platform) = t->platform;
9115d134 2207
84e3ad5b 2208#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
666435bb
ME
2209 /* ppc64 and booke expect identify_cpu to also call setup_cpu for
2210 * that processor. I will consolidate that at a later time, for now,
2211 * just use #ifdef. We also don't need to PTRRELOC the function
2212 * pointer on ppc64 and booke as we are running at 0 in real mode
2213 * on ppc64 and reloc_offset is always 0 on booke.
2214 */
af9eef3c
BH
2215 if (t->cpu_setup) {
2216 t->cpu_setup(offset, t);
666435bb 2217 }
84e3ad5b 2218#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
26ee9767
SW
2219
2220 return t;
666435bb
ME
2221}
2222
2223struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
2224{
2225 struct cpu_spec *s = cpu_specs;
2226 int i;
2227
2228 s = PTRRELOC(s);
2229
2230 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) {
26ee9767
SW
2231 if ((pvr & s->pvr_mask) == s->pvr_value)
2232 return setup_cpu_spec(offset, s);
666435bb
ME
2233 }
2234
42c4aaad 2235 BUG();
666435bb 2236
42c4aaad
BH
2237 return NULL;
2238}
4db73271 2239
5a61ef74
NP
2240/*
2241 * Used by cpufeatures to get the name for CPUs with a PVR table.
2242 * If they don't hae a PVR table, cpufeatures gets the name from
2243 * cpu device-tree node.
2244 */
2245void __init identify_cpu_name(unsigned int pvr)
2246{
2247 struct cpu_spec *s = cpu_specs;
2248 struct cpu_spec *t = &the_cpu_spec;
2249 int i;
2250
2251 s = PTRRELOC(s);
2252 t = PTRRELOC(t);
2253
2254 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) {
2255 if ((pvr & s->pvr_mask) == s->pvr_value) {
2256 t->cpu_name = s->cpu_name;
2257 return;
2258 }
2259 }
2260}
2261
2262
4db73271
KH
2263#ifdef CONFIG_JUMP_LABEL_FEATURE_CHECKS
2264struct static_key_true cpu_feature_keys[NUM_CPU_FTR_KEYS] = {
2265 [0 ... NUM_CPU_FTR_KEYS - 1] = STATIC_KEY_TRUE_INIT
2266};
2267EXPORT_SYMBOL_GPL(cpu_feature_keys);
2268
2269void __init cpu_feature_keys_init(void)
2270{
2271 int i;
2272
2273 for (i = 0; i < NUM_CPU_FTR_KEYS; i++) {
2274 unsigned long f = 1ul << i;
2275
2276 if (!(cur_cpu_spec->cpu_features & f))
2277 static_branch_disable(&cpu_feature_keys[i]);
2278 }
2279}
c12e6f24
KH
2280
2281struct static_key_true mmu_feature_keys[NUM_MMU_FTR_KEYS] = {
2282 [0 ... NUM_MMU_FTR_KEYS - 1] = STATIC_KEY_TRUE_INIT
2283};
2284EXPORT_SYMBOL_GPL(mmu_feature_keys);
2285
2286void __init mmu_feature_keys_init(void)
2287{
2288 int i;
2289
2290 for (i = 0; i < NUM_MMU_FTR_KEYS; i++) {
2291 unsigned long f = 1ul << i;
2292
2293 if (!(cur_cpu_spec->mmu_features & f))
2294 static_branch_disable(&mmu_feature_keys[i]);
2295 }
2296}
4db73271 2297#endif