cputable.c 44.7 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 */
L
Linus Torvalds 已提交
22

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

S
Stephen Rothwell 已提交
26 27 28 29 30 31 32
/* 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
 */
33
#ifdef CONFIG_PPC32
34 35
extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
36
extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
37
extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
38
extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
39 40 41 42 43 44 45 46
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 已提交
47
#endif /* CONFIG_PPC32 */
O
Olof Johansson 已提交
48
#ifdef CONFIG_PPC64
49
extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
50
extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
O
Olof Johansson 已提交
51
extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
S
Stephen Rothwell 已提交
52
extern void __restore_cpu_pa6t(void);
O
Olof Johansson 已提交
53 54
extern void __restore_cpu_ppc970(void);
#endif /* CONFIG_PPC64 */
L
Linus Torvalds 已提交
55 56 57 58

/* This table only contains "desktop" CPUs, it need to be filled with embedded
 * ones as well...
 */
S
Stephen Rothwell 已提交
59 60 61
#define COMMON_USER		(PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
				 PPC_FEATURE_HAS_MMU)
#define COMMON_USER_PPC64	(COMMON_USER | PPC_FEATURE_64)
62
#define COMMON_USER_POWER4	(COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
63 64 65 66
#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)
67
#define COMMON_USER_POWER6	(COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
68 69
				 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
				 PPC_FEATURE_TRUE_LE)
70 71 72
#define COMMON_USER_PA6T	(COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
				 PPC_FEATURE_TRUE_LE | \
				 PPC_FEATURE_HAS_ALTIVEC_COMP)
73 74
#define COMMON_USER_BOOKE	(PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
				 PPC_FEATURE_BOOKE)
L
Linus Torvalds 已提交
75

