blob: d8d669308403e191a4f0ec01d4c32117ff2eed5e [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 },
Michael Neulinge952e6c2008-06-18 10:47:26 +1000389 { /* Power7 */
390 .pvr_mask = 0xffff0000,
391 .pvr_value = 0x003f0000,
392 .cpu_name = "POWER7",
393 .cpu_features = CPU_FTRS_POWER7,
394 .cpu_user_features = COMMON_USER_POWER7,
395 .icache_bsize = 128,
396 .dcache_bsize = 128,
397 .num_pmcs = 6,
398 .pmc_type = PPC_PMC_IBM,
399 .cpu_setup = __setup_cpu_power7,
400 .cpu_restore = __restore_cpu_power7,
401 .oprofile_cpu_type = "ppc64/power7",
402 .oprofile_type = PPC_OPROFILE_POWER4,
403 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
404 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
405 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
406 POWER6_MMCRA_OTHER,
407 .platform = "power7",
408 },
Arnd Bergmannc902be72006-01-04 19:55:53 +0000409 { /* Cell Broadband Engine */
Stephen Rothwell49209602005-10-12 15:55:09 +1000410 .pvr_mask = 0xffff0000,
411 .pvr_value = 0x00700000,
412 .cpu_name = "Cell Broadband Engine",
413 .cpu_features = CPU_FTRS_CELL,
414 .cpu_user_features = COMMON_USER_PPC64 |
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +1100415 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
416 PPC_FEATURE_SMT,
Stephen Rothwell49209602005-10-12 15:55:09 +1000417 .icache_bsize = 128,
418 .dcache_bsize = 128,
Maynard Johnson18f21902006-11-20 18:45:16 +0100419 .num_pmcs = 4,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600420 .pmc_type = PPC_PMC_IBM,
Maynard Johnson18f21902006-11-20 18:45:16 +0100421 .oprofile_cpu_type = "ppc64/cell-be",
422 .oprofile_type = PPC_OPROFILE_CELL,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100423 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100424 .platform = "ppc-cell-be",
Stephen Rothwell49209602005-10-12 15:55:09 +1000425 },
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500426 { /* PA Semi PA6T */
427 .pvr_mask = 0x7fff0000,
428 .pvr_value = 0x00900000,
429 .cpu_name = "PA6T",
430 .cpu_features = CPU_FTRS_PA6T,
431 .cpu_user_features = COMMON_USER_PA6T,
432 .icache_bsize = 64,
433 .dcache_bsize = 64,
434 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600435 .pmc_type = PPC_PMC_PA6T,
Olof Johansson11999192007-02-04 16:36:51 -0600436 .cpu_setup = __setup_cpu_pa6t,
437 .cpu_restore = __restore_cpu_pa6t,
Olof Johansson25fc5302007-04-18 16:38:21 +1000438 .oprofile_cpu_type = "ppc64/pa6t",
439 .oprofile_type = PPC_OPROFILE_PA6T,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100440 .machine_check = machine_check_generic,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500441 .platform = "pa6t",
442 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000443 { /* default match */
444 .pvr_mask = 0x00000000,
445 .pvr_value = 0x00000000,
446 .cpu_name = "POWER4 (compatible)",
447 .cpu_features = CPU_FTRS_COMPATIBLE,
448 .cpu_user_features = COMMON_USER_PPC64,
449 .icache_bsize = 128,
450 .dcache_bsize = 128,
451 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600452 .pmc_type = PPC_PMC_IBM,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100453 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100454 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000455 }
456#endif /* CONFIG_PPC64 */
457#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -0700458#if CLASSIC_PPC
Stephen Rothwell49209602005-10-12 15:55:09 +1000459 { /* 601 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700460 .pvr_mask = 0xffff0000,
461 .pvr_value = 0x00010000,
462 .cpu_name = "601",
Kumar Gala10b35d92005-09-23 14:08:58 -0500463 .cpu_features = CPU_FTRS_PPC601,
Stephen Rothwell49209602005-10-12 15:55:09 +1000464 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
Paul Mackerras98599012005-10-22 16:51:34 +1000465 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700466 .icache_bsize = 32,
467 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100468 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100469 .platform = "ppc601",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700470 },
471 { /* 603 */
472 .pvr_mask = 0xffff0000,
473 .pvr_value = 0x00030000,
474 .cpu_name = "603",
Kumar Gala10b35d92005-09-23 14:08:58 -0500475 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000476 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700477 .icache_bsize = 32,
478 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100479 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100480 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100481 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700482 },
483 { /* 603e */
484 .pvr_mask = 0xffff0000,
485 .pvr_value = 0x00060000,
486 .cpu_name = "603e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500487 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000488 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700489 .icache_bsize = 32,
490 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100491 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100492 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100493 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700494 },
495 { /* 603ev */
496 .pvr_mask = 0xffff0000,
497 .pvr_value = 0x00070000,
498 .cpu_name = "603ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500499 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000500 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700501 .icache_bsize = 32,
502 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100503 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100504 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100505 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700506 },
507 { /* 604 */
508 .pvr_mask = 0xffff0000,
509 .pvr_value = 0x00040000,
510 .cpu_name = "604",
Kumar Gala10b35d92005-09-23 14:08:58 -0500511 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000512 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700513 .icache_bsize = 32,
514 .dcache_bsize = 32,
515 .num_pmcs = 2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100516 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100517 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100518 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700519 },
520 { /* 604e */
521 .pvr_mask = 0xfffff000,
522 .pvr_value = 0x00090000,
523 .cpu_name = "604e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500524 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000525 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700526 .icache_bsize = 32,
527 .dcache_bsize = 32,
528 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100529 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100530 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100531 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700532 },
533 { /* 604r */
534 .pvr_mask = 0xffff0000,
535 .pvr_value = 0x00090000,
536 .cpu_name = "604r",
Kumar Gala10b35d92005-09-23 14:08:58 -0500537 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000538 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700539 .icache_bsize = 32,
540 .dcache_bsize = 32,
541 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100542 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100543 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100544 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700545 },
546 { /* 604ev */
547 .pvr_mask = 0xffff0000,
548 .pvr_value = 0x000a0000,
549 .cpu_name = "604ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500550 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000551 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700552 .icache_bsize = 32,
553 .dcache_bsize = 32,
554 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100555 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100556 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100557 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700558 },
559 { /* 740/750 (0x4202, don't support TAU ?) */
560 .pvr_mask = 0xffffffff,
561 .pvr_value = 0x00084202,
562 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500563 .cpu_features = CPU_FTRS_740_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000564 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700565 .icache_bsize = 32,
566 .dcache_bsize = 32,
567 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100568 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100569 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100570 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700571 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700572 { /* 750CX (80100 and 8010x?) */
573 .pvr_mask = 0xfffffff0,
574 .pvr_value = 0x00080100,
575 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500576 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000577 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700578 .icache_bsize = 32,
579 .dcache_bsize = 32,
580 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100581 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100582 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100583 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700584 },
585 { /* 750CX (82201 and 82202) */
586 .pvr_mask = 0xfffffff0,
587 .pvr_value = 0x00082200,
588 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500589 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000590 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700591 .icache_bsize = 32,
592 .dcache_bsize = 32,
593 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100594 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100595 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100596 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700597 },
598 { /* 750CXe (82214) */
599 .pvr_mask = 0xfffffff0,
600 .pvr_value = 0x00082210,
601 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500602 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000603 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700604 .icache_bsize = 32,
605 .dcache_bsize = 32,
606 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100607 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100608 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100609 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700610 },
Arthur Othieno7c316252005-09-03 15:55:52 -0700611 { /* 750CXe "Gekko" (83214) */
612 .pvr_mask = 0xffffffff,
613 .pvr_value = 0x00083214,
614 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500615 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000616 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Arthur Othieno7c316252005-09-03 15:55:52 -0700617 .icache_bsize = 32,
618 .dcache_bsize = 32,
619 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100620 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100621 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100622 .platform = "ppc750",
Arthur Othieno7c316252005-09-03 15:55:52 -0700623 },
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500624 { /* 750CL */
625 .pvr_mask = 0xfffff0f0,
626 .pvr_value = 0x00087010,
627 .cpu_name = "750CL",
Josh Boyera14c4502007-04-13 04:33:25 +1000628 .cpu_features = CPU_FTRS_750CL,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500629 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
630 .icache_bsize = 32,
631 .dcache_bsize = 32,
632 .num_pmcs = 4,
Josh Boyera14c4502007-04-13 04:33:25 +1000633 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100634 .machine_check = machine_check_generic,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500635 .platform = "ppc750",
636 },
Arthur Othienoac1ff042005-09-03 15:55:51 -0700637 { /* 745/755 */
638 .pvr_mask = 0xfffff000,
639 .pvr_value = 0x00083000,
640 .cpu_name = "745/755",
Kumar Gala10b35d92005-09-23 14:08:58 -0500641 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000642 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Arthur Othienoac1ff042005-09-03 15:55:51 -0700643 .icache_bsize = 32,
644 .dcache_bsize = 32,
645 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100646 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100647 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100648 .platform = "ppc750",
Arthur Othienoac1ff042005-09-03 15:55:51 -0700649 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700650 { /* 750FX rev 1.x */
651 .pvr_mask = 0xffffff00,
652 .pvr_value = 0x70000100,
653 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500654 .cpu_features = CPU_FTRS_750FX1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000655 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700656 .icache_bsize = 32,
657 .dcache_bsize = 32,
658 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100659 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100660 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100661 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700662 },
663 { /* 750FX rev 2.0 must disable HID0[DPM] */
664 .pvr_mask = 0xffffffff,
665 .pvr_value = 0x70000200,
666 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500667 .cpu_features = CPU_FTRS_750FX2,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000668 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700669 .icache_bsize = 32,
670 .dcache_bsize = 32,
671 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100672 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100673 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100674 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700675 },
676 { /* 750FX (All revs except 2.0) */
677 .pvr_mask = 0xffff0000,
678 .pvr_value = 0x70000000,
679 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500680 .cpu_features = CPU_FTRS_750FX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000681 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700682 .icache_bsize = 32,
683 .dcache_bsize = 32,
684 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100685 .cpu_setup = __setup_cpu_750fx,
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 { /* 750GX */
690 .pvr_mask = 0xffff0000,
691 .pvr_value = 0x70020000,
692 .cpu_name = "750GX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500693 .cpu_features = CPU_FTRS_750GX,
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,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100698 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100699 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100700 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700701 },
702 { /* 740/750 (L2CR bit need fixup for 740) */
703 .pvr_mask = 0xffff0000,
704 .pvr_value = 0x00080000,
705 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500706 .cpu_features = CPU_FTRS_740,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000707 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700708 .icache_bsize = 32,
709 .dcache_bsize = 32,
710 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100711 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100712 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100713 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700714 },
715 { /* 7400 rev 1.1 ? (no TAU) */
716 .pvr_mask = 0xffffffff,
717 .pvr_value = 0x000c1101,
718 .cpu_name = "7400 (1.1)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500719 .cpu_features = CPU_FTRS_7400_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000720 .cpu_user_features = COMMON_USER |
721 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700722 .icache_bsize = 32,
723 .dcache_bsize = 32,
724 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100725 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100726 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100727 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700728 },
729 { /* 7400 */
730 .pvr_mask = 0xffff0000,
731 .pvr_value = 0x000c0000,
732 .cpu_name = "7400",
Kumar Gala10b35d92005-09-23 14:08:58 -0500733 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000734 .cpu_user_features = COMMON_USER |
735 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700736 .icache_bsize = 32,
737 .dcache_bsize = 32,
738 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100739 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100740 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100741 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700742 },
743 { /* 7410 */
744 .pvr_mask = 0xffff0000,
745 .pvr_value = 0x800c0000,
746 .cpu_name = "7410",
Kumar Gala10b35d92005-09-23 14:08:58 -0500747 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000748 .cpu_user_features = COMMON_USER |
749 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700750 .icache_bsize = 32,
751 .dcache_bsize = 32,
752 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100753 .cpu_setup = __setup_cpu_7410,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100754 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100755 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700756 },
757 { /* 7450 2.0 - no doze/nap */
758 .pvr_mask = 0xffffffff,
759 .pvr_value = 0x80000200,
760 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500761 .cpu_features = CPU_FTRS_7450_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000762 .cpu_user_features = COMMON_USER |
763 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700764 .icache_bsize = 32,
765 .dcache_bsize = 32,
766 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600767 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600768 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000769 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100770 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100771 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700772 },
773 { /* 7450 2.1 */
774 .pvr_mask = 0xffffffff,
775 .pvr_value = 0x80000201,
776 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500777 .cpu_features = CPU_FTRS_7450_21,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000778 .cpu_user_features = COMMON_USER |
779 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700780 .icache_bsize = 32,
781 .dcache_bsize = 32,
782 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600783 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600784 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000785 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100786 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100787 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700788 },
789 { /* 7450 2.3 and newer */
790 .pvr_mask = 0xffff0000,
791 .pvr_value = 0x80000000,
792 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500793 .cpu_features = CPU_FTRS_7450_23,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000794 .cpu_user_features = COMMON_USER |
795 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700796 .icache_bsize = 32,
797 .dcache_bsize = 32,
798 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600799 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600800 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000801 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100802 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100803 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700804 },
805 { /* 7455 rev 1.x */
806 .pvr_mask = 0xffffff00,
807 .pvr_value = 0x80010100,
808 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500809 .cpu_features = CPU_FTRS_7455_1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000810 .cpu_user_features = COMMON_USER |
811 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700812 .icache_bsize = 32,
813 .dcache_bsize = 32,
814 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600815 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600816 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000817 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100818 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100819 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700820 },
821 { /* 7455 rev 2.0 */
822 .pvr_mask = 0xffffffff,
823 .pvr_value = 0x80010200,
824 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500825 .cpu_features = CPU_FTRS_7455_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000826 .cpu_user_features = COMMON_USER |
827 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700828 .icache_bsize = 32,
829 .dcache_bsize = 32,
830 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600831 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600832 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000833 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100834 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100835 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700836 },
837 { /* 7455 others */
838 .pvr_mask = 0xffff0000,
839 .pvr_value = 0x80010000,
840 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500841 .cpu_features = CPU_FTRS_7455,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000842 .cpu_user_features = COMMON_USER |
843 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700844 .icache_bsize = 32,
845 .dcache_bsize = 32,
846 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600847 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600848 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000849 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100850 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100851 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700852 },
853 { /* 7447/7457 Rev 1.0 */
854 .pvr_mask = 0xffffffff,
855 .pvr_value = 0x80020100,
856 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500857 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000858 .cpu_user_features = COMMON_USER |
859 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700860 .icache_bsize = 32,
861 .dcache_bsize = 32,
862 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600863 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600864 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000865 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100866 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100867 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700868 },
869 { /* 7447/7457 Rev 1.1 */
870 .pvr_mask = 0xffffffff,
871 .pvr_value = 0x80020101,
872 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500873 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000874 .cpu_user_features = COMMON_USER |
875 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700876 .icache_bsize = 32,
877 .dcache_bsize = 32,
878 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600879 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600880 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000881 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100882 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100883 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700884 },
885 { /* 7447/7457 Rev 1.2 and later */
886 .pvr_mask = 0xffff0000,
887 .pvr_value = 0x80020000,
888 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500889 .cpu_features = CPU_FTRS_7447,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000890 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700891 .icache_bsize = 32,
892 .dcache_bsize = 32,
893 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600894 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600895 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000896 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100897 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100898 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700899 },
900 { /* 7447A */
901 .pvr_mask = 0xffff0000,
902 .pvr_value = 0x80030000,
903 .cpu_name = "7447A",
Kumar Gala10b35d92005-09-23 14:08:58 -0500904 .cpu_features = CPU_FTRS_7447A,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000905 .cpu_user_features = COMMON_USER |
906 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700907 .icache_bsize = 32,
908 .dcache_bsize = 32,
909 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600910 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600911 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000912 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100913 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100914 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700915 },
Kumar Galabbde6302005-09-03 15:55:55 -0700916 { /* 7448 */
917 .pvr_mask = 0xffff0000,
918 .pvr_value = 0x80040000,
919 .cpu_name = "7448",
James.Yang3d372542007-05-02 16:34:43 -0500920 .cpu_features = CPU_FTRS_7448,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000921 .cpu_user_features = COMMON_USER |
922 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Kumar Galabbde6302005-09-03 15:55:55 -0700923 .icache_bsize = 32,
924 .dcache_bsize = 32,
925 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600926 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600927 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000928 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100929 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100930 .platform = "ppc7450",
Kumar Galabbde6302005-09-03 15:55:55 -0700931 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700932 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
933 .pvr_mask = 0x7fff0000,
934 .pvr_value = 0x00810000,
935 .cpu_name = "82xx",
Kumar Gala10b35d92005-09-23 14:08:58 -0500936 .cpu_features = CPU_FTRS_82XX,
Stephen Rothwell49209602005-10-12 15:55:09 +1000937 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700938 .icache_bsize = 32,
939 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100940 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100941 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100942 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700943 },
944 { /* All G2_LE (603e core, plus some) have the same pvr */
945 .pvr_mask = 0x7fff0000,
946 .pvr_value = 0x00820000,
947 .cpu_name = "G2_LE",
Kumar Gala10b35d92005-09-23 14:08:58 -0500948 .cpu_features = CPU_FTRS_G2_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000949 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700950 .icache_bsize = 32,
951 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100952 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100953 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100954 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700955 },
Kim Phillips6c4a2502006-10-02 20:10:24 -0500956 { /* e300c1 (a 603e core, plus some) on 83xx */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700957 .pvr_mask = 0x7fff0000,
958 .pvr_value = 0x00830000,
Kim Phillips6c4a2502006-10-02 20:10:24 -0500959 .cpu_name = "e300c1",
Kumar Gala10b35d92005-09-23 14:08:58 -0500960 .cpu_features = CPU_FTRS_E300,
Stephen Rothwell49209602005-10-12 15:55:09 +1000961 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700962 .icache_bsize = 32,
963 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100964 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100965 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100966 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700967 },
Kim Phillips6c4a2502006-10-02 20:10:24 -0500968 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
969 .pvr_mask = 0x7fff0000,
970 .pvr_value = 0x00840000,
971 .cpu_name = "e300c2",
Kim Phillipsaa42c692006-12-08 02:43:30 -0600972 .cpu_features = CPU_FTRS_E300C2,
Kim Phillips6c4a2502006-10-02 20:10:24 -0500973 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
974 .icache_bsize = 32,
975 .dcache_bsize = 32,
976 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100977 .machine_check = machine_check_generic,
Kim Phillips6c4a2502006-10-02 20:10:24 -0500978 .platform = "ppc603",
979 },
Li Yanga58d5242007-10-19 19:38:42 +0800980 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
Scott Wood57933f82006-12-01 12:57:05 -0600981 .pvr_mask = 0x7fff0000,
982 .pvr_value = 0x00850000,
983 .cpu_name = "e300c3",
984 .cpu_features = CPU_FTRS_E300,
985 .cpu_user_features = COMMON_USER,
986 .icache_bsize = 32,
987 .dcache_bsize = 32,
988 .cpu_setup = __setup_cpu_603,
Andy Fleming1347a2c2008-02-04 18:28:07 -0600989 .num_pmcs = 4,
990 .oprofile_cpu_type = "ppc/e300",
991 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Scott Wood57933f82006-12-01 12:57:05 -0600992 .platform = "ppc603",
993 },
Li Yanga58d5242007-10-19 19:38:42 +0800994 { /* e300c4 (e300c1, plus one IU) */
995 .pvr_mask = 0x7fff0000,
996 .pvr_value = 0x00860000,
997 .cpu_name = "e300c4",
998 .cpu_features = CPU_FTRS_E300,
999 .cpu_user_features = COMMON_USER,
1000 .icache_bsize = 32,
1001 .dcache_bsize = 32,
1002 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001003 .machine_check = machine_check_generic,
Andy Fleming1347a2c2008-02-04 18:28:07 -06001004 .num_pmcs = 4,
1005 .oprofile_cpu_type = "ppc/e300",
1006 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Li Yanga58d5242007-10-19 19:38:42 +08001007 .platform = "ppc603",
1008 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001009 { /* default match, we assume split I/D cache & TB (non-601)... */
1010 .pvr_mask = 0x00000000,
1011 .pvr_value = 0x00000000,
1012 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -05001013 .cpu_features = CPU_FTRS_CLASSIC32,
Stephen Rothwell49209602005-10-12 15:55:09 +10001014 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001015 .icache_bsize = 32,
1016 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001017 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001018 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001019 },
1020#endif /* CLASSIC_PPC */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001021#ifdef CONFIG_8xx
1022 { /* 8xx */
1023 .pvr_mask = 0xffff0000,
1024 .pvr_value = 0x00500000,
1025 .cpu_name = "8xx",
1026 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1027 * if the 8xx code is there.... */
Kumar Gala10b35d92005-09-23 14:08:58 -05001028 .cpu_features = CPU_FTRS_8XX,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001029 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1030 .icache_bsize = 16,
1031 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001032 .platform = "ppc823",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001033 },
1034#endif /* CONFIG_8xx */
1035#ifdef CONFIG_40x
1036 { /* 403GC */
1037 .pvr_mask = 0xffffff00,
1038 .pvr_value = 0x00200200,
1039 .cpu_name = "403GC",
Kumar Gala10b35d92005-09-23 14:08:58 -05001040 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001041 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1042 .icache_bsize = 16,
1043 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001044 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001045 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001046 },
1047 { /* 403GCX */
1048 .pvr_mask = 0xffffff00,
1049 .pvr_value = 0x00201400,
1050 .cpu_name = "403GCX",
Kumar Gala10b35d92005-09-23 14:08:58 -05001051 .cpu_features = CPU_FTRS_40X,
Paul Mackerras98599012005-10-22 16:51:34 +10001052 .cpu_user_features = PPC_FEATURE_32 |
1053 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001054 .icache_bsize = 16,
1055 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001056 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001057 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001058 },
1059 { /* 403G ?? */
1060 .pvr_mask = 0xffff0000,
1061 .pvr_value = 0x00200000,
1062 .cpu_name = "403G ??",
Kumar Gala10b35d92005-09-23 14:08:58 -05001063 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001064 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1065 .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 { /* 405GP */
1071 .pvr_mask = 0xffff0000,
1072 .pvr_value = 0x40110000,
1073 .cpu_name = "405GP",
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 |
1076 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1077 .icache_bsize = 32,
1078 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001079 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001080 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001081 },
1082 { /* STB 03xxx */
1083 .pvr_mask = 0xffff0000,
1084 .pvr_value = 0x40130000,
1085 .cpu_name = "STB03xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001086 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001087 .cpu_user_features = PPC_FEATURE_32 |
1088 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1089 .icache_bsize = 32,
1090 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001091 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001092 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001093 },
1094 { /* STB 04xxx */
1095 .pvr_mask = 0xffff0000,
1096 .pvr_value = 0x41810000,
1097 .cpu_name = "STB04xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001098 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001099 .cpu_user_features = PPC_FEATURE_32 |
1100 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1101 .icache_bsize = 32,
1102 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001103 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001104 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001105 },
1106 { /* NP405L */
1107 .pvr_mask = 0xffff0000,
1108 .pvr_value = 0x41610000,
1109 .cpu_name = "NP405L",
Kumar Gala10b35d92005-09-23 14:08:58 -05001110 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001111 .cpu_user_features = PPC_FEATURE_32 |
1112 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1113 .icache_bsize = 32,
1114 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001115 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001116 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001117 },
1118 { /* NP4GS3 */
1119 .pvr_mask = 0xffff0000,
1120 .pvr_value = 0x40B10000,
1121 .cpu_name = "NP4GS3",
Kumar Gala10b35d92005-09-23 14:08:58 -05001122 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001123 .cpu_user_features = PPC_FEATURE_32 |
1124 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1125 .icache_bsize = 32,
1126 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001127 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001128 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001129 },
1130 { /* NP405H */
1131 .pvr_mask = 0xffff0000,
1132 .pvr_value = 0x41410000,
1133 .cpu_name = "NP405H",
Kumar Gala10b35d92005-09-23 14:08:58 -05001134 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001135 .cpu_user_features = PPC_FEATURE_32 |
1136 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1137 .icache_bsize = 32,
1138 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001139 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001140 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001141 },
1142 { /* 405GPr */
1143 .pvr_mask = 0xffff0000,
1144 .pvr_value = 0x50910000,
1145 .cpu_name = "405GPr",
Kumar Gala10b35d92005-09-23 14:08:58 -05001146 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001147 .cpu_user_features = PPC_FEATURE_32 |
1148 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1149 .icache_bsize = 32,
1150 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001151 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001152 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001153 },
1154 { /* STBx25xx */
1155 .pvr_mask = 0xffff0000,
1156 .pvr_value = 0x51510000,
1157 .cpu_name = "STBx25xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001158 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001159 .cpu_user_features = PPC_FEATURE_32 |
1160 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1161 .icache_bsize = 32,
1162 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001163 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001164 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001165 },
1166 { /* 405LP */
1167 .pvr_mask = 0xffff0000,
1168 .pvr_value = 0x41F10000,
1169 .cpu_name = "405LP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001170 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001171 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
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 { /* Xilinx Virtex-II Pro */
Grant C. Likely72646c72006-01-19 01:13:20 -07001178 .pvr_mask = 0xfffff000,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001179 .pvr_value = 0x20010000,
1180 .cpu_name = "Virtex-II Pro",
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 |
1183 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1184 .icache_bsize = 32,
1185 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001186 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001187 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001188 },
Grant C. Likely72646c72006-01-19 01:13:20 -07001189 { /* Xilinx Virtex-4 FX */
1190 .pvr_mask = 0xfffff000,
1191 .pvr_value = 0x20011000,
1192 .cpu_name = "Virtex-4 FX",
1193 .cpu_features = CPU_FTRS_40X,
1194 .cpu_user_features = PPC_FEATURE_32 |
1195 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1196 .icache_bsize = 32,
1197 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001198 .machine_check = machine_check_4xx,
Peter Bergner838fdb42006-09-14 14:18:38 -05001199 .platform = "ppc405",
Grant C. Likely72646c72006-01-19 01:13:20 -07001200 },
Eugene Suroveginad95d602005-06-07 13:22:09 -07001201 { /* 405EP */
1202 .pvr_mask = 0xffff0000,
1203 .pvr_value = 0x51210000,
1204 .cpu_name = "405EP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001205 .cpu_features = CPU_FTRS_40X,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001206 .cpu_user_features = PPC_FEATURE_32 |
1207 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1208 .icache_bsize = 32,
1209 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001210 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001211 .platform = "ppc405",
Eugene Suroveginad95d602005-06-07 13:22:09 -07001212 },
Stefan Roese5d8476c2007-10-11 22:08:14 +10001213 { /* 405EX */
Stefan Roeseb676d842008-01-15 18:09:15 +11001214 .pvr_mask = 0xffff0004,
1215 .pvr_value = 0x12910004,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001216 .cpu_name = "405EX",
1217 .cpu_features = CPU_FTRS_40X,
1218 .cpu_user_features = PPC_FEATURE_32 |
1219 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1220 .icache_bsize = 32,
1221 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001222 .machine_check = machine_check_4xx,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001223 .platform = "ppc405",
1224 },
Stefan Roeseb676d842008-01-15 18:09:15 +11001225 { /* 405EXr */
1226 .pvr_mask = 0xffff0004,
1227 .pvr_value = 0x12910000,
1228 .cpu_name = "405EXr",
1229 .cpu_features = CPU_FTRS_40X,
1230 .cpu_user_features = PPC_FEATURE_32 |
1231 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1232 .icache_bsize = 32,
1233 .dcache_bsize = 32,
1234 .machine_check = machine_check_4xx,
1235 .platform = "ppc405",
1236 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001237 { /* default match */
1238 .pvr_mask = 0x00000000,
1239 .pvr_value = 0x00000000,
1240 .cpu_name = "(generic 40x PPC)",
1241 .cpu_features = CPU_FTRS_40X,
1242 .cpu_user_features = PPC_FEATURE_32 |
1243 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1244 .icache_bsize = 32,
1245 .dcache_bsize = 32,
1246 .machine_check = machine_check_4xx,
1247 .platform = "ppc405",
1248 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001249
1250#endif /* CONFIG_40x */
1251#ifdef CONFIG_44x
Matt Porterc9cf73a2005-07-31 22:34:52 -07001252 {
1253 .pvr_mask = 0xf0000fff,
1254 .pvr_value = 0x40000850,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001255 .cpu_name = "440GR Rev. A",
1256 .cpu_features = CPU_FTRS_44X,
1257 .cpu_user_features = COMMON_USER_BOOKE,
1258 .icache_bsize = 32,
1259 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001260 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001261 .platform = "ppc440",
1262 },
1263 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1264 .pvr_mask = 0xf0000fff,
1265 .pvr_value = 0x40000858,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001266 .cpu_name = "440EP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001267 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001268 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001269 .icache_bsize = 32,
1270 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001271 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001272 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001273 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001274 },
1275 {
1276 .pvr_mask = 0xf0000fff,
1277 .pvr_value = 0x400008d3,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001278 .cpu_name = "440GR Rev. B",
1279 .cpu_features = CPU_FTRS_44X,
1280 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1281 .icache_bsize = 32,
1282 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001283 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001284 .platform = "ppc440",
1285 },
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001286 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1287 .pvr_mask = 0xf0000ff7,
1288 .pvr_value = 0x400008d4,
1289 .cpu_name = "440EP Rev. C",
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,
1294 .cpu_setup = __setup_cpu_440ep,
1295 .machine_check = machine_check_4xx,
1296 .platform = "ppc440",
1297 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001298 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1299 .pvr_mask = 0xf0000fff,
1300 .pvr_value = 0x400008db,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001301 .cpu_name = "440EP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001302 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001303 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001304 .icache_bsize = 32,
1305 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001306 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001307 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001308 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001309 },
Valentine Barshak15fc9932007-08-29 17:40:30 +04001310 { /* 440GRX */
1311 .pvr_mask = 0xf0000ffb,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001312 .pvr_value = 0x200008D0,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001313 .cpu_name = "440GRX",
1314 .cpu_features = CPU_FTRS_44X,
1315 .cpu_user_features = COMMON_USER_BOOKE,
1316 .icache_bsize = 32,
1317 .dcache_bsize = 32,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001318 .cpu_setup = __setup_cpu_440grx,
Valentine Barshakb2be3b12007-12-22 03:22:23 +11001319 .machine_check = machine_check_440A,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001320 .platform = "ppc440",
Valentine Barshak15fc9932007-08-29 17:40:30 +04001321 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001322 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1323 .pvr_mask = 0xf0000ffb,
1324 .pvr_value = 0x200008D8,
1325 .cpu_name = "440EPX",
1326 .cpu_features = CPU_FTRS_44X,
1327 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1328 .icache_bsize = 32,
1329 .dcache_bsize = 32,
1330 .cpu_setup = __setup_cpu_440epx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001331 .machine_check = machine_check_440A,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001332 .platform = "ppc440",
1333 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001334 { /* 440GP Rev. B */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001335 .pvr_mask = 0xf0000fff,
1336 .pvr_value = 0x40000440,
1337 .cpu_name = "440GP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001338 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001339 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001340 .icache_bsize = 32,
1341 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001342 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001343 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001344 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001345 { /* 440GP Rev. C */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001346 .pvr_mask = 0xf0000fff,
1347 .pvr_value = 0x40000481,
1348 .cpu_name = "440GP Rev. C",
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 },
1356 { /* 440GX Rev. A */
1357 .pvr_mask = 0xf0000fff,
1358 .pvr_value = 0x50000850,
1359 .cpu_name = "440GX Rev. A",
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 .cpu_setup = __setup_cpu_440gx,
1365 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001366 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001367 },
1368 { /* 440GX Rev. B */
1369 .pvr_mask = 0xf0000fff,
1370 .pvr_value = 0x50000851,
1371 .cpu_name = "440GX Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001372 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001373 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001374 .icache_bsize = 32,
1375 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001376 .cpu_setup = __setup_cpu_440gx,
1377 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001378 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001379 },
1380 { /* 440GX Rev. C */
1381 .pvr_mask = 0xf0000fff,
1382 .pvr_value = 0x50000892,
1383 .cpu_name = "440GX Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001384 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001385 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001386 .icache_bsize = 32,
1387 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001388 .cpu_setup = __setup_cpu_440gx,
1389 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001390 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001391 },
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001392 { /* 440GX Rev. F */
1393 .pvr_mask = 0xf0000fff,
1394 .pvr_value = 0x50000894,
1395 .cpu_name = "440GX Rev. F",
Kumar Gala10b35d92005-09-23 14:08:58 -05001396 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001397 .cpu_user_features = COMMON_USER_BOOKE,
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001398 .icache_bsize = 32,
1399 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001400 .cpu_setup = __setup_cpu_440gx,
1401 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001402 .platform = "ppc440",
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001403 },
Matt Porter656de7e2005-09-03 15:55:42 -07001404 { /* 440SP Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001405 .pvr_mask = 0xfff00fff,
1406 .pvr_value = 0x53200891,
Matt Porter656de7e2005-09-03 15:55:42 -07001407 .cpu_name = "440SP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001408 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001409 .cpu_user_features = COMMON_USER_BOOKE,
Matt Porter656de7e2005-09-03 15:55:42 -07001410 .icache_bsize = 32,
1411 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001412 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001413 .platform = "ppc440",
Matt Porter656de7e2005-09-03 15:55:42 -07001414 },
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001415 { /* 440SPe Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001416 .pvr_mask = 0xfff00fff,
1417 .pvr_value = 0x53400890,
1418 .cpu_name = "440SPe Rev. A",
1419 .cpu_features = CPU_FTRS_44X,
1420 .cpu_user_features = COMMON_USER_BOOKE,
1421 .icache_bsize = 32,
1422 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001423 .cpu_setup = __setup_cpu_440spe,
1424 .machine_check = machine_check_440A,
Roland Dreier333e6152007-06-16 05:36:32 +10001425 .platform = "ppc440",
1426 },
1427 { /* 440SPe Rev. B */
1428 .pvr_mask = 0xfff00fff,
1429 .pvr_value = 0x53400891,
1430 .cpu_name = "440SPe Rev. B",
Kumar Galaa147c582006-12-08 02:34:38 -06001431 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001432 .cpu_user_features = COMMON_USER_BOOKE,
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001433 .icache_bsize = 32,
1434 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001435 .cpu_setup = __setup_cpu_440spe,
1436 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001437 .platform = "ppc440",
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001438 },
Stefan Roese464076a2008-02-24 08:07:41 +11001439 { /* 460EX */
1440 .pvr_mask = 0xffff0002,
1441 .pvr_value = 0x13020002,
1442 .cpu_name = "460EX",
1443 .cpu_features = CPU_FTRS_44X,
1444 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1445 .icache_bsize = 32,
1446 .dcache_bsize = 32,
1447 .cpu_setup = __setup_cpu_460ex,
1448 .machine_check = machine_check_440A,
1449 .platform = "ppc440",
1450 },
1451 { /* 460GT */
1452 .pvr_mask = 0xffff0002,
1453 .pvr_value = 0x13020000,
1454 .cpu_name = "460GT",
1455 .cpu_features = CPU_FTRS_44X,
Josh Boyer939e6222008-06-11 07:52:40 -04001456 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Stefan Roese464076a2008-02-24 08:07:41 +11001457 .icache_bsize = 32,
1458 .dcache_bsize = 32,
Josh Boyer939e6222008-06-11 07:52:40 -04001459 .cpu_setup = __setup_cpu_460gt,
Stefan Roese464076a2008-02-24 08:07:41 +11001460 .machine_check = machine_check_440A,
1461 .platform = "ppc440",
1462 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001463 { /* default match */
1464 .pvr_mask = 0x00000000,
1465 .pvr_value = 0x00000000,
1466 .cpu_name = "(generic 44x PPC)",
1467 .cpu_features = CPU_FTRS_44X,
1468 .cpu_user_features = COMMON_USER_BOOKE,
1469 .icache_bsize = 32,
1470 .dcache_bsize = 32,
1471 .machine_check = machine_check_4xx,
1472 .platform = "ppc440",
1473 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001474#endif /* CONFIG_44x */
Josh Boyere3e414b2007-12-24 08:44:47 -06001475#ifdef CONFIG_E200
Stephen Rothwell49209602005-10-12 15:55:09 +10001476 { /* e200z5 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001477 .pvr_mask = 0xfff00000,
1478 .pvr_value = 0x81000000,
1479 .cpu_name = "e200z5",
1480 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001481 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001482 .cpu_user_features = COMMON_USER_BOOKE |
1483 PPC_FEATURE_HAS_EFP_SINGLE |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001484 PPC_FEATURE_UNIFIED_CACHE,
1485 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001486 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001487 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001488 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001489 { /* e200z6 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001490 .pvr_mask = 0xfff00000,
1491 .pvr_value = 0x81100000,
1492 .cpu_name = "e200z6",
1493 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001494 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001495 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001496 PPC_FEATURE_HAS_SPE_COMP |
1497 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001498 PPC_FEATURE_UNIFIED_CACHE,
1499 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001500 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001501 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001502 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001503 { /* default match */
1504 .pvr_mask = 0x00000000,
1505 .pvr_value = 0x00000000,
1506 .cpu_name = "(generic E200 PPC)",
1507 .cpu_features = CPU_FTRS_E200,
1508 .cpu_user_features = COMMON_USER_BOOKE |
1509 PPC_FEATURE_HAS_EFP_SINGLE |
1510 PPC_FEATURE_UNIFIED_CACHE,
1511 .dcache_bsize = 32,
1512 .machine_check = machine_check_e200,
1513 .platform = "ppc5554",
Paul Mackerras516c8be2008-05-12 14:20:35 +10001514 }
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001515#endif /* CONFIG_E200 */
1516#ifdef CONFIG_E500
Stephen Rothwell49209602005-10-12 15:55:09 +10001517 { /* e500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001518 .pvr_mask = 0xffff0000,
1519 .pvr_value = 0x80200000,
1520 .cpu_name = "e500",
Kumar Gala10b35d92005-09-23 14:08:58 -05001521 .cpu_features = CPU_FTRS_E500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001522 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001523 PPC_FEATURE_HAS_SPE_COMP |
1524 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001525 .icache_bsize = 32,
1526 .dcache_bsize = 32,
1527 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001528 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001529 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001530 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001531 .platform = "ppc8540",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001532 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001533 { /* e500v2 */
Kumar Gala5b37b702005-06-21 17:15:18 -07001534 .pvr_mask = 0xffff0000,
1535 .pvr_value = 0x80210000,
1536 .cpu_name = "e500v2",
Kumar Gala10b35d92005-09-23 14:08:58 -05001537 .cpu_features = CPU_FTRS_E500_2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001538 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001539 PPC_FEATURE_HAS_SPE_COMP |
1540 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1541 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
Kumar Gala5b37b702005-06-21 17:15:18 -07001542 .icache_bsize = 32,
1543 .dcache_bsize = 32,
1544 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001545 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001546 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001547 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001548 .platform = "ppc8548",
Kumar Gala5b37b702005-06-21 17:15:18 -07001549 },
Kumar Gala3dfa8772008-06-16 09:41:32 -05001550 { /* e500mc */
1551 .pvr_mask = 0xffff0000,
1552 .pvr_value = 0x80230000,
1553 .cpu_name = "e500mc",
Kumar Gala3dfa8772008-06-16 09:41:32 -05001554 .cpu_features = CPU_FTRS_E500MC,
1555 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1556 .icache_bsize = 64,
1557 .dcache_bsize = 64,
1558 .num_pmcs = 4,
1559 .oprofile_cpu_type = "ppc/e500", /* xxx - galak, e500mc? */
1560 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1561 .machine_check = machine_check_e500,
1562 .platform = "ppce500mc",
1563 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001564 { /* default match */
1565 .pvr_mask = 0x00000000,
1566 .pvr_value = 0x00000000,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001567 .cpu_name = "(generic E500 PPC)",
1568 .cpu_features = CPU_FTRS_E500,
1569 .cpu_user_features = COMMON_USER_BOOKE |
1570 PPC_FEATURE_HAS_SPE_COMP |
1571 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001572 .icache_bsize = 32,
1573 .dcache_bsize = 32,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001574 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001575 .platform = "powerpc",
Paul Mackerras516c8be2008-05-12 14:20:35 +10001576 }
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001577#endif /* CONFIG_E500 */
Stephen Rothwell49209602005-10-12 15:55:09 +10001578#endif /* CONFIG_PPC32 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001579};
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001580
Paul Mackerras87a72f92007-10-04 14:18:01 +10001581static struct cpu_spec the_cpu_spec;
1582
1583struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001584{
1585 struct cpu_spec *s = cpu_specs;
Paul Mackerras87a72f92007-10-04 14:18:01 +10001586 struct cpu_spec *t = &the_cpu_spec;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001587 int i;
1588
1589 s = PTRRELOC(s);
Paul Mackerras87a72f92007-10-04 14:18:01 +10001590 t = PTRRELOC(t);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001591
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001592 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
1593 if ((pvr & s->pvr_mask) == s->pvr_value) {
Paul Mackerras87a72f92007-10-04 14:18:01 +10001594 /*
1595 * If we are overriding a previous value derived
1596 * from the real PVR with a new value obtained
1597 * using a logical PVR value, don't modify the
1598 * performance monitor fields.
1599 */
1600 if (t->num_pmcs && !s->num_pmcs) {
1601 t->cpu_name = s->cpu_name;
1602 t->cpu_features = s->cpu_features;
1603 t->cpu_user_features = s->cpu_user_features;
1604 t->icache_bsize = s->icache_bsize;
1605 t->dcache_bsize = s->dcache_bsize;
1606 t->cpu_setup = s->cpu_setup;
1607 t->cpu_restore = s->cpu_restore;
1608 t->platform = s->platform;
1609 } else
1610 *t = *s;
1611 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001612#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
Stefan Roese464076a2008-02-24 08:07:41 +11001613 /* ppc64 and booke expect identify_cpu to also call
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001614 * setup_cpu for that processor. I will consolidate
1615 * that at a later time, for now, just use #ifdef.
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001616 * we also don't need to PTRRELOC the function pointer
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001617 * on ppc64 and booke as we are running at 0 in real
1618 * mode on ppc64 and reloc_offset is always 0 on booke.
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001619 */
1620 if (s->cpu_setup) {
1621 s->cpu_setup(offset, s);
1622 }
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001623#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001624 return s;
1625 }
1626 BUG();
1627 return NULL;
1628}
1629
Benjamin Herrenschmidt0909c8c2006-10-20 11:47:18 +10001630void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001631{
1632 struct fixup_entry {
1633 unsigned long mask;
1634 unsigned long value;
Benjamin Herrenschmidt0909c8c2006-10-20 11:47:18 +10001635 long start_off;
1636 long end_off;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001637 } *fcur, *fend;
1638
1639 fcur = fixup_start;
1640 fend = fixup_end;
1641
1642 for (; fcur < fend; fcur++) {
1643 unsigned int *pstart, *pend, *p;
1644
1645 if ((value & fcur->mask) == fcur->value)
1646 continue;
1647
1648 /* These PTRRELOCs will disappear once the new scheme for
1649 * modules and vdso is implemented
1650 */
Benjamin Herrenschmidt0909c8c2006-10-20 11:47:18 +10001651 pstart = ((unsigned int *)fcur) + (fcur->start_off / 4);
1652 pend = ((unsigned int *)fcur) + (fcur->end_off / 4);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001653
1654 for (p = pstart; p < pend; p++) {
1655 *p = 0x60000000u;
1656 asm volatile ("dcbst 0, %0" : : "r" (p));
1657 }
1658 asm volatile ("sync" : : : "memory");
1659 for (p = pstart; p < pend; p++)
1660 asm volatile ("icbi 0,%0" : : "r" (p));
1661 asm volatile ("sync; isync" : : : "memory");
1662 }
1663}