cputable.c 63.0 KB
Newer Older
L
Linus Torvalds 已提交
1 2 3
/*
 *  Copyright (C) 2001 Ben. Herrenschmidt (benh@kernel.crashing.org)
 *
S
Stephen Rothwell 已提交
4 5 6
 *  Modifications for ppc64:
 *      Copyright (C) 2003 Dave Engebretsen <engebret@us.ibm.com>
 *
L
Linus Torvalds 已提交
7 8 9 10 11 12 13 14 15 16
 *  This program is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU General Public License
 *  as published by the Free Software Foundation; either version
 *  2 of the License, or (at your option) any later version.
 */

#include <linux/string.h>
#include <linux/sched.h>
#include <linux/threads.h>
#include <linux/init.h>
17 18 19
#include <linux/module.h>

#include <asm/oprofile_impl.h>
L
Linus Torvalds 已提交
20
#include <asm/cputable.h>
21
#include <asm/prom.h>		/* for PTRRELOC on ARCH=ppc */
22
#include <asm/mmu.h>
L
Linus Torvalds 已提交
23

24
struct cpu_spec* cur_cpu_spec = NULL;
S
Stephen Rothwell 已提交
25
EXPORT_SYMBOL(cur_cpu_spec);
L
Linus Torvalds 已提交
26

27 28 29
/* The platform string corresponding to the real PVR */
const char *powerpc_base_platform;

S
Stephen Rothwell 已提交
30 31 32 33 34 35 36
/* NOTE:
 * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's
 * the responsibility of the appropriate CPU save/restore functions to
 * eventually copy these settings over. Those save/restore aren't yet
 * part of the cputable though. That has to be fixed for both ppc32
 * and ppc64
 */
37
#ifdef CONFIG_PPC32
38 39 40 41
extern void __setup_cpu_e200(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_e500v1(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_e500v2(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_e500mc(unsigned long offset, struct cpu_spec* spec);
42 43
extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
44
extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
45
extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
46
extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
47
extern void __setup_cpu_440x5(unsigned long offset, struct cpu_spec* spec);
48
extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec);
49
extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec);
50
extern void __setup_cpu_460sx(unsigned long offset, struct cpu_spec *spec);
51
extern void __setup_cpu_apm821xx(unsigned long offset, struct cpu_spec *spec);
52 53 54 55 56 57 58 59
extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
S
Stephen Rothwell 已提交
60
#endif /* CONFIG_PPC32 */
O
Olof Johansson 已提交
61
#ifdef CONFIG_PPC64
62
extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
63
extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
O
Olof Johansson 已提交
64
extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
S
Stephen Rothwell 已提交
65
extern void __restore_cpu_pa6t(void);
O
Olof Johansson 已提交
66
extern void __restore_cpu_ppc970(void);
67 68
extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec);
extern void __restore_cpu_power7(void);
O
Olof Johansson 已提交
69
#endif /* CONFIG_PPC64 */
70 71 72 73
#if defined(CONFIG_E500)
extern void __setup_cpu_e5500(unsigned long offset, struct cpu_spec* spec);
extern void __restore_cpu_e5500(void);
#endif /* CONFIG_E500 */
L
Linus Torvalds 已提交
74 75 76 77

/* This table only contains "desktop" CPUs, it need to be filled with embedded
 * ones as well...
 */
S
Stephen Rothwell 已提交
78 79 80
#define COMMON_USER		(PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
				 PPC_FEATURE_HAS_MMU)
#define COMMON_USER_PPC64	(COMMON_USER | PPC_FEATURE_64)
81
#define COMMON_USER_POWER4	(COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
82 83 84 85
#define COMMON_USER_POWER5	(COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
				 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
#define COMMON_USER_POWER5_PLUS	(COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
				 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
86
#define COMMON_USER_POWER6	(COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
87
				 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
88 89
				 PPC_FEATURE_TRUE_LE | \
				 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
90 91
#define COMMON_USER_POWER7	(COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
				 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
92 93
				 PPC_FEATURE_TRUE_LE | \
				 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
94 95 96
#define COMMON_USER_PA6T	(COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
				 PPC_FEATURE_TRUE_LE | \
				 PPC_FEATURE_HAS_ALTIVEC_COMP)
97 98 99
#ifdef CONFIG_PPC_BOOK3E_64
#define COMMON_USER_BOOKE	(COMMON_USER_PPC64 | PPC_FEATURE_BOOKE)
#else
100 101
#define COMMON_USER_BOOKE	(PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
				 PPC_FEATURE_BOOKE)
102
#endif
L
Linus Torvalds 已提交
103