76
static struct cpu_spec __initdata cpu_specs[] = {
S
Stephen Rothwell 已提交
77 78 79 80 81 82
#ifdef CONFIG_PPC64
	{	/* Power3 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00400000,
		.cpu_name		= "POWER3 (630)",
		.cpu_features		= CPU_FTRS_POWER3,
83
		.cpu_user_features	= COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
S
Stephen Rothwell 已提交
84 85 86
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
87
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
88
		.oprofile_cpu_type	= "ppc64/power3",
89
		.oprofile_type		= PPC_OPROFILE_RS64,
90
		.machine_check		= machine_check_generic,
91
		.platform		= "power3",
S
Stephen Rothwell 已提交
92 93 94 95 96 97
	},
	{	/* Power3+ */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00410000,
		.cpu_name		= "POWER3 (630+)",
		.cpu_features		= CPU_FTRS_POWER3,
98
		.cpu_user_features	= COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
S
Stephen Rothwell 已提交
99 100 101
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
102
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
103
		.oprofile_cpu_type	= "ppc64/power3",
104
		.oprofile_type		= PPC_OPROFILE_RS64,
105
		.machine_check		= machine_check_generic,
106
		.platform		= "power3",
S
Stephen Rothwell 已提交
107 108 109 110 111 112 113 114 115 116
	},
	{	/* Northstar */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00330000,
		.cpu_name		= "RS64-II (northstar)",
		.cpu_features		= CPU_FTRS_RS64,
		.cpu_user_features	= COMMON_USER_PPC64,
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
117
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
118
		.oprofile_cpu_type	= "ppc64/rs64",
119
		.oprofile_type		= PPC_OPROFILE_RS64,
120
		.machine_check		= machine_check_generic,
121
		.platform		= "rs64",
S
Stephen Rothwell 已提交
122 123 124 125 126 127 128 129 130 131
	},
	{	/* Pulsar */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00340000,
		.cpu_name		= "RS64-III (pulsar)",
		.cpu_features		= CPU_FTRS_RS64,
		.cpu_user_features	= COMMON_USER_PPC64,
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
132
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
133
		.oprofile_cpu_type	= "ppc64/rs64",
134
		.oprofile_type		= PPC_OPROFILE_RS64,
135
		.machine_check		= machine_check_generic,
136
		.platform		= "rs64",
S
Stephen Rothwell 已提交
137 138 139 140 141 142 143 144 145 146
	},
	{	/* I-star */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00360000,
		.cpu_name		= "RS64-III (icestar)",
		.cpu_features		= CPU_FTRS_RS64,
		.cpu_user_features	= COMMON_USER_PPC64,
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
147
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
148
		.oprofile_cpu_type	= "ppc64/rs64",
149
		.oprofile_type		= PPC_OPROFILE_RS64,
150
		.machine_check		= machine_check_generic,
151
		.platform		= "rs64",
S
Stephen Rothwell 已提交
152 153 154 155 156 157 158 159 160 161
	},
	{	/* S-star */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00370000,
		.cpu_name		= "RS64-IV (sstar)",
		.cpu_features		= CPU_FTRS_RS64,
		.cpu_user_features	= COMMON_USER_PPC64,
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
162
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
163
		.oprofile_cpu_type	= "ppc64/rs64",
164
		.oprofile_type		= PPC_OPROFILE_RS64,
165
		.machine_check		= machine_check_generic,
166
		.platform		= "rs64",
S
Stephen Rothwell 已提交
167 168 169 170 171 172
	},
	{	/* Power4 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00350000,
		.cpu_name		= "POWER4 (gp)",
		.cpu_features		= CPU_FTRS_POWER4,
173
		.cpu_user_features	= COMMON_USER_POWER4,
S
Stephen Rothwell 已提交
174 175 176
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
177
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
178
		.oprofile_cpu_type	= "ppc64/power4",
179
		.oprofile_type		= PPC_OPROFILE_POWER4,
180
		.machine_check		= machine_check_generic,
181
		.platform		= "power4",
S
Stephen Rothwell 已提交
182 183 184 185 186 187
	},
	{	/* Power4+ */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00380000,
		.cpu_name		= "POWER4+ (gq)",
		.cpu_features		= CPU_FTRS_POWER4,
188
		.cpu_user_features	= COMMON_USER_POWER4,
S
Stephen Rothwell 已提交
189 190 191
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
192
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
193
		.oprofile_cpu_type	= "ppc64/power4",
194
		.oprofile_type		= PPC_OPROFILE_POWER4,
195
		.machine_check		= machine_check_generic,
196
		.platform		= "power4",
S
Stephen Rothwell 已提交
197 198 199 200 201 202
	},
	{	/* PPC970 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00390000,
		.cpu_name		= "PPC970",
		.cpu_features		= CPU_FTRS_PPC970,
203
		.cpu_user_features	= COMMON_USER_POWER4 |
S
Stephen Rothwell 已提交
204 205 206 207
			PPC_FEATURE_HAS_ALTIVEC_COMP,
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
208
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
209
		.cpu_setup		= __setup_cpu_ppc970,
O
Olof Johansson 已提交
210
		.cpu_restore		= __restore_cpu_ppc970,
S
Stephen Rothwell 已提交
211
		.oprofile_cpu_type	= "ppc64/970",
212
		.oprofile_type		= PPC_OPROFILE_POWER4,
213
		.machine_check		= machine_check_generic,
214
		.platform		= "ppc970",
S
Stephen Rothwell 已提交
215 216 217 218 219 220
	},
	{	/* PPC970FX */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x003c0000,
		.cpu_name		= "PPC970FX",
		.cpu_features		= CPU_FTRS_PPC970,
221
		.cpu_user_features	= COMMON_USER_POWER4 |
S
Stephen Rothwell 已提交
222 223 224 225
			PPC_FEATURE_HAS_ALTIVEC_COMP,
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
226
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
227
		.cpu_setup		= __setup_cpu_ppc970,
O
Olof Johansson 已提交
228
		.cpu_restore		= __restore_cpu_ppc970,
S
Stephen Rothwell 已提交
229
		.oprofile_cpu_type	= "ppc64/970",
230
		.oprofile_type		= PPC_OPROFILE_POWER4,
231
		.machine_check		= machine_check_generic,
232
		.platform		= "ppc970",
233 234 235 236 237 238 239 240 241 242 243
	},
	{	/* 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,
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
244
		.pmc_type		= PPC_PMC_IBM,
245 246 247 248
		.cpu_setup		= __setup_cpu_ppc970,
		.cpu_restore		= __restore_cpu_ppc970,
		.oprofile_cpu_type	= "ppc64/970MP",
		.oprofile_type		= PPC_OPROFILE_POWER4,
249
		.machine_check		= machine_check_generic,
250
		.platform		= "ppc970",
S
Stephen Rothwell 已提交
251 252 253 254 255 256
	},
	{	/* PPC970MP */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00440000,
		.cpu_name		= "PPC970MP",
		.cpu_features		= CPU_FTRS_PPC970,
257
		.cpu_user_features	= COMMON_USER_POWER4 |
S
Stephen Rothwell 已提交
258 259 260
			PPC_FEATURE_HAS_ALTIVEC_COMP,
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
261
		.num_pmcs		= 8,
262
		.pmc_type		= PPC_PMC_IBM,
263
		.cpu_setup		= __setup_cpu_ppc970MP,
O
Olof Johansson 已提交
264
		.cpu_restore		= __restore_cpu_ppc970,
265
		.oprofile_cpu_type	= "ppc64/970MP",
266
		.oprofile_type		= PPC_OPROFILE_POWER4,
267
		.machine_check		= machine_check_generic,
268
		.platform		= "ppc970",
S
Stephen Rothwell 已提交
269
	},
J
Jake Moilanen 已提交
270 271 272 273 274 275 276 277 278 279
	{	/* 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,
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
280
		.pmc_type		= PPC_PMC_IBM,
J
Jake Moilanen 已提交
281 282 283
		.cpu_setup		= __setup_cpu_ppc970,
		.oprofile_cpu_type	= "ppc64/970",
		.oprofile_type		= PPC_OPROFILE_POWER4,
284
		.machine_check		= machine_check_generic,
J
Jake Moilanen 已提交
285 286
		.platform		= "ppc970",
	},
287
	{	/* Power5 GR */
S
Stephen Rothwell 已提交
288 289 290 291
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x003a0000,
		.cpu_name		= "POWER5 (gr)",
		.cpu_features		= CPU_FTRS_POWER5,
292
		.cpu_user_features	= COMMON_USER_POWER5,
S
Stephen Rothwell 已提交
293 294 295
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 6,
296
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
297
		.oprofile_cpu_type	= "ppc64/power5",
298
		.oprofile_type		= PPC_OPROFILE_POWER4,
299 300 301 302 303
		/* 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,
304
		.machine_check		= machine_check_generic,
305
		.platform		= "power5",
S
Stephen Rothwell 已提交
306
	},
307 308 309 310 311 312 313 314 315 316 317 318 319
	{	/* Power5++ */
		.pvr_mask		= 0xffffff00,
		.pvr_value		= 0x003b0300,
		.cpu_name		= "POWER5+ (gs)",
		.cpu_features		= CPU_FTRS_POWER5,
		.cpu_user_features	= COMMON_USER_POWER5_PLUS,
		.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,
320
		.machine_check		= machine_check_generic,
321 322
		.platform		= "power5+",
	},
323
	{	/* Power5 GS */
S
Stephen Rothwell 已提交
324 325
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x003b0000,
326
		.cpu_name		= "POWER5+ (gs)",
S
Stephen Rothwell 已提交
327
		.cpu_features		= CPU_FTRS_POWER5,
328
		.cpu_user_features	= COMMON_USER_POWER5_PLUS,
S
Stephen Rothwell 已提交
329 330 331
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 6,
332
		.pmc_type		= PPC_PMC_IBM,
333
		.oprofile_cpu_type	= "ppc64/power5+",
334
		.oprofile_type		= PPC_OPROFILE_POWER4,
335 336
		.oprofile_mmcra_sihv	= MMCRA_SIHV,
		.oprofile_mmcra_sipr	= MMCRA_SIPR,
337
		.machine_check		= machine_check_generic,
338
		.platform		= "power5+",
S
Stephen Rothwell 已提交
339
	},
340 341 342 343 344 345 346 347
	{	/* 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,
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
348
		.machine_check		= machine_check_generic,
349 350
		.platform		= "power5+",
	},
351 352 353
	{	/* Power6 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x003e0000,
354 355 356 357 358 359 360
		.cpu_name		= "POWER6 (raw)",
		.cpu_features		= CPU_FTRS_POWER6,
		.cpu_user_features	= COMMON_USER_POWER6 |
			PPC_FEATURE_POWER6_EXT,
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 6,
361
		.pmc_type		= PPC_PMC_IBM,
362 363 364 365 366 367
		.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,
368
		.machine_check		= machine_check_generic,
369 370 371 372 373 374
		.platform		= "power6x",
	},
	{	/* 2.05-compliant processor, i.e. Power6 "architected" mode */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x0f000002,
		.cpu_name		= "POWER6 (architected)",
375 376 377 378
		.cpu_features		= CPU_FTRS_POWER6,
		.cpu_user_features	= COMMON_USER_POWER6,
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
379
		.machine_check		= machine_check_generic,
380 381
		.platform		= "power6",
	},
382
	{	/* Cell Broadband Engine */
S
Stephen Rothwell 已提交
383 384 385 386 387
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00700000,
		.cpu_name		= "Cell Broadband Engine",
		.cpu_features		= CPU_FTRS_CELL,
		.cpu_user_features	= COMMON_USER_PPC64 |
388 389
			PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
			PPC_FEATURE_SMT,
S
Stephen Rothwell 已提交
390 391
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
392
		.num_pmcs		= 4,
393
		.pmc_type		= PPC_PMC_IBM,
394 395
		.oprofile_cpu_type	= "ppc64/cell-be",
		.oprofile_type		= PPC_OPROFILE_CELL,
396
		.machine_check		= machine_check_generic,
397
		.platform		= "ppc-cell-be",
S
Stephen Rothwell 已提交
398
	},
399 400 401 402 403 404 405 406 407
	{	/* PA Semi PA6T */
		.pvr_mask		= 0x7fff0000,
		.pvr_value		= 0x00900000,
		.cpu_name		= "PA6T",
		.cpu_features		= CPU_FTRS_PA6T,
		.cpu_user_features	= COMMON_USER_PA6T,
		.icache_bsize		= 64,
		.dcache_bsize		= 64,
		.num_pmcs		= 6,
408
		.pmc_type		= PPC_PMC_PA6T,
O
Olof Johansson 已提交
409 410
		.cpu_setup		= __setup_cpu_pa6t,
		.cpu_restore		= __restore_cpu_pa6t,
411 412
		.oprofile_cpu_type	= "ppc64/pa6t",
		.oprofile_type		= PPC_OPROFILE_PA6T,
413
		.machine_check		= machine_check_generic,
414 415
		.platform		= "pa6t",
	},
S
Stephen Rothwell 已提交
416 417 418 419 420 421 422 423 424
	{	/* default match */
		.pvr_mask		= 0x00000000,
		.pvr_value		= 0x00000000,
		.cpu_name		= "POWER4 (compatible)",
		.cpu_features		= CPU_FTRS_COMPATIBLE,
		.cpu_user_features	= COMMON_USER_PPC64,
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 6,
425
		.pmc_type		= PPC_PMC_IBM,
426
		.machine_check		= machine_check_generic,
427
		.platform		= "power4",
S
Stephen Rothwell 已提交
428 429 430
	}
#endif	/* CONFIG_PPC64 */
#ifdef CONFIG_PPC32
L
Linus Torvalds 已提交
431
#if CLASSIC_PPC
S
Stephen Rothwell 已提交
432
	{	/* 601 */
L
Linus Torvalds 已提交
433 434 435
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00010000,
		.cpu_name		= "601",
436
		.cpu_features		= CPU_FTRS_PPC601,
S
Stephen Rothwell 已提交
437
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_601_INSTR |
438
			PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
L
Linus Torvalds 已提交
439 440
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
441
		.machine_check		= machine_check_generic,
442
		.platform		= "ppc601",
L
Linus Torvalds 已提交
443 444 445 446 447
	},
	{	/* 603 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00030000,
		.cpu_name		= "603",
448
		.cpu_features		= CPU_FTRS_603,
449
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
450 451
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
452
		.cpu_setup		= __setup_cpu_603,
453
		.machine_check		= machine_check_generic,
454
		.platform		= "ppc603",
L
Linus Torvalds 已提交
455 456 457 458 459
	},
	{	/* 603e */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00060000,
		.cpu_name		= "603e",
460
		.cpu_features		= CPU_FTRS_603,
461
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
462 463
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
464
		.cpu_setup		= __setup_cpu_603,
465
		.machine_check		= machine_check_generic,
466
		.platform		= "ppc603",
L
Linus Torvalds 已提交
467 468 469 470 471
	},
	{	/* 603ev */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00070000,
		.cpu_name		= "603ev",
472
		.cpu_features		= CPU_FTRS_603,
473
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
474 475
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
476
		.cpu_setup		= __setup_cpu_603,
477
		.machine_check		= machine_check_generic,
478
		.platform		= "ppc603",
L
Linus Torvalds 已提交
479 480 481 482 483
	},
	{	/* 604 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00040000,
		.cpu_name		= "604",
484
		.cpu_features		= CPU_FTRS_604,
485
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
486 487 488
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 2,
489
		.cpu_setup		= __setup_cpu_604,
490
		.machine_check		= machine_check_generic,
491
		.platform		= "ppc604",
L
Linus Torvalds 已提交
492 493 494 495 496
	},
	{	/* 604e */
		.pvr_mask		= 0xfffff000,
		.pvr_value		= 0x00090000,
		.cpu_name		= "604e",
497
		.cpu_features		= CPU_FTRS_604,
498
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
499 500 501
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
502
		.cpu_setup		= __setup_cpu_604,
503
		.machine_check		= machine_check_generic,
504
		.platform		= "ppc604",
L
Linus Torvalds 已提交
505 506 507 508 509
	},
	{	/* 604r */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00090000,
		.cpu_name		= "604r",
510
		.cpu_features		= CPU_FTRS_604,
511
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
512 513 514
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
515
		.cpu_setup		= __setup_cpu_604,
516
		.machine_check		= machine_check_generic,
517
		.platform		= "ppc604",
L
Linus Torvalds 已提交
518 519 520 521 522
	},
	{	/* 604ev */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x000a0000,
		.cpu_name		= "604ev",
523
		.cpu_features		= CPU_FTRS_604,
524
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
525 526 527
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
528
		.cpu_setup		= __setup_cpu_604,
529
		.machine_check		= machine_check_generic,
530
		.platform		= "ppc604",
L
Linus Torvalds 已提交
531 532 533 534 535
	},
	{	/* 740/750 (0x4202, don't support TAU ?) */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x00084202,
		.cpu_name		= "740/750",
536
		.cpu_features		= CPU_FTRS_740_NOTAU,
537
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
538 539 540
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
541
		.cpu_setup		= __setup_cpu_750,
542
		.machine_check		= machine_check_generic,
543
		.platform		= "ppc750",
L
Linus Torvalds 已提交
544 545 546 547 548
	},
	{	/* 750CX (80100 and 8010x?) */
		.pvr_mask		= 0xfffffff0,
		.pvr_value		= 0x00080100,
		.cpu_name		= "750CX",
549
		.cpu_features		= CPU_FTRS_750,
550
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
551 552 553
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
554
		.cpu_setup		= __setup_cpu_750cx,
555
		.machine_check		= machine_check_generic,
556
		.platform		= "ppc750",
L
Linus Torvalds 已提交
557 558 559 560 561
	},
	{	/* 750CX (82201 and 82202) */
		.pvr_mask		= 0xfffffff0,
		.pvr_value		= 0x00082200,
		.cpu_name		= "750CX",
562
		.cpu_features		= CPU_FTRS_750,
563
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
564 565 566
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
567
		.cpu_setup		= __setup_cpu_750cx,
568
		.machine_check		= machine_check_generic,
569
		.platform		= "ppc750",
L
Linus Torvalds 已提交
570 571 572 573 574
	},
	{	/* 750CXe (82214) */
		.pvr_mask		= 0xfffffff0,
		.pvr_value		= 0x00082210,
		.cpu_name		= "750CXe",
575
		.cpu_features		= CPU_FTRS_750,
576
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
577 578 579
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
580
		.cpu_setup		= __setup_cpu_750cx,
581
		.machine_check		= machine_check_generic,
582
		.platform		= "ppc750",
L
Linus Torvalds 已提交
583
	},
584 585 586 587
	{	/* 750CXe "Gekko" (83214) */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x00083214,
		.cpu_name		= "750CXe",
588
		.cpu_features		= CPU_FTRS_750,
589
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
590 591 592
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
593
		.cpu_setup		= __setup_cpu_750cx,
594
		.machine_check		= machine_check_generic,
595
		.platform		= "ppc750",
596
	},
J
Jake Moilanen 已提交
597 598 599 600
	{	/* 750CL */
		.pvr_mask		= 0xfffff0f0,
		.pvr_value		= 0x00087010,
		.cpu_name		= "750CL",
601
		.cpu_features		= CPU_FTRS_750CL,
J
Jake Moilanen 已提交
602 603 604 605
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
606
		.cpu_setup		= __setup_cpu_750,
607
		.machine_check		= machine_check_generic,
J
Jake Moilanen 已提交
608 609
		.platform		= "ppc750",
	},
610 611 612 613
	{	/* 745/755 */
		.pvr_mask		= 0xfffff000,
		.pvr_value		= 0x00083000,
		.cpu_name		= "745/755",
614
		.cpu_features		= CPU_FTRS_750,
615
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
616 617 618
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
619
		.cpu_setup		= __setup_cpu_750,
620
		.machine_check		= machine_check_generic,
621
		.platform		= "ppc750",
622
	},
L
Linus Torvalds 已提交
623 624 625 626
	{	/* 750FX rev 1.x */
		.pvr_mask		= 0xffffff00,
		.pvr_value		= 0x70000100,
		.cpu_name		= "750FX",
627
		.cpu_features		= CPU_FTRS_750FX1,
628
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
629 630 631
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
632
		.cpu_setup		= __setup_cpu_750,
633
		.machine_check		= machine_check_generic,
634
		.platform		= "ppc750",
L
Linus Torvalds 已提交
635 636 637 638 639
	},
	{	/* 750FX rev 2.0 must disable HID0[DPM] */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x70000200,
		.cpu_name		= "750FX",
640
		.cpu_features		= CPU_FTRS_750FX2,
641
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
642 643 644
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
645
		.cpu_setup		= __setup_cpu_750,
646
		.machine_check		= machine_check_generic,
647
		.platform		= "ppc750",
L
Linus Torvalds 已提交
648 649 650 651 652
	},
	{	/* 750FX (All revs except 2.0) */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x70000000,
		.cpu_name		= "750FX",
653
		.cpu_features		= CPU_FTRS_750FX,
654
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
655 656 657
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
658
		.cpu_setup		= __setup_cpu_750fx,
659
		.machine_check		= machine_check_generic,
660
		.platform		= "ppc750",
L
Linus Torvalds 已提交
661 662 663 664 665
	},
	{	/* 750GX */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x70020000,
		.cpu_name		= "750GX",
666
		.cpu_features		= CPU_FTRS_750GX,
667
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
668 669 670
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
671
		.cpu_setup		= __setup_cpu_750fx,
672
		.machine_check		= machine_check_generic,
673
		.platform		= "ppc750",
L
Linus Torvalds 已提交
674 675 676 677 678
	},
	{	/* 740/750 (L2CR bit need fixup for 740) */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00080000,
		.cpu_name		= "740/750",
679
		.cpu_features		= CPU_FTRS_740,
680
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
681 682 683
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
684
		.cpu_setup		= __setup_cpu_750,
685
		.machine_check		= machine_check_generic,
686
		.platform		= "ppc750",
L
Linus Torvalds 已提交
687 688 689 690 691
	},
	{	/* 7400 rev 1.1 ? (no TAU) */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x000c1101,
		.cpu_name		= "7400 (1.1)",
692
		.cpu_features		= CPU_FTRS_7400_NOTAU,
693 694
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
695 696 697
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
698
		.cpu_setup		= __setup_cpu_7400,
699
		.machine_check		= machine_check_generic,
700
		.platform		= "ppc7400",
L
Linus Torvalds 已提交
701 702 703 704 705
	},
	{	/* 7400 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x000c0000,
		.cpu_name		= "7400",
706
		.cpu_features		= CPU_FTRS_7400,
707 708
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
709 710 711
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
712
		.cpu_setup		= __setup_cpu_7400,
713
		.machine_check		= machine_check_generic,
714
		.platform		= "ppc7400",
L
Linus Torvalds 已提交
715 716 717 718 719
	},
	{	/* 7410 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x800c0000,
		.cpu_name		= "7410",
720
		.cpu_features		= CPU_FTRS_7400,
721 722
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
723 724 725
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
726
		.cpu_setup		= __setup_cpu_7410,
727
		.machine_check		= machine_check_generic,
728
		.platform		= "ppc7400",
L
Linus Torvalds 已提交
729 730 731 732 733
	},
	{	/* 7450 2.0 - no doze/nap */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x80000200,
		.cpu_name		= "7450",
734
		.cpu_features		= CPU_FTRS_7450_20,
735 736
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
737 738 739
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
740 741
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
742
		.oprofile_type		= PPC_OPROFILE_G4,
743
		.machine_check		= machine_check_generic,
744
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
745 746 747 748 749
	},
	{	/* 7450 2.1 */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x80000201,
		.cpu_name		= "7450",
750
		.cpu_features		= CPU_FTRS_7450_21,
751 752
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
753 754 755
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
756 757
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
758
		.oprofile_type		= PPC_OPROFILE_G4,
759
		.machine_check		= machine_check_generic,
760
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
761 762 763 764 765
	},
	{	/* 7450 2.3 and newer */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80000000,
		.cpu_name		= "7450",
766
		.cpu_features		= CPU_FTRS_7450_23,
767 768
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
769 770 771
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
772 773
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
774
		.oprofile_type		= PPC_OPROFILE_G4,
775
		.machine_check		= machine_check_generic,
776
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
777 778 779 780 781
	},
	{	/* 7455 rev 1.x */
		.pvr_mask		= 0xffffff00,
		.pvr_value		= 0x80010100,
		.cpu_name		= "7455",
782
		.cpu_features		= CPU_FTRS_7455_1,
783 784
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
785 786 787
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
788 789
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
790
		.oprofile_type		= PPC_OPROFILE_G4,
791
		.machine_check		= machine_check_generic,
792
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
793 794 795 796 797
	},
	{	/* 7455 rev 2.0 */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x80010200,
		.cpu_name		= "7455",
798
		.cpu_features		= CPU_FTRS_7455_20,
799 800
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
801 802 803
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
804 805
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
806
		.oprofile_type		= PPC_OPROFILE_G4,
807
		.machine_check		= machine_check_generic,
808
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
809 810 811 812 813
	},
	{	/* 7455 others */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80010000,
		.cpu_name		= "7455",
814
		.cpu_features		= CPU_FTRS_7455,
815 816
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
817 818 819
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
820 821
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
822
		.oprofile_type		= PPC_OPROFILE_G4,
823
		.machine_check		= machine_check_generic,
824
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
825 826 827 828 829
	},
	{	/* 7447/7457 Rev 1.0 */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x80020100,
		.cpu_name		= "7447/7457",
830
		.cpu_features		= CPU_FTRS_7447_10,
831 832
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
833 834 835
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
836 837
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
838
		.oprofile_type		= PPC_OPROFILE_G4,
839
		.machine_check		= machine_check_generic,
840
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
841 842 843 844 845
	},
	{	/* 7447/7457 Rev 1.1 */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x80020101,
		.cpu_name		= "7447/7457",
846
		.cpu_features		= CPU_FTRS_7447_10,
847 848
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
849 850 851
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
852 853
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
854
		.oprofile_type		= PPC_OPROFILE_G4,
855
		.machine_check		= machine_check_generic,
856
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
857 858 859 860 861
	},
	{	/* 7447/7457 Rev 1.2 and later */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80020000,
		.cpu_name		= "7447/7457",
862
		.cpu_features		= CPU_FTRS_7447,
863
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
864 865 866
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
867 868
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
869
		.oprofile_type		= PPC_OPROFILE_G4,
870
		.machine_check		= machine_check_generic,
871
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
872 873 874 875 876
	},
	{	/* 7447A */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80030000,
		.cpu_name		= "7447A",
877
		.cpu_features		= CPU_FTRS_7447A,
878 879
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
880 881 882
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
883 884
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
885
		.oprofile_type		= PPC_OPROFILE_G4,
886
		.machine_check		= machine_check_generic,
887
		.platform		= "ppc7450",
888 889 890 891 892
	},
	{	/* 7448 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80040000,
		.cpu_name		= "7448",
893
		.cpu_features		= CPU_FTRS_7448,
894 895
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
896 897 898
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
899 900
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
901
		.oprofile_type		= PPC_OPROFILE_G4,
902
		.machine_check		= machine_check_generic,
903
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
904 905 906 907 908
	},
	{	/* 82xx (8240, 8245, 8260 are all 603e cores) */
		.pvr_mask		= 0x7fff0000,
		.pvr_value		= 0x00810000,
		.cpu_name		= "82xx",
909
		.cpu_features		= CPU_FTRS_82XX,
S
Stephen Rothwell 已提交
910
		.cpu_user_features	= COMMON_USER,
L
Linus Torvalds 已提交
911 912
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
913
		.cpu_setup		= __setup_cpu_603,
914
		.machine_check		= machine_check_generic,
915
		.platform		= "ppc603",
L
Linus Torvalds 已提交
916 917 918 919 920
	},
	{	/* All G2_LE (603e core, plus some) have the same pvr */
		.pvr_mask		= 0x7fff0000,
		.pvr_value		= 0x00820000,
		.cpu_name		= "G2_LE",
921
		.cpu_features		= CPU_FTRS_G2_LE,
S
Stephen Rothwell 已提交
922
		.cpu_user_features	= COMMON_USER,
L
Linus Torvalds 已提交
923 924
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
925
		.cpu_setup		= __setup_cpu_603,
926
		.machine_check		= machine_check_generic,
927
		.platform		= "ppc603",
L
Linus Torvalds 已提交
928
	},
929
	{	/* e300c1 (a 603e core, plus some) on 83xx */
L
Linus Torvalds 已提交
930 931
		.pvr_mask		= 0x7fff0000,
		.pvr_value		= 0x00830000,
932
		.cpu_name		= "e300c1",
933
		.cpu_features		= CPU_FTRS_E300,
S
Stephen Rothwell 已提交
934
		.cpu_user_features	= COMMON_USER,
L
Linus Torvalds 已提交
935 936
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
937
		.cpu_setup		= __setup_cpu_603,
938
		.machine_check		= machine_check_generic,
939
		.platform		= "ppc603",
L
Linus Torvalds 已提交
940
	},
941 942 943 944
	{	/* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
		.pvr_mask		= 0x7fff0000,
		.pvr_value		= 0x00840000,
		.cpu_name		= "e300c2",
945
		.cpu_features		= CPU_FTRS_E300C2,
946 947 948 949
		.cpu_user_features	= PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.cpu_setup		= __setup_cpu_603,
950
		.machine_check		= machine_check_generic,
951 952
		.platform		= "ppc603",
	},
L
Li Yang 已提交
953
	{	/* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
954 955 956 957 958 959 960 961 962 963
		.pvr_mask		= 0x7fff0000,
		.pvr_value		= 0x00850000,
		.cpu_name		= "e300c3",
		.cpu_features		= CPU_FTRS_E300,
		.cpu_user_features	= COMMON_USER,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.cpu_setup		= __setup_cpu_603,
		.platform		= "ppc603",
	},
L
Li Yang 已提交
964 965 966 967 968 969 970 971 972
	{	/* e300c4 (e300c1, plus one IU) */
		.pvr_mask		= 0x7fff0000,
		.pvr_value		= 0x00860000,
		.cpu_name		= "e300c4",
		.cpu_features		= CPU_FTRS_E300,
		.cpu_user_features	= COMMON_USER,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.cpu_setup		= __setup_cpu_603,
973
		.machine_check		= machine_check_generic,
L
Li Yang 已提交
974 975
		.platform		= "ppc603",
	},
L
Linus Torvalds 已提交
976 977 978 979
	{	/* default match, we assume split I/D cache & TB (non-601)... */
		.pvr_mask		= 0x00000000,
		.pvr_value		= 0x00000000,
		.cpu_name		= "(generic PPC)",
980
		.cpu_features		= CPU_FTRS_CLASSIC32,
S
Stephen Rothwell 已提交
981
		.cpu_user_features	= COMMON_USER,
L
Linus Torvalds 已提交
982 983
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
984
		.machine_check		= machine_check_generic,
985
		.platform		= "ppc603",
L
Linus Torvalds 已提交
986 987 988 989 990 991 992 993 994
	},
#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.... */
995
		.cpu_features		= CPU_FTRS_8XX,
L
Linus Torvalds 已提交
996 997 998
		.cpu_user_features	= PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
		.icache_bsize		= 16,
		.dcache_bsize		= 16,
999
		.platform		= "ppc823",
L
Linus Torvalds 已提交
1000 1001 1002 1003 1004 1005 1006
	},
