blob: 94d98190e19a31b283d85bd401a7c910d4a2dc17 [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);
Kumar Gala400d2212005-09-27 15:13:12 -050036extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
37extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
38extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
39extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
40extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
41extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
42extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
43extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell49209602005-10-12 15:55:09 +100044#endif /* CONFIG_PPC32 */
Olof Johanssonf39b7a52006-08-11 00:07:08 -050045#ifdef CONFIG_PPC64
Kumar Gala400d2212005-09-27 15:13:12 -050046extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
Olof Johansson5b43d202006-10-04 23:41:41 -050047extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
Olof Johansson11999192007-02-04 16:36:51 -060048extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell40d244d2007-02-12 22:10:48 +110049extern void __restore_cpu_pa6t(void);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050050extern void __restore_cpu_ppc970(void);
51#endif /* CONFIG_PPC64 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070052
Linus Torvalds1da177e2005-04-16 15:20:36 -070053/* This table only contains "desktop" CPUs, it need to be filled with embedded
54 * ones as well...
55 */
Stephen Rothwell49209602005-10-12 15:55:09 +100056#define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
57 PPC_FEATURE_HAS_MMU)
58#define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +110059#define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +110060#define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
61 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
62#define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
63 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
Anton Blanchard03054d52006-04-29 09:51:06 +100064#define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
Paul Mackerrasfab5db92006-06-07 16:14:40 +100065 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
66 PPC_FEATURE_TRUE_LE)
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -050067#define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
68 PPC_FEATURE_TRUE_LE | \
69 PPC_FEATURE_HAS_ALTIVEC_COMP)
Paul Mackerras80f15dc2006-01-14 10:11:39 +110070#define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
71 PPC_FEATURE_BOOKE)
Linus Torvalds1da177e2005-04-16 15:20:36 -070072
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +100073static struct cpu_spec cpu_specs[] = {
Stephen Rothwell49209602005-10-12 15:55:09 +100074#ifdef CONFIG_PPC64
75 { /* Power3 */
76 .pvr_mask = 0xffff0000,
77 .pvr_value = 0x00400000,
78 .cpu_name = "POWER3 (630)",
79 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +100080 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +100081 .icache_bsize = 128,
82 .dcache_bsize = 128,
83 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -060084 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +100085 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +000086 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +110087 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +100088 },
89 { /* Power3+ */
90 .pvr_mask = 0xffff0000,
91 .pvr_value = 0x00410000,
92 .cpu_name = "POWER3 (630+)",
93 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +100094 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +100095 .icache_bsize = 128,
96 .dcache_bsize = 128,
97 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -060098 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +100099 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000100 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100101 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +1000102 },
103 { /* Northstar */
104 .pvr_mask = 0xffff0000,
105 .pvr_value = 0x00330000,
106 .cpu_name = "RS64-II (northstar)",
107 .cpu_features = CPU_FTRS_RS64,
108 .cpu_user_features = COMMON_USER_PPC64,
109 .icache_bsize = 128,
110 .dcache_bsize = 128,
111 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600112 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000113 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000114 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100115 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000116 },
117 { /* Pulsar */
118 .pvr_mask = 0xffff0000,
119 .pvr_value = 0x00340000,
120 .cpu_name = "RS64-III (pulsar)",
121 .cpu_features = CPU_FTRS_RS64,
122 .cpu_user_features = COMMON_USER_PPC64,
123 .icache_bsize = 128,
124 .dcache_bsize = 128,
125 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600126 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000127 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000128 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100129 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000130 },
131 { /* I-star */
132 .pvr_mask = 0xffff0000,
133 .pvr_value = 0x00360000,
134 .cpu_name = "RS64-III (icestar)",
135 .cpu_features = CPU_FTRS_RS64,
136 .cpu_user_features = COMMON_USER_PPC64,
137 .icache_bsize = 128,
138 .dcache_bsize = 128,
139 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600140 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000141 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000142 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100143 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000144 },
145 { /* S-star */
146 .pvr_mask = 0xffff0000,
147 .pvr_value = 0x00370000,
148 .cpu_name = "RS64-IV (sstar)",
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,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100157 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000158 },
159 { /* Power4 */
160 .pvr_mask = 0xffff0000,
161 .pvr_value = 0x00350000,
162 .cpu_name = "POWER4 (gp)",
163 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100164 .cpu_user_features = COMMON_USER_POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000165 .icache_bsize = 128,
166 .dcache_bsize = 128,
167 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600168 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000169 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000170 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100171 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000172 },
173 { /* Power4+ */
174 .pvr_mask = 0xffff0000,
175 .pvr_value = 0x00380000,
176 .cpu_name = "POWER4+ (gq)",
177 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100178 .cpu_user_features = COMMON_USER_POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000179 .icache_bsize = 128,
180 .dcache_bsize = 128,
181 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600182 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000183 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000184 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100185 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000186 },
187 { /* PPC970 */
188 .pvr_mask = 0xffff0000,
189 .pvr_value = 0x00390000,
190 .cpu_name = "PPC970",
191 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100192 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000193 PPC_FEATURE_HAS_ALTIVEC_COMP,
194 .icache_bsize = 128,
195 .dcache_bsize = 128,
196 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600197 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000198 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500199 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000200 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000201 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100202 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000203 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000204 { /* PPC970FX */
205 .pvr_mask = 0xffff0000,
206 .pvr_value = 0x003c0000,
207 .cpu_name = "PPC970FX",
Stephen Rothwell49209602005-10-12 15:55:09 +1000208 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100209 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000210 PPC_FEATURE_HAS_ALTIVEC_COMP,
211 .icache_bsize = 128,
212 .dcache_bsize = 128,
213 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600214 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000215 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500216 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000217 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000218 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100219 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000220 },
Olof Johansson3546e812007-02-26 00:35:14 -0600221 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
222 .pvr_mask = 0xffffffff,
223 .pvr_value = 0x00440100,
224 .cpu_name = "PPC970MP",
225 .cpu_features = CPU_FTRS_PPC970,
226 .cpu_user_features = COMMON_USER_POWER4 |
227 PPC_FEATURE_HAS_ALTIVEC_COMP,
228 .icache_bsize = 128,
229 .dcache_bsize = 128,
230 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000231 .pmc_type = PPC_PMC_IBM,
Olof Johansson3546e812007-02-26 00:35:14 -0600232 .cpu_setup = __setup_cpu_ppc970,
233 .cpu_restore = __restore_cpu_ppc970,
234 .oprofile_cpu_type = "ppc64/970MP",
235 .oprofile_type = PPC_OPROFILE_POWER4,
236 .platform = "ppc970",
237 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000238 { /* PPC970MP */
239 .pvr_mask = 0xffff0000,
240 .pvr_value = 0x00440000,
241 .cpu_name = "PPC970MP",
242 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100243 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000244 PPC_FEATURE_HAS_ALTIVEC_COMP,
245 .icache_bsize = 128,
246 .dcache_bsize = 128,
Anton Blanchard87af41b2006-05-05 05:44:26 +1000247 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000248 .pmc_type = PPC_PMC_IBM,
Olof Johansson5b43d202006-10-04 23:41:41 -0500249 .cpu_setup = __setup_cpu_ppc970MP,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500250 .cpu_restore = __restore_cpu_ppc970,
Mike Wolffecb3522006-11-21 14:41:54 -0600251 .oprofile_cpu_type = "ppc64/970MP",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000252 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100253 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000254 },
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500255 { /* PPC970GX */
256 .pvr_mask = 0xffff0000,
257 .pvr_value = 0x00450000,
258 .cpu_name = "PPC970GX",
259 .cpu_features = CPU_FTRS_PPC970,
260 .cpu_user_features = COMMON_USER_POWER4 |
261 PPC_FEATURE_HAS_ALTIVEC_COMP,
262 .icache_bsize = 128,
263 .dcache_bsize = 128,
264 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600265 .pmc_type = PPC_PMC_IBM,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500266 .cpu_setup = __setup_cpu_ppc970,
267 .oprofile_cpu_type = "ppc64/970",
268 .oprofile_type = PPC_OPROFILE_POWER4,
269 .platform = "ppc970",
270 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100271 { /* Power5 GR */
Stephen Rothwell49209602005-10-12 15:55:09 +1000272 .pvr_mask = 0xffff0000,
273 .pvr_value = 0x003a0000,
274 .cpu_name = "POWER5 (gr)",
275 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100276 .cpu_user_features = COMMON_USER_POWER5,
Stephen Rothwell49209602005-10-12 15:55:09 +1000277 .icache_bsize = 128,
278 .dcache_bsize = 128,
279 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600280 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000281 .oprofile_cpu_type = "ppc64/power5",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000282 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000283 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
284 * and above but only works on POWER5 and above
285 */
286 .oprofile_mmcra_sihv = MMCRA_SIHV,
287 .oprofile_mmcra_sipr = MMCRA_SIPR,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100288 .platform = "power5",
Stephen Rothwell49209602005-10-12 15:55:09 +1000289 },
Mike Wolf31a12ce2007-07-10 13:13:47 -0500290 { /* Power5++ */
291 .pvr_mask = 0xffffff00,
292 .pvr_value = 0x003b0300,
293 .cpu_name = "POWER5+ (gs)",
294 .cpu_features = CPU_FTRS_POWER5,
295 .cpu_user_features = COMMON_USER_POWER5_PLUS,
296 .icache_bsize = 128,
297 .dcache_bsize = 128,
298 .num_pmcs = 6,
299 .oprofile_cpu_type = "ppc64/power5++",
300 .oprofile_type = PPC_OPROFILE_POWER4,
301 .oprofile_mmcra_sihv = MMCRA_SIHV,
302 .oprofile_mmcra_sipr = MMCRA_SIPR,
303 .platform = "power5+",
304 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100305 { /* Power5 GS */
Stephen Rothwell49209602005-10-12 15:55:09 +1000306 .pvr_mask = 0xffff0000,
307 .pvr_value = 0x003b0000,
Anton Blanchard834608f2006-01-09 15:42:30 +1100308 .cpu_name = "POWER5+ (gs)",
Stephen Rothwell49209602005-10-12 15:55:09 +1000309 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100310 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Stephen Rothwell49209602005-10-12 15:55:09 +1000311 .icache_bsize = 128,
312 .dcache_bsize = 128,
313 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600314 .pmc_type = PPC_PMC_IBM,
Anton Blanchard834608f2006-01-09 15:42:30 +1100315 .oprofile_cpu_type = "ppc64/power5+",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000316 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000317 .oprofile_mmcra_sihv = MMCRA_SIHV,
318 .oprofile_mmcra_sipr = MMCRA_SIPR,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100319 .platform = "power5+",
Stephen Rothwell49209602005-10-12 15:55:09 +1000320 },
Paul Mackerras974a76f2006-11-10 20:38:53 +1100321 { /* POWER6 in P5+ mode; 2.04-compliant processor */
322 .pvr_mask = 0xffffffff,
323 .pvr_value = 0x0f000001,
324 .cpu_name = "POWER5+",
325 .cpu_features = CPU_FTRS_POWER5,
326 .cpu_user_features = COMMON_USER_POWER5_PLUS,
327 .icache_bsize = 128,
328 .dcache_bsize = 128,
329 .num_pmcs = 6,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000330 .pmc_type = PPC_PMC_IBM,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100331 .oprofile_cpu_type = "ppc64/power6",
332 .oprofile_type = PPC_OPROFILE_POWER4,
333 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
334 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
335 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
336 POWER6_MMCRA_OTHER,
337 .platform = "power5+",
338 },
Anton Blanchard03054d52006-04-29 09:51:06 +1000339 { /* Power6 */
340 .pvr_mask = 0xffff0000,
341 .pvr_value = 0x003e0000,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100342 .cpu_name = "POWER6 (raw)",
343 .cpu_features = CPU_FTRS_POWER6,
344 .cpu_user_features = COMMON_USER_POWER6 |
345 PPC_FEATURE_POWER6_EXT,
346 .icache_bsize = 128,
347 .dcache_bsize = 128,
348 .num_pmcs = 6,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000349 .pmc_type = PPC_PMC_IBM,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100350 .oprofile_cpu_type = "ppc64/power6",
351 .oprofile_type = PPC_OPROFILE_POWER4,
352 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
353 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
354 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
355 POWER6_MMCRA_OTHER,
356 .platform = "power6x",
357 },
358 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
359 .pvr_mask = 0xffffffff,
360 .pvr_value = 0x0f000002,
361 .cpu_name = "POWER6 (architected)",
Anton Blanchard03054d52006-04-29 09:51:06 +1000362 .cpu_features = CPU_FTRS_POWER6,
363 .cpu_user_features = COMMON_USER_POWER6,
364 .icache_bsize = 128,
365 .dcache_bsize = 128,
Anton Blanchard99f48612006-10-13 12:13:12 +1000366 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600367 .pmc_type = PPC_PMC_IBM,
Anton Blanchard03054d52006-04-29 09:51:06 +1000368 .oprofile_cpu_type = "ppc64/power6",
369 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000370 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
371 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
372 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
373 POWER6_MMCRA_OTHER,
Anton Blanchard03054d52006-04-29 09:51:06 +1000374 .platform = "power6",
375 },
Arnd Bergmannc902be72006-01-04 19:55:53 +0000376 { /* Cell Broadband Engine */
Stephen Rothwell49209602005-10-12 15:55:09 +1000377 .pvr_mask = 0xffff0000,
378 .pvr_value = 0x00700000,
379 .cpu_name = "Cell Broadband Engine",
380 .cpu_features = CPU_FTRS_CELL,
381 .cpu_user_features = COMMON_USER_PPC64 |
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +1100382 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
383 PPC_FEATURE_SMT,
Stephen Rothwell49209602005-10-12 15:55:09 +1000384 .icache_bsize = 128,
385 .dcache_bsize = 128,
Maynard Johnson18f21902006-11-20 18:45:16 +0100386 .num_pmcs = 4,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600387 .pmc_type = PPC_PMC_IBM,
Maynard Johnson18f21902006-11-20 18:45:16 +0100388 .oprofile_cpu_type = "ppc64/cell-be",
389 .oprofile_type = PPC_OPROFILE_CELL,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100390 .platform = "ppc-cell-be",
Stephen Rothwell49209602005-10-12 15:55:09 +1000391 },
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500392 { /* PA Semi PA6T */
393 .pvr_mask = 0x7fff0000,
394 .pvr_value = 0x00900000,
395 .cpu_name = "PA6T",
396 .cpu_features = CPU_FTRS_PA6T,
397 .cpu_user_features = COMMON_USER_PA6T,
398 .icache_bsize = 64,
399 .dcache_bsize = 64,
400 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600401 .pmc_type = PPC_PMC_PA6T,
Olof Johansson11999192007-02-04 16:36:51 -0600402 .cpu_setup = __setup_cpu_pa6t,
403 .cpu_restore = __restore_cpu_pa6t,
Olof Johansson25fc5302007-04-18 16:38:21 +1000404 .oprofile_cpu_type = "ppc64/pa6t",
405 .oprofile_type = PPC_OPROFILE_PA6T,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500406 .platform = "pa6t",
407 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000408 { /* default match */
409 .pvr_mask = 0x00000000,
410 .pvr_value = 0x00000000,
411 .cpu_name = "POWER4 (compatible)",
412 .cpu_features = CPU_FTRS_COMPATIBLE,
413 .cpu_user_features = COMMON_USER_PPC64,
414 .icache_bsize = 128,
415 .dcache_bsize = 128,
416 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600417 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100418 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000419 }
420#endif /* CONFIG_PPC64 */
421#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -0700422#if CLASSIC_PPC
Stephen Rothwell49209602005-10-12 15:55:09 +1000423 { /* 601 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700424 .pvr_mask = 0xffff0000,
425 .pvr_value = 0x00010000,
426 .cpu_name = "601",
Kumar Gala10b35d92005-09-23 14:08:58 -0500427 .cpu_features = CPU_FTRS_PPC601,
Stephen Rothwell49209602005-10-12 15:55:09 +1000428 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
Paul Mackerras98599012005-10-22 16:51:34 +1000429 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700430 .icache_bsize = 32,
431 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100432 .platform = "ppc601",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700433 },
434 { /* 603 */
435 .pvr_mask = 0xffff0000,
436 .pvr_value = 0x00030000,
437 .cpu_name = "603",
Kumar Gala10b35d92005-09-23 14:08:58 -0500438 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000439 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700440 .icache_bsize = 32,
441 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100442 .cpu_setup = __setup_cpu_603,
443 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700444 },
445 { /* 603e */
446 .pvr_mask = 0xffff0000,
447 .pvr_value = 0x00060000,
448 .cpu_name = "603e",
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,
454 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700455 },
456 { /* 603ev */
457 .pvr_mask = 0xffff0000,
458 .pvr_value = 0x00070000,
459 .cpu_name = "603ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500460 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000461 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700462 .icache_bsize = 32,
463 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100464 .cpu_setup = __setup_cpu_603,
465 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700466 },
467 { /* 604 */
468 .pvr_mask = 0xffff0000,
469 .pvr_value = 0x00040000,
470 .cpu_name = "604",
Kumar Gala10b35d92005-09-23 14:08:58 -0500471 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000472 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700473 .icache_bsize = 32,
474 .dcache_bsize = 32,
475 .num_pmcs = 2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100476 .cpu_setup = __setup_cpu_604,
477 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700478 },
479 { /* 604e */
480 .pvr_mask = 0xfffff000,
481 .pvr_value = 0x00090000,
482 .cpu_name = "604e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500483 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000484 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700485 .icache_bsize = 32,
486 .dcache_bsize = 32,
487 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100488 .cpu_setup = __setup_cpu_604,
489 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700490 },
491 { /* 604r */
492 .pvr_mask = 0xffff0000,
493 .pvr_value = 0x00090000,
494 .cpu_name = "604r",
Kumar Gala10b35d92005-09-23 14:08:58 -0500495 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000496 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700497 .icache_bsize = 32,
498 .dcache_bsize = 32,
499 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100500 .cpu_setup = __setup_cpu_604,
501 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700502 },
503 { /* 604ev */
504 .pvr_mask = 0xffff0000,
505 .pvr_value = 0x000a0000,
506 .cpu_name = "604ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500507 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000508 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700509 .icache_bsize = 32,
510 .dcache_bsize = 32,
511 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100512 .cpu_setup = __setup_cpu_604,
513 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700514 },
515 { /* 740/750 (0x4202, don't support TAU ?) */
516 .pvr_mask = 0xffffffff,
517 .pvr_value = 0x00084202,
518 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500519 .cpu_features = CPU_FTRS_740_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000520 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700521 .icache_bsize = 32,
522 .dcache_bsize = 32,
523 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100524 .cpu_setup = __setup_cpu_750,
525 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700526 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700527 { /* 750CX (80100 and 8010x?) */
528 .pvr_mask = 0xfffffff0,
529 .pvr_value = 0x00080100,
530 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500531 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000532 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700533 .icache_bsize = 32,
534 .dcache_bsize = 32,
535 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100536 .cpu_setup = __setup_cpu_750cx,
537 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700538 },
539 { /* 750CX (82201 and 82202) */
540 .pvr_mask = 0xfffffff0,
541 .pvr_value = 0x00082200,
542 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500543 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000544 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700545 .icache_bsize = 32,
546 .dcache_bsize = 32,
547 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100548 .cpu_setup = __setup_cpu_750cx,
549 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700550 },
551 { /* 750CXe (82214) */
552 .pvr_mask = 0xfffffff0,
553 .pvr_value = 0x00082210,
554 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500555 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000556 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700557 .icache_bsize = 32,
558 .dcache_bsize = 32,
559 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100560 .cpu_setup = __setup_cpu_750cx,
561 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700562 },
Arthur Othieno7c316252005-09-03 15:55:52 -0700563 { /* 750CXe "Gekko" (83214) */
564 .pvr_mask = 0xffffffff,
565 .pvr_value = 0x00083214,
566 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500567 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000568 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Arthur Othieno7c316252005-09-03 15:55:52 -0700569 .icache_bsize = 32,
570 .dcache_bsize = 32,
571 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100572 .cpu_setup = __setup_cpu_750cx,
573 .platform = "ppc750",
Arthur Othieno7c316252005-09-03 15:55:52 -0700574 },
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500575 { /* 750CL */
576 .pvr_mask = 0xfffff0f0,
577 .pvr_value = 0x00087010,
578 .cpu_name = "750CL",
Josh Boyera14c4502007-04-13 04:33:25 +1000579 .cpu_features = CPU_FTRS_750CL,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500580 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
581 .icache_bsize = 32,
582 .dcache_bsize = 32,
583 .num_pmcs = 4,
Josh Boyera14c4502007-04-13 04:33:25 +1000584 .cpu_setup = __setup_cpu_750,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500585 .platform = "ppc750",
586 },
Arthur Othienoac1ff042005-09-03 15:55:51 -0700587 { /* 745/755 */
588 .pvr_mask = 0xfffff000,
589 .pvr_value = 0x00083000,
590 .cpu_name = "745/755",
Kumar Gala10b35d92005-09-23 14:08:58 -0500591 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000592 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Arthur Othienoac1ff042005-09-03 15:55:51 -0700593 .icache_bsize = 32,
594 .dcache_bsize = 32,
595 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100596 .cpu_setup = __setup_cpu_750,
597 .platform = "ppc750",
Arthur Othienoac1ff042005-09-03 15:55:51 -0700598 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700599 { /* 750FX rev 1.x */
600 .pvr_mask = 0xffffff00,
601 .pvr_value = 0x70000100,
602 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500603 .cpu_features = CPU_FTRS_750FX1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000604 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700605 .icache_bsize = 32,
606 .dcache_bsize = 32,
607 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100608 .cpu_setup = __setup_cpu_750,
609 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700610 },
611 { /* 750FX rev 2.0 must disable HID0[DPM] */
612 .pvr_mask = 0xffffffff,
613 .pvr_value = 0x70000200,
614 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500615 .cpu_features = CPU_FTRS_750FX2,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000616 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -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,
621 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700622 },
623 { /* 750FX (All revs except 2.0) */
624 .pvr_mask = 0xffff0000,
625 .pvr_value = 0x70000000,
626 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500627 .cpu_features = CPU_FTRS_750FX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000628 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700629 .icache_bsize = 32,
630 .dcache_bsize = 32,
631 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100632 .cpu_setup = __setup_cpu_750fx,
633 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700634 },
635 { /* 750GX */
636 .pvr_mask = 0xffff0000,
637 .pvr_value = 0x70020000,
638 .cpu_name = "750GX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500639 .cpu_features = CPU_FTRS_750GX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000640 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700641 .icache_bsize = 32,
642 .dcache_bsize = 32,
643 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100644 .cpu_setup = __setup_cpu_750fx,
645 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700646 },
647 { /* 740/750 (L2CR bit need fixup for 740) */
648 .pvr_mask = 0xffff0000,
649 .pvr_value = 0x00080000,
650 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500651 .cpu_features = CPU_FTRS_740,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000652 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700653 .icache_bsize = 32,
654 .dcache_bsize = 32,
655 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100656 .cpu_setup = __setup_cpu_750,
657 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700658 },
659 { /* 7400 rev 1.1 ? (no TAU) */
660 .pvr_mask = 0xffffffff,
661 .pvr_value = 0x000c1101,
662 .cpu_name = "7400 (1.1)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500663 .cpu_features = CPU_FTRS_7400_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000664 .cpu_user_features = COMMON_USER |
665 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700666 .icache_bsize = 32,
667 .dcache_bsize = 32,
668 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100669 .cpu_setup = __setup_cpu_7400,
670 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700671 },
672 { /* 7400 */
673 .pvr_mask = 0xffff0000,
674 .pvr_value = 0x000c0000,
675 .cpu_name = "7400",
Kumar Gala10b35d92005-09-23 14:08:58 -0500676 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000677 .cpu_user_features = COMMON_USER |
678 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700679 .icache_bsize = 32,
680 .dcache_bsize = 32,
681 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100682 .cpu_setup = __setup_cpu_7400,
683 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700684 },
685 { /* 7410 */
686 .pvr_mask = 0xffff0000,
687 .pvr_value = 0x800c0000,
688 .cpu_name = "7410",
Kumar Gala10b35d92005-09-23 14:08:58 -0500689 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000690 .cpu_user_features = COMMON_USER |
691 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700692 .icache_bsize = 32,
693 .dcache_bsize = 32,
694 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100695 .cpu_setup = __setup_cpu_7410,
696 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700697 },
698 { /* 7450 2.0 - no doze/nap */
699 .pvr_mask = 0xffffffff,
700 .pvr_value = 0x80000200,
701 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500702 .cpu_features = CPU_FTRS_7450_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000703 .cpu_user_features = COMMON_USER |
704 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700705 .icache_bsize = 32,
706 .dcache_bsize = 32,
707 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600708 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600709 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000710 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100711 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700712 },
713 { /* 7450 2.1 */
714 .pvr_mask = 0xffffffff,
715 .pvr_value = 0x80000201,
716 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500717 .cpu_features = CPU_FTRS_7450_21,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000718 .cpu_user_features = COMMON_USER |
719 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700720 .icache_bsize = 32,
721 .dcache_bsize = 32,
722 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600723 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600724 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000725 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100726 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700727 },
728 { /* 7450 2.3 and newer */
729 .pvr_mask = 0xffff0000,
730 .pvr_value = 0x80000000,
731 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500732 .cpu_features = CPU_FTRS_7450_23,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000733 .cpu_user_features = COMMON_USER |
734 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700735 .icache_bsize = 32,
736 .dcache_bsize = 32,
737 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600738 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600739 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000740 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100741 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700742 },
743 { /* 7455 rev 1.x */
744 .pvr_mask = 0xffffff00,
745 .pvr_value = 0x80010100,
746 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500747 .cpu_features = CPU_FTRS_7455_1,
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 = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600753 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600754 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000755 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100756 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700757 },
758 { /* 7455 rev 2.0 */
759 .pvr_mask = 0xffffffff,
760 .pvr_value = 0x80010200,
761 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500762 .cpu_features = CPU_FTRS_7455_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000763 .cpu_user_features = COMMON_USER |
764 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700765 .icache_bsize = 32,
766 .dcache_bsize = 32,
767 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600768 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600769 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000770 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100771 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700772 },
773 { /* 7455 others */
774 .pvr_mask = 0xffff0000,
775 .pvr_value = 0x80010000,
776 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500777 .cpu_features = CPU_FTRS_7455,
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,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100786 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700787 },
788 { /* 7447/7457 Rev 1.0 */
789 .pvr_mask = 0xffffffff,
790 .pvr_value = 0x80020100,
791 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500792 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000793 .cpu_user_features = COMMON_USER |
794 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700795 .icache_bsize = 32,
796 .dcache_bsize = 32,
797 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600798 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600799 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000800 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100801 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700802 },
803 { /* 7447/7457 Rev 1.1 */
804 .pvr_mask = 0xffffffff,
805 .pvr_value = 0x80020101,
806 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500807 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000808 .cpu_user_features = COMMON_USER |
809 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700810 .icache_bsize = 32,
811 .dcache_bsize = 32,
812 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600813 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600814 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000815 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100816 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700817 },
818 { /* 7447/7457 Rev 1.2 and later */
819 .pvr_mask = 0xffff0000,
820 .pvr_value = 0x80020000,
821 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500822 .cpu_features = CPU_FTRS_7447,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000823 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700824 .icache_bsize = 32,
825 .dcache_bsize = 32,
826 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600827 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600828 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000829 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100830 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700831 },
832 { /* 7447A */
833 .pvr_mask = 0xffff0000,
834 .pvr_value = 0x80030000,
835 .cpu_name = "7447A",
Kumar Gala10b35d92005-09-23 14:08:58 -0500836 .cpu_features = CPU_FTRS_7447A,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000837 .cpu_user_features = COMMON_USER |
838 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700839 .icache_bsize = 32,
840 .dcache_bsize = 32,
841 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600842 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600843 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000844 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100845 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700846 },
Kumar Galabbde6302005-09-03 15:55:55 -0700847 { /* 7448 */
848 .pvr_mask = 0xffff0000,
849 .pvr_value = 0x80040000,
850 .cpu_name = "7448",
James.Yang3d372542007-05-02 16:34:43 -0500851 .cpu_features = CPU_FTRS_7448,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000852 .cpu_user_features = COMMON_USER |
853 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Kumar Galabbde6302005-09-03 15:55:55 -0700854 .icache_bsize = 32,
855 .dcache_bsize = 32,
856 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600857 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600858 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000859 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100860 .platform = "ppc7450",
Kumar Galabbde6302005-09-03 15:55:55 -0700861 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700862 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
863 .pvr_mask = 0x7fff0000,
864 .pvr_value = 0x00810000,
865 .cpu_name = "82xx",
Kumar Gala10b35d92005-09-23 14:08:58 -0500866 .cpu_features = CPU_FTRS_82XX,
Stephen Rothwell49209602005-10-12 15:55:09 +1000867 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700868 .icache_bsize = 32,
869 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100870 .cpu_setup = __setup_cpu_603,
871 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700872 },
873 { /* All G2_LE (603e core, plus some) have the same pvr */
874 .pvr_mask = 0x7fff0000,
875 .pvr_value = 0x00820000,
876 .cpu_name = "G2_LE",
Kumar Gala10b35d92005-09-23 14:08:58 -0500877 .cpu_features = CPU_FTRS_G2_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000878 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700879 .icache_bsize = 32,
880 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100881 .cpu_setup = __setup_cpu_603,
882 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700883 },
Kim Phillips6c4a2502006-10-02 20:10:24 -0500884 { /* e300c1 (a 603e core, plus some) on 83xx */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700885 .pvr_mask = 0x7fff0000,
886 .pvr_value = 0x00830000,
Kim Phillips6c4a2502006-10-02 20:10:24 -0500887 .cpu_name = "e300c1",
Kumar Gala10b35d92005-09-23 14:08:58 -0500888 .cpu_features = CPU_FTRS_E300,
Stephen Rothwell49209602005-10-12 15:55:09 +1000889 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700890 .icache_bsize = 32,
891 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100892 .cpu_setup = __setup_cpu_603,
893 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700894 },
Kim Phillips6c4a2502006-10-02 20:10:24 -0500895 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
896 .pvr_mask = 0x7fff0000,
897 .pvr_value = 0x00840000,
898 .cpu_name = "e300c2",
Kim Phillipsaa42c692006-12-08 02:43:30 -0600899 .cpu_features = CPU_FTRS_E300C2,
Kim Phillips6c4a2502006-10-02 20:10:24 -0500900 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
901 .icache_bsize = 32,
902 .dcache_bsize = 32,
903 .cpu_setup = __setup_cpu_603,
904 .platform = "ppc603",
905 },
Scott Wood57933f82006-12-01 12:57:05 -0600906 { /* e300c3 on 83xx */
907 .pvr_mask = 0x7fff0000,
908 .pvr_value = 0x00850000,
909 .cpu_name = "e300c3",
910 .cpu_features = CPU_FTRS_E300,
911 .cpu_user_features = COMMON_USER,
912 .icache_bsize = 32,
913 .dcache_bsize = 32,
914 .cpu_setup = __setup_cpu_603,
915 .platform = "ppc603",
916 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700917 { /* default match, we assume split I/D cache & TB (non-601)... */
918 .pvr_mask = 0x00000000,
919 .pvr_value = 0x00000000,
920 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500921 .cpu_features = CPU_FTRS_CLASSIC32,
Stephen Rothwell49209602005-10-12 15:55:09 +1000922 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700923 .icache_bsize = 32,
924 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100925 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700926 },
927#endif /* CLASSIC_PPC */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700928#ifdef CONFIG_8xx
929 { /* 8xx */
930 .pvr_mask = 0xffff0000,
931 .pvr_value = 0x00500000,
932 .cpu_name = "8xx",
933 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
934 * if the 8xx code is there.... */
Kumar Gala10b35d92005-09-23 14:08:58 -0500935 .cpu_features = CPU_FTRS_8XX,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700936 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
937 .icache_bsize = 16,
938 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100939 .platform = "ppc823",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700940 },
941#endif /* CONFIG_8xx */
942#ifdef CONFIG_40x
943 { /* 403GC */
944 .pvr_mask = 0xffffff00,
945 .pvr_value = 0x00200200,
946 .cpu_name = "403GC",
Kumar Gala10b35d92005-09-23 14:08:58 -0500947 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700948 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
949 .icache_bsize = 16,
950 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100951 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700952 },
953 { /* 403GCX */
954 .pvr_mask = 0xffffff00,
955 .pvr_value = 0x00201400,
956 .cpu_name = "403GCX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500957 .cpu_features = CPU_FTRS_40X,
Paul Mackerras98599012005-10-22 16:51:34 +1000958 .cpu_user_features = PPC_FEATURE_32 |
959 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700960 .icache_bsize = 16,
961 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100962 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700963 },
964 { /* 403G ?? */
965 .pvr_mask = 0xffff0000,
966 .pvr_value = 0x00200000,
967 .cpu_name = "403G ??",
Kumar Gala10b35d92005-09-23 14:08:58 -0500968 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700969 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
970 .icache_bsize = 16,
971 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100972 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700973 },
974 { /* 405GP */
975 .pvr_mask = 0xffff0000,
976 .pvr_value = 0x40110000,
977 .cpu_name = "405GP",
Kumar Gala10b35d92005-09-23 14:08:58 -0500978 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700979 .cpu_user_features = PPC_FEATURE_32 |
980 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
981 .icache_bsize = 32,
982 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100983 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700984 },
985 { /* STB 03xxx */
986 .pvr_mask = 0xffff0000,
987 .pvr_value = 0x40130000,
988 .cpu_name = "STB03xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -0500989 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700990 .cpu_user_features = PPC_FEATURE_32 |
991 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
992 .icache_bsize = 32,
993 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100994 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700995 },
996 { /* STB 04xxx */
997 .pvr_mask = 0xffff0000,
998 .pvr_value = 0x41810000,
999 .cpu_name = "STB04xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001000 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001001 .cpu_user_features = PPC_FEATURE_32 |
1002 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1003 .icache_bsize = 32,
1004 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001005 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001006 },
1007 { /* NP405L */
1008 .pvr_mask = 0xffff0000,
1009 .pvr_value = 0x41610000,
1010 .cpu_name = "NP405L",
Kumar Gala10b35d92005-09-23 14:08:58 -05001011 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001012 .cpu_user_features = PPC_FEATURE_32 |
1013 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1014 .icache_bsize = 32,
1015 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001016 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001017 },
1018 { /* NP4GS3 */
1019 .pvr_mask = 0xffff0000,
1020 .pvr_value = 0x40B10000,
1021 .cpu_name = "NP4GS3",
Kumar Gala10b35d92005-09-23 14:08:58 -05001022 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001023 .cpu_user_features = PPC_FEATURE_32 |
1024 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1025 .icache_bsize = 32,
1026 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001027 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001028 },
1029 { /* NP405H */
1030 .pvr_mask = 0xffff0000,
1031 .pvr_value = 0x41410000,
1032 .cpu_name = "NP405H",
Kumar Gala10b35d92005-09-23 14:08:58 -05001033 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001034 .cpu_user_features = PPC_FEATURE_32 |
1035 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1036 .icache_bsize = 32,
1037 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001038 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001039 },
1040 { /* 405GPr */
1041 .pvr_mask = 0xffff0000,
1042 .pvr_value = 0x50910000,
1043 .cpu_name = "405GPr",
Kumar Gala10b35d92005-09-23 14:08:58 -05001044 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001045 .cpu_user_features = PPC_FEATURE_32 |
1046 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1047 .icache_bsize = 32,
1048 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001049 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001050 },
1051 { /* STBx25xx */
1052 .pvr_mask = 0xffff0000,
1053 .pvr_value = 0x51510000,
1054 .cpu_name = "STBx25xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001055 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001056 .cpu_user_features = PPC_FEATURE_32 |
1057 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1058 .icache_bsize = 32,
1059 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001060 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001061 },
1062 { /* 405LP */
1063 .pvr_mask = 0xffff0000,
1064 .pvr_value = 0x41F10000,
1065 .cpu_name = "405LP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001066 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001067 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1068 .icache_bsize = 32,
1069 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001070 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001071 },
1072 { /* Xilinx Virtex-II Pro */
Grant C. Likely72646c72006-01-19 01:13:20 -07001073 .pvr_mask = 0xfffff000,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001074 .pvr_value = 0x20010000,
1075 .cpu_name = "Virtex-II Pro",
Kumar Gala10b35d92005-09-23 14:08:58 -05001076 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001077 .cpu_user_features = PPC_FEATURE_32 |
1078 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1079 .icache_bsize = 32,
1080 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001081 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001082 },
Grant C. Likely72646c72006-01-19 01:13:20 -07001083 { /* Xilinx Virtex-4 FX */
1084 .pvr_mask = 0xfffff000,
1085 .pvr_value = 0x20011000,
1086 .cpu_name = "Virtex-4 FX",
1087 .cpu_features = CPU_FTRS_40X,
1088 .cpu_user_features = PPC_FEATURE_32 |
1089 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1090 .icache_bsize = 32,
1091 .dcache_bsize = 32,
Peter Bergner838fdb42006-09-14 14:18:38 -05001092 .platform = "ppc405",
Grant C. Likely72646c72006-01-19 01:13:20 -07001093 },
Eugene Suroveginad95d602005-06-07 13:22:09 -07001094 { /* 405EP */
1095 .pvr_mask = 0xffff0000,
1096 .pvr_value = 0x51210000,
1097 .cpu_name = "405EP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001098 .cpu_features = CPU_FTRS_40X,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001099 .cpu_user_features = PPC_FEATURE_32 |
1100 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1101 .icache_bsize = 32,
1102 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001103 .platform = "ppc405",
Eugene Suroveginad95d602005-06-07 13:22:09 -07001104 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001105
1106#endif /* CONFIG_40x */
1107#ifdef CONFIG_44x
Matt Porterc9cf73a2005-07-31 22:34:52 -07001108 {
1109 .pvr_mask = 0xf0000fff,
1110 .pvr_value = 0x40000850,
1111 .cpu_name = "440EP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001112 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001113 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001114 .icache_bsize = 32,
1115 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001116 .cpu_setup = __setup_cpu_440ep,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001117 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001118 },
1119 {
1120 .pvr_mask = 0xf0000fff,
1121 .pvr_value = 0x400008d3,
1122 .cpu_name = "440EP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001123 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001124 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001125 .icache_bsize = 32,
1126 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001127 .cpu_setup = __setup_cpu_440ep,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001128 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001129 },
Valentine Barshak15fc9932007-08-29 17:40:30 +04001130 { /* 440EPX */
1131 .pvr_mask = 0xf0000ffb,
1132 .pvr_value = 0x200008D0,
1133 .cpu_name = "440EPX",
1134 .cpu_features = CPU_FTRS_44X,
1135 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1136 .icache_bsize = 32,
1137 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001138 .cpu_setup = __setup_cpu_440epx,
1139 .platform = "ppc440",
Valentine Barshak15fc9932007-08-29 17:40:30 +04001140 },
1141 { /* 440GRX */
1142 .pvr_mask = 0xf0000ffb,
1143 .pvr_value = 0x200008D8,
1144 .cpu_name = "440GRX",
1145 .cpu_features = CPU_FTRS_44X,
1146 .cpu_user_features = COMMON_USER_BOOKE,
1147 .icache_bsize = 32,
1148 .dcache_bsize = 32,
1149 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001150 { /* 440GP Rev. B */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001151 .pvr_mask = 0xf0000fff,
1152 .pvr_value = 0x40000440,
1153 .cpu_name = "440GP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001154 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001155 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001156 .icache_bsize = 32,
1157 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001158 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001159 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001160 { /* 440GP Rev. C */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001161 .pvr_mask = 0xf0000fff,
1162 .pvr_value = 0x40000481,
1163 .cpu_name = "440GP Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001164 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001165 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001166 .icache_bsize = 32,
1167 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001168 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001169 },
1170 { /* 440GX Rev. A */
1171 .pvr_mask = 0xf0000fff,
1172 .pvr_value = 0x50000850,
1173 .cpu_name = "440GX Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001174 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001175 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001176 .icache_bsize = 32,
1177 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001178 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001179 },
1180 { /* 440GX Rev. B */
1181 .pvr_mask = 0xf0000fff,
1182 .pvr_value = 0x50000851,
1183 .cpu_name = "440GX Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001184 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001185 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001186 .icache_bsize = 32,
1187 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001188 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001189 },
1190 { /* 440GX Rev. C */
1191 .pvr_mask = 0xf0000fff,
1192 .pvr_value = 0x50000892,
1193 .cpu_name = "440GX Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001194 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001195 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001196 .icache_bsize = 32,
1197 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001198 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001199 },
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001200 { /* 440GX Rev. F */
1201 .pvr_mask = 0xf0000fff,
1202 .pvr_value = 0x50000894,
1203 .cpu_name = "440GX Rev. F",
Kumar Gala10b35d92005-09-23 14:08:58 -05001204 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001205 .cpu_user_features = COMMON_USER_BOOKE,
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001206 .icache_bsize = 32,
1207 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001208 .platform = "ppc440",
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001209 },
Matt Porter656de7e2005-09-03 15:55:42 -07001210 { /* 440SP Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001211 .pvr_mask = 0xfff00fff,
1212 .pvr_value = 0x53200891,
Matt Porter656de7e2005-09-03 15:55:42 -07001213 .cpu_name = "440SP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001214 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001215 .cpu_user_features = COMMON_USER_BOOKE,
Matt Porter656de7e2005-09-03 15:55:42 -07001216 .icache_bsize = 32,
1217 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001218 .platform = "ppc440",
Matt Porter656de7e2005-09-03 15:55:42 -07001219 },
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001220 { /* 440SPe Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001221 .pvr_mask = 0xfff00fff,
1222 .pvr_value = 0x53400890,
1223 .cpu_name = "440SPe Rev. A",
1224 .cpu_features = CPU_FTRS_44X,
1225 .cpu_user_features = COMMON_USER_BOOKE,
1226 .icache_bsize = 32,
1227 .dcache_bsize = 32,
1228 .platform = "ppc440",
1229 },
1230 { /* 440SPe Rev. B */
1231 .pvr_mask = 0xfff00fff,
1232 .pvr_value = 0x53400891,
1233 .cpu_name = "440SPe Rev. B",
Kumar Galaa147c582006-12-08 02:34:38 -06001234 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001235 .cpu_user_features = COMMON_USER_BOOKE,
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001236 .icache_bsize = 32,
1237 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001238 .platform = "ppc440",
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001239 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001240#endif /* CONFIG_44x */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001241#ifdef CONFIG_FSL_BOOKE
Stephen Rothwell49209602005-10-12 15:55:09 +10001242 { /* e200z5 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001243 .pvr_mask = 0xfff00000,
1244 .pvr_value = 0x81000000,
1245 .cpu_name = "e200z5",
1246 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001247 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001248 .cpu_user_features = COMMON_USER_BOOKE |
1249 PPC_FEATURE_HAS_EFP_SINGLE |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001250 PPC_FEATURE_UNIFIED_CACHE,
1251 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001252 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001253 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001254 { /* e200z6 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001255 .pvr_mask = 0xfff00000,
1256 .pvr_value = 0x81100000,
1257 .cpu_name = "e200z6",
1258 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001259 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001260 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001261 PPC_FEATURE_HAS_SPE_COMP |
1262 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001263 PPC_FEATURE_UNIFIED_CACHE,
1264 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001265 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001266 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001267 { /* e500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001268 .pvr_mask = 0xffff0000,
1269 .pvr_value = 0x80200000,
1270 .cpu_name = "e500",
1271 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001272 .cpu_features = CPU_FTRS_E500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001273 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001274 PPC_FEATURE_HAS_SPE_COMP |
1275 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001276 .icache_bsize = 32,
1277 .dcache_bsize = 32,
1278 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001279 .oprofile_cpu_type = "ppc/e500",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001280 .oprofile_type = PPC_OPROFILE_BOOKE,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001281 .platform = "ppc8540",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001282 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001283 { /* e500v2 */
Kumar Gala5b37b702005-06-21 17:15:18 -07001284 .pvr_mask = 0xffff0000,
1285 .pvr_value = 0x80210000,
1286 .cpu_name = "e500v2",
1287 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001288 .cpu_features = CPU_FTRS_E500_2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001289 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001290 PPC_FEATURE_HAS_SPE_COMP |
1291 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1292 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
Kumar Gala5b37b702005-06-21 17:15:18 -07001293 .icache_bsize = 32,
1294 .dcache_bsize = 32,
1295 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001296 .oprofile_cpu_type = "ppc/e500",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001297 .oprofile_type = PPC_OPROFILE_BOOKE,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001298 .platform = "ppc8548",
Kumar Gala5b37b702005-06-21 17:15:18 -07001299 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001300#endif
1301#if !CLASSIC_PPC
1302 { /* default match */
1303 .pvr_mask = 0x00000000,
1304 .pvr_value = 0x00000000,
1305 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -05001306 .cpu_features = CPU_FTRS_GENERIC_32,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001307 .cpu_user_features = PPC_FEATURE_32,
1308 .icache_bsize = 32,
1309 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001310 .platform = "powerpc",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001311 }
1312#endif /* !CLASSIC_PPC */
Stephen Rothwell49209602005-10-12 15:55:09 +10001313#endif /* CONFIG_PPC32 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001314};
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001315
Paul Mackerras974a76f2006-11-10 20:38:53 +11001316struct cpu_spec *identify_cpu(unsigned long offset, unsigned int pvr)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001317{
1318 struct cpu_spec *s = cpu_specs;
1319 struct cpu_spec **cur = &cur_cpu_spec;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001320 int i;
1321
1322 s = PTRRELOC(s);
1323 cur = PTRRELOC(cur);
1324
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001325 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
1326 if ((pvr & s->pvr_mask) == s->pvr_value) {
1327 *cur = cpu_specs + i;
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001328#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
1329 /* ppc64 and booke expect identify_cpu to also call
1330 * setup_cpu for that processor. I will consolidate
1331 * that at a later time, for now, just use #ifdef.
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001332 * we also don't need to PTRRELOC the function pointer
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001333 * on ppc64 and booke as we are running at 0 in real
1334 * mode on ppc64 and reloc_offset is always 0 on booke.
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001335 */
1336 if (s->cpu_setup) {
1337 s->cpu_setup(offset, s);
1338 }
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001339#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001340 return s;
1341 }
1342 BUG();
1343 return NULL;
1344}
1345
Benjamin Herrenschmidt0909c8c2006-10-20 11:47:18 +10001346void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001347{
1348 struct fixup_entry {
1349 unsigned long mask;
1350 unsigned long value;
Benjamin Herrenschmidt0909c8c2006-10-20 11:47:18 +10001351 long start_off;
1352 long end_off;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001353 } *fcur, *fend;
1354
1355 fcur = fixup_start;
1356 fend = fixup_end;
1357
1358 for (; fcur < fend; fcur++) {
1359 unsigned int *pstart, *pend, *p;
1360
1361 if ((value & fcur->mask) == fcur->value)
1362 continue;
1363
1364 /* These PTRRELOCs will disappear once the new scheme for
1365 * modules and vdso is implemented
1366 */
Benjamin Herrenschmidt0909c8c2006-10-20 11:47:18 +10001367 pstart = ((unsigned int *)fcur) + (fcur->start_off / 4);
1368 pend = ((unsigned int *)fcur) + (fcur->end_off / 4);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001369
1370 for (p = pstart; p < pend; p++) {
1371 *p = 0x60000000u;
1372 asm volatile ("dcbst 0, %0" : : "r" (p));
1373 }
1374 asm volatile ("sync" : : : "memory");
1375 for (p = pstart; p < pend; p++)
1376 asm volatile ("icbi 0,%0" : : "r" (p));
1377 asm volatile ("sync; isync" : : : "memory");
1378 }
1379}