blob: b936a1dd0a500adcf63f40a24538b57b32bd2609 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Linus Torvalds1da177e2005-04-16 15:20:36 -07002 * Copyright (C) 2001 Ben. Herrenschmidt (benh@kernel.crashing.org)
3 *
Stephen Rothwell49209602005-10-12 15:55:09 +10004 * Modifications for ppc64:
5 * Copyright (C) 2003 Dave Engebretsen <engebret@us.ibm.com>
6 *
Linus Torvalds1da177e2005-04-16 15:20:36 -07007 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version
10 * 2 of the License, or (at your option) any later version.
11 */
12
Linus Torvalds1da177e2005-04-16 15:20:36 -070013#include <linux/string.h>
14#include <linux/sched.h>
15#include <linux/threads.h>
16#include <linux/init.h>
Kumar Gala400d2212005-09-27 15:13:12 -050017#include <linux/module.h>
18
19#include <asm/oprofile_impl.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070020#include <asm/cputable.h>
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +100021#include <asm/prom.h> /* for PTRRELOC on ARCH=ppc */
Linus Torvalds1da177e2005-04-16 15:20:36 -070022
Kumar Gala400d2212005-09-27 15:13:12 -050023struct cpu_spec* cur_cpu_spec = NULL;
Stephen Rothwell49209602005-10-12 15:55:09 +100024EXPORT_SYMBOL(cur_cpu_spec);
Linus Torvalds1da177e2005-04-16 15:20:36 -070025
Stephen Rothwell49209602005-10-12 15:55:09 +100026/* NOTE:
27 * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's
28 * the responsibility of the appropriate CPU save/restore functions to
29 * eventually copy these settings over. Those save/restore aren't yet
30 * part of the cputable though. That has to be fixed for both ppc32
31 * and ppc64
32 */
Geoff Levandb26f1002006-05-19 14:24:18 +100033#ifdef CONFIG_PPC32
Valentine Barshak81127532007-09-22 00:46:57 +100034extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
35extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110036extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
Valentine Barshak340ffd22007-09-22 00:50:09 +100037extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110038extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
Stefan Roese464076a2008-02-24 08:07:41 +110039extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec);
Josh Boyer939e6222008-06-11 07:52:40 -040040extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec);
Kumar Gala400d2212005-09-27 15:13:12 -050041extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
42extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
43extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
44extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
45extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
46extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
47extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
48extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell49209602005-10-12 15:55:09 +100049#endif /* CONFIG_PPC32 */
Olof Johanssonf39b7a52006-08-11 00:07:08 -050050#ifdef CONFIG_PPC64
Kumar Gala400d2212005-09-27 15:13:12 -050051extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
Olof Johansson5b43d202006-10-04 23:41:41 -050052extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
Olof Johansson11999192007-02-04 16:36:51 -060053extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell40d244d2007-02-12 22:10:48 +110054extern void __restore_cpu_pa6t(void);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050055extern void __restore_cpu_ppc970(void);
Michael Neulinge952e6c2008-06-18 10:47:26 +100056extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec);
57extern void __restore_cpu_power7(void);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050058#endif /* CONFIG_PPC64 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070059
Linus Torvalds1da177e2005-04-16 15:20:36 -070060/* This table only contains "desktop" CPUs, it need to be filled with embedded
61 * ones as well...
62 */
Stephen Rothwell49209602005-10-12 15:55:09 +100063#define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
64 PPC_FEATURE_HAS_MMU)
65#define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +110066#define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +110067#define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
68 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
69#define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
70 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
Anton Blanchard03054d52006-04-29 09:51:06 +100071#define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
Paul Mackerrasfab5db92006-06-07 16:14:40 +100072 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
Nathan Lynch0f473312008-07-10 01:06:57 +100073 PPC_FEATURE_TRUE_LE | \
74 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Michael Neulinge952e6c2008-06-18 10:47:26 +100075#define COMMON_USER_POWER7 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
76 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
Nathan Lynch0f473312008-07-10 01:06:57 +100077 PPC_FEATURE_TRUE_LE | \
78 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -050079#define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
80 PPC_FEATURE_TRUE_LE | \
81 PPC_FEATURE_HAS_ALTIVEC_COMP)
Paul Mackerras80f15dc2006-01-14 10:11:39 +110082#define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
83 PPC_FEATURE_BOOKE)
Linus Torvalds1da177e2005-04-16 15:20:36 -070084
Paul Mackerras87a72f92007-10-04 14:18:01 +100085static struct cpu_spec __initdata cpu_specs[] = {
Stephen Rothwell49209602005-10-12 15:55:09 +100086#ifdef CONFIG_PPC64
87 { /* Power3 */
88 .pvr_mask = 0xffff0000,
89 .pvr_value = 0x00400000,
90 .cpu_name = "POWER3 (630)",
91 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +100092 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +100093 .icache_bsize = 128,
94 .dcache_bsize = 128,
95 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -060096 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +100097 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +000098 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110099 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100100 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +1000101 },
102 { /* Power3+ */
103 .pvr_mask = 0xffff0000,
104 .pvr_value = 0x00410000,
105 .cpu_name = "POWER3 (630+)",
106 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000107 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000108 .icache_bsize = 128,
109 .dcache_bsize = 128,
110 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600111 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000112 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000113 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100114 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100115 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +1000116 },
117 { /* Northstar */
118 .pvr_mask = 0xffff0000,
119 .pvr_value = 0x00330000,
120 .cpu_name = "RS64-II (northstar)",
121 .cpu_features = CPU_FTRS_RS64,
122 .cpu_user_features = COMMON_USER_PPC64,
123 .icache_bsize = 128,
124 .dcache_bsize = 128,
125 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600126 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000127 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000128 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100129 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100130 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000131 },
132 { /* Pulsar */
133 .pvr_mask = 0xffff0000,
134 .pvr_value = 0x00340000,
135 .cpu_name = "RS64-III (pulsar)",
136 .cpu_features = CPU_FTRS_RS64,
137 .cpu_user_features = COMMON_USER_PPC64,
138 .icache_bsize = 128,
139 .dcache_bsize = 128,
140 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600141 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000142 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000143 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100144 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100145 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000146 },
147 { /* I-star */
148 .pvr_mask = 0xffff0000,
149 .pvr_value = 0x00360000,
150 .cpu_name = "RS64-III (icestar)",
151 .cpu_features = CPU_FTRS_RS64,
152 .cpu_user_features = COMMON_USER_PPC64,
153 .icache_bsize = 128,
154 .dcache_bsize = 128,
155 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600156 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000157 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000158 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100159 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100160 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000161 },
162 { /* S-star */
163 .pvr_mask = 0xffff0000,
164 .pvr_value = 0x00370000,
165 .cpu_name = "RS64-IV (sstar)",
166 .cpu_features = CPU_FTRS_RS64,
167 .cpu_user_features = COMMON_USER_PPC64,
168 .icache_bsize = 128,
169 .dcache_bsize = 128,
170 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600171 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000172 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000173 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100174 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100175 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000176 },
177 { /* Power4 */
178 .pvr_mask = 0xffff0000,
179 .pvr_value = 0x00350000,
180 .cpu_name = "POWER4 (gp)",
181 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100182 .cpu_user_features = COMMON_USER_POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000183 .icache_bsize = 128,
184 .dcache_bsize = 128,
185 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600186 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000187 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000188 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100189 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100190 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000191 },
192 { /* Power4+ */
193 .pvr_mask = 0xffff0000,
194 .pvr_value = 0x00380000,
195 .cpu_name = "POWER4+ (gq)",
196 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100197 .cpu_user_features = COMMON_USER_POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000198 .icache_bsize = 128,
199 .dcache_bsize = 128,
200 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600201 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000202 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000203 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100204 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100205 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000206 },
207 { /* PPC970 */
208 .pvr_mask = 0xffff0000,
209 .pvr_value = 0x00390000,
210 .cpu_name = "PPC970",
211 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100212 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000213 PPC_FEATURE_HAS_ALTIVEC_COMP,
214 .icache_bsize = 128,
215 .dcache_bsize = 128,
216 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600217 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000218 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500219 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000220 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000221 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100222 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100223 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000224 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000225 { /* PPC970FX */
226 .pvr_mask = 0xffff0000,
227 .pvr_value = 0x003c0000,
228 .cpu_name = "PPC970FX",
Stephen Rothwell49209602005-10-12 15:55:09 +1000229 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100230 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000231 PPC_FEATURE_HAS_ALTIVEC_COMP,
232 .icache_bsize = 128,
233 .dcache_bsize = 128,
234 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600235 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000236 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500237 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000238 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000239 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100240 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100241 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000242 },
Olof Johansson3546e812007-02-26 00:35:14 -0600243 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
244 .pvr_mask = 0xffffffff,
245 .pvr_value = 0x00440100,
246 .cpu_name = "PPC970MP",
247 .cpu_features = CPU_FTRS_PPC970,
248 .cpu_user_features = COMMON_USER_POWER4 |
249 PPC_FEATURE_HAS_ALTIVEC_COMP,
250 .icache_bsize = 128,
251 .dcache_bsize = 128,
252 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000253 .pmc_type = PPC_PMC_IBM,
Olof Johansson3546e812007-02-26 00:35:14 -0600254 .cpu_setup = __setup_cpu_ppc970,
255 .cpu_restore = __restore_cpu_ppc970,
256 .oprofile_cpu_type = "ppc64/970MP",
257 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100258 .machine_check = machine_check_generic,
Olof Johansson3546e812007-02-26 00:35:14 -0600259 .platform = "ppc970",
260 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000261 { /* PPC970MP */
262 .pvr_mask = 0xffff0000,
263 .pvr_value = 0x00440000,
264 .cpu_name = "PPC970MP",
265 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100266 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000267 PPC_FEATURE_HAS_ALTIVEC_COMP,
268 .icache_bsize = 128,
269 .dcache_bsize = 128,
Anton Blanchard87af41b2006-05-05 05:44:26 +1000270 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000271 .pmc_type = PPC_PMC_IBM,
Olof Johansson5b43d202006-10-04 23:41:41 -0500272 .cpu_setup = __setup_cpu_ppc970MP,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500273 .cpu_restore = __restore_cpu_ppc970,
Mike Wolffecb3522006-11-21 14:41:54 -0600274 .oprofile_cpu_type = "ppc64/970MP",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000275 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100276 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100277 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000278 },
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500279 { /* PPC970GX */
280 .pvr_mask = 0xffff0000,
281 .pvr_value = 0x00450000,
282 .cpu_name = "PPC970GX",
283 .cpu_features = CPU_FTRS_PPC970,
284 .cpu_user_features = COMMON_USER_POWER4 |
285 PPC_FEATURE_HAS_ALTIVEC_COMP,
286 .icache_bsize = 128,
287 .dcache_bsize = 128,
288 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600289 .pmc_type = PPC_PMC_IBM,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500290 .cpu_setup = __setup_cpu_ppc970,
291 .oprofile_cpu_type = "ppc64/970",
292 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100293 .machine_check = machine_check_generic,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500294 .platform = "ppc970",
295 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100296 { /* Power5 GR */
Stephen Rothwell49209602005-10-12 15:55:09 +1000297 .pvr_mask = 0xffff0000,
298 .pvr_value = 0x003a0000,
299 .cpu_name = "POWER5 (gr)",
300 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100301 .cpu_user_features = COMMON_USER_POWER5,
Stephen Rothwell49209602005-10-12 15:55:09 +1000302 .icache_bsize = 128,
303 .dcache_bsize = 128,
304 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600305 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000306 .oprofile_cpu_type = "ppc64/power5",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000307 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000308 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
309 * and above but only works on POWER5 and above
310 */
311 .oprofile_mmcra_sihv = MMCRA_SIHV,
312 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100313 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100314 .platform = "power5",
Stephen Rothwell49209602005-10-12 15:55:09 +1000315 },
Mike Wolf31a12ce2007-07-10 13:13:47 -0500316 { /* Power5++ */
317 .pvr_mask = 0xffffff00,
318 .pvr_value = 0x003b0300,
319 .cpu_name = "POWER5+ (gs)",
320 .cpu_features = CPU_FTRS_POWER5,
321 .cpu_user_features = COMMON_USER_POWER5_PLUS,
322 .icache_bsize = 128,
323 .dcache_bsize = 128,
324 .num_pmcs = 6,
325 .oprofile_cpu_type = "ppc64/power5++",
326 .oprofile_type = PPC_OPROFILE_POWER4,
327 .oprofile_mmcra_sihv = MMCRA_SIHV,
328 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100329 .machine_check = machine_check_generic,
Mike Wolf31a12ce2007-07-10 13:13:47 -0500330 .platform = "power5+",
331 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100332 { /* Power5 GS */
Stephen Rothwell49209602005-10-12 15:55:09 +1000333 .pvr_mask = 0xffff0000,
334 .pvr_value = 0x003b0000,
Anton Blanchard834608f2006-01-09 15:42:30 +1100335 .cpu_name = "POWER5+ (gs)",
Stephen Rothwell49209602005-10-12 15:55:09 +1000336 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100337 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Stephen Rothwell49209602005-10-12 15:55:09 +1000338 .icache_bsize = 128,
339 .dcache_bsize = 128,
340 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600341 .pmc_type = PPC_PMC_IBM,
Anton Blanchard834608f2006-01-09 15:42:30 +1100342 .oprofile_cpu_type = "ppc64/power5+",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000343 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000344 .oprofile_mmcra_sihv = MMCRA_SIHV,
345 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100346 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100347 .platform = "power5+",
Stephen Rothwell49209602005-10-12 15:55:09 +1000348 },
Paul Mackerras974a76f2006-11-10 20:38:53 +1100349 { /* POWER6 in P5+ mode; 2.04-compliant processor */
350 .pvr_mask = 0xffffffff,
351 .pvr_value = 0x0f000001,
352 .cpu_name = "POWER5+",
353 .cpu_features = CPU_FTRS_POWER5,
354 .cpu_user_features = COMMON_USER_POWER5_PLUS,
355 .icache_bsize = 128,
356 .dcache_bsize = 128,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100357 .machine_check = machine_check_generic,
Torez Smith79e25ba2008-07-18 06:42:07 +1000358 .oprofile_cpu_type = "ppc64/compat-power5+",
Paul Mackerras974a76f2006-11-10 20:38:53 +1100359 .platform = "power5+",
360 },
Anton Blanchard03054d52006-04-29 09:51:06 +1000361 { /* Power6 */
362 .pvr_mask = 0xffff0000,
363 .pvr_value = 0x003e0000,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100364 .cpu_name = "POWER6 (raw)",
365 .cpu_features = CPU_FTRS_POWER6,
366 .cpu_user_features = COMMON_USER_POWER6 |
367 PPC_FEATURE_POWER6_EXT,
368 .icache_bsize = 128,
369 .dcache_bsize = 128,
370 .num_pmcs = 6,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000371 .pmc_type = PPC_PMC_IBM,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100372 .oprofile_cpu_type = "ppc64/power6",
373 .oprofile_type = PPC_OPROFILE_POWER4,
374 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
375 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
376 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
377 POWER6_MMCRA_OTHER,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100378 .machine_check = machine_check_generic,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100379 .platform = "power6x",
380 },
381 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
382 .pvr_mask = 0xffffffff,
383 .pvr_value = 0x0f000002,
384 .cpu_name = "POWER6 (architected)",
Anton Blanchard03054d52006-04-29 09:51:06 +1000385 .cpu_features = CPU_FTRS_POWER6,
386 .cpu_user_features = COMMON_USER_POWER6,
387 .icache_bsize = 128,
388 .dcache_bsize = 128,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100389 .machine_check = machine_check_generic,
Torez Smith79e25ba2008-07-18 06:42:07 +1000390 .oprofile_cpu_type = "ppc64/compat-power6",
Anton Blanchard03054d52006-04-29 09:51:06 +1000391 .platform = "power6",
392 },
Joel Schopp635f5a62008-06-19 06:18:21 +1000393 { /* 2.06-compliant processor, i.e. Power7 "architected" mode */
394 .pvr_mask = 0xffffffff,
395 .pvr_value = 0x0f000003,
396 .cpu_name = "POWER7 (architected)",
397 .cpu_features = CPU_FTRS_POWER7,
398 .cpu_user_features = COMMON_USER_POWER7,
399 .icache_bsize = 128,
400 .dcache_bsize = 128,
401 .machine_check = machine_check_generic,
Torez Smith79e25ba2008-07-18 06:42:07 +1000402 .oprofile_cpu_type = "ppc64/compat-power7",
Joel Schopp635f5a62008-06-19 06:18:21 +1000403 .platform = "power7",
404 },
Michael Neulinge952e6c2008-06-18 10:47:26 +1000405 { /* Power7 */
406 .pvr_mask = 0xffff0000,
407 .pvr_value = 0x003f0000,
Joel Schopp635f5a62008-06-19 06:18:21 +1000408 .cpu_name = "POWER7 (raw)",
Michael Neulinge952e6c2008-06-18 10:47:26 +1000409 .cpu_features = CPU_FTRS_POWER7,
410 .cpu_user_features = COMMON_USER_POWER7,
411 .icache_bsize = 128,
412 .dcache_bsize = 128,
413 .num_pmcs = 6,
414 .pmc_type = PPC_PMC_IBM,
415 .cpu_setup = __setup_cpu_power7,
416 .cpu_restore = __restore_cpu_power7,
417 .oprofile_cpu_type = "ppc64/power7",
418 .oprofile_type = PPC_OPROFILE_POWER4,
419 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
420 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
421 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
422 POWER6_MMCRA_OTHER,
423 .platform = "power7",
424 },
Arnd Bergmannc902be72006-01-04 19:55:53 +0000425 { /* Cell Broadband Engine */
Stephen Rothwell49209602005-10-12 15:55:09 +1000426 .pvr_mask = 0xffff0000,
427 .pvr_value = 0x00700000,
428 .cpu_name = "Cell Broadband Engine",
429 .cpu_features = CPU_FTRS_CELL,
430 .cpu_user_features = COMMON_USER_PPC64 |
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +1100431 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
432 PPC_FEATURE_SMT,
Stephen Rothwell49209602005-10-12 15:55:09 +1000433 .icache_bsize = 128,
434 .dcache_bsize = 128,
Maynard Johnson18f21902006-11-20 18:45:16 +0100435 .num_pmcs = 4,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600436 .pmc_type = PPC_PMC_IBM,
Maynard Johnson18f21902006-11-20 18:45:16 +0100437 .oprofile_cpu_type = "ppc64/cell-be",
438 .oprofile_type = PPC_OPROFILE_CELL,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100439 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100440 .platform = "ppc-cell-be",
Stephen Rothwell49209602005-10-12 15:55:09 +1000441 },
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500442 { /* PA Semi PA6T */
443 .pvr_mask = 0x7fff0000,
444 .pvr_value = 0x00900000,
445 .cpu_name = "PA6T",
446 .cpu_features = CPU_FTRS_PA6T,
447 .cpu_user_features = COMMON_USER_PA6T,
448 .icache_bsize = 64,
449 .dcache_bsize = 64,
450 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600451 .pmc_type = PPC_PMC_PA6T,
Olof Johansson11999192007-02-04 16:36:51 -0600452 .cpu_setup = __setup_cpu_pa6t,
453 .cpu_restore = __restore_cpu_pa6t,
Olof Johansson25fc5302007-04-18 16:38:21 +1000454 .oprofile_cpu_type = "ppc64/pa6t",
455 .oprofile_type = PPC_OPROFILE_PA6T,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100456 .machine_check = machine_check_generic,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500457 .platform = "pa6t",
458 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000459 { /* default match */
460 .pvr_mask = 0x00000000,
461 .pvr_value = 0x00000000,
462 .cpu_name = "POWER4 (compatible)",
463 .cpu_features = CPU_FTRS_COMPATIBLE,
464 .cpu_user_features = COMMON_USER_PPC64,
465 .icache_bsize = 128,
466 .dcache_bsize = 128,
467 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600468 .pmc_type = PPC_PMC_IBM,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100469 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100470 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000471 }
472#endif /* CONFIG_PPC64 */
473#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -0700474#if CLASSIC_PPC
Stephen Rothwell49209602005-10-12 15:55:09 +1000475 { /* 601 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700476 .pvr_mask = 0xffff0000,
477 .pvr_value = 0x00010000,
478 .cpu_name = "601",
Kumar Gala10b35d92005-09-23 14:08:58 -0500479 .cpu_features = CPU_FTRS_PPC601,
Stephen Rothwell49209602005-10-12 15:55:09 +1000480 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
Paul Mackerras98599012005-10-22 16:51:34 +1000481 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700482 .icache_bsize = 32,
483 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100484 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100485 .platform = "ppc601",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700486 },
487 { /* 603 */
488 .pvr_mask = 0xffff0000,
489 .pvr_value = 0x00030000,
490 .cpu_name = "603",
Kumar Gala10b35d92005-09-23 14:08:58 -0500491 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000492 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700493 .icache_bsize = 32,
494 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100495 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100496 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100497 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700498 },
499 { /* 603e */
500 .pvr_mask = 0xffff0000,
501 .pvr_value = 0x00060000,
502 .cpu_name = "603e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500503 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000504 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700505 .icache_bsize = 32,
506 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100507 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100508 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100509 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700510 },
511 { /* 603ev */
512 .pvr_mask = 0xffff0000,
513 .pvr_value = 0x00070000,
514 .cpu_name = "603ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500515 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000516 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700517 .icache_bsize = 32,
518 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100519 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100520 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100521 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700522 },
523 { /* 604 */
524 .pvr_mask = 0xffff0000,
525 .pvr_value = 0x00040000,
526 .cpu_name = "604",
Kumar Gala10b35d92005-09-23 14:08:58 -0500527 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000528 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700529 .icache_bsize = 32,
530 .dcache_bsize = 32,
531 .num_pmcs = 2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100532 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100533 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100534 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700535 },
536 { /* 604e */
537 .pvr_mask = 0xfffff000,
538 .pvr_value = 0x00090000,
539 .cpu_name = "604e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500540 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000541 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700542 .icache_bsize = 32,
543 .dcache_bsize = 32,
544 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100545 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100546 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100547 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700548 },
549 { /* 604r */
550 .pvr_mask = 0xffff0000,
551 .pvr_value = 0x00090000,
552 .cpu_name = "604r",
Kumar Gala10b35d92005-09-23 14:08:58 -0500553 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000554 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700555 .icache_bsize = 32,
556 .dcache_bsize = 32,
557 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100558 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100559 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100560 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700561 },
562 { /* 604ev */
563 .pvr_mask = 0xffff0000,
564 .pvr_value = 0x000a0000,
565 .cpu_name = "604ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500566 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000567 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700568 .icache_bsize = 32,
569 .dcache_bsize = 32,
570 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100571 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100572 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100573 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700574 },
575 { /* 740/750 (0x4202, don't support TAU ?) */
576 .pvr_mask = 0xffffffff,
577 .pvr_value = 0x00084202,
578 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500579 .cpu_features = CPU_FTRS_740_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000580 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700581 .icache_bsize = 32,
582 .dcache_bsize = 32,
583 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100584 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100585 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100586 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700587 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700588 { /* 750CX (80100 and 8010x?) */
589 .pvr_mask = 0xfffffff0,
590 .pvr_value = 0x00080100,
591 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500592 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000593 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700594 .icache_bsize = 32,
595 .dcache_bsize = 32,
596 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100597 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100598 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100599 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700600 },
601 { /* 750CX (82201 and 82202) */
602 .pvr_mask = 0xfffffff0,
603 .pvr_value = 0x00082200,
604 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500605 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000606 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700607 .icache_bsize = 32,
608 .dcache_bsize = 32,
609 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100610 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100611 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100612 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700613 },
614 { /* 750CXe (82214) */
615 .pvr_mask = 0xfffffff0,
616 .pvr_value = 0x00082210,
617 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500618 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000619 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700620 .icache_bsize = 32,
621 .dcache_bsize = 32,
622 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100623 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100624 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100625 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700626 },
Arthur Othieno7c316252005-09-03 15:55:52 -0700627 { /* 750CXe "Gekko" (83214) */
628 .pvr_mask = 0xffffffff,
629 .pvr_value = 0x00083214,
630 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500631 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000632 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Arthur Othieno7c316252005-09-03 15:55:52 -0700633 .icache_bsize = 32,
634 .dcache_bsize = 32,
635 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100636 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100637 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100638 .platform = "ppc750",
Arthur Othieno7c316252005-09-03 15:55:52 -0700639 },
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500640 { /* 750CL */
641 .pvr_mask = 0xfffff0f0,
642 .pvr_value = 0x00087010,
643 .cpu_name = "750CL",
Josh Boyera14c4502007-04-13 04:33:25 +1000644 .cpu_features = CPU_FTRS_750CL,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500645 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
646 .icache_bsize = 32,
647 .dcache_bsize = 32,
648 .num_pmcs = 4,
Josh Boyera14c4502007-04-13 04:33:25 +1000649 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100650 .machine_check = machine_check_generic,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500651 .platform = "ppc750",
652 },
Arthur Othienoac1ff042005-09-03 15:55:51 -0700653 { /* 745/755 */
654 .pvr_mask = 0xfffff000,
655 .pvr_value = 0x00083000,
656 .cpu_name = "745/755",
Kumar Gala10b35d92005-09-23 14:08:58 -0500657 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000658 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Arthur Othienoac1ff042005-09-03 15:55:51 -0700659 .icache_bsize = 32,
660 .dcache_bsize = 32,
661 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100662 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100663 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100664 .platform = "ppc750",
Arthur Othienoac1ff042005-09-03 15:55:51 -0700665 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700666 { /* 750FX rev 1.x */
667 .pvr_mask = 0xffffff00,
668 .pvr_value = 0x70000100,
669 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500670 .cpu_features = CPU_FTRS_750FX1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000671 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700672 .icache_bsize = 32,
673 .dcache_bsize = 32,
674 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100675 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100676 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100677 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700678 },
679 { /* 750FX rev 2.0 must disable HID0[DPM] */
680 .pvr_mask = 0xffffffff,
681 .pvr_value = 0x70000200,
682 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500683 .cpu_features = CPU_FTRS_750FX2,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000684 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700685 .icache_bsize = 32,
686 .dcache_bsize = 32,
687 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100688 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100689 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100690 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700691 },
692 { /* 750FX (All revs except 2.0) */
693 .pvr_mask = 0xffff0000,
694 .pvr_value = 0x70000000,
695 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500696 .cpu_features = CPU_FTRS_750FX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000697 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700698 .icache_bsize = 32,
699 .dcache_bsize = 32,
700 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100701 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100702 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100703 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700704 },
705 { /* 750GX */
706 .pvr_mask = 0xffff0000,
707 .pvr_value = 0x70020000,
708 .cpu_name = "750GX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500709 .cpu_features = CPU_FTRS_750GX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000710 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700711 .icache_bsize = 32,
712 .dcache_bsize = 32,
713 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100714 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100715 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100716 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700717 },
718 { /* 740/750 (L2CR bit need fixup for 740) */
719 .pvr_mask = 0xffff0000,
720 .pvr_value = 0x00080000,
721 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500722 .cpu_features = CPU_FTRS_740,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000723 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700724 .icache_bsize = 32,
725 .dcache_bsize = 32,
726 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100727 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100728 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100729 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700730 },
731 { /* 7400 rev 1.1 ? (no TAU) */
732 .pvr_mask = 0xffffffff,
733 .pvr_value = 0x000c1101,
734 .cpu_name = "7400 (1.1)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500735 .cpu_features = CPU_FTRS_7400_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000736 .cpu_user_features = COMMON_USER |
737 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700738 .icache_bsize = 32,
739 .dcache_bsize = 32,
740 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100741 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100742 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100743 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700744 },
745 { /* 7400 */
746 .pvr_mask = 0xffff0000,
747 .pvr_value = 0x000c0000,
748 .cpu_name = "7400",
Kumar Gala10b35d92005-09-23 14:08:58 -0500749 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000750 .cpu_user_features = COMMON_USER |
751 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700752 .icache_bsize = 32,
753 .dcache_bsize = 32,
754 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100755 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100756 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100757 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700758 },
759 { /* 7410 */
760 .pvr_mask = 0xffff0000,
761 .pvr_value = 0x800c0000,
762 .cpu_name = "7410",
Kumar Gala10b35d92005-09-23 14:08:58 -0500763 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000764 .cpu_user_features = COMMON_USER |
765 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700766 .icache_bsize = 32,
767 .dcache_bsize = 32,
768 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100769 .cpu_setup = __setup_cpu_7410,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100770 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100771 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700772 },
773 { /* 7450 2.0 - no doze/nap */
774 .pvr_mask = 0xffffffff,
775 .pvr_value = 0x80000200,
776 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500777 .cpu_features = CPU_FTRS_7450_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000778 .cpu_user_features = COMMON_USER |
779 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700780 .icache_bsize = 32,
781 .dcache_bsize = 32,
782 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600783 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600784 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000785 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100786 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100787 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700788 },
789 { /* 7450 2.1 */
790 .pvr_mask = 0xffffffff,
791 .pvr_value = 0x80000201,
792 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500793 .cpu_features = CPU_FTRS_7450_21,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000794 .cpu_user_features = COMMON_USER |
795 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700796 .icache_bsize = 32,
797 .dcache_bsize = 32,
798 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600799 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600800 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000801 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100802 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100803 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700804 },
805 { /* 7450 2.3 and newer */
806 .pvr_mask = 0xffff0000,
807 .pvr_value = 0x80000000,
808 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500809 .cpu_features = CPU_FTRS_7450_23,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000810 .cpu_user_features = COMMON_USER |
811 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700812 .icache_bsize = 32,
813 .dcache_bsize = 32,
814 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600815 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600816 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000817 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100818 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100819 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700820 },
821 { /* 7455 rev 1.x */
822 .pvr_mask = 0xffffff00,
823 .pvr_value = 0x80010100,
824 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500825 .cpu_features = CPU_FTRS_7455_1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000826 .cpu_user_features = COMMON_USER |
827 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700828 .icache_bsize = 32,
829 .dcache_bsize = 32,
830 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600831 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600832 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000833 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100834 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100835 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700836 },
837 { /* 7455 rev 2.0 */
838 .pvr_mask = 0xffffffff,
839 .pvr_value = 0x80010200,
840 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500841 .cpu_features = CPU_FTRS_7455_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000842 .cpu_user_features = COMMON_USER |
843 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700844 .icache_bsize = 32,
845 .dcache_bsize = 32,
846 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600847 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600848 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000849 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100850 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100851 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700852 },
853 { /* 7455 others */
854 .pvr_mask = 0xffff0000,
855 .pvr_value = 0x80010000,
856 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500857 .cpu_features = CPU_FTRS_7455,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000858 .cpu_user_features = COMMON_USER |
859 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700860 .icache_bsize = 32,
861 .dcache_bsize = 32,
862 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600863 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600864 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000865 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100866 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100867 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700868 },
869 { /* 7447/7457 Rev 1.0 */
870 .pvr_mask = 0xffffffff,
871 .pvr_value = 0x80020100,
872 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500873 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000874 .cpu_user_features = COMMON_USER |
875 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700876 .icache_bsize = 32,
877 .dcache_bsize = 32,
878 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600879 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600880 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000881 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100882 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100883 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700884 },
885 { /* 7447/7457 Rev 1.1 */
886 .pvr_mask = 0xffffffff,
887 .pvr_value = 0x80020101,
888 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500889 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000890 .cpu_user_features = COMMON_USER |
891 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700892 .icache_bsize = 32,
893 .dcache_bsize = 32,
894 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600895 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600896 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000897 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100898 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100899 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700900 },
901 { /* 7447/7457 Rev 1.2 and later */
902 .pvr_mask = 0xffff0000,
903 .pvr_value = 0x80020000,
904 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500905 .cpu_features = CPU_FTRS_7447,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000906 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700907 .icache_bsize = 32,
908 .dcache_bsize = 32,
909 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600910 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600911 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000912 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100913 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100914 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700915 },
916 { /* 7447A */
917 .pvr_mask = 0xffff0000,
918 .pvr_value = 0x80030000,
919 .cpu_name = "7447A",
Kumar Gala10b35d92005-09-23 14:08:58 -0500920 .cpu_features = CPU_FTRS_7447A,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000921 .cpu_user_features = COMMON_USER |
922 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700923 .icache_bsize = 32,
924 .dcache_bsize = 32,
925 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600926 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600927 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000928 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100929 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100930 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700931 },
Kumar Galabbde6302005-09-03 15:55:55 -0700932 { /* 7448 */
933 .pvr_mask = 0xffff0000,
934 .pvr_value = 0x80040000,
935 .cpu_name = "7448",
James.Yang3d372542007-05-02 16:34:43 -0500936 .cpu_features = CPU_FTRS_7448,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000937 .cpu_user_features = COMMON_USER |
938 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Kumar Galabbde6302005-09-03 15:55:55 -0700939 .icache_bsize = 32,
940 .dcache_bsize = 32,
941 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600942 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600943 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000944 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100945 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100946 .platform = "ppc7450",
Kumar Galabbde6302005-09-03 15:55:55 -0700947 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700948 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
949 .pvr_mask = 0x7fff0000,
950 .pvr_value = 0x00810000,
951 .cpu_name = "82xx",
Kumar Gala10b35d92005-09-23 14:08:58 -0500952 .cpu_features = CPU_FTRS_82XX,
Stephen Rothwell49209602005-10-12 15:55:09 +1000953 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700954 .icache_bsize = 32,
955 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100956 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100957 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100958 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700959 },
960 { /* All G2_LE (603e core, plus some) have the same pvr */
961 .pvr_mask = 0x7fff0000,
962 .pvr_value = 0x00820000,
963 .cpu_name = "G2_LE",
Kumar Gala10b35d92005-09-23 14:08:58 -0500964 .cpu_features = CPU_FTRS_G2_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000965 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700966 .icache_bsize = 32,
967 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100968 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100969 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100970 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700971 },
Kim Phillips6c4a2502006-10-02 20:10:24 -0500972 { /* e300c1 (a 603e core, plus some) on 83xx */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700973 .pvr_mask = 0x7fff0000,
974 .pvr_value = 0x00830000,
Kim Phillips6c4a2502006-10-02 20:10:24 -0500975 .cpu_name = "e300c1",
Kumar Gala10b35d92005-09-23 14:08:58 -0500976 .cpu_features = CPU_FTRS_E300,
Stephen Rothwell49209602005-10-12 15:55:09 +1000977 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700978 .icache_bsize = 32,
979 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100980 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100981 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100982 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700983 },
Kim Phillips6c4a2502006-10-02 20:10:24 -0500984 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
985 .pvr_mask = 0x7fff0000,
986 .pvr_value = 0x00840000,
987 .cpu_name = "e300c2",
Kim Phillipsaa42c692006-12-08 02:43:30 -0600988 .cpu_features = CPU_FTRS_E300C2,
Kim Phillips6c4a2502006-10-02 20:10:24 -0500989 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
990 .icache_bsize = 32,
991 .dcache_bsize = 32,
992 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100993 .machine_check = machine_check_generic,
Kim Phillips6c4a2502006-10-02 20:10:24 -0500994 .platform = "ppc603",
995 },
Li Yanga58d5242007-10-19 19:38:42 +0800996 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
Scott Wood57933f82006-12-01 12:57:05 -0600997 .pvr_mask = 0x7fff0000,
998 .pvr_value = 0x00850000,
999 .cpu_name = "e300c3",
1000 .cpu_features = CPU_FTRS_E300,
1001 .cpu_user_features = COMMON_USER,
1002 .icache_bsize = 32,
1003 .dcache_bsize = 32,
1004 .cpu_setup = __setup_cpu_603,
Andy Fleming1347a2c2008-02-04 18:28:07 -06001005 .num_pmcs = 4,
1006 .oprofile_cpu_type = "ppc/e300",
1007 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Scott Wood57933f82006-12-01 12:57:05 -06001008 .platform = "ppc603",
1009 },
Li Yanga58d5242007-10-19 19:38:42 +08001010 { /* e300c4 (e300c1, plus one IU) */
1011 .pvr_mask = 0x7fff0000,
1012 .pvr_value = 0x00860000,
1013 .cpu_name = "e300c4",
1014 .cpu_features = CPU_FTRS_E300,
1015 .cpu_user_features = COMMON_USER,
1016 .icache_bsize = 32,
1017 .dcache_bsize = 32,
1018 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001019 .machine_check = machine_check_generic,
Andy Fleming1347a2c2008-02-04 18:28:07 -06001020 .num_pmcs = 4,
1021 .oprofile_cpu_type = "ppc/e300",
1022 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Li Yanga58d5242007-10-19 19:38:42 +08001023 .platform = "ppc603",
1024 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001025 { /* default match, we assume split I/D cache & TB (non-601)... */
1026 .pvr_mask = 0x00000000,
1027 .pvr_value = 0x00000000,
1028 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -05001029 .cpu_features = CPU_FTRS_CLASSIC32,
Stephen Rothwell49209602005-10-12 15:55:09 +10001030 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001031 .icache_bsize = 32,
1032 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001033 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001034 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001035 },
1036#endif /* CLASSIC_PPC */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001037#ifdef CONFIG_8xx
1038 { /* 8xx */
1039 .pvr_mask = 0xffff0000,
1040 .pvr_value = 0x00500000,
1041 .cpu_name = "8xx",
1042 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1043 * if the 8xx code is there.... */
Kumar Gala10b35d92005-09-23 14:08:58 -05001044 .cpu_features = CPU_FTRS_8XX,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001045 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1046 .icache_bsize = 16,
1047 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001048 .platform = "ppc823",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001049 },
1050#endif /* CONFIG_8xx */
1051#ifdef CONFIG_40x
1052 { /* 403GC */
1053 .pvr_mask = 0xffffff00,
1054 .pvr_value = 0x00200200,
1055 .cpu_name = "403GC",
Kumar Gala10b35d92005-09-23 14:08:58 -05001056 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001057 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1058 .icache_bsize = 16,
1059 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001060 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001061 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001062 },
1063 { /* 403GCX */
1064 .pvr_mask = 0xffffff00,
1065 .pvr_value = 0x00201400,
1066 .cpu_name = "403GCX",
Kumar Gala10b35d92005-09-23 14:08:58 -05001067 .cpu_features = CPU_FTRS_40X,
Paul Mackerras98599012005-10-22 16:51:34 +10001068 .cpu_user_features = PPC_FEATURE_32 |
1069 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001070 .icache_bsize = 16,
1071 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001072 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001073 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001074 },
1075 { /* 403G ?? */
1076 .pvr_mask = 0xffff0000,
1077 .pvr_value = 0x00200000,
1078 .cpu_name = "403G ??",
Kumar Gala10b35d92005-09-23 14:08:58 -05001079 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001080 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1081 .icache_bsize = 16,
1082 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001083 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001084 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001085 },
1086 { /* 405GP */
1087 .pvr_mask = 0xffff0000,
1088 .pvr_value = 0x40110000,
1089 .cpu_name = "405GP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001090 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001091 .cpu_user_features = PPC_FEATURE_32 |
1092 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1093 .icache_bsize = 32,
1094 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001095 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001096 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001097 },
1098 { /* STB 03xxx */
1099 .pvr_mask = 0xffff0000,
1100 .pvr_value = 0x40130000,
1101 .cpu_name = "STB03xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001102 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001103 .cpu_user_features = PPC_FEATURE_32 |
1104 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1105 .icache_bsize = 32,
1106 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001107 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001108 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001109 },
1110 { /* STB 04xxx */
1111 .pvr_mask = 0xffff0000,
1112 .pvr_value = 0x41810000,
1113 .cpu_name = "STB04xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001114 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001115 .cpu_user_features = PPC_FEATURE_32 |
1116 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1117 .icache_bsize = 32,
1118 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001119 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001120 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001121 },
1122 { /* NP405L */
1123 .pvr_mask = 0xffff0000,
1124 .pvr_value = 0x41610000,
1125 .cpu_name = "NP405L",
Kumar Gala10b35d92005-09-23 14:08:58 -05001126 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001127 .cpu_user_features = PPC_FEATURE_32 |
1128 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1129 .icache_bsize = 32,
1130 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001131 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001132 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001133 },
1134 { /* NP4GS3 */
1135 .pvr_mask = 0xffff0000,
1136 .pvr_value = 0x40B10000,
1137 .cpu_name = "NP4GS3",
Kumar Gala10b35d92005-09-23 14:08:58 -05001138 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001139 .cpu_user_features = PPC_FEATURE_32 |
1140 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1141 .icache_bsize = 32,
1142 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001143 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001144 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001145 },
1146 { /* NP405H */
1147 .pvr_mask = 0xffff0000,
1148 .pvr_value = 0x41410000,
1149 .cpu_name = "NP405H",
Kumar Gala10b35d92005-09-23 14:08:58 -05001150 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001151 .cpu_user_features = PPC_FEATURE_32 |
1152 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1153 .icache_bsize = 32,
1154 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001155 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001156 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001157 },
1158 { /* 405GPr */
1159 .pvr_mask = 0xffff0000,
1160 .pvr_value = 0x50910000,
1161 .cpu_name = "405GPr",
Kumar Gala10b35d92005-09-23 14:08:58 -05001162 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001163 .cpu_user_features = PPC_FEATURE_32 |
1164 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1165 .icache_bsize = 32,
1166 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001167 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001168 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001169 },
1170 { /* STBx25xx */
1171 .pvr_mask = 0xffff0000,
1172 .pvr_value = 0x51510000,
1173 .cpu_name = "STBx25xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001174 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001175 .cpu_user_features = PPC_FEATURE_32 |
1176 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1177 .icache_bsize = 32,
1178 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001179 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001180 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001181 },
1182 { /* 405LP */
1183 .pvr_mask = 0xffff0000,
1184 .pvr_value = 0x41F10000,
1185 .cpu_name = "405LP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001186 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001187 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1188 .icache_bsize = 32,
1189 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001190 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001191 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001192 },
1193 { /* Xilinx Virtex-II Pro */
Grant C. Likely72646c72006-01-19 01:13:20 -07001194 .pvr_mask = 0xfffff000,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001195 .pvr_value = 0x20010000,
1196 .cpu_name = "Virtex-II Pro",
Kumar Gala10b35d92005-09-23 14:08:58 -05001197 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001198 .cpu_user_features = PPC_FEATURE_32 |
1199 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1200 .icache_bsize = 32,
1201 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001202 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001203 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001204 },
Grant C. Likely72646c72006-01-19 01:13:20 -07001205 { /* Xilinx Virtex-4 FX */
1206 .pvr_mask = 0xfffff000,
1207 .pvr_value = 0x20011000,
1208 .cpu_name = "Virtex-4 FX",
1209 .cpu_features = CPU_FTRS_40X,
1210 .cpu_user_features = PPC_FEATURE_32 |
1211 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1212 .icache_bsize = 32,
1213 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001214 .machine_check = machine_check_4xx,
Peter Bergner838fdb42006-09-14 14:18:38 -05001215 .platform = "ppc405",
Grant C. Likely72646c72006-01-19 01:13:20 -07001216 },
Eugene Suroveginad95d602005-06-07 13:22:09 -07001217 { /* 405EP */
1218 .pvr_mask = 0xffff0000,
1219 .pvr_value = 0x51210000,
1220 .cpu_name = "405EP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001221 .cpu_features = CPU_FTRS_40X,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001222 .cpu_user_features = PPC_FEATURE_32 |
1223 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1224 .icache_bsize = 32,
1225 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001226 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001227 .platform = "ppc405",
Eugene Suroveginad95d602005-06-07 13:22:09 -07001228 },
Stefan Roese5d8476c2007-10-11 22:08:14 +10001229 { /* 405EX */
Stefan Roeseb676d842008-01-15 18:09:15 +11001230 .pvr_mask = 0xffff0004,
1231 .pvr_value = 0x12910004,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001232 .cpu_name = "405EX",
1233 .cpu_features = CPU_FTRS_40X,
1234 .cpu_user_features = PPC_FEATURE_32 |
1235 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1236 .icache_bsize = 32,
1237 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001238 .machine_check = machine_check_4xx,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001239 .platform = "ppc405",
1240 },
Stefan Roeseb676d842008-01-15 18:09:15 +11001241 { /* 405EXr */
1242 .pvr_mask = 0xffff0004,
1243 .pvr_value = 0x12910000,
1244 .cpu_name = "405EXr",
1245 .cpu_features = CPU_FTRS_40X,
1246 .cpu_user_features = PPC_FEATURE_32 |
1247 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1248 .icache_bsize = 32,
1249 .dcache_bsize = 32,
1250 .machine_check = machine_check_4xx,
1251 .platform = "ppc405",
1252 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001253 { /* default match */
1254 .pvr_mask = 0x00000000,
1255 .pvr_value = 0x00000000,
1256 .cpu_name = "(generic 40x PPC)",
1257 .cpu_features = CPU_FTRS_40X,
1258 .cpu_user_features = PPC_FEATURE_32 |
1259 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1260 .icache_bsize = 32,
1261 .dcache_bsize = 32,
1262 .machine_check = machine_check_4xx,
1263 .platform = "ppc405",
1264 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001265
1266#endif /* CONFIG_40x */
1267#ifdef CONFIG_44x
Matt Porterc9cf73a2005-07-31 22:34:52 -07001268 {
1269 .pvr_mask = 0xf0000fff,
1270 .pvr_value = 0x40000850,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001271 .cpu_name = "440GR Rev. A",
1272 .cpu_features = CPU_FTRS_44X,
1273 .cpu_user_features = COMMON_USER_BOOKE,
1274 .icache_bsize = 32,
1275 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001276 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001277 .platform = "ppc440",
1278 },
1279 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1280 .pvr_mask = 0xf0000fff,
1281 .pvr_value = 0x40000858,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001282 .cpu_name = "440EP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001283 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001284 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001285 .icache_bsize = 32,
1286 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001287 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001288 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001289 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001290 },
1291 {
1292 .pvr_mask = 0xf0000fff,
1293 .pvr_value = 0x400008d3,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001294 .cpu_name = "440GR Rev. B",
1295 .cpu_features = CPU_FTRS_44X,
1296 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1297 .icache_bsize = 32,
1298 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001299 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001300 .platform = "ppc440",
1301 },
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001302 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1303 .pvr_mask = 0xf0000ff7,
1304 .pvr_value = 0x400008d4,
1305 .cpu_name = "440EP Rev. C",
1306 .cpu_features = CPU_FTRS_44X,
1307 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1308 .icache_bsize = 32,
1309 .dcache_bsize = 32,
1310 .cpu_setup = __setup_cpu_440ep,
1311 .machine_check = machine_check_4xx,
1312 .platform = "ppc440",
1313 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001314 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1315 .pvr_mask = 0xf0000fff,
1316 .pvr_value = 0x400008db,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001317 .cpu_name = "440EP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001318 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001319 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001320 .icache_bsize = 32,
1321 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001322 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001323 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001324 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001325 },
Valentine Barshak15fc9932007-08-29 17:40:30 +04001326 { /* 440GRX */
1327 .pvr_mask = 0xf0000ffb,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001328 .pvr_value = 0x200008D0,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001329 .cpu_name = "440GRX",
1330 .cpu_features = CPU_FTRS_44X,
1331 .cpu_user_features = COMMON_USER_BOOKE,
1332 .icache_bsize = 32,
1333 .dcache_bsize = 32,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001334 .cpu_setup = __setup_cpu_440grx,
Valentine Barshakb2be3b12007-12-22 03:22:23 +11001335 .machine_check = machine_check_440A,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001336 .platform = "ppc440",
Valentine Barshak15fc9932007-08-29 17:40:30 +04001337 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001338 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1339 .pvr_mask = 0xf0000ffb,
1340 .pvr_value = 0x200008D8,
1341 .cpu_name = "440EPX",
1342 .cpu_features = CPU_FTRS_44X,
1343 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1344 .icache_bsize = 32,
1345 .dcache_bsize = 32,
1346 .cpu_setup = __setup_cpu_440epx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001347 .machine_check = machine_check_440A,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001348 .platform = "ppc440",
1349 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001350 { /* 440GP Rev. B */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001351 .pvr_mask = 0xf0000fff,
1352 .pvr_value = 0x40000440,
1353 .cpu_name = "440GP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001354 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001355 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001356 .icache_bsize = 32,
1357 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001358 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001359 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001360 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001361 { /* 440GP Rev. C */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001362 .pvr_mask = 0xf0000fff,
1363 .pvr_value = 0x40000481,
1364 .cpu_name = "440GP Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001365 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001366 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001367 .icache_bsize = 32,
1368 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001369 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001370 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001371 },
1372 { /* 440GX Rev. A */
1373 .pvr_mask = 0xf0000fff,
1374 .pvr_value = 0x50000850,
1375 .cpu_name = "440GX Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001376 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001377 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001378 .icache_bsize = 32,
1379 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001380 .cpu_setup = __setup_cpu_440gx,
1381 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001382 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001383 },
1384 { /* 440GX Rev. B */
1385 .pvr_mask = 0xf0000fff,
1386 .pvr_value = 0x50000851,
1387 .cpu_name = "440GX Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001388 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001389 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001390 .icache_bsize = 32,
1391 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001392 .cpu_setup = __setup_cpu_440gx,
1393 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001394 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001395 },
1396 { /* 440GX Rev. C */
1397 .pvr_mask = 0xf0000fff,
1398 .pvr_value = 0x50000892,
1399 .cpu_name = "440GX Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001400 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001401 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001402 .icache_bsize = 32,
1403 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001404 .cpu_setup = __setup_cpu_440gx,
1405 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001406 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001407 },
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001408 { /* 440GX Rev. F */
1409 .pvr_mask = 0xf0000fff,
1410 .pvr_value = 0x50000894,
1411 .cpu_name = "440GX Rev. F",
Kumar Gala10b35d92005-09-23 14:08:58 -05001412 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001413 .cpu_user_features = COMMON_USER_BOOKE,
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001414 .icache_bsize = 32,
1415 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001416 .cpu_setup = __setup_cpu_440gx,
1417 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001418 .platform = "ppc440",
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001419 },
Matt Porter656de7e2005-09-03 15:55:42 -07001420 { /* 440SP Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001421 .pvr_mask = 0xfff00fff,
1422 .pvr_value = 0x53200891,
Matt Porter656de7e2005-09-03 15:55:42 -07001423 .cpu_name = "440SP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001424 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001425 .cpu_user_features = COMMON_USER_BOOKE,
Matt Porter656de7e2005-09-03 15:55:42 -07001426 .icache_bsize = 32,
1427 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001428 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001429 .platform = "ppc440",
Matt Porter656de7e2005-09-03 15:55:42 -07001430 },
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001431 { /* 440SPe Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001432 .pvr_mask = 0xfff00fff,
1433 .pvr_value = 0x53400890,
1434 .cpu_name = "440SPe Rev. A",
1435 .cpu_features = CPU_FTRS_44X,
1436 .cpu_user_features = COMMON_USER_BOOKE,
1437 .icache_bsize = 32,
1438 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001439 .cpu_setup = __setup_cpu_440spe,
1440 .machine_check = machine_check_440A,
Roland Dreier333e6152007-06-16 05:36:32 +10001441 .platform = "ppc440",
1442 },
1443 { /* 440SPe Rev. B */
1444 .pvr_mask = 0xfff00fff,
1445 .pvr_value = 0x53400891,
1446 .cpu_name = "440SPe Rev. B",
Kumar Galaa147c582006-12-08 02:34:38 -06001447 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001448 .cpu_user_features = COMMON_USER_BOOKE,
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001449 .icache_bsize = 32,
1450 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001451 .cpu_setup = __setup_cpu_440spe,
1452 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001453 .platform = "ppc440",
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001454 },
John Linn23e72372008-07-01 09:42:07 -07001455 { /* 440 in Xilinx Virtex-5 FXT */
1456 .pvr_mask = 0xfffffff0,
1457 .pvr_value = 0x7ff21910,
1458 .cpu_name = "440 in Virtex-5 FXT",
1459 .cpu_features = CPU_FTRS_44X,
1460 .cpu_user_features = COMMON_USER_BOOKE,
1461 .icache_bsize = 32,
1462 .dcache_bsize = 32,
1463 .platform = "ppc440",
1464 },
Stefan Roese464076a2008-02-24 08:07:41 +11001465 { /* 460EX */
1466 .pvr_mask = 0xffff0002,
1467 .pvr_value = 0x13020002,
1468 .cpu_name = "460EX",
1469 .cpu_features = CPU_FTRS_44X,
1470 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1471 .icache_bsize = 32,
1472 .dcache_bsize = 32,
1473 .cpu_setup = __setup_cpu_460ex,
1474 .machine_check = machine_check_440A,
1475 .platform = "ppc440",
1476 },
1477 { /* 460GT */
1478 .pvr_mask = 0xffff0002,
1479 .pvr_value = 0x13020000,
1480 .cpu_name = "460GT",
1481 .cpu_features = CPU_FTRS_44X,
Josh Boyer939e6222008-06-11 07:52:40 -04001482 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Stefan Roese464076a2008-02-24 08:07:41 +11001483 .icache_bsize = 32,
1484 .dcache_bsize = 32,
Josh Boyer939e6222008-06-11 07:52:40 -04001485 .cpu_setup = __setup_cpu_460gt,
Stefan Roese464076a2008-02-24 08:07:41 +11001486 .machine_check = machine_check_440A,
1487 .platform = "ppc440",
1488 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001489 { /* default match */
1490 .pvr_mask = 0x00000000,
1491 .pvr_value = 0x00000000,
1492 .cpu_name = "(generic 44x PPC)",
1493 .cpu_features = CPU_FTRS_44X,
1494 .cpu_user_features = COMMON_USER_BOOKE,
1495 .icache_bsize = 32,
1496 .dcache_bsize = 32,
1497 .machine_check = machine_check_4xx,
1498 .platform = "ppc440",
1499 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001500#endif /* CONFIG_44x */
Josh Boyere3e414b2007-12-24 08:44:47 -06001501#ifdef CONFIG_E200
Stephen Rothwell49209602005-10-12 15:55:09 +10001502 { /* e200z5 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001503 .pvr_mask = 0xfff00000,
1504 .pvr_value = 0x81000000,
1505 .cpu_name = "e200z5",
1506 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001507 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001508 .cpu_user_features = COMMON_USER_BOOKE |
1509 PPC_FEATURE_HAS_EFP_SINGLE |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001510 PPC_FEATURE_UNIFIED_CACHE,
1511 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001512 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001513 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001514 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001515 { /* e200z6 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001516 .pvr_mask = 0xfff00000,
1517 .pvr_value = 0x81100000,
1518 .cpu_name = "e200z6",
1519 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001520 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001521 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001522 PPC_FEATURE_HAS_SPE_COMP |
1523 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001524 PPC_FEATURE_UNIFIED_CACHE,
1525 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001526 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001527 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001528 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001529 { /* default match */
1530 .pvr_mask = 0x00000000,
1531 .pvr_value = 0x00000000,
1532 .cpu_name = "(generic E200 PPC)",
1533 .cpu_features = CPU_FTRS_E200,
1534 .cpu_user_features = COMMON_USER_BOOKE |
1535 PPC_FEATURE_HAS_EFP_SINGLE |
1536 PPC_FEATURE_UNIFIED_CACHE,
1537 .dcache_bsize = 32,
1538 .machine_check = machine_check_e200,
1539 .platform = "ppc5554",
Paul Mackerras516c8be2008-05-12 14:20:35 +10001540 }
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001541#endif /* CONFIG_E200 */
1542#ifdef CONFIG_E500
Stephen Rothwell49209602005-10-12 15:55:09 +10001543 { /* e500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001544 .pvr_mask = 0xffff0000,
1545 .pvr_value = 0x80200000,
1546 .cpu_name = "e500",
Kumar Gala10b35d92005-09-23 14:08:58 -05001547 .cpu_features = CPU_FTRS_E500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001548 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001549 PPC_FEATURE_HAS_SPE_COMP |
1550 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001551 .icache_bsize = 32,
1552 .dcache_bsize = 32,
1553 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001554 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001555 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001556 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001557 .platform = "ppc8540",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001558 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001559 { /* e500v2 */
Kumar Gala5b37b702005-06-21 17:15:18 -07001560 .pvr_mask = 0xffff0000,
1561 .pvr_value = 0x80210000,
1562 .cpu_name = "e500v2",
Kumar Gala10b35d92005-09-23 14:08:58 -05001563 .cpu_features = CPU_FTRS_E500_2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001564 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001565 PPC_FEATURE_HAS_SPE_COMP |
1566 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1567 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
Kumar Gala5b37b702005-06-21 17:15:18 -07001568 .icache_bsize = 32,
1569 .dcache_bsize = 32,
1570 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001571 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001572 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001573 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001574 .platform = "ppc8548",
Kumar Gala5b37b702005-06-21 17:15:18 -07001575 },
Kumar Gala3dfa8772008-06-16 09:41:32 -05001576 { /* e500mc */
1577 .pvr_mask = 0xffff0000,
1578 .pvr_value = 0x80230000,
1579 .cpu_name = "e500mc",
Kumar Gala3dfa8772008-06-16 09:41:32 -05001580 .cpu_features = CPU_FTRS_E500MC,
1581 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1582 .icache_bsize = 64,
1583 .dcache_bsize = 64,
1584 .num_pmcs = 4,
1585 .oprofile_cpu_type = "ppc/e500", /* xxx - galak, e500mc? */
1586 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1587 .machine_check = machine_check_e500,
1588 .platform = "ppce500mc",
1589 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001590 { /* default match */
1591 .pvr_mask = 0x00000000,
1592 .pvr_value = 0x00000000,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001593 .cpu_name = "(generic E500 PPC)",
1594 .cpu_features = CPU_FTRS_E500,
1595 .cpu_user_features = COMMON_USER_BOOKE |
1596 PPC_FEATURE_HAS_SPE_COMP |
1597 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001598 .icache_bsize = 32,
1599 .dcache_bsize = 32,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001600 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001601 .platform = "powerpc",
Paul Mackerras516c8be2008-05-12 14:20:35 +10001602 }
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001603#endif /* CONFIG_E500 */
Stephen Rothwell49209602005-10-12 15:55:09 +10001604#endif /* CONFIG_PPC32 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001605};
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001606
Paul Mackerras87a72f92007-10-04 14:18:01 +10001607static struct cpu_spec the_cpu_spec;
1608
1609struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001610{
1611 struct cpu_spec *s = cpu_specs;
Paul Mackerras87a72f92007-10-04 14:18:01 +10001612 struct cpu_spec *t = &the_cpu_spec;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001613 int i;
1614
1615 s = PTRRELOC(s);
Paul Mackerras87a72f92007-10-04 14:18:01 +10001616 t = PTRRELOC(t);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001617
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001618 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
1619 if ((pvr & s->pvr_mask) == s->pvr_value) {
Paul Mackerras87a72f92007-10-04 14:18:01 +10001620 /*
1621 * If we are overriding a previous value derived
1622 * from the real PVR with a new value obtained
1623 * using a logical PVR value, don't modify the
1624 * performance monitor fields.
1625 */
1626 if (t->num_pmcs && !s->num_pmcs) {
1627 t->cpu_name = s->cpu_name;
1628 t->cpu_features = s->cpu_features;
1629 t->cpu_user_features = s->cpu_user_features;
1630 t->icache_bsize = s->icache_bsize;
1631 t->dcache_bsize = s->dcache_bsize;
1632 t->cpu_setup = s->cpu_setup;
1633 t->cpu_restore = s->cpu_restore;
1634 t->platform = s->platform;
Torez Smith79e25ba2008-07-18 06:42:07 +10001635 /*
1636 * If we have passed through this logic once
1637 * before and have pulled the default case
1638 * because the real PVR was not found inside
1639 * cpu_specs[], then we are possibly running in
1640 * compatibility mode. In that case, let the
1641 * oprofiler know which set of compatibility
1642 * counters to pull from by making sure the
1643 * oprofile_cpu_type string is set to that of
1644 * compatibility mode. If the oprofile_cpu_type
1645 * already has a value, then we are possibly
1646 * overriding a real PVR with a logical one, and,
1647 * in that case, keep the current value for
1648 * oprofile_cpu_type.
1649 */
1650 if (t->oprofile_cpu_type == NULL)
1651 t->oprofile_cpu_type = s->oprofile_cpu_type;
Paul Mackerras87a72f92007-10-04 14:18:01 +10001652 } else
1653 *t = *s;
1654 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001655#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
Stefan Roese464076a2008-02-24 08:07:41 +11001656 /* ppc64 and booke expect identify_cpu to also call
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001657 * setup_cpu for that processor. I will consolidate
1658 * that at a later time, for now, just use #ifdef.
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001659 * we also don't need to PTRRELOC the function pointer
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001660 * on ppc64 and booke as we are running at 0 in real
1661 * mode on ppc64 and reloc_offset is always 0 on booke.
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001662 */
1663 if (s->cpu_setup) {
1664 s->cpu_setup(offset, s);
1665 }
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001666#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001667 return s;
1668 }
1669 BUG();
1670 return NULL;
1671}