#endif /* CONFIG_8xx */
#ifdef CONFIG_40x
	{	/* 403GC */
		.pvr_mask		= 0xffffff00,
		.pvr_value		= 0x00200200,
		.cpu_name		= "403GC",
1007
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1008 1009 1010
		.cpu_user_features	= PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
		.icache_bsize		= 16,
		.dcache_bsize		= 16,
1011
		.machine_check		= machine_check_4xx,
1012
		.platform		= "ppc403",
L
Linus Torvalds 已提交
1013 1014 1015 1016 1017
	},
	{	/* 403GCX */
		.pvr_mask		= 0xffffff00,
		.pvr_value		= 0x00201400,
		.cpu_name		= "403GCX",
1018
		.cpu_features		= CPU_FTRS_40X,
1019 1020
		.cpu_user_features	= PPC_FEATURE_32 |
		 	PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
L
Linus Torvalds 已提交
1021 1022
		.icache_bsize		= 16,
		.dcache_bsize		= 16,
1023
		.machine_check		= machine_check_4xx,
1024
		.platform		= "ppc403",
L
Linus Torvalds 已提交
1025 1026 1027 1028 1029
	},
	{	/* 403G ?? */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00200000,
		.cpu_name		= "403G ??",
1030
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1031 1032 1033
		.cpu_user_features	= PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
		.icache_bsize		= 16,
		.dcache_bsize		= 16,
1034
		.machine_check		= machine_check_4xx,
1035
		.platform		= "ppc403",
L
Linus Torvalds 已提交
1036 1037 1038 1039 1040
	},
	{	/* 405GP */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x40110000,
		.cpu_name		= "405GP",
1041
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1042 1043 1044 1045
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1046
		.machine_check		= machine_check_4xx,
1047
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1048 1049 1050 1051 1052
	},
	{	/* STB 03xxx */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x40130000,
		.cpu_name		= "STB03xxx",
1053
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1054 1055 1056 1057
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1058
		.machine_check		= machine_check_4xx,
1059
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1060 1061 1062 1063 1064
	},
	{	/* STB 04xxx */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x41810000,
		.cpu_name		= "STB04xxx",
1065
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1066 1067 1068 1069
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1070
		.machine_check		= machine_check_4xx,
1071
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1072 1073 1074 1075 1076
	},
	{	/* NP405L */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x41610000,
		.cpu_name		= "NP405L",
1077
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1078 1079 1080 1081
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1082
		.machine_check		= machine_check_4xx,
1083
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1084 1085 1086 1087 1088
	},
	{	/* NP4GS3 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x40B10000,
		.cpu_name		= "NP4GS3",
1089
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1090 1091 1092 1093
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1094
		.machine_check		= machine_check_4xx,
1095
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1096 1097 1098 1099 1100
	},
	{   /* NP405H */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x41410000,
		.cpu_name		= "NP405H",
1101
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1102 1103 1104 1105
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1106
		.machine_check		= machine_check_4xx,
1107
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1108 1109 1110 1111 1112
	},
	{	/* 405GPr */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x50910000,
		.cpu_name		= "405GPr",
1113
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1114 1115 1116 1117
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1118
		.machine_check		= machine_check_4xx,
1119
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1120 1121 1122 1123 1124
	},
	{   /* STBx25xx */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x51510000,
		.cpu_name		= "STBx25xx",
1125
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1126 1127 1128 1129
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1130
		.machine_check		= machine_check_4xx,
1131
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1132 1133 1134 1135 1136
	},
	{	/* 405LP */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x41F10000,
		.cpu_name		= "405LP",
1137
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1138 1139 1140
		.cpu_user_features	= PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1141
		.machine_check		= machine_check_4xx,
1142
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1143 1144
	},
	{	/* Xilinx Virtex-II Pro  */
1145
		.pvr_mask		= 0xfffff000,
L
Linus Torvalds 已提交
1146 1147
		.pvr_value		= 0x20010000,
		.cpu_name		= "Virtex-II Pro",
1148
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1149 1150 1151 1152
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1153
		.machine_check		= machine_check_4xx,
1154
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1155
	},
