blob: 7e8719504f39d65bf50e822289c602470f569713 [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);
Grant Likely640d17d2008-12-04 05:39:55 +000042extern void __setup_cpu_440x5(unsigned long offset, struct cpu_spec* spec);
Stefan Roese464076a2008-02-24 08:07:41 +110043extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec);
Josh Boyer939e6222008-06-11 07:52:40 -040044extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec);
Kumar Gala400d2212005-09-27 15:13:12 -050045extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
46extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
47extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
48extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
49extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
50extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
51extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
52extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell49209602005-10-12 15:55:09 +100053#endif /* CONFIG_PPC32 */
Olof Johanssonf39b7a52006-08-11 00:07:08 -050054#ifdef CONFIG_PPC64
Kumar Gala400d2212005-09-27 15:13:12 -050055extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
Olof Johansson5b43d202006-10-04 23:41:41 -050056extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
Olof Johansson11999192007-02-04 16:36:51 -060057extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell40d244d2007-02-12 22:10:48 +110058extern void __restore_cpu_pa6t(void);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050059extern void __restore_cpu_ppc970(void);
Michael Neulinge952e6c2008-06-18 10:47:26 +100060extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec);
61extern void __restore_cpu_power7(void);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050062#endif /* CONFIG_PPC64 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070063
Linus Torvalds1da177e2005-04-16 15:20:36 -070064/* This table only contains "desktop" CPUs, it need to be filled with embedded
65 * ones as well...
66 */
Stephen Rothwell49209602005-10-12 15:55:09 +100067#define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
68 PPC_FEATURE_HAS_MMU)
69#define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +110070#define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +110071#define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
72 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
73#define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
74 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
Anton Blanchard03054d52006-04-29 09:51:06 +100075#define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
Paul Mackerrasfab5db92006-06-07 16:14:40 +100076 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)
Michael Neulinge952e6c2008-06-18 10:47:26 +100079#define COMMON_USER_POWER7 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
80 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
Nathan Lynch0f473312008-07-10 01:06:57 +100081 PPC_FEATURE_TRUE_LE | \
82 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -050083#define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
84 PPC_FEATURE_TRUE_LE | \
85 PPC_FEATURE_HAS_ALTIVEC_COMP)
Paul Mackerras80f15dc2006-01-14 10:11:39 +110086#define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
87 PPC_FEATURE_BOOKE)
Linus Torvalds1da177e2005-04-16 15:20:36 -070088
Paul Mackerras87a72f92007-10-04 14:18:01 +100089static struct cpu_spec __initdata cpu_specs[] = {
Stephen Rothwell49209602005-10-12 15:55:09 +100090#ifdef CONFIG_PPC64
91 { /* Power3 */
92 .pvr_mask = 0xffff0000,
93 .pvr_value = 0x00400000,
94 .cpu_name = "POWER3 (630)",
95 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +100096 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +100097 .icache_bsize = 128,
98 .dcache_bsize = 128,
99 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600100 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000101 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000102 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100103 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100104 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +1000105 },
106 { /* Power3+ */
107 .pvr_mask = 0xffff0000,
108 .pvr_value = 0x00410000,
109 .cpu_name = "POWER3 (630+)",
110 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000111 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000112 .icache_bsize = 128,
113 .dcache_bsize = 128,
114 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600115 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000116 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000117 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100118 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100119 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +1000120 },
121 { /* Northstar */
122 .pvr_mask = 0xffff0000,
123 .pvr_value = 0x00330000,
124 .cpu_name = "RS64-II (northstar)",
125 .cpu_features = CPU_FTRS_RS64,
126 .cpu_user_features = COMMON_USER_PPC64,
127 .icache_bsize = 128,
128 .dcache_bsize = 128,
129 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600130 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000131 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000132 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100133 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100134 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000135 },
136 { /* Pulsar */
137 .pvr_mask = 0xffff0000,
138 .pvr_value = 0x00340000,
139 .cpu_name = "RS64-III (pulsar)",
140 .cpu_features = CPU_FTRS_RS64,
141 .cpu_user_features = COMMON_USER_PPC64,
142 .icache_bsize = 128,
143 .dcache_bsize = 128,
144 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600145 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000146 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000147 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100148 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100149 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000150 },
151 { /* I-star */
152 .pvr_mask = 0xffff0000,
153 .pvr_value = 0x00360000,
154 .cpu_name = "RS64-III (icestar)",
155 .cpu_features = CPU_FTRS_RS64,
156 .cpu_user_features = COMMON_USER_PPC64,
157 .icache_bsize = 128,
158 .dcache_bsize = 128,
159 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600160 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000161 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000162 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100163 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100164 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000165 },
166 { /* S-star */
167 .pvr_mask = 0xffff0000,
168 .pvr_value = 0x00370000,
169 .cpu_name = "RS64-IV (sstar)",
170 .cpu_features = CPU_FTRS_RS64,
171 .cpu_user_features = COMMON_USER_PPC64,
172 .icache_bsize = 128,
173 .dcache_bsize = 128,
174 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600175 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000176 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000177 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100178 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100179 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000180 },
181 { /* Power4 */
182 .pvr_mask = 0xffff0000,
183 .pvr_value = 0x00350000,
184 .cpu_name = "POWER4 (gp)",
185 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100186 .cpu_user_features = COMMON_USER_POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000187 .icache_bsize = 128,
188 .dcache_bsize = 128,
189 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600190 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000191 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000192 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100193 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100194 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000195 },
196 { /* Power4+ */
197 .pvr_mask = 0xffff0000,
198 .pvr_value = 0x00380000,
199 .cpu_name = "POWER4+ (gq)",
200 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100201 .cpu_user_features = COMMON_USER_POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000202 .icache_bsize = 128,
203 .dcache_bsize = 128,
204 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600205 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000206 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000207 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100208 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100209 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000210 },
211 { /* PPC970 */
212 .pvr_mask = 0xffff0000,
213 .pvr_value = 0x00390000,
214 .cpu_name = "PPC970",
215 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100216 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000217 PPC_FEATURE_HAS_ALTIVEC_COMP,
218 .icache_bsize = 128,
219 .dcache_bsize = 128,
220 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600221 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000222 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500223 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000224 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000225 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100226 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100227 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000228 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000229 { /* PPC970FX */
230 .pvr_mask = 0xffff0000,
231 .pvr_value = 0x003c0000,
232 .cpu_name = "PPC970FX",
Stephen Rothwell49209602005-10-12 15:55:09 +1000233 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100234 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000235 PPC_FEATURE_HAS_ALTIVEC_COMP,
236 .icache_bsize = 128,
237 .dcache_bsize = 128,
238 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600239 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000240 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500241 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000242 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000243 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100244 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100245 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000246 },
Olof Johansson3546e812007-02-26 00:35:14 -0600247 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
248 .pvr_mask = 0xffffffff,
249 .pvr_value = 0x00440100,
250 .cpu_name = "PPC970MP",
251 .cpu_features = CPU_FTRS_PPC970,
252 .cpu_user_features = COMMON_USER_POWER4 |
253 PPC_FEATURE_HAS_ALTIVEC_COMP,
254 .icache_bsize = 128,
255 .dcache_bsize = 128,
256 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000257 .pmc_type = PPC_PMC_IBM,
Olof Johansson3546e812007-02-26 00:35:14 -0600258 .cpu_setup = __setup_cpu_ppc970,
259 .cpu_restore = __restore_cpu_ppc970,
260 .oprofile_cpu_type = "ppc64/970MP",
261 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100262 .machine_check = machine_check_generic,
Olof Johansson3546e812007-02-26 00:35:14 -0600263 .platform = "ppc970",
264 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000265 { /* PPC970MP */
266 .pvr_mask = 0xffff0000,
267 .pvr_value = 0x00440000,
268 .cpu_name = "PPC970MP",
269 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100270 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000271 PPC_FEATURE_HAS_ALTIVEC_COMP,
272 .icache_bsize = 128,
273 .dcache_bsize = 128,
Anton Blanchard87af41b2006-05-05 05:44:26 +1000274 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000275 .pmc_type = PPC_PMC_IBM,
Olof Johansson5b43d202006-10-04 23:41:41 -0500276 .cpu_setup = __setup_cpu_ppc970MP,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500277 .cpu_restore = __restore_cpu_ppc970,
Mike Wolffecb3522006-11-21 14:41:54 -0600278 .oprofile_cpu_type = "ppc64/970MP",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000279 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100280 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100281 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000282 },
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500283 { /* PPC970GX */
284 .pvr_mask = 0xffff0000,
285 .pvr_value = 0x00450000,
286 .cpu_name = "PPC970GX",
287 .cpu_features = CPU_FTRS_PPC970,
288 .cpu_user_features = COMMON_USER_POWER4 |
289 PPC_FEATURE_HAS_ALTIVEC_COMP,
290 .icache_bsize = 128,
291 .dcache_bsize = 128,
292 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600293 .pmc_type = PPC_PMC_IBM,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500294 .cpu_setup = __setup_cpu_ppc970,
295 .oprofile_cpu_type = "ppc64/970",
296 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100297 .machine_check = machine_check_generic,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500298 .platform = "ppc970",
299 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100300 { /* Power5 GR */
Stephen Rothwell49209602005-10-12 15:55:09 +1000301 .pvr_mask = 0xffff0000,
302 .pvr_value = 0x003a0000,
303 .cpu_name = "POWER5 (gr)",
304 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100305 .cpu_user_features = COMMON_USER_POWER5,
Stephen Rothwell49209602005-10-12 15:55:09 +1000306 .icache_bsize = 128,
307 .dcache_bsize = 128,
308 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600309 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000310 .oprofile_cpu_type = "ppc64/power5",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000311 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000312 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
313 * and above but only works on POWER5 and above
314 */
315 .oprofile_mmcra_sihv = MMCRA_SIHV,
316 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100317 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100318 .platform = "power5",
Stephen Rothwell49209602005-10-12 15:55:09 +1000319 },
Mike Wolf31a12ce2007-07-10 13:13:47 -0500320 { /* Power5++ */
321 .pvr_mask = 0xffffff00,
322 .pvr_value = 0x003b0300,
323 .cpu_name = "POWER5+ (gs)",
324 .cpu_features = CPU_FTRS_POWER5,
325 .cpu_user_features = COMMON_USER_POWER5_PLUS,
326 .icache_bsize = 128,
327 .dcache_bsize = 128,
328 .num_pmcs = 6,
329 .oprofile_cpu_type = "ppc64/power5++",
330 .oprofile_type = PPC_OPROFILE_POWER4,
331 .oprofile_mmcra_sihv = MMCRA_SIHV,
332 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100333 .machine_check = machine_check_generic,
Mike Wolf31a12ce2007-07-10 13:13:47 -0500334 .platform = "power5+",
335 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100336 { /* Power5 GS */
Stephen Rothwell49209602005-10-12 15:55:09 +1000337 .pvr_mask = 0xffff0000,
338 .pvr_value = 0x003b0000,
Anton Blanchard834608f2006-01-09 15:42:30 +1100339 .cpu_name = "POWER5+ (gs)",
Stephen Rothwell49209602005-10-12 15:55:09 +1000340 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100341 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Stephen Rothwell49209602005-10-12 15:55:09 +1000342 .icache_bsize = 128,
343 .dcache_bsize = 128,
344 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600345 .pmc_type = PPC_PMC_IBM,
Anton Blanchard834608f2006-01-09 15:42:30 +1100346 .oprofile_cpu_type = "ppc64/power5+",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000347 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000348 .oprofile_mmcra_sihv = MMCRA_SIHV,
349 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100350 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100351 .platform = "power5+",
Stephen Rothwell49209602005-10-12 15:55:09 +1000352 },
Paul Mackerras974a76f2006-11-10 20:38:53 +1100353 { /* POWER6 in P5+ mode; 2.04-compliant processor */
354 .pvr_mask = 0xffffffff,
355 .pvr_value = 0x0f000001,
356 .cpu_name = "POWER5+",
357 .cpu_features = CPU_FTRS_POWER5,
358 .cpu_user_features = COMMON_USER_POWER5_PLUS,
359 .icache_bsize = 128,
360 .dcache_bsize = 128,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100361 .machine_check = machine_check_generic,
Torez Smith79e25ba2008-07-18 06:42:07 +1000362 .oprofile_cpu_type = "ppc64/compat-power5+",
Paul Mackerras974a76f2006-11-10 20:38:53 +1100363 .platform = "power5+",
364 },
Anton Blanchard03054d52006-04-29 09:51:06 +1000365 { /* Power6 */
366 .pvr_mask = 0xffff0000,
367 .pvr_value = 0x003e0000,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100368 .cpu_name = "POWER6 (raw)",
369 .cpu_features = CPU_FTRS_POWER6,
370 .cpu_user_features = COMMON_USER_POWER6 |
371 PPC_FEATURE_POWER6_EXT,
372 .icache_bsize = 128,
373 .dcache_bsize = 128,
374 .num_pmcs = 6,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000375 .pmc_type = PPC_PMC_IBM,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100376 .oprofile_cpu_type = "ppc64/power6",
377 .oprofile_type = PPC_OPROFILE_POWER4,
378 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
379 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
380 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
381 POWER6_MMCRA_OTHER,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100382 .machine_check = machine_check_generic,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100383 .platform = "power6x",
384 },
385 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
386 .pvr_mask = 0xffffffff,
387 .pvr_value = 0x0f000002,
388 .cpu_name = "POWER6 (architected)",
Anton Blanchard03054d52006-04-29 09:51:06 +1000389 .cpu_features = CPU_FTRS_POWER6,
390 .cpu_user_features = COMMON_USER_POWER6,
391 .icache_bsize = 128,
392 .dcache_bsize = 128,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100393 .machine_check = machine_check_generic,
Torez Smith79e25ba2008-07-18 06:42:07 +1000394 .oprofile_cpu_type = "ppc64/compat-power6",
Anton Blanchard03054d52006-04-29 09:51:06 +1000395 .platform = "power6",
396 },
Joel Schopp635f5a62008-06-19 06:18:21 +1000397 { /* 2.06-compliant processor, i.e. Power7 "architected" mode */
398 .pvr_mask = 0xffffffff,
399 .pvr_value = 0x0f000003,
400 .cpu_name = "POWER7 (architected)",
401 .cpu_features = CPU_FTRS_POWER7,
402 .cpu_user_features = COMMON_USER_POWER7,
403 .icache_bsize = 128,
404 .dcache_bsize = 128,
405 .machine_check = machine_check_generic,
Torez Smith79e25ba2008-07-18 06:42:07 +1000406 .oprofile_cpu_type = "ppc64/compat-power7",
Joel Schopp635f5a62008-06-19 06:18:21 +1000407 .platform = "power7",
408 },
Michael Neulinge952e6c2008-06-18 10:47:26 +1000409 { /* Power7 */
410 .pvr_mask = 0xffff0000,
411 .pvr_value = 0x003f0000,
Joel Schopp635f5a62008-06-19 06:18:21 +1000412 .cpu_name = "POWER7 (raw)",
Michael Neulinge952e6c2008-06-18 10:47:26 +1000413 .cpu_features = CPU_FTRS_POWER7,
414 .cpu_user_features = COMMON_USER_POWER7,
415 .icache_bsize = 128,
416 .dcache_bsize = 128,
417 .num_pmcs = 6,
418 .pmc_type = PPC_PMC_IBM,
419 .cpu_setup = __setup_cpu_power7,
420 .cpu_restore = __restore_cpu_power7,
421 .oprofile_cpu_type = "ppc64/power7",
422 .oprofile_type = PPC_OPROFILE_POWER4,
423 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
424 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
425 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
426 POWER6_MMCRA_OTHER,
427 .platform = "power7",
428 },
Arnd Bergmannc902be72006-01-04 19:55:53 +0000429 { /* Cell Broadband Engine */
Stephen Rothwell49209602005-10-12 15:55:09 +1000430 .pvr_mask = 0xffff0000,
431 .pvr_value = 0x00700000,
432 .cpu_name = "Cell Broadband Engine",
433 .cpu_features = CPU_FTRS_CELL,
434 .cpu_user_features = COMMON_USER_PPC64 |
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +1100435 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
436 PPC_FEATURE_SMT,
Stephen Rothwell49209602005-10-12 15:55:09 +1000437 .icache_bsize = 128,
438 .dcache_bsize = 128,
Maynard Johnson18f21902006-11-20 18:45:16 +0100439 .num_pmcs = 4,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600440 .pmc_type = PPC_PMC_IBM,
Maynard Johnson18f21902006-11-20 18:45:16 +0100441 .oprofile_cpu_type = "ppc64/cell-be",
442 .oprofile_type = PPC_OPROFILE_CELL,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100443 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100444 .platform = "ppc-cell-be",
Stephen Rothwell49209602005-10-12 15:55:09 +1000445 },
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500446 { /* PA Semi PA6T */
447 .pvr_mask = 0x7fff0000,
448 .pvr_value = 0x00900000,
449 .cpu_name = "PA6T",
450 .cpu_features = CPU_FTRS_PA6T,
451 .cpu_user_features = COMMON_USER_PA6T,
452 .icache_bsize = 64,
453 .dcache_bsize = 64,
454 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600455 .pmc_type = PPC_PMC_PA6T,
Olof Johansson11999192007-02-04 16:36:51 -0600456 .cpu_setup = __setup_cpu_pa6t,
457 .cpu_restore = __restore_cpu_pa6t,
Olof Johansson25fc5302007-04-18 16:38:21 +1000458 .oprofile_cpu_type = "ppc64/pa6t",
459 .oprofile_type = PPC_OPROFILE_PA6T,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100460 .machine_check = machine_check_generic,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500461 .platform = "pa6t",
462 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000463 { /* default match */
464 .pvr_mask = 0x00000000,
465 .pvr_value = 0x00000000,
466 .cpu_name = "POWER4 (compatible)",
467 .cpu_features = CPU_FTRS_COMPATIBLE,
468 .cpu_user_features = COMMON_USER_PPC64,
469 .icache_bsize = 128,
470 .dcache_bsize = 128,
471 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600472 .pmc_type = PPC_PMC_IBM,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100473 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100474 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000475 }
476#endif /* CONFIG_PPC64 */
477#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -0700478#if CLASSIC_PPC
Stephen Rothwell49209602005-10-12 15:55:09 +1000479 { /* 601 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700480 .pvr_mask = 0xffff0000,
481 .pvr_value = 0x00010000,
482 .cpu_name = "601",
Kumar Gala10b35d92005-09-23 14:08:58 -0500483 .cpu_features = CPU_FTRS_PPC601,
Stephen Rothwell49209602005-10-12 15:55:09 +1000484 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
Paul Mackerras98599012005-10-22 16:51:34 +1000485 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700486 .icache_bsize = 32,
487 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100488 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100489 .platform = "ppc601",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700490 },
491 { /* 603 */
492 .pvr_mask = 0xffff0000,
493 .pvr_value = 0x00030000,
494 .cpu_name = "603",
Kumar Gala10b35d92005-09-23 14:08:58 -0500495 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000496 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700497 .icache_bsize = 32,
498 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100499 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100500 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100501 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700502 },
503 { /* 603e */
504 .pvr_mask = 0xffff0000,
505 .pvr_value = 0x00060000,
506 .cpu_name = "603e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500507 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000508 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700509 .icache_bsize = 32,
510 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100511 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100512 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100513 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700514 },
515 { /* 603ev */
516 .pvr_mask = 0xffff0000,
517 .pvr_value = 0x00070000,
518 .cpu_name = "603ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500519 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000520 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700521 .icache_bsize = 32,
522 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100523 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100524 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100525 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700526 },
527 { /* 604 */
528 .pvr_mask = 0xffff0000,
529 .pvr_value = 0x00040000,
530 .cpu_name = "604",
Kumar Gala10b35d92005-09-23 14:08:58 -0500531 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000532 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700533 .icache_bsize = 32,
534 .dcache_bsize = 32,
535 .num_pmcs = 2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100536 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100537 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100538 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700539 },
540 { /* 604e */
541 .pvr_mask = 0xfffff000,
542 .pvr_value = 0x00090000,
543 .cpu_name = "604e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500544 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000545 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700546 .icache_bsize = 32,
547 .dcache_bsize = 32,
548 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100549 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100550 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100551 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700552 },
553 { /* 604r */
554 .pvr_mask = 0xffff0000,
555 .pvr_value = 0x00090000,
556 .cpu_name = "604r",
Kumar Gala10b35d92005-09-23 14:08:58 -0500557 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000558 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700559 .icache_bsize = 32,
560 .dcache_bsize = 32,
561 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100562 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100563 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100564 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700565 },
566 { /* 604ev */
567 .pvr_mask = 0xffff0000,
568 .pvr_value = 0x000a0000,
569 .cpu_name = "604ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500570 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000571 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700572 .icache_bsize = 32,
573 .dcache_bsize = 32,
574 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100575 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100576 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100577 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700578 },
579 { /* 740/750 (0x4202, don't support TAU ?) */
580 .pvr_mask = 0xffffffff,
581 .pvr_value = 0x00084202,
582 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500583 .cpu_features = CPU_FTRS_740_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000584 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700585 .icache_bsize = 32,
586 .dcache_bsize = 32,
587 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100588 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100589 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100590 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700591 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700592 { /* 750CX (80100 and 8010x?) */
593 .pvr_mask = 0xfffffff0,
594 .pvr_value = 0x00080100,
595 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500596 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000597 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700598 .icache_bsize = 32,
599 .dcache_bsize = 32,
600 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100601 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100602 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100603 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700604 },
605 { /* 750CX (82201 and 82202) */
606 .pvr_mask = 0xfffffff0,
607 .pvr_value = 0x00082200,
608 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500609 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000610 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700611 .icache_bsize = 32,
612 .dcache_bsize = 32,
613 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000614 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100615 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100616 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100617 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700618 },
619 { /* 750CXe (82214) */
620 .pvr_mask = 0xfffffff0,
621 .pvr_value = 0x00082210,
622 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500623 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000624 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700625 .icache_bsize = 32,
626 .dcache_bsize = 32,
627 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000628 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100629 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100630 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100631 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700632 },
Arthur Othieno7c316252005-09-03 15:55:52 -0700633 { /* 750CXe "Gekko" (83214) */
634 .pvr_mask = 0xffffffff,
635 .pvr_value = 0x00083214,
636 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500637 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000638 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Arthur Othieno7c316252005-09-03 15:55:52 -0700639 .icache_bsize = 32,
640 .dcache_bsize = 32,
641 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000642 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100643 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100644 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100645 .platform = "ppc750",
Arthur Othieno7c316252005-09-03 15:55:52 -0700646 },
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500647 { /* 750CL */
648 .pvr_mask = 0xfffff0f0,
649 .pvr_value = 0x00087010,
650 .cpu_name = "750CL",
Josh Boyera14c4502007-04-13 04:33:25 +1000651 .cpu_features = CPU_FTRS_750CL,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500652 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
653 .icache_bsize = 32,
654 .dcache_bsize = 32,
655 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000656 .pmc_type = PPC_PMC_IBM,
Josh Boyera14c4502007-04-13 04:33:25 +1000657 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100658 .machine_check = machine_check_generic,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500659 .platform = "ppc750",
660 },
Arthur Othienoac1ff042005-09-03 15:55:51 -0700661 { /* 745/755 */
662 .pvr_mask = 0xfffff000,
663 .pvr_value = 0x00083000,
664 .cpu_name = "745/755",
Kumar Gala10b35d92005-09-23 14:08:58 -0500665 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000666 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Arthur Othienoac1ff042005-09-03 15:55:51 -0700667 .icache_bsize = 32,
668 .dcache_bsize = 32,
669 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000670 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100671 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100672 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100673 .platform = "ppc750",
Arthur Othienoac1ff042005-09-03 15:55:51 -0700674 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700675 { /* 750FX rev 1.x */
676 .pvr_mask = 0xffffff00,
677 .pvr_value = 0x70000100,
678 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500679 .cpu_features = CPU_FTRS_750FX1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000680 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700681 .icache_bsize = 32,
682 .dcache_bsize = 32,
683 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000684 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100685 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100686 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100687 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700688 },
689 { /* 750FX rev 2.0 must disable HID0[DPM] */
690 .pvr_mask = 0xffffffff,
691 .pvr_value = 0x70000200,
692 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500693 .cpu_features = CPU_FTRS_750FX2,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000694 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700695 .icache_bsize = 32,
696 .dcache_bsize = 32,
697 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000698 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100699 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100700 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100701 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700702 },
703 { /* 750FX (All revs except 2.0) */
704 .pvr_mask = 0xffff0000,
705 .pvr_value = 0x70000000,
706 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500707 .cpu_features = CPU_FTRS_750FX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000708 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700709 .icache_bsize = 32,
710 .dcache_bsize = 32,
711 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000712 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100713 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100714 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100715 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700716 },
717 { /* 750GX */
718 .pvr_mask = 0xffff0000,
719 .pvr_value = 0x70020000,
720 .cpu_name = "750GX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500721 .cpu_features = CPU_FTRS_750GX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000722 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700723 .icache_bsize = 32,
724 .dcache_bsize = 32,
725 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000726 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100727 .cpu_setup = __setup_cpu_750fx,
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 { /* 740/750 (L2CR bit need fixup for 740) */
732 .pvr_mask = 0xffff0000,
733 .pvr_value = 0x00080000,
734 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500735 .cpu_features = CPU_FTRS_740,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000736 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700737 .icache_bsize = 32,
738 .dcache_bsize = 32,
739 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000740 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100741 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100742 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100743 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700744 },
745 { /* 7400 rev 1.1 ? (no TAU) */
746 .pvr_mask = 0xffffffff,
747 .pvr_value = 0x000c1101,
748 .cpu_name = "7400 (1.1)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500749 .cpu_features = CPU_FTRS_7400_NOTAU,
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,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000755 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100756 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100757 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100758 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700759 },
760 { /* 7400 */
761 .pvr_mask = 0xffff0000,
762 .pvr_value = 0x000c0000,
763 .cpu_name = "7400",
Kumar Gala10b35d92005-09-23 14:08:58 -0500764 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000765 .cpu_user_features = COMMON_USER |
766 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700767 .icache_bsize = 32,
768 .dcache_bsize = 32,
769 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000770 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100771 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100772 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100773 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700774 },
775 { /* 7410 */
776 .pvr_mask = 0xffff0000,
777 .pvr_value = 0x800c0000,
778 .cpu_name = "7410",
Kumar Gala10b35d92005-09-23 14:08:58 -0500779 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000780 .cpu_user_features = COMMON_USER |
781 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700782 .icache_bsize = 32,
783 .dcache_bsize = 32,
784 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000785 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100786 .cpu_setup = __setup_cpu_7410,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100787 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100788 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700789 },
790 { /* 7450 2.0 - no doze/nap */
791 .pvr_mask = 0xffffffff,
792 .pvr_value = 0x80000200,
793 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500794 .cpu_features = CPU_FTRS_7450_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000795 .cpu_user_features = COMMON_USER |
796 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700797 .icache_bsize = 32,
798 .dcache_bsize = 32,
799 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000800 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600801 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600802 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000803 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100804 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100805 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700806 },
807 { /* 7450 2.1 */
808 .pvr_mask = 0xffffffff,
809 .pvr_value = 0x80000201,
810 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500811 .cpu_features = CPU_FTRS_7450_21,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000812 .cpu_user_features = COMMON_USER |
813 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700814 .icache_bsize = 32,
815 .dcache_bsize = 32,
816 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000817 .pmc_type = PPC_PMC_G4,
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 { /* 7450 2.3 and newer */
825 .pvr_mask = 0xffff0000,
826 .pvr_value = 0x80000000,
827 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500828 .cpu_features = CPU_FTRS_7450_23,
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,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000834 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600835 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600836 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000837 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100838 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100839 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700840 },
841 { /* 7455 rev 1.x */
842 .pvr_mask = 0xffffff00,
843 .pvr_value = 0x80010100,
844 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500845 .cpu_features = CPU_FTRS_7455_1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000846 .cpu_user_features = COMMON_USER |
847 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700848 .icache_bsize = 32,
849 .dcache_bsize = 32,
850 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000851 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600852 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600853 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000854 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100855 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100856 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700857 },
858 { /* 7455 rev 2.0 */
859 .pvr_mask = 0xffffffff,
860 .pvr_value = 0x80010200,
861 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500862 .cpu_features = CPU_FTRS_7455_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000863 .cpu_user_features = COMMON_USER |
864 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700865 .icache_bsize = 32,
866 .dcache_bsize = 32,
867 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000868 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600869 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600870 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000871 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100872 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100873 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700874 },
875 { /* 7455 others */
876 .pvr_mask = 0xffff0000,
877 .pvr_value = 0x80010000,
878 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500879 .cpu_features = CPU_FTRS_7455,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000880 .cpu_user_features = COMMON_USER |
881 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700882 .icache_bsize = 32,
883 .dcache_bsize = 32,
884 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000885 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600886 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600887 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000888 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100889 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100890 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700891 },
892 { /* 7447/7457 Rev 1.0 */
893 .pvr_mask = 0xffffffff,
894 .pvr_value = 0x80020100,
895 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500896 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000897 .cpu_user_features = COMMON_USER |
898 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700899 .icache_bsize = 32,
900 .dcache_bsize = 32,
901 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000902 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600903 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600904 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000905 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100906 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100907 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700908 },
909 { /* 7447/7457 Rev 1.1 */
910 .pvr_mask = 0xffffffff,
911 .pvr_value = 0x80020101,
912 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500913 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000914 .cpu_user_features = COMMON_USER |
915 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700916 .icache_bsize = 32,
917 .dcache_bsize = 32,
918 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000919 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600920 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600921 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000922 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100923 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100924 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700925 },
926 { /* 7447/7457 Rev 1.2 and later */
927 .pvr_mask = 0xffff0000,
928 .pvr_value = 0x80020000,
929 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500930 .cpu_features = CPU_FTRS_7447,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000931 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700932 .icache_bsize = 32,
933 .dcache_bsize = 32,
934 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000935 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600936 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600937 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000938 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100939 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100940 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700941 },
942 { /* 7447A */
943 .pvr_mask = 0xffff0000,
944 .pvr_value = 0x80030000,
945 .cpu_name = "7447A",
Kumar Gala10b35d92005-09-23 14:08:58 -0500946 .cpu_features = CPU_FTRS_7447A,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000947 .cpu_user_features = COMMON_USER |
948 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700949 .icache_bsize = 32,
950 .dcache_bsize = 32,
951 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000952 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600953 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600954 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000955 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100956 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100957 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700958 },
Kumar Galabbde6302005-09-03 15:55:55 -0700959 { /* 7448 */
960 .pvr_mask = 0xffff0000,
961 .pvr_value = 0x80040000,
962 .cpu_name = "7448",
James.Yang3d372542007-05-02 16:34:43 -0500963 .cpu_features = CPU_FTRS_7448,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000964 .cpu_user_features = COMMON_USER |
965 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Kumar Galabbde6302005-09-03 15:55:55 -0700966 .icache_bsize = 32,
967 .dcache_bsize = 32,
968 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000969 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600970 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600971 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000972 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100973 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100974 .platform = "ppc7450",
Kumar Galabbde6302005-09-03 15:55:55 -0700975 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700976 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
977 .pvr_mask = 0x7fff0000,
978 .pvr_value = 0x00810000,
979 .cpu_name = "82xx",
Kumar Gala10b35d92005-09-23 14:08:58 -0500980 .cpu_features = CPU_FTRS_82XX,
Stephen Rothwell49209602005-10-12 15:55:09 +1000981 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700982 .icache_bsize = 32,
983 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100984 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100985 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100986 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700987 },
988 { /* All G2_LE (603e core, plus some) have the same pvr */
989 .pvr_mask = 0x7fff0000,
990 .pvr_value = 0x00820000,
991 .cpu_name = "G2_LE",
Kumar Gala10b35d92005-09-23 14:08:58 -0500992 .cpu_features = CPU_FTRS_G2_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000993 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700994 .icache_bsize = 32,
995 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100996 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100997 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100998 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700999 },
Kim Phillips6c4a2502006-10-02 20:10:24 -05001000 { /* e300c1 (a 603e core, plus some) on 83xx */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001001 .pvr_mask = 0x7fff0000,
1002 .pvr_value = 0x00830000,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001003 .cpu_name = "e300c1",
Kumar Gala10b35d92005-09-23 14:08:58 -05001004 .cpu_features = CPU_FTRS_E300,
Stephen Rothwell49209602005-10-12 15:55:09 +10001005 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001006 .icache_bsize = 32,
1007 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001008 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001009 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001010 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001011 },
Kim Phillips6c4a2502006-10-02 20:10:24 -05001012 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
1013 .pvr_mask = 0x7fff0000,
1014 .pvr_value = 0x00840000,
1015 .cpu_name = "e300c2",
Kim Phillipsaa42c692006-12-08 02:43:30 -06001016 .cpu_features = CPU_FTRS_E300C2,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001017 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1018 .icache_bsize = 32,
1019 .dcache_bsize = 32,
1020 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001021 .machine_check = machine_check_generic,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001022 .platform = "ppc603",
1023 },
Li Yanga58d5242007-10-19 19:38:42 +08001024 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
Scott Wood57933f82006-12-01 12:57:05 -06001025 .pvr_mask = 0x7fff0000,
1026 .pvr_value = 0x00850000,
1027 .cpu_name = "e300c3",
1028 .cpu_features = CPU_FTRS_E300,
1029 .cpu_user_features = COMMON_USER,
1030 .icache_bsize = 32,
1031 .dcache_bsize = 32,
1032 .cpu_setup = __setup_cpu_603,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001033 .num_pmcs = 4,
1034 .oprofile_cpu_type = "ppc/e300",
1035 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Scott Wood57933f82006-12-01 12:57:05 -06001036 .platform = "ppc603",
1037 },
Li Yanga58d5242007-10-19 19:38:42 +08001038 { /* e300c4 (e300c1, plus one IU) */
1039 .pvr_mask = 0x7fff0000,
1040 .pvr_value = 0x00860000,
1041 .cpu_name = "e300c4",
1042 .cpu_features = CPU_FTRS_E300,
1043 .cpu_user_features = COMMON_USER,
1044 .icache_bsize = 32,
1045 .dcache_bsize = 32,
1046 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001047 .machine_check = machine_check_generic,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001048 .num_pmcs = 4,
1049 .oprofile_cpu_type = "ppc/e300",
1050 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Li Yanga58d5242007-10-19 19:38:42 +08001051 .platform = "ppc603",
1052 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001053 { /* default match, we assume split I/D cache & TB (non-601)... */
1054 .pvr_mask = 0x00000000,
1055 .pvr_value = 0x00000000,
1056 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -05001057 .cpu_features = CPU_FTRS_CLASSIC32,
Stephen Rothwell49209602005-10-12 15:55:09 +10001058 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001059 .icache_bsize = 32,
1060 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001061 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001062 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001063 },
1064#endif /* CLASSIC_PPC */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001065#ifdef CONFIG_8xx
1066 { /* 8xx */
1067 .pvr_mask = 0xffff0000,
1068 .pvr_value = 0x00500000,
1069 .cpu_name = "8xx",
1070 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1071 * if the 8xx code is there.... */
Kumar Gala10b35d92005-09-23 14:08:58 -05001072 .cpu_features = CPU_FTRS_8XX,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001073 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1074 .icache_bsize = 16,
1075 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001076 .platform = "ppc823",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001077 },
1078#endif /* CONFIG_8xx */
1079#ifdef CONFIG_40x
1080 { /* 403GC */
1081 .pvr_mask = 0xffffff00,
1082 .pvr_value = 0x00200200,
1083 .cpu_name = "403GC",
Kumar Gala10b35d92005-09-23 14:08:58 -05001084 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001085 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1086 .icache_bsize = 16,
1087 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001088 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001089 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001090 },
1091 { /* 403GCX */
1092 .pvr_mask = 0xffffff00,
1093 .pvr_value = 0x00201400,
1094 .cpu_name = "403GCX",
Kumar Gala10b35d92005-09-23 14:08:58 -05001095 .cpu_features = CPU_FTRS_40X,
Paul Mackerras98599012005-10-22 16:51:34 +10001096 .cpu_user_features = PPC_FEATURE_32 |
1097 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001098 .icache_bsize = 16,
1099 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001100 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001101 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001102 },
1103 { /* 403G ?? */
1104 .pvr_mask = 0xffff0000,
1105 .pvr_value = 0x00200000,
1106 .cpu_name = "403G ??",
Kumar Gala10b35d92005-09-23 14:08:58 -05001107 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001108 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1109 .icache_bsize = 16,
1110 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001111 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001112 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001113 },
1114 { /* 405GP */
1115 .pvr_mask = 0xffff0000,
1116 .pvr_value = 0x40110000,
1117 .cpu_name = "405GP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001118 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001119 .cpu_user_features = PPC_FEATURE_32 |
1120 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1121 .icache_bsize = 32,
1122 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001123 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001124 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001125 },
1126 { /* STB 03xxx */
1127 .pvr_mask = 0xffff0000,
1128 .pvr_value = 0x40130000,
1129 .cpu_name = "STB03xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001130 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001131 .cpu_user_features = PPC_FEATURE_32 |
1132 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1133 .icache_bsize = 32,
1134 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001135 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001136 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001137 },
1138 { /* STB 04xxx */
1139 .pvr_mask = 0xffff0000,
1140 .pvr_value = 0x41810000,
1141 .cpu_name = "STB04xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001142 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001143 .cpu_user_features = PPC_FEATURE_32 |
1144 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1145 .icache_bsize = 32,
1146 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001147 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001148 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001149 },
1150 { /* NP405L */
1151 .pvr_mask = 0xffff0000,
1152 .pvr_value = 0x41610000,
1153 .cpu_name = "NP405L",
Kumar Gala10b35d92005-09-23 14:08:58 -05001154 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001155 .cpu_user_features = PPC_FEATURE_32 |
1156 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1157 .icache_bsize = 32,
1158 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001159 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001160 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001161 },
1162 { /* NP4GS3 */
1163 .pvr_mask = 0xffff0000,
1164 .pvr_value = 0x40B10000,
1165 .cpu_name = "NP4GS3",
Kumar Gala10b35d92005-09-23 14:08:58 -05001166 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001167 .cpu_user_features = PPC_FEATURE_32 |
1168 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1169 .icache_bsize = 32,
1170 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001171 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001172 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001173 },
1174 { /* NP405H */
1175 .pvr_mask = 0xffff0000,
1176 .pvr_value = 0x41410000,
1177 .cpu_name = "NP405H",
Kumar Gala10b35d92005-09-23 14:08:58 -05001178 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001179 .cpu_user_features = PPC_FEATURE_32 |
1180 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1181 .icache_bsize = 32,
1182 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001183 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001184 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001185 },
1186 { /* 405GPr */
1187 .pvr_mask = 0xffff0000,
1188 .pvr_value = 0x50910000,
1189 .cpu_name = "405GPr",
Kumar Gala10b35d92005-09-23 14:08:58 -05001190 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001191 .cpu_user_features = PPC_FEATURE_32 |
1192 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1193 .icache_bsize = 32,
1194 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001195 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001196 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001197 },
1198 { /* STBx25xx */
1199 .pvr_mask = 0xffff0000,
1200 .pvr_value = 0x51510000,
1201 .cpu_name = "STBx25xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001202 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001203 .cpu_user_features = PPC_FEATURE_32 |
1204 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1205 .icache_bsize = 32,
1206 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001207 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001208 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001209 },
1210 { /* 405LP */
1211 .pvr_mask = 0xffff0000,
1212 .pvr_value = 0x41F10000,
1213 .cpu_name = "405LP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001214 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001215 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1216 .icache_bsize = 32,
1217 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001218 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001219 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001220 },
1221 { /* Xilinx Virtex-II Pro */
Grant C. Likely72646c72006-01-19 01:13:20 -07001222 .pvr_mask = 0xfffff000,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001223 .pvr_value = 0x20010000,
1224 .cpu_name = "Virtex-II Pro",
Kumar Gala10b35d92005-09-23 14:08:58 -05001225 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001226 .cpu_user_features = PPC_FEATURE_32 |
1227 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1228 .icache_bsize = 32,
1229 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001230 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001231 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001232 },
Grant C. Likely72646c72006-01-19 01:13:20 -07001233 { /* Xilinx Virtex-4 FX */
1234 .pvr_mask = 0xfffff000,
1235 .pvr_value = 0x20011000,
1236 .cpu_name = "Virtex-4 FX",
1237 .cpu_features = CPU_FTRS_40X,
1238 .cpu_user_features = PPC_FEATURE_32 |
1239 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1240 .icache_bsize = 32,
1241 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001242 .machine_check = machine_check_4xx,
Peter Bergner838fdb42006-09-14 14:18:38 -05001243 .platform = "ppc405",
Grant C. Likely72646c72006-01-19 01:13:20 -07001244 },
Eugene Suroveginad95d602005-06-07 13:22:09 -07001245 { /* 405EP */
1246 .pvr_mask = 0xffff0000,
1247 .pvr_value = 0x51210000,
1248 .cpu_name = "405EP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001249 .cpu_features = CPU_FTRS_40X,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001250 .cpu_user_features = PPC_FEATURE_32 |
1251 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1252 .icache_bsize = 32,
1253 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001254 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001255 .platform = "ppc405",
Eugene Suroveginad95d602005-06-07 13:22:09 -07001256 },
Stefan Roese5d8476c2007-10-11 22:08:14 +10001257 { /* 405EX */
Stefan Roeseb676d842008-01-15 18:09:15 +11001258 .pvr_mask = 0xffff0004,
1259 .pvr_value = 0x12910004,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001260 .cpu_name = "405EX",
1261 .cpu_features = CPU_FTRS_40X,
1262 .cpu_user_features = PPC_FEATURE_32 |
1263 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1264 .icache_bsize = 32,
1265 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001266 .machine_check = machine_check_4xx,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001267 .platform = "ppc405",
1268 },
Stefan Roeseb676d842008-01-15 18:09:15 +11001269 { /* 405EXr */
1270 .pvr_mask = 0xffff0004,
1271 .pvr_value = 0x12910000,
1272 .cpu_name = "405EXr",
1273 .cpu_features = CPU_FTRS_40X,
1274 .cpu_user_features = PPC_FEATURE_32 |
1275 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1276 .icache_bsize = 32,
1277 .dcache_bsize = 32,
1278 .machine_check = machine_check_4xx,
1279 .platform = "ppc405",
1280 },
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001281 {
1282 /* 405EZ */
1283 .pvr_mask = 0xffff0000,
1284 .pvr_value = 0x41510000,
1285 .cpu_name = "405EZ",
1286 .cpu_features = CPU_FTRS_40X,
1287 .cpu_user_features = PPC_FEATURE_32 |
1288 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1289 .icache_bsize = 32,
1290 .dcache_bsize = 32,
1291 .machine_check = machine_check_4xx,
1292 .platform = "ppc405",
1293 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001294 { /* default match */
1295 .pvr_mask = 0x00000000,
1296 .pvr_value = 0x00000000,
1297 .cpu_name = "(generic 40x PPC)",
1298 .cpu_features = CPU_FTRS_40X,
1299 .cpu_user_features = PPC_FEATURE_32 |
1300 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1301 .icache_bsize = 32,
1302 .dcache_bsize = 32,
1303 .machine_check = machine_check_4xx,
1304 .platform = "ppc405",
1305 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001306
1307#endif /* CONFIG_40x */
1308#ifdef CONFIG_44x
Matt Porterc9cf73a2005-07-31 22:34:52 -07001309 {
1310 .pvr_mask = 0xf0000fff,
1311 .pvr_value = 0x40000850,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001312 .cpu_name = "440GR Rev. A",
1313 .cpu_features = CPU_FTRS_44X,
1314 .cpu_user_features = COMMON_USER_BOOKE,
1315 .icache_bsize = 32,
1316 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001317 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001318 .platform = "ppc440",
1319 },
1320 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1321 .pvr_mask = 0xf0000fff,
1322 .pvr_value = 0x40000858,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001323 .cpu_name = "440EP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001324 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001325 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001326 .icache_bsize = 32,
1327 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001328 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001329 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001330 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001331 },
1332 {
1333 .pvr_mask = 0xf0000fff,
1334 .pvr_value = 0x400008d3,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001335 .cpu_name = "440GR Rev. B",
1336 .cpu_features = CPU_FTRS_44X,
1337 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1338 .icache_bsize = 32,
1339 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001340 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001341 .platform = "ppc440",
1342 },
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001343 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1344 .pvr_mask = 0xf0000ff7,
1345 .pvr_value = 0x400008d4,
1346 .cpu_name = "440EP Rev. C",
1347 .cpu_features = CPU_FTRS_44X,
1348 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1349 .icache_bsize = 32,
1350 .dcache_bsize = 32,
1351 .cpu_setup = __setup_cpu_440ep,
1352 .machine_check = machine_check_4xx,
1353 .platform = "ppc440",
1354 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001355 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1356 .pvr_mask = 0xf0000fff,
1357 .pvr_value = 0x400008db,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001358 .cpu_name = "440EP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001359 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001360 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001361 .icache_bsize = 32,
1362 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001363 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001364 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001365 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001366 },
Valentine Barshak15fc9932007-08-29 17:40:30 +04001367 { /* 440GRX */
1368 .pvr_mask = 0xf0000ffb,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001369 .pvr_value = 0x200008D0,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001370 .cpu_name = "440GRX",
1371 .cpu_features = CPU_FTRS_44X,
1372 .cpu_user_features = COMMON_USER_BOOKE,
1373 .icache_bsize = 32,
1374 .dcache_bsize = 32,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001375 .cpu_setup = __setup_cpu_440grx,
Valentine Barshakb2be3b12007-12-22 03:22:23 +11001376 .machine_check = machine_check_440A,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001377 .platform = "ppc440",
Valentine Barshak15fc9932007-08-29 17:40:30 +04001378 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001379 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1380 .pvr_mask = 0xf0000ffb,
1381 .pvr_value = 0x200008D8,
1382 .cpu_name = "440EPX",
1383 .cpu_features = CPU_FTRS_44X,
1384 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1385 .icache_bsize = 32,
1386 .dcache_bsize = 32,
1387 .cpu_setup = __setup_cpu_440epx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001388 .machine_check = machine_check_440A,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001389 .platform = "ppc440",
1390 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001391 { /* 440GP Rev. B */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001392 .pvr_mask = 0xf0000fff,
1393 .pvr_value = 0x40000440,
1394 .cpu_name = "440GP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001395 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001396 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001397 .icache_bsize = 32,
1398 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001399 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001400 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001401 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001402 { /* 440GP Rev. C */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001403 .pvr_mask = 0xf0000fff,
1404 .pvr_value = 0x40000481,
1405 .cpu_name = "440GP Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001406 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001407 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001408 .icache_bsize = 32,
1409 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001410 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001411 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001412 },
1413 { /* 440GX Rev. A */
1414 .pvr_mask = 0xf0000fff,
1415 .pvr_value = 0x50000850,
1416 .cpu_name = "440GX Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001417 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001418 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001419 .icache_bsize = 32,
1420 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001421 .cpu_setup = __setup_cpu_440gx,
1422 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001423 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001424 },
1425 { /* 440GX Rev. B */
1426 .pvr_mask = 0xf0000fff,
1427 .pvr_value = 0x50000851,
1428 .cpu_name = "440GX Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001429 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001430 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001431 .icache_bsize = 32,
1432 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001433 .cpu_setup = __setup_cpu_440gx,
1434 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001435 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001436 },
1437 { /* 440GX Rev. C */
1438 .pvr_mask = 0xf0000fff,
1439 .pvr_value = 0x50000892,
1440 .cpu_name = "440GX Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001441 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001442 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001443 .icache_bsize = 32,
1444 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001445 .cpu_setup = __setup_cpu_440gx,
1446 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001447 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001448 },
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001449 { /* 440GX Rev. F */
1450 .pvr_mask = 0xf0000fff,
1451 .pvr_value = 0x50000894,
1452 .cpu_name = "440GX Rev. F",
Kumar Gala10b35d92005-09-23 14:08:58 -05001453 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001454 .cpu_user_features = COMMON_USER_BOOKE,
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001455 .icache_bsize = 32,
1456 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001457 .cpu_setup = __setup_cpu_440gx,
1458 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001459 .platform = "ppc440",
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001460 },
Matt Porter656de7e2005-09-03 15:55:42 -07001461 { /* 440SP Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001462 .pvr_mask = 0xfff00fff,
1463 .pvr_value = 0x53200891,
Matt Porter656de7e2005-09-03 15:55:42 -07001464 .cpu_name = "440SP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001465 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001466 .cpu_user_features = COMMON_USER_BOOKE,
Matt Porter656de7e2005-09-03 15:55:42 -07001467 .icache_bsize = 32,
1468 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001469 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001470 .platform = "ppc440",
Matt Porter656de7e2005-09-03 15:55:42 -07001471 },
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001472 { /* 440SPe Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001473 .pvr_mask = 0xfff00fff,
1474 .pvr_value = 0x53400890,
1475 .cpu_name = "440SPe Rev. A",
1476 .cpu_features = CPU_FTRS_44X,
1477 .cpu_user_features = COMMON_USER_BOOKE,
1478 .icache_bsize = 32,
1479 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001480 .cpu_setup = __setup_cpu_440spe,
1481 .machine_check = machine_check_440A,
Roland Dreier333e6152007-06-16 05:36:32 +10001482 .platform = "ppc440",
1483 },
1484 { /* 440SPe Rev. B */
1485 .pvr_mask = 0xfff00fff,
1486 .pvr_value = 0x53400891,
1487 .cpu_name = "440SPe Rev. B",
Kumar Galaa147c582006-12-08 02:34:38 -06001488 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001489 .cpu_user_features = COMMON_USER_BOOKE,
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001490 .icache_bsize = 32,
1491 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001492 .cpu_setup = __setup_cpu_440spe,
1493 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001494 .platform = "ppc440",
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001495 },
John Linn23e72372008-07-01 09:42:07 -07001496 { /* 440 in Xilinx Virtex-5 FXT */
1497 .pvr_mask = 0xfffffff0,
1498 .pvr_value = 0x7ff21910,
1499 .cpu_name = "440 in Virtex-5 FXT",
1500 .cpu_features = CPU_FTRS_44X,
1501 .cpu_user_features = COMMON_USER_BOOKE,
1502 .icache_bsize = 32,
1503 .dcache_bsize = 32,
Grant Likely640d17d2008-12-04 05:39:55 +00001504 .cpu_setup = __setup_cpu_440x5,
1505 .machine_check = machine_check_440A,
John Linn23e72372008-07-01 09:42:07 -07001506 .platform = "ppc440",
1507 },
Stefan Roese464076a2008-02-24 08:07:41 +11001508 { /* 460EX */
1509 .pvr_mask = 0xffff0002,
1510 .pvr_value = 0x13020002,
1511 .cpu_name = "460EX",
1512 .cpu_features = CPU_FTRS_44X,
1513 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1514 .icache_bsize = 32,
1515 .dcache_bsize = 32,
1516 .cpu_setup = __setup_cpu_460ex,
1517 .machine_check = machine_check_440A,
1518 .platform = "ppc440",
1519 },
1520 { /* 460GT */
1521 .pvr_mask = 0xffff0002,
1522 .pvr_value = 0x13020000,
1523 .cpu_name = "460GT",
1524 .cpu_features = CPU_FTRS_44X,
Josh Boyer939e6222008-06-11 07:52:40 -04001525 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Stefan Roese464076a2008-02-24 08:07:41 +11001526 .icache_bsize = 32,
1527 .dcache_bsize = 32,
Josh Boyer939e6222008-06-11 07:52:40 -04001528 .cpu_setup = __setup_cpu_460gt,
Stefan Roese464076a2008-02-24 08:07:41 +11001529 .machine_check = machine_check_440A,
1530 .platform = "ppc440",
1531 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001532 { /* default match */
1533 .pvr_mask = 0x00000000,
1534 .pvr_value = 0x00000000,
1535 .cpu_name = "(generic 44x PPC)",
1536 .cpu_features = CPU_FTRS_44X,
1537 .cpu_user_features = COMMON_USER_BOOKE,
1538 .icache_bsize = 32,
1539 .dcache_bsize = 32,
1540 .machine_check = machine_check_4xx,
1541 .platform = "ppc440",
1542 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001543#endif /* CONFIG_44x */
Josh Boyere3e414b2007-12-24 08:44:47 -06001544#ifdef CONFIG_E200
Stephen Rothwell49209602005-10-12 15:55:09 +10001545 { /* e200z5 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001546 .pvr_mask = 0xfff00000,
1547 .pvr_value = 0x81000000,
1548 .cpu_name = "e200z5",
1549 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001550 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001551 .cpu_user_features = COMMON_USER_BOOKE |
1552 PPC_FEATURE_HAS_EFP_SINGLE |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001553 PPC_FEATURE_UNIFIED_CACHE,
1554 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001555 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001556 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001557 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001558 { /* e200z6 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001559 .pvr_mask = 0xfff00000,
1560 .pvr_value = 0x81100000,
1561 .cpu_name = "e200z6",
1562 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001563 .cpu_features = CPU_FTRS_E200,
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 |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001567 PPC_FEATURE_UNIFIED_CACHE,
1568 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001569 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001570 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001571 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001572 { /* default match */
1573 .pvr_mask = 0x00000000,
1574 .pvr_value = 0x00000000,
1575 .cpu_name = "(generic E200 PPC)",
1576 .cpu_features = CPU_FTRS_E200,
1577 .cpu_user_features = COMMON_USER_BOOKE |
1578 PPC_FEATURE_HAS_EFP_SINGLE |
1579 PPC_FEATURE_UNIFIED_CACHE,
1580 .dcache_bsize = 32,
1581 .machine_check = machine_check_e200,
1582 .platform = "ppc5554",
Paul Mackerras516c8be2008-05-12 14:20:35 +10001583 }
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001584#endif /* CONFIG_E200 */
1585#ifdef CONFIG_E500
Stephen Rothwell49209602005-10-12 15:55:09 +10001586 { /* e500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001587 .pvr_mask = 0xffff0000,
1588 .pvr_value = 0x80200000,
1589 .cpu_name = "e500",
Kumar Gala10b35d92005-09-23 14:08:58 -05001590 .cpu_features = CPU_FTRS_E500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001591 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001592 PPC_FEATURE_HAS_SPE_COMP |
1593 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001594 .icache_bsize = 32,
1595 .dcache_bsize = 32,
1596 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001597 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001598 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001599 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001600 .platform = "ppc8540",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001601 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001602 { /* e500v2 */
Kumar Gala5b37b702005-06-21 17:15:18 -07001603 .pvr_mask = 0xffff0000,
1604 .pvr_value = 0x80210000,
1605 .cpu_name = "e500v2",
Kumar Gala10b35d92005-09-23 14:08:58 -05001606 .cpu_features = CPU_FTRS_E500_2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001607 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001608 PPC_FEATURE_HAS_SPE_COMP |
1609 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1610 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
Kumar Gala5b37b702005-06-21 17:15:18 -07001611 .icache_bsize = 32,
1612 .dcache_bsize = 32,
1613 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001614 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001615 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001616 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001617 .platform = "ppc8548",
Kumar Gala5b37b702005-06-21 17:15:18 -07001618 },
Kumar Gala3dfa8772008-06-16 09:41:32 -05001619 { /* e500mc */
1620 .pvr_mask = 0xffff0000,
1621 .pvr_value = 0x80230000,
1622 .cpu_name = "e500mc",
Kumar Gala3dfa8772008-06-16 09:41:32 -05001623 .cpu_features = CPU_FTRS_E500MC,
1624 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1625 .icache_bsize = 64,
1626 .dcache_bsize = 64,
1627 .num_pmcs = 4,
1628 .oprofile_cpu_type = "ppc/e500", /* xxx - galak, e500mc? */
1629 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1630 .machine_check = machine_check_e500,
1631 .platform = "ppce500mc",
1632 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001633 { /* default match */
1634 .pvr_mask = 0x00000000,
1635 .pvr_value = 0x00000000,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001636 .cpu_name = "(generic E500 PPC)",
1637 .cpu_features = CPU_FTRS_E500,
1638 .cpu_user_features = COMMON_USER_BOOKE |
1639 PPC_FEATURE_HAS_SPE_COMP |
1640 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001641 .icache_bsize = 32,
1642 .dcache_bsize = 32,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001643 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001644 .platform = "powerpc",
Paul Mackerras516c8be2008-05-12 14:20:35 +10001645 }
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001646#endif /* CONFIG_E500 */
Stephen Rothwell49209602005-10-12 15:55:09 +10001647#endif /* CONFIG_PPC32 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001648};
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001649
Paul Mackerras87a72f92007-10-04 14:18:01 +10001650static struct cpu_spec the_cpu_spec;
1651
1652struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001653{
1654 struct cpu_spec *s = cpu_specs;
Paul Mackerras87a72f92007-10-04 14:18:01 +10001655 struct cpu_spec *t = &the_cpu_spec;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001656 int i;
1657
1658 s = PTRRELOC(s);
Paul Mackerras87a72f92007-10-04 14:18:01 +10001659 t = PTRRELOC(t);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001660
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001661 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
1662 if ((pvr & s->pvr_mask) == s->pvr_value) {
Paul Mackerras87a72f92007-10-04 14:18:01 +10001663 /*
1664 * If we are overriding a previous value derived
1665 * from the real PVR with a new value obtained
1666 * using a logical PVR value, don't modify the
1667 * performance monitor fields.
1668 */
1669 if (t->num_pmcs && !s->num_pmcs) {
1670 t->cpu_name = s->cpu_name;
1671 t->cpu_features = s->cpu_features;
1672 t->cpu_user_features = s->cpu_user_features;
1673 t->icache_bsize = s->icache_bsize;
1674 t->dcache_bsize = s->dcache_bsize;
1675 t->cpu_setup = s->cpu_setup;
1676 t->cpu_restore = s->cpu_restore;
1677 t->platform = s->platform;
Torez Smith79e25ba2008-07-18 06:42:07 +10001678 /*
1679 * If we have passed through this logic once
1680 * before and have pulled the default case
1681 * because the real PVR was not found inside
1682 * cpu_specs[], then we are possibly running in
1683 * compatibility mode. In that case, let the
1684 * oprofiler know which set of compatibility
1685 * counters to pull from by making sure the
1686 * oprofile_cpu_type string is set to that of
1687 * compatibility mode. If the oprofile_cpu_type
1688 * already has a value, then we are possibly
1689 * overriding a real PVR with a logical one, and,
1690 * in that case, keep the current value for
1691 * oprofile_cpu_type.
1692 */
1693 if (t->oprofile_cpu_type == NULL)
1694 t->oprofile_cpu_type = s->oprofile_cpu_type;
Paul Mackerras87a72f92007-10-04 14:18:01 +10001695 } else
1696 *t = *s;
1697 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
Nathan Lynch9115d132008-07-16 09:58:51 +10001698
1699 /*
1700 * Set the base platform string once; assumes
1701 * we're called with real pvr first.
1702 */
Nathan Lynchfc532f82008-07-25 17:50:30 -05001703 if (*PTRRELOC(&powerpc_base_platform) == NULL)
1704 *PTRRELOC(&powerpc_base_platform) = t->platform;
Nathan Lynch9115d132008-07-16 09:58:51 +10001705
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001706#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
Stefan Roese464076a2008-02-24 08:07:41 +11001707 /* ppc64 and booke expect identify_cpu to also call
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001708 * setup_cpu for that processor. I will consolidate
1709 * that at a later time, for now, just use #ifdef.
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001710 * we also don't need to PTRRELOC the function pointer
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001711 * on ppc64 and booke as we are running at 0 in real
1712 * mode on ppc64 and reloc_offset is always 0 on booke.
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001713 */
1714 if (s->cpu_setup) {
1715 s->cpu_setup(offset, s);
1716 }
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001717#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001718 return s;
1719 }
1720 BUG();
1721 return NULL;
1722}