blob: f8deb3761de41b61f61ad55aadece94cc50dcd65 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Linus Torvalds1da177e2005-04-16 15:20:36 -07002 * Copyright (C) 2001 Ben. Herrenschmidt (benh@kernel.crashing.org)
3 *
Stephen Rothwell49209602005-10-12 15:55:09 +10004 * Modifications for ppc64:
5 * Copyright (C) 2003 Dave Engebretsen <engebret@us.ibm.com>
6 *
Linus Torvalds1da177e2005-04-16 15:20:36 -07007 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version
10 * 2 of the License, or (at your option) any later version.
11 */
12
Linus Torvalds1da177e2005-04-16 15:20:36 -070013#include <linux/string.h>
14#include <linux/sched.h>
15#include <linux/threads.h>
16#include <linux/init.h>
Kumar Gala400d2212005-09-27 15:13:12 -050017#include <linux/module.h>
18
19#include <asm/oprofile_impl.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070020#include <asm/cputable.h>
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +100021#include <asm/prom.h> /* for PTRRELOC on ARCH=ppc */
Linus Torvalds1da177e2005-04-16 15:20:36 -070022
Kumar Gala400d2212005-09-27 15:13:12 -050023struct cpu_spec* cur_cpu_spec = NULL;
Stephen Rothwell49209602005-10-12 15:55:09 +100024EXPORT_SYMBOL(cur_cpu_spec);
Linus Torvalds1da177e2005-04-16 15:20:36 -070025
Stephen Rothwell49209602005-10-12 15:55:09 +100026/* NOTE:
27 * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's
28 * the responsibility of the appropriate CPU save/restore functions to
29 * eventually copy these settings over. Those save/restore aren't yet
30 * part of the cputable though. That has to be fixed for both ppc32
31 * and ppc64
32 */
Geoff Levandb26f1002006-05-19 14:24:18 +100033#ifdef CONFIG_PPC32
Valentine Barshak81127532007-09-22 00:46:57 +100034extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
35extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110036extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
Valentine Barshak340ffd22007-09-22 00:50:09 +100037extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110038extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
Stefan Roese464076a2008-02-24 08:07:41 +110039extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec);
Josh Boyer939e6222008-06-11 07:52:40 -040040extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec);
Kumar Gala400d2212005-09-27 15:13:12 -050041extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
42extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
43extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
44extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
45extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
46extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
47extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
48extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell49209602005-10-12 15:55:09 +100049#endif /* CONFIG_PPC32 */
Olof Johanssonf39b7a52006-08-11 00:07:08 -050050#ifdef CONFIG_PPC64
Kumar Gala400d2212005-09-27 15:13:12 -050051extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
Olof Johansson5b43d202006-10-04 23:41:41 -050052extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
Olof Johansson11999192007-02-04 16:36:51 -060053extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell40d244d2007-02-12 22:10:48 +110054extern void __restore_cpu_pa6t(void);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050055extern void __restore_cpu_ppc970(void);
Michael Neulinge952e6c2008-06-18 10:47:26 +100056extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec);
57extern void __restore_cpu_power7(void);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050058#endif /* CONFIG_PPC64 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070059
Linus Torvalds1da177e2005-04-16 15:20:36 -070060/* This table only contains "desktop" CPUs, it need to be filled with embedded
61 * ones as well...
62 */
Stephen Rothwell49209602005-10-12 15:55:09 +100063#define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
64 PPC_FEATURE_HAS_MMU)
65#define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +110066#define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +110067#define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
68 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
69#define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
70 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
Anton Blanchard03054d52006-04-29 09:51:06 +100071#define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
Paul Mackerrasfab5db92006-06-07 16:14:40 +100072 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
73 PPC_FEATURE_TRUE_LE)
Michael Neulinge952e6c2008-06-18 10:47:26 +100074#define COMMON_USER_POWER7 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
75 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
76 PPC_FEATURE_TRUE_LE)
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -050077#define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
78 PPC_FEATURE_TRUE_LE | \
79 PPC_FEATURE_HAS_ALTIVEC_COMP)
Paul Mackerras80f15dc2006-01-14 10:11:39 +110080#define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
81 PPC_FEATURE_BOOKE)
Linus Torvalds1da177e2005-04-16 15:20:36 -070082
Paul Mackerras87a72f92007-10-04 14:18:01 +100083static struct cpu_spec __initdata cpu_specs[] = {
Stephen Rothwell49209602005-10-12 15:55:09 +100084#ifdef CONFIG_PPC64
85 { /* Power3 */
86 .pvr_mask = 0xffff0000,
87 .pvr_value = 0x00400000,
88 .cpu_name = "POWER3 (630)",
89 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +100090 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +100091 .icache_bsize = 128,
92 .dcache_bsize = 128,
93 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -060094 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +100095 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +000096 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110097 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +110098 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +100099 },
100 { /* Power3+ */
101 .pvr_mask = 0xffff0000,
102 .pvr_value = 0x00410000,
103 .cpu_name = "POWER3 (630+)",
104 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000105 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000106 .icache_bsize = 128,
107 .dcache_bsize = 128,
108 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600109 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000110 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000111 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100112 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100113 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +1000114 },
115 { /* Northstar */
116 .pvr_mask = 0xffff0000,
117 .pvr_value = 0x00330000,
118 .cpu_name = "RS64-II (northstar)",
119 .cpu_features = CPU_FTRS_RS64,
120 .cpu_user_features = COMMON_USER_PPC64,
121 .icache_bsize = 128,
122 .dcache_bsize = 128,
123 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600124 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000125 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000126 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100127 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100128 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000129 },
130 { /* Pulsar */
131 .pvr_mask = 0xffff0000,
132 .pvr_value = 0x00340000,
133 .cpu_name = "RS64-III (pulsar)",
134 .cpu_features = CPU_FTRS_RS64,
135 .cpu_user_features = COMMON_USER_PPC64,
136 .icache_bsize = 128,
137 .dcache_bsize = 128,
138 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600139 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000140 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000141 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100142 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100143 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000144 },
145 { /* I-star */
146 .pvr_mask = 0xffff0000,
147 .pvr_value = 0x00360000,
148 .cpu_name = "RS64-III (icestar)",
149 .cpu_features = CPU_FTRS_RS64,
150 .cpu_user_features = COMMON_USER_PPC64,
151 .icache_bsize = 128,
152 .dcache_bsize = 128,
153 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600154 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000155 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000156 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100157 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100158 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000159 },
160 { /* S-star */
161 .pvr_mask = 0xffff0000,
162 .pvr_value = 0x00370000,
163 .cpu_name = "RS64-IV (sstar)",
164 .cpu_features = CPU_FTRS_RS64,
165 .cpu_user_features = COMMON_USER_PPC64,
166 .icache_bsize = 128,
167 .dcache_bsize = 128,
168 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600169 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000170 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000171 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100172 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100173 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000174 },
175 { /* Power4 */
176 .pvr_mask = 0xffff0000,
177 .pvr_value = 0x00350000,
178 .cpu_name = "POWER4 (gp)",
179 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100180 .cpu_user_features = COMMON_USER_POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000181 .icache_bsize = 128,
182 .dcache_bsize = 128,
183 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600184 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000185 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000186 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100187 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100188 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000189 },
190 { /* Power4+ */
191 .pvr_mask = 0xffff0000,
192 .pvr_value = 0x00380000,
193 .cpu_name = "POWER4+ (gq)",
194 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100195 .cpu_user_features = COMMON_USER_POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000196 .icache_bsize = 128,
197 .dcache_bsize = 128,
198 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600199 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000200 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000201 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100202 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100203 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000204 },
205 { /* PPC970 */
206 .pvr_mask = 0xffff0000,
207 .pvr_value = 0x00390000,
208 .cpu_name = "PPC970",
209 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100210 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000211 PPC_FEATURE_HAS_ALTIVEC_COMP,
212 .icache_bsize = 128,
213 .dcache_bsize = 128,
214 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600215 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000216 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500217 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000218 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000219 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100220 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100221 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000222 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000223 { /* PPC970FX */
224 .pvr_mask = 0xffff0000,
225 .pvr_value = 0x003c0000,
226 .cpu_name = "PPC970FX",
Stephen Rothwell49209602005-10-12 15:55:09 +1000227 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100228 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000229 PPC_FEATURE_HAS_ALTIVEC_COMP,
230 .icache_bsize = 128,
231 .dcache_bsize = 128,
232 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600233 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000234 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500235 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000236 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000237 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100238 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100239 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000240 },
Olof Johansson3546e812007-02-26 00:35:14 -0600241 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
242 .pvr_mask = 0xffffffff,
243 .pvr_value = 0x00440100,
244 .cpu_name = "PPC970MP",
245 .cpu_features = CPU_FTRS_PPC970,
246 .cpu_user_features = COMMON_USER_POWER4 |
247 PPC_FEATURE_HAS_ALTIVEC_COMP,
248 .icache_bsize = 128,
249 .dcache_bsize = 128,
250 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000251 .pmc_type = PPC_PMC_IBM,
Olof Johansson3546e812007-02-26 00:35:14 -0600252 .cpu_setup = __setup_cpu_ppc970,
253 .cpu_restore = __restore_cpu_ppc970,
254 .oprofile_cpu_type = "ppc64/970MP",
255 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100256 .machine_check = machine_check_generic,
Olof Johansson3546e812007-02-26 00:35:14 -0600257 .platform = "ppc970",
258 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000259 { /* PPC970MP */
260 .pvr_mask = 0xffff0000,
261 .pvr_value = 0x00440000,
262 .cpu_name = "PPC970MP",
263 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100264 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000265 PPC_FEATURE_HAS_ALTIVEC_COMP,
266 .icache_bsize = 128,
267 .dcache_bsize = 128,
Anton Blanchard87af41b2006-05-05 05:44:26 +1000268 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000269 .pmc_type = PPC_PMC_IBM,
Olof Johansson5b43d202006-10-04 23:41:41 -0500270 .cpu_setup = __setup_cpu_ppc970MP,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500271 .cpu_restore = __restore_cpu_ppc970,
Mike Wolffecb3522006-11-21 14:41:54 -0600272 .oprofile_cpu_type = "ppc64/970MP",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000273 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100274 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100275 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000276 },
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500277 { /* PPC970GX */
278 .pvr_mask = 0xffff0000,
279 .pvr_value = 0x00450000,
280 .cpu_name = "PPC970GX",
281 .cpu_features = CPU_FTRS_PPC970,
282 .cpu_user_features = COMMON_USER_POWER4 |
283 PPC_FEATURE_HAS_ALTIVEC_COMP,
284 .icache_bsize = 128,
285 .dcache_bsize = 128,
286 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600287 .pmc_type = PPC_PMC_IBM,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500288 .cpu_setup = __setup_cpu_ppc970,
289 .oprofile_cpu_type = "ppc64/970",
290 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100291 .machine_check = machine_check_generic,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500292 .platform = "ppc970",
293 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100294 { /* Power5 GR */
Stephen Rothwell49209602005-10-12 15:55:09 +1000295 .pvr_mask = 0xffff0000,
296 .pvr_value = 0x003a0000,
297 .cpu_name = "POWER5 (gr)",
298 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100299 .cpu_user_features = COMMON_USER_POWER5,
Stephen Rothwell49209602005-10-12 15:55:09 +1000300 .icache_bsize = 128,
301 .dcache_bsize = 128,
302 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600303 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000304 .oprofile_cpu_type = "ppc64/power5",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000305 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000306 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
307 * and above but only works on POWER5 and above
308 */
309 .oprofile_mmcra_sihv = MMCRA_SIHV,
310 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100311 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100312 .platform = "power5",
Stephen Rothwell49209602005-10-12 15:55:09 +1000313 },
Mike Wolf31a12ce2007-07-10 13:13:47 -0500314 { /* Power5++ */
315 .pvr_mask = 0xffffff00,
316 .pvr_value = 0x003b0300,
317 .cpu_name = "POWER5+ (gs)",
318 .cpu_features = CPU_FTRS_POWER5,
319 .cpu_user_features = COMMON_USER_POWER5_PLUS,
320 .icache_bsize = 128,
321 .dcache_bsize = 128,
322 .num_pmcs = 6,
323 .oprofile_cpu_type = "ppc64/power5++",
324 .oprofile_type = PPC_OPROFILE_POWER4,
325 .oprofile_mmcra_sihv = MMCRA_SIHV,
326 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100327 .machine_check = machine_check_generic,
Mike Wolf31a12ce2007-07-10 13:13:47 -0500328 .platform = "power5+",
329 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100330 { /* Power5 GS */
Stephen Rothwell49209602005-10-12 15:55:09 +1000331 .pvr_mask = 0xffff0000,
332 .pvr_value = 0x003b0000,
Anton Blanchard834608f2006-01-09 15:42:30 +1100333 .cpu_name = "POWER5+ (gs)",
Stephen Rothwell49209602005-10-12 15:55:09 +1000334 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100335 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Stephen Rothwell49209602005-10-12 15:55:09 +1000336 .icache_bsize = 128,
337 .dcache_bsize = 128,
338 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600339 .pmc_type = PPC_PMC_IBM,
Anton Blanchard834608f2006-01-09 15:42:30 +1100340 .oprofile_cpu_type = "ppc64/power5+",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000341 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000342 .oprofile_mmcra_sihv = MMCRA_SIHV,
343 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100344 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100345 .platform = "power5+",
Stephen Rothwell49209602005-10-12 15:55:09 +1000346 },
Paul Mackerras974a76f2006-11-10 20:38:53 +1100347 { /* POWER6 in P5+ mode; 2.04-compliant processor */
348 .pvr_mask = 0xffffffff,
349 .pvr_value = 0x0f000001,
350 .cpu_name = "POWER5+",
351 .cpu_features = CPU_FTRS_POWER5,
352 .cpu_user_features = COMMON_USER_POWER5_PLUS,
353 .icache_bsize = 128,
354 .dcache_bsize = 128,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100355 .machine_check = machine_check_generic,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100356 .platform = "power5+",
357 },
Anton Blanchard03054d52006-04-29 09:51:06 +1000358 { /* Power6 */
359 .pvr_mask = 0xffff0000,
360 .pvr_value = 0x003e0000,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100361 .cpu_name = "POWER6 (raw)",
362 .cpu_features = CPU_FTRS_POWER6,
363 .cpu_user_features = COMMON_USER_POWER6 |
364 PPC_FEATURE_POWER6_EXT,
365 .icache_bsize = 128,
366 .dcache_bsize = 128,
367 .num_pmcs = 6,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000368 .pmc_type = PPC_PMC_IBM,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100369 .oprofile_cpu_type = "ppc64/power6",
370 .oprofile_type = PPC_OPROFILE_POWER4,
371 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
372 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
373 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
374 POWER6_MMCRA_OTHER,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100375 .machine_check = machine_check_generic,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100376 .platform = "power6x",
377 },
378 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
379 .pvr_mask = 0xffffffff,
380 .pvr_value = 0x0f000002,
381 .cpu_name = "POWER6 (architected)",
Anton Blanchard03054d52006-04-29 09:51:06 +1000382 .cpu_features = CPU_FTRS_POWER6,
383 .cpu_user_features = COMMON_USER_POWER6,
384 .icache_bsize = 128,
385 .dcache_bsize = 128,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100386 .machine_check = machine_check_generic,
Anton Blanchard03054d52006-04-29 09:51:06 +1000387 .platform = "power6",
388 },
Joel Schopp635f5a62008-06-19 06:18:21 +1000389 { /* 2.06-compliant processor, i.e. Power7 "architected" mode */
390 .pvr_mask = 0xffffffff,
391 .pvr_value = 0x0f000003,
392 .cpu_name = "POWER7 (architected)",
393 .cpu_features = CPU_FTRS_POWER7,
394 .cpu_user_features = COMMON_USER_POWER7,
395 .icache_bsize = 128,
396 .dcache_bsize = 128,
397 .machine_check = machine_check_generic,
398 .platform = "power7",
399 },
Michael Neulinge952e6c2008-06-18 10:47:26 +1000400 { /* Power7 */
401 .pvr_mask = 0xffff0000,
402 .pvr_value = 0x003f0000,
Joel Schopp635f5a62008-06-19 06:18:21 +1000403 .cpu_name = "POWER7 (raw)",
Michael Neulinge952e6c2008-06-18 10:47:26 +1000404 .cpu_features = CPU_FTRS_POWER7,
405 .cpu_user_features = COMMON_USER_POWER7,
406 .icache_bsize = 128,
407 .dcache_bsize = 128,
408 .num_pmcs = 6,
409 .pmc_type = PPC_PMC_IBM,
410 .cpu_setup = __setup_cpu_power7,
411 .cpu_restore = __restore_cpu_power7,
412 .oprofile_cpu_type = "ppc64/power7",
413 .oprofile_type = PPC_OPROFILE_POWER4,
414 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
415 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
416 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
417 POWER6_MMCRA_OTHER,
418 .platform = "power7",
419 },
Arnd Bergmannc902be72006-01-04 19:55:53 +0000420 { /* Cell Broadband Engine */
Stephen Rothwell49209602005-10-12 15:55:09 +1000421 .pvr_mask = 0xffff0000,
422 .pvr_value = 0x00700000,
423 .cpu_name = "Cell Broadband Engine",
424 .cpu_features = CPU_FTRS_CELL,
425 .cpu_user_features = COMMON_USER_PPC64 |
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +1100426 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
427 PPC_FEATURE_SMT,
Stephen Rothwell49209602005-10-12 15:55:09 +1000428 .icache_bsize = 128,
429 .dcache_bsize = 128,
Maynard Johnson18f21902006-11-20 18:45:16 +0100430 .num_pmcs = 4,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600431 .pmc_type = PPC_PMC_IBM,
Maynard Johnson18f21902006-11-20 18:45:16 +0100432 .oprofile_cpu_type = "ppc64/cell-be",
433 .oprofile_type = PPC_OPROFILE_CELL,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100434 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100435 .platform = "ppc-cell-be",
Stephen Rothwell49209602005-10-12 15:55:09 +1000436 },
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500437 { /* PA Semi PA6T */
438 .pvr_mask = 0x7fff0000,
439 .pvr_value = 0x00900000,
440 .cpu_name = "PA6T",
441 .cpu_features = CPU_FTRS_PA6T,
442 .cpu_user_features = COMMON_USER_PA6T,
443 .icache_bsize = 64,
444 .dcache_bsize = 64,
445 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600446 .pmc_type = PPC_PMC_PA6T,
Olof Johansson11999192007-02-04 16:36:51 -0600447 .cpu_setup = __setup_cpu_pa6t,
448 .cpu_restore = __restore_cpu_pa6t,
Olof Johansson25fc5302007-04-18 16:38:21 +1000449 .oprofile_cpu_type = "ppc64/pa6t",
450 .oprofile_type = PPC_OPROFILE_PA6T,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100451 .machine_check = machine_check_generic,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500452 .platform = "pa6t",
453 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000454 { /* default match */
455 .pvr_mask = 0x00000000,
456 .pvr_value = 0x00000000,
457 .cpu_name = "POWER4 (compatible)",
458 .cpu_features = CPU_FTRS_COMPATIBLE,
459 .cpu_user_features = COMMON_USER_PPC64,
460 .icache_bsize = 128,
461 .dcache_bsize = 128,
462 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600463 .pmc_type = PPC_PMC_IBM,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100464 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100465 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000466 }
467#endif /* CONFIG_PPC64 */
468#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -0700469#if CLASSIC_PPC
Stephen Rothwell49209602005-10-12 15:55:09 +1000470 { /* 601 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700471 .pvr_mask = 0xffff0000,
472 .pvr_value = 0x00010000,
473 .cpu_name = "601",
Kumar Gala10b35d92005-09-23 14:08:58 -0500474 .cpu_features = CPU_FTRS_PPC601,
Stephen Rothwell49209602005-10-12 15:55:09 +1000475 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
Paul Mackerras98599012005-10-22 16:51:34 +1000476 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700477 .icache_bsize = 32,
478 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100479 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100480 .platform = "ppc601",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700481 },
482 { /* 603 */
483 .pvr_mask = 0xffff0000,
484 .pvr_value = 0x00030000,
485 .cpu_name = "603",
Kumar Gala10b35d92005-09-23 14:08:58 -0500486 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000487 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700488 .icache_bsize = 32,
489 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100490 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100491 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100492 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700493 },
494 { /* 603e */
495 .pvr_mask = 0xffff0000,
496 .pvr_value = 0x00060000,
497 .cpu_name = "603e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500498 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000499 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700500 .icache_bsize = 32,
501 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100502 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100503 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100504 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700505 },
506 { /* 603ev */
507 .pvr_mask = 0xffff0000,
508 .pvr_value = 0x00070000,
509 .cpu_name = "603ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500510 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000511 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700512 .icache_bsize = 32,
513 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100514 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100515 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100516 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700517 },
518 { /* 604 */
519 .pvr_mask = 0xffff0000,
520 .pvr_value = 0x00040000,
521 .cpu_name = "604",
Kumar Gala10b35d92005-09-23 14:08:58 -0500522 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000523 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700524 .icache_bsize = 32,
525 .dcache_bsize = 32,
526 .num_pmcs = 2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100527 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100528 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100529 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700530 },
531 { /* 604e */
532 .pvr_mask = 0xfffff000,
533 .pvr_value = 0x00090000,
534 .cpu_name = "604e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500535 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000536 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700537 .icache_bsize = 32,
538 .dcache_bsize = 32,
539 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100540 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100541 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100542 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700543 },
544 { /* 604r */
545 .pvr_mask = 0xffff0000,
546 .pvr_value = 0x00090000,
547 .cpu_name = "604r",
Kumar Gala10b35d92005-09-23 14:08:58 -0500548 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000549 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700550 .icache_bsize = 32,
551 .dcache_bsize = 32,
552 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100553 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100554 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100555 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700556 },
557 { /* 604ev */
558 .pvr_mask = 0xffff0000,
559 .pvr_value = 0x000a0000,
560 .cpu_name = "604ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500561 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000562 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700563 .icache_bsize = 32,
564 .dcache_bsize = 32,
565 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100566 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100567 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100568 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700569 },
570 { /* 740/750 (0x4202, don't support TAU ?) */
571 .pvr_mask = 0xffffffff,
572 .pvr_value = 0x00084202,
573 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500574 .cpu_features = CPU_FTRS_740_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000575 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700576 .icache_bsize = 32,
577 .dcache_bsize = 32,
578 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100579 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100580 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100581 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700582 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700583 { /* 750CX (80100 and 8010x?) */
584 .pvr_mask = 0xfffffff0,
585 .pvr_value = 0x00080100,
586 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500587 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000588 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700589 .icache_bsize = 32,
590 .dcache_bsize = 32,
591 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100592 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100593 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100594 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700595 },
596 { /* 750CX (82201 and 82202) */
597 .pvr_mask = 0xfffffff0,
598 .pvr_value = 0x00082200,
599 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500600 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000601 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700602 .icache_bsize = 32,
603 .dcache_bsize = 32,
604 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100605 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100606 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100607 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700608 },
609 { /* 750CXe (82214) */
610 .pvr_mask = 0xfffffff0,
611 .pvr_value = 0x00082210,
612 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500613 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000614 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700615 .icache_bsize = 32,
616 .dcache_bsize = 32,
617 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100618 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100619 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100620 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700621 },
Arthur Othieno7c316252005-09-03 15:55:52 -0700622 { /* 750CXe "Gekko" (83214) */
623 .pvr_mask = 0xffffffff,
624 .pvr_value = 0x00083214,
625 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500626 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000627 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Arthur Othieno7c316252005-09-03 15:55:52 -0700628 .icache_bsize = 32,
629 .dcache_bsize = 32,
630 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100631 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100632 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100633 .platform = "ppc750",
Arthur Othieno7c316252005-09-03 15:55:52 -0700634 },
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500635 { /* 750CL */
636 .pvr_mask = 0xfffff0f0,
637 .pvr_value = 0x00087010,
638 .cpu_name = "750CL",
Josh Boyera14c4502007-04-13 04:33:25 +1000639 .cpu_features = CPU_FTRS_750CL,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500640 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
641 .icache_bsize = 32,
642 .dcache_bsize = 32,
643 .num_pmcs = 4,
Josh Boyera14c4502007-04-13 04:33:25 +1000644 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100645 .machine_check = machine_check_generic,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500646 .platform = "ppc750",
647 },
Arthur Othienoac1ff042005-09-03 15:55:51 -0700648 { /* 745/755 */
649 .pvr_mask = 0xfffff000,
650 .pvr_value = 0x00083000,
651 .cpu_name = "745/755",
Kumar Gala10b35d92005-09-23 14:08:58 -0500652 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000653 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Arthur Othienoac1ff042005-09-03 15:55:51 -0700654 .icache_bsize = 32,
655 .dcache_bsize = 32,
656 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100657 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100658 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100659 .platform = "ppc750",
Arthur Othienoac1ff042005-09-03 15:55:51 -0700660 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700661 { /* 750FX rev 1.x */
662 .pvr_mask = 0xffffff00,
663 .pvr_value = 0x70000100,
664 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500665 .cpu_features = CPU_FTRS_750FX1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000666 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700667 .icache_bsize = 32,
668 .dcache_bsize = 32,
669 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100670 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100671 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100672 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700673 },
674 { /* 750FX rev 2.0 must disable HID0[DPM] */
675 .pvr_mask = 0xffffffff,
676 .pvr_value = 0x70000200,
677 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500678 .cpu_features = CPU_FTRS_750FX2,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000679 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700680 .icache_bsize = 32,
681 .dcache_bsize = 32,
682 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100683 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100684 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100685 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700686 },
687 { /* 750FX (All revs except 2.0) */
688 .pvr_mask = 0xffff0000,
689 .pvr_value = 0x70000000,
690 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500691 .cpu_features = CPU_FTRS_750FX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000692 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700693 .icache_bsize = 32,
694 .dcache_bsize = 32,
695 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100696 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100697 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100698 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700699 },
700 { /* 750GX */
701 .pvr_mask = 0xffff0000,
702 .pvr_value = 0x70020000,
703 .cpu_name = "750GX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500704 .cpu_features = CPU_FTRS_750GX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000705 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700706 .icache_bsize = 32,
707 .dcache_bsize = 32,
708 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100709 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100710 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100711 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700712 },
713 { /* 740/750 (L2CR bit need fixup for 740) */
714 .pvr_mask = 0xffff0000,
715 .pvr_value = 0x00080000,
716 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500717 .cpu_features = CPU_FTRS_740,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000718 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700719 .icache_bsize = 32,
720 .dcache_bsize = 32,
721 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100722 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100723 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100724 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700725 },
726 { /* 7400 rev 1.1 ? (no TAU) */
727 .pvr_mask = 0xffffffff,
728 .pvr_value = 0x000c1101,
729 .cpu_name = "7400 (1.1)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500730 .cpu_features = CPU_FTRS_7400_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000731 .cpu_user_features = COMMON_USER |
732 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700733 .icache_bsize = 32,
734 .dcache_bsize = 32,
735 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100736 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100737 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100738 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700739 },
740 { /* 7400 */
741 .pvr_mask = 0xffff0000,
742 .pvr_value = 0x000c0000,
743 .cpu_name = "7400",
Kumar Gala10b35d92005-09-23 14:08:58 -0500744 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000745 .cpu_user_features = COMMON_USER |
746 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700747 .icache_bsize = 32,
748 .dcache_bsize = 32,
749 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100750 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100751 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100752 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700753 },
754 { /* 7410 */
755 .pvr_mask = 0xffff0000,
756 .pvr_value = 0x800c0000,
757 .cpu_name = "7410",
Kumar Gala10b35d92005-09-23 14:08:58 -0500758 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000759 .cpu_user_features = COMMON_USER |
760 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700761 .icache_bsize = 32,
762 .dcache_bsize = 32,
763 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100764 .cpu_setup = __setup_cpu_7410,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100765 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100766 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700767 },
768 { /* 7450 2.0 - no doze/nap */
769 .pvr_mask = 0xffffffff,
770 .pvr_value = 0x80000200,
771 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500772 .cpu_features = CPU_FTRS_7450_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000773 .cpu_user_features = COMMON_USER |
774 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700775 .icache_bsize = 32,
776 .dcache_bsize = 32,
777 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600778 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600779 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000780 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100781 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100782 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700783 },
784 { /* 7450 2.1 */
785 .pvr_mask = 0xffffffff,
786 .pvr_value = 0x80000201,
787 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500788 .cpu_features = CPU_FTRS_7450_21,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000789 .cpu_user_features = COMMON_USER |
790 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700791 .icache_bsize = 32,
792 .dcache_bsize = 32,
793 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600794 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600795 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000796 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100797 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100798 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700799 },
800 { /* 7450 2.3 and newer */
801 .pvr_mask = 0xffff0000,
802 .pvr_value = 0x80000000,
803 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500804 .cpu_features = CPU_FTRS_7450_23,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000805 .cpu_user_features = COMMON_USER |
806 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700807 .icache_bsize = 32,
808 .dcache_bsize = 32,
809 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600810 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600811 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000812 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100813 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100814 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700815 },
816 { /* 7455 rev 1.x */
817 .pvr_mask = 0xffffff00,
818 .pvr_value = 0x80010100,
819 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500820 .cpu_features = CPU_FTRS_7455_1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000821 .cpu_user_features = COMMON_USER |
822 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700823 .icache_bsize = 32,
824 .dcache_bsize = 32,
825 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600826 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600827 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000828 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100829 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100830 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700831 },
832 { /* 7455 rev 2.0 */
833 .pvr_mask = 0xffffffff,
834 .pvr_value = 0x80010200,
835 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500836 .cpu_features = CPU_FTRS_7455_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000837 .cpu_user_features = COMMON_USER |
838 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700839 .icache_bsize = 32,
840 .dcache_bsize = 32,
841 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600842 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600843 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000844 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100845 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100846 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700847 },
848 { /* 7455 others */
849 .pvr_mask = 0xffff0000,
850 .pvr_value = 0x80010000,
851 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500852 .cpu_features = CPU_FTRS_7455,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000853 .cpu_user_features = COMMON_USER |
854 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700855 .icache_bsize = 32,
856 .dcache_bsize = 32,
857 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600858 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600859 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000860 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100861 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100862 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700863 },
864 { /* 7447/7457 Rev 1.0 */
865 .pvr_mask = 0xffffffff,
866 .pvr_value = 0x80020100,
867 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500868 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000869 .cpu_user_features = COMMON_USER |
870 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700871 .icache_bsize = 32,
872 .dcache_bsize = 32,
873 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600874 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600875 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000876 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100877 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100878 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700879 },
880 { /* 7447/7457 Rev 1.1 */
881 .pvr_mask = 0xffffffff,
882 .pvr_value = 0x80020101,
883 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500884 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000885 .cpu_user_features = COMMON_USER |
886 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700887 .icache_bsize = 32,
888 .dcache_bsize = 32,
889 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600890 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600891 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000892 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100893 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100894 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700895 },
896 { /* 7447/7457 Rev 1.2 and later */
897 .pvr_mask = 0xffff0000,
898 .pvr_value = 0x80020000,
899 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500900 .cpu_features = CPU_FTRS_7447,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000901 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700902 .icache_bsize = 32,
903 .dcache_bsize = 32,
904 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600905 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600906 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000907 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100908 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100909 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700910 },
911 { /* 7447A */
912 .pvr_mask = 0xffff0000,
913 .pvr_value = 0x80030000,
914 .cpu_name = "7447A",
Kumar Gala10b35d92005-09-23 14:08:58 -0500915 .cpu_features = CPU_FTRS_7447A,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000916 .cpu_user_features = COMMON_USER |
917 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700918 .icache_bsize = 32,
919 .dcache_bsize = 32,
920 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600921 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600922 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000923 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100924 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100925 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700926 },
Kumar Galabbde6302005-09-03 15:55:55 -0700927 { /* 7448 */
928 .pvr_mask = 0xffff0000,
929 .pvr_value = 0x80040000,
930 .cpu_name = "7448",
James.Yang3d372542007-05-02 16:34:43 -0500931 .cpu_features = CPU_FTRS_7448,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000932 .cpu_user_features = COMMON_USER |
933 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Kumar Galabbde6302005-09-03 15:55:55 -0700934 .icache_bsize = 32,
935 .dcache_bsize = 32,
936 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600937 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600938 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000939 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100940 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100941 .platform = "ppc7450",
Kumar Galabbde6302005-09-03 15:55:55 -0700942 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700943 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
944 .pvr_mask = 0x7fff0000,
945 .pvr_value = 0x00810000,
946 .cpu_name = "82xx",
Kumar Gala10b35d92005-09-23 14:08:58 -0500947 .cpu_features = CPU_FTRS_82XX,
Stephen Rothwell49209602005-10-12 15:55:09 +1000948 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700949 .icache_bsize = 32,
950 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100951 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100952 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100953 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700954 },
955 { /* All G2_LE (603e core, plus some) have the same pvr */
956 .pvr_mask = 0x7fff0000,
957 .pvr_value = 0x00820000,
958 .cpu_name = "G2_LE",
Kumar Gala10b35d92005-09-23 14:08:58 -0500959 .cpu_features = CPU_FTRS_G2_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000960 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700961 .icache_bsize = 32,
962 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100963 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100964 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100965 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700966 },
Kim Phillips6c4a2502006-10-02 20:10:24 -0500967 { /* e300c1 (a 603e core, plus some) on 83xx */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700968 .pvr_mask = 0x7fff0000,
969 .pvr_value = 0x00830000,
Kim Phillips6c4a2502006-10-02 20:10:24 -0500970 .cpu_name = "e300c1",
Kumar Gala10b35d92005-09-23 14:08:58 -0500971 .cpu_features = CPU_FTRS_E300,
Stephen Rothwell49209602005-10-12 15:55:09 +1000972 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700973 .icache_bsize = 32,
974 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100975 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100976 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100977 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700978 },
Kim Phillips6c4a2502006-10-02 20:10:24 -0500979 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
980 .pvr_mask = 0x7fff0000,
981 .pvr_value = 0x00840000,
982 .cpu_name = "e300c2",
Kim Phillipsaa42c692006-12-08 02:43:30 -0600983 .cpu_features = CPU_FTRS_E300C2,
Kim Phillips6c4a2502006-10-02 20:10:24 -0500984 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
985 .icache_bsize = 32,
986 .dcache_bsize = 32,
987 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100988 .machine_check = machine_check_generic,
Kim Phillips6c4a2502006-10-02 20:10:24 -0500989 .platform = "ppc603",
990 },
Li Yanga58d5242007-10-19 19:38:42 +0800991 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
Scott Wood57933f82006-12-01 12:57:05 -0600992 .pvr_mask = 0x7fff0000,
993 .pvr_value = 0x00850000,
994 .cpu_name = "e300c3",
995 .cpu_features = CPU_FTRS_E300,
996 .cpu_user_features = COMMON_USER,
997 .icache_bsize = 32,
998 .dcache_bsize = 32,
999 .cpu_setup = __setup_cpu_603,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001000 .num_pmcs = 4,
1001 .oprofile_cpu_type = "ppc/e300",
1002 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Scott Wood57933f82006-12-01 12:57:05 -06001003 .platform = "ppc603",
1004 },
Li Yanga58d5242007-10-19 19:38:42 +08001005 { /* e300c4 (e300c1, plus one IU) */
1006 .pvr_mask = 0x7fff0000,
1007 .pvr_value = 0x00860000,
1008 .cpu_name = "e300c4",
1009 .cpu_features = CPU_FTRS_E300,
1010 .cpu_user_features = COMMON_USER,
1011 .icache_bsize = 32,
1012 .dcache_bsize = 32,
1013 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001014 .machine_check = machine_check_generic,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001015 .num_pmcs = 4,
1016 .oprofile_cpu_type = "ppc/e300",
1017 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Li Yanga58d5242007-10-19 19:38:42 +08001018 .platform = "ppc603",
1019 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001020 { /* default match, we assume split I/D cache & TB (non-601)... */
1021 .pvr_mask = 0x00000000,
1022 .pvr_value = 0x00000000,
1023 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -05001024 .cpu_features = CPU_FTRS_CLASSIC32,
Stephen Rothwell49209602005-10-12 15:55:09 +10001025 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001026 .icache_bsize = 32,
1027 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001028 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001029 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001030 },
1031#endif /* CLASSIC_PPC */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001032#ifdef CONFIG_8xx
1033 { /* 8xx */
1034 .pvr_mask = 0xffff0000,
1035 .pvr_value = 0x00500000,
1036 .cpu_name = "8xx",
1037 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1038 * if the 8xx code is there.... */
Kumar Gala10b35d92005-09-23 14:08:58 -05001039 .cpu_features = CPU_FTRS_8XX,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001040 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1041 .icache_bsize = 16,
1042 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001043 .platform = "ppc823",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001044 },
1045#endif /* CONFIG_8xx */
1046#ifdef CONFIG_40x
1047 { /* 403GC */
1048 .pvr_mask = 0xffffff00,
1049 .pvr_value = 0x00200200,
1050 .cpu_name = "403GC",
Kumar Gala10b35d92005-09-23 14:08:58 -05001051 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001052 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1053 .icache_bsize = 16,
1054 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001055 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001056 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001057 },
1058 { /* 403GCX */
1059 .pvr_mask = 0xffffff00,
1060 .pvr_value = 0x00201400,
1061 .cpu_name = "403GCX",
Kumar Gala10b35d92005-09-23 14:08:58 -05001062 .cpu_features = CPU_FTRS_40X,
Paul Mackerras98599012005-10-22 16:51:34 +10001063 .cpu_user_features = PPC_FEATURE_32 |
1064 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001065 .icache_bsize = 16,
1066 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001067 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001068 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001069 },
1070 { /* 403G ?? */
1071 .pvr_mask = 0xffff0000,
1072 .pvr_value = 0x00200000,
1073 .cpu_name = "403G ??",
Kumar Gala10b35d92005-09-23 14:08:58 -05001074 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001075 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1076 .icache_bsize = 16,
1077 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001078 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001079 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001080 },
1081 { /* 405GP */
1082 .pvr_mask = 0xffff0000,
1083 .pvr_value = 0x40110000,
1084 .cpu_name = "405GP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001085 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001086 .cpu_user_features = PPC_FEATURE_32 |
1087 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1088 .icache_bsize = 32,
1089 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001090 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001091 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001092 },
1093 { /* STB 03xxx */
1094 .pvr_mask = 0xffff0000,
1095 .pvr_value = 0x40130000,
1096 .cpu_name = "STB03xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001097 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001098 .cpu_user_features = PPC_FEATURE_32 |
1099 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1100 .icache_bsize = 32,
1101 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001102 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001103 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001104 },
1105 { /* STB 04xxx */
1106 .pvr_mask = 0xffff0000,
1107 .pvr_value = 0x41810000,
1108 .cpu_name = "STB04xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001109 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001110 .cpu_user_features = PPC_FEATURE_32 |
1111 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1112 .icache_bsize = 32,
1113 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001114 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001115 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001116 },
1117 { /* NP405L */
1118 .pvr_mask = 0xffff0000,
1119 .pvr_value = 0x41610000,
1120 .cpu_name = "NP405L",
Kumar Gala10b35d92005-09-23 14:08:58 -05001121 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001122 .cpu_user_features = PPC_FEATURE_32 |
1123 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1124 .icache_bsize = 32,
1125 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001126 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001127 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001128 },
1129 { /* NP4GS3 */
1130 .pvr_mask = 0xffff0000,
1131 .pvr_value = 0x40B10000,
1132 .cpu_name = "NP4GS3",
Kumar Gala10b35d92005-09-23 14:08:58 -05001133 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001134 .cpu_user_features = PPC_FEATURE_32 |
1135 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1136 .icache_bsize = 32,
1137 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001138 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001139 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001140 },
1141 { /* NP405H */
1142 .pvr_mask = 0xffff0000,
1143 .pvr_value = 0x41410000,
1144 .cpu_name = "NP405H",
Kumar Gala10b35d92005-09-23 14:08:58 -05001145 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001146 .cpu_user_features = PPC_FEATURE_32 |
1147 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1148 .icache_bsize = 32,
1149 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001150 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001151 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001152 },
1153 { /* 405GPr */
1154 .pvr_mask = 0xffff0000,
1155 .pvr_value = 0x50910000,
1156 .cpu_name = "405GPr",
Kumar Gala10b35d92005-09-23 14:08:58 -05001157 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001158 .cpu_user_features = PPC_FEATURE_32 |
1159 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1160 .icache_bsize = 32,
1161 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001162 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001163 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001164 },
1165 { /* STBx25xx */
1166 .pvr_mask = 0xffff0000,
1167 .pvr_value = 0x51510000,
1168 .cpu_name = "STBx25xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001169 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001170 .cpu_user_features = PPC_FEATURE_32 |
1171 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1172 .icache_bsize = 32,
1173 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001174 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001175 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001176 },
1177 { /* 405LP */
1178 .pvr_mask = 0xffff0000,
1179 .pvr_value = 0x41F10000,
1180 .cpu_name = "405LP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001181 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001182 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1183 .icache_bsize = 32,
1184 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001185 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001186 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001187 },
1188 { /* Xilinx Virtex-II Pro */
Grant C. Likely72646c72006-01-19 01:13:20 -07001189 .pvr_mask = 0xfffff000,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001190 .pvr_value = 0x20010000,
1191 .cpu_name = "Virtex-II Pro",
Kumar Gala10b35d92005-09-23 14:08:58 -05001192 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001193 .cpu_user_features = PPC_FEATURE_32 |
1194 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1195 .icache_bsize = 32,
1196 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001197 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001198 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001199 },
Grant C. Likely72646c72006-01-19 01:13:20 -07001200 { /* Xilinx Virtex-4 FX */
1201 .pvr_mask = 0xfffff000,
1202 .pvr_value = 0x20011000,
1203 .cpu_name = "Virtex-4 FX",
1204 .cpu_features = CPU_FTRS_40X,
1205 .cpu_user_features = PPC_FEATURE_32 |
1206 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1207 .icache_bsize = 32,
1208 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001209 .machine_check = machine_check_4xx,
Peter Bergner838fdb42006-09-14 14:18:38 -05001210 .platform = "ppc405",
Grant C. Likely72646c72006-01-19 01:13:20 -07001211 },
Eugene Suroveginad95d602005-06-07 13:22:09 -07001212 { /* 405EP */
1213 .pvr_mask = 0xffff0000,
1214 .pvr_value = 0x51210000,
1215 .cpu_name = "405EP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001216 .cpu_features = CPU_FTRS_40X,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001217 .cpu_user_features = PPC_FEATURE_32 |
1218 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1219 .icache_bsize = 32,
1220 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001221 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001222 .platform = "ppc405",
Eugene Suroveginad95d602005-06-07 13:22:09 -07001223 },
Stefan Roese5d8476c2007-10-11 22:08:14 +10001224 { /* 405EX */
Stefan Roeseb676d842008-01-15 18:09:15 +11001225 .pvr_mask = 0xffff0004,
1226 .pvr_value = 0x12910004,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001227 .cpu_name = "405EX",
1228 .cpu_features = CPU_FTRS_40X,
1229 .cpu_user_features = PPC_FEATURE_32 |
1230 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1231 .icache_bsize = 32,
1232 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001233 .machine_check = machine_check_4xx,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001234 .platform = "ppc405",
1235 },
Stefan Roeseb676d842008-01-15 18:09:15 +11001236 { /* 405EXr */
1237 .pvr_mask = 0xffff0004,
1238 .pvr_value = 0x12910000,
1239 .cpu_name = "405EXr",
1240 .cpu_features = CPU_FTRS_40X,
1241 .cpu_user_features = PPC_FEATURE_32 |
1242 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1243 .icache_bsize = 32,
1244 .dcache_bsize = 32,
1245 .machine_check = machine_check_4xx,
1246 .platform = "ppc405",
1247 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001248 { /* default match */
1249 .pvr_mask = 0x00000000,
1250 .pvr_value = 0x00000000,
1251 .cpu_name = "(generic 40x PPC)",
1252 .cpu_features = CPU_FTRS_40X,
1253 .cpu_user_features = PPC_FEATURE_32 |
1254 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1255 .icache_bsize = 32,
1256 .dcache_bsize = 32,
1257 .machine_check = machine_check_4xx,
1258 .platform = "ppc405",
1259 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001260
1261#endif /* CONFIG_40x */
1262#ifdef CONFIG_44x
Matt Porterc9cf73a2005-07-31 22:34:52 -07001263 {
1264 .pvr_mask = 0xf0000fff,
1265 .pvr_value = 0x40000850,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001266 .cpu_name = "440GR Rev. A",
1267 .cpu_features = CPU_FTRS_44X,
1268 .cpu_user_features = COMMON_USER_BOOKE,
1269 .icache_bsize = 32,
1270 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001271 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001272 .platform = "ppc440",
1273 },
1274 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1275 .pvr_mask = 0xf0000fff,
1276 .pvr_value = 0x40000858,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001277 .cpu_name = "440EP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001278 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001279 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001280 .icache_bsize = 32,
1281 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001282 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001283 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001284 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001285 },
1286 {
1287 .pvr_mask = 0xf0000fff,
1288 .pvr_value = 0x400008d3,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001289 .cpu_name = "440GR Rev. B",
1290 .cpu_features = CPU_FTRS_44X,
1291 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1292 .icache_bsize = 32,
1293 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001294 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001295 .platform = "ppc440",
1296 },
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001297 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1298 .pvr_mask = 0xf0000ff7,
1299 .pvr_value = 0x400008d4,
1300 .cpu_name = "440EP Rev. C",
1301 .cpu_features = CPU_FTRS_44X,
1302 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1303 .icache_bsize = 32,
1304 .dcache_bsize = 32,
1305 .cpu_setup = __setup_cpu_440ep,
1306 .machine_check = machine_check_4xx,
1307 .platform = "ppc440",
1308 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001309 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1310 .pvr_mask = 0xf0000fff,
1311 .pvr_value = 0x400008db,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001312 .cpu_name = "440EP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001313 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001314 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001315 .icache_bsize = 32,
1316 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001317 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001318 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001319 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001320 },
Valentine Barshak15fc9932007-08-29 17:40:30 +04001321 { /* 440GRX */
1322 .pvr_mask = 0xf0000ffb,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001323 .pvr_value = 0x200008D0,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001324 .cpu_name = "440GRX",
1325 .cpu_features = CPU_FTRS_44X,
1326 .cpu_user_features = COMMON_USER_BOOKE,
1327 .icache_bsize = 32,
1328 .dcache_bsize = 32,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001329 .cpu_setup = __setup_cpu_440grx,
Valentine Barshakb2be3b12007-12-22 03:22:23 +11001330 .machine_check = machine_check_440A,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001331 .platform = "ppc440",
Valentine Barshak15fc9932007-08-29 17:40:30 +04001332 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001333 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1334 .pvr_mask = 0xf0000ffb,
1335 .pvr_value = 0x200008D8,
1336 .cpu_name = "440EPX",
1337 .cpu_features = CPU_FTRS_44X,
1338 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1339 .icache_bsize = 32,
1340 .dcache_bsize = 32,
1341 .cpu_setup = __setup_cpu_440epx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001342 .machine_check = machine_check_440A,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001343 .platform = "ppc440",
1344 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001345 { /* 440GP Rev. B */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001346 .pvr_mask = 0xf0000fff,
1347 .pvr_value = 0x40000440,
1348 .cpu_name = "440GP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001349 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001350 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001351 .icache_bsize = 32,
1352 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001353 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001354 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001355 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001356 { /* 440GP Rev. C */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001357 .pvr_mask = 0xf0000fff,
1358 .pvr_value = 0x40000481,
1359 .cpu_name = "440GP Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001360 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001361 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001362 .icache_bsize = 32,
1363 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001364 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001365 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001366 },
1367 { /* 440GX Rev. A */
1368 .pvr_mask = 0xf0000fff,
1369 .pvr_value = 0x50000850,
1370 .cpu_name = "440GX Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001371 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001372 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001373 .icache_bsize = 32,
1374 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001375 .cpu_setup = __setup_cpu_440gx,
1376 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001377 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001378 },
1379 { /* 440GX Rev. B */
1380 .pvr_mask = 0xf0000fff,
1381 .pvr_value = 0x50000851,
1382 .cpu_name = "440GX Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001383 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001384 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001385 .icache_bsize = 32,
1386 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001387 .cpu_setup = __setup_cpu_440gx,
1388 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001389 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001390 },
1391 { /* 440GX Rev. C */
1392 .pvr_mask = 0xf0000fff,
1393 .pvr_value = 0x50000892,
1394 .cpu_name = "440GX Rev. C",
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 .cpu_setup = __setup_cpu_440gx,
1400 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001401 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001402 },
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001403 { /* 440GX Rev. F */
1404 .pvr_mask = 0xf0000fff,
1405 .pvr_value = 0x50000894,
1406 .cpu_name = "440GX Rev. F",
Kumar Gala10b35d92005-09-23 14:08:58 -05001407 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001408 .cpu_user_features = COMMON_USER_BOOKE,
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001409 .icache_bsize = 32,
1410 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001411 .cpu_setup = __setup_cpu_440gx,
1412 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001413 .platform = "ppc440",
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001414 },
Matt Porter656de7e2005-09-03 15:55:42 -07001415 { /* 440SP Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001416 .pvr_mask = 0xfff00fff,
1417 .pvr_value = 0x53200891,
Matt Porter656de7e2005-09-03 15:55:42 -07001418 .cpu_name = "440SP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001419 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001420 .cpu_user_features = COMMON_USER_BOOKE,
Matt Porter656de7e2005-09-03 15:55:42 -07001421 .icache_bsize = 32,
1422 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001423 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001424 .platform = "ppc440",
Matt Porter656de7e2005-09-03 15:55:42 -07001425 },
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001426 { /* 440SPe Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001427 .pvr_mask = 0xfff00fff,
1428 .pvr_value = 0x53400890,
1429 .cpu_name = "440SPe Rev. A",
1430 .cpu_features = CPU_FTRS_44X,
1431 .cpu_user_features = COMMON_USER_BOOKE,
1432 .icache_bsize = 32,
1433 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001434 .cpu_setup = __setup_cpu_440spe,
1435 .machine_check = machine_check_440A,
Roland Dreier333e6152007-06-16 05:36:32 +10001436 .platform = "ppc440",
1437 },
1438 { /* 440SPe Rev. B */
1439 .pvr_mask = 0xfff00fff,
1440 .pvr_value = 0x53400891,
1441 .cpu_name = "440SPe Rev. B",
Kumar Galaa147c582006-12-08 02:34:38 -06001442 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001443 .cpu_user_features = COMMON_USER_BOOKE,
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001444 .icache_bsize = 32,
1445 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001446 .cpu_setup = __setup_cpu_440spe,
1447 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001448 .platform = "ppc440",
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001449 },
Stefan Roese464076a2008-02-24 08:07:41 +11001450 { /* 460EX */
1451 .pvr_mask = 0xffff0002,
1452 .pvr_value = 0x13020002,
1453 .cpu_name = "460EX",
1454 .cpu_features = CPU_FTRS_44X,
1455 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1456 .icache_bsize = 32,
1457 .dcache_bsize = 32,
1458 .cpu_setup = __setup_cpu_460ex,
1459 .machine_check = machine_check_440A,
1460 .platform = "ppc440",
1461 },
1462 { /* 460GT */
1463 .pvr_mask = 0xffff0002,
1464 .pvr_value = 0x13020000,
1465 .cpu_name = "460GT",
1466 .cpu_features = CPU_FTRS_44X,
Josh Boyer939e6222008-06-11 07:52:40 -04001467 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Stefan Roese464076a2008-02-24 08:07:41 +11001468 .icache_bsize = 32,
1469 .dcache_bsize = 32,
Josh Boyer939e6222008-06-11 07:52:40 -04001470 .cpu_setup = __setup_cpu_460gt,
Stefan Roese464076a2008-02-24 08:07:41 +11001471 .machine_check = machine_check_440A,
1472 .platform = "ppc440",
1473 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001474 { /* default match */
1475 .pvr_mask = 0x00000000,
1476 .pvr_value = 0x00000000,
1477 .cpu_name = "(generic 44x PPC)",
1478 .cpu_features = CPU_FTRS_44X,
1479 .cpu_user_features = COMMON_USER_BOOKE,
1480 .icache_bsize = 32,
1481 .dcache_bsize = 32,
1482 .machine_check = machine_check_4xx,
1483 .platform = "ppc440",
1484 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001485#endif /* CONFIG_44x */
Josh Boyere3e414b2007-12-24 08:44:47 -06001486#ifdef CONFIG_E200
Stephen Rothwell49209602005-10-12 15:55:09 +10001487 { /* e200z5 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001488 .pvr_mask = 0xfff00000,
1489 .pvr_value = 0x81000000,
1490 .cpu_name = "e200z5",
1491 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001492 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001493 .cpu_user_features = COMMON_USER_BOOKE |
1494 PPC_FEATURE_HAS_EFP_SINGLE |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001495 PPC_FEATURE_UNIFIED_CACHE,
1496 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001497 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001498 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001499 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001500 { /* e200z6 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001501 .pvr_mask = 0xfff00000,
1502 .pvr_value = 0x81100000,
1503 .cpu_name = "e200z6",
1504 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001505 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001506 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001507 PPC_FEATURE_HAS_SPE_COMP |
1508 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001509 PPC_FEATURE_UNIFIED_CACHE,
1510 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001511 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001512 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001513 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001514 { /* default match */
1515 .pvr_mask = 0x00000000,
1516 .pvr_value = 0x00000000,
1517 .cpu_name = "(generic E200 PPC)",
1518 .cpu_features = CPU_FTRS_E200,
1519 .cpu_user_features = COMMON_USER_BOOKE |
1520 PPC_FEATURE_HAS_EFP_SINGLE |
1521 PPC_FEATURE_UNIFIED_CACHE,
1522 .dcache_bsize = 32,
1523 .machine_check = machine_check_e200,
1524 .platform = "ppc5554",
Paul Mackerras516c8be2008-05-12 14:20:35 +10001525 }
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001526#endif /* CONFIG_E200 */
1527#ifdef CONFIG_E500
Stephen Rothwell49209602005-10-12 15:55:09 +10001528 { /* e500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001529 .pvr_mask = 0xffff0000,
1530 .pvr_value = 0x80200000,
1531 .cpu_name = "e500",
Kumar Gala10b35d92005-09-23 14:08:58 -05001532 .cpu_features = CPU_FTRS_E500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001533 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001534 PPC_FEATURE_HAS_SPE_COMP |
1535 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001536 .icache_bsize = 32,
1537 .dcache_bsize = 32,
1538 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001539 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001540 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001541 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001542 .platform = "ppc8540",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001543 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001544 { /* e500v2 */
Kumar Gala5b37b702005-06-21 17:15:18 -07001545 .pvr_mask = 0xffff0000,
1546 .pvr_value = 0x80210000,
1547 .cpu_name = "e500v2",
Kumar Gala10b35d92005-09-23 14:08:58 -05001548 .cpu_features = CPU_FTRS_E500_2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001549 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001550 PPC_FEATURE_HAS_SPE_COMP |
1551 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1552 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
Kumar Gala5b37b702005-06-21 17:15:18 -07001553 .icache_bsize = 32,
1554 .dcache_bsize = 32,
1555 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001556 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001557 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001558 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001559 .platform = "ppc8548",
Kumar Gala5b37b702005-06-21 17:15:18 -07001560 },
Kumar Gala3dfa8772008-06-16 09:41:32 -05001561 { /* e500mc */
1562 .pvr_mask = 0xffff0000,
1563 .pvr_value = 0x80230000,
1564 .cpu_name = "e500mc",
Kumar Gala3dfa8772008-06-16 09:41:32 -05001565 .cpu_features = CPU_FTRS_E500MC,
1566 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1567 .icache_bsize = 64,
1568 .dcache_bsize = 64,
1569 .num_pmcs = 4,
1570 .oprofile_cpu_type = "ppc/e500", /* xxx - galak, e500mc? */
1571 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1572 .machine_check = machine_check_e500,
1573 .platform = "ppce500mc",
1574 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001575 { /* default match */
1576 .pvr_mask = 0x00000000,
1577 .pvr_value = 0x00000000,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001578 .cpu_name = "(generic E500 PPC)",
1579 .cpu_features = CPU_FTRS_E500,
1580 .cpu_user_features = COMMON_USER_BOOKE |
1581 PPC_FEATURE_HAS_SPE_COMP |
1582 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001583 .icache_bsize = 32,
1584 .dcache_bsize = 32,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001585 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001586 .platform = "powerpc",
Paul Mackerras516c8be2008-05-12 14:20:35 +10001587 }
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001588#endif /* CONFIG_E500 */
Stephen Rothwell49209602005-10-12 15:55:09 +10001589#endif /* CONFIG_PPC32 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001590};
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001591
Paul Mackerras87a72f92007-10-04 14:18:01 +10001592static struct cpu_spec the_cpu_spec;
1593
1594struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001595{
1596 struct cpu_spec *s = cpu_specs;
Paul Mackerras87a72f92007-10-04 14:18:01 +10001597 struct cpu_spec *t = &the_cpu_spec;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001598 int i;
1599
1600 s = PTRRELOC(s);
Paul Mackerras87a72f92007-10-04 14:18:01 +10001601 t = PTRRELOC(t);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001602
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001603 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
1604 if ((pvr & s->pvr_mask) == s->pvr_value) {
Paul Mackerras87a72f92007-10-04 14:18:01 +10001605 /*
1606 * If we are overriding a previous value derived
1607 * from the real PVR with a new value obtained
1608 * using a logical PVR value, don't modify the
1609 * performance monitor fields.
1610 */
1611 if (t->num_pmcs && !s->num_pmcs) {
1612 t->cpu_name = s->cpu_name;
1613 t->cpu_features = s->cpu_features;
1614 t->cpu_user_features = s->cpu_user_features;
1615 t->icache_bsize = s->icache_bsize;
1616 t->dcache_bsize = s->dcache_bsize;
1617 t->cpu_setup = s->cpu_setup;
1618 t->cpu_restore = s->cpu_restore;
1619 t->platform = s->platform;
1620 } else
1621 *t = *s;
1622 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001623#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
Stefan Roese464076a2008-02-24 08:07:41 +11001624 /* ppc64 and booke expect identify_cpu to also call
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001625 * setup_cpu for that processor. I will consolidate
1626 * that at a later time, for now, just use #ifdef.
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001627 * we also don't need to PTRRELOC the function pointer
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001628 * on ppc64 and booke as we are running at 0 in real
1629 * mode on ppc64 and reloc_offset is always 0 on booke.
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001630 */
1631 if (s->cpu_setup) {
1632 s->cpu_setup(offset, s);
1633 }
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001634#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001635 return s;
1636 }
1637 BUG();
1638 return NULL;
1639}
1640
Benjamin Herrenschmidt0909c8c2006-10-20 11:47:18 +10001641void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001642{
1643 struct fixup_entry {
1644 unsigned long mask;
1645 unsigned long value;
Benjamin Herrenschmidt0909c8c2006-10-20 11:47:18 +10001646 long start_off;
1647 long end_off;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001648 } *fcur, *fend;
1649
1650 fcur = fixup_start;
1651 fend = fixup_end;
1652
1653 for (; fcur < fend; fcur++) {
1654 unsigned int *pstart, *pend, *p;
1655
1656 if ((value & fcur->mask) == fcur->value)
1657 continue;
1658
1659 /* These PTRRELOCs will disappear once the new scheme for
1660 * modules and vdso is implemented
1661 */
Benjamin Herrenschmidt0909c8c2006-10-20 11:47:18 +10001662 pstart = ((unsigned int *)fcur) + (fcur->start_off / 4);
1663 pend = ((unsigned int *)fcur) + (fcur->end_off / 4);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001664
1665 for (p = pstart; p < pend; p++) {
1666 *p = 0x60000000u;
1667 asm volatile ("dcbst 0, %0" : : "r" (p));
1668 }
1669 asm volatile ("sync" : : : "memory");
1670 for (p = pstart; p < pend; p++)
1671 asm volatile ("icbi 0,%0" : : "r" (p));
1672 asm volatile ("sync; isync" : : : "memory");
1673 }
1674}