1156 1157 1158 1159 1160 1161 1162 1163 1164
	{	/* 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,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1165
		.machine_check		= machine_check_4xx,
1166
		.platform		= "ppc405",
1167
	},
1168 1169 1170 1171
	{	/* 405EP */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x51210000,
		.cpu_name		= "405EP",
1172
		.cpu_features		= CPU_FTRS_40X,
1173 1174 1175 1176
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1177
		.machine_check		= machine_check_4xx,
1178 1179 1180
		.platform		= "ppc405",
	},
	{	/* 405EX */
1181 1182
		.pvr_mask		= 0xffff0004,
		.pvr_value		= 0x12910004,
1183 1184
		.cpu_name		= "405EX",
		.cpu_features		= CPU_FTRS_40X,
1185 1186 1187 1188
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1189
		.machine_check		= machine_check_4xx,
1190
		.platform		= "ppc405",
1191
	},
1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203
	{	/* 405EXr */
		.pvr_mask		= 0xffff0004,
		.pvr_value		= 0x12910000,
		.cpu_name		= "405EXr",
		.cpu_features		= CPU_FTRS_40X,
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.machine_check		= machine_check_4xx,
		.platform		= "ppc405",
	},
L
Linus Torvalds 已提交
1204 1205 1206

#endif /* CONFIG_40x */
#ifdef CONFIG_44x
M
Matt Porter 已提交
1207 1208 1209
	{
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x40000850,
1210 1211 1212 1213 1214
		.cpu_name		= "440GR Rev. A",
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features	= COMMON_USER_BOOKE,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1215
		.machine_check		= machine_check_4xx,
1216 1217 1218 1219 1220
		.platform		= "ppc440",
	},
	{ /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x40000858,
M
Matt Porter 已提交
1221
		.cpu_name		= "440EP Rev. A",
1222
		.cpu_features		= CPU_FTRS_44X,
1223
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
M
Matt Porter 已提交
1224 1225
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1226
		.cpu_setup		= __setup_cpu_440ep,
1227
		.machine_check		= machine_check_4xx,
1228
		.platform		= "ppc440",
M
Matt Porter 已提交
1229 1230 1231 1232
	},
	{
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x400008d3,
1233
		.cpu_name		= "440GR Rev. B",
1234
		.cpu_features		= CPU_FTRS_44X,
1235
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
M
Matt Porter 已提交
1236 1237
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1238
		.machine_check		= machine_check_4xx,
1239
		.platform		= "ppc440",
M
Matt Porter 已提交
1240
	},