104
static struct cpu_spec __initdata cpu_specs[] = {
105
#ifdef CONFIG_PPC_BOOK3S_64
S
Stephen Rothwell 已提交
106 107 108 109 110
	{	/* Power3 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00400000,
		.cpu_name		= "POWER3 (630)",
		.cpu_features		= CPU_FTRS_POWER3,
111
		.cpu_user_features	= COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
112
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
113 114 115
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
116
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
117
		.oprofile_cpu_type	= "ppc64/power3",
118
		.oprofile_type		= PPC_OPROFILE_RS64,
119
		.machine_check		= machine_check_generic,
120
		.platform		= "power3",
S
Stephen Rothwell 已提交
121 122 123 124 125 126
	},
	{	/* Power3+ */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00410000,
		.cpu_name		= "POWER3 (630+)",
		.cpu_features		= CPU_FTRS_POWER3,
127
		.cpu_user_features	= COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
128
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
129 130 131
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
132
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
133
		.oprofile_cpu_type	= "ppc64/power3",
134
		.oprofile_type		= PPC_OPROFILE_RS64,
135
		.machine_check		= machine_check_generic,
136
		.platform		= "power3",
S
Stephen Rothwell 已提交
137 138 139 140 141 142 143
	},
	{	/* Northstar */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00330000,
		.cpu_name		= "RS64-II (northstar)",
		.cpu_features		= CPU_FTRS_RS64,
		.cpu_user_features	= COMMON_USER_PPC64,
144
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
145 146 147
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
148
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
149
		.oprofile_cpu_type	= "ppc64/rs64",
150
		.oprofile_type		= PPC_OPROFILE_RS64,
151
		.machine_check		= machine_check_generic,
152
		.platform		= "rs64",
S
Stephen Rothwell 已提交
153 154 155 156 157 158 159
	},
	{	/* Pulsar */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00340000,
		.cpu_name		= "RS64-III (pulsar)",
		.cpu_features		= CPU_FTRS_RS64,
		.cpu_user_features	= COMMON_USER_PPC64,
160
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
161 162 163
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
164
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
165
		.oprofile_cpu_type	= "ppc64/rs64",
166
		.oprofile_type		= PPC_OPROFILE_RS64,
167
		.machine_check		= machine_check_generic,
168
		.platform		= "rs64",
S
Stephen Rothwell 已提交
169 170 171 172 173 174 175
	},
	{	/* I-star */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00360000,
		.cpu_name		= "RS64-III (icestar)",
		.cpu_features		= CPU_FTRS_RS64,
		.cpu_user_features	= COMMON_USER_PPC64,
176
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
177 178 179
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
180
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
181
		.oprofile_cpu_type	= "ppc64/rs64",
182
		.oprofile_type		= PPC_OPROFILE_RS64,
183
		.machine_check		= machine_check_generic,
184
		.platform		= "rs64",
S
Stephen Rothwell 已提交
185 186 187 188 189 190 191
	},
	{	/* S-star */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00370000,
		.cpu_name		= "RS64-IV (sstar)",
		.cpu_features		= CPU_FTRS_RS64,
		.cpu_user_features	= COMMON_USER_PPC64,
192
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
193 194 195
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
196
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
197
		.oprofile_cpu_type	= "ppc64/rs64",
198
		.oprofile_type		= PPC_OPROFILE_RS64,
199
		.machine_check		= machine_check_generic,
200
		.platform		= "rs64",
S
Stephen Rothwell 已提交
201 202 203 204 205 206
	},
	{	/* Power4 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00350000,
		.cpu_name		= "POWER4 (gp)",
		.cpu_features		= CPU_FTRS_POWER4,
207
		.cpu_user_features	= COMMON_USER_POWER4,
208
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
209 210 211
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
212
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
213
		.oprofile_cpu_type	= "ppc64/power4",
214
		.oprofile_type		= PPC_OPROFILE_POWER4,
215
		.machine_check		= machine_check_generic,
216
		.platform		= "power4",
S
Stephen Rothwell 已提交
217 218 219 220 221 222
	},
	{	/* Power4+ */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00380000,
		.cpu_name		= "POWER4+ (gq)",
		.cpu_features		= CPU_FTRS_POWER4,
223
		.cpu_user_features	= COMMON_USER_POWER4,
224
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
225 226 227
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
228
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
229
		.oprofile_cpu_type	= "ppc64/power4",
230
		.oprofile_type		= PPC_OPROFILE_POWER4,
231
		.machine_check		= machine_check_generic,
232
		.platform		= "power4",
S
Stephen Rothwell 已提交
233 234 235 236 237 238
	},
	{	/* PPC970 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00390000,
		.cpu_name		= "PPC970",
		.cpu_features		= CPU_FTRS_PPC970,
239
		.cpu_user_features	= COMMON_USER_POWER4 |
S
Stephen Rothwell 已提交
240
			PPC_FEATURE_HAS_ALTIVEC_COMP,
241
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
242 243 244
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
245
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
246
		.cpu_setup		= __setup_cpu_ppc970,
O
Olof Johansson 已提交
247
		.cpu_restore		= __restore_cpu_ppc970,
S
Stephen Rothwell 已提交
248
		.oprofile_cpu_type	= "ppc64/970",
249
		.oprofile_type		= PPC_OPROFILE_POWER4,
250
		.machine_check		= machine_check_generic,
251
		.platform		= "ppc970",
S
Stephen Rothwell 已提交
252 253 254 255 256 257
	},
	{	/* PPC970FX */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x003c0000,
		.cpu_name		= "PPC970FX",
		.cpu_features		= CPU_FTRS_PPC970,
258
		.cpu_user_features	= COMMON_USER_POWER4 |
S
Stephen Rothwell 已提交
259
			PPC_FEATURE_HAS_ALTIVEC_COMP,
260
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
261 262 263
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
264
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
265
		.cpu_setup		= __setup_cpu_ppc970,
O
Olof Johansson 已提交
266
		.cpu_restore		= __restore_cpu_ppc970,
S
Stephen Rothwell 已提交
267
		.oprofile_cpu_type	= "ppc64/970",
268
		.oprofile_type		= PPC_OPROFILE_POWER4,
269
		.machine_check		= machine_check_generic,
270
		.platform		= "ppc970",
271 272 273 274 275 276 277 278
	},
	{	/* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x00440100,
		.cpu_name		= "PPC970MP",
		.cpu_features		= CPU_FTRS_PPC970,
		.cpu_user_features	= COMMON_USER_POWER4 |
			PPC_FEATURE_HAS_ALTIVEC_COMP,
279
		.mmu_features		= MMU_FTR_HPTE_TABLE,
280 281 282
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
283
		.pmc_type		= PPC_PMC_IBM,
284 285 286 287
		.cpu_setup		= __setup_cpu_ppc970,
		.cpu_restore		= __restore_cpu_ppc970,
		.oprofile_cpu_type	= "ppc64/970MP",
		.oprofile_type		= PPC_OPROFILE_POWER4,
288
		.machine_check		= machine_check_generic,
289
		.platform		= "ppc970",
S
Stephen Rothwell 已提交
290 291 292 293 294 295
	},
	{	/* PPC970MP */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00440000,
		.cpu_name		= "PPC970MP",
		.cpu_features		= CPU_FTRS_PPC970,
296
		.cpu_user_features	= COMMON_USER_POWER4 |
S
Stephen Rothwell 已提交
297
			PPC_FEATURE_HAS_ALTIVEC_COMP,
298
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
299 300
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
301
		.num_pmcs		= 8,
302
		.pmc_type		= PPC_PMC_IBM,
303
		.cpu_setup		= __setup_cpu_ppc970MP,
O
Olof Johansson 已提交
304
		.cpu_restore		= __restore_cpu_ppc970,
305
		.oprofile_cpu_type	= "ppc64/970MP",
306
		.oprofile_type		= PPC_OPROFILE_POWER4,
307
		.machine_check		= machine_check_generic,
308
		.platform		= "ppc970",
S
Stephen Rothwell 已提交
309
	},
J
Jake Moilanen 已提交
310 311 312 313 314 315 316
	{	/* PPC970GX */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00450000,
		.cpu_name		= "PPC970GX",
		.cpu_features		= CPU_FTRS_PPC970,
		.cpu_user_features	= COMMON_USER_POWER4 |
			PPC_FEATURE_HAS_ALTIVEC_COMP,
317
		.mmu_features		= MMU_FTR_HPTE_TABLE,
J
Jake Moilanen 已提交
318 319 320
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
321
		.pmc_type		= PPC_PMC_IBM,
J
Jake Moilanen 已提交
322 323 324
		.cpu_setup		= __setup_cpu_ppc970,
		.oprofile_cpu_type	= "ppc64/970",
		.oprofile_type		= PPC_OPROFILE_POWER4,
325
		.machine_check		= machine_check_generic,
J
Jake Moilanen 已提交
326 327
		.platform		= "ppc970",
	},
328
	{	/* Power5 GR */
S
Stephen Rothwell 已提交
329 330 331 332
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x003a0000,
		.cpu_name		= "POWER5 (gr)",
		.cpu_features		= CPU_FTRS_POWER5,
333
		.cpu_user_features	= COMMON_USER_POWER5,
334
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
335 336 337
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 6,
338
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
339
		.oprofile_cpu_type	= "ppc64/power5",
340
		.oprofile_type		= PPC_OPROFILE_POWER4,
341 342 343 344 345
		/* SIHV / SIPR bits are implemented on POWER4+ (GQ)
		 * and above but only works on POWER5 and above
		 */
		.oprofile_mmcra_sihv	= MMCRA_SIHV,
		.oprofile_mmcra_sipr	= MMCRA_SIPR,
346
		.machine_check		= machine_check_generic,
347
		.platform		= "power5",
S
Stephen Rothwell 已提交
348
	},
349 350 351 352 353 354
	{	/* Power5++ */
		.pvr_mask		= 0xffffff00,
		.pvr_value		= 0x003b0300,
		.cpu_name		= "POWER5+ (gs)",
		.cpu_features		= CPU_FTRS_POWER5,
		.cpu_user_features	= COMMON_USER_POWER5_PLUS,
355
		.mmu_features		= MMU_FTR_HPTE_TABLE,
356 357 358 359 360 361 362
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 6,
		.oprofile_cpu_type	= "ppc64/power5++",
		.oprofile_type		= PPC_OPROFILE_POWER4,
		.oprofile_mmcra_sihv	= MMCRA_SIHV,
		.oprofile_mmcra_sipr	= MMCRA_SIPR,
363
		.machine_check		= machine_check_generic,
364 365
		.platform		= "power5+",
	},
366
	{	/* Power5 GS */
S
Stephen Rothwell 已提交
367 368
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x003b0000,
369
		.cpu_name		= "POWER5+ (gs)",
S
Stephen Rothwell 已提交
370
		.cpu_features		= CPU_FTRS_POWER5,
371
		.cpu_user_features	= COMMON_USER_POWER5_PLUS,
372
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
373 374 375
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 6,
376
		.pmc_type		= PPC_PMC_IBM,
377
		.oprofile_cpu_type	= "ppc64/power5+",
378
		.oprofile_type		= PPC_OPROFILE_POWER4,
379 380
		.oprofile_mmcra_sihv	= MMCRA_SIHV,
		.oprofile_mmcra_sipr	= MMCRA_SIPR,
381
		.machine_check		= machine_check_generic,
382
		.platform		= "power5+",
S
Stephen Rothwell 已提交
383
	},
384 385 386 387 388 389
	{	/* POWER6 in P5+ mode; 2.04-compliant processor */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x0f000001,
		.cpu_name		= "POWER5+",
		.cpu_features		= CPU_FTRS_POWER5,
		.cpu_user_features	= COMMON_USER_POWER5_PLUS,
390
		.mmu_features		= MMU_FTR_HPTE_TABLE,
391 392
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
393
		.machine_check		= machine_check_generic,
394 395
		.oprofile_cpu_type	= "ppc64/ibm-compat-v1",
		.oprofile_type		= PPC_OPROFILE_POWER4,
396 397
		.platform		= "power5+",
	},
398 399 400
	{	/* Power6 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x003e0000,
401 402 403 404
		.cpu_name		= "POWER6 (raw)",
		.cpu_features		= CPU_FTRS_POWER6,
		.cpu_user_features	= COMMON_USER_POWER6 |
			PPC_FEATURE_POWER6_EXT,
405
		.mmu_features		= MMU_FTR_HPTE_TABLE,
406 407 408
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 6,
409
		.pmc_type		= PPC_PMC_IBM,
410 411 412 413 414 415
		.oprofile_cpu_type	= "ppc64/power6",
		.oprofile_type		= PPC_OPROFILE_POWER4,
		.oprofile_mmcra_sihv	= POWER6_MMCRA_SIHV,
		.oprofile_mmcra_sipr	= POWER6_MMCRA_SIPR,
		.oprofile_mmcra_clear	= POWER6_MMCRA_THRM |
			POWER6_MMCRA_OTHER,
416
		.machine_check		= machine_check_generic,
417 418 419 420 421 422
		.platform		= "power6x",
	},
	{	/* 2.05-compliant processor, i.e. Power6 "architected" mode */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x0f000002,
		.cpu_name		= "POWER6 (architected)",
423 424
		.cpu_features		= CPU_FTRS_POWER6,
		.cpu_user_features	= COMMON_USER_POWER6,
425
		.mmu_features		= MMU_FTR_HPTE_TABLE,
426 427
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
428
		.machine_check		= machine_check_generic,
429 430
		.oprofile_cpu_type	= "ppc64/ibm-compat-v1",
		.oprofile_type		= PPC_OPROFILE_POWER4,
431 432
		.platform		= "power6",
	},
433 434 435 436 437 438
	{	/* 2.06-compliant processor, i.e. Power7 "architected" mode */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x0f000003,
		.cpu_name		= "POWER7 (architected)",
		.cpu_features		= CPU_FTRS_POWER7,
		.cpu_user_features	= COMMON_USER_POWER7,
439 440
		.mmu_features		= MMU_FTR_HPTE_TABLE |
			MMU_FTR_TLBIE_206,
441 442 443
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.machine_check		= machine_check_generic,
444 445
		.oprofile_type		= PPC_OPROFILE_POWER4,
		.oprofile_cpu_type	= "ppc64/ibm-compat-v1",
446 447
		.platform		= "power7",
	},
448 449 450
	{	/* Power7 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x003f0000,
451
		.cpu_name		= "POWER7 (raw)",
452 453
		.cpu_features		= CPU_FTRS_POWER7,
		.cpu_user_features	= COMMON_USER_POWER7,
454 455
		.mmu_features		= MMU_FTR_HPTE_TABLE |
			MMU_FTR_TLBIE_206,
456 457 458 459 460 461 462 463
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 6,
		.pmc_type		= PPC_PMC_IBM,
		.oprofile_cpu_type	= "ppc64/power7",
		.oprofile_type		= PPC_OPROFILE_POWER4,
		.platform		= "power7",
	},
464
	{	/* Cell Broadband Engine */
S
Stephen Rothwell 已提交
465 466 467 468 469
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00700000,
		.cpu_name		= "Cell Broadband Engine",
		.cpu_features		= CPU_FTRS_CELL,
		.cpu_user_features	= COMMON_USER_PPC64 |
470 471
			PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
			PPC_FEATURE_SMT,
472
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
473 474
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
475
		.num_pmcs		= 4,
476
		.pmc_type		= PPC_PMC_IBM,
477 478
		.oprofile_cpu_type	= "ppc64/cell-be",
		.oprofile_type		= PPC_OPROFILE_CELL,
479
		.machine_check		= machine_check_generic,
480
		.platform		= "ppc-cell-be",
S
Stephen Rothwell 已提交
481
	},
482 483 484 485 486 487
	{	/* PA Semi PA6T */
		.pvr_mask		= 0x7fff0000,
		.pvr_value		= 0x00900000,
		.cpu_name		= "PA6T",
		.cpu_features		= CPU_FTRS_PA6T,
		.cpu_user_features	= COMMON_USER_PA6T,
488
		.mmu_features		= MMU_FTR_HPTE_TABLE,
489 490 491
		.icache_bsize		= 64,
		.dcache_bsize		= 64,
		.num_pmcs		= 6,
492
		.pmc_type		= PPC_PMC_PA6T,
O
Olof Johansson 已提交
493 494
		.cpu_setup		= __setup_cpu_pa6t,
		.cpu_restore		= __restore_cpu_pa6t,
495 496
		.oprofile_cpu_type	= "ppc64/pa6t",
		.oprofile_type		= PPC_OPROFILE_PA6T,
497
		.machine_check		= machine_check_generic,
498 499
		.platform		= "pa6t",
	},
S
Stephen Rothwell 已提交
500 501 502 503 504 505
	{	/* default match */
		.pvr_mask		= 0x00000000,
		.pvr_value		= 0x00000000,
		.cpu_name		= "POWER4 (compatible)",
		.cpu_features		= CPU_FTRS_COMPATIBLE,
		.cpu_user_features	= COMMON_USER_PPC64,
506
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
507 508 509
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 6,
510
		.pmc_type		= PPC_PMC_IBM,
511
		.machine_check		= machine_check_generic,
512
		.platform		= "power4",
S
Stephen Rothwell 已提交
513
	}
514 515
#endif	/* CONFIG_PPC_BOOK3S_64 */

S
Stephen Rothwell 已提交
516
#ifdef CONFIG_PPC32
L
Linus Torvalds 已提交
517
#if CLASSIC_PPC
S
Stephen Rothwell 已提交
518
	{	/* 601 */
L
Linus Torvalds 已提交
519 520 521
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00010000,
		.cpu_name		= "601",
522
		.cpu_features		= CPU_FTRS_PPC601,
S
Stephen Rothwell 已提交
523
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_601_INSTR |
524
			PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
525
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
526 527
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
528
		.machine_check		= machine_check_generic,
529
		.platform		= "ppc601",
L
Linus Torvalds 已提交
530 531 532 533 534
	},
	{	/* 603 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00030000,
		.cpu_name		= "603",
535
		.cpu_features		= CPU_FTRS_603,
536
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
537
		.mmu_features		= 0,
L
Linus Torvalds 已提交
538 539
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
540
		.cpu_setup		= __setup_cpu_603,
541
		.machine_check		= machine_check_generic,
542
		.platform		= "ppc603",
L
Linus Torvalds 已提交
543 544 545 546 547
	},
	{	/* 603e */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00060000,
		.cpu_name		= "603e",
548
		.cpu_features		= CPU_FTRS_603,
549
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
550
		.mmu_features		= 0,
L
Linus Torvalds 已提交
551 552
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
553
		.cpu_setup		= __setup_cpu_603,
554
		.machine_check		= machine_check_generic,
555
		.platform		= "ppc603",
L
Linus Torvalds 已提交
556 557 558 559 560
	},
	{	/* 603ev */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00070000,
		.cpu_name		= "603ev",
561
		.cpu_features		= CPU_FTRS_603,
562
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
563
		.mmu_features		= 0,
L
Linus Torvalds 已提交
564 565
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
566
		.cpu_setup		= __setup_cpu_603,
567
		.machine_check		= machine_check_generic,
568
		.platform		= "ppc603",
L
Linus Torvalds 已提交
569 570 571 572 573
	},
	{	/* 604 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00040000,
		.cpu_name		= "604",
574
		.cpu_features		= CPU_FTRS_604,
575
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
576
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
577 578 579
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 2,
580
		.cpu_setup		= __setup_cpu_604,
581
		.machine_check		= machine_check_generic,
582
		.platform		= "ppc604",
L
Linus Torvalds 已提交
583 584 585 586 587
	},
	{	/* 604e */
		.pvr_mask		= 0xfffff000,
		.pvr_value		= 0x00090000,
		.cpu_name		= "604e",
588
		.cpu_features		= CPU_FTRS_604,
589
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
590
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
591 592 593
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
594
		.cpu_setup		= __setup_cpu_604,
595
		.machine_check		= machine_check_generic,
596
		.platform		= "ppc604",
L
Linus Torvalds 已提交
597 598 599 600 601
	},
	{	/* 604r */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00090000,
		.cpu_name		= "604r",
602
		.cpu_features		= CPU_FTRS_604,
603
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
604
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
605 606 607
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
608
		.cpu_setup		= __setup_cpu_604,
609
		.machine_check		= machine_check_generic,
610
		.platform		= "ppc604",
L
Linus Torvalds 已提交
611 612 613 614 615
	},
	{	/* 604ev */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x000a0000,
		.cpu_name		= "604ev",
616
		.cpu_features		= CPU_FTRS_604,
617
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
618
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
619 620 621
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
622
		.cpu_setup		= __setup_cpu_604,
623
		.machine_check		= machine_check_generic,
624
		.platform		= "ppc604",
L
Linus Torvalds 已提交
625 626 627 628 629
	},
	{	/* 740/750 (0x4202, don't support TAU ?) */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x00084202,
		.cpu_name		= "740/750",
630
		.cpu_features		= CPU_FTRS_740_NOTAU,
631
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
632
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
633 634 635
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
636
		.cpu_setup		= __setup_cpu_750,
637
		.machine_check		= machine_check_generic,
638
		.platform		= "ppc750",
L
Linus Torvalds 已提交
639 640 641 642 643
	},
	{	/* 750CX (80100 and 8010x?) */
		.pvr_mask		= 0xfffffff0,
		.pvr_value		= 0x00080100,
		.cpu_name		= "750CX",
644
		.cpu_features		= CPU_FTRS_750,
645
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
646
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
647 648 649
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
650
		.cpu_setup		= __setup_cpu_750cx,
651
		.machine_check		= machine_check_generic,
652
		.platform		= "ppc750",
L
Linus Torvalds 已提交
653 654 655 656 657
	},
	{	/* 750CX (82201 and 82202) */
		.pvr_mask		= 0xfffffff0,
		.pvr_value		= 0x00082200,
		.cpu_name		= "750CX",
658
		.cpu_features		= CPU_FTRS_750,
659
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
660
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
661 662 663
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
664
		.pmc_type		= PPC_PMC_IBM,
665
		.cpu_setup		= __setup_cpu_750cx,
666
		.machine_check		= machine_check_generic,
667
		.platform		= "ppc750",
L
Linus Torvalds 已提交
668 669 670 671 672
	},
	{	/* 750CXe (82214) */
		.pvr_mask		= 0xfffffff0,
		.pvr_value		= 0x00082210,
		.cpu_name		= "750CXe",
673
		.cpu_features		= CPU_FTRS_750,
674
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
675
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
676 677 678
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
679
		.pmc_type		= PPC_PMC_IBM,
680
		.cpu_setup		= __setup_cpu_750cx,
681
		.machine_check		= machine_check_generic,
682
		.platform		= "ppc750",
L
Linus Torvalds 已提交
683
	},
684 685 686 687
	{	/* 750CXe "Gekko" (83214) */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x00083214,
		.cpu_name		= "750CXe",
688
		.cpu_features		= CPU_FTRS_750,
689
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
690
		.mmu_features		= MMU_FTR_HPTE_TABLE,
691 692 693
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
694
		.pmc_type		= PPC_PMC_IBM,
695
		.cpu_setup		= __setup_cpu_750cx,
696
		.machine_check		= machine_check_generic,
697
		.platform		= "ppc750",
698
	},
699 700 701
	{	/* 750CL (and "Broadway") */
		.pvr_mask		= 0xfffff0e0,
		.pvr_value		= 0x00087000,
J
Jake Moilanen 已提交
702
		.cpu_name		= "750CL",
703
		.cpu_features		= CPU_FTRS_750CL,
J
Jake Moilanen 已提交
704
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
705
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
J
Jake Moilanen 已提交
706 707 708
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
709
		.pmc_type		= PPC_PMC_IBM,
710
		.cpu_setup		= __setup_cpu_750,
711
		.machine_check		= machine_check_generic,
J
Jake Moilanen 已提交
712
		.platform		= "ppc750",
713 714
		.oprofile_cpu_type      = "ppc/750",
		.oprofile_type		= PPC_OPROFILE_G4,
J
Jake Moilanen 已提交
715
	},
716 717 718 719
	{	/* 745/755 */
		.pvr_mask		= 0xfffff000,
		.pvr_value		= 0x00083000,
		.cpu_name		= "745/755",
720
		.cpu_features		= CPU_FTRS_750,
721
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
722
		.mmu_features		= MMU_FTR_HPTE_TABLE,
723 724 725
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
726
		.pmc_type		= PPC_PMC_IBM,
727
		.cpu_setup		= __setup_cpu_750,
728
		.machine_check		= machine_check_generic,
729
		.platform		= "ppc750",
730
	},
L
Linus Torvalds 已提交
731 732 733 734
	{	/* 750FX rev 1.x */
		.pvr_mask		= 0xffffff00,
		.pvr_value		= 0x70000100,
		.cpu_name		= "750FX",
735
		.cpu_features		= CPU_FTRS_750FX1,
736
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
737
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
738 739 740
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
741
		.pmc_type		= PPC_PMC_IBM,
742
		.cpu_setup		= __setup_cpu_750,
743
		.machine_check		= machine_check_generic,
744
		.platform		= "ppc750",
745 746
		.oprofile_cpu_type      = "ppc/750",
		.oprofile_type		= PPC_OPROFILE_G4,
L
Linus Torvalds 已提交
747 748 749 750 751
	},
	{	/* 750FX rev 2.0 must disable HID0[DPM] */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x70000200,
		.cpu_name		= "750FX",
752
		.cpu_features		= CPU_FTRS_750FX2,
753
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
754
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
755 756 757
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
758
		.pmc_type		= PPC_PMC_IBM,
759
		.cpu_setup		= __setup_cpu_750,
760
		.machine_check		= machine_check_generic,
761
		.platform		= "ppc750",
762 763
		.oprofile_cpu_type      = "ppc/750",
		.oprofile_type		= PPC_OPROFILE_G4,
L
Linus Torvalds 已提交
764 765 766 767 768
	},
	{	/* 750FX (All revs except 2.0) */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x70000000,
		.cpu_name		= "750FX",
769
		.cpu_features		= CPU_FTRS_750FX,
770
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
771
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
772 773 774
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
775
		.pmc_type		= PPC_PMC_IBM,
776
		.cpu_setup		= __setup_cpu_750fx,
777
		.machine_check		= machine_check_generic,
778
		.platform		= "ppc750",
779 780
		.oprofile_cpu_type      = "ppc/750",
		.oprofile_type		= PPC_OPROFILE_G4,
L
Linus Torvalds 已提交
781 782 783 784 785
	},
	{	/* 750GX */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x70020000,
		.cpu_name		= "750GX",
786
		.cpu_features		= CPU_FTRS_750GX,
787
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
788
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
789 790 791
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
792
		.pmc_type		= PPC_PMC_IBM,
793
		.cpu_setup		= __setup_cpu_750fx,
794
		.machine_check		= machine_check_generic,
795
		.platform		= "ppc750",
796 797
		.oprofile_cpu_type      = "ppc/750",
		.oprofile_type		= PPC_OPROFILE_G4,
L
Linus Torvalds 已提交
798 799 800 801 802
	},
	{	/* 740/750 (L2CR bit need fixup for 740) */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00080000,
		.cpu_name		= "740/750",
803
		.cpu_features		= CPU_FTRS_740,
804
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
805
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
806 807 808
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
809
		.pmc_type		= PPC_PMC_IBM,
810
		.cpu_setup		= __setup_cpu_750,
811
		.machine_check		= machine_check_generic,
812
		.platform		= "ppc750",
L
Linus Torvalds 已提交
813 814 815 816 817
	},
	{	/* 7400 rev 1.1 ? (no TAU) */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x000c1101,
		.cpu_name		= "7400 (1.1)",
818
		.cpu_features		= CPU_FTRS_7400_NOTAU,
819 820
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
821
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
822 823 824
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
825
		.pmc_type		= PPC_PMC_G4,
826
		.cpu_setup		= __setup_cpu_7400,
827
		.machine_check		= machine_check_generic,
828
		.platform		= "ppc7400",
L
Linus Torvalds 已提交
829 830 831 832 833
	},
	{	/* 7400 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x000c0000,
		.cpu_name		= "7400",
834
		.cpu_features		= CPU_FTRS_7400,
835 836
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
837
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
838 839 840
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
841
		.pmc_type		= PPC_PMC_G4,
842
		.cpu_setup		= __setup_cpu_7400,
843
		.machine_check		= machine_check_generic,
844
		.platform		= "ppc7400",
L
Linus Torvalds 已提交
845 846 847 848 849
	},
	{	/* 7410 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x800c0000,
		.cpu_name		= "7410",
850
		.cpu_features		= CPU_FTRS_7400,
851 852
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
853
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
854 855 856
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
857
		.pmc_type		= PPC_PMC_G4,
858
		.cpu_setup		= __setup_cpu_7410,
859
		.machine_check		= machine_check_generic,
860
		.platform		= "ppc7400",
L
Linus Torvalds 已提交
861 862 863 864 865
	},
	{	/* 7450 2.0 - no doze/nap */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x80000200,
		.cpu_name		= "7450",
866
		.cpu_features		= CPU_FTRS_7450_20,
867 868
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
869
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
870 871 872
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
873
		.pmc_type		= PPC_PMC_G4,
874 875
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
876
		.oprofile_type		= PPC_OPROFILE_G4,
877
		.machine_check		= machine_check_generic,
878
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
879 880 881 882 883
	},
	{	/* 7450 2.1 */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x80000201,
		.cpu_name		= "7450",
884
		.cpu_features		= CPU_FTRS_7450_21,
885 886
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
887
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
888 889 890
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
891
		.pmc_type		= PPC_PMC_G4,
892 893
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
894
		.oprofile_type		= PPC_OPROFILE_G4,
895
		.machine_check		= machine_check_generic,
896
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
897 898 899 900 901
	},
	{	/* 7450 2.3 and newer */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80000000,
		.cpu_name		= "7450",
902
		.cpu_features		= CPU_FTRS_7450_23,
903 904
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
905
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
906 907 908
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
909
		.pmc_type		= PPC_PMC_G4,
910 911
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
912
		.oprofile_type		= PPC_OPROFILE_G4,
913
		.machine_check		= machine_check_generic,
914
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
915 916 917 918 919
	},
	{	/* 7455 rev 1.x */
		.pvr_mask		= 0xffffff00,
		.pvr_value		= 0x80010100,
		.cpu_name		= "7455",
920
		.cpu_features		= CPU_FTRS_7455_1,
921 922
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
923
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
924 925 926
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
927
		.pmc_type		= PPC_PMC_G4,
928 929
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
930
		.oprofile_type		= PPC_OPROFILE_G4,
931
		.machine_check		= machine_check_generic,
932
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
933 934 935 936 937
	},
	{	/* 7455 rev 2.0 */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x80010200,
		.cpu_name		= "7455",
938
		.cpu_features		= CPU_FTRS_7455_20,
939 940
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
941
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
942 943 944
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
945
		.pmc_type		= PPC_PMC_G4,
946 947
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
948
		.oprofile_type		= PPC_OPROFILE_G4,
949
		.machine_check		= machine_check_generic,
950
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
951 952 953 954 955
	},
	{	/* 7455 others */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80010000,
		.cpu_name		= "7455",
956
		.cpu_features		= CPU_FTRS_7455,
957 958
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
959
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
960 961 962
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
963
		.pmc_type		= PPC_PMC_G4,
964 965
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
966
		.oprofile_type		= PPC_OPROFILE_G4,
967
		.machine_check		= machine_check_generic,
968
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
969 970 971 972 973
	},
	{	/* 7447/7457 Rev 1.0 */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x80020100,
		.cpu_name		= "7447/7457",
974
		.cpu_features		= CPU_FTRS_7447_10,
975 976
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
977
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
978 979 980
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
981
		.pmc_type		= PPC_PMC_G4,
982 983
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
984
		.oprofile_type		= PPC_OPROFILE_G4,
985
		.machine_check		= machine_check_generic,
986
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
987 988 989 990 991
	},
	{	/* 7447/7457 Rev 1.1 */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x80020101,
		.cpu_name		= "7447/7457",
992
		.cpu_features		= CPU_FTRS_7447_10,
993 994
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
995
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
996 997 998
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
999
		.pmc_type		= PPC_PMC_G4,
1000 1001
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
1002
		.oprofile_type		= PPC_OPROFILE_G4,
1003
		.machine_check		= machine_check_generic,
1004
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
1005 1006 1007 1008 1009
	},
	{	/* 7447/7457 Rev 1.2 and later */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80020000,
		.cpu_name		= "7447/7457",
1010
		.cpu_features		= CPU_FTRS_7447,
1011
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
1012
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
1013 1014 1015
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
1016
		.pmc_type		= PPC_PMC_G4,
1017 1018
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
1019
		.oprofile_type		= PPC_OPROFILE_G4,
1020
		.machine_check		= machine_check_generic,
1021
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
1022 1023 1024 1025 1026
	},
	{	/* 7447A */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80030000,
		.cpu_name		= "7447A",
1027
		.cpu_features		= CPU_FTRS_7447A,
1028 1029
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
1030
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
1031 1032 1033
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
1034
		.pmc_type		= PPC_PMC_G4,
1035 1036
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
1037
		.oprofile_type		= PPC_OPROFILE_G4,
1038
		.machine_check		= machine_check_generic,
1039
		.platform		= "ppc7450",
1040 1041 1042 1043 1044
	},
	{	/* 7448 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80040000,
		.cpu_name		= "7448",
1045
		.cpu_features		= CPU_FTRS_7448,
1046 1047
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
1048
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
1049 1050 1051
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
1052
		.pmc_type		= PPC_PMC_G4,
1053 1054
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
1055
		.oprofile_type		= PPC_OPROFILE_G4,
1056
		.machine_check		= machine_check_generic,
1057
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
1058 1059 1060 1061 1062
	},
	{	/* 82xx (8240, 8245, 8260 are all 603e cores) */
		.pvr_mask		= 0x7fff0000,
		.pvr_value		= 0x00810000,
		.cpu_name		= "82xx",
1063
		.cpu_features		= CPU_FTRS_82XX,
S
Stephen Rothwell 已提交
1064
		.cpu_user_features	= COMMON_USER,
1065
		.mmu_features		= 0,
L
Linus Torvalds 已提交
1066 1067
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1068
		.cpu_setup		= __setup_cpu_603,
1069
		.machine_check		= machine_check_generic,
1070
		.platform		= "ppc603",
L
Linus Torvalds 已提交
1071 1072 1073 1074 1075
	},
	{	/* All G2_LE (603e core, plus some) have the same pvr */
		.pvr_mask		= 0x7fff0000,
		.pvr_value		= 0x00820000,
		.cpu_name		= "G2_LE",
1076
		.cpu_features		= CPU_FTRS_G2_LE,
S
Stephen Rothwell 已提交
1077
		.cpu_user_features	= COMMON_USER,
1078
		.mmu_features		= MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
1079 1080
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1081
		.cpu_setup		= __setup_cpu_603,
1082
		.machine_check		= machine_check_generic,
1083
		.platform		= "ppc603",
L
Linus Torvalds 已提交
1084
	},
1085
	{	/* e300c1 (a 603e core, plus some) on 83xx */
L
Linus Torvalds 已提交
1086 1087
		.pvr_mask		= 0x7fff0000,
		.pvr_value		= 0x00830000,
1088
		.cpu_name		= "e300c1",
1089
		.cpu_features		= CPU_FTRS_E300,
S
Stephen Rothwell 已提交
1090
		.cpu_user_features	= COMMON_USER,
1091
		.mmu_features		= MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
1092 1093
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1094
		.cpu_setup		= __setup_cpu_603,
1095
		.machine_check		= machine_check_generic,
1096
		.platform		= "ppc603",
L
Linus Torvalds 已提交
1097
	},
1098 1099 1100 1101
	{	/* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
		.pvr_mask		= 0x7fff0000,
		.pvr_value		= 0x00840000,
		.cpu_name		= "e300c2",
1102
		.cpu_features		= CPU_FTRS_E300C2,
1103
		.cpu_user_features	= PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1104 1105
		.mmu_features		= MMU_FTR_USE_HIGH_BATS |
			MMU_FTR_NEED_DTLB_SW_LRU,
1106 1107 1108
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.cpu_setup		= __setup_cpu_603,
1109
		.machine_check		= machine_check_generic,
1110 1111
		.platform		= "ppc603",
	},
L
Li Yang 已提交
1112
	{	/* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
1113 1114 1115 1116 1117
		.pvr_mask		= 0x7fff0000,
		.pvr_value		= 0x00850000,
		.cpu_name		= "e300c3",
		.cpu_features		= CPU_FTRS_E300,
		.cpu_user_features	= COMMON_USER,
1118 1119
		.mmu_features		= MMU_FTR_USE_HIGH_BATS |
			MMU_FTR_NEED_DTLB_SW_LRU,
1120 1121 1122
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.cpu_setup		= __setup_cpu_603,
1123 1124 1125
		.num_pmcs		= 4,
		.oprofile_cpu_type	= "ppc/e300",
		.oprofile_type		= PPC_OPROFILE_FSL_EMB,
1126 1127
		.platform		= "ppc603",
	},
L
Li Yang 已提交
1128 1129 1130 1131 1132 1133
	{	/* e300c4 (e300c1, plus one IU) */
		.pvr_mask		= 0x7fff0000,
		.pvr_value		= 0x00860000,
		.cpu_name		= "e300c4",
		.cpu_features		= CPU_FTRS_E300,
		.cpu_user_features	= COMMON_USER,
1134 1135
		.mmu_features		= MMU_FTR_USE_HIGH_BATS |
			MMU_FTR_NEED_DTLB_SW_LRU,
L
Li Yang 已提交
1136 1137 1138
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.cpu_setup		= __setup_cpu_603,
1139
		.machine_check		= machine_check_generic,
1140 1141 1142
		.num_pmcs		= 4,
		.oprofile_cpu_type	= "ppc/e300",
		.oprofile_type		= PPC_OPROFILE_FSL_EMB,
L
Li Yang 已提交
1143 1144
		.platform		= "ppc603",
	},
L
Linus Torvalds 已提交
1145 1146 1147 1148
	{	/* default match, we assume split I/D cache & TB (non-601)... */
		.pvr_mask		= 0x00000000,
		.pvr_value		= 0x00000000,
		.cpu_name		= "(generic PPC)",
1149
		.cpu_features		= CPU_FTRS_CLASSIC32,
S
Stephen Rothwell 已提交
1150
		.cpu_user_features	= COMMON_USER,
1151
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
1152 1153
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1154
		.machine_check		= machine_check_generic,
1155
		.platform		= "ppc603",
L
Linus Torvalds 已提交
1156 1157 1158 1159 1160 1161 1162 1163 1164
	},
#endif /* CLASSIC_PPC */
#ifdef CONFIG_8xx
	{	/* 8xx */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00500000,
		.cpu_name		= "8xx",
		/* CPU_FTR_MAYBE_CAN_DOZE is possible,
		 * if the 8xx code is there.... */
1165
		.cpu_features		= CPU_FTRS_8XX,
L
Linus Torvalds 已提交
1166
		.cpu_user_features	= PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1167
		.mmu_features		= MMU_FTR_TYPE_8xx,
L
Linus Torvalds 已提交
1168 1169
		.icache_bsize		= 16,
		.dcache_bsize		= 16,
1170
		.platform		= "ppc823",
L
Linus Torvalds 已提交
1171 1172 1173 1174 1175 1176 1177
	},
#endif /* CONFIG_8xx */
#ifdef CONFIG_40x
	{	/* 403GC */
		.pvr_mask		= 0xffffff00,
		.pvr_value		= 0x00200200,
		.cpu_name		= "403GC",
1178
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1179
		.cpu_user_features	= PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1180
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1181 1182
		.icache_bsize		= 16,
		.dcache_bsize		= 16,
1183
		.machine_check		= machine_check_4xx,
1184
		.platform		= "ppc403",
L
Linus Torvalds 已提交
1185 1186 1187 1188 1189
	},
	{	/* 403GCX */
		.pvr_mask		= 0xffffff00,
		.pvr_value		= 0x00201400,
		.cpu_name		= "403GCX",
1190
		.cpu_features		= CPU_FTRS_40X,
1191 1192
		.cpu_user_features	= PPC_FEATURE_32 |
		 	PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
1193
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1194 1195
		.icache_bsize		= 16,
		.dcache_bsize		= 16,
1196
		.machine_check		= machine_check_4xx,
1197
		.platform		= "ppc403",
L
Linus Torvalds 已提交
1198 1199 1200 1201 1202
	},
	{	/* 403G ?? */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00200000,
		.cpu_name		= "403G ??",
1203
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1204
		.cpu_user_features	= PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1205
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1206 1207
		.icache_bsize		= 16,
		.dcache_bsize		= 16,
1208
		.machine_check		= machine_check_4xx,
1209
		.platform		= "ppc403",
L
Linus Torvalds 已提交
1210 1211 1212 1213 1214
	},
	{	/* 405GP */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x40110000,
		.cpu_name		= "405GP",
1215
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1216 1217
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1218
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1219 1220
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1221
		.machine_check		= machine_check_4xx,
1222
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1223 1224 1225 1226 1227
	},
	{	/* STB 03xxx */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x40130000,
		.cpu_name		= "STB03xxx",
1228
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1229 1230
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1231
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1232 1233
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1234
		.machine_check		= machine_check_4xx,
1235
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1236 1237 1238 1239 1240
	},
	{	/* STB 04xxx */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x41810000,
		.cpu_name		= "STB04xxx",
1241
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1242 1243
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1244
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1245 1246
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1247
		.machine_check		= machine_check_4xx,
1248
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1249 1250 1251 1252 1253
	},
	{	/* NP405L */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x41610000,
		.cpu_name		= "NP405L",
1254
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1255 1256
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1257
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1258 1259
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1260
		.machine_check		= machine_check_4xx,
1261
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1262 1263 1264 1265 1266
	},
	{	/* NP4GS3 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x40B10000,
		.cpu_name		= "NP4GS3",
1267
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1268 1269
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1270
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1271 1272
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1273
		.machine_check		= machine_check_4xx,
1274
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1275 1276 1277 1278 1279
	},
	{   /* NP405H */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x41410000,
		.cpu_name		= "NP405H",
1280
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1281 1282
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1283
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1284 1285
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1286
		.machine_check		= machine_check_4xx,
1287
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1288 1289 1290 1291 1292
	},
	{	/* 405GPr */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x50910000,
		.cpu_name		= "405GPr",
1293
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1294 1295
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1296
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1297 1298
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1299
		.machine_check		= machine_check_4xx,
1300
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1301 1302 1303 1304 1305
	},
	{   /* STBx25xx */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x51510000,
		.cpu_name		= "STBx25xx",
1306
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1307 1308
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1309
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1310 1311
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1312
		.machine_check		= machine_check_4xx,
1313
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1314 1315 1316 1317 1318
	},
	{	/* 405LP */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x41F10000,
		.cpu_name		= "405LP",
1319
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1320
		.cpu_user_features	= PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1321
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1322 1323
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1324
		.machine_check		= machine_check_4xx,
1325
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1326 1327
	},
	{	/* Xilinx Virtex-II Pro  */
1328
		.pvr_mask		= 0xfffff000,
L
Linus Torvalds 已提交
1329 1330
		.pvr_value		= 0x20010000,
		.cpu_name		= "Virtex-II Pro",
1331
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1332 1333
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1334
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1335 1336
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1337
		.machine_check		= machine_check_4xx,
1338
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1339
	},
1340 1341 1342 1343 1344 1345 1346
	{	/* Xilinx Virtex-4 FX */
		.pvr_mask		= 0xfffff000,
		.pvr_value		= 0x20011000,
		.cpu_name		= "Virtex-4 FX",
		.cpu_features		= CPU_FTRS_40X,
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1347
		.mmu_features		= MMU_FTR_TYPE_40x,
1348 1349
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1350
		.machine_check		= machine_check_4xx,
1351
		.platform		= "ppc405",
1352
	},
1353 1354 1355 1356
	{	/* 405EP */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x51210000,
		.cpu_name		= "405EP",
1357
		.cpu_features		= CPU_FTRS_40X,
1358 1359
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1360
		.mmu_features		= MMU_FTR_TYPE_40x,
1361 1362
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1363
		.machine_check		= machine_check_4xx,
1364 1365
		.platform		= "ppc405",
	},
1366 1367 1368 1369
	{	/* 405EX Rev. A/B with Security */
		.pvr_mask		= 0xffff000f,
		.pvr_value		= 0x12910007,
		.cpu_name		= "405EX Rev. A/B",
1370
		.cpu_features		= CPU_FTRS_40X,
1371 1372
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1373
		.mmu_features		= MMU_FTR_TYPE_40x,
1374 1375
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1376
		.machine_check		= machine_check_4xx,
1377
		.platform		= "ppc405",
1378
	},
1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471
	{	/* 405EX Rev. C without Security */
		.pvr_mask		= 0xffff000f,
		.pvr_value		= 0x1291000d,
		.cpu_name		= "405EX Rev. C",
		.cpu_features		= CPU_FTRS_40X,
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
		.mmu_features		= MMU_FTR_TYPE_40x,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.machine_check		= machine_check_4xx,
		.platform		= "ppc405",
	},
	{	/* 405EX Rev. C with Security */
		.pvr_mask		= 0xffff000f,
		.pvr_value		= 0x1291000f,
		.cpu_name		= "405EX Rev. C",
		.cpu_features		= CPU_FTRS_40X,
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
		.mmu_features		= MMU_FTR_TYPE_40x,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.machine_check		= machine_check_4xx,
		.platform		= "ppc405",
	},
	{	/* 405EX Rev. D without Security */
		.pvr_mask		= 0xffff000f,
		.pvr_value		= 0x12910003,
		.cpu_name		= "405EX Rev. D",
		.cpu_features		= CPU_FTRS_40X,
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
		.mmu_features		= MMU_FTR_TYPE_40x,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.machine_check		= machine_check_4xx,
		.platform		= "ppc405",
	},
	{	/* 405EX Rev. D with Security */
		.pvr_mask		= 0xffff000f,
		.pvr_value		= 0x12910005,
		.cpu_name		= "405EX Rev. D",
		.cpu_features		= CPU_FTRS_40X,
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
		.mmu_features		= MMU_FTR_TYPE_40x,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.machine_check		= machine_check_4xx,
		.platform		= "ppc405",
	},
	{	/* 405EXr Rev. A/B without Security */
		.pvr_mask		= 0xffff000f,
		.pvr_value		= 0x12910001,
		.cpu_name		= "405EXr Rev. A/B",
		.cpu_features		= CPU_FTRS_40X,
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
		.mmu_features		= MMU_FTR_TYPE_40x,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.machine_check		= machine_check_4xx,
		.platform		= "ppc405",
	},
	{	/* 405EXr Rev. C without Security */
		.pvr_mask		= 0xffff000f,
		.pvr_value		= 0x12910009,
		.cpu_name		= "405EXr Rev. C",
		.cpu_features		= CPU_FTRS_40X,
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
		.mmu_features		= MMU_FTR_TYPE_40x,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.machine_check		= machine_check_4xx,
		.platform		= "ppc405",
	},
	{	/* 405EXr Rev. C with Security */
		.pvr_mask		= 0xffff000f,
		.pvr_value		= 0x1291000b,
		.cpu_name		= "405EXr Rev. C",
		.cpu_features		= CPU_FTRS_40X,
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
		.mmu_features		= MMU_FTR_TYPE_40x,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.machine_check		= machine_check_4xx,
		.platform		= "ppc405",
	},
	{	/* 405EXr Rev. D without Security */
		.pvr_mask		= 0xffff000f,
1472
		.pvr_value		= 0x12910000,
1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486
		.cpu_name		= "405EXr Rev. D",
		.cpu_features		= CPU_FTRS_40X,
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
		.mmu_features		= MMU_FTR_TYPE_40x,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.machine_check		= machine_check_4xx,
		.platform		= "ppc405",
	},
	{	/* 405EXr Rev. D with Security */
		.pvr_mask		= 0xffff000f,
		.pvr_value		= 0x12910002,
		.cpu_name		= "405EXr Rev. D",
1487 1488 1489
		.cpu_features		= CPU_FTRS_40X,
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1490
		.mmu_features		= MMU_FTR_TYPE_40x,
1491 1492 1493 1494 1495
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.machine_check		= machine_check_4xx,
		.platform		= "ppc405",
	},
1496 1497 1498 1499 1500 1501 1502 1503
	{
		/* 405EZ */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x41510000,
		.cpu_name		= "405EZ",
		.cpu_features		= CPU_FTRS_40X,
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1504
		.mmu_features		= MMU_FTR_TYPE_40x,
1505 1506 1507 1508 1509
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.machine_check		= machine_check_4xx,
		.platform		= "ppc405",
	},
1510 1511 1512 1513 1514 1515 1516
	{	/* default match */
		.pvr_mask		= 0x00000000,
		.pvr_value		= 0x00000000,
		.cpu_name		= "(generic 40x PPC)",
		.cpu_features		= CPU_FTRS_40X,
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1517
		.mmu_features		= MMU_FTR_TYPE_40x,
1518 1519 1520 1521 1522
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.machine_check		= machine_check_4xx,
		.platform		= "ppc405",
	}
L
Linus Torvalds 已提交
1523 1524 1525

#endif /* CONFIG_40x */
#ifdef CONFIG_44x
M
Matt Porter 已提交
1526 1527 1528
	{
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x40000850,
1529 1530 1531
		.cpu_name		= "440GR Rev. A",
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features	= COMMON_USER_BOOKE,
1532
		.mmu_features		= MMU_FTR_TYPE_44x,
1533 1534
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1535
		.machine_check		= machine_check_4xx,
1536 1537 1538 1539 1540
		.platform		= "ppc440",
	},
	{ /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x40000858,
M
Matt Porter 已提交
1541
		.cpu_name		= "440EP Rev. A",
1542
		.cpu_features		= CPU_FTRS_44X,
1543
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1544
		.mmu_features		= MMU_FTR_TYPE_44x,
M
Matt Porter 已提交
1545 1546
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1547
		.cpu_setup		= __setup_cpu_440ep,
1548
		.machine_check		= machine_check_4xx,
1549
		.platform		= "ppc440",
M
Matt Porter 已提交
1550 1551 1552 1553
	},
	{
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x400008d3,
1554
		.cpu_name		= "440GR Rev. B",
1555
		.cpu_features		= CPU_FTRS_44X,
1556
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1557
		.mmu_features		= MMU_FTR_TYPE_44x,
M
Matt Porter 已提交
1558 1559
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1560
		.machine_check		= machine_check_4xx,
1561
		.platform		= "ppc440",
M
Matt Porter 已提交
1562
	},
1563 1564 1565 1566 1567 1568
	{ /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
		.pvr_mask		= 0xf0000ff7,
		.pvr_value		= 0x400008d4,
		.cpu_name		= "440EP Rev. C",
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1569
		.mmu_features		= MMU_FTR_TYPE_44x,
1570 1571 1572 1573 1574 1575
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.cpu_setup		= __setup_cpu_440ep,
		.machine_check		= machine_check_4xx,
		.platform		= "ppc440",
	},
1576 1577 1578 1579
	{ /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x400008db,
		.cpu_name		= "440EP Rev. B",
1580 1581
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1582
		.mmu_features		= MMU_FTR_TYPE_44x,
1583 1584
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1585
		.cpu_setup		= __setup_cpu_440ep,
1586
		.machine_check		= machine_check_4xx,
1587
		.platform		= "ppc440",
1588 1589 1590
	},
	{ /* 440GRX */
		.pvr_mask		= 0xf0000ffb,
1591
		.pvr_value		= 0x200008D0,
1592 1593 1594
		.cpu_name		= "440GRX",
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features	= COMMON_USER_BOOKE,
1595
		.mmu_features		= MMU_FTR_TYPE_44x,
1596 1597
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1598
		.cpu_setup		= __setup_cpu_440grx,
1599
		.machine_check		= machine_check_440A,
1600
		.platform		= "ppc440",
1601
	},
1602 1603 1604 1605 1606 1607
	{ /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
		.pvr_mask		= 0xf0000ffb,
		.pvr_value		= 0x200008D8,
		.cpu_name		= "440EPX",
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1608
		.mmu_features		= MMU_FTR_TYPE_44x,
1609 1610 1611
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.cpu_setup		= __setup_cpu_440epx,
1612
		.machine_check		= machine_check_440A,
1613 1614
		.platform		= "ppc440",
	},
S
Stephen Rothwell 已提交
1615
	{	/* 440GP Rev. B */
L
Linus Torvalds 已提交
1616 1617 1618
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x40000440,
		.cpu_name		= "440GP Rev. B",
1619
		.cpu_features		= CPU_FTRS_44X,
1620
		.cpu_user_features	= COMMON_USER_BOOKE,
1621
		.mmu_features		= MMU_FTR_TYPE_44x,
L
Linus Torvalds 已提交
1622 1623
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1624
		.machine_check		= machine_check_4xx,
1625
		.platform		= "ppc440gp",
L
Linus Torvalds 已提交
1626
	},
S
Stephen Rothwell 已提交
1627
	{	/* 440GP Rev. C */
L
Linus Torvalds 已提交
1628 1629 1630
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x40000481,
		.cpu_name		= "440GP Rev. C",
1631
		.cpu_features		= CPU_FTRS_44X,
1632
		.cpu_user_features	= COMMON_USER_BOOKE,
1633
		.mmu_features		= MMU_FTR_TYPE_44x,
L
Linus Torvalds 已提交
1634 1635
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1636
		.machine_check		= machine_check_4xx,
1637
		.platform		= "ppc440gp",
L
Linus Torvalds 已提交
1638 1639 1640 1641 1642
	},
	{ /* 440GX Rev. A */
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x50000850,
		.cpu_name		= "440GX Rev. A",
1643
		.cpu_features		= CPU_FTRS_44X,
1644
		.cpu_user_features	= COMMON_USER_BOOKE,
1645
		.mmu_features		= MMU_FTR_TYPE_44x,
L
Linus Torvalds 已提交
1646 1647
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1648 1649
		.cpu_setup		= __setup_cpu_440gx,
		.machine_check		= machine_check_440A,
1650
		.platform		= "ppc440",
L
Linus Torvalds 已提交
1651 1652 1653 1654 1655
	},
	{ /* 440GX Rev. B */
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x50000851,
		.cpu_name		= "440GX Rev. B",
1656
		.cpu_features		= CPU_FTRS_44X,
1657
		.cpu_user_features	= COMMON_USER_BOOKE,
1658
		.mmu_features		= MMU_FTR_TYPE_44x,
L
Linus Torvalds 已提交
1659 1660
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1661 1662
		.cpu_setup		= __setup_cpu_440gx,
		.machine_check		= machine_check_440A,
1663
		.platform		= "ppc440",
L
Linus Torvalds 已提交
1664 1665 1666 1667 1668
	},
	{ /* 440GX Rev. C */
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x50000892,
		.cpu_name		= "440GX Rev. C",
1669
		.cpu_features		= CPU_FTRS_44X,
1670
		.cpu_user_features	= COMMON_USER_BOOKE,
1671
		.mmu_features		= MMU_FTR_TYPE_44x,
L
Linus Torvalds 已提交
1672 1673
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1674 1675
		.cpu_setup		= __setup_cpu_440gx,
		.machine_check		= machine_check_440A,
1676
		.platform		= "ppc440",
L
Linus Torvalds 已提交
1677
	},
1678 1679 1680 1681
	{ /* 440GX Rev. F */
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x50000894,
		.cpu_name		= "440GX Rev. F",
1682
		.cpu_features		= CPU_FTRS_44X,
1683
		.cpu_user_features	= COMMON_USER_BOOKE,
1684
		.mmu_features		= MMU_FTR_TYPE_44x,
1685 1686
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1687 1688
		.cpu_setup		= __setup_cpu_440gx,
		.machine_check		= machine_check_440A,
1689
		.platform		= "ppc440",
1690
	},
1691
	{ /* 440SP Rev. A */
1692 1693
		.pvr_mask		= 0xfff00fff,
		.pvr_value		= 0x53200891,
1694
		.cpu_name		= "440SP Rev. A",
1695
		.cpu_features		= CPU_FTRS_44X,
1696
		.cpu_user_features	= COMMON_USER_BOOKE,
1697
		.mmu_features		= MMU_FTR_TYPE_44x,
1698 1699
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1700
		.machine_check		= machine_check_4xx,
1701
		.platform		= "ppc440",
1702
	},
R
Roland Dreier 已提交
1703
	{ /* 440SPe Rev. A */
1704 1705 1706 1707 1708
		.pvr_mask               = 0xfff00fff,
		.pvr_value              = 0x53400890,
		.cpu_name               = "440SPe Rev. A",
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features      = COMMON_USER_BOOKE,
1709
		.mmu_features		= MMU_FTR_TYPE_44x,
1710 1711
		.icache_bsize           = 32,
		.dcache_bsize           = 32,
1712 1713
		.cpu_setup		= __setup_cpu_440spe,
		.machine_check		= machine_check_440A,
1714 1715 1716 1717 1718 1719
		.platform               = "ppc440",
	},
	{ /* 440SPe Rev. B */
		.pvr_mask		= 0xfff00fff,
		.pvr_value		= 0x53400891,
		.cpu_name		= "440SPe Rev. B",
K
Kumar Gala 已提交
1720
		.cpu_features		= CPU_FTRS_44X,
1721
		.cpu_user_features	= COMMON_USER_BOOKE,
1722
		.mmu_features		= MMU_FTR_TYPE_44x,
R
Roland Dreier 已提交
1723 1724
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1725 1726
		.cpu_setup		= __setup_cpu_440spe,
		.machine_check		= machine_check_440A,
1727
		.platform		= "ppc440",
R
Roland Dreier 已提交
1728
	},
1729 1730 1731 1732 1733 1734
	{ /* 440 in Xilinx Virtex-5 FXT */
		.pvr_mask		= 0xfffffff0,
		.pvr_value		= 0x7ff21910,
		.cpu_name		= "440 in Virtex-5 FXT",
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features	= COMMON_USER_BOOKE,
1735
		.mmu_features		= MMU_FTR_TYPE_44x,
1736 1737
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1738 1739
		.cpu_setup		= __setup_cpu_440x5,
		.machine_check		= machine_check_440A,
1740 1741
		.platform		= "ppc440",
	},
1742
	{ /* 460EX */
1743
		.pvr_mask		= 0xffff0006,
1744 1745
		.pvr_value		= 0x13020002,
		.cpu_name		= "460EX",
1746
		.cpu_features		= CPU_FTRS_440x6,
1747
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1748
		.mmu_features		= MMU_FTR_TYPE_44x,
1749 1750 1751 1752 1753 1754
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.cpu_setup		= __setup_cpu_460ex,
		.machine_check		= machine_check_440A,
		.platform		= "ppc440",
	},
1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767
	{ /* 460EX Rev B */
		.pvr_mask		= 0xffff0007,
		.pvr_value		= 0x13020004,
		.cpu_name		= "460EX Rev. B",
		.cpu_features		= CPU_FTRS_440x6,
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
		.mmu_features		= MMU_FTR_TYPE_44x,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.cpu_setup		= __setup_cpu_460ex,
		.machine_check		= machine_check_440A,
		.platform		= "ppc440",
	},
1768
	{ /* 460GT */
1769
		.pvr_mask		= 0xffff0006,
1770 1771
		.pvr_value		= 0x13020000,
		.cpu_name		= "460GT",
1772
		.cpu_features		= CPU_FTRS_440x6,
1773
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1774
		.mmu_features		= MMU_FTR_TYPE_44x,
1775 1776
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1777
		.cpu_setup		= __setup_cpu_460gt,
1778 1779 1780
		.machine_check		= machine_check_440A,
		.platform		= "ppc440",
	},
1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793
	{ /* 460GT Rev B */
		.pvr_mask		= 0xffff0007,
		.pvr_value		= 0x13020005,
		.cpu_name		= "460GT Rev. B",
		.cpu_features		= CPU_FTRS_440x6,
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
		.mmu_features		= MMU_FTR_TYPE_44x,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.cpu_setup		= __setup_cpu_460gt,
		.machine_check		= machine_check_440A,
		.platform		= "ppc440",
	},
1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806
	{ /* 460SX */
		.pvr_mask		= 0xffffff00,
		.pvr_value		= 0x13541800,
		.cpu_name		= "460SX",
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features	= COMMON_USER_BOOKE,
		.mmu_features		= MMU_FTR_TYPE_44x,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.cpu_setup		= __setup_cpu_460sx,
		.machine_check		= machine_check_440A,
		.platform		= "ppc440",
	},
1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820
	{ /* 464 in APM821xx */
		.pvr_mask		= 0xffffff00,
		.pvr_value		= 0x12C41C80,
		.cpu_name		= "APM821XX",
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features	= COMMON_USER_BOOKE |
			PPC_FEATURE_HAS_FPU,
		.mmu_features		= MMU_FTR_TYPE_44x,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.cpu_setup		= __setup_cpu_apm821xx,
		.machine_check		= machine_check_440A,
		.platform		= "ppc440",
	},
D
Dave Kleikamp 已提交
1821 1822 1823 1824 1825 1826 1827 1828 1829
	{ /* 476 core */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x11a50000,
		.cpu_name		= "476",
		.cpu_features		= CPU_FTRS_47X,
		.cpu_user_features	= COMMON_USER_BOOKE |
			PPC_FEATURE_HAS_FPU,
		.mmu_features		= MMU_FTR_TYPE_47x |
			MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843
		.icache_bsize		= 32,
		.dcache_bsize		= 128,
		.machine_check		= machine_check_47x,
		.platform		= "ppc470",
	},
	{ /* 476 iss */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00050000,
		.cpu_name		= "476",
		.cpu_features		= CPU_FTRS_47X,
		.cpu_user_features	= COMMON_USER_BOOKE |
			PPC_FEATURE_HAS_FPU,
		.mmu_features		= MMU_FTR_TYPE_47x |
			MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
D
Dave Kleikamp 已提交
1844 1845
		.icache_bsize		= 32,
		.dcache_bsize		= 128,
1846
		.machine_check		= machine_check_47x,
D
Dave Kleikamp 已提交
1847 1848
		.platform		= "ppc470",
	},
1849 1850 1851 1852 1853 1854
	{	/* default match */
		.pvr_mask		= 0x00000000,
		.pvr_value		= 0x00000000,
		.cpu_name		= "(generic 44x PPC)",
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features	= COMMON_USER_BOOKE,
1855
		.mmu_features		= MMU_FTR_TYPE_44x,
1856 1857 1858 1859 1860
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.machine_check		= machine_check_4xx,
		.platform		= "ppc440",
	}
L
Linus Torvalds 已提交
1861
#endif /* CONFIG_44x */
1862
#ifdef CONFIG_E200
S
Stephen Rothwell 已提交
1863
	{	/* e200z5 */
1864 1865 1866 1867
		.pvr_mask		= 0xfff00000,
		.pvr_value		= 0x81000000,
		.cpu_name		= "e200z5",
		/* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1868
		.cpu_features		= CPU_FTRS_E200,
1869 1870
		.cpu_user_features	= COMMON_USER_BOOKE |
			PPC_FEATURE_HAS_EFP_SINGLE |
1871
			PPC_FEATURE_UNIFIED_CACHE,
1872
		.mmu_features		= MMU_FTR_TYPE_FSL_E,
1873
		.dcache_bsize		= 32,
1874
		.machine_check		= machine_check_e200,
1875
		.platform		= "ppc5554",
1876
	},
S
Stephen Rothwell 已提交
1877
	{	/* e200z6 */
1878 1879 1880 1881
		.pvr_mask		= 0xfff00000,
		.pvr_value		= 0x81100000,
		.cpu_name		= "e200z6",
		/* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1882
		.cpu_features		= CPU_FTRS_E200,
1883
		.cpu_user_features	= COMMON_USER_BOOKE |
1884 1885
			PPC_FEATURE_HAS_SPE_COMP |
			PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1886
			PPC_FEATURE_UNIFIED_CACHE,
1887
		.mmu_features		= MMU_FTR_TYPE_FSL_E,
1888
		.dcache_bsize		= 32,
1889
		.machine_check		= machine_check_e200,
1890
		.platform		= "ppc5554",
1891
	},
1892 1893 1894 1895 1896 1897 1898 1899
	{	/* default match */
		.pvr_mask		= 0x00000000,
		.pvr_value		= 0x00000000,
		.cpu_name		= "(generic E200 PPC)",
		.cpu_features		= CPU_FTRS_E200,
		.cpu_user_features	= COMMON_USER_BOOKE |
			PPC_FEATURE_HAS_EFP_SINGLE |
			PPC_FEATURE_UNIFIED_CACHE,
1900
		.mmu_features		= MMU_FTR_TYPE_FSL_E,
1901
		.dcache_bsize		= 32,
1902
		.cpu_setup		= __setup_cpu_e200,
1903 1904
		.machine_check		= machine_check_e200,
		.platform		= "ppc5554",
1905
	}
1906
#endif /* CONFIG_E200 */
1907
#endif /* CONFIG_PPC32 */
1908
#ifdef CONFIG_E500
1909
#ifdef CONFIG_PPC32
S
Stephen Rothwell 已提交
1910
	{	/* e500 */
L
Linus Torvalds 已提交
1911 1912 1913
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80200000,
		.cpu_name		= "e500",
1914
		.cpu_features		= CPU_FTRS_E500,
1915
		.cpu_user_features	= COMMON_USER_BOOKE |
1916 1917
			PPC_FEATURE_HAS_SPE_COMP |
			PPC_FEATURE_HAS_EFP_SINGLE_COMP,
1918
		.mmu_features		= MMU_FTR_TYPE_FSL_E,
L
Linus Torvalds 已提交
1919 1920 1921
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
1922
		.oprofile_cpu_type	= "ppc/e500",
1923
		.oprofile_type		= PPC_OPROFILE_FSL_EMB,
1924
		.cpu_setup		= __setup_cpu_e500v1,
1925
		.machine_check		= machine_check_e500,
1926
		.platform		= "ppc8540",
L
Linus Torvalds 已提交
1927
	},
S
Stephen Rothwell 已提交
1928
	{	/* e500v2 */
1929 1930 1931
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80210000,
		.cpu_name		= "e500v2",
1932
		.cpu_features		= CPU_FTRS_E500_2,
1933
		.cpu_user_features	= COMMON_USER_BOOKE |
1934 1935 1936
			PPC_FEATURE_HAS_SPE_COMP |
			PPC_FEATURE_HAS_EFP_SINGLE_COMP |
			PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
1937
		.mmu_features		= MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS,
1938 1939 1940
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
1941
		.oprofile_cpu_type	= "ppc/e500",
1942
		.oprofile_type		= PPC_OPROFILE_FSL_EMB,
1943
		.cpu_setup		= __setup_cpu_e500v2,
1944
		.machine_check		= machine_check_e500,
1945
		.platform		= "ppc8548",
1946
	},
1947 1948 1949 1950 1951 1952
	{	/* e500mc */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80230000,
		.cpu_name		= "e500mc",
		.cpu_features		= CPU_FTRS_E500MC,
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1953
		.mmu_features		= MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
1954
			MMU_FTR_USE_TLBILX,
1955 1956 1957
		.icache_bsize		= 64,
		.dcache_bsize		= 64,
		.num_pmcs		= 4,
S
Scott Wood 已提交
1958
		.oprofile_cpu_type	= "ppc/e500mc",
1959
		.oprofile_type		= PPC_OPROFILE_FSL_EMB,
1960
		.cpu_setup		= __setup_cpu_e500mc,
1961
		.machine_check		= machine_check_e500mc,
1962 1963
		.platform		= "ppce500mc",
	},
1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983
#endif /* CONFIG_PPC32 */
	{	/* e5500 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80240000,
		.cpu_name		= "e5500",
		.cpu_features		= CPU_FTRS_E500MC,
		.cpu_user_features	= COMMON_USER_BOOKE,
		.mmu_features		= MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
			MMU_FTR_USE_TLBILX,
		.icache_bsize		= 64,
		.dcache_bsize		= 64,
		.num_pmcs		= 4,
		.oprofile_cpu_type	= "ppc/e500mc",
		.oprofile_type		= PPC_OPROFILE_FSL_EMB,
		.cpu_setup		= __setup_cpu_e5500,
		.cpu_restore		= __restore_cpu_e5500,
		.machine_check		= machine_check_e500mc,
		.platform		= "ppce5500",
	},
#ifdef CONFIG_PPC32
L
Linus Torvalds 已提交
1984 1985 1986
	{	/* default match */
		.pvr_mask		= 0x00000000,
		.pvr_value		= 0x00000000,
1987 1988 1989 1990 1991
		.cpu_name		= "(generic E500 PPC)",
		.cpu_features		= CPU_FTRS_E500,
		.cpu_user_features	= COMMON_USER_BOOKE |
			PPC_FEATURE_HAS_SPE_COMP |
			PPC_FEATURE_HAS_EFP_SINGLE_COMP,
1992
		.mmu_features		= MMU_FTR_TYPE_FSL_E,
L
Linus Torvalds 已提交
1993 1994
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1995
		.machine_check		= machine_check_e500,
1996
		.platform		= "powerpc",
1997
	}
S
Stephen Rothwell 已提交
1998
#endif /* CONFIG_PPC32 */
1999
#endif /* CONFIG_E500 */
2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022

#ifdef CONFIG_PPC_BOOK3E_64
	{	/* This is a default entry to get going, to be replaced by
		 * a real one at some stage
		 */
#define CPU_FTRS_BASE_BOOK3E	(CPU_FTR_USE_TB | \
	    CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_SMT | \
	    CPU_FTR_NODSISRALIGN | CPU_FTR_NOEXECUTE)
		.pvr_mask		= 0x00000000,
		.pvr_value		= 0x00000000,
		.cpu_name		= "Book3E",
		.cpu_features		= CPU_FTRS_BASE_BOOK3E,
		.cpu_user_features	= COMMON_USER_PPC64,
		.mmu_features		= MMU_FTR_TYPE_3E | MMU_FTR_USE_TLBILX |
					  MMU_FTR_USE_TLBIVAX_BCAST |
					  MMU_FTR_LOCK_BCAST_INVAL,
		.icache_bsize		= 64,
		.dcache_bsize		= 64,
		.num_pmcs		= 0,
		.machine_check		= machine_check_generic,
		.platform		= "power6",
	},
