blob: 5873073c90456bdc3daedf7c674113b29fc02698 [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
Kumar Gala400d2212005-09-27 15:13:12 -050034extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
35extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
36extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
37extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
38extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
39extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
40extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
41extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell49209602005-10-12 15:55:09 +100042#endif /* CONFIG_PPC32 */
Olof Johanssonf39b7a52006-08-11 00:07:08 -050043#ifdef CONFIG_PPC64
Kumar Gala400d2212005-09-27 15:13:12 -050044extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
Olof Johansson5b43d202006-10-04 23:41:41 -050045extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
Olof Johansson11999192007-02-04 16:36:51 -060046extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell40d244d2007-02-12 22:10:48 +110047extern void __restore_cpu_pa6t(void);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050048extern void __restore_cpu_ppc970(void);
49#endif /* CONFIG_PPC64 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070050
Linus Torvalds1da177e2005-04-16 15:20:36 -070051/* This table only contains "desktop" CPUs, it need to be filled with embedded
52 * ones as well...
53 */
Stephen Rothwell49209602005-10-12 15:55:09 +100054#define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
55 PPC_FEATURE_HAS_MMU)
56#define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +110057#define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +110058#define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
59 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
60#define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
61 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
Anton Blanchard03054d52006-04-29 09:51:06 +100062#define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
Paul Mackerrasfab5db92006-06-07 16:14:40 +100063 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
64 PPC_FEATURE_TRUE_LE)
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -050065#define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
66 PPC_FEATURE_TRUE_LE | \
67 PPC_FEATURE_HAS_ALTIVEC_COMP)
Paul Mackerras80f15dc2006-01-14 10:11:39 +110068#define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
69 PPC_FEATURE_BOOKE)
Linus Torvalds1da177e2005-04-16 15:20:36 -070070
Linus Torvalds1da177e2005-04-16 15:20:36 -070071/* We only set the spe features if the kernel was compiled with
72 * spe support
73 */
74#ifdef CONFIG_SPE
Stephen Rothwell49209602005-10-12 15:55:09 +100075#define PPC_FEATURE_SPE_COMP PPC_FEATURE_HAS_SPE
Linus Torvalds1da177e2005-04-16 15:20:36 -070076#else
Stephen Rothwell49209602005-10-12 15:55:09 +100077#define PPC_FEATURE_SPE_COMP 0
Linus Torvalds1da177e2005-04-16 15:20:36 -070078#endif
79
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +100080static struct cpu_spec cpu_specs[] = {
Stephen Rothwell49209602005-10-12 15:55:09 +100081#ifdef CONFIG_PPC64
82 { /* Power3 */
83 .pvr_mask = 0xffff0000,
84 .pvr_value = 0x00400000,
85 .cpu_name = "POWER3 (630)",
86 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +100087 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +100088 .icache_bsize = 128,
89 .dcache_bsize = 128,
90 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -060091 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +100092 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +000093 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +110094 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +100095 },
96 { /* Power3+ */
97 .pvr_mask = 0xffff0000,
98 .pvr_value = 0x00410000,
99 .cpu_name = "POWER3 (630+)",
100 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000101 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000102 .icache_bsize = 128,
103 .dcache_bsize = 128,
104 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600105 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000106 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000107 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100108 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +1000109 },
110 { /* Northstar */
111 .pvr_mask = 0xffff0000,
112 .pvr_value = 0x00330000,
113 .cpu_name = "RS64-II (northstar)",
114 .cpu_features = CPU_FTRS_RS64,
115 .cpu_user_features = COMMON_USER_PPC64,
116 .icache_bsize = 128,
117 .dcache_bsize = 128,
118 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600119 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000120 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000121 .oprofile_type = PPC_OPROFILE_RS64,
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,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100136 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000137 },
138 { /* I-star */
139 .pvr_mask = 0xffff0000,
140 .pvr_value = 0x00360000,
141 .cpu_name = "RS64-III (icestar)",
142 .cpu_features = CPU_FTRS_RS64,
143 .cpu_user_features = COMMON_USER_PPC64,
144 .icache_bsize = 128,
145 .dcache_bsize = 128,
146 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600147 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000148 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000149 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100150 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000151 },
152 { /* S-star */
153 .pvr_mask = 0xffff0000,
154 .pvr_value = 0x00370000,
155 .cpu_name = "RS64-IV (sstar)",
156 .cpu_features = CPU_FTRS_RS64,
157 .cpu_user_features = COMMON_USER_PPC64,
158 .icache_bsize = 128,
159 .dcache_bsize = 128,
160 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600161 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000162 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000163 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100164 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000165 },
166 { /* Power4 */
167 .pvr_mask = 0xffff0000,
168 .pvr_value = 0x00350000,
169 .cpu_name = "POWER4 (gp)",
170 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100171 .cpu_user_features = COMMON_USER_POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000172 .icache_bsize = 128,
173 .dcache_bsize = 128,
174 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600175 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000176 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000177 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100178 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000179 },
180 { /* Power4+ */
181 .pvr_mask = 0xffff0000,
182 .pvr_value = 0x00380000,
183 .cpu_name = "POWER4+ (gq)",
184 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100185 .cpu_user_features = COMMON_USER_POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000186 .icache_bsize = 128,
187 .dcache_bsize = 128,
188 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600189 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000190 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000191 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100192 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000193 },
194 { /* PPC970 */
195 .pvr_mask = 0xffff0000,
196 .pvr_value = 0x00390000,
197 .cpu_name = "PPC970",
198 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100199 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000200 PPC_FEATURE_HAS_ALTIVEC_COMP,
201 .icache_bsize = 128,
202 .dcache_bsize = 128,
203 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600204 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000205 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500206 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000207 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000208 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100209 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000210 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000211 { /* PPC970FX */
212 .pvr_mask = 0xffff0000,
213 .pvr_value = 0x003c0000,
214 .cpu_name = "PPC970FX",
Stephen Rothwell49209602005-10-12 15:55:09 +1000215 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100216 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000217 PPC_FEATURE_HAS_ALTIVEC_COMP,
218 .icache_bsize = 128,
219 .dcache_bsize = 128,
220 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600221 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000222 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500223 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000224 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000225 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100226 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000227 },
Olof Johansson3546e812007-02-26 00:35:14 -0600228 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
229 .pvr_mask = 0xffffffff,
230 .pvr_value = 0x00440100,
231 .cpu_name = "PPC970MP",
232 .cpu_features = CPU_FTRS_PPC970,
233 .cpu_user_features = COMMON_USER_POWER4 |
234 PPC_FEATURE_HAS_ALTIVEC_COMP,
235 .icache_bsize = 128,
236 .dcache_bsize = 128,
237 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000238 .pmc_type = PPC_PMC_IBM,
Olof Johansson3546e812007-02-26 00:35:14 -0600239 .cpu_setup = __setup_cpu_ppc970,
240 .cpu_restore = __restore_cpu_ppc970,
241 .oprofile_cpu_type = "ppc64/970MP",
242 .oprofile_type = PPC_OPROFILE_POWER4,
243 .platform = "ppc970",
244 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000245 { /* PPC970MP */
246 .pvr_mask = 0xffff0000,
247 .pvr_value = 0x00440000,
248 .cpu_name = "PPC970MP",
249 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100250 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000251 PPC_FEATURE_HAS_ALTIVEC_COMP,
252 .icache_bsize = 128,
253 .dcache_bsize = 128,
Anton Blanchard87af41b2006-05-05 05:44:26 +1000254 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000255 .pmc_type = PPC_PMC_IBM,
Olof Johansson5b43d202006-10-04 23:41:41 -0500256 .cpu_setup = __setup_cpu_ppc970MP,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500257 .cpu_restore = __restore_cpu_ppc970,
Mike Wolffecb3522006-11-21 14:41:54 -0600258 .oprofile_cpu_type = "ppc64/970MP",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000259 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100260 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000261 },
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500262 { /* PPC970GX */
263 .pvr_mask = 0xffff0000,
264 .pvr_value = 0x00450000,
265 .cpu_name = "PPC970GX",
266 .cpu_features = CPU_FTRS_PPC970,
267 .cpu_user_features = COMMON_USER_POWER4 |
268 PPC_FEATURE_HAS_ALTIVEC_COMP,
269 .icache_bsize = 128,
270 .dcache_bsize = 128,
271 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600272 .pmc_type = PPC_PMC_IBM,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500273 .cpu_setup = __setup_cpu_ppc970,
274 .oprofile_cpu_type = "ppc64/970",
275 .oprofile_type = PPC_OPROFILE_POWER4,
276 .platform = "ppc970",
277 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100278 { /* Power5 GR */
Stephen Rothwell49209602005-10-12 15:55:09 +1000279 .pvr_mask = 0xffff0000,
280 .pvr_value = 0x003a0000,
281 .cpu_name = "POWER5 (gr)",
282 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100283 .cpu_user_features = COMMON_USER_POWER5,
Stephen Rothwell49209602005-10-12 15:55:09 +1000284 .icache_bsize = 128,
285 .dcache_bsize = 128,
286 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600287 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000288 .oprofile_cpu_type = "ppc64/power5",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000289 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000290 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
291 * and above but only works on POWER5 and above
292 */
293 .oprofile_mmcra_sihv = MMCRA_SIHV,
294 .oprofile_mmcra_sipr = MMCRA_SIPR,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100295 .platform = "power5",
Stephen Rothwell49209602005-10-12 15:55:09 +1000296 },
Mike Wolf31a12ce2007-07-10 13:13:47 -0500297 { /* Power5++ */
298 .pvr_mask = 0xffffff00,
299 .pvr_value = 0x003b0300,
300 .cpu_name = "POWER5+ (gs)",
301 .cpu_features = CPU_FTRS_POWER5,
302 .cpu_user_features = COMMON_USER_POWER5_PLUS,
303 .icache_bsize = 128,
304 .dcache_bsize = 128,
305 .num_pmcs = 6,
306 .oprofile_cpu_type = "ppc64/power5++",
307 .oprofile_type = PPC_OPROFILE_POWER4,
308 .oprofile_mmcra_sihv = MMCRA_SIHV,
309 .oprofile_mmcra_sipr = MMCRA_SIPR,
310 .platform = "power5+",
311 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100312 { /* Power5 GS */
Stephen Rothwell49209602005-10-12 15:55:09 +1000313 .pvr_mask = 0xffff0000,
314 .pvr_value = 0x003b0000,
Anton Blanchard834608f2006-01-09 15:42:30 +1100315 .cpu_name = "POWER5+ (gs)",
Stephen Rothwell49209602005-10-12 15:55:09 +1000316 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100317 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Stephen Rothwell49209602005-10-12 15:55:09 +1000318 .icache_bsize = 128,
319 .dcache_bsize = 128,
320 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600321 .pmc_type = PPC_PMC_IBM,
Anton Blanchard834608f2006-01-09 15:42:30 +1100322 .oprofile_cpu_type = "ppc64/power5+",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000323 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000324 .oprofile_mmcra_sihv = MMCRA_SIHV,
325 .oprofile_mmcra_sipr = MMCRA_SIPR,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100326 .platform = "power5+",
Stephen Rothwell49209602005-10-12 15:55:09 +1000327 },
Paul Mackerras974a76f2006-11-10 20:38:53 +1100328 { /* POWER6 in P5+ mode; 2.04-compliant processor */
329 .pvr_mask = 0xffffffff,
330 .pvr_value = 0x0f000001,
331 .cpu_name = "POWER5+",
332 .cpu_features = CPU_FTRS_POWER5,
333 .cpu_user_features = COMMON_USER_POWER5_PLUS,
334 .icache_bsize = 128,
335 .dcache_bsize = 128,
336 .num_pmcs = 6,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000337 .pmc_type = PPC_PMC_IBM,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100338 .oprofile_cpu_type = "ppc64/power6",
339 .oprofile_type = PPC_OPROFILE_POWER4,
340 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
341 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
342 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
343 POWER6_MMCRA_OTHER,
344 .platform = "power5+",
345 },
Anton Blanchard03054d52006-04-29 09:51:06 +1000346 { /* Power6 */
347 .pvr_mask = 0xffff0000,
348 .pvr_value = 0x003e0000,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100349 .cpu_name = "POWER6 (raw)",
350 .cpu_features = CPU_FTRS_POWER6,
351 .cpu_user_features = COMMON_USER_POWER6 |
352 PPC_FEATURE_POWER6_EXT,
353 .icache_bsize = 128,
354 .dcache_bsize = 128,
355 .num_pmcs = 6,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000356 .pmc_type = PPC_PMC_IBM,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100357 .oprofile_cpu_type = "ppc64/power6",
358 .oprofile_type = PPC_OPROFILE_POWER4,
359 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
360 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
361 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
362 POWER6_MMCRA_OTHER,
363 .platform = "power6x",
364 },
365 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
366 .pvr_mask = 0xffffffff,
367 .pvr_value = 0x0f000002,
368 .cpu_name = "POWER6 (architected)",
Anton Blanchard03054d52006-04-29 09:51:06 +1000369 .cpu_features = CPU_FTRS_POWER6,
370 .cpu_user_features = COMMON_USER_POWER6,
371 .icache_bsize = 128,
372 .dcache_bsize = 128,
Anton Blanchard99f48612006-10-13 12:13:12 +1000373 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600374 .pmc_type = PPC_PMC_IBM,
Anton Blanchard03054d52006-04-29 09:51:06 +1000375 .oprofile_cpu_type = "ppc64/power6",
376 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000377 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
378 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
379 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
380 POWER6_MMCRA_OTHER,
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,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100397 .platform = "ppc-cell-be",
Stephen Rothwell49209602005-10-12 15:55:09 +1000398 },
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500399 { /* PA Semi PA6T */
400 .pvr_mask = 0x7fff0000,
401 .pvr_value = 0x00900000,
402 .cpu_name = "PA6T",
403 .cpu_features = CPU_FTRS_PA6T,
404 .cpu_user_features = COMMON_USER_PA6T,
405 .icache_bsize = 64,
406 .dcache_bsize = 64,
407 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600408 .pmc_type = PPC_PMC_PA6T,
Olof Johansson11999192007-02-04 16:36:51 -0600409 .cpu_setup = __setup_cpu_pa6t,
410 .cpu_restore = __restore_cpu_pa6t,
Olof Johansson25fc5302007-04-18 16:38:21 +1000411 .oprofile_cpu_type = "ppc64/pa6t",
412 .oprofile_type = PPC_OPROFILE_PA6T,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500413 .platform = "pa6t",
414 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000415 { /* default match */
416 .pvr_mask = 0x00000000,
417 .pvr_value = 0x00000000,
418 .cpu_name = "POWER4 (compatible)",
419 .cpu_features = CPU_FTRS_COMPATIBLE,
420 .cpu_user_features = COMMON_USER_PPC64,
421 .icache_bsize = 128,
422 .dcache_bsize = 128,
423 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600424 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100425 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000426 }
427#endif /* CONFIG_PPC64 */
428#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -0700429#if CLASSIC_PPC
Stephen Rothwell49209602005-10-12 15:55:09 +1000430 { /* 601 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700431 .pvr_mask = 0xffff0000,
432 .pvr_value = 0x00010000,
433 .cpu_name = "601",
Kumar Gala10b35d92005-09-23 14:08:58 -0500434 .cpu_features = CPU_FTRS_PPC601,
Stephen Rothwell49209602005-10-12 15:55:09 +1000435 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
Paul Mackerras98599012005-10-22 16:51:34 +1000436 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700437 .icache_bsize = 32,
438 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100439 .platform = "ppc601",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700440 },
441 { /* 603 */
442 .pvr_mask = 0xffff0000,
443 .pvr_value = 0x00030000,
444 .cpu_name = "603",
Kumar Gala10b35d92005-09-23 14:08:58 -0500445 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000446 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700447 .icache_bsize = 32,
448 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100449 .cpu_setup = __setup_cpu_603,
450 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700451 },
452 { /* 603e */
453 .pvr_mask = 0xffff0000,
454 .pvr_value = 0x00060000,
455 .cpu_name = "603e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500456 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000457 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700458 .icache_bsize = 32,
459 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100460 .cpu_setup = __setup_cpu_603,
461 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700462 },
463 { /* 603ev */
464 .pvr_mask = 0xffff0000,
465 .pvr_value = 0x00070000,
466 .cpu_name = "603ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500467 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000468 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700469 .icache_bsize = 32,
470 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100471 .cpu_setup = __setup_cpu_603,
472 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700473 },
474 { /* 604 */
475 .pvr_mask = 0xffff0000,
476 .pvr_value = 0x00040000,
477 .cpu_name = "604",
Kumar Gala10b35d92005-09-23 14:08:58 -0500478 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000479 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700480 .icache_bsize = 32,
481 .dcache_bsize = 32,
482 .num_pmcs = 2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100483 .cpu_setup = __setup_cpu_604,
484 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700485 },
486 { /* 604e */
487 .pvr_mask = 0xfffff000,
488 .pvr_value = 0x00090000,
489 .cpu_name = "604e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500490 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000491 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700492 .icache_bsize = 32,
493 .dcache_bsize = 32,
494 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100495 .cpu_setup = __setup_cpu_604,
496 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700497 },
498 { /* 604r */
499 .pvr_mask = 0xffff0000,
500 .pvr_value = 0x00090000,
501 .cpu_name = "604r",
Kumar Gala10b35d92005-09-23 14:08:58 -0500502 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000503 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700504 .icache_bsize = 32,
505 .dcache_bsize = 32,
506 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100507 .cpu_setup = __setup_cpu_604,
508 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700509 },
510 { /* 604ev */
511 .pvr_mask = 0xffff0000,
512 .pvr_value = 0x000a0000,
513 .cpu_name = "604ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500514 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000515 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700516 .icache_bsize = 32,
517 .dcache_bsize = 32,
518 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100519 .cpu_setup = __setup_cpu_604,
520 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700521 },
522 { /* 740/750 (0x4202, don't support TAU ?) */
523 .pvr_mask = 0xffffffff,
524 .pvr_value = 0x00084202,
525 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500526 .cpu_features = CPU_FTRS_740_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000527 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700528 .icache_bsize = 32,
529 .dcache_bsize = 32,
530 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100531 .cpu_setup = __setup_cpu_750,
532 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700533 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700534 { /* 750CX (80100 and 8010x?) */
535 .pvr_mask = 0xfffffff0,
536 .pvr_value = 0x00080100,
537 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500538 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000539 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700540 .icache_bsize = 32,
541 .dcache_bsize = 32,
542 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100543 .cpu_setup = __setup_cpu_750cx,
544 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700545 },
546 { /* 750CX (82201 and 82202) */
547 .pvr_mask = 0xfffffff0,
548 .pvr_value = 0x00082200,
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,
556 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700557 },
558 { /* 750CXe (82214) */
559 .pvr_mask = 0xfffffff0,
560 .pvr_value = 0x00082210,
561 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500562 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000563 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700564 .icache_bsize = 32,
565 .dcache_bsize = 32,
566 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100567 .cpu_setup = __setup_cpu_750cx,
568 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700569 },
Arthur Othieno7c316252005-09-03 15:55:52 -0700570 { /* 750CXe "Gekko" (83214) */
571 .pvr_mask = 0xffffffff,
572 .pvr_value = 0x00083214,
573 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500574 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000575 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Arthur Othieno7c316252005-09-03 15:55:52 -0700576 .icache_bsize = 32,
577 .dcache_bsize = 32,
578 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100579 .cpu_setup = __setup_cpu_750cx,
580 .platform = "ppc750",
Arthur Othieno7c316252005-09-03 15:55:52 -0700581 },
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500582 { /* 750CL */
583 .pvr_mask = 0xfffff0f0,
584 .pvr_value = 0x00087010,
585 .cpu_name = "750CL",
Josh Boyera14c4502007-04-13 04:33:25 +1000586 .cpu_features = CPU_FTRS_750CL,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500587 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
588 .icache_bsize = 32,
589 .dcache_bsize = 32,
590 .num_pmcs = 4,
Josh Boyera14c4502007-04-13 04:33:25 +1000591 .cpu_setup = __setup_cpu_750,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500592 .platform = "ppc750",
593 },
Arthur Othienoac1ff042005-09-03 15:55:51 -0700594 { /* 745/755 */
595 .pvr_mask = 0xfffff000,
596 .pvr_value = 0x00083000,
597 .cpu_name = "745/755",
Kumar Gala10b35d92005-09-23 14:08:58 -0500598 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000599 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Arthur Othienoac1ff042005-09-03 15:55:51 -0700600 .icache_bsize = 32,
601 .dcache_bsize = 32,
602 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100603 .cpu_setup = __setup_cpu_750,
604 .platform = "ppc750",
Arthur Othienoac1ff042005-09-03 15:55:51 -0700605 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700606 { /* 750FX rev 1.x */
607 .pvr_mask = 0xffffff00,
608 .pvr_value = 0x70000100,
609 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500610 .cpu_features = CPU_FTRS_750FX1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000611 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700612 .icache_bsize = 32,
613 .dcache_bsize = 32,
614 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100615 .cpu_setup = __setup_cpu_750,
616 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700617 },
618 { /* 750FX rev 2.0 must disable HID0[DPM] */
619 .pvr_mask = 0xffffffff,
620 .pvr_value = 0x70000200,
621 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500622 .cpu_features = CPU_FTRS_750FX2,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000623 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700624 .icache_bsize = 32,
625 .dcache_bsize = 32,
626 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100627 .cpu_setup = __setup_cpu_750,
628 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700629 },
630 { /* 750FX (All revs except 2.0) */
631 .pvr_mask = 0xffff0000,
632 .pvr_value = 0x70000000,
633 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500634 .cpu_features = CPU_FTRS_750FX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000635 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700636 .icache_bsize = 32,
637 .dcache_bsize = 32,
638 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100639 .cpu_setup = __setup_cpu_750fx,
640 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700641 },
642 { /* 750GX */
643 .pvr_mask = 0xffff0000,
644 .pvr_value = 0x70020000,
645 .cpu_name = "750GX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500646 .cpu_features = CPU_FTRS_750GX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000647 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700648 .icache_bsize = 32,
649 .dcache_bsize = 32,
650 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100651 .cpu_setup = __setup_cpu_750fx,
652 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700653 },
654 { /* 740/750 (L2CR bit need fixup for 740) */
655 .pvr_mask = 0xffff0000,
656 .pvr_value = 0x00080000,
657 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500658 .cpu_features = CPU_FTRS_740,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000659 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700660 .icache_bsize = 32,
661 .dcache_bsize = 32,
662 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100663 .cpu_setup = __setup_cpu_750,
664 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700665 },
666 { /* 7400 rev 1.1 ? (no TAU) */
667 .pvr_mask = 0xffffffff,
668 .pvr_value = 0x000c1101,
669 .cpu_name = "7400 (1.1)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500670 .cpu_features = CPU_FTRS_7400_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000671 .cpu_user_features = COMMON_USER |
672 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700673 .icache_bsize = 32,
674 .dcache_bsize = 32,
675 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100676 .cpu_setup = __setup_cpu_7400,
677 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700678 },
679 { /* 7400 */
680 .pvr_mask = 0xffff0000,
681 .pvr_value = 0x000c0000,
682 .cpu_name = "7400",
Kumar Gala10b35d92005-09-23 14:08:58 -0500683 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000684 .cpu_user_features = COMMON_USER |
685 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700686 .icache_bsize = 32,
687 .dcache_bsize = 32,
688 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100689 .cpu_setup = __setup_cpu_7400,
690 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700691 },
692 { /* 7410 */
693 .pvr_mask = 0xffff0000,
694 .pvr_value = 0x800c0000,
695 .cpu_name = "7410",
Kumar Gala10b35d92005-09-23 14:08:58 -0500696 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000697 .cpu_user_features = COMMON_USER |
698 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700699 .icache_bsize = 32,
700 .dcache_bsize = 32,
701 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100702 .cpu_setup = __setup_cpu_7410,
703 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700704 },
705 { /* 7450 2.0 - no doze/nap */
706 .pvr_mask = 0xffffffff,
707 .pvr_value = 0x80000200,
708 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500709 .cpu_features = CPU_FTRS_7450_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000710 .cpu_user_features = COMMON_USER |
711 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700712 .icache_bsize = 32,
713 .dcache_bsize = 32,
714 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600715 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600716 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000717 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100718 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700719 },
720 { /* 7450 2.1 */
721 .pvr_mask = 0xffffffff,
722 .pvr_value = 0x80000201,
723 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500724 .cpu_features = CPU_FTRS_7450_21,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000725 .cpu_user_features = COMMON_USER |
726 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700727 .icache_bsize = 32,
728 .dcache_bsize = 32,
729 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600730 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600731 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000732 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100733 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700734 },
735 { /* 7450 2.3 and newer */
736 .pvr_mask = 0xffff0000,
737 .pvr_value = 0x80000000,
738 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500739 .cpu_features = CPU_FTRS_7450_23,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000740 .cpu_user_features = COMMON_USER |
741 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700742 .icache_bsize = 32,
743 .dcache_bsize = 32,
744 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600745 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600746 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000747 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100748 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700749 },
750 { /* 7455 rev 1.x */
751 .pvr_mask = 0xffffff00,
752 .pvr_value = 0x80010100,
753 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500754 .cpu_features = CPU_FTRS_7455_1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000755 .cpu_user_features = COMMON_USER |
756 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700757 .icache_bsize = 32,
758 .dcache_bsize = 32,
759 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600760 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600761 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000762 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100763 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700764 },
765 { /* 7455 rev 2.0 */
766 .pvr_mask = 0xffffffff,
767 .pvr_value = 0x80010200,
768 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500769 .cpu_features = CPU_FTRS_7455_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000770 .cpu_user_features = COMMON_USER |
771 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700772 .icache_bsize = 32,
773 .dcache_bsize = 32,
774 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600775 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600776 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000777 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100778 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700779 },
780 { /* 7455 others */
781 .pvr_mask = 0xffff0000,
782 .pvr_value = 0x80010000,
783 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500784 .cpu_features = CPU_FTRS_7455,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000785 .cpu_user_features = COMMON_USER |
786 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700787 .icache_bsize = 32,
788 .dcache_bsize = 32,
789 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600790 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600791 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000792 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100793 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700794 },
795 { /* 7447/7457 Rev 1.0 */
796 .pvr_mask = 0xffffffff,
797 .pvr_value = 0x80020100,
798 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500799 .cpu_features = CPU_FTRS_7447_10,
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,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100808 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700809 },
810 { /* 7447/7457 Rev 1.1 */
811 .pvr_mask = 0xffffffff,
812 .pvr_value = 0x80020101,
813 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500814 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000815 .cpu_user_features = COMMON_USER |
816 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700817 .icache_bsize = 32,
818 .dcache_bsize = 32,
819 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600820 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600821 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000822 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100823 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700824 },
825 { /* 7447/7457 Rev 1.2 and later */
826 .pvr_mask = 0xffff0000,
827 .pvr_value = 0x80020000,
828 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500829 .cpu_features = CPU_FTRS_7447,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000830 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700831 .icache_bsize = 32,
832 .dcache_bsize = 32,
833 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600834 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600835 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000836 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100837 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700838 },
839 { /* 7447A */
840 .pvr_mask = 0xffff0000,
841 .pvr_value = 0x80030000,
842 .cpu_name = "7447A",
Kumar Gala10b35d92005-09-23 14:08:58 -0500843 .cpu_features = CPU_FTRS_7447A,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000844 .cpu_user_features = COMMON_USER |
845 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700846 .icache_bsize = 32,
847 .dcache_bsize = 32,
848 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600849 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600850 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000851 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100852 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700853 },
Kumar Galabbde6302005-09-03 15:55:55 -0700854 { /* 7448 */
855 .pvr_mask = 0xffff0000,
856 .pvr_value = 0x80040000,
857 .cpu_name = "7448",
James.Yang3d372542007-05-02 16:34:43 -0500858 .cpu_features = CPU_FTRS_7448,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000859 .cpu_user_features = COMMON_USER |
860 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Kumar Galabbde6302005-09-03 15:55:55 -0700861 .icache_bsize = 32,
862 .dcache_bsize = 32,
863 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600864 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600865 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000866 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100867 .platform = "ppc7450",
Kumar Galabbde6302005-09-03 15:55:55 -0700868 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700869 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
870 .pvr_mask = 0x7fff0000,
871 .pvr_value = 0x00810000,
872 .cpu_name = "82xx",
Kumar Gala10b35d92005-09-23 14:08:58 -0500873 .cpu_features = CPU_FTRS_82XX,
Stephen Rothwell49209602005-10-12 15:55:09 +1000874 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700875 .icache_bsize = 32,
876 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100877 .cpu_setup = __setup_cpu_603,
878 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700879 },
880 { /* All G2_LE (603e core, plus some) have the same pvr */
881 .pvr_mask = 0x7fff0000,
882 .pvr_value = 0x00820000,
883 .cpu_name = "G2_LE",
Kumar Gala10b35d92005-09-23 14:08:58 -0500884 .cpu_features = CPU_FTRS_G2_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000885 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700886 .icache_bsize = 32,
887 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100888 .cpu_setup = __setup_cpu_603,
889 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700890 },
Kim Phillips6c4a2502006-10-02 20:10:24 -0500891 { /* e300c1 (a 603e core, plus some) on 83xx */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700892 .pvr_mask = 0x7fff0000,
893 .pvr_value = 0x00830000,
Kim Phillips6c4a2502006-10-02 20:10:24 -0500894 .cpu_name = "e300c1",
Kumar Gala10b35d92005-09-23 14:08:58 -0500895 .cpu_features = CPU_FTRS_E300,
Stephen Rothwell49209602005-10-12 15:55:09 +1000896 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700897 .icache_bsize = 32,
898 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100899 .cpu_setup = __setup_cpu_603,
900 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700901 },
Kim Phillips6c4a2502006-10-02 20:10:24 -0500902 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
903 .pvr_mask = 0x7fff0000,
904 .pvr_value = 0x00840000,
905 .cpu_name = "e300c2",
Kim Phillipsaa42c692006-12-08 02:43:30 -0600906 .cpu_features = CPU_FTRS_E300C2,
Kim Phillips6c4a2502006-10-02 20:10:24 -0500907 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
908 .icache_bsize = 32,
909 .dcache_bsize = 32,
910 .cpu_setup = __setup_cpu_603,
911 .platform = "ppc603",
912 },
Scott Wood57933f82006-12-01 12:57:05 -0600913 { /* e300c3 on 83xx */
914 .pvr_mask = 0x7fff0000,
915 .pvr_value = 0x00850000,
916 .cpu_name = "e300c3",
917 .cpu_features = CPU_FTRS_E300,
918 .cpu_user_features = COMMON_USER,
919 .icache_bsize = 32,
920 .dcache_bsize = 32,
921 .cpu_setup = __setup_cpu_603,
922 .platform = "ppc603",
923 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700924 { /* default match, we assume split I/D cache & TB (non-601)... */
925 .pvr_mask = 0x00000000,
926 .pvr_value = 0x00000000,
927 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500928 .cpu_features = CPU_FTRS_CLASSIC32,
Stephen Rothwell49209602005-10-12 15:55:09 +1000929 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700930 .icache_bsize = 32,
931 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100932 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700933 },
934#endif /* CLASSIC_PPC */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700935#ifdef CONFIG_8xx
936 { /* 8xx */
937 .pvr_mask = 0xffff0000,
938 .pvr_value = 0x00500000,
939 .cpu_name = "8xx",
940 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
941 * if the 8xx code is there.... */
Kumar Gala10b35d92005-09-23 14:08:58 -0500942 .cpu_features = CPU_FTRS_8XX,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700943 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
944 .icache_bsize = 16,
945 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100946 .platform = "ppc823",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700947 },
948#endif /* CONFIG_8xx */
949#ifdef CONFIG_40x
950 { /* 403GC */
951 .pvr_mask = 0xffffff00,
952 .pvr_value = 0x00200200,
953 .cpu_name = "403GC",
Kumar Gala10b35d92005-09-23 14:08:58 -0500954 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700955 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
956 .icache_bsize = 16,
957 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100958 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700959 },
960 { /* 403GCX */
961 .pvr_mask = 0xffffff00,
962 .pvr_value = 0x00201400,
963 .cpu_name = "403GCX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500964 .cpu_features = CPU_FTRS_40X,
Paul Mackerras98599012005-10-22 16:51:34 +1000965 .cpu_user_features = PPC_FEATURE_32 |
966 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700967 .icache_bsize = 16,
968 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100969 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700970 },
971 { /* 403G ?? */
972 .pvr_mask = 0xffff0000,
973 .pvr_value = 0x00200000,
974 .cpu_name = "403G ??",
Kumar Gala10b35d92005-09-23 14:08:58 -0500975 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700976 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
977 .icache_bsize = 16,
978 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100979 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700980 },
981 { /* 405GP */
982 .pvr_mask = 0xffff0000,
983 .pvr_value = 0x40110000,
984 .cpu_name = "405GP",
Kumar Gala10b35d92005-09-23 14:08:58 -0500985 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700986 .cpu_user_features = PPC_FEATURE_32 |
987 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
988 .icache_bsize = 32,
989 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100990 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700991 },
992 { /* STB 03xxx */
993 .pvr_mask = 0xffff0000,
994 .pvr_value = 0x40130000,
995 .cpu_name = "STB03xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -0500996 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700997 .cpu_user_features = PPC_FEATURE_32 |
998 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
999 .icache_bsize = 32,
1000 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001001 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001002 },
1003 { /* STB 04xxx */
1004 .pvr_mask = 0xffff0000,
1005 .pvr_value = 0x41810000,
1006 .cpu_name = "STB04xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001007 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001008 .cpu_user_features = PPC_FEATURE_32 |
1009 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1010 .icache_bsize = 32,
1011 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001012 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001013 },
1014 { /* NP405L */
1015 .pvr_mask = 0xffff0000,
1016 .pvr_value = 0x41610000,
1017 .cpu_name = "NP405L",
Kumar Gala10b35d92005-09-23 14:08:58 -05001018 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001019 .cpu_user_features = PPC_FEATURE_32 |
1020 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1021 .icache_bsize = 32,
1022 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001023 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001024 },
1025 { /* NP4GS3 */
1026 .pvr_mask = 0xffff0000,
1027 .pvr_value = 0x40B10000,
1028 .cpu_name = "NP4GS3",
Kumar Gala10b35d92005-09-23 14:08:58 -05001029 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001030 .cpu_user_features = PPC_FEATURE_32 |
1031 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1032 .icache_bsize = 32,
1033 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001034 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001035 },
1036 { /* NP405H */
1037 .pvr_mask = 0xffff0000,
1038 .pvr_value = 0x41410000,
1039 .cpu_name = "NP405H",
Kumar Gala10b35d92005-09-23 14:08:58 -05001040 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001041 .cpu_user_features = PPC_FEATURE_32 |
1042 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1043 .icache_bsize = 32,
1044 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001045 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001046 },
1047 { /* 405GPr */
1048 .pvr_mask = 0xffff0000,
1049 .pvr_value = 0x50910000,
1050 .cpu_name = "405GPr",
Kumar Gala10b35d92005-09-23 14:08:58 -05001051 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001052 .cpu_user_features = PPC_FEATURE_32 |
1053 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1054 .icache_bsize = 32,
1055 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001056 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001057 },
1058 { /* STBx25xx */
1059 .pvr_mask = 0xffff0000,
1060 .pvr_value = 0x51510000,
1061 .cpu_name = "STBx25xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001062 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001063 .cpu_user_features = PPC_FEATURE_32 |
1064 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1065 .icache_bsize = 32,
1066 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001067 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001068 },
1069 { /* 405LP */
1070 .pvr_mask = 0xffff0000,
1071 .pvr_value = 0x41F10000,
1072 .cpu_name = "405LP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001073 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001074 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1075 .icache_bsize = 32,
1076 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001077 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001078 },
1079 { /* Xilinx Virtex-II Pro */
Grant C. Likely72646c72006-01-19 01:13:20 -07001080 .pvr_mask = 0xfffff000,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001081 .pvr_value = 0x20010000,
1082 .cpu_name = "Virtex-II Pro",
Kumar Gala10b35d92005-09-23 14:08:58 -05001083 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001084 .cpu_user_features = PPC_FEATURE_32 |
1085 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1086 .icache_bsize = 32,
1087 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001088 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001089 },
Grant C. Likely72646c72006-01-19 01:13:20 -07001090 { /* Xilinx Virtex-4 FX */
1091 .pvr_mask = 0xfffff000,
1092 .pvr_value = 0x20011000,
1093 .cpu_name = "Virtex-4 FX",
1094 .cpu_features = CPU_FTRS_40X,
1095 .cpu_user_features = PPC_FEATURE_32 |
1096 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1097 .icache_bsize = 32,
1098 .dcache_bsize = 32,
Peter Bergner838fdb42006-09-14 14:18:38 -05001099 .platform = "ppc405",
Grant C. Likely72646c72006-01-19 01:13:20 -07001100 },
Eugene Suroveginad95d602005-06-07 13:22:09 -07001101 { /* 405EP */
1102 .pvr_mask = 0xffff0000,
1103 .pvr_value = 0x51210000,
1104 .cpu_name = "405EP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001105 .cpu_features = CPU_FTRS_40X,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001106 .cpu_user_features = PPC_FEATURE_32 |
1107 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1108 .icache_bsize = 32,
1109 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001110 .platform = "ppc405",
Eugene Suroveginad95d602005-06-07 13:22:09 -07001111 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001112
1113#endif /* CONFIG_40x */
1114#ifdef CONFIG_44x
Matt Porterc9cf73a2005-07-31 22:34:52 -07001115 {
1116 .pvr_mask = 0xf0000fff,
1117 .pvr_value = 0x40000850,
1118 .cpu_name = "440EP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001119 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001120 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001121 .icache_bsize = 32,
1122 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001123 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001124 },
1125 {
1126 .pvr_mask = 0xf0000fff,
1127 .pvr_value = 0x400008d3,
1128 .cpu_name = "440EP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001129 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001130 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001131 .icache_bsize = 32,
1132 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001133 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001134 },
Valentine Barshak15fc9932007-08-29 17:40:30 +04001135 { /* 440EPX */
1136 .pvr_mask = 0xf0000ffb,
1137 .pvr_value = 0x200008D0,
1138 .cpu_name = "440EPX",
1139 .cpu_features = CPU_FTRS_44X,
1140 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1141 .icache_bsize = 32,
1142 .dcache_bsize = 32,
1143 },
1144 { /* 440GRX */
1145 .pvr_mask = 0xf0000ffb,
1146 .pvr_value = 0x200008D8,
1147 .cpu_name = "440GRX",
1148 .cpu_features = CPU_FTRS_44X,
1149 .cpu_user_features = COMMON_USER_BOOKE,
1150 .icache_bsize = 32,
1151 .dcache_bsize = 32,
1152 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001153 { /* 440GP Rev. B */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001154 .pvr_mask = 0xf0000fff,
1155 .pvr_value = 0x40000440,
1156 .cpu_name = "440GP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001157 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001158 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001159 .icache_bsize = 32,
1160 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001161 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001162 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001163 { /* 440GP Rev. C */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001164 .pvr_mask = 0xf0000fff,
1165 .pvr_value = 0x40000481,
1166 .cpu_name = "440GP Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001167 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001168 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001169 .icache_bsize = 32,
1170 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001171 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001172 },
1173 { /* 440GX Rev. A */
1174 .pvr_mask = 0xf0000fff,
1175 .pvr_value = 0x50000850,
1176 .cpu_name = "440GX Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001177 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001178 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001179 .icache_bsize = 32,
1180 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001181 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001182 },
1183 { /* 440GX Rev. B */
1184 .pvr_mask = 0xf0000fff,
1185 .pvr_value = 0x50000851,
1186 .cpu_name = "440GX Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001187 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001188 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001189 .icache_bsize = 32,
1190 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001191 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001192 },
1193 { /* 440GX Rev. C */
1194 .pvr_mask = 0xf0000fff,
1195 .pvr_value = 0x50000892,
1196 .cpu_name = "440GX Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001197 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001198 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001199 .icache_bsize = 32,
1200 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001201 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001202 },
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001203 { /* 440GX Rev. F */
1204 .pvr_mask = 0xf0000fff,
1205 .pvr_value = 0x50000894,
1206 .cpu_name = "440GX Rev. F",
Kumar Gala10b35d92005-09-23 14:08:58 -05001207 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001208 .cpu_user_features = COMMON_USER_BOOKE,
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001209 .icache_bsize = 32,
1210 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001211 .platform = "ppc440",
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001212 },
Matt Porter656de7e2005-09-03 15:55:42 -07001213 { /* 440SP Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001214 .pvr_mask = 0xfff00fff,
1215 .pvr_value = 0x53200891,
Matt Porter656de7e2005-09-03 15:55:42 -07001216 .cpu_name = "440SP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001217 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001218 .cpu_user_features = COMMON_USER_BOOKE,
Matt Porter656de7e2005-09-03 15:55:42 -07001219 .icache_bsize = 32,
1220 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001221 .platform = "ppc440",
Matt Porter656de7e2005-09-03 15:55:42 -07001222 },
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001223 { /* 440SPe Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001224 .pvr_mask = 0xfff00fff,
1225 .pvr_value = 0x53400890,
1226 .cpu_name = "440SPe Rev. A",
1227 .cpu_features = CPU_FTRS_44X,
1228 .cpu_user_features = COMMON_USER_BOOKE,
1229 .icache_bsize = 32,
1230 .dcache_bsize = 32,
1231 .platform = "ppc440",
1232 },
1233 { /* 440SPe Rev. B */
1234 .pvr_mask = 0xfff00fff,
1235 .pvr_value = 0x53400891,
1236 .cpu_name = "440SPe Rev. B",
Kumar Galaa147c582006-12-08 02:34:38 -06001237 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001238 .cpu_user_features = COMMON_USER_BOOKE,
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001239 .icache_bsize = 32,
1240 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001241 .platform = "ppc440",
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001242 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001243#endif /* CONFIG_44x */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001244#ifdef CONFIG_FSL_BOOKE
Stephen Rothwell49209602005-10-12 15:55:09 +10001245 { /* e200z5 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001246 .pvr_mask = 0xfff00000,
1247 .pvr_value = 0x81000000,
1248 .cpu_name = "e200z5",
1249 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001250 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001251 .cpu_user_features = COMMON_USER_BOOKE |
1252 PPC_FEATURE_HAS_EFP_SINGLE |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001253 PPC_FEATURE_UNIFIED_CACHE,
1254 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001255 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001256 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001257 { /* e200z6 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001258 .pvr_mask = 0xfff00000,
1259 .pvr_value = 0x81100000,
1260 .cpu_name = "e200z6",
1261 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001262 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001263 .cpu_user_features = COMMON_USER_BOOKE |
1264 PPC_FEATURE_SPE_COMP |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001265 PPC_FEATURE_HAS_EFP_SINGLE |
1266 PPC_FEATURE_UNIFIED_CACHE,
1267 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001268 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001269 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001270 { /* e500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001271 .pvr_mask = 0xffff0000,
1272 .pvr_value = 0x80200000,
1273 .cpu_name = "e500",
1274 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001275 .cpu_features = CPU_FTRS_E500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001276 .cpu_user_features = COMMON_USER_BOOKE |
1277 PPC_FEATURE_SPE_COMP |
Linus Torvalds1da177e2005-04-16 15:20:36 -07001278 PPC_FEATURE_HAS_EFP_SINGLE,
1279 .icache_bsize = 32,
1280 .dcache_bsize = 32,
1281 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001282 .oprofile_cpu_type = "ppc/e500",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001283 .oprofile_type = PPC_OPROFILE_BOOKE,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001284 .platform = "ppc8540",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001285 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001286 { /* e500v2 */
Kumar Gala5b37b702005-06-21 17:15:18 -07001287 .pvr_mask = 0xffff0000,
1288 .pvr_value = 0x80210000,
1289 .cpu_name = "e500v2",
1290 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001291 .cpu_features = CPU_FTRS_E500_2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001292 .cpu_user_features = COMMON_USER_BOOKE |
1293 PPC_FEATURE_SPE_COMP |
1294 PPC_FEATURE_HAS_EFP_SINGLE |
1295 PPC_FEATURE_HAS_EFP_DOUBLE,
Kumar Gala5b37b702005-06-21 17:15:18 -07001296 .icache_bsize = 32,
1297 .dcache_bsize = 32,
1298 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001299 .oprofile_cpu_type = "ppc/e500",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001300 .oprofile_type = PPC_OPROFILE_BOOKE,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001301 .platform = "ppc8548",
Kumar Gala5b37b702005-06-21 17:15:18 -07001302 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001303#endif
1304#if !CLASSIC_PPC
1305 { /* default match */
1306 .pvr_mask = 0x00000000,
1307 .pvr_value = 0x00000000,
1308 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -05001309 .cpu_features = CPU_FTRS_GENERIC_32,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001310 .cpu_user_features = PPC_FEATURE_32,
1311 .icache_bsize = 32,
1312 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001313 .platform = "powerpc",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001314 }
1315#endif /* !CLASSIC_PPC */
Stephen Rothwell49209602005-10-12 15:55:09 +10001316#endif /* CONFIG_PPC32 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001317};
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001318
Paul Mackerras974a76f2006-11-10 20:38:53 +11001319struct cpu_spec *identify_cpu(unsigned long offset, unsigned int pvr)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001320{
1321 struct cpu_spec *s = cpu_specs;
1322 struct cpu_spec **cur = &cur_cpu_spec;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001323 int i;
1324
1325 s = PTRRELOC(s);
1326 cur = PTRRELOC(cur);
1327
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001328 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
1329 if ((pvr & s->pvr_mask) == s->pvr_value) {
1330 *cur = cpu_specs + i;
1331#ifdef CONFIG_PPC64
1332 /* ppc64 expects identify_cpu to also call setup_cpu
1333 * for that processor. I will consolidate that at a
1334 * later time, for now, just use our friend #ifdef.
1335 * we also don't need to PTRRELOC the function pointer
1336 * on ppc64 as we are running at 0 in real mode.
1337 */
1338 if (s->cpu_setup) {
1339 s->cpu_setup(offset, s);
1340 }
1341#endif /* CONFIG_PPC64 */
1342 return s;
1343 }
1344 BUG();
1345 return NULL;
1346}
1347
Benjamin Herrenschmidt0909c8c2006-10-20 11:47:18 +10001348void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001349{
1350 struct fixup_entry {
1351 unsigned long mask;
1352 unsigned long value;
Benjamin Herrenschmidt0909c8c2006-10-20 11:47:18 +10001353 long start_off;
1354 long end_off;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001355 } *fcur, *fend;
1356
1357 fcur = fixup_start;
1358 fend = fixup_end;
1359
1360 for (; fcur < fend; fcur++) {
1361 unsigned int *pstart, *pend, *p;
1362
1363 if ((value & fcur->mask) == fcur->value)
1364 continue;
1365
1366 /* These PTRRELOCs will disappear once the new scheme for
1367 * modules and vdso is implemented
1368 */
Benjamin Herrenschmidt0909c8c2006-10-20 11:47:18 +10001369 pstart = ((unsigned int *)fcur) + (fcur->start_off / 4);
1370 pend = ((unsigned int *)fcur) + (fcur->end_off / 4);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001371
1372 for (p = pstart; p < pend; p++) {
1373 *p = 0x60000000u;
1374 asm volatile ("dcbst 0, %0" : : "r" (p));
1375 }
1376 asm volatile ("sync" : : : "memory");
1377 for (p = pstart; p < pend; p++)
1378 asm volatile ("icbi 0,%0" : : "r" (p));
1379 asm volatile ("sync; isync" : : : "memory");
1380 }
1381}