1241 1242 1243 1244
	{ /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x400008db,
		.cpu_name		= "440EP Rev. B",
1245 1246 1247 1248
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1249
		.cpu_setup		= __setup_cpu_440ep,
1250
		.machine_check		= machine_check_4xx,
1251
		.platform		= "ppc440",
1252 1253 1254
	},
	{ /* 440GRX */
		.pvr_mask		= 0xf0000ffb,
1255
		.pvr_value		= 0x200008D0,
1256 1257 1258 1259 1260
		.cpu_name		= "440GRX",
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features	= COMMON_USER_BOOKE,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1261
		.cpu_setup		= __setup_cpu_440grx,
1262
		.machine_check		= machine_check_440A,
1263
		.platform		= "ppc440",
1264
	},
1265 1266 1267 1268 1269 1270 1271 1272 1273
	{ /* 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,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.cpu_setup		= __setup_cpu_440epx,
1274
		.machine_check		= machine_check_440A,
1275 1276
		.platform		= "ppc440",
	},
S
Stephen Rothwell 已提交
1277
	{	/* 440GP Rev. B */
L
Linus Torvalds 已提交
1278 1279 1280
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x40000440,
		.cpu_name		= "440GP Rev. B",
1281
		.cpu_features		= CPU_FTRS_44X,
1282
		.cpu_user_features	= COMMON_USER_BOOKE,
L
Linus Torvalds 已提交
1283 1284
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1285
		.machine_check		= machine_check_4xx,
1286
		.platform		= "ppc440gp",
L
Linus Torvalds 已提交
1287
	},