#endif
L
Linus Torvalds 已提交
2023
};
2024

2025 2026
static struct cpu_spec the_cpu_spec;

2027
static void __init setup_cpu_spec(unsigned long offset, struct cpu_spec *s)
2028
{
2029
	struct cpu_spec *t = &the_cpu_spec;
2030 2031
	struct cpu_spec old;

2032
	t = PTRRELOC(t);
2033 2034 2035 2036
	old = *t;

	/* Copy everything, then do fixups */
	*t = *s;
2037

2038 2039 2040 2041 2042
	/*
	 * If we are overriding a previous value derived from the real
	 * PVR with a new value obtained using a logical PVR value,
	 * don't modify the performance monitor fields.
	 */
2043 2044 2045 2046 2047 2048 2049 2050
	if (old.num_pmcs && !s->num_pmcs) {
		t->num_pmcs = old.num_pmcs;
		t->pmc_type = old.pmc_type;
		t->oprofile_type = old.oprofile_type;
		t->oprofile_mmcra_sihv = old.oprofile_mmcra_sihv;
		t->oprofile_mmcra_sipr = old.oprofile_mmcra_sipr;
		t->oprofile_mmcra_clear = old.oprofile_mmcra_clear;

2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063
		/*
		 * If we have passed through this logic once before and
		 * have pulled the default case because the real PVR was
		 * not found inside cpu_specs[], then we are possibly
		 * running in compatibility mode. In that case, let the
		 * oprofiler know which set of compatibility counters to
		 * pull from by making sure the oprofile_cpu_type string
		 * is set to that of compatibility mode. If the
		 * oprofile_cpu_type already has a value, then we are
		 * possibly overriding a real PVR with a logical one,
		 * and, in that case, keep the current value for
		 * oprofile_cpu_type.
		 */
2064
		if (old.oprofile_cpu_type != NULL) {
2065 2066
			t->oprofile_cpu_type = old.oprofile_cpu_type;
			t->oprofile_type = old.oprofile_type;
2067
		}
2068
	}
2069 2070

	*PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
2071

2072 2073 2074 2075 2076 2077
	/*
	 * Set the base platform string once; assumes
	 * we're called with real pvr first.
	 */
	if (*PTRRELOC(&powerpc_base_platform) == NULL)
		*PTRRELOC(&powerpc_base_platform) = t->platform;
2078

2079
#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
2080 2081 2082 2083 2084 2085 2086 2087 2088
	/* ppc64 and booke expect identify_cpu to also call setup_cpu for
	 * that processor. I will consolidate that at a later time, for now,
	 * just use #ifdef. We also don't need to PTRRELOC the function
	 * pointer on ppc64 and booke as we are running at 0 in real mode
	 * on ppc64 and reloc_offset is always 0 on booke.
	 */
	if (s->cpu_setup) {
		s->cpu_setup(offset, s);
	}
2089
#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101
}

struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
{
	struct cpu_spec *s = cpu_specs;
	int i;

	s = PTRRELOC(s);

	for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) {
		if ((pvr & s->pvr_mask) == s->pvr_value) {
			setup_cpu_spec(offset, s);
2102 2103
			return s;
		}
2104 2105
	}

2106
	BUG();
2107

2108 2109
	return NULL;
}