blob: 25a052c16754349c2e5e91ffc4c3b3dac9c7e2bf [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
Nathan Lynch9115d132008-07-16 09:58:51 +100026/* The platform string corresponding to the real PVR */
27const char *powerpc_base_platform;
28
Stephen Rothwell49209602005-10-12 15:55:09 +100029/* NOTE:
30 * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's
31 * the responsibility of the appropriate CPU save/restore functions to
32 * eventually copy these settings over. Those save/restore aren't yet
33 * part of the cputable though. That has to be fixed for both ppc32
34 * and ppc64
35 */
Geoff Levandb26f1002006-05-19 14:24:18 +100036#ifdef CONFIG_PPC32
Valentine Barshak81127532007-09-22 00:46:57 +100037extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
38extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110039extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
Valentine Barshak340ffd22007-09-22 00:50:09 +100040extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110041extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
Stefan Roese464076a2008-02-24 08:07:41 +110042extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec);
Josh Boyer939e6222008-06-11 07:52:40 -040043extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec);
Kumar Gala400d2212005-09-27 15:13:12 -050044extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
45extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
46extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
47extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
48extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
49extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
50extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
51extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell49209602005-10-12 15:55:09 +100052#endif /* CONFIG_PPC32 */
Olof Johanssonf39b7a52006-08-11 00:07:08 -050053#ifdef CONFIG_PPC64
Kumar Gala400d2212005-09-27 15:13:12 -050054extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
Olof Johansson5b43d202006-10-04 23:41:41 -050055extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
Olof Johansson11999192007-02-04 16:36:51 -060056extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell40d244d2007-02-12 22:10:48 +110057extern void __restore_cpu_pa6t(void);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050058extern void __restore_cpu_ppc970(void);
Michael Neulinge952e6c2008-06-18 10:47:26 +100059extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec);
60extern void __restore_cpu_power7(void);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050061#endif /* CONFIG_PPC64 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070062
Linus Torvalds1da177e2005-04-16 15:20:36 -070063/* This table only contains "desktop" CPUs, it need to be filled with embedded
64 * ones as well...
65 */
Stephen Rothwell49209602005-10-12 15:55:09 +100066#define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
67 PPC_FEATURE_HAS_MMU)
68#define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +110069#define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +110070#define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
71 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
72#define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
73 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
Anton Blanchard03054d52006-04-29 09:51:06 +100074#define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
Paul Mackerrasfab5db92006-06-07 16:14:40 +100075 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
Nathan Lynch0f473312008-07-10 01:06:57 +100076 PPC_FEATURE_TRUE_LE | \
77 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Michael Neulinge952e6c2008-06-18 10:47:26 +100078#define COMMON_USER_POWER7 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
79 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
Nathan Lynch0f473312008-07-10 01:06:57 +100080 PPC_FEATURE_TRUE_LE | \
81 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -050082#define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
83 PPC_FEATURE_TRUE_LE | \
84 PPC_FEATURE_HAS_ALTIVEC_COMP)
Paul Mackerras80f15dc2006-01-14 10:11:39 +110085#define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
86 PPC_FEATURE_BOOKE)
Linus Torvalds1da177e2005-04-16 15:20:36 -070087
Paul Mackerras87a72f92007-10-04 14:18:01 +100088static struct cpu_spec __initdata cpu_specs[] = {
Stephen Rothwell49209602005-10-12 15:55:09 +100089#ifdef CONFIG_PPC64
90 { /* Power3 */
91 .pvr_mask = 0xffff0000,
92 .pvr_value = 0x00400000,
93 .cpu_name = "POWER3 (630)",
94 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +100095 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +100096 .icache_bsize = 128,
97 .dcache_bsize = 128,
98 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -060099 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000100 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000101 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100102 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100103 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +1000104 },
105 { /* Power3+ */
106 .pvr_mask = 0xffff0000,
107 .pvr_value = 0x00410000,
108 .cpu_name = "POWER3 (630+)",
109 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000110 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000111 .icache_bsize = 128,
112 .dcache_bsize = 128,
113 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600114 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000115 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000116 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100117 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100118 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +1000119 },
120 { /* Northstar */
121 .pvr_mask = 0xffff0000,
122 .pvr_value = 0x00330000,
123 .cpu_name = "RS64-II (northstar)",
124 .cpu_features = CPU_FTRS_RS64,
125 .cpu_user_features = COMMON_USER_PPC64,
126 .icache_bsize = 128,
127 .dcache_bsize = 128,
128 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600129 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000130 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000131 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100132 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100133 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000134 },
135 { /* Pulsar */
136 .pvr_mask = 0xffff0000,
137 .pvr_value = 0x00340000,
138 .cpu_name = "RS64-III (pulsar)",
139 .cpu_features = CPU_FTRS_RS64,
140 .cpu_user_features = COMMON_USER_PPC64,
141 .icache_bsize = 128,
142 .dcache_bsize = 128,
143 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600144 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000145 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000146 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100147 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100148 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000149 },
150 { /* I-star */
151 .pvr_mask = 0xffff0000,
152 .pvr_value = 0x00360000,
153 .cpu_name = "RS64-III (icestar)",
154 .cpu_features = CPU_FTRS_RS64,
155 .cpu_user_features = COMMON_USER_PPC64,
156 .icache_bsize = 128,
157 .dcache_bsize = 128,
158 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600159 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000160 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000161 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100162 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100163 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000164 },
165 { /* S-star */
166 .pvr_mask = 0xffff0000,
167 .pvr_value = 0x00370000,
168 .cpu_name = "RS64-IV (sstar)",
169 .cpu_features = CPU_FTRS_RS64,
170 .cpu_user_features = COMMON_USER_PPC64,
171 .icache_bsize = 128,
172 .dcache_bsize = 128,
173 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600174 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000175 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000176 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100177 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100178 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000179 },
180 { /* Power4 */
181 .pvr_mask = 0xffff0000,
182 .pvr_value = 0x00350000,
183 .cpu_name = "POWER4 (gp)",
184 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100185 .cpu_user_features = COMMON_USER_POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000186 .icache_bsize = 128,
187 .dcache_bsize = 128,
188 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600189 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000190 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000191 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100192 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100193 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000194 },
195 { /* Power4+ */
196 .pvr_mask = 0xffff0000,
197 .pvr_value = 0x00380000,
198 .cpu_name = "POWER4+ (gq)",
199 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100200 .cpu_user_features = COMMON_USER_POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000201 .icache_bsize = 128,
202 .dcache_bsize = 128,
203 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600204 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000205 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000206 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100207 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100208 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000209 },
210 { /* PPC970 */
211 .pvr_mask = 0xffff0000,
212 .pvr_value = 0x00390000,
213 .cpu_name = "PPC970",
214 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100215 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000216 PPC_FEATURE_HAS_ALTIVEC_COMP,
217 .icache_bsize = 128,
218 .dcache_bsize = 128,
219 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600220 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000221 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500222 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000223 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000224 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100225 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100226 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000227 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000228 { /* PPC970FX */
229 .pvr_mask = 0xffff0000,
230 .pvr_value = 0x003c0000,
231 .cpu_name = "PPC970FX",
Stephen Rothwell49209602005-10-12 15:55:09 +1000232 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100233 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000234 PPC_FEATURE_HAS_ALTIVEC_COMP,
235 .icache_bsize = 128,
236 .dcache_bsize = 128,
237 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600238 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000239 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500240 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000241 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000242 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100243 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100244 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000245 },
Olof Johansson3546e812007-02-26 00:35:14 -0600246 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
247 .pvr_mask = 0xffffffff,
248 .pvr_value = 0x00440100,
249 .cpu_name = "PPC970MP",
250 .cpu_features = CPU_FTRS_PPC970,
251 .cpu_user_features = COMMON_USER_POWER4 |
252 PPC_FEATURE_HAS_ALTIVEC_COMP,
253 .icache_bsize = 128,
254 .dcache_bsize = 128,
255 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000256 .pmc_type = PPC_PMC_IBM,
Olof Johansson3546e812007-02-26 00:35:14 -0600257 .cpu_setup = __setup_cpu_ppc970,
258 .cpu_restore = __restore_cpu_ppc970,
259 .oprofile_cpu_type = "ppc64/970MP",
260 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100261 .machine_check = machine_check_generic,
Olof Johansson3546e812007-02-26 00:35:14 -0600262 .platform = "ppc970",
263 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000264 { /* PPC970MP */
265 .pvr_mask = 0xffff0000,
266 .pvr_value = 0x00440000,
267 .cpu_name = "PPC970MP",
268 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100269 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000270 PPC_FEATURE_HAS_ALTIVEC_COMP,
271 .icache_bsize = 128,
272 .dcache_bsize = 128,
Anton Blanchard87af41b2006-05-05 05:44:26 +1000273 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000274 .pmc_type = PPC_PMC_IBM,
Olof Johansson5b43d202006-10-04 23:41:41 -0500275 .cpu_setup = __setup_cpu_ppc970MP,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500276 .cpu_restore = __restore_cpu_ppc970,
Mike Wolffecb3522006-11-21 14:41:54 -0600277 .oprofile_cpu_type = "ppc64/970MP",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000278 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100279 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100280 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000281 },
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500282 { /* PPC970GX */
283 .pvr_mask = 0xffff0000,
284 .pvr_value = 0x00450000,
285 .cpu_name = "PPC970GX",
286 .cpu_features = CPU_FTRS_PPC970,
287 .cpu_user_features = COMMON_USER_POWER4 |
288 PPC_FEATURE_HAS_ALTIVEC_COMP,
289 .icache_bsize = 128,
290 .dcache_bsize = 128,
291 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600292 .pmc_type = PPC_PMC_IBM,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500293 .cpu_setup = __setup_cpu_ppc970,
294 .oprofile_cpu_type = "ppc64/970",
295 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100296 .machine_check = machine_check_generic,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500297 .platform = "ppc970",
298 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100299 { /* Power5 GR */
Stephen Rothwell49209602005-10-12 15:55:09 +1000300 .pvr_mask = 0xffff0000,
301 .pvr_value = 0x003a0000,
302 .cpu_name = "POWER5 (gr)",
303 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100304 .cpu_user_features = COMMON_USER_POWER5,
Stephen Rothwell49209602005-10-12 15:55:09 +1000305 .icache_bsize = 128,
306 .dcache_bsize = 128,
307 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600308 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000309 .oprofile_cpu_type = "ppc64/power5",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000310 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000311 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
312 * and above but only works on POWER5 and above
313 */
314 .oprofile_mmcra_sihv = MMCRA_SIHV,
315 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100316 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100317 .platform = "power5",
Stephen Rothwell49209602005-10-12 15:55:09 +1000318 },
Mike Wolf31a12ce2007-07-10 13:13:47 -0500319 { /* Power5++ */
320 .pvr_mask = 0xffffff00,
321 .pvr_value = 0x003b0300,
322 .cpu_name = "POWER5+ (gs)",
323 .cpu_features = CPU_FTRS_POWER5,
324 .cpu_user_features = COMMON_USER_POWER5_PLUS,
325 .icache_bsize = 128,
326 .dcache_bsize = 128,
327 .num_pmcs = 6,
328 .oprofile_cpu_type = "ppc64/power5++",
329 .oprofile_type = PPC_OPROFILE_POWER4,
330 .oprofile_mmcra_sihv = MMCRA_SIHV,
331 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100332 .machine_check = machine_check_generic,
Mike Wolf31a12ce2007-07-10 13:13:47 -0500333 .platform = "power5+",
334 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100335 { /* Power5 GS */
Stephen Rothwell49209602005-10-12 15:55:09 +1000336 .pvr_mask = 0xffff0000,
337 .pvr_value = 0x003b0000,
Anton Blanchard834608f2006-01-09 15:42:30 +1100338 .cpu_name = "POWER5+ (gs)",
Stephen Rothwell49209602005-10-12 15:55:09 +1000339 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100340 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Stephen Rothwell49209602005-10-12 15:55:09 +1000341 .icache_bsize = 128,
342 .dcache_bsize = 128,
343 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600344 .pmc_type = PPC_PMC_IBM,
Anton Blanchard834608f2006-01-09 15:42:30 +1100345 .oprofile_cpu_type = "ppc64/power5+",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000346 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000347 .oprofile_mmcra_sihv = MMCRA_SIHV,
348 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100349 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100350 .platform = "power5+",
Stephen Rothwell49209602005-10-12 15:55:09 +1000351 },
Paul Mackerras974a76f2006-11-10 20:38:53 +1100352 { /* POWER6 in P5+ mode; 2.04-compliant processor */
353 .pvr_mask = 0xffffffff,
354 .pvr_value = 0x0f000001,
355 .cpu_name = "POWER5+",
356 .cpu_features = CPU_FTRS_POWER5,
357 .cpu_user_features = COMMON_USER_POWER5_PLUS,
358 .icache_bsize = 128,
359 .dcache_bsize = 128,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100360 .machine_check = machine_check_generic,
Torez Smith79e25ba2008-07-18 06:42:07 +1000361 .oprofile_cpu_type = "ppc64/compat-power5+",
Paul Mackerras974a76f2006-11-10 20:38:53 +1100362 .platform = "power5+",
363 },
Anton Blanchard03054d52006-04-29 09:51:06 +1000364 { /* Power6 */
365 .pvr_mask = 0xffff0000,
366 .pvr_value = 0x003e0000,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100367 .cpu_name = "POWER6 (raw)",
368 .cpu_features = CPU_FTRS_POWER6,
369 .cpu_user_features = COMMON_USER_POWER6 |
370 PPC_FEATURE_POWER6_EXT,
371 .icache_bsize = 128,
372 .dcache_bsize = 128,
373 .num_pmcs = 6,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000374 .pmc_type = PPC_PMC_IBM,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100375 .oprofile_cpu_type = "ppc64/power6",
376 .oprofile_type = PPC_OPROFILE_POWER4,
377 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
378 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
379 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
380 POWER6_MMCRA_OTHER,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100381 .machine_check = machine_check_generic,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100382 .platform = "power6x",
383 },
384 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
385 .pvr_mask = 0xffffffff,
386 .pvr_value = 0x0f000002,
387 .cpu_name = "POWER6 (architected)",
Anton Blanchard03054d52006-04-29 09:51:06 +1000388 .cpu_features = CPU_FTRS_POWER6,
389 .cpu_user_features = COMMON_USER_POWER6,
390 .icache_bsize = 128,
391 .dcache_bsize = 128,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100392 .machine_check = machine_check_generic,
Torez Smith79e25ba2008-07-18 06:42:07 +1000393 .oprofile_cpu_type = "ppc64/compat-power6",
Anton Blanchard03054d52006-04-29 09:51:06 +1000394 .platform = "power6",
395 },
Joel Schopp635f5a62008-06-19 06:18:21 +1000396 { /* 2.06-compliant processor, i.e. Power7 "architected" mode */
397 .pvr_mask = 0xffffffff,
398 .pvr_value = 0x0f000003,
399 .cpu_name = "POWER7 (architected)",
400 .cpu_features = CPU_FTRS_POWER7,
401 .cpu_user_features = COMMON_USER_POWER7,
402 .icache_bsize = 128,
403 .dcache_bsize = 128,
404 .machine_check = machine_check_generic,
Torez Smith79e25ba2008-07-18 06:42:07 +1000405 .oprofile_cpu_type = "ppc64/compat-power7",
Joel Schopp635f5a62008-06-19 06:18:21 +1000406 .platform = "power7",
407 },
Michael Neulinge952e6c2008-06-18 10:47:26 +1000408 { /* Power7 */
409 .pvr_mask = 0xffff0000,
410 .pvr_value = 0x003f0000,
Joel Schopp635f5a62008-06-19 06:18:21 +1000411 .cpu_name = "POWER7 (raw)",
Michael Neulinge952e6c2008-06-18 10:47:26 +1000412 .cpu_features = CPU_FTRS_POWER7,
413 .cpu_user_features = COMMON_USER_POWER7,
414 .icache_bsize = 128,
415 .dcache_bsize = 128,
416 .num_pmcs = 6,
417 .pmc_type = PPC_PMC_IBM,
418 .cpu_setup = __setup_cpu_power7,
419 .cpu_restore = __restore_cpu_power7,
420 .oprofile_cpu_type = "ppc64/power7",
421 .oprofile_type = PPC_OPROFILE_POWER4,
422 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
423 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
424 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
425 POWER6_MMCRA_OTHER,
426 .platform = "power7",
427 },
Arnd Bergmannc902be72006-01-04 19:55:53 +0000428 { /* Cell Broadband Engine */
Stephen Rothwell49209602005-10-12 15:55:09 +1000429 .pvr_mask = 0xffff0000,
430 .pvr_value = 0x00700000,
431 .cpu_name = "Cell Broadband Engine",
432 .cpu_features = CPU_FTRS_CELL,
433 .cpu_user_features = COMMON_USER_PPC64 |
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +1100434 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
435 PPC_FEATURE_SMT,
Stephen Rothwell49209602005-10-12 15:55:09 +1000436 .icache_bsize = 128,
437 .dcache_bsize = 128,
Maynard Johnson18f21902006-11-20 18:45:16 +0100438 .num_pmcs = 4,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600439 .pmc_type = PPC_PMC_IBM,
Maynard Johnson18f21902006-11-20 18:45:16 +0100440 .oprofile_cpu_type = "ppc64/cell-be",
441 .oprofile_type = PPC_OPROFILE_CELL,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100442 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100443 .platform = "ppc-cell-be",
Stephen Rothwell49209602005-10-12 15:55:09 +1000444 },
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500445 { /* PA Semi PA6T */
446 .pvr_mask = 0x7fff0000,
447 .pvr_value = 0x00900000,
448 .cpu_name = "PA6T",
449 .cpu_features = CPU_FTRS_PA6T,
450 .cpu_user_features = COMMON_USER_PA6T,
451 .icache_bsize = 64,
452 .dcache_bsize = 64,
453 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600454 .pmc_type = PPC_PMC_PA6T,
Olof Johansson11999192007-02-04 16:36:51 -0600455 .cpu_setup = __setup_cpu_pa6t,
456 .cpu_restore = __restore_cpu_pa6t,
Olof Johansson25fc5302007-04-18 16:38:21 +1000457 .oprofile_cpu_type = "ppc64/pa6t",
458 .oprofile_type = PPC_OPROFILE_PA6T,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100459 .machine_check = machine_check_generic,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500460 .platform = "pa6t",
461 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000462 { /* default match */
463 .pvr_mask = 0x00000000,
464 .pvr_value = 0x00000000,
465 .cpu_name = "POWER4 (compatible)",
466 .cpu_features = CPU_FTRS_COMPATIBLE,
467 .cpu_user_features = COMMON_USER_PPC64,
468 .icache_bsize = 128,
469 .dcache_bsize = 128,
470 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600471 .pmc_type = PPC_PMC_IBM,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100472 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100473 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000474 }
475#endif /* CONFIG_PPC64 */
476#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -0700477#if CLASSIC_PPC
Stephen Rothwell49209602005-10-12 15:55:09 +1000478 { /* 601 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700479 .pvr_mask = 0xffff0000,
480 .pvr_value = 0x00010000,
481 .cpu_name = "601",
Kumar Gala10b35d92005-09-23 14:08:58 -0500482 .cpu_features = CPU_FTRS_PPC601,
Stephen Rothwell49209602005-10-12 15:55:09 +1000483 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
Paul Mackerras98599012005-10-22 16:51:34 +1000484 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700485 .icache_bsize = 32,
486 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100487 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100488 .platform = "ppc601",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700489 },
490 { /* 603 */
491 .pvr_mask = 0xffff0000,
492 .pvr_value = 0x00030000,
493 .cpu_name = "603",
Kumar Gala10b35d92005-09-23 14:08:58 -0500494 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000495 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700496 .icache_bsize = 32,
497 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100498 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100499 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100500 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700501 },
502 { /* 603e */
503 .pvr_mask = 0xffff0000,
504 .pvr_value = 0x00060000,
505 .cpu_name = "603e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500506 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000507 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700508 .icache_bsize = 32,
509 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100510 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100511 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100512 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700513 },
514 { /* 603ev */
515 .pvr_mask = 0xffff0000,
516 .pvr_value = 0x00070000,
517 .cpu_name = "603ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500518 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000519 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700520 .icache_bsize = 32,
521 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100522 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100523 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100524 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700525 },
526 { /* 604 */
527 .pvr_mask = 0xffff0000,
528 .pvr_value = 0x00040000,
529 .cpu_name = "604",
Kumar Gala10b35d92005-09-23 14:08:58 -0500530 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000531 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700532 .icache_bsize = 32,
533 .dcache_bsize = 32,
534 .num_pmcs = 2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100535 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100536 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100537 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700538 },
539 { /* 604e */
540 .pvr_mask = 0xfffff000,
541 .pvr_value = 0x00090000,
542 .cpu_name = "604e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500543 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000544 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700545 .icache_bsize = 32,
546 .dcache_bsize = 32,
547 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100548 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100549 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100550 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700551 },
552 { /* 604r */
553 .pvr_mask = 0xffff0000,
554 .pvr_value = 0x00090000,
555 .cpu_name = "604r",
Kumar Gala10b35d92005-09-23 14:08:58 -0500556 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000557 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700558 .icache_bsize = 32,
559 .dcache_bsize = 32,
560 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100561 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100562 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100563 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700564 },
565 { /* 604ev */
566 .pvr_mask = 0xffff0000,
567 .pvr_value = 0x000a0000,
568 .cpu_name = "604ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500569 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000570 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700571 .icache_bsize = 32,
572 .dcache_bsize = 32,
573 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100574 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100575 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100576 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700577 },
578 { /* 740/750 (0x4202, don't support TAU ?) */
579 .pvr_mask = 0xffffffff,
580 .pvr_value = 0x00084202,
581 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500582 .cpu_features = CPU_FTRS_740_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000583 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700584 .icache_bsize = 32,
585 .dcache_bsize = 32,
586 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100587 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100588 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100589 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700590 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700591 { /* 750CX (80100 and 8010x?) */
592 .pvr_mask = 0xfffffff0,
593 .pvr_value = 0x00080100,
594 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500595 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000596 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700597 .icache_bsize = 32,
598 .dcache_bsize = 32,
599 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100600 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100601 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100602 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700603 },
604 { /* 750CX (82201 and 82202) */
605 .pvr_mask = 0xfffffff0,
606 .pvr_value = 0x00082200,
607 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500608 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000609 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700610 .icache_bsize = 32,
611 .dcache_bsize = 32,
612 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100613 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100614 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100615 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700616 },
617 { /* 750CXe (82214) */
618 .pvr_mask = 0xfffffff0,
619 .pvr_value = 0x00082210,
620 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500621 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000622 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700623 .icache_bsize = 32,
624 .dcache_bsize = 32,
625 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100626 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100627 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100628 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700629 },
Arthur Othieno7c316252005-09-03 15:55:52 -0700630 { /* 750CXe "Gekko" (83214) */
631 .pvr_mask = 0xffffffff,
632 .pvr_value = 0x00083214,
633 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500634 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000635 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Arthur Othieno7c316252005-09-03 15:55:52 -0700636 .icache_bsize = 32,
637 .dcache_bsize = 32,
638 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100639 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100640 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100641 .platform = "ppc750",
Arthur Othieno7c316252005-09-03 15:55:52 -0700642 },
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500643 { /* 750CL */
644 .pvr_mask = 0xfffff0f0,
645 .pvr_value = 0x00087010,
646 .cpu_name = "750CL",
Josh Boyera14c4502007-04-13 04:33:25 +1000647 .cpu_features = CPU_FTRS_750CL,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500648 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
649 .icache_bsize = 32,
650 .dcache_bsize = 32,
651 .num_pmcs = 4,
Josh Boyera14c4502007-04-13 04:33:25 +1000652 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100653 .machine_check = machine_check_generic,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500654 .platform = "ppc750",
655 },
Arthur Othienoac1ff042005-09-03 15:55:51 -0700656 { /* 745/755 */
657 .pvr_mask = 0xfffff000,
658 .pvr_value = 0x00083000,
659 .cpu_name = "745/755",
Kumar Gala10b35d92005-09-23 14:08:58 -0500660 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000661 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Arthur Othienoac1ff042005-09-03 15:55:51 -0700662 .icache_bsize = 32,
663 .dcache_bsize = 32,
664 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100665 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100666 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100667 .platform = "ppc750",
Arthur Othienoac1ff042005-09-03 15:55:51 -0700668 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700669 { /* 750FX rev 1.x */
670 .pvr_mask = 0xffffff00,
671 .pvr_value = 0x70000100,
672 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500673 .cpu_features = CPU_FTRS_750FX1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000674 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700675 .icache_bsize = 32,
676 .dcache_bsize = 32,
677 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100678 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100679 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100680 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700681 },
682 { /* 750FX rev 2.0 must disable HID0[DPM] */
683 .pvr_mask = 0xffffffff,
684 .pvr_value = 0x70000200,
685 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500686 .cpu_features = CPU_FTRS_750FX2,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000687 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700688 .icache_bsize = 32,
689 .dcache_bsize = 32,
690 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100691 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100692 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100693 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700694 },
695 { /* 750FX (All revs except 2.0) */
696 .pvr_mask = 0xffff0000,
697 .pvr_value = 0x70000000,
698 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500699 .cpu_features = CPU_FTRS_750FX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000700 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700701 .icache_bsize = 32,
702 .dcache_bsize = 32,
703 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100704 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100705 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100706 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700707 },
708 { /* 750GX */
709 .pvr_mask = 0xffff0000,
710 .pvr_value = 0x70020000,
711 .cpu_name = "750GX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500712 .cpu_features = CPU_FTRS_750GX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000713 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700714 .icache_bsize = 32,
715 .dcache_bsize = 32,
716 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100717 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100718 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100719 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700720 },
721 { /* 740/750 (L2CR bit need fixup for 740) */
722 .pvr_mask = 0xffff0000,
723 .pvr_value = 0x00080000,
724 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500725 .cpu_features = CPU_FTRS_740,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000726 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700727 .icache_bsize = 32,
728 .dcache_bsize = 32,
729 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100730 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100731 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100732 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700733 },
734 { /* 7400 rev 1.1 ? (no TAU) */
735 .pvr_mask = 0xffffffff,
736 .pvr_value = 0x000c1101,
737 .cpu_name = "7400 (1.1)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500738 .cpu_features = CPU_FTRS_7400_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000739 .cpu_user_features = COMMON_USER |
740 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700741 .icache_bsize = 32,
742 .dcache_bsize = 32,
743 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100744 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100745 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100746 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700747 },
748 { /* 7400 */
749 .pvr_mask = 0xffff0000,
750 .pvr_value = 0x000c0000,
751 .cpu_name = "7400",
Kumar Gala10b35d92005-09-23 14:08:58 -0500752 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000753 .cpu_user_features = COMMON_USER |
754 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700755 .icache_bsize = 32,
756 .dcache_bsize = 32,
757 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100758 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100759 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100760 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700761 },
762 { /* 7410 */
763 .pvr_mask = 0xffff0000,
764 .pvr_value = 0x800c0000,
765 .cpu_name = "7410",
Kumar Gala10b35d92005-09-23 14:08:58 -0500766 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000767 .cpu_user_features = COMMON_USER |
768 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700769 .icache_bsize = 32,
770 .dcache_bsize = 32,
771 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100772 .cpu_setup = __setup_cpu_7410,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100773 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100774 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700775 },
776 { /* 7450 2.0 - no doze/nap */
777 .pvr_mask = 0xffffffff,
778 .pvr_value = 0x80000200,
779 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500780 .cpu_features = CPU_FTRS_7450_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000781 .cpu_user_features = COMMON_USER |
782 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700783 .icache_bsize = 32,
784 .dcache_bsize = 32,
785 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600786 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600787 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000788 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100789 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100790 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700791 },
792 { /* 7450 2.1 */
793 .pvr_mask = 0xffffffff,
794 .pvr_value = 0x80000201,
795 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500796 .cpu_features = CPU_FTRS_7450_21,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000797 .cpu_user_features = COMMON_USER |
798 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700799 .icache_bsize = 32,
800 .dcache_bsize = 32,
801 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600802 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600803 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000804 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100805 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100806 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700807 },
808 { /* 7450 2.3 and newer */
809 .pvr_mask = 0xffff0000,
810 .pvr_value = 0x80000000,
811 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500812 .cpu_features = CPU_FTRS_7450_23,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000813 .cpu_user_features = COMMON_USER |
814 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700815 .icache_bsize = 32,
816 .dcache_bsize = 32,
817 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600818 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600819 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000820 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100821 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100822 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700823 },
824 { /* 7455 rev 1.x */
825 .pvr_mask = 0xffffff00,
826 .pvr_value = 0x80010100,
827 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500828 .cpu_features = CPU_FTRS_7455_1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000829 .cpu_user_features = COMMON_USER |
830 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700831 .icache_bsize = 32,
832 .dcache_bsize = 32,
833 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600834 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600835 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000836 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100837 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100838 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700839 },
840 { /* 7455 rev 2.0 */
841 .pvr_mask = 0xffffffff,
842 .pvr_value = 0x80010200,
843 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500844 .cpu_features = CPU_FTRS_7455_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000845 .cpu_user_features = COMMON_USER |
846 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700847 .icache_bsize = 32,
848 .dcache_bsize = 32,
849 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600850 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600851 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000852 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100853 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100854 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700855 },
856 { /* 7455 others */
857 .pvr_mask = 0xffff0000,
858 .pvr_value = 0x80010000,
859 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500860 .cpu_features = CPU_FTRS_7455,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000861 .cpu_user_features = COMMON_USER |
862 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700863 .icache_bsize = 32,
864 .dcache_bsize = 32,
865 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600866 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600867 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000868 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100869 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100870 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700871 },
872 { /* 7447/7457 Rev 1.0 */
873 .pvr_mask = 0xffffffff,
874 .pvr_value = 0x80020100,
875 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500876 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000877 .cpu_user_features = COMMON_USER |
878 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700879 .icache_bsize = 32,
880 .dcache_bsize = 32,
881 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600882 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600883 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000884 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100885 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100886 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700887 },
888 { /* 7447/7457 Rev 1.1 */
889 .pvr_mask = 0xffffffff,
890 .pvr_value = 0x80020101,
891 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500892 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000893 .cpu_user_features = COMMON_USER |
894 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700895 .icache_bsize = 32,
896 .dcache_bsize = 32,
897 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600898 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600899 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000900 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100901 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100902 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700903 },
904 { /* 7447/7457 Rev 1.2 and later */
905 .pvr_mask = 0xffff0000,
906 .pvr_value = 0x80020000,
907 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500908 .cpu_features = CPU_FTRS_7447,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000909 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700910 .icache_bsize = 32,
911 .dcache_bsize = 32,
912 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600913 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600914 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000915 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100916 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100917 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700918 },
919 { /* 7447A */
920 .pvr_mask = 0xffff0000,
921 .pvr_value = 0x80030000,
922 .cpu_name = "7447A",
Kumar Gala10b35d92005-09-23 14:08:58 -0500923 .cpu_features = CPU_FTRS_7447A,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000924 .cpu_user_features = COMMON_USER |
925 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700926 .icache_bsize = 32,
927 .dcache_bsize = 32,
928 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600929 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600930 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000931 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100932 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100933 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700934 },
Kumar Galabbde6302005-09-03 15:55:55 -0700935 { /* 7448 */
936 .pvr_mask = 0xffff0000,
937 .pvr_value = 0x80040000,
938 .cpu_name = "7448",
James.Yang3d372542007-05-02 16:34:43 -0500939 .cpu_features = CPU_FTRS_7448,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000940 .cpu_user_features = COMMON_USER |
941 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Kumar Galabbde6302005-09-03 15:55:55 -0700942 .icache_bsize = 32,
943 .dcache_bsize = 32,
944 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600945 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600946 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000947 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100948 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100949 .platform = "ppc7450",
Kumar Galabbde6302005-09-03 15:55:55 -0700950 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700951 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
952 .pvr_mask = 0x7fff0000,
953 .pvr_value = 0x00810000,
954 .cpu_name = "82xx",
Kumar Gala10b35d92005-09-23 14:08:58 -0500955 .cpu_features = CPU_FTRS_82XX,
Stephen Rothwell49209602005-10-12 15:55:09 +1000956 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700957 .icache_bsize = 32,
958 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100959 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100960 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100961 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700962 },
963 { /* All G2_LE (603e core, plus some) have the same pvr */
964 .pvr_mask = 0x7fff0000,
965 .pvr_value = 0x00820000,
966 .cpu_name = "G2_LE",
Kumar Gala10b35d92005-09-23 14:08:58 -0500967 .cpu_features = CPU_FTRS_G2_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000968 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700969 .icache_bsize = 32,
970 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100971 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100972 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100973 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700974 },
Kim Phillips6c4a2502006-10-02 20:10:24 -0500975 { /* e300c1 (a 603e core, plus some) on 83xx */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700976 .pvr_mask = 0x7fff0000,
977 .pvr_value = 0x00830000,
Kim Phillips6c4a2502006-10-02 20:10:24 -0500978 .cpu_name = "e300c1",
Kumar Gala10b35d92005-09-23 14:08:58 -0500979 .cpu_features = CPU_FTRS_E300,
Stephen Rothwell49209602005-10-12 15:55:09 +1000980 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700981 .icache_bsize = 32,
982 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100983 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100984 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100985 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700986 },
Kim Phillips6c4a2502006-10-02 20:10:24 -0500987 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
988 .pvr_mask = 0x7fff0000,
989 .pvr_value = 0x00840000,
990 .cpu_name = "e300c2",
Kim Phillipsaa42c692006-12-08 02:43:30 -0600991 .cpu_features = CPU_FTRS_E300C2,
Kim Phillips6c4a2502006-10-02 20:10:24 -0500992 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
993 .icache_bsize = 32,
994 .dcache_bsize = 32,
995 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100996 .machine_check = machine_check_generic,
Kim Phillips6c4a2502006-10-02 20:10:24 -0500997 .platform = "ppc603",
998 },
Li Yanga58d5242007-10-19 19:38:42 +0800999 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
Scott Wood57933f82006-12-01 12:57:05 -06001000 .pvr_mask = 0x7fff0000,
1001 .pvr_value = 0x00850000,
1002 .cpu_name = "e300c3",
1003 .cpu_features = CPU_FTRS_E300,
1004 .cpu_user_features = COMMON_USER,
1005 .icache_bsize = 32,
1006 .dcache_bsize = 32,
1007 .cpu_setup = __setup_cpu_603,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001008 .num_pmcs = 4,
1009 .oprofile_cpu_type = "ppc/e300",
1010 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Scott Wood57933f82006-12-01 12:57:05 -06001011 .platform = "ppc603",
1012 },
Li Yanga58d5242007-10-19 19:38:42 +08001013 { /* e300c4 (e300c1, plus one IU) */
1014 .pvr_mask = 0x7fff0000,
1015 .pvr_value = 0x00860000,
1016 .cpu_name = "e300c4",
1017 .cpu_features = CPU_FTRS_E300,
1018 .cpu_user_features = COMMON_USER,
1019 .icache_bsize = 32,
1020 .dcache_bsize = 32,
1021 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001022 .machine_check = machine_check_generic,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001023 .num_pmcs = 4,
1024 .oprofile_cpu_type = "ppc/e300",
1025 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Li Yanga58d5242007-10-19 19:38:42 +08001026 .platform = "ppc603",
1027 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001028 { /* default match, we assume split I/D cache & TB (non-601)... */
1029 .pvr_mask = 0x00000000,
1030 .pvr_value = 0x00000000,
1031 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -05001032 .cpu_features = CPU_FTRS_CLASSIC32,
Stephen Rothwell49209602005-10-12 15:55:09 +10001033 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001034 .icache_bsize = 32,
1035 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001036 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001037 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001038 },
1039#endif /* CLASSIC_PPC */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001040#ifdef CONFIG_8xx
1041 { /* 8xx */
1042 .pvr_mask = 0xffff0000,
1043 .pvr_value = 0x00500000,
1044 .cpu_name = "8xx",
1045 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1046 * if the 8xx code is there.... */
Kumar Gala10b35d92005-09-23 14:08:58 -05001047 .cpu_features = CPU_FTRS_8XX,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001048 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1049 .icache_bsize = 16,
1050 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001051 .platform = "ppc823",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001052 },
1053#endif /* CONFIG_8xx */
1054#ifdef CONFIG_40x
1055 { /* 403GC */
1056 .pvr_mask = 0xffffff00,
1057 .pvr_value = 0x00200200,
1058 .cpu_name = "403GC",
Kumar Gala10b35d92005-09-23 14:08:58 -05001059 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001060 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1061 .icache_bsize = 16,
1062 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001063 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001064 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001065 },
1066 { /* 403GCX */
1067 .pvr_mask = 0xffffff00,
1068 .pvr_value = 0x00201400,
1069 .cpu_name = "403GCX",
Kumar Gala10b35d92005-09-23 14:08:58 -05001070 .cpu_features = CPU_FTRS_40X,
Paul Mackerras98599012005-10-22 16:51:34 +10001071 .cpu_user_features = PPC_FEATURE_32 |
1072 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001073 .icache_bsize = 16,
1074 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001075 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001076 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001077 },
1078 { /* 403G ?? */
1079 .pvr_mask = 0xffff0000,
1080 .pvr_value = 0x00200000,
1081 .cpu_name = "403G ??",
Kumar Gala10b35d92005-09-23 14:08:58 -05001082 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001083 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1084 .icache_bsize = 16,
1085 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001086 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001087 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001088 },
1089 { /* 405GP */
1090 .pvr_mask = 0xffff0000,
1091 .pvr_value = 0x40110000,
1092 .cpu_name = "405GP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001093 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001094 .cpu_user_features = PPC_FEATURE_32 |
1095 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1096 .icache_bsize = 32,
1097 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001098 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001099 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001100 },
1101 { /* STB 03xxx */
1102 .pvr_mask = 0xffff0000,
1103 .pvr_value = 0x40130000,
1104 .cpu_name = "STB03xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001105 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001106 .cpu_user_features = PPC_FEATURE_32 |
1107 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1108 .icache_bsize = 32,
1109 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001110 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001111 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001112 },
1113 { /* STB 04xxx */
1114 .pvr_mask = 0xffff0000,
1115 .pvr_value = 0x41810000,
1116 .cpu_name = "STB04xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001117 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001118 .cpu_user_features = PPC_FEATURE_32 |
1119 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1120 .icache_bsize = 32,
1121 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001122 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001123 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001124 },
1125 { /* NP405L */
1126 .pvr_mask = 0xffff0000,
1127 .pvr_value = 0x41610000,
1128 .cpu_name = "NP405L",
Kumar Gala10b35d92005-09-23 14:08:58 -05001129 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001130 .cpu_user_features = PPC_FEATURE_32 |
1131 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1132 .icache_bsize = 32,
1133 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001134 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001135 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001136 },
1137 { /* NP4GS3 */
1138 .pvr_mask = 0xffff0000,
1139 .pvr_value = 0x40B10000,
1140 .cpu_name = "NP4GS3",
Kumar Gala10b35d92005-09-23 14:08:58 -05001141 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001142 .cpu_user_features = PPC_FEATURE_32 |
1143 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1144 .icache_bsize = 32,
1145 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001146 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001147 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001148 },
1149 { /* NP405H */
1150 .pvr_mask = 0xffff0000,
1151 .pvr_value = 0x41410000,
1152 .cpu_name = "NP405H",
Kumar Gala10b35d92005-09-23 14:08:58 -05001153 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001154 .cpu_user_features = PPC_FEATURE_32 |
1155 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1156 .icache_bsize = 32,
1157 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001158 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001159 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001160 },
1161 { /* 405GPr */
1162 .pvr_mask = 0xffff0000,
1163 .pvr_value = 0x50910000,
1164 .cpu_name = "405GPr",
Kumar Gala10b35d92005-09-23 14:08:58 -05001165 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001166 .cpu_user_features = PPC_FEATURE_32 |
1167 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1168 .icache_bsize = 32,
1169 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001170 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001171 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001172 },
1173 { /* STBx25xx */
1174 .pvr_mask = 0xffff0000,
1175 .pvr_value = 0x51510000,
1176 .cpu_name = "STBx25xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001177 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001178 .cpu_user_features = PPC_FEATURE_32 |
1179 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1180 .icache_bsize = 32,
1181 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001182 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001183 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001184 },
1185 { /* 405LP */
1186 .pvr_mask = 0xffff0000,
1187 .pvr_value = 0x41F10000,
1188 .cpu_name = "405LP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001189 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001190 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1191 .icache_bsize = 32,
1192 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001193 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001194 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001195 },
1196 { /* Xilinx Virtex-II Pro */
Grant C. Likely72646c72006-01-19 01:13:20 -07001197 .pvr_mask = 0xfffff000,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001198 .pvr_value = 0x20010000,
1199 .cpu_name = "Virtex-II Pro",
Kumar Gala10b35d92005-09-23 14:08:58 -05001200 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001201 .cpu_user_features = PPC_FEATURE_32 |
1202 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1203 .icache_bsize = 32,
1204 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001205 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001206 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001207 },
Grant C. Likely72646c72006-01-19 01:13:20 -07001208 { /* Xilinx Virtex-4 FX */
1209 .pvr_mask = 0xfffff000,
1210 .pvr_value = 0x20011000,
1211 .cpu_name = "Virtex-4 FX",
1212 .cpu_features = CPU_FTRS_40X,
1213 .cpu_user_features = PPC_FEATURE_32 |
1214 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1215 .icache_bsize = 32,
1216 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001217 .machine_check = machine_check_4xx,
Peter Bergner838fdb42006-09-14 14:18:38 -05001218 .platform = "ppc405",
Grant C. Likely72646c72006-01-19 01:13:20 -07001219 },
Eugene Suroveginad95d602005-06-07 13:22:09 -07001220 { /* 405EP */
1221 .pvr_mask = 0xffff0000,
1222 .pvr_value = 0x51210000,
1223 .cpu_name = "405EP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001224 .cpu_features = CPU_FTRS_40X,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001225 .cpu_user_features = PPC_FEATURE_32 |
1226 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1227 .icache_bsize = 32,
1228 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001229 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001230 .platform = "ppc405",
Eugene Suroveginad95d602005-06-07 13:22:09 -07001231 },
Stefan Roese5d8476c2007-10-11 22:08:14 +10001232 { /* 405EX */
Stefan Roeseb676d842008-01-15 18:09:15 +11001233 .pvr_mask = 0xffff0004,
1234 .pvr_value = 0x12910004,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001235 .cpu_name = "405EX",
1236 .cpu_features = CPU_FTRS_40X,
1237 .cpu_user_features = PPC_FEATURE_32 |
1238 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1239 .icache_bsize = 32,
1240 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001241 .machine_check = machine_check_4xx,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001242 .platform = "ppc405",
1243 },
Stefan Roeseb676d842008-01-15 18:09:15 +11001244 { /* 405EXr */
1245 .pvr_mask = 0xffff0004,
1246 .pvr_value = 0x12910000,
1247 .cpu_name = "405EXr",
1248 .cpu_features = CPU_FTRS_40X,
1249 .cpu_user_features = PPC_FEATURE_32 |
1250 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1251 .icache_bsize = 32,
1252 .dcache_bsize = 32,
1253 .machine_check = machine_check_4xx,
1254 .platform = "ppc405",
1255 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001256 { /* default match */
1257 .pvr_mask = 0x00000000,
1258 .pvr_value = 0x00000000,
1259 .cpu_name = "(generic 40x PPC)",
1260 .cpu_features = CPU_FTRS_40X,
1261 .cpu_user_features = PPC_FEATURE_32 |
1262 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1263 .icache_bsize = 32,
1264 .dcache_bsize = 32,
1265 .machine_check = machine_check_4xx,
1266 .platform = "ppc405",
1267 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001268
1269#endif /* CONFIG_40x */
1270#ifdef CONFIG_44x
Matt Porterc9cf73a2005-07-31 22:34:52 -07001271 {
1272 .pvr_mask = 0xf0000fff,
1273 .pvr_value = 0x40000850,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001274 .cpu_name = "440GR Rev. A",
1275 .cpu_features = CPU_FTRS_44X,
1276 .cpu_user_features = COMMON_USER_BOOKE,
1277 .icache_bsize = 32,
1278 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001279 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001280 .platform = "ppc440",
1281 },
1282 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1283 .pvr_mask = 0xf0000fff,
1284 .pvr_value = 0x40000858,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001285 .cpu_name = "440EP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001286 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001287 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001288 .icache_bsize = 32,
1289 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001290 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001291 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001292 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001293 },
1294 {
1295 .pvr_mask = 0xf0000fff,
1296 .pvr_value = 0x400008d3,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001297 .cpu_name = "440GR Rev. B",
1298 .cpu_features = CPU_FTRS_44X,
1299 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1300 .icache_bsize = 32,
1301 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001302 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001303 .platform = "ppc440",
1304 },
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001305 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1306 .pvr_mask = 0xf0000ff7,
1307 .pvr_value = 0x400008d4,
1308 .cpu_name = "440EP Rev. C",
1309 .cpu_features = CPU_FTRS_44X,
1310 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1311 .icache_bsize = 32,
1312 .dcache_bsize = 32,
1313 .cpu_setup = __setup_cpu_440ep,
1314 .machine_check = machine_check_4xx,
1315 .platform = "ppc440",
1316 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001317 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1318 .pvr_mask = 0xf0000fff,
1319 .pvr_value = 0x400008db,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001320 .cpu_name = "440EP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001321 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001322 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001323 .icache_bsize = 32,
1324 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001325 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001326 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001327 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001328 },
Valentine Barshak15fc9932007-08-29 17:40:30 +04001329 { /* 440GRX */
1330 .pvr_mask = 0xf0000ffb,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001331 .pvr_value = 0x200008D0,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001332 .cpu_name = "440GRX",
1333 .cpu_features = CPU_FTRS_44X,
1334 .cpu_user_features = COMMON_USER_BOOKE,
1335 .icache_bsize = 32,
1336 .dcache_bsize = 32,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001337 .cpu_setup = __setup_cpu_440grx,
Valentine Barshakb2be3b12007-12-22 03:22:23 +11001338 .machine_check = machine_check_440A,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001339 .platform = "ppc440",
Valentine Barshak15fc9932007-08-29 17:40:30 +04001340 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001341 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1342 .pvr_mask = 0xf0000ffb,
1343 .pvr_value = 0x200008D8,
1344 .cpu_name = "440EPX",
1345 .cpu_features = CPU_FTRS_44X,
1346 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1347 .icache_bsize = 32,
1348 .dcache_bsize = 32,
1349 .cpu_setup = __setup_cpu_440epx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001350 .machine_check = machine_check_440A,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001351 .platform = "ppc440",
1352 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001353 { /* 440GP Rev. B */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001354 .pvr_mask = 0xf0000fff,
1355 .pvr_value = 0x40000440,
1356 .cpu_name = "440GP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001357 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001358 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001359 .icache_bsize = 32,
1360 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001361 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001362 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001363 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001364 { /* 440GP Rev. C */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001365 .pvr_mask = 0xf0000fff,
1366 .pvr_value = 0x40000481,
1367 .cpu_name = "440GP Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001368 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001369 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001370 .icache_bsize = 32,
1371 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001372 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001373 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001374 },
1375 { /* 440GX Rev. A */
1376 .pvr_mask = 0xf0000fff,
1377 .pvr_value = 0x50000850,
1378 .cpu_name = "440GX Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001379 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001380 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001381 .icache_bsize = 32,
1382 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001383 .cpu_setup = __setup_cpu_440gx,
1384 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001385 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001386 },
1387 { /* 440GX Rev. B */
1388 .pvr_mask = 0xf0000fff,
1389 .pvr_value = 0x50000851,
1390 .cpu_name = "440GX Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001391 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001392 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001393 .icache_bsize = 32,
1394 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001395 .cpu_setup = __setup_cpu_440gx,
1396 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001397 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001398 },
1399 { /* 440GX Rev. C */
1400 .pvr_mask = 0xf0000fff,
1401 .pvr_value = 0x50000892,
1402 .cpu_name = "440GX Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001403 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001404 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001405 .icache_bsize = 32,
1406 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001407 .cpu_setup = __setup_cpu_440gx,
1408 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001409 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001410 },
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001411 { /* 440GX Rev. F */
1412 .pvr_mask = 0xf0000fff,
1413 .pvr_value = 0x50000894,
1414 .cpu_name = "440GX Rev. F",
Kumar Gala10b35d92005-09-23 14:08:58 -05001415 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001416 .cpu_user_features = COMMON_USER_BOOKE,
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001417 .icache_bsize = 32,
1418 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001419 .cpu_setup = __setup_cpu_440gx,
1420 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001421 .platform = "ppc440",
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001422 },
Matt Porter656de7e2005-09-03 15:55:42 -07001423 { /* 440SP Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001424 .pvr_mask = 0xfff00fff,
1425 .pvr_value = 0x53200891,
Matt Porter656de7e2005-09-03 15:55:42 -07001426 .cpu_name = "440SP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001427 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001428 .cpu_user_features = COMMON_USER_BOOKE,
Matt Porter656de7e2005-09-03 15:55:42 -07001429 .icache_bsize = 32,
1430 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001431 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001432 .platform = "ppc440",
Matt Porter656de7e2005-09-03 15:55:42 -07001433 },
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001434 { /* 440SPe Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001435 .pvr_mask = 0xfff00fff,
1436 .pvr_value = 0x53400890,
1437 .cpu_name = "440SPe Rev. A",
1438 .cpu_features = CPU_FTRS_44X,
1439 .cpu_user_features = COMMON_USER_BOOKE,
1440 .icache_bsize = 32,
1441 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001442 .cpu_setup = __setup_cpu_440spe,
1443 .machine_check = machine_check_440A,
Roland Dreier333e6152007-06-16 05:36:32 +10001444 .platform = "ppc440",
1445 },
1446 { /* 440SPe Rev. B */
1447 .pvr_mask = 0xfff00fff,
1448 .pvr_value = 0x53400891,
1449 .cpu_name = "440SPe Rev. B",
Kumar Galaa147c582006-12-08 02:34:38 -06001450 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001451 .cpu_user_features = COMMON_USER_BOOKE,
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001452 .icache_bsize = 32,
1453 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001454 .cpu_setup = __setup_cpu_440spe,
1455 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001456 .platform = "ppc440",
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001457 },
John Linn23e72372008-07-01 09:42:07 -07001458 { /* 440 in Xilinx Virtex-5 FXT */
1459 .pvr_mask = 0xfffffff0,
1460 .pvr_value = 0x7ff21910,
1461 .cpu_name = "440 in Virtex-5 FXT",
1462 .cpu_features = CPU_FTRS_44X,
1463 .cpu_user_features = COMMON_USER_BOOKE,
1464 .icache_bsize = 32,
1465 .dcache_bsize = 32,
1466 .platform = "ppc440",
1467 },
Stefan Roese464076a2008-02-24 08:07:41 +11001468 { /* 460EX */
1469 .pvr_mask = 0xffff0002,
1470 .pvr_value = 0x13020002,
1471 .cpu_name = "460EX",
1472 .cpu_features = CPU_FTRS_44X,
1473 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1474 .icache_bsize = 32,
1475 .dcache_bsize = 32,
1476 .cpu_setup = __setup_cpu_460ex,
1477 .machine_check = machine_check_440A,
1478 .platform = "ppc440",
1479 },
1480 { /* 460GT */
1481 .pvr_mask = 0xffff0002,
1482 .pvr_value = 0x13020000,
1483 .cpu_name = "460GT",
1484 .cpu_features = CPU_FTRS_44X,
Josh Boyer939e6222008-06-11 07:52:40 -04001485 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Stefan Roese464076a2008-02-24 08:07:41 +11001486 .icache_bsize = 32,
1487 .dcache_bsize = 32,
Josh Boyer939e6222008-06-11 07:52:40 -04001488 .cpu_setup = __setup_cpu_460gt,
Stefan Roese464076a2008-02-24 08:07:41 +11001489 .machine_check = machine_check_440A,
1490 .platform = "ppc440",
1491 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001492 { /* default match */
1493 .pvr_mask = 0x00000000,
1494 .pvr_value = 0x00000000,
1495 .cpu_name = "(generic 44x PPC)",
1496 .cpu_features = CPU_FTRS_44X,
1497 .cpu_user_features = COMMON_USER_BOOKE,
1498 .icache_bsize = 32,
1499 .dcache_bsize = 32,
1500 .machine_check = machine_check_4xx,
1501 .platform = "ppc440",
1502 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001503#endif /* CONFIG_44x */
Josh Boyere3e414b2007-12-24 08:44:47 -06001504#ifdef CONFIG_E200
Stephen Rothwell49209602005-10-12 15:55:09 +10001505 { /* e200z5 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001506 .pvr_mask = 0xfff00000,
1507 .pvr_value = 0x81000000,
1508 .cpu_name = "e200z5",
1509 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001510 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001511 .cpu_user_features = COMMON_USER_BOOKE |
1512 PPC_FEATURE_HAS_EFP_SINGLE |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001513 PPC_FEATURE_UNIFIED_CACHE,
1514 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001515 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001516 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001517 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001518 { /* e200z6 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001519 .pvr_mask = 0xfff00000,
1520 .pvr_value = 0x81100000,
1521 .cpu_name = "e200z6",
1522 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001523 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001524 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001525 PPC_FEATURE_HAS_SPE_COMP |
1526 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001527 PPC_FEATURE_UNIFIED_CACHE,
1528 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001529 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001530 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001531 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001532 { /* default match */
1533 .pvr_mask = 0x00000000,
1534 .pvr_value = 0x00000000,
1535 .cpu_name = "(generic E200 PPC)",
1536 .cpu_features = CPU_FTRS_E200,
1537 .cpu_user_features = COMMON_USER_BOOKE |
1538 PPC_FEATURE_HAS_EFP_SINGLE |
1539 PPC_FEATURE_UNIFIED_CACHE,
1540 .dcache_bsize = 32,
1541 .machine_check = machine_check_e200,
1542 .platform = "ppc5554",
Paul Mackerras516c8be2008-05-12 14:20:35 +10001543 }
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001544#endif /* CONFIG_E200 */
1545#ifdef CONFIG_E500
Stephen Rothwell49209602005-10-12 15:55:09 +10001546 { /* e500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001547 .pvr_mask = 0xffff0000,
1548 .pvr_value = 0x80200000,
1549 .cpu_name = "e500",
Kumar Gala10b35d92005-09-23 14:08:58 -05001550 .cpu_features = CPU_FTRS_E500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001551 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001552 PPC_FEATURE_HAS_SPE_COMP |
1553 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001554 .icache_bsize = 32,
1555 .dcache_bsize = 32,
1556 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001557 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001558 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001559 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001560 .platform = "ppc8540",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001561 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001562 { /* e500v2 */
Kumar Gala5b37b702005-06-21 17:15:18 -07001563 .pvr_mask = 0xffff0000,
1564 .pvr_value = 0x80210000,
1565 .cpu_name = "e500v2",
Kumar Gala10b35d92005-09-23 14:08:58 -05001566 .cpu_features = CPU_FTRS_E500_2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001567 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001568 PPC_FEATURE_HAS_SPE_COMP |
1569 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1570 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
Kumar Gala5b37b702005-06-21 17:15:18 -07001571 .icache_bsize = 32,
1572 .dcache_bsize = 32,
1573 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001574 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001575 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001576 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001577 .platform = "ppc8548",
Kumar Gala5b37b702005-06-21 17:15:18 -07001578 },
Kumar Gala3dfa8772008-06-16 09:41:32 -05001579 { /* e500mc */
1580 .pvr_mask = 0xffff0000,
1581 .pvr_value = 0x80230000,
1582 .cpu_name = "e500mc",
Kumar Gala3dfa8772008-06-16 09:41:32 -05001583 .cpu_features = CPU_FTRS_E500MC,
1584 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1585 .icache_bsize = 64,
1586 .dcache_bsize = 64,
1587 .num_pmcs = 4,
1588 .oprofile_cpu_type = "ppc/e500", /* xxx - galak, e500mc? */
1589 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1590 .machine_check = machine_check_e500,
1591 .platform = "ppce500mc",
1592 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001593 { /* default match */
1594 .pvr_mask = 0x00000000,
1595 .pvr_value = 0x00000000,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001596 .cpu_name = "(generic E500 PPC)",
1597 .cpu_features = CPU_FTRS_E500,
1598 .cpu_user_features = COMMON_USER_BOOKE |
1599 PPC_FEATURE_HAS_SPE_COMP |
1600 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001601 .icache_bsize = 32,
1602 .dcache_bsize = 32,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001603 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001604 .platform = "powerpc",
Paul Mackerras516c8be2008-05-12 14:20:35 +10001605 }
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001606#endif /* CONFIG_E500 */
Stephen Rothwell49209602005-10-12 15:55:09 +10001607#endif /* CONFIG_PPC32 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001608};
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001609
Paul Mackerras87a72f92007-10-04 14:18:01 +10001610static struct cpu_spec the_cpu_spec;
1611
1612struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001613{
1614 struct cpu_spec *s = cpu_specs;
Paul Mackerras87a72f92007-10-04 14:18:01 +10001615 struct cpu_spec *t = &the_cpu_spec;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001616 int i;
1617
1618 s = PTRRELOC(s);
Paul Mackerras87a72f92007-10-04 14:18:01 +10001619 t = PTRRELOC(t);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001620
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001621 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
1622 if ((pvr & s->pvr_mask) == s->pvr_value) {
Paul Mackerras87a72f92007-10-04 14:18:01 +10001623 /*
1624 * If we are overriding a previous value derived
1625 * from the real PVR with a new value obtained
1626 * using a logical PVR value, don't modify the
1627 * performance monitor fields.
1628 */
1629 if (t->num_pmcs && !s->num_pmcs) {
1630 t->cpu_name = s->cpu_name;
1631 t->cpu_features = s->cpu_features;
1632 t->cpu_user_features = s->cpu_user_features;
1633 t->icache_bsize = s->icache_bsize;
1634 t->dcache_bsize = s->dcache_bsize;
1635 t->cpu_setup = s->cpu_setup;
1636 t->cpu_restore = s->cpu_restore;
1637 t->platform = s->platform;
Torez Smith79e25ba2008-07-18 06:42:07 +10001638 /*
1639 * If we have passed through this logic once
1640 * before and have pulled the default case
1641 * because the real PVR was not found inside
1642 * cpu_specs[], then we are possibly running in
1643 * compatibility mode. In that case, let the
1644 * oprofiler know which set of compatibility
1645 * counters to pull from by making sure the
1646 * oprofile_cpu_type string is set to that of
1647 * compatibility mode. If the oprofile_cpu_type
1648 * already has a value, then we are possibly
1649 * overriding a real PVR with a logical one, and,
1650 * in that case, keep the current value for
1651 * oprofile_cpu_type.
1652 */
1653 if (t->oprofile_cpu_type == NULL)
1654 t->oprofile_cpu_type = s->oprofile_cpu_type;
Paul Mackerras87a72f92007-10-04 14:18:01 +10001655 } else
1656 *t = *s;
1657 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
Nathan Lynch9115d132008-07-16 09:58:51 +10001658
1659 /*
1660 * Set the base platform string once; assumes
1661 * we're called with real pvr first.
1662 */
1663 if (powerpc_base_platform == NULL)
1664 powerpc_base_platform = t->platform;
1665
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001666#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
Stefan Roese464076a2008-02-24 08:07:41 +11001667 /* ppc64 and booke expect identify_cpu to also call
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001668 * setup_cpu for that processor. I will consolidate
1669 * that at a later time, for now, just use #ifdef.
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001670 * we also don't need to PTRRELOC the function pointer
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001671 * on ppc64 and booke as we are running at 0 in real
1672 * mode on ppc64 and reloc_offset is always 0 on booke.
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001673 */
1674 if (s->cpu_setup) {
1675 s->cpu_setup(offset, s);
1676 }
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001677#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001678 return s;
1679 }
1680 BUG();
1681 return NULL;
1682}