S
Stephen Rothwell 已提交
1288
	{	/* 440GP Rev. C */
L
Linus Torvalds 已提交
1289 1290 1291
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x40000481,
		.cpu_name		= "440GP Rev. C",
1292
		.cpu_features		= CPU_FTRS_44X,
1293
		.cpu_user_features	= COMMON_USER_BOOKE,
L
Linus Torvalds 已提交
1294 1295
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1296
		.machine_check		= machine_check_4xx,
1297
		.platform		= "ppc440gp",
L
Linus Torvalds 已提交
1298 1299 1300 1301 1302
	},
	{ /* 440GX Rev. A */
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x50000850,
		.cpu_name		= "440GX Rev. A",
1303
		.cpu_features		= CPU_FTRS_44X,
1304
		.cpu_user_features	= COMMON_USER_BOOKE,
L
Linus Torvalds 已提交
1305 1306
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1307 1308
		.cpu_setup		= __setup_cpu_440gx,
		.machine_check		= machine_check_440A,
1309
		.platform		= "ppc440",
L
Linus Torvalds 已提交
1310 1311 1312 1313 1314
	},
	{ /* 440GX Rev. B */
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x50000851,
		.cpu_name		= "440GX Rev. B",
1315
		.cpu_features		= CPU_FTRS_44X,
1316
		.cpu_user_features	= COMMON_USER_BOOKE,
L
Linus Torvalds 已提交
1317 1318
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1319 1320
		.cpu_setup		= __setup_cpu_440gx,
		.machine_check		= machine_check_440A,
1321
		.platform		= "ppc440",
L
Linus Torvalds 已提交
1322 1323 1324 1325 1326
	},
	{ /* 440GX Rev. C */
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x50000892,
		.cpu_name		= "440GX Rev. C",
1327
		.cpu_features		= CPU_FTRS_44X,
1328
		.cpu_user_features	= COMMON_USER_BOOKE,
L
Linus Torvalds 已提交
1329 1330
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1331 1332
		.cpu_setup		= __setup_cpu_440gx,
		.machine_check		= machine_check_440A,
1333
		.platform		= "ppc440",
L
Linus Torvalds 已提交
1334
	},
1335 1336 1337 1338
	{ /* 440GX Rev. F */
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x50000894,
		.cpu_name		= "440GX Rev. F",
1339
		.cpu_features		= CPU_FTRS_44X,
1340
		.cpu_user_features	= COMMON_USER_BOOKE,
1341 1342
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1343 1344
		.cpu_setup		= __setup_cpu_440gx,
		.machine_check		= machine_check_440A,
1345
		.platform		= "ppc440",
1346
	},
1347
	{ /* 440SP Rev. A */
1348 1349
		.pvr_mask		= 0xfff00fff,
		.pvr_value		= 0x53200891,
1350
		.cpu_name		= "440SP Rev. A",
1351
		.cpu_features		= CPU_FTRS_44X,
1352
		.cpu_user_features	= COMMON_USER_BOOKE,
1353 1354
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1355
		.machine_check		= machine_check_4xx,
1356
		.platform		= "ppc440",
1357
	},
R
Roland Dreier 已提交
1358
	{ /* 440SPe Rev. A */
1359 1360 1361 1362 1363 1364 1365
		.pvr_mask               = 0xfff00fff,
		.pvr_value              = 0x53400890,
		.cpu_name               = "440SPe Rev. A",
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features      = COMMON_USER_BOOKE,
		.icache_bsize           = 32,
		.dcache_bsize           = 32,
1366 1367
		.cpu_setup		= __setup_cpu_440spe,
		.machine_check		= machine_check_440A,
1368 1369 1370 1371 1372 1373
		.platform               = "ppc440",
	},
	{ /* 440SPe Rev. B */
		.pvr_mask		= 0xfff00fff,
		.pvr_value		= 0x53400891,
		.cpu_name		= "440SPe Rev. B",
K
Kumar Gala 已提交
1374
		.cpu_features		= CPU_FTRS_44X,
1375
		.cpu_user_features	= COMMON_USER_BOOKE,
R
Roland Dreier 已提交
1376 1377
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1378 1379
		.cpu_setup		= __setup_cpu_440spe,
		.machine_check		= machine_check_440A,
1380
		.platform		= "ppc440",
R
Roland Dreier 已提交
1381
	},
