blob: 31283cdab61c836c968ab5d46a7b953a1faf7de5 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Linus Torvalds1da177e2005-04-16 15:20:36 -07002 * Copyright (C) 2001 Ben. Herrenschmidt (benh@kernel.crashing.org)
3 *
Stephen Rothwell49209602005-10-12 15:55:09 +10004 * Modifications for ppc64:
5 * Copyright (C) 2003 Dave Engebretsen <engebret@us.ibm.com>
6 *
Linus Torvalds1da177e2005-04-16 15:20:36 -07007 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version
10 * 2 of the License, or (at your option) any later version.
11 */
12
Linus Torvalds1da177e2005-04-16 15:20:36 -070013#include <linux/string.h>
14#include <linux/sched.h>
15#include <linux/threads.h>
16#include <linux/init.h>
Kumar Gala400d2212005-09-27 15:13:12 -050017#include <linux/module.h>
18
19#include <asm/oprofile_impl.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070020#include <asm/cputable.h>
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +100021#include <asm/prom.h> /* for PTRRELOC on ARCH=ppc */
Linus Torvalds1da177e2005-04-16 15:20:36 -070022
Kumar Gala400d2212005-09-27 15:13:12 -050023struct cpu_spec* cur_cpu_spec = NULL;
Stephen Rothwell49209602005-10-12 15:55:09 +100024EXPORT_SYMBOL(cur_cpu_spec);
Linus Torvalds1da177e2005-04-16 15:20:36 -070025
Stephen Rothwell49209602005-10-12 15:55:09 +100026/* NOTE:
27 * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's
28 * the responsibility of the appropriate CPU save/restore functions to
29 * eventually copy these settings over. Those save/restore aren't yet
30 * part of the cputable though. That has to be fixed for both ppc32
31 * and ppc64
32 */
Geoff Levandb26f1002006-05-19 14:24:18 +100033#ifdef CONFIG_PPC32
Valentine Barshak81127532007-09-22 00:46:57 +100034extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
35extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110036extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
Valentine Barshak340ffd22007-09-22 00:50:09 +100037extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110038extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
Stefan Roese464076a2008-02-24 08:07:41 +110039extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec);
Josh Boyer939e6222008-06-11 07:52:40 -040040extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec);
Kumar Gala400d2212005-09-27 15:13:12 -050041extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
42extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
43extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
44extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
45extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
46extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
47extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
48extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell49209602005-10-12 15:55:09 +100049#endif /* CONFIG_PPC32 */
Olof Johanssonf39b7a52006-08-11 00:07:08 -050050#ifdef CONFIG_PPC64
Kumar Gala400d2212005-09-27 15:13:12 -050051extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
Olof Johansson5b43d202006-10-04 23:41:41 -050052extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
Olof Johansson11999192007-02-04 16:36:51 -060053extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell40d244d2007-02-12 22:10:48 +110054extern void __restore_cpu_pa6t(void);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050055extern void __restore_cpu_ppc970(void);
56#endif /* CONFIG_PPC64 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070057
Linus Torvalds1da177e2005-04-16 15:20:36 -070058/* This table only contains "desktop" CPUs, it need to be filled with embedded
59 * ones as well...
60 */
Stephen Rothwell49209602005-10-12 15:55:09 +100061#define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
62 PPC_FEATURE_HAS_MMU)
63#define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +110064#define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +110065#define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
66 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
67#define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
68 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
Anton Blanchard03054d52006-04-29 09:51:06 +100069#define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
Paul Mackerrasfab5db92006-06-07 16:14:40 +100070 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
71 PPC_FEATURE_TRUE_LE)
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -050072#define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
73 PPC_FEATURE_TRUE_LE | \
74 PPC_FEATURE_HAS_ALTIVEC_COMP)
Paul Mackerras80f15dc2006-01-14 10:11:39 +110075#define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
76 PPC_FEATURE_BOOKE)
Linus Torvalds1da177e2005-04-16 15:20:36 -070077
Paul Mackerras87a72f92007-10-04 14:18:01 +100078static struct cpu_spec __initdata cpu_specs[] = {
Stephen Rothwell49209602005-10-12 15:55:09 +100079#ifdef CONFIG_PPC64
80 { /* Power3 */
81 .pvr_mask = 0xffff0000,
82 .pvr_value = 0x00400000,
83 .cpu_name = "POWER3 (630)",
84 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +100085 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +100086 .icache_bsize = 128,
87 .dcache_bsize = 128,
88 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -060089 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +100090 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +000091 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110092 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +110093 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +100094 },
95 { /* Power3+ */
96 .pvr_mask = 0xffff0000,
97 .pvr_value = 0x00410000,
98 .cpu_name = "POWER3 (630+)",
99 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000100 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000101 .icache_bsize = 128,
102 .dcache_bsize = 128,
103 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600104 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000105 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000106 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100107 .machine_check = machine_check_generic,
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,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100122 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100123 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000124 },
125 { /* Pulsar */
126 .pvr_mask = 0xffff0000,
127 .pvr_value = 0x00340000,
128 .cpu_name = "RS64-III (pulsar)",
129 .cpu_features = CPU_FTRS_RS64,
130 .cpu_user_features = COMMON_USER_PPC64,
131 .icache_bsize = 128,
132 .dcache_bsize = 128,
133 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600134 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000135 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000136 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100137 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100138 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000139 },
140 { /* I-star */
141 .pvr_mask = 0xffff0000,
142 .pvr_value = 0x00360000,
143 .cpu_name = "RS64-III (icestar)",
144 .cpu_features = CPU_FTRS_RS64,
145 .cpu_user_features = COMMON_USER_PPC64,
146 .icache_bsize = 128,
147 .dcache_bsize = 128,
148 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600149 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000150 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000151 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100152 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100153 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000154 },
155 { /* S-star */
156 .pvr_mask = 0xffff0000,
157 .pvr_value = 0x00370000,
158 .cpu_name = "RS64-IV (sstar)",
159 .cpu_features = CPU_FTRS_RS64,
160 .cpu_user_features = COMMON_USER_PPC64,
161 .icache_bsize = 128,
162 .dcache_bsize = 128,
163 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600164 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000165 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000166 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100167 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100168 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000169 },
170 { /* Power4 */
171 .pvr_mask = 0xffff0000,
172 .pvr_value = 0x00350000,
173 .cpu_name = "POWER4 (gp)",
174 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100175 .cpu_user_features = COMMON_USER_POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000176 .icache_bsize = 128,
177 .dcache_bsize = 128,
178 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600179 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000180 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000181 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100182 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100183 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000184 },
185 { /* Power4+ */
186 .pvr_mask = 0xffff0000,
187 .pvr_value = 0x00380000,
188 .cpu_name = "POWER4+ (gq)",
189 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100190 .cpu_user_features = COMMON_USER_POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000191 .icache_bsize = 128,
192 .dcache_bsize = 128,
193 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600194 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000195 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000196 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100197 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100198 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000199 },
200 { /* PPC970 */
201 .pvr_mask = 0xffff0000,
202 .pvr_value = 0x00390000,
203 .cpu_name = "PPC970",
204 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100205 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000206 PPC_FEATURE_HAS_ALTIVEC_COMP,
207 .icache_bsize = 128,
208 .dcache_bsize = 128,
209 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600210 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000211 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500212 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000213 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000214 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100215 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100216 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000217 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000218 { /* PPC970FX */
219 .pvr_mask = 0xffff0000,
220 .pvr_value = 0x003c0000,
221 .cpu_name = "PPC970FX",
Stephen Rothwell49209602005-10-12 15:55:09 +1000222 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100223 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000224 PPC_FEATURE_HAS_ALTIVEC_COMP,
225 .icache_bsize = 128,
226 .dcache_bsize = 128,
227 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600228 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000229 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500230 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000231 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000232 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100233 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100234 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000235 },
Olof Johansson3546e812007-02-26 00:35:14 -0600236 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
237 .pvr_mask = 0xffffffff,
238 .pvr_value = 0x00440100,
239 .cpu_name = "PPC970MP",
240 .cpu_features = CPU_FTRS_PPC970,
241 .cpu_user_features = COMMON_USER_POWER4 |
242 PPC_FEATURE_HAS_ALTIVEC_COMP,
243 .icache_bsize = 128,
244 .dcache_bsize = 128,
245 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000246 .pmc_type = PPC_PMC_IBM,
Olof Johansson3546e812007-02-26 00:35:14 -0600247 .cpu_setup = __setup_cpu_ppc970,
248 .cpu_restore = __restore_cpu_ppc970,
249 .oprofile_cpu_type = "ppc64/970MP",
250 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100251 .machine_check = machine_check_generic,
Olof Johansson3546e812007-02-26 00:35:14 -0600252 .platform = "ppc970",
253 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000254 { /* PPC970MP */
255 .pvr_mask = 0xffff0000,
256 .pvr_value = 0x00440000,
257 .cpu_name = "PPC970MP",
258 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100259 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000260 PPC_FEATURE_HAS_ALTIVEC_COMP,
261 .icache_bsize = 128,
262 .dcache_bsize = 128,
Anton Blanchard87af41b2006-05-05 05:44:26 +1000263 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000264 .pmc_type = PPC_PMC_IBM,
Olof Johansson5b43d202006-10-04 23:41:41 -0500265 .cpu_setup = __setup_cpu_ppc970MP,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500266 .cpu_restore = __restore_cpu_ppc970,
Mike Wolffecb3522006-11-21 14:41:54 -0600267 .oprofile_cpu_type = "ppc64/970MP",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000268 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100269 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100270 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000271 },
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500272 { /* PPC970GX */
273 .pvr_mask = 0xffff0000,
274 .pvr_value = 0x00450000,
275 .cpu_name = "PPC970GX",
276 .cpu_features = CPU_FTRS_PPC970,
277 .cpu_user_features = COMMON_USER_POWER4 |
278 PPC_FEATURE_HAS_ALTIVEC_COMP,
279 .icache_bsize = 128,
280 .dcache_bsize = 128,
281 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600282 .pmc_type = PPC_PMC_IBM,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500283 .cpu_setup = __setup_cpu_ppc970,
284 .oprofile_cpu_type = "ppc64/970",
285 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100286 .machine_check = machine_check_generic,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500287 .platform = "ppc970",
288 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100289 { /* Power5 GR */
Stephen Rothwell49209602005-10-12 15:55:09 +1000290 .pvr_mask = 0xffff0000,
291 .pvr_value = 0x003a0000,
292 .cpu_name = "POWER5 (gr)",
293 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100294 .cpu_user_features = COMMON_USER_POWER5,
Stephen Rothwell49209602005-10-12 15:55:09 +1000295 .icache_bsize = 128,
296 .dcache_bsize = 128,
297 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600298 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000299 .oprofile_cpu_type = "ppc64/power5",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000300 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000301 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
302 * and above but only works on POWER5 and above
303 */
304 .oprofile_mmcra_sihv = MMCRA_SIHV,
305 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100306 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100307 .platform = "power5",
Stephen Rothwell49209602005-10-12 15:55:09 +1000308 },
Mike Wolf31a12ce2007-07-10 13:13:47 -0500309 { /* Power5++ */
310 .pvr_mask = 0xffffff00,
311 .pvr_value = 0x003b0300,
312 .cpu_name = "POWER5+ (gs)",
313 .cpu_features = CPU_FTRS_POWER5,
314 .cpu_user_features = COMMON_USER_POWER5_PLUS,
315 .icache_bsize = 128,
316 .dcache_bsize = 128,
317 .num_pmcs = 6,
318 .oprofile_cpu_type = "ppc64/power5++",
319 .oprofile_type = PPC_OPROFILE_POWER4,
320 .oprofile_mmcra_sihv = MMCRA_SIHV,
321 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100322 .machine_check = machine_check_generic,
Mike Wolf31a12ce2007-07-10 13:13:47 -0500323 .platform = "power5+",
324 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100325 { /* Power5 GS */
Stephen Rothwell49209602005-10-12 15:55:09 +1000326 .pvr_mask = 0xffff0000,
327 .pvr_value = 0x003b0000,
Anton Blanchard834608f2006-01-09 15:42:30 +1100328 .cpu_name = "POWER5+ (gs)",
Stephen Rothwell49209602005-10-12 15:55:09 +1000329 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100330 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Stephen Rothwell49209602005-10-12 15:55:09 +1000331 .icache_bsize = 128,
332 .dcache_bsize = 128,
333 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600334 .pmc_type = PPC_PMC_IBM,
Anton Blanchard834608f2006-01-09 15:42:30 +1100335 .oprofile_cpu_type = "ppc64/power5+",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000336 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000337 .oprofile_mmcra_sihv = MMCRA_SIHV,
338 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100339 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100340 .platform = "power5+",
Stephen Rothwell49209602005-10-12 15:55:09 +1000341 },
Paul Mackerras974a76f2006-11-10 20:38:53 +1100342 { /* POWER6 in P5+ mode; 2.04-compliant processor */
343 .pvr_mask = 0xffffffff,
344 .pvr_value = 0x0f000001,
345 .cpu_name = "POWER5+",
346 .cpu_features = CPU_FTRS_POWER5,
347 .cpu_user_features = COMMON_USER_POWER5_PLUS,
348 .icache_bsize = 128,
349 .dcache_bsize = 128,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100350 .machine_check = machine_check_generic,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100351 .platform = "power5+",
352 },
Anton Blanchard03054d52006-04-29 09:51:06 +1000353 { /* Power6 */
354 .pvr_mask = 0xffff0000,
355 .pvr_value = 0x003e0000,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100356 .cpu_name = "POWER6 (raw)",
357 .cpu_features = CPU_FTRS_POWER6,
358 .cpu_user_features = COMMON_USER_POWER6 |
359 PPC_FEATURE_POWER6_EXT,
360 .icache_bsize = 128,
361 .dcache_bsize = 128,
362 .num_pmcs = 6,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000363 .pmc_type = PPC_PMC_IBM,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100364 .oprofile_cpu_type = "ppc64/power6",
365 .oprofile_type = PPC_OPROFILE_POWER4,
366 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
367 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
368 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
369 POWER6_MMCRA_OTHER,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100370 .machine_check = machine_check_generic,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100371 .platform = "power6x",
372 },
373 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
374 .pvr_mask = 0xffffffff,
375 .pvr_value = 0x0f000002,
376 .cpu_name = "POWER6 (architected)",
Anton Blanchard03054d52006-04-29 09:51:06 +1000377 .cpu_features = CPU_FTRS_POWER6,
378 .cpu_user_features = COMMON_USER_POWER6,
379 .icache_bsize = 128,
380 .dcache_bsize = 128,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100381 .machine_check = machine_check_generic,
Anton Blanchard03054d52006-04-29 09:51:06 +1000382 .platform = "power6",
383 },
Arnd Bergmannc902be72006-01-04 19:55:53 +0000384 { /* Cell Broadband Engine */
Stephen Rothwell49209602005-10-12 15:55:09 +1000385 .pvr_mask = 0xffff0000,
386 .pvr_value = 0x00700000,
387 .cpu_name = "Cell Broadband Engine",
388 .cpu_features = CPU_FTRS_CELL,
389 .cpu_user_features = COMMON_USER_PPC64 |
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +1100390 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
391 PPC_FEATURE_SMT,
Stephen Rothwell49209602005-10-12 15:55:09 +1000392 .icache_bsize = 128,
393 .dcache_bsize = 128,
Maynard Johnson18f21902006-11-20 18:45:16 +0100394 .num_pmcs = 4,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600395 .pmc_type = PPC_PMC_IBM,
Maynard Johnson18f21902006-11-20 18:45:16 +0100396 .oprofile_cpu_type = "ppc64/cell-be",
397 .oprofile_type = PPC_OPROFILE_CELL,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100398 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100399 .platform = "ppc-cell-be",
Stephen Rothwell49209602005-10-12 15:55:09 +1000400 },
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500401 { /* PA Semi PA6T */
402 .pvr_mask = 0x7fff0000,
403 .pvr_value = 0x00900000,
404 .cpu_name = "PA6T",
405 .cpu_features = CPU_FTRS_PA6T,
406 .cpu_user_features = COMMON_USER_PA6T,
407 .icache_bsize = 64,
408 .dcache_bsize = 64,
409 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600410 .pmc_type = PPC_PMC_PA6T,
Olof Johansson11999192007-02-04 16:36:51 -0600411 .cpu_setup = __setup_cpu_pa6t,
412 .cpu_restore = __restore_cpu_pa6t,
Olof Johansson25fc5302007-04-18 16:38:21 +1000413 .oprofile_cpu_type = "ppc64/pa6t",
414 .oprofile_type = PPC_OPROFILE_PA6T,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100415 .machine_check = machine_check_generic,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500416 .platform = "pa6t",
417 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000418 { /* default match */
419 .pvr_mask = 0x00000000,
420 .pvr_value = 0x00000000,
421 .cpu_name = "POWER4 (compatible)",
422 .cpu_features = CPU_FTRS_COMPATIBLE,
423 .cpu_user_features = COMMON_USER_PPC64,
424 .icache_bsize = 128,
425 .dcache_bsize = 128,
426 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600427 .pmc_type = PPC_PMC_IBM,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100428 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100429 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000430 }
431#endif /* CONFIG_PPC64 */
432#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -0700433#if CLASSIC_PPC
Stephen Rothwell49209602005-10-12 15:55:09 +1000434 { /* 601 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700435 .pvr_mask = 0xffff0000,
436 .pvr_value = 0x00010000,
437 .cpu_name = "601",
Kumar Gala10b35d92005-09-23 14:08:58 -0500438 .cpu_features = CPU_FTRS_PPC601,
Stephen Rothwell49209602005-10-12 15:55:09 +1000439 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
Paul Mackerras98599012005-10-22 16:51:34 +1000440 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700441 .icache_bsize = 32,
442 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100443 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100444 .platform = "ppc601",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700445 },
446 { /* 603 */
447 .pvr_mask = 0xffff0000,
448 .pvr_value = 0x00030000,
449 .cpu_name = "603",
Kumar Gala10b35d92005-09-23 14:08:58 -0500450 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000451 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700452 .icache_bsize = 32,
453 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100454 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100455 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100456 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700457 },
458 { /* 603e */
459 .pvr_mask = 0xffff0000,
460 .pvr_value = 0x00060000,
461 .cpu_name = "603e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500462 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000463 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700464 .icache_bsize = 32,
465 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100466 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100467 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100468 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700469 },
470 { /* 603ev */
471 .pvr_mask = 0xffff0000,
472 .pvr_value = 0x00070000,
473 .cpu_name = "603ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500474 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000475 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700476 .icache_bsize = 32,
477 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100478 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100479 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100480 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700481 },
482 { /* 604 */
483 .pvr_mask = 0xffff0000,
484 .pvr_value = 0x00040000,
485 .cpu_name = "604",
Kumar Gala10b35d92005-09-23 14:08:58 -0500486 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000487 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700488 .icache_bsize = 32,
489 .dcache_bsize = 32,
490 .num_pmcs = 2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100491 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100492 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100493 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700494 },
495 { /* 604e */
496 .pvr_mask = 0xfffff000,
497 .pvr_value = 0x00090000,
498 .cpu_name = "604e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500499 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000500 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700501 .icache_bsize = 32,
502 .dcache_bsize = 32,
503 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100504 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100505 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100506 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700507 },
508 { /* 604r */
509 .pvr_mask = 0xffff0000,
510 .pvr_value = 0x00090000,
511 .cpu_name = "604r",
Kumar Gala10b35d92005-09-23 14:08:58 -0500512 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000513 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700514 .icache_bsize = 32,
515 .dcache_bsize = 32,
516 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100517 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100518 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100519 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700520 },
521 { /* 604ev */
522 .pvr_mask = 0xffff0000,
523 .pvr_value = 0x000a0000,
524 .cpu_name = "604ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500525 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000526 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700527 .icache_bsize = 32,
528 .dcache_bsize = 32,
529 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100530 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100531 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100532 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700533 },
534 { /* 740/750 (0x4202, don't support TAU ?) */
535 .pvr_mask = 0xffffffff,
536 .pvr_value = 0x00084202,
537 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500538 .cpu_features = CPU_FTRS_740_NOTAU,
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_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100544 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100545 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700546 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700547 { /* 750CX (80100 and 8010x?) */
548 .pvr_mask = 0xfffffff0,
549 .pvr_value = 0x00080100,
550 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500551 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000552 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700553 .icache_bsize = 32,
554 .dcache_bsize = 32,
555 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100556 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100557 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100558 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700559 },
560 { /* 750CX (82201 and 82202) */
561 .pvr_mask = 0xfffffff0,
562 .pvr_value = 0x00082200,
563 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500564 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000565 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700566 .icache_bsize = 32,
567 .dcache_bsize = 32,
568 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100569 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100570 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100571 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700572 },
573 { /* 750CXe (82214) */
574 .pvr_mask = 0xfffffff0,
575 .pvr_value = 0x00082210,
576 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500577 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000578 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700579 .icache_bsize = 32,
580 .dcache_bsize = 32,
581 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100582 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100583 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100584 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700585 },
Arthur Othieno7c316252005-09-03 15:55:52 -0700586 { /* 750CXe "Gekko" (83214) */
587 .pvr_mask = 0xffffffff,
588 .pvr_value = 0x00083214,
589 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500590 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000591 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Arthur Othieno7c316252005-09-03 15:55:52 -0700592 .icache_bsize = 32,
593 .dcache_bsize = 32,
594 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100595 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100596 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100597 .platform = "ppc750",
Arthur Othieno7c316252005-09-03 15:55:52 -0700598 },
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500599 { /* 750CL */
600 .pvr_mask = 0xfffff0f0,
601 .pvr_value = 0x00087010,
602 .cpu_name = "750CL",
Josh Boyera14c4502007-04-13 04:33:25 +1000603 .cpu_features = CPU_FTRS_750CL,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500604 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
605 .icache_bsize = 32,
606 .dcache_bsize = 32,
607 .num_pmcs = 4,
Josh Boyera14c4502007-04-13 04:33:25 +1000608 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100609 .machine_check = machine_check_generic,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500610 .platform = "ppc750",
611 },
Arthur Othienoac1ff042005-09-03 15:55:51 -0700612 { /* 745/755 */
613 .pvr_mask = 0xfffff000,
614 .pvr_value = 0x00083000,
615 .cpu_name = "745/755",
Kumar Gala10b35d92005-09-23 14:08:58 -0500616 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000617 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Arthur Othienoac1ff042005-09-03 15:55:51 -0700618 .icache_bsize = 32,
619 .dcache_bsize = 32,
620 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100621 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100622 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100623 .platform = "ppc750",
Arthur Othienoac1ff042005-09-03 15:55:51 -0700624 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700625 { /* 750FX rev 1.x */
626 .pvr_mask = 0xffffff00,
627 .pvr_value = 0x70000100,
628 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500629 .cpu_features = CPU_FTRS_750FX1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000630 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700631 .icache_bsize = 32,
632 .dcache_bsize = 32,
633 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100634 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100635 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100636 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700637 },
638 { /* 750FX rev 2.0 must disable HID0[DPM] */
639 .pvr_mask = 0xffffffff,
640 .pvr_value = 0x70000200,
641 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500642 .cpu_features = CPU_FTRS_750FX2,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000643 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700644 .icache_bsize = 32,
645 .dcache_bsize = 32,
646 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100647 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100648 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100649 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700650 },
651 { /* 750FX (All revs except 2.0) */
652 .pvr_mask = 0xffff0000,
653 .pvr_value = 0x70000000,
654 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500655 .cpu_features = CPU_FTRS_750FX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000656 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700657 .icache_bsize = 32,
658 .dcache_bsize = 32,
659 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100660 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100661 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100662 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700663 },
664 { /* 750GX */
665 .pvr_mask = 0xffff0000,
666 .pvr_value = 0x70020000,
667 .cpu_name = "750GX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500668 .cpu_features = CPU_FTRS_750GX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000669 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700670 .icache_bsize = 32,
671 .dcache_bsize = 32,
672 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100673 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100674 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100675 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700676 },
677 { /* 740/750 (L2CR bit need fixup for 740) */
678 .pvr_mask = 0xffff0000,
679 .pvr_value = 0x00080000,
680 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500681 .cpu_features = CPU_FTRS_740,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000682 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700683 .icache_bsize = 32,
684 .dcache_bsize = 32,
685 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100686 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100687 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100688 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700689 },
690 { /* 7400 rev 1.1 ? (no TAU) */
691 .pvr_mask = 0xffffffff,
692 .pvr_value = 0x000c1101,
693 .cpu_name = "7400 (1.1)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500694 .cpu_features = CPU_FTRS_7400_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000695 .cpu_user_features = COMMON_USER |
696 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700697 .icache_bsize = 32,
698 .dcache_bsize = 32,
699 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100700 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100701 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100702 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700703 },
704 { /* 7400 */
705 .pvr_mask = 0xffff0000,
706 .pvr_value = 0x000c0000,
707 .cpu_name = "7400",
Kumar Gala10b35d92005-09-23 14:08:58 -0500708 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000709 .cpu_user_features = COMMON_USER |
710 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700711 .icache_bsize = 32,
712 .dcache_bsize = 32,
713 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100714 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100715 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100716 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700717 },
718 { /* 7410 */
719 .pvr_mask = 0xffff0000,
720 .pvr_value = 0x800c0000,
721 .cpu_name = "7410",
Kumar Gala10b35d92005-09-23 14:08:58 -0500722 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000723 .cpu_user_features = COMMON_USER |
724 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700725 .icache_bsize = 32,
726 .dcache_bsize = 32,
727 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100728 .cpu_setup = __setup_cpu_7410,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100729 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100730 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700731 },
732 { /* 7450 2.0 - no doze/nap */
733 .pvr_mask = 0xffffffff,
734 .pvr_value = 0x80000200,
735 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500736 .cpu_features = CPU_FTRS_7450_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000737 .cpu_user_features = COMMON_USER |
738 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700739 .icache_bsize = 32,
740 .dcache_bsize = 32,
741 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600742 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600743 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000744 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100745 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100746 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700747 },
748 { /* 7450 2.1 */
749 .pvr_mask = 0xffffffff,
750 .pvr_value = 0x80000201,
751 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500752 .cpu_features = CPU_FTRS_7450_21,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000753 .cpu_user_features = COMMON_USER |
754 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700755 .icache_bsize = 32,
756 .dcache_bsize = 32,
757 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600758 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600759 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000760 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100761 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100762 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700763 },
764 { /* 7450 2.3 and newer */
765 .pvr_mask = 0xffff0000,
766 .pvr_value = 0x80000000,
767 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500768 .cpu_features = CPU_FTRS_7450_23,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000769 .cpu_user_features = COMMON_USER |
770 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700771 .icache_bsize = 32,
772 .dcache_bsize = 32,
773 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600774 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600775 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000776 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100777 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100778 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700779 },
780 { /* 7455 rev 1.x */
781 .pvr_mask = 0xffffff00,
782 .pvr_value = 0x80010100,
783 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500784 .cpu_features = CPU_FTRS_7455_1,
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,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100793 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100794 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700795 },
796 { /* 7455 rev 2.0 */
797 .pvr_mask = 0xffffffff,
798 .pvr_value = 0x80010200,
799 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500800 .cpu_features = CPU_FTRS_7455_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000801 .cpu_user_features = COMMON_USER |
802 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700803 .icache_bsize = 32,
804 .dcache_bsize = 32,
805 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600806 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600807 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000808 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100809 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100810 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700811 },
812 { /* 7455 others */
813 .pvr_mask = 0xffff0000,
814 .pvr_value = 0x80010000,
815 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500816 .cpu_features = CPU_FTRS_7455,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000817 .cpu_user_features = COMMON_USER |
818 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700819 .icache_bsize = 32,
820 .dcache_bsize = 32,
821 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600822 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600823 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000824 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100825 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100826 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700827 },
828 { /* 7447/7457 Rev 1.0 */
829 .pvr_mask = 0xffffffff,
830 .pvr_value = 0x80020100,
831 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500832 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000833 .cpu_user_features = COMMON_USER |
834 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700835 .icache_bsize = 32,
836 .dcache_bsize = 32,
837 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600838 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600839 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000840 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100841 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100842 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700843 },
844 { /* 7447/7457 Rev 1.1 */
845 .pvr_mask = 0xffffffff,
846 .pvr_value = 0x80020101,
847 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500848 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000849 .cpu_user_features = COMMON_USER |
850 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700851 .icache_bsize = 32,
852 .dcache_bsize = 32,
853 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600854 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600855 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000856 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100857 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100858 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700859 },
860 { /* 7447/7457 Rev 1.2 and later */
861 .pvr_mask = 0xffff0000,
862 .pvr_value = 0x80020000,
863 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500864 .cpu_features = CPU_FTRS_7447,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000865 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700866 .icache_bsize = 32,
867 .dcache_bsize = 32,
868 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600869 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600870 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000871 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100872 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100873 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700874 },
875 { /* 7447A */
876 .pvr_mask = 0xffff0000,
877 .pvr_value = 0x80030000,
878 .cpu_name = "7447A",
Kumar Gala10b35d92005-09-23 14:08:58 -0500879 .cpu_features = CPU_FTRS_7447A,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000880 .cpu_user_features = COMMON_USER |
881 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700882 .icache_bsize = 32,
883 .dcache_bsize = 32,
884 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600885 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600886 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000887 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100888 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100889 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700890 },
Kumar Galabbde6302005-09-03 15:55:55 -0700891 { /* 7448 */
892 .pvr_mask = 0xffff0000,
893 .pvr_value = 0x80040000,
894 .cpu_name = "7448",
James.Yang3d372542007-05-02 16:34:43 -0500895 .cpu_features = CPU_FTRS_7448,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000896 .cpu_user_features = COMMON_USER |
897 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Kumar Galabbde6302005-09-03 15:55:55 -0700898 .icache_bsize = 32,
899 .dcache_bsize = 32,
900 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600901 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600902 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000903 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100904 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100905 .platform = "ppc7450",
Kumar Galabbde6302005-09-03 15:55:55 -0700906 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700907 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
908 .pvr_mask = 0x7fff0000,
909 .pvr_value = 0x00810000,
910 .cpu_name = "82xx",
Kumar Gala10b35d92005-09-23 14:08:58 -0500911 .cpu_features = CPU_FTRS_82XX,
Stephen Rothwell49209602005-10-12 15:55:09 +1000912 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700913 .icache_bsize = 32,
914 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100915 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100916 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100917 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700918 },
919 { /* All G2_LE (603e core, plus some) have the same pvr */
920 .pvr_mask = 0x7fff0000,
921 .pvr_value = 0x00820000,
922 .cpu_name = "G2_LE",
Kumar Gala10b35d92005-09-23 14:08:58 -0500923 .cpu_features = CPU_FTRS_G2_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000924 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700925 .icache_bsize = 32,
926 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100927 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100928 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100929 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700930 },
Kim Phillips6c4a2502006-10-02 20:10:24 -0500931 { /* e300c1 (a 603e core, plus some) on 83xx */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700932 .pvr_mask = 0x7fff0000,
933 .pvr_value = 0x00830000,
Kim Phillips6c4a2502006-10-02 20:10:24 -0500934 .cpu_name = "e300c1",
Kumar Gala10b35d92005-09-23 14:08:58 -0500935 .cpu_features = CPU_FTRS_E300,
Stephen Rothwell49209602005-10-12 15:55:09 +1000936 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700937 .icache_bsize = 32,
938 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100939 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100940 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100941 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700942 },
Kim Phillips6c4a2502006-10-02 20:10:24 -0500943 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
944 .pvr_mask = 0x7fff0000,
945 .pvr_value = 0x00840000,
946 .cpu_name = "e300c2",
Kim Phillipsaa42c692006-12-08 02:43:30 -0600947 .cpu_features = CPU_FTRS_E300C2,
Kim Phillips6c4a2502006-10-02 20:10:24 -0500948 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
949 .icache_bsize = 32,
950 .dcache_bsize = 32,
951 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100952 .machine_check = machine_check_generic,
Kim Phillips6c4a2502006-10-02 20:10:24 -0500953 .platform = "ppc603",
954 },
Li Yanga58d5242007-10-19 19:38:42 +0800955 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
Scott Wood57933f82006-12-01 12:57:05 -0600956 .pvr_mask = 0x7fff0000,
957 .pvr_value = 0x00850000,
958 .cpu_name = "e300c3",
959 .cpu_features = CPU_FTRS_E300,
960 .cpu_user_features = COMMON_USER,
961 .icache_bsize = 32,
962 .dcache_bsize = 32,
963 .cpu_setup = __setup_cpu_603,
Andy Fleming1347a2c2008-02-04 18:28:07 -0600964 .num_pmcs = 4,
965 .oprofile_cpu_type = "ppc/e300",
966 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Scott Wood57933f82006-12-01 12:57:05 -0600967 .platform = "ppc603",
968 },
Li Yanga58d5242007-10-19 19:38:42 +0800969 { /* e300c4 (e300c1, plus one IU) */
970 .pvr_mask = 0x7fff0000,
971 .pvr_value = 0x00860000,
972 .cpu_name = "e300c4",
973 .cpu_features = CPU_FTRS_E300,
974 .cpu_user_features = COMMON_USER,
975 .icache_bsize = 32,
976 .dcache_bsize = 32,
977 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100978 .machine_check = machine_check_generic,
Andy Fleming1347a2c2008-02-04 18:28:07 -0600979 .num_pmcs = 4,
980 .oprofile_cpu_type = "ppc/e300",
981 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Li Yanga58d5242007-10-19 19:38:42 +0800982 .platform = "ppc603",
983 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700984 { /* default match, we assume split I/D cache & TB (non-601)... */
985 .pvr_mask = 0x00000000,
986 .pvr_value = 0x00000000,
987 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500988 .cpu_features = CPU_FTRS_CLASSIC32,
Stephen Rothwell49209602005-10-12 15:55:09 +1000989 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700990 .icache_bsize = 32,
991 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100992 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100993 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700994 },
995#endif /* CLASSIC_PPC */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700996#ifdef CONFIG_8xx
997 { /* 8xx */
998 .pvr_mask = 0xffff0000,
999 .pvr_value = 0x00500000,
1000 .cpu_name = "8xx",
1001 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1002 * if the 8xx code is there.... */
Kumar Gala10b35d92005-09-23 14:08:58 -05001003 .cpu_features = CPU_FTRS_8XX,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001004 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1005 .icache_bsize = 16,
1006 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001007 .platform = "ppc823",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001008 },
1009#endif /* CONFIG_8xx */
1010#ifdef CONFIG_40x
1011 { /* 403GC */
1012 .pvr_mask = 0xffffff00,
1013 .pvr_value = 0x00200200,
1014 .cpu_name = "403GC",
Kumar Gala10b35d92005-09-23 14:08:58 -05001015 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001016 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1017 .icache_bsize = 16,
1018 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001019 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001020 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001021 },
1022 { /* 403GCX */
1023 .pvr_mask = 0xffffff00,
1024 .pvr_value = 0x00201400,
1025 .cpu_name = "403GCX",
Kumar Gala10b35d92005-09-23 14:08:58 -05001026 .cpu_features = CPU_FTRS_40X,
Paul Mackerras98599012005-10-22 16:51:34 +10001027 .cpu_user_features = PPC_FEATURE_32 |
1028 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001029 .icache_bsize = 16,
1030 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001031 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001032 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001033 },
1034 { /* 403G ?? */
1035 .pvr_mask = 0xffff0000,
1036 .pvr_value = 0x00200000,
1037 .cpu_name = "403G ??",
Kumar Gala10b35d92005-09-23 14:08:58 -05001038 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001039 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1040 .icache_bsize = 16,
1041 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001042 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001043 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001044 },
1045 { /* 405GP */
1046 .pvr_mask = 0xffff0000,
1047 .pvr_value = 0x40110000,
1048 .cpu_name = "405GP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001049 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001050 .cpu_user_features = PPC_FEATURE_32 |
1051 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1052 .icache_bsize = 32,
1053 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001054 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001055 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001056 },
1057 { /* STB 03xxx */
1058 .pvr_mask = 0xffff0000,
1059 .pvr_value = 0x40130000,
1060 .cpu_name = "STB03xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001061 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001062 .cpu_user_features = PPC_FEATURE_32 |
1063 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1064 .icache_bsize = 32,
1065 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001066 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001067 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001068 },
1069 { /* STB 04xxx */
1070 .pvr_mask = 0xffff0000,
1071 .pvr_value = 0x41810000,
1072 .cpu_name = "STB04xxx",
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 |
1075 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1076 .icache_bsize = 32,
1077 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001078 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001079 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001080 },
1081 { /* NP405L */
1082 .pvr_mask = 0xffff0000,
1083 .pvr_value = 0x41610000,
1084 .cpu_name = "NP405L",
Kumar Gala10b35d92005-09-23 14:08:58 -05001085 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001086 .cpu_user_features = PPC_FEATURE_32 |
1087 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1088 .icache_bsize = 32,
1089 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001090 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001091 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001092 },
1093 { /* NP4GS3 */
1094 .pvr_mask = 0xffff0000,
1095 .pvr_value = 0x40B10000,
1096 .cpu_name = "NP4GS3",
Kumar Gala10b35d92005-09-23 14:08:58 -05001097 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001098 .cpu_user_features = PPC_FEATURE_32 |
1099 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1100 .icache_bsize = 32,
1101 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001102 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001103 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001104 },
1105 { /* NP405H */
1106 .pvr_mask = 0xffff0000,
1107 .pvr_value = 0x41410000,
1108 .cpu_name = "NP405H",
Kumar Gala10b35d92005-09-23 14:08:58 -05001109 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001110 .cpu_user_features = PPC_FEATURE_32 |
1111 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1112 .icache_bsize = 32,
1113 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001114 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001115 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001116 },
1117 { /* 405GPr */
1118 .pvr_mask = 0xffff0000,
1119 .pvr_value = 0x50910000,
1120 .cpu_name = "405GPr",
Kumar Gala10b35d92005-09-23 14:08:58 -05001121 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001122 .cpu_user_features = PPC_FEATURE_32 |
1123 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1124 .icache_bsize = 32,
1125 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001126 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001127 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001128 },
1129 { /* STBx25xx */
1130 .pvr_mask = 0xffff0000,
1131 .pvr_value = 0x51510000,
1132 .cpu_name = "STBx25xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001133 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001134 .cpu_user_features = PPC_FEATURE_32 |
1135 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1136 .icache_bsize = 32,
1137 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001138 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001139 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001140 },
1141 { /* 405LP */
1142 .pvr_mask = 0xffff0000,
1143 .pvr_value = 0x41F10000,
1144 .cpu_name = "405LP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001145 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001146 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1147 .icache_bsize = 32,
1148 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001149 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001150 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001151 },
1152 { /* Xilinx Virtex-II Pro */
Grant C. Likely72646c72006-01-19 01:13:20 -07001153 .pvr_mask = 0xfffff000,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001154 .pvr_value = 0x20010000,
1155 .cpu_name = "Virtex-II Pro",
Kumar Gala10b35d92005-09-23 14:08:58 -05001156 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001157 .cpu_user_features = PPC_FEATURE_32 |
1158 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1159 .icache_bsize = 32,
1160 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001161 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001162 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001163 },
Grant C. Likely72646c72006-01-19 01:13:20 -07001164 { /* Xilinx Virtex-4 FX */
1165 .pvr_mask = 0xfffff000,
1166 .pvr_value = 0x20011000,
1167 .cpu_name = "Virtex-4 FX",
1168 .cpu_features = CPU_FTRS_40X,
1169 .cpu_user_features = PPC_FEATURE_32 |
1170 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1171 .icache_bsize = 32,
1172 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001173 .machine_check = machine_check_4xx,
Peter Bergner838fdb42006-09-14 14:18:38 -05001174 .platform = "ppc405",
Grant C. Likely72646c72006-01-19 01:13:20 -07001175 },
Eugene Suroveginad95d602005-06-07 13:22:09 -07001176 { /* 405EP */
1177 .pvr_mask = 0xffff0000,
1178 .pvr_value = 0x51210000,
1179 .cpu_name = "405EP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001180 .cpu_features = CPU_FTRS_40X,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001181 .cpu_user_features = PPC_FEATURE_32 |
1182 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1183 .icache_bsize = 32,
1184 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001185 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001186 .platform = "ppc405",
Eugene Suroveginad95d602005-06-07 13:22:09 -07001187 },
Stefan Roese5d8476c2007-10-11 22:08:14 +10001188 { /* 405EX */
Stefan Roeseb676d842008-01-15 18:09:15 +11001189 .pvr_mask = 0xffff0004,
1190 .pvr_value = 0x12910004,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001191 .cpu_name = "405EX",
1192 .cpu_features = CPU_FTRS_40X,
1193 .cpu_user_features = PPC_FEATURE_32 |
1194 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1195 .icache_bsize = 32,
1196 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001197 .machine_check = machine_check_4xx,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001198 .platform = "ppc405",
1199 },
Stefan Roeseb676d842008-01-15 18:09:15 +11001200 { /* 405EXr */
1201 .pvr_mask = 0xffff0004,
1202 .pvr_value = 0x12910000,
1203 .cpu_name = "405EXr",
1204 .cpu_features = CPU_FTRS_40X,
1205 .cpu_user_features = PPC_FEATURE_32 |
1206 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1207 .icache_bsize = 32,
1208 .dcache_bsize = 32,
1209 .machine_check = machine_check_4xx,
1210 .platform = "ppc405",
1211 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001212 { /* default match */
1213 .pvr_mask = 0x00000000,
1214 .pvr_value = 0x00000000,
1215 .cpu_name = "(generic 40x PPC)",
1216 .cpu_features = CPU_FTRS_40X,
1217 .cpu_user_features = PPC_FEATURE_32 |
1218 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1219 .icache_bsize = 32,
1220 .dcache_bsize = 32,
1221 .machine_check = machine_check_4xx,
1222 .platform = "ppc405",
1223 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001224
1225#endif /* CONFIG_40x */
1226#ifdef CONFIG_44x
Matt Porterc9cf73a2005-07-31 22:34:52 -07001227 {
1228 .pvr_mask = 0xf0000fff,
1229 .pvr_value = 0x40000850,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001230 .cpu_name = "440GR Rev. A",
1231 .cpu_features = CPU_FTRS_44X,
1232 .cpu_user_features = COMMON_USER_BOOKE,
1233 .icache_bsize = 32,
1234 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001235 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001236 .platform = "ppc440",
1237 },
1238 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1239 .pvr_mask = 0xf0000fff,
1240 .pvr_value = 0x40000858,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001241 .cpu_name = "440EP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001242 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001243 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001244 .icache_bsize = 32,
1245 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001246 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001247 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001248 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001249 },
1250 {
1251 .pvr_mask = 0xf0000fff,
1252 .pvr_value = 0x400008d3,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001253 .cpu_name = "440GR Rev. B",
1254 .cpu_features = CPU_FTRS_44X,
1255 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1256 .icache_bsize = 32,
1257 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001258 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001259 .platform = "ppc440",
1260 },
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001261 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1262 .pvr_mask = 0xf0000ff7,
1263 .pvr_value = 0x400008d4,
1264 .cpu_name = "440EP Rev. C",
1265 .cpu_features = CPU_FTRS_44X,
1266 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1267 .icache_bsize = 32,
1268 .dcache_bsize = 32,
1269 .cpu_setup = __setup_cpu_440ep,
1270 .machine_check = machine_check_4xx,
1271 .platform = "ppc440",
1272 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001273 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1274 .pvr_mask = 0xf0000fff,
1275 .pvr_value = 0x400008db,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001276 .cpu_name = "440EP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001277 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001278 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001279 .icache_bsize = 32,
1280 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001281 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001282 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001283 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001284 },
Valentine Barshak15fc9932007-08-29 17:40:30 +04001285 { /* 440GRX */
1286 .pvr_mask = 0xf0000ffb,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001287 .pvr_value = 0x200008D0,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001288 .cpu_name = "440GRX",
1289 .cpu_features = CPU_FTRS_44X,
1290 .cpu_user_features = COMMON_USER_BOOKE,
1291 .icache_bsize = 32,
1292 .dcache_bsize = 32,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001293 .cpu_setup = __setup_cpu_440grx,
Valentine Barshakb2be3b12007-12-22 03:22:23 +11001294 .machine_check = machine_check_440A,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001295 .platform = "ppc440",
Valentine Barshak15fc9932007-08-29 17:40:30 +04001296 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001297 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1298 .pvr_mask = 0xf0000ffb,
1299 .pvr_value = 0x200008D8,
1300 .cpu_name = "440EPX",
1301 .cpu_features = CPU_FTRS_44X,
1302 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1303 .icache_bsize = 32,
1304 .dcache_bsize = 32,
1305 .cpu_setup = __setup_cpu_440epx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001306 .machine_check = machine_check_440A,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001307 .platform = "ppc440",
1308 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001309 { /* 440GP Rev. B */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001310 .pvr_mask = 0xf0000fff,
1311 .pvr_value = 0x40000440,
1312 .cpu_name = "440GP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001313 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001314 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001315 .icache_bsize = 32,
1316 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001317 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001318 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001319 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001320 { /* 440GP Rev. C */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001321 .pvr_mask = 0xf0000fff,
1322 .pvr_value = 0x40000481,
1323 .cpu_name = "440GP Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001324 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001325 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001326 .icache_bsize = 32,
1327 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001328 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001329 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001330 },
1331 { /* 440GX Rev. A */
1332 .pvr_mask = 0xf0000fff,
1333 .pvr_value = 0x50000850,
1334 .cpu_name = "440GX Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001335 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001336 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001337 .icache_bsize = 32,
1338 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001339 .cpu_setup = __setup_cpu_440gx,
1340 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001341 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001342 },
1343 { /* 440GX Rev. B */
1344 .pvr_mask = 0xf0000fff,
1345 .pvr_value = 0x50000851,
1346 .cpu_name = "440GX Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001347 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001348 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001349 .icache_bsize = 32,
1350 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001351 .cpu_setup = __setup_cpu_440gx,
1352 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001353 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001354 },
1355 { /* 440GX Rev. C */
1356 .pvr_mask = 0xf0000fff,
1357 .pvr_value = 0x50000892,
1358 .cpu_name = "440GX Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001359 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001360 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001361 .icache_bsize = 32,
1362 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001363 .cpu_setup = __setup_cpu_440gx,
1364 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001365 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001366 },
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001367 { /* 440GX Rev. F */
1368 .pvr_mask = 0xf0000fff,
1369 .pvr_value = 0x50000894,
1370 .cpu_name = "440GX Rev. F",
Kumar Gala10b35d92005-09-23 14:08:58 -05001371 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001372 .cpu_user_features = COMMON_USER_BOOKE,
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001373 .icache_bsize = 32,
1374 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001375 .cpu_setup = __setup_cpu_440gx,
1376 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001377 .platform = "ppc440",
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001378 },
Matt Porter656de7e2005-09-03 15:55:42 -07001379 { /* 440SP Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001380 .pvr_mask = 0xfff00fff,
1381 .pvr_value = 0x53200891,
Matt Porter656de7e2005-09-03 15:55:42 -07001382 .cpu_name = "440SP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001383 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001384 .cpu_user_features = COMMON_USER_BOOKE,
Matt Porter656de7e2005-09-03 15:55:42 -07001385 .icache_bsize = 32,
1386 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001387 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001388 .platform = "ppc440",
Matt Porter656de7e2005-09-03 15:55:42 -07001389 },
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001390 { /* 440SPe Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001391 .pvr_mask = 0xfff00fff,
1392 .pvr_value = 0x53400890,
1393 .cpu_name = "440SPe Rev. A",
1394 .cpu_features = CPU_FTRS_44X,
1395 .cpu_user_features = COMMON_USER_BOOKE,
1396 .icache_bsize = 32,
1397 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001398 .cpu_setup = __setup_cpu_440spe,
1399 .machine_check = machine_check_440A,
Roland Dreier333e6152007-06-16 05:36:32 +10001400 .platform = "ppc440",
1401 },
1402 { /* 440SPe Rev. B */
1403 .pvr_mask = 0xfff00fff,
1404 .pvr_value = 0x53400891,
1405 .cpu_name = "440SPe Rev. B",
Kumar Galaa147c582006-12-08 02:34:38 -06001406 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001407 .cpu_user_features = COMMON_USER_BOOKE,
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001408 .icache_bsize = 32,
1409 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001410 .cpu_setup = __setup_cpu_440spe,
1411 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001412 .platform = "ppc440",
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001413 },
Stefan Roese464076a2008-02-24 08:07:41 +11001414 { /* 460EX */
1415 .pvr_mask = 0xffff0002,
1416 .pvr_value = 0x13020002,
1417 .cpu_name = "460EX",
1418 .cpu_features = CPU_FTRS_44X,
1419 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1420 .icache_bsize = 32,
1421 .dcache_bsize = 32,
1422 .cpu_setup = __setup_cpu_460ex,
1423 .machine_check = machine_check_440A,
1424 .platform = "ppc440",
1425 },
1426 { /* 460GT */
1427 .pvr_mask = 0xffff0002,
1428 .pvr_value = 0x13020000,
1429 .cpu_name = "460GT",
1430 .cpu_features = CPU_FTRS_44X,
Josh Boyer939e6222008-06-11 07:52:40 -04001431 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Stefan Roese464076a2008-02-24 08:07:41 +11001432 .icache_bsize = 32,
1433 .dcache_bsize = 32,
Josh Boyer939e6222008-06-11 07:52:40 -04001434 .cpu_setup = __setup_cpu_460gt,
Stefan Roese464076a2008-02-24 08:07:41 +11001435 .machine_check = machine_check_440A,
1436 .platform = "ppc440",
1437 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001438 { /* default match */
1439 .pvr_mask = 0x00000000,
1440 .pvr_value = 0x00000000,
1441 .cpu_name = "(generic 44x PPC)",
1442 .cpu_features = CPU_FTRS_44X,
1443 .cpu_user_features = COMMON_USER_BOOKE,
1444 .icache_bsize = 32,
1445 .dcache_bsize = 32,
1446 .machine_check = machine_check_4xx,
1447 .platform = "ppc440",
1448 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001449#endif /* CONFIG_44x */
Josh Boyere3e414b2007-12-24 08:44:47 -06001450#ifdef CONFIG_E200
Stephen Rothwell49209602005-10-12 15:55:09 +10001451 { /* e200z5 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001452 .pvr_mask = 0xfff00000,
1453 .pvr_value = 0x81000000,
1454 .cpu_name = "e200z5",
1455 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001456 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001457 .cpu_user_features = COMMON_USER_BOOKE |
1458 PPC_FEATURE_HAS_EFP_SINGLE |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001459 PPC_FEATURE_UNIFIED_CACHE,
1460 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001461 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001462 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001463 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001464 { /* e200z6 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001465 .pvr_mask = 0xfff00000,
1466 .pvr_value = 0x81100000,
1467 .cpu_name = "e200z6",
1468 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001469 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001470 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001471 PPC_FEATURE_HAS_SPE_COMP |
1472 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001473 PPC_FEATURE_UNIFIED_CACHE,
1474 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001475 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001476 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001477 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001478 { /* default match */
1479 .pvr_mask = 0x00000000,
1480 .pvr_value = 0x00000000,
1481 .cpu_name = "(generic E200 PPC)",
1482 .cpu_features = CPU_FTRS_E200,
1483 .cpu_user_features = COMMON_USER_BOOKE |
1484 PPC_FEATURE_HAS_EFP_SINGLE |
1485 PPC_FEATURE_UNIFIED_CACHE,
1486 .dcache_bsize = 32,
1487 .machine_check = machine_check_e200,
1488 .platform = "ppc5554",
Paul Mackerras516c8be2008-05-12 14:20:35 +10001489 }
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001490#endif /* CONFIG_E200 */
1491#ifdef CONFIG_E500
Stephen Rothwell49209602005-10-12 15:55:09 +10001492 { /* e500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001493 .pvr_mask = 0xffff0000,
1494 .pvr_value = 0x80200000,
1495 .cpu_name = "e500",
1496 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001497 .cpu_features = CPU_FTRS_E500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001498 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001499 PPC_FEATURE_HAS_SPE_COMP |
1500 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001501 .icache_bsize = 32,
1502 .dcache_bsize = 32,
1503 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001504 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001505 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001506 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001507 .platform = "ppc8540",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001508 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001509 { /* e500v2 */
Kumar Gala5b37b702005-06-21 17:15:18 -07001510 .pvr_mask = 0xffff0000,
1511 .pvr_value = 0x80210000,
1512 .cpu_name = "e500v2",
1513 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001514 .cpu_features = CPU_FTRS_E500_2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001515 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001516 PPC_FEATURE_HAS_SPE_COMP |
1517 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1518 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
Kumar Gala5b37b702005-06-21 17:15:18 -07001519 .icache_bsize = 32,
1520 .dcache_bsize = 32,
1521 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001522 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001523 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001524 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001525 .platform = "ppc8548",
Kumar Gala5b37b702005-06-21 17:15:18 -07001526 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001527 { /* default match */
1528 .pvr_mask = 0x00000000,
1529 .pvr_value = 0x00000000,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001530 .cpu_name = "(generic E500 PPC)",
1531 .cpu_features = CPU_FTRS_E500,
1532 .cpu_user_features = COMMON_USER_BOOKE |
1533 PPC_FEATURE_HAS_SPE_COMP |
1534 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001535 .icache_bsize = 32,
1536 .dcache_bsize = 32,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001537 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001538 .platform = "powerpc",
Paul Mackerras516c8be2008-05-12 14:20:35 +10001539 }
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001540#endif /* CONFIG_E500 */
Stephen Rothwell49209602005-10-12 15:55:09 +10001541#endif /* CONFIG_PPC32 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001542};
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001543
Paul Mackerras87a72f92007-10-04 14:18:01 +10001544static struct cpu_spec the_cpu_spec;
1545
1546struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001547{
1548 struct cpu_spec *s = cpu_specs;
Paul Mackerras87a72f92007-10-04 14:18:01 +10001549 struct cpu_spec *t = &the_cpu_spec;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001550 int i;
1551
1552 s = PTRRELOC(s);
Paul Mackerras87a72f92007-10-04 14:18:01 +10001553 t = PTRRELOC(t);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001554
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001555 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
1556 if ((pvr & s->pvr_mask) == s->pvr_value) {
Paul Mackerras87a72f92007-10-04 14:18:01 +10001557 /*
1558 * If we are overriding a previous value derived
1559 * from the real PVR with a new value obtained
1560 * using a logical PVR value, don't modify the
1561 * performance monitor fields.
1562 */
1563 if (t->num_pmcs && !s->num_pmcs) {
1564 t->cpu_name = s->cpu_name;
1565 t->cpu_features = s->cpu_features;
1566 t->cpu_user_features = s->cpu_user_features;
1567 t->icache_bsize = s->icache_bsize;
1568 t->dcache_bsize = s->dcache_bsize;
1569 t->cpu_setup = s->cpu_setup;
1570 t->cpu_restore = s->cpu_restore;
1571 t->platform = s->platform;
1572 } else
1573 *t = *s;
1574 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001575#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
Stefan Roese464076a2008-02-24 08:07:41 +11001576 /* ppc64 and booke expect identify_cpu to also call
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001577 * setup_cpu for that processor. I will consolidate
1578 * that at a later time, for now, just use #ifdef.
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001579 * we also don't need to PTRRELOC the function pointer
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001580 * on ppc64 and booke as we are running at 0 in real
1581 * mode on ppc64 and reloc_offset is always 0 on booke.
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001582 */
1583 if (s->cpu_setup) {
1584 s->cpu_setup(offset, s);
1585 }
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001586#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001587 return s;
1588 }
1589 BUG();
1590 return NULL;
1591}
1592
Benjamin Herrenschmidt0909c8c2006-10-20 11:47:18 +10001593void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001594{
1595 struct fixup_entry {
1596 unsigned long mask;
1597 unsigned long value;
Benjamin Herrenschmidt0909c8c2006-10-20 11:47:18 +10001598 long start_off;
1599 long end_off;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001600 } *fcur, *fend;
1601
1602 fcur = fixup_start;
1603 fend = fixup_end;
1604
1605 for (; fcur < fend; fcur++) {
1606 unsigned int *pstart, *pend, *p;
1607
1608 if ((value & fcur->mask) == fcur->value)
1609 continue;
1610
1611 /* These PTRRELOCs will disappear once the new scheme for
1612 * modules and vdso is implemented
1613 */
Benjamin Herrenschmidt0909c8c2006-10-20 11:47:18 +10001614 pstart = ((unsigned int *)fcur) + (fcur->start_off / 4);
1615 pend = ((unsigned int *)fcur) + (fcur->end_off / 4);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001616
1617 for (p = pstart; p < pend; p++) {
1618 *p = 0x60000000u;
1619 asm volatile ("dcbst 0, %0" : : "r" (p));
1620 }
1621 asm volatile ("sync" : : : "memory");
1622 for (p = pstart; p < pend; p++)
1623 asm volatile ("icbi 0,%0" : : "r" (p));
1624 asm volatile ("sync; isync" : : : "memory");
1625 }
1626}