blob: aa421f5651c8275047c5d5a84b72cf2e798f849b [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);
Kumar Gala400d2212005-09-27 15:13:12 -050040extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
41extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
42extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
43extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
44extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
45extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
46extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
47extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell49209602005-10-12 15:55:09 +100048#endif /* CONFIG_PPC32 */
Olof Johanssonf39b7a52006-08-11 00:07:08 -050049#ifdef CONFIG_PPC64
Kumar Gala400d2212005-09-27 15:13:12 -050050extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
Olof Johansson5b43d202006-10-04 23:41:41 -050051extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
Olof Johansson11999192007-02-04 16:36:51 -060052extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell40d244d2007-02-12 22:10:48 +110053extern void __restore_cpu_pa6t(void);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050054extern void __restore_cpu_ppc970(void);
55#endif /* CONFIG_PPC64 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070056
Linus Torvalds1da177e2005-04-16 15:20:36 -070057/* This table only contains "desktop" CPUs, it need to be filled with embedded
58 * ones as well...
59 */
Stephen Rothwell49209602005-10-12 15:55:09 +100060#define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
61 PPC_FEATURE_HAS_MMU)
62#define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +110063#define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +110064#define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
65 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
66#define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
67 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
Anton Blanchard03054d52006-04-29 09:51:06 +100068#define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
Paul Mackerrasfab5db92006-06-07 16:14:40 +100069 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
70 PPC_FEATURE_TRUE_LE)
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -050071#define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
72 PPC_FEATURE_TRUE_LE | \
73 PPC_FEATURE_HAS_ALTIVEC_COMP)
Paul Mackerras80f15dc2006-01-14 10:11:39 +110074#define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
75 PPC_FEATURE_BOOKE)
Linus Torvalds1da177e2005-04-16 15:20:36 -070076
Paul Mackerras87a72f92007-10-04 14:18:01 +100077static struct cpu_spec __initdata cpu_specs[] = {
Stephen Rothwell49209602005-10-12 15:55:09 +100078#ifdef CONFIG_PPC64
79 { /* Power3 */
80 .pvr_mask = 0xffff0000,
81 .pvr_value = 0x00400000,
82 .cpu_name = "POWER3 (630)",
83 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +100084 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +100085 .icache_bsize = 128,
86 .dcache_bsize = 128,
87 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -060088 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +100089 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +000090 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110091 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +110092 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +100093 },
94 { /* Power3+ */
95 .pvr_mask = 0xffff0000,
96 .pvr_value = 0x00410000,
97 .cpu_name = "POWER3 (630+)",
98 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +100099 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000100 .icache_bsize = 128,
101 .dcache_bsize = 128,
102 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600103 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000104 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000105 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100106 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100107 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +1000108 },
109 { /* Northstar */
110 .pvr_mask = 0xffff0000,
111 .pvr_value = 0x00330000,
112 .cpu_name = "RS64-II (northstar)",
113 .cpu_features = CPU_FTRS_RS64,
114 .cpu_user_features = COMMON_USER_PPC64,
115 .icache_bsize = 128,
116 .dcache_bsize = 128,
117 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600118 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000119 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000120 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100121 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100122 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000123 },
124 { /* Pulsar */
125 .pvr_mask = 0xffff0000,
126 .pvr_value = 0x00340000,
127 .cpu_name = "RS64-III (pulsar)",
128 .cpu_features = CPU_FTRS_RS64,
129 .cpu_user_features = COMMON_USER_PPC64,
130 .icache_bsize = 128,
131 .dcache_bsize = 128,
132 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600133 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000134 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000135 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100136 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100137 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000138 },
139 { /* I-star */
140 .pvr_mask = 0xffff0000,
141 .pvr_value = 0x00360000,
142 .cpu_name = "RS64-III (icestar)",
143 .cpu_features = CPU_FTRS_RS64,
144 .cpu_user_features = COMMON_USER_PPC64,
145 .icache_bsize = 128,
146 .dcache_bsize = 128,
147 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600148 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000149 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000150 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100151 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100152 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000153 },
154 { /* S-star */
155 .pvr_mask = 0xffff0000,
156 .pvr_value = 0x00370000,
157 .cpu_name = "RS64-IV (sstar)",
158 .cpu_features = CPU_FTRS_RS64,
159 .cpu_user_features = COMMON_USER_PPC64,
160 .icache_bsize = 128,
161 .dcache_bsize = 128,
162 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600163 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000164 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000165 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100166 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100167 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000168 },
169 { /* Power4 */
170 .pvr_mask = 0xffff0000,
171 .pvr_value = 0x00350000,
172 .cpu_name = "POWER4 (gp)",
173 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100174 .cpu_user_features = COMMON_USER_POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000175 .icache_bsize = 128,
176 .dcache_bsize = 128,
177 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600178 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000179 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000180 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100181 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100182 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000183 },
184 { /* Power4+ */
185 .pvr_mask = 0xffff0000,
186 .pvr_value = 0x00380000,
187 .cpu_name = "POWER4+ (gq)",
188 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100189 .cpu_user_features = COMMON_USER_POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000190 .icache_bsize = 128,
191 .dcache_bsize = 128,
192 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600193 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000194 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000195 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100196 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100197 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000198 },
199 { /* PPC970 */
200 .pvr_mask = 0xffff0000,
201 .pvr_value = 0x00390000,
202 .cpu_name = "PPC970",
203 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100204 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000205 PPC_FEATURE_HAS_ALTIVEC_COMP,
206 .icache_bsize = 128,
207 .dcache_bsize = 128,
208 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600209 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000210 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500211 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000212 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000213 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100214 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100215 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000216 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000217 { /* PPC970FX */
218 .pvr_mask = 0xffff0000,
219 .pvr_value = 0x003c0000,
220 .cpu_name = "PPC970FX",
Stephen Rothwell49209602005-10-12 15:55:09 +1000221 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100222 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000223 PPC_FEATURE_HAS_ALTIVEC_COMP,
224 .icache_bsize = 128,
225 .dcache_bsize = 128,
226 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600227 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000228 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500229 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000230 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000231 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100232 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100233 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000234 },
Olof Johansson3546e812007-02-26 00:35:14 -0600235 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
236 .pvr_mask = 0xffffffff,
237 .pvr_value = 0x00440100,
238 .cpu_name = "PPC970MP",
239 .cpu_features = CPU_FTRS_PPC970,
240 .cpu_user_features = COMMON_USER_POWER4 |
241 PPC_FEATURE_HAS_ALTIVEC_COMP,
242 .icache_bsize = 128,
243 .dcache_bsize = 128,
244 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000245 .pmc_type = PPC_PMC_IBM,
Olof Johansson3546e812007-02-26 00:35:14 -0600246 .cpu_setup = __setup_cpu_ppc970,
247 .cpu_restore = __restore_cpu_ppc970,
248 .oprofile_cpu_type = "ppc64/970MP",
249 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100250 .machine_check = machine_check_generic,
Olof Johansson3546e812007-02-26 00:35:14 -0600251 .platform = "ppc970",
252 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000253 { /* PPC970MP */
254 .pvr_mask = 0xffff0000,
255 .pvr_value = 0x00440000,
256 .cpu_name = "PPC970MP",
257 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100258 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000259 PPC_FEATURE_HAS_ALTIVEC_COMP,
260 .icache_bsize = 128,
261 .dcache_bsize = 128,
Anton Blanchard87af41b2006-05-05 05:44:26 +1000262 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000263 .pmc_type = PPC_PMC_IBM,
Olof Johansson5b43d202006-10-04 23:41:41 -0500264 .cpu_setup = __setup_cpu_ppc970MP,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500265 .cpu_restore = __restore_cpu_ppc970,
Mike Wolffecb3522006-11-21 14:41:54 -0600266 .oprofile_cpu_type = "ppc64/970MP",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000267 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100268 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100269 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000270 },
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500271 { /* PPC970GX */
272 .pvr_mask = 0xffff0000,
273 .pvr_value = 0x00450000,
274 .cpu_name = "PPC970GX",
275 .cpu_features = CPU_FTRS_PPC970,
276 .cpu_user_features = COMMON_USER_POWER4 |
277 PPC_FEATURE_HAS_ALTIVEC_COMP,
278 .icache_bsize = 128,
279 .dcache_bsize = 128,
280 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600281 .pmc_type = PPC_PMC_IBM,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500282 .cpu_setup = __setup_cpu_ppc970,
283 .oprofile_cpu_type = "ppc64/970",
284 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100285 .machine_check = machine_check_generic,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500286 .platform = "ppc970",
287 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100288 { /* Power5 GR */
Stephen Rothwell49209602005-10-12 15:55:09 +1000289 .pvr_mask = 0xffff0000,
290 .pvr_value = 0x003a0000,
291 .cpu_name = "POWER5 (gr)",
292 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100293 .cpu_user_features = COMMON_USER_POWER5,
Stephen Rothwell49209602005-10-12 15:55:09 +1000294 .icache_bsize = 128,
295 .dcache_bsize = 128,
296 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600297 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000298 .oprofile_cpu_type = "ppc64/power5",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000299 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000300 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
301 * and above but only works on POWER5 and above
302 */
303 .oprofile_mmcra_sihv = MMCRA_SIHV,
304 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100305 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100306 .platform = "power5",
Stephen Rothwell49209602005-10-12 15:55:09 +1000307 },
Mike Wolf31a12ce2007-07-10 13:13:47 -0500308 { /* Power5++ */
309 .pvr_mask = 0xffffff00,
310 .pvr_value = 0x003b0300,
311 .cpu_name = "POWER5+ (gs)",
312 .cpu_features = CPU_FTRS_POWER5,
313 .cpu_user_features = COMMON_USER_POWER5_PLUS,
314 .icache_bsize = 128,
315 .dcache_bsize = 128,
316 .num_pmcs = 6,
317 .oprofile_cpu_type = "ppc64/power5++",
318 .oprofile_type = PPC_OPROFILE_POWER4,
319 .oprofile_mmcra_sihv = MMCRA_SIHV,
320 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100321 .machine_check = machine_check_generic,
Mike Wolf31a12ce2007-07-10 13:13:47 -0500322 .platform = "power5+",
323 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100324 { /* Power5 GS */
Stephen Rothwell49209602005-10-12 15:55:09 +1000325 .pvr_mask = 0xffff0000,
326 .pvr_value = 0x003b0000,
Anton Blanchard834608f2006-01-09 15:42:30 +1100327 .cpu_name = "POWER5+ (gs)",
Stephen Rothwell49209602005-10-12 15:55:09 +1000328 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100329 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Stephen Rothwell49209602005-10-12 15:55:09 +1000330 .icache_bsize = 128,
331 .dcache_bsize = 128,
332 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600333 .pmc_type = PPC_PMC_IBM,
Anton Blanchard834608f2006-01-09 15:42:30 +1100334 .oprofile_cpu_type = "ppc64/power5+",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000335 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000336 .oprofile_mmcra_sihv = MMCRA_SIHV,
337 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100338 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100339 .platform = "power5+",
Stephen Rothwell49209602005-10-12 15:55:09 +1000340 },
Paul Mackerras974a76f2006-11-10 20:38:53 +1100341 { /* POWER6 in P5+ mode; 2.04-compliant processor */
342 .pvr_mask = 0xffffffff,
343 .pvr_value = 0x0f000001,
344 .cpu_name = "POWER5+",
345 .cpu_features = CPU_FTRS_POWER5,
346 .cpu_user_features = COMMON_USER_POWER5_PLUS,
347 .icache_bsize = 128,
348 .dcache_bsize = 128,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100349 .machine_check = machine_check_generic,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100350 .platform = "power5+",
351 },
Anton Blanchard03054d52006-04-29 09:51:06 +1000352 { /* Power6 */
353 .pvr_mask = 0xffff0000,
354 .pvr_value = 0x003e0000,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100355 .cpu_name = "POWER6 (raw)",
356 .cpu_features = CPU_FTRS_POWER6,
357 .cpu_user_features = COMMON_USER_POWER6 |
358 PPC_FEATURE_POWER6_EXT,
359 .icache_bsize = 128,
360 .dcache_bsize = 128,
361 .num_pmcs = 6,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000362 .pmc_type = PPC_PMC_IBM,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100363 .oprofile_cpu_type = "ppc64/power6",
364 .oprofile_type = PPC_OPROFILE_POWER4,
365 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
366 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
367 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
368 POWER6_MMCRA_OTHER,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100369 .machine_check = machine_check_generic,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100370 .platform = "power6x",
371 },
372 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
373 .pvr_mask = 0xffffffff,
374 .pvr_value = 0x0f000002,
375 .cpu_name = "POWER6 (architected)",
Anton Blanchard03054d52006-04-29 09:51:06 +1000376 .cpu_features = CPU_FTRS_POWER6,
377 .cpu_user_features = COMMON_USER_POWER6,
378 .icache_bsize = 128,
379 .dcache_bsize = 128,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100380 .machine_check = machine_check_generic,
Anton Blanchard03054d52006-04-29 09:51:06 +1000381 .platform = "power6",
382 },
Arnd Bergmannc902be72006-01-04 19:55:53 +0000383 { /* Cell Broadband Engine */
Stephen Rothwell49209602005-10-12 15:55:09 +1000384 .pvr_mask = 0xffff0000,
385 .pvr_value = 0x00700000,
386 .cpu_name = "Cell Broadband Engine",
387 .cpu_features = CPU_FTRS_CELL,
388 .cpu_user_features = COMMON_USER_PPC64 |
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +1100389 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
390 PPC_FEATURE_SMT,
Stephen Rothwell49209602005-10-12 15:55:09 +1000391 .icache_bsize = 128,
392 .dcache_bsize = 128,
Maynard Johnson18f21902006-11-20 18:45:16 +0100393 .num_pmcs = 4,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600394 .pmc_type = PPC_PMC_IBM,
Maynard Johnson18f21902006-11-20 18:45:16 +0100395 .oprofile_cpu_type = "ppc64/cell-be",
396 .oprofile_type = PPC_OPROFILE_CELL,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100397 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100398 .platform = "ppc-cell-be",
Stephen Rothwell49209602005-10-12 15:55:09 +1000399 },
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500400 { /* PA Semi PA6T */
401 .pvr_mask = 0x7fff0000,
402 .pvr_value = 0x00900000,
403 .cpu_name = "PA6T",
404 .cpu_features = CPU_FTRS_PA6T,
405 .cpu_user_features = COMMON_USER_PA6T,
406 .icache_bsize = 64,
407 .dcache_bsize = 64,
408 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600409 .pmc_type = PPC_PMC_PA6T,
Olof Johansson11999192007-02-04 16:36:51 -0600410 .cpu_setup = __setup_cpu_pa6t,
411 .cpu_restore = __restore_cpu_pa6t,
Olof Johansson25fc5302007-04-18 16:38:21 +1000412 .oprofile_cpu_type = "ppc64/pa6t",
413 .oprofile_type = PPC_OPROFILE_PA6T,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100414 .machine_check = machine_check_generic,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500415 .platform = "pa6t",
416 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000417 { /* default match */
418 .pvr_mask = 0x00000000,
419 .pvr_value = 0x00000000,
420 .cpu_name = "POWER4 (compatible)",
421 .cpu_features = CPU_FTRS_COMPATIBLE,
422 .cpu_user_features = COMMON_USER_PPC64,
423 .icache_bsize = 128,
424 .dcache_bsize = 128,
425 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600426 .pmc_type = PPC_PMC_IBM,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100427 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100428 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000429 }
430#endif /* CONFIG_PPC64 */
431#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -0700432#if CLASSIC_PPC
Stephen Rothwell49209602005-10-12 15:55:09 +1000433 { /* 601 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700434 .pvr_mask = 0xffff0000,
435 .pvr_value = 0x00010000,
436 .cpu_name = "601",
Kumar Gala10b35d92005-09-23 14:08:58 -0500437 .cpu_features = CPU_FTRS_PPC601,
Stephen Rothwell49209602005-10-12 15:55:09 +1000438 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
Paul Mackerras98599012005-10-22 16:51:34 +1000439 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700440 .icache_bsize = 32,
441 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100442 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100443 .platform = "ppc601",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700444 },
445 { /* 603 */
446 .pvr_mask = 0xffff0000,
447 .pvr_value = 0x00030000,
448 .cpu_name = "603",
Kumar Gala10b35d92005-09-23 14:08:58 -0500449 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000450 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700451 .icache_bsize = 32,
452 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100453 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100454 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100455 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700456 },
457 { /* 603e */
458 .pvr_mask = 0xffff0000,
459 .pvr_value = 0x00060000,
460 .cpu_name = "603e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500461 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000462 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700463 .icache_bsize = 32,
464 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100465 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100466 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100467 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700468 },
469 { /* 603ev */
470 .pvr_mask = 0xffff0000,
471 .pvr_value = 0x00070000,
472 .cpu_name = "603ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500473 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000474 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700475 .icache_bsize = 32,
476 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100477 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100478 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100479 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700480 },
481 { /* 604 */
482 .pvr_mask = 0xffff0000,
483 .pvr_value = 0x00040000,
484 .cpu_name = "604",
Kumar Gala10b35d92005-09-23 14:08:58 -0500485 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000486 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700487 .icache_bsize = 32,
488 .dcache_bsize = 32,
489 .num_pmcs = 2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100490 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100491 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100492 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700493 },
494 { /* 604e */
495 .pvr_mask = 0xfffff000,
496 .pvr_value = 0x00090000,
497 .cpu_name = "604e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500498 .cpu_features = CPU_FTRS_604,
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,
502 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100503 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100504 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100505 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700506 },
507 { /* 604r */
508 .pvr_mask = 0xffff0000,
509 .pvr_value = 0x00090000,
510 .cpu_name = "604r",
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 = 4,
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 { /* 604ev */
521 .pvr_mask = 0xffff0000,
522 .pvr_value = 0x000a0000,
523 .cpu_name = "604ev",
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 { /* 740/750 (0x4202, don't support TAU ?) */
534 .pvr_mask = 0xffffffff,
535 .pvr_value = 0x00084202,
536 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500537 .cpu_features = CPU_FTRS_740_NOTAU,
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_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100543 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100544 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700545 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700546 { /* 750CX (80100 and 8010x?) */
547 .pvr_mask = 0xfffffff0,
548 .pvr_value = 0x00080100,
549 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500550 .cpu_features = CPU_FTRS_750,
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_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100556 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100557 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700558 },
559 { /* 750CX (82201 and 82202) */
560 .pvr_mask = 0xfffffff0,
561 .pvr_value = 0x00082200,
562 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500563 .cpu_features = CPU_FTRS_750,
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_750cx,
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 },
572 { /* 750CXe (82214) */
573 .pvr_mask = 0xfffffff0,
574 .pvr_value = 0x00082210,
575 .cpu_name = "750CXe",
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 },
Arthur Othieno7c316252005-09-03 15:55:52 -0700585 { /* 750CXe "Gekko" (83214) */
586 .pvr_mask = 0xffffffff,
587 .pvr_value = 0x00083214,
588 .cpu_name = "750CXe",
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,
Arthur Othieno7c316252005-09-03 15:55:52 -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",
Arthur Othieno7c316252005-09-03 15:55:52 -0700597 },
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500598 { /* 750CL */
599 .pvr_mask = 0xfffff0f0,
600 .pvr_value = 0x00087010,
601 .cpu_name = "750CL",
Josh Boyera14c4502007-04-13 04:33:25 +1000602 .cpu_features = CPU_FTRS_750CL,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500603 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
604 .icache_bsize = 32,
605 .dcache_bsize = 32,
606 .num_pmcs = 4,
Josh Boyera14c4502007-04-13 04:33:25 +1000607 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100608 .machine_check = machine_check_generic,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500609 .platform = "ppc750",
610 },
Arthur Othienoac1ff042005-09-03 15:55:51 -0700611 { /* 745/755 */
612 .pvr_mask = 0xfffff000,
613 .pvr_value = 0x00083000,
614 .cpu_name = "745/755",
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 Othienoac1ff042005-09-03 15:55:51 -0700617 .icache_bsize = 32,
618 .dcache_bsize = 32,
619 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100620 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100621 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100622 .platform = "ppc750",
Arthur Othienoac1ff042005-09-03 15:55:51 -0700623 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700624 { /* 750FX rev 1.x */
625 .pvr_mask = 0xffffff00,
626 .pvr_value = 0x70000100,
627 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500628 .cpu_features = CPU_FTRS_750FX1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000629 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700630 .icache_bsize = 32,
631 .dcache_bsize = 32,
632 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100633 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100634 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100635 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700636 },
637 { /* 750FX rev 2.0 must disable HID0[DPM] */
638 .pvr_mask = 0xffffffff,
639 .pvr_value = 0x70000200,
640 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500641 .cpu_features = CPU_FTRS_750FX2,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000642 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -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",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700649 },
650 { /* 750FX (All revs except 2.0) */
651 .pvr_mask = 0xffff0000,
652 .pvr_value = 0x70000000,
653 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500654 .cpu_features = CPU_FTRS_750FX,
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_750fx,
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 { /* 750GX */
664 .pvr_mask = 0xffff0000,
665 .pvr_value = 0x70020000,
666 .cpu_name = "750GX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500667 .cpu_features = CPU_FTRS_750GX,
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_750fx,
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 { /* 740/750 (L2CR bit need fixup for 740) */
677 .pvr_mask = 0xffff0000,
678 .pvr_value = 0x00080000,
679 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500680 .cpu_features = CPU_FTRS_740,
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_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100686 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100687 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700688 },
689 { /* 7400 rev 1.1 ? (no TAU) */
690 .pvr_mask = 0xffffffff,
691 .pvr_value = 0x000c1101,
692 .cpu_name = "7400 (1.1)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500693 .cpu_features = CPU_FTRS_7400_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000694 .cpu_user_features = COMMON_USER |
695 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700696 .icache_bsize = 32,
697 .dcache_bsize = 32,
698 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100699 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100700 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100701 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700702 },
703 { /* 7400 */
704 .pvr_mask = 0xffff0000,
705 .pvr_value = 0x000c0000,
706 .cpu_name = "7400",
Kumar Gala10b35d92005-09-23 14:08:58 -0500707 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000708 .cpu_user_features = COMMON_USER |
709 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700710 .icache_bsize = 32,
711 .dcache_bsize = 32,
712 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100713 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100714 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100715 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700716 },
717 { /* 7410 */
718 .pvr_mask = 0xffff0000,
719 .pvr_value = 0x800c0000,
720 .cpu_name = "7410",
Kumar Gala10b35d92005-09-23 14:08:58 -0500721 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000722 .cpu_user_features = COMMON_USER |
723 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700724 .icache_bsize = 32,
725 .dcache_bsize = 32,
726 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100727 .cpu_setup = __setup_cpu_7410,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100728 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100729 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700730 },
731 { /* 7450 2.0 - no doze/nap */
732 .pvr_mask = 0xffffffff,
733 .pvr_value = 0x80000200,
734 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500735 .cpu_features = CPU_FTRS_7450_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000736 .cpu_user_features = COMMON_USER |
737 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700738 .icache_bsize = 32,
739 .dcache_bsize = 32,
740 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600741 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600742 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000743 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100744 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100745 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700746 },
747 { /* 7450 2.1 */
748 .pvr_mask = 0xffffffff,
749 .pvr_value = 0x80000201,
750 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500751 .cpu_features = CPU_FTRS_7450_21,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000752 .cpu_user_features = COMMON_USER |
753 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700754 .icache_bsize = 32,
755 .dcache_bsize = 32,
756 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600757 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600758 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000759 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100760 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100761 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700762 },
763 { /* 7450 2.3 and newer */
764 .pvr_mask = 0xffff0000,
765 .pvr_value = 0x80000000,
766 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500767 .cpu_features = CPU_FTRS_7450_23,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000768 .cpu_user_features = COMMON_USER |
769 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700770 .icache_bsize = 32,
771 .dcache_bsize = 32,
772 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600773 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600774 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000775 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100776 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100777 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700778 },
779 { /* 7455 rev 1.x */
780 .pvr_mask = 0xffffff00,
781 .pvr_value = 0x80010100,
782 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500783 .cpu_features = CPU_FTRS_7455_1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000784 .cpu_user_features = COMMON_USER |
785 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700786 .icache_bsize = 32,
787 .dcache_bsize = 32,
788 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600789 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600790 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000791 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100792 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100793 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700794 },
795 { /* 7455 rev 2.0 */
796 .pvr_mask = 0xffffffff,
797 .pvr_value = 0x80010200,
798 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500799 .cpu_features = CPU_FTRS_7455_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000800 .cpu_user_features = COMMON_USER |
801 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700802 .icache_bsize = 32,
803 .dcache_bsize = 32,
804 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600805 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600806 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000807 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100808 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100809 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700810 },
811 { /* 7455 others */
812 .pvr_mask = 0xffff0000,
813 .pvr_value = 0x80010000,
814 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500815 .cpu_features = CPU_FTRS_7455,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000816 .cpu_user_features = COMMON_USER |
817 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700818 .icache_bsize = 32,
819 .dcache_bsize = 32,
820 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600821 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600822 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000823 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100824 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100825 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700826 },
827 { /* 7447/7457 Rev 1.0 */
828 .pvr_mask = 0xffffffff,
829 .pvr_value = 0x80020100,
830 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500831 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000832 .cpu_user_features = COMMON_USER |
833 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700834 .icache_bsize = 32,
835 .dcache_bsize = 32,
836 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600837 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600838 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000839 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100840 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100841 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700842 },
843 { /* 7447/7457 Rev 1.1 */
844 .pvr_mask = 0xffffffff,
845 .pvr_value = 0x80020101,
846 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500847 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000848 .cpu_user_features = COMMON_USER |
849 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700850 .icache_bsize = 32,
851 .dcache_bsize = 32,
852 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600853 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600854 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000855 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100856 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100857 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700858 },
859 { /* 7447/7457 Rev 1.2 and later */
860 .pvr_mask = 0xffff0000,
861 .pvr_value = 0x80020000,
862 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500863 .cpu_features = CPU_FTRS_7447,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000864 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700865 .icache_bsize = 32,
866 .dcache_bsize = 32,
867 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600868 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600869 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000870 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100871 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100872 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700873 },
874 { /* 7447A */
875 .pvr_mask = 0xffff0000,
876 .pvr_value = 0x80030000,
877 .cpu_name = "7447A",
Kumar Gala10b35d92005-09-23 14:08:58 -0500878 .cpu_features = CPU_FTRS_7447A,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000879 .cpu_user_features = COMMON_USER |
880 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700881 .icache_bsize = 32,
882 .dcache_bsize = 32,
883 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600884 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600885 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000886 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100887 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100888 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700889 },
Kumar Galabbde6302005-09-03 15:55:55 -0700890 { /* 7448 */
891 .pvr_mask = 0xffff0000,
892 .pvr_value = 0x80040000,
893 .cpu_name = "7448",
James.Yang3d372542007-05-02 16:34:43 -0500894 .cpu_features = CPU_FTRS_7448,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000895 .cpu_user_features = COMMON_USER |
896 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Kumar Galabbde6302005-09-03 15:55:55 -0700897 .icache_bsize = 32,
898 .dcache_bsize = 32,
899 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600900 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600901 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000902 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100903 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100904 .platform = "ppc7450",
Kumar Galabbde6302005-09-03 15:55:55 -0700905 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700906 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
907 .pvr_mask = 0x7fff0000,
908 .pvr_value = 0x00810000,
909 .cpu_name = "82xx",
Kumar Gala10b35d92005-09-23 14:08:58 -0500910 .cpu_features = CPU_FTRS_82XX,
Stephen Rothwell49209602005-10-12 15:55:09 +1000911 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700912 .icache_bsize = 32,
913 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100914 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100915 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100916 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700917 },
918 { /* All G2_LE (603e core, plus some) have the same pvr */
919 .pvr_mask = 0x7fff0000,
920 .pvr_value = 0x00820000,
921 .cpu_name = "G2_LE",
Kumar Gala10b35d92005-09-23 14:08:58 -0500922 .cpu_features = CPU_FTRS_G2_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000923 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700924 .icache_bsize = 32,
925 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100926 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100927 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100928 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700929 },
Kim Phillips6c4a2502006-10-02 20:10:24 -0500930 { /* e300c1 (a 603e core, plus some) on 83xx */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700931 .pvr_mask = 0x7fff0000,
932 .pvr_value = 0x00830000,
Kim Phillips6c4a2502006-10-02 20:10:24 -0500933 .cpu_name = "e300c1",
Kumar Gala10b35d92005-09-23 14:08:58 -0500934 .cpu_features = CPU_FTRS_E300,
Stephen Rothwell49209602005-10-12 15:55:09 +1000935 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700936 .icache_bsize = 32,
937 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100938 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100939 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100940 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700941 },
Kim Phillips6c4a2502006-10-02 20:10:24 -0500942 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
943 .pvr_mask = 0x7fff0000,
944 .pvr_value = 0x00840000,
945 .cpu_name = "e300c2",
Kim Phillipsaa42c692006-12-08 02:43:30 -0600946 .cpu_features = CPU_FTRS_E300C2,
Kim Phillips6c4a2502006-10-02 20:10:24 -0500947 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
948 .icache_bsize = 32,
949 .dcache_bsize = 32,
950 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100951 .machine_check = machine_check_generic,
Kim Phillips6c4a2502006-10-02 20:10:24 -0500952 .platform = "ppc603",
953 },
Li Yanga58d5242007-10-19 19:38:42 +0800954 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
Scott Wood57933f82006-12-01 12:57:05 -0600955 .pvr_mask = 0x7fff0000,
956 .pvr_value = 0x00850000,
957 .cpu_name = "e300c3",
958 .cpu_features = CPU_FTRS_E300,
959 .cpu_user_features = COMMON_USER,
960 .icache_bsize = 32,
961 .dcache_bsize = 32,
962 .cpu_setup = __setup_cpu_603,
Andy Fleming1347a2c12008-02-04 18:28:07 -0600963 .num_pmcs = 4,
964 .oprofile_cpu_type = "ppc/e300",
965 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Scott Wood57933f82006-12-01 12:57:05 -0600966 .platform = "ppc603",
967 },
Li Yanga58d5242007-10-19 19:38:42 +0800968 { /* e300c4 (e300c1, plus one IU) */
969 .pvr_mask = 0x7fff0000,
970 .pvr_value = 0x00860000,
971 .cpu_name = "e300c4",
972 .cpu_features = CPU_FTRS_E300,
973 .cpu_user_features = COMMON_USER,
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,
Andy Fleming1347a2c12008-02-04 18:28:07 -0600978 .num_pmcs = 4,
979 .oprofile_cpu_type = "ppc/e300",
980 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Li Yanga58d5242007-10-19 19:38:42 +0800981 .platform = "ppc603",
982 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700983 { /* default match, we assume split I/D cache & TB (non-601)... */
984 .pvr_mask = 0x00000000,
985 .pvr_value = 0x00000000,
986 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500987 .cpu_features = CPU_FTRS_CLASSIC32,
Stephen Rothwell49209602005-10-12 15:55:09 +1000988 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700989 .icache_bsize = 32,
990 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100991 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100992 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700993 },
994#endif /* CLASSIC_PPC */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700995#ifdef CONFIG_8xx
996 { /* 8xx */
997 .pvr_mask = 0xffff0000,
998 .pvr_value = 0x00500000,
999 .cpu_name = "8xx",
1000 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1001 * if the 8xx code is there.... */
Kumar Gala10b35d92005-09-23 14:08:58 -05001002 .cpu_features = CPU_FTRS_8XX,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001003 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1004 .icache_bsize = 16,
1005 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001006 .platform = "ppc823",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001007 },
1008#endif /* CONFIG_8xx */
1009#ifdef CONFIG_40x
1010 { /* 403GC */
1011 .pvr_mask = 0xffffff00,
1012 .pvr_value = 0x00200200,
1013 .cpu_name = "403GC",
Kumar Gala10b35d92005-09-23 14:08:58 -05001014 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001015 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1016 .icache_bsize = 16,
1017 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001018 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001019 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001020 },
1021 { /* 403GCX */
1022 .pvr_mask = 0xffffff00,
1023 .pvr_value = 0x00201400,
1024 .cpu_name = "403GCX",
Kumar Gala10b35d92005-09-23 14:08:58 -05001025 .cpu_features = CPU_FTRS_40X,
Paul Mackerras98599012005-10-22 16:51:34 +10001026 .cpu_user_features = PPC_FEATURE_32 |
1027 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001028 .icache_bsize = 16,
1029 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001030 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001031 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001032 },
1033 { /* 403G ?? */
1034 .pvr_mask = 0xffff0000,
1035 .pvr_value = 0x00200000,
1036 .cpu_name = "403G ??",
Kumar Gala10b35d92005-09-23 14:08:58 -05001037 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001038 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1039 .icache_bsize = 16,
1040 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001041 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001042 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001043 },
1044 { /* 405GP */
1045 .pvr_mask = 0xffff0000,
1046 .pvr_value = 0x40110000,
1047 .cpu_name = "405GP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001048 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001049 .cpu_user_features = PPC_FEATURE_32 |
1050 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1051 .icache_bsize = 32,
1052 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001053 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001054 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001055 },
1056 { /* STB 03xxx */
1057 .pvr_mask = 0xffff0000,
1058 .pvr_value = 0x40130000,
1059 .cpu_name = "STB03xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001060 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001061 .cpu_user_features = PPC_FEATURE_32 |
1062 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1063 .icache_bsize = 32,
1064 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001065 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001066 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001067 },
1068 { /* STB 04xxx */
1069 .pvr_mask = 0xffff0000,
1070 .pvr_value = 0x41810000,
1071 .cpu_name = "STB04xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001072 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001073 .cpu_user_features = PPC_FEATURE_32 |
1074 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1075 .icache_bsize = 32,
1076 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001077 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001078 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001079 },
1080 { /* NP405L */
1081 .pvr_mask = 0xffff0000,
1082 .pvr_value = 0x41610000,
1083 .cpu_name = "NP405L",
Kumar Gala10b35d92005-09-23 14:08:58 -05001084 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001085 .cpu_user_features = PPC_FEATURE_32 |
1086 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1087 .icache_bsize = 32,
1088 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001089 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001090 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001091 },
1092 { /* NP4GS3 */
1093 .pvr_mask = 0xffff0000,
1094 .pvr_value = 0x40B10000,
1095 .cpu_name = "NP4GS3",
Kumar Gala10b35d92005-09-23 14:08:58 -05001096 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001097 .cpu_user_features = PPC_FEATURE_32 |
1098 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1099 .icache_bsize = 32,
1100 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001101 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001102 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001103 },
1104 { /* NP405H */
1105 .pvr_mask = 0xffff0000,
1106 .pvr_value = 0x41410000,
1107 .cpu_name = "NP405H",
Kumar Gala10b35d92005-09-23 14:08:58 -05001108 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001109 .cpu_user_features = PPC_FEATURE_32 |
1110 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1111 .icache_bsize = 32,
1112 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001113 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001114 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001115 },
1116 { /* 405GPr */
1117 .pvr_mask = 0xffff0000,
1118 .pvr_value = 0x50910000,
1119 .cpu_name = "405GPr",
Kumar Gala10b35d92005-09-23 14:08:58 -05001120 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001121 .cpu_user_features = PPC_FEATURE_32 |
1122 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1123 .icache_bsize = 32,
1124 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001125 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001126 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001127 },
1128 { /* STBx25xx */
1129 .pvr_mask = 0xffff0000,
1130 .pvr_value = 0x51510000,
1131 .cpu_name = "STBx25xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001132 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001133 .cpu_user_features = PPC_FEATURE_32 |
1134 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1135 .icache_bsize = 32,
1136 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001137 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001138 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001139 },
1140 { /* 405LP */
1141 .pvr_mask = 0xffff0000,
1142 .pvr_value = 0x41F10000,
1143 .cpu_name = "405LP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001144 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001145 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1146 .icache_bsize = 32,
1147 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001148 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001149 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001150 },
1151 { /* Xilinx Virtex-II Pro */
Grant C. Likely72646c72006-01-19 01:13:20 -07001152 .pvr_mask = 0xfffff000,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001153 .pvr_value = 0x20010000,
1154 .cpu_name = "Virtex-II Pro",
Kumar Gala10b35d92005-09-23 14:08:58 -05001155 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001156 .cpu_user_features = PPC_FEATURE_32 |
1157 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1158 .icache_bsize = 32,
1159 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001160 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001161 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001162 },
Grant C. Likely72646c72006-01-19 01:13:20 -07001163 { /* Xilinx Virtex-4 FX */
1164 .pvr_mask = 0xfffff000,
1165 .pvr_value = 0x20011000,
1166 .cpu_name = "Virtex-4 FX",
1167 .cpu_features = CPU_FTRS_40X,
1168 .cpu_user_features = PPC_FEATURE_32 |
1169 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1170 .icache_bsize = 32,
1171 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001172 .machine_check = machine_check_4xx,
Peter Bergner838fdb42006-09-14 14:18:38 -05001173 .platform = "ppc405",
Grant C. Likely72646c72006-01-19 01:13:20 -07001174 },
Eugene Suroveginad95d602005-06-07 13:22:09 -07001175 { /* 405EP */
1176 .pvr_mask = 0xffff0000,
1177 .pvr_value = 0x51210000,
1178 .cpu_name = "405EP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001179 .cpu_features = CPU_FTRS_40X,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001180 .cpu_user_features = PPC_FEATURE_32 |
1181 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1182 .icache_bsize = 32,
1183 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001184 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001185 .platform = "ppc405",
Eugene Suroveginad95d602005-06-07 13:22:09 -07001186 },
Stefan Roese5d8476c2007-10-11 22:08:14 +10001187 { /* 405EX */
Stefan Roeseb676d842008-01-15 18:09:15 +11001188 .pvr_mask = 0xffff0004,
1189 .pvr_value = 0x12910004,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001190 .cpu_name = "405EX",
1191 .cpu_features = CPU_FTRS_40X,
1192 .cpu_user_features = PPC_FEATURE_32 |
1193 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1194 .icache_bsize = 32,
1195 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001196 .machine_check = machine_check_4xx,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001197 .platform = "ppc405",
1198 },
Stefan Roeseb676d842008-01-15 18:09:15 +11001199 { /* 405EXr */
1200 .pvr_mask = 0xffff0004,
1201 .pvr_value = 0x12910000,
1202 .cpu_name = "405EXr",
1203 .cpu_features = CPU_FTRS_40X,
1204 .cpu_user_features = PPC_FEATURE_32 |
1205 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1206 .icache_bsize = 32,
1207 .dcache_bsize = 32,
1208 .machine_check = machine_check_4xx,
1209 .platform = "ppc405",
1210 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001211 { /* default match */
1212 .pvr_mask = 0x00000000,
1213 .pvr_value = 0x00000000,
1214 .cpu_name = "(generic 40x PPC)",
1215 .cpu_features = CPU_FTRS_40X,
1216 .cpu_user_features = PPC_FEATURE_32 |
1217 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1218 .icache_bsize = 32,
1219 .dcache_bsize = 32,
1220 .machine_check = machine_check_4xx,
1221 .platform = "ppc405",
1222 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001223
1224#endif /* CONFIG_40x */
1225#ifdef CONFIG_44x
Matt Porterc9cf73a2005-07-31 22:34:52 -07001226 {
1227 .pvr_mask = 0xf0000fff,
1228 .pvr_value = 0x40000850,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001229 .cpu_name = "440GR Rev. A",
1230 .cpu_features = CPU_FTRS_44X,
1231 .cpu_user_features = COMMON_USER_BOOKE,
1232 .icache_bsize = 32,
1233 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001234 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001235 .platform = "ppc440",
1236 },
1237 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1238 .pvr_mask = 0xf0000fff,
1239 .pvr_value = 0x40000858,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001240 .cpu_name = "440EP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001241 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001242 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001243 .icache_bsize = 32,
1244 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001245 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001246 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001247 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001248 },
1249 {
1250 .pvr_mask = 0xf0000fff,
1251 .pvr_value = 0x400008d3,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001252 .cpu_name = "440GR Rev. B",
1253 .cpu_features = CPU_FTRS_44X,
1254 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1255 .icache_bsize = 32,
1256 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001257 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001258 .platform = "ppc440",
1259 },
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001260 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1261 .pvr_mask = 0xf0000ff7,
1262 .pvr_value = 0x400008d4,
1263 .cpu_name = "440EP Rev. C",
1264 .cpu_features = CPU_FTRS_44X,
1265 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1266 .icache_bsize = 32,
1267 .dcache_bsize = 32,
1268 .cpu_setup = __setup_cpu_440ep,
1269 .machine_check = machine_check_4xx,
1270 .platform = "ppc440",
1271 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001272 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1273 .pvr_mask = 0xf0000fff,
1274 .pvr_value = 0x400008db,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001275 .cpu_name = "440EP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001276 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001277 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001278 .icache_bsize = 32,
1279 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001280 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001281 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001282 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001283 },
Valentine Barshak15fc9932007-08-29 17:40:30 +04001284 { /* 440GRX */
1285 .pvr_mask = 0xf0000ffb,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001286 .pvr_value = 0x200008D0,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001287 .cpu_name = "440GRX",
1288 .cpu_features = CPU_FTRS_44X,
1289 .cpu_user_features = COMMON_USER_BOOKE,
1290 .icache_bsize = 32,
1291 .dcache_bsize = 32,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001292 .cpu_setup = __setup_cpu_440grx,
Valentine Barshakb2be3b12007-12-22 03:22:23 +11001293 .machine_check = machine_check_440A,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001294 .platform = "ppc440",
Valentine Barshak15fc9932007-08-29 17:40:30 +04001295 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001296 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1297 .pvr_mask = 0xf0000ffb,
1298 .pvr_value = 0x200008D8,
1299 .cpu_name = "440EPX",
1300 .cpu_features = CPU_FTRS_44X,
1301 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1302 .icache_bsize = 32,
1303 .dcache_bsize = 32,
1304 .cpu_setup = __setup_cpu_440epx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001305 .machine_check = machine_check_440A,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001306 .platform = "ppc440",
1307 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001308 { /* 440GP Rev. B */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001309 .pvr_mask = 0xf0000fff,
1310 .pvr_value = 0x40000440,
1311 .cpu_name = "440GP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001312 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001313 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001314 .icache_bsize = 32,
1315 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001316 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001317 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001318 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001319 { /* 440GP Rev. C */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001320 .pvr_mask = 0xf0000fff,
1321 .pvr_value = 0x40000481,
1322 .cpu_name = "440GP Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001323 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001324 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001325 .icache_bsize = 32,
1326 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001327 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001328 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001329 },
1330 { /* 440GX Rev. A */
1331 .pvr_mask = 0xf0000fff,
1332 .pvr_value = 0x50000850,
1333 .cpu_name = "440GX Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001334 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001335 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001336 .icache_bsize = 32,
1337 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001338 .cpu_setup = __setup_cpu_440gx,
1339 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001340 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001341 },
1342 { /* 440GX Rev. B */
1343 .pvr_mask = 0xf0000fff,
1344 .pvr_value = 0x50000851,
1345 .cpu_name = "440GX Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001346 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001347 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001348 .icache_bsize = 32,
1349 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001350 .cpu_setup = __setup_cpu_440gx,
1351 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001352 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001353 },
1354 { /* 440GX Rev. C */
1355 .pvr_mask = 0xf0000fff,
1356 .pvr_value = 0x50000892,
1357 .cpu_name = "440GX Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001358 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001359 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001360 .icache_bsize = 32,
1361 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001362 .cpu_setup = __setup_cpu_440gx,
1363 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001364 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001365 },
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001366 { /* 440GX Rev. F */
1367 .pvr_mask = 0xf0000fff,
1368 .pvr_value = 0x50000894,
1369 .cpu_name = "440GX Rev. F",
Kumar Gala10b35d92005-09-23 14:08:58 -05001370 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001371 .cpu_user_features = COMMON_USER_BOOKE,
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001372 .icache_bsize = 32,
1373 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001374 .cpu_setup = __setup_cpu_440gx,
1375 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001376 .platform = "ppc440",
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001377 },
Matt Porter656de7e2005-09-03 15:55:42 -07001378 { /* 440SP Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001379 .pvr_mask = 0xfff00fff,
1380 .pvr_value = 0x53200891,
Matt Porter656de7e2005-09-03 15:55:42 -07001381 .cpu_name = "440SP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001382 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001383 .cpu_user_features = COMMON_USER_BOOKE,
Matt Porter656de7e2005-09-03 15:55:42 -07001384 .icache_bsize = 32,
1385 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001386 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001387 .platform = "ppc440",
Matt Porter656de7e2005-09-03 15:55:42 -07001388 },
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001389 { /* 440SPe Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001390 .pvr_mask = 0xfff00fff,
1391 .pvr_value = 0x53400890,
1392 .cpu_name = "440SPe Rev. A",
1393 .cpu_features = CPU_FTRS_44X,
1394 .cpu_user_features = COMMON_USER_BOOKE,
1395 .icache_bsize = 32,
1396 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001397 .cpu_setup = __setup_cpu_440spe,
1398 .machine_check = machine_check_440A,
Roland Dreier333e6152007-06-16 05:36:32 +10001399 .platform = "ppc440",
1400 },
1401 { /* 440SPe Rev. B */
1402 .pvr_mask = 0xfff00fff,
1403 .pvr_value = 0x53400891,
1404 .cpu_name = "440SPe Rev. B",
Kumar Galaa147c582006-12-08 02:34:38 -06001405 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001406 .cpu_user_features = COMMON_USER_BOOKE,
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001407 .icache_bsize = 32,
1408 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001409 .cpu_setup = __setup_cpu_440spe,
1410 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001411 .platform = "ppc440",
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001412 },
Stefan Roese464076a2008-02-24 08:07:41 +11001413 { /* 460EX */
1414 .pvr_mask = 0xffff0002,
1415 .pvr_value = 0x13020002,
1416 .cpu_name = "460EX",
1417 .cpu_features = CPU_FTRS_44X,
1418 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1419 .icache_bsize = 32,
1420 .dcache_bsize = 32,
1421 .cpu_setup = __setup_cpu_460ex,
1422 .machine_check = machine_check_440A,
1423 .platform = "ppc440",
1424 },
1425 { /* 460GT */
1426 .pvr_mask = 0xffff0002,
1427 .pvr_value = 0x13020000,
1428 .cpu_name = "460GT",
1429 .cpu_features = CPU_FTRS_44X,
Stefan Roeseacb01422008-04-19 19:57:33 +10001430 .cpu_user_features = COMMON_USER_BOOKE,
Stefan Roese464076a2008-02-24 08:07:41 +11001431 .icache_bsize = 32,
1432 .dcache_bsize = 32,
Stefan Roese464076a2008-02-24 08:07:41 +11001433 .machine_check = machine_check_440A,
1434 .platform = "ppc440",
1435 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001436 { /* default match */
1437 .pvr_mask = 0x00000000,
1438 .pvr_value = 0x00000000,
1439 .cpu_name = "(generic 44x PPC)",
1440 .cpu_features = CPU_FTRS_44X,
1441 .cpu_user_features = COMMON_USER_BOOKE,
1442 .icache_bsize = 32,
1443 .dcache_bsize = 32,
1444 .machine_check = machine_check_4xx,
1445 .platform = "ppc440",
1446 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001447#endif /* CONFIG_44x */
Josh Boyere3e414b2007-12-24 08:44:47 -06001448#ifdef CONFIG_E200
Stephen Rothwell49209602005-10-12 15:55:09 +10001449 { /* e200z5 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001450 .pvr_mask = 0xfff00000,
1451 .pvr_value = 0x81000000,
1452 .cpu_name = "e200z5",
1453 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001454 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001455 .cpu_user_features = COMMON_USER_BOOKE |
1456 PPC_FEATURE_HAS_EFP_SINGLE |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001457 PPC_FEATURE_UNIFIED_CACHE,
1458 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001459 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001460 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001461 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001462 { /* e200z6 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001463 .pvr_mask = 0xfff00000,
1464 .pvr_value = 0x81100000,
1465 .cpu_name = "e200z6",
1466 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001467 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001468 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001469 PPC_FEATURE_HAS_SPE_COMP |
1470 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001471 PPC_FEATURE_UNIFIED_CACHE,
1472 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001473 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001474 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001475 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001476 { /* default match */
1477 .pvr_mask = 0x00000000,
1478 .pvr_value = 0x00000000,
1479 .cpu_name = "(generic E200 PPC)",
1480 .cpu_features = CPU_FTRS_E200,
1481 .cpu_user_features = COMMON_USER_BOOKE |
1482 PPC_FEATURE_HAS_EFP_SINGLE |
1483 PPC_FEATURE_UNIFIED_CACHE,
1484 .dcache_bsize = 32,
1485 .machine_check = machine_check_e200,
1486 .platform = "ppc5554",
Paul Mackerras516c8be2008-05-12 14:20:35 +10001487 }
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001488#endif /* CONFIG_E200 */
1489#ifdef CONFIG_E500
Stephen Rothwell49209602005-10-12 15:55:09 +10001490 { /* e500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001491 .pvr_mask = 0xffff0000,
1492 .pvr_value = 0x80200000,
1493 .cpu_name = "e500",
1494 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001495 .cpu_features = CPU_FTRS_E500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001496 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001497 PPC_FEATURE_HAS_SPE_COMP |
1498 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001499 .icache_bsize = 32,
1500 .dcache_bsize = 32,
1501 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001502 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001503 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001504 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001505 .platform = "ppc8540",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001506 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001507 { /* e500v2 */
Kumar Gala5b37b702005-06-21 17:15:18 -07001508 .pvr_mask = 0xffff0000,
1509 .pvr_value = 0x80210000,
1510 .cpu_name = "e500v2",
1511 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001512 .cpu_features = CPU_FTRS_E500_2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001513 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001514 PPC_FEATURE_HAS_SPE_COMP |
1515 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1516 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
Kumar Gala5b37b702005-06-21 17:15:18 -07001517 .icache_bsize = 32,
1518 .dcache_bsize = 32,
1519 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001520 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001521 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001522 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001523 .platform = "ppc8548",
Kumar Gala5b37b702005-06-21 17:15:18 -07001524 },
Kumar Gala3dfa8772008-06-16 09:41:32 -05001525 { /* e500mc */
1526 .pvr_mask = 0xffff0000,
1527 .pvr_value = 0x80230000,
1528 .cpu_name = "e500mc",
1529 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1530 .cpu_features = CPU_FTRS_E500MC,
1531 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1532 .icache_bsize = 64,
1533 .dcache_bsize = 64,
1534 .num_pmcs = 4,
1535 .oprofile_cpu_type = "ppc/e500", /* xxx - galak, e500mc? */
1536 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1537 .machine_check = machine_check_e500,
1538 .platform = "ppce500mc",
1539 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001540 { /* default match */
1541 .pvr_mask = 0x00000000,
1542 .pvr_value = 0x00000000,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001543 .cpu_name = "(generic E500 PPC)",
1544 .cpu_features = CPU_FTRS_E500,
1545 .cpu_user_features = COMMON_USER_BOOKE |
1546 PPC_FEATURE_HAS_SPE_COMP |
1547 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001548 .icache_bsize = 32,
1549 .dcache_bsize = 32,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001550 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001551 .platform = "powerpc",
Paul Mackerras516c8be2008-05-12 14:20:35 +10001552 }
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001553#endif /* CONFIG_E500 */
Stephen Rothwell49209602005-10-12 15:55:09 +10001554#endif /* CONFIG_PPC32 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001555};
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001556
Paul Mackerras87a72f92007-10-04 14:18:01 +10001557static struct cpu_spec the_cpu_spec;
1558
1559struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001560{
1561 struct cpu_spec *s = cpu_specs;
Paul Mackerras87a72f92007-10-04 14:18:01 +10001562 struct cpu_spec *t = &the_cpu_spec;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001563 int i;
1564
1565 s = PTRRELOC(s);
Paul Mackerras87a72f92007-10-04 14:18:01 +10001566 t = PTRRELOC(t);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001567
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001568 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
1569 if ((pvr & s->pvr_mask) == s->pvr_value) {
Paul Mackerras87a72f92007-10-04 14:18:01 +10001570 /*
1571 * If we are overriding a previous value derived
1572 * from the real PVR with a new value obtained
1573 * using a logical PVR value, don't modify the
1574 * performance monitor fields.
1575 */
1576 if (t->num_pmcs && !s->num_pmcs) {
1577 t->cpu_name = s->cpu_name;
1578 t->cpu_features = s->cpu_features;
1579 t->cpu_user_features = s->cpu_user_features;
1580 t->icache_bsize = s->icache_bsize;
1581 t->dcache_bsize = s->dcache_bsize;
1582 t->cpu_setup = s->cpu_setup;
1583 t->cpu_restore = s->cpu_restore;
1584 t->platform = s->platform;
1585 } else
1586 *t = *s;
1587 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001588#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
Stefan Roese464076a2008-02-24 08:07:41 +11001589 /* ppc64 and booke expect identify_cpu to also call
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001590 * setup_cpu for that processor. I will consolidate
1591 * that at a later time, for now, just use #ifdef.
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001592 * we also don't need to PTRRELOC the function pointer
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001593 * on ppc64 and booke as we are running at 0 in real
1594 * mode on ppc64 and reloc_offset is always 0 on booke.
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001595 */
1596 if (s->cpu_setup) {
1597 s->cpu_setup(offset, s);
1598 }
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001599#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001600 return s;
1601 }
1602 BUG();
1603 return NULL;
1604}
1605
Benjamin Herrenschmidt0909c8c2006-10-20 11:47:18 +10001606void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001607{
1608 struct fixup_entry {
1609 unsigned long mask;
1610 unsigned long value;
Benjamin Herrenschmidt0909c8c2006-10-20 11:47:18 +10001611 long start_off;
1612 long end_off;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001613 } *fcur, *fend;
1614
1615 fcur = fixup_start;
1616 fend = fixup_end;
1617
1618 for (; fcur < fend; fcur++) {
1619 unsigned int *pstart, *pend, *p;
1620
1621 if ((value & fcur->mask) == fcur->value)
1622 continue;
1623
1624 /* These PTRRELOCs will disappear once the new scheme for
1625 * modules and vdso is implemented
1626 */
Benjamin Herrenschmidt0909c8c2006-10-20 11:47:18 +10001627 pstart = ((unsigned int *)fcur) + (fcur->start_off / 4);
1628 pend = ((unsigned int *)fcur) + (fcur->end_off / 4);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001629
1630 for (p = pstart; p < pend; p++) {
1631 *p = 0x60000000u;
1632 asm volatile ("dcbst 0, %0" : : "r" (p));
1633 }
1634 asm volatile ("sync" : : : "memory");
1635 for (p = pstart; p < pend; p++)
1636 asm volatile ("icbi 0,%0" : : "r" (p));
1637 asm volatile ("sync; isync" : : : "memory");
1638 }
1639}