L
Linus Torvalds 已提交
1382
#endif /* CONFIG_44x */
1383
#ifdef CONFIG_FSL_BOOKE
1384
#ifdef CONFIG_E200
S
Stephen Rothwell 已提交
1385
	{	/* e200z5 */
1386 1387 1388 1389
		.pvr_mask		= 0xfff00000,
		.pvr_value		= 0x81000000,
		.cpu_name		= "e200z5",
		/* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1390
		.cpu_features		= CPU_FTRS_E200,
1391 1392
		.cpu_user_features	= COMMON_USER_BOOKE |
			PPC_FEATURE_HAS_EFP_SINGLE |
1393 1394
			PPC_FEATURE_UNIFIED_CACHE,
		.dcache_bsize		= 32,
1395
		.machine_check		= machine_check_e200,
1396
		.platform		= "ppc5554",
1397
	},
S
Stephen Rothwell 已提交
1398
	{	/* e200z6 */
1399 1400 1401 1402
		.pvr_mask		= 0xfff00000,
		.pvr_value		= 0x81100000,
		.cpu_name		= "e200z6",
		/* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1403
		.cpu_features		= CPU_FTRS_E200,
1404
		.cpu_user_features	= COMMON_USER_BOOKE |
1405 1406
			PPC_FEATURE_HAS_SPE_COMP |
			PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1407 1408
			PPC_FEATURE_UNIFIED_CACHE,
		.dcache_bsize		= 32,
1409
		.machine_check		= machine_check_e200,
1410
		.platform		= "ppc5554",
1411
	},
1412
#elif defined(CONFIG_E500)
S
Stephen Rothwell 已提交
1413
	{	/* e500 */
L
Linus Torvalds 已提交
1414 1415 1416 1417
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80200000,
		.cpu_name		= "e500",
		/* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1418
		.cpu_features		= CPU_FTRS_E500,
1419
		.cpu_user_features	= COMMON_USER_BOOKE |
1420 1421
			PPC_FEATURE_HAS_SPE_COMP |
			PPC_FEATURE_HAS_EFP_SINGLE_COMP,
L
Linus Torvalds 已提交
1422 1423 1424
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
1425
		.oprofile_cpu_type	= "ppc/e500",
1426
		.oprofile_type		= PPC_OPROFILE_BOOKE,
1427
		.machine_check		= machine_check_e500,
1428
		.platform		= "ppc8540",
L
Linus Torvalds 已提交
1429
	},
S
Stephen Rothwell 已提交
1430
	{	/* e500v2 */
1431 1432 1433 1434
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80210000,
		.cpu_name		= "e500v2",
		/* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1435
		.cpu_features		= CPU_FTRS_E500_2,
1436
		.cpu_user_features	= COMMON_USER_BOOKE |
1437 1438 1439
			PPC_FEATURE_HAS_SPE_COMP |
			PPC_FEATURE_HAS_EFP_SINGLE_COMP |
			PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
1440 1441 1442
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
1443
		.oprofile_cpu_type	= "ppc/e500",
1444
		.oprofile_type		= PPC_OPROFILE_BOOKE,
1445
		.machine_check		= machine_check_e500,
1446
		.platform		= "ppc8548",
1447
	},
L
Linus Torvalds 已提交
1448
#endif
1449
#endif
L
Linus Torvalds 已提交
1450 1451 1452 1453 1454
#if !CLASSIC_PPC
	{	/* default match */
		.pvr_mask		= 0x00000000,
		.pvr_value		= 0x00000000,
		.cpu_name		= "(generic PPC)",
1455
		.cpu_features		= CPU_FTRS_GENERIC_32,
L
Linus Torvalds 已提交
1456 1457 1458
		.cpu_user_features	= PPC_FEATURE_32,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1459
		.platform		= "powerpc",
L
Linus Torvalds 已提交
1460 1461
	}
#endif /* !CLASSIC_PPC */
S
Stephen Rothwell 已提交
1462
#endif /* CONFIG_PPC32 */
L
Linus Torvalds 已提交
1463
};
1464

1465 1466 1467
static struct cpu_spec the_cpu_spec;

struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
1468 1469
{
	struct cpu_spec *s = cpu_specs;
1470
	struct cpu_spec *t = &the_cpu_spec;
1471 1472 1473
	int i;

	s = PTRRELOC(s);
1474
	t = PTRRELOC(t);
1475 1476 1477

	for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
		if ((pvr & s->pvr_mask) == s->pvr_value) {
1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495
			/*
			 * 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.
			 */
			if (t->num_pmcs && !s->num_pmcs) {
				t->cpu_name = s->cpu_name;
				t->cpu_features = s->cpu_features;
				t->cpu_user_features = s->cpu_user_features;
				t->icache_bsize = s->icache_bsize;
				t->dcache_bsize = s->dcache_bsize;
				t->cpu_setup = s->cpu_setup;
				t->cpu_restore = s->cpu_restore;
				t->platform = s->platform;
			} else
				*t = *s;
			*PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
1496 1497 1498 1499
#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
			/* 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.
1500
			 * we also don't need to PTRRELOC the function pointer
1501 1502
			 * on ppc64 and booke as we are running at 0 in real
			 * mode on ppc64 and reloc_offset is always 0 on booke.
1503 1504 1505 1506
			 */
			if (s->cpu_setup) {
				s->cpu_setup(offset, s);
			}
1507
#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
1508 1509 1510 1511 1512 1513
			return s;
		}
	BUG();
	return NULL;
}

1514
void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)
1515 1516 1517 1518
{
	struct fixup_entry {
		unsigned long	mask;
		unsigned long	value;
1519 1520
		long		start_off;
		long		end_off;
1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534
	} *fcur, *fend;

	fcur = fixup_start;
	fend = fixup_end;

	for (; fcur < fend; fcur++) {
		unsigned int *pstart, *pend, *p;

		if ((value & fcur->mask) == fcur->value)
			continue;

		/* These PTRRELOCs will disappear once the new scheme for
		 * modules and vdso is implemented
		 */
1535 1536
		pstart = ((unsigned int *)fcur) + (fcur->start_off / 4);
		pend = ((unsigned int *)fcur) + (fcur->end_off / 4);
1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547

		for (p = pstart; p < pend; p++) {
			*p = 0x60000000u;
			asm volatile ("dcbst 0, %0" : : "r" (p));
		}
		asm volatile ("sync" : : : "memory");
		for (p = pstart; p < pend; p++)
			asm volatile ("icbi 0,%0" : : "r" (p));
		asm volatile ("sync; isync" : : : "memory");
	}
}