blob: 98a1c9e6b9fa2db62f38fce5f8eed969038095c4 [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);
Kumar Gala400d2212005-09-27 15:13:12 -050039extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
40extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
41extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
42extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
43extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
44extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
45extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
46extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell49209602005-10-12 15:55:09 +100047#endif /* CONFIG_PPC32 */
Olof Johanssonf39b7a52006-08-11 00:07:08 -050048#ifdef CONFIG_PPC64
Kumar Gala400d2212005-09-27 15:13:12 -050049extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
Olof Johansson5b43d202006-10-04 23:41:41 -050050extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
Olof Johansson11999192007-02-04 16:36:51 -060051extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell40d244d2007-02-12 22:10:48 +110052extern void __restore_cpu_pa6t(void);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050053extern void __restore_cpu_ppc970(void);
54#endif /* CONFIG_PPC64 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070055
Linus Torvalds1da177e2005-04-16 15:20:36 -070056/* This table only contains "desktop" CPUs, it need to be filled with embedded
57 * ones as well...
58 */
Stephen Rothwell49209602005-10-12 15:55:09 +100059#define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
60 PPC_FEATURE_HAS_MMU)
61#define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +110062#define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +110063#define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
64 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
65#define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
66 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
Anton Blanchard03054d52006-04-29 09:51:06 +100067#define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
Paul Mackerrasfab5db92006-06-07 16:14:40 +100068 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
69 PPC_FEATURE_TRUE_LE)
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -050070#define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
71 PPC_FEATURE_TRUE_LE | \
72 PPC_FEATURE_HAS_ALTIVEC_COMP)
Paul Mackerras80f15dc2006-01-14 10:11:39 +110073#define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
74 PPC_FEATURE_BOOKE)
Linus Torvalds1da177e2005-04-16 15:20:36 -070075
Paul Mackerras87a72f92007-10-04 14:18:01 +100076static struct cpu_spec __initdata cpu_specs[] = {
Stephen Rothwell49209602005-10-12 15:55:09 +100077#ifdef CONFIG_PPC64
78 { /* Power3 */
79 .pvr_mask = 0xffff0000,
80 .pvr_value = 0x00400000,
81 .cpu_name = "POWER3 (630)",
82 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +100083 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +100084 .icache_bsize = 128,
85 .dcache_bsize = 128,
86 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -060087 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +100088 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +000089 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110090 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +110091 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +100092 },
93 { /* Power3+ */
94 .pvr_mask = 0xffff0000,
95 .pvr_value = 0x00410000,
96 .cpu_name = "POWER3 (630+)",
97 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +100098 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +100099 .icache_bsize = 128,
100 .dcache_bsize = 128,
101 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600102 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000103 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000104 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100105 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100106 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +1000107 },
108 { /* Northstar */
109 .pvr_mask = 0xffff0000,
110 .pvr_value = 0x00330000,
111 .cpu_name = "RS64-II (northstar)",
112 .cpu_features = CPU_FTRS_RS64,
113 .cpu_user_features = COMMON_USER_PPC64,
114 .icache_bsize = 128,
115 .dcache_bsize = 128,
116 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600117 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000118 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000119 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100120 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100121 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000122 },
123 { /* Pulsar */
124 .pvr_mask = 0xffff0000,
125 .pvr_value = 0x00340000,
126 .cpu_name = "RS64-III (pulsar)",
127 .cpu_features = CPU_FTRS_RS64,
128 .cpu_user_features = COMMON_USER_PPC64,
129 .icache_bsize = 128,
130 .dcache_bsize = 128,
131 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600132 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000133 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000134 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100135 .machine_check = machine_check_generic,
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,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100150 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100151 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000152 },
153 { /* S-star */
154 .pvr_mask = 0xffff0000,
155 .pvr_value = 0x00370000,
156 .cpu_name = "RS64-IV (sstar)",
157 .cpu_features = CPU_FTRS_RS64,
158 .cpu_user_features = COMMON_USER_PPC64,
159 .icache_bsize = 128,
160 .dcache_bsize = 128,
161 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600162 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000163 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000164 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100165 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100166 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000167 },
168 { /* Power4 */
169 .pvr_mask = 0xffff0000,
170 .pvr_value = 0x00350000,
171 .cpu_name = "POWER4 (gp)",
172 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100173 .cpu_user_features = COMMON_USER_POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000174 .icache_bsize = 128,
175 .dcache_bsize = 128,
176 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600177 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000178 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000179 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100180 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100181 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000182 },
183 { /* Power4+ */
184 .pvr_mask = 0xffff0000,
185 .pvr_value = 0x00380000,
186 .cpu_name = "POWER4+ (gq)",
187 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100188 .cpu_user_features = COMMON_USER_POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000189 .icache_bsize = 128,
190 .dcache_bsize = 128,
191 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600192 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000193 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000194 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100195 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100196 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000197 },
198 { /* PPC970 */
199 .pvr_mask = 0xffff0000,
200 .pvr_value = 0x00390000,
201 .cpu_name = "PPC970",
202 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100203 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000204 PPC_FEATURE_HAS_ALTIVEC_COMP,
205 .icache_bsize = 128,
206 .dcache_bsize = 128,
207 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600208 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000209 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500210 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000211 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000212 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100213 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100214 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000215 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000216 { /* PPC970FX */
217 .pvr_mask = 0xffff0000,
218 .pvr_value = 0x003c0000,
219 .cpu_name = "PPC970FX",
Stephen Rothwell49209602005-10-12 15:55:09 +1000220 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100221 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000222 PPC_FEATURE_HAS_ALTIVEC_COMP,
223 .icache_bsize = 128,
224 .dcache_bsize = 128,
225 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600226 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000227 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500228 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000229 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000230 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100231 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100232 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000233 },
Olof Johansson3546e812007-02-26 00:35:14 -0600234 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
235 .pvr_mask = 0xffffffff,
236 .pvr_value = 0x00440100,
237 .cpu_name = "PPC970MP",
238 .cpu_features = CPU_FTRS_PPC970,
239 .cpu_user_features = COMMON_USER_POWER4 |
240 PPC_FEATURE_HAS_ALTIVEC_COMP,
241 .icache_bsize = 128,
242 .dcache_bsize = 128,
243 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000244 .pmc_type = PPC_PMC_IBM,
Olof Johansson3546e812007-02-26 00:35:14 -0600245 .cpu_setup = __setup_cpu_ppc970,
246 .cpu_restore = __restore_cpu_ppc970,
247 .oprofile_cpu_type = "ppc64/970MP",
248 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100249 .machine_check = machine_check_generic,
Olof Johansson3546e812007-02-26 00:35:14 -0600250 .platform = "ppc970",
251 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000252 { /* PPC970MP */
253 .pvr_mask = 0xffff0000,
254 .pvr_value = 0x00440000,
255 .cpu_name = "PPC970MP",
256 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100257 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000258 PPC_FEATURE_HAS_ALTIVEC_COMP,
259 .icache_bsize = 128,
260 .dcache_bsize = 128,
Anton Blanchard87af41b2006-05-05 05:44:26 +1000261 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000262 .pmc_type = PPC_PMC_IBM,
Olof Johansson5b43d202006-10-04 23:41:41 -0500263 .cpu_setup = __setup_cpu_ppc970MP,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500264 .cpu_restore = __restore_cpu_ppc970,
Mike Wolffecb3522006-11-21 14:41:54 -0600265 .oprofile_cpu_type = "ppc64/970MP",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000266 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100267 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100268 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000269 },
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500270 { /* PPC970GX */
271 .pvr_mask = 0xffff0000,
272 .pvr_value = 0x00450000,
273 .cpu_name = "PPC970GX",
274 .cpu_features = CPU_FTRS_PPC970,
275 .cpu_user_features = COMMON_USER_POWER4 |
276 PPC_FEATURE_HAS_ALTIVEC_COMP,
277 .icache_bsize = 128,
278 .dcache_bsize = 128,
279 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600280 .pmc_type = PPC_PMC_IBM,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500281 .cpu_setup = __setup_cpu_ppc970,
282 .oprofile_cpu_type = "ppc64/970",
283 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100284 .machine_check = machine_check_generic,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500285 .platform = "ppc970",
286 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100287 { /* Power5 GR */
Stephen Rothwell49209602005-10-12 15:55:09 +1000288 .pvr_mask = 0xffff0000,
289 .pvr_value = 0x003a0000,
290 .cpu_name = "POWER5 (gr)",
291 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100292 .cpu_user_features = COMMON_USER_POWER5,
Stephen Rothwell49209602005-10-12 15:55:09 +1000293 .icache_bsize = 128,
294 .dcache_bsize = 128,
295 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600296 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000297 .oprofile_cpu_type = "ppc64/power5",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000298 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000299 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
300 * and above but only works on POWER5 and above
301 */
302 .oprofile_mmcra_sihv = MMCRA_SIHV,
303 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100304 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100305 .platform = "power5",
Stephen Rothwell49209602005-10-12 15:55:09 +1000306 },
Mike Wolf31a12ce2007-07-10 13:13:47 -0500307 { /* Power5++ */
308 .pvr_mask = 0xffffff00,
309 .pvr_value = 0x003b0300,
310 .cpu_name = "POWER5+ (gs)",
311 .cpu_features = CPU_FTRS_POWER5,
312 .cpu_user_features = COMMON_USER_POWER5_PLUS,
313 .icache_bsize = 128,
314 .dcache_bsize = 128,
315 .num_pmcs = 6,
316 .oprofile_cpu_type = "ppc64/power5++",
317 .oprofile_type = PPC_OPROFILE_POWER4,
318 .oprofile_mmcra_sihv = MMCRA_SIHV,
319 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100320 .machine_check = machine_check_generic,
Mike Wolf31a12ce2007-07-10 13:13:47 -0500321 .platform = "power5+",
322 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100323 { /* Power5 GS */
Stephen Rothwell49209602005-10-12 15:55:09 +1000324 .pvr_mask = 0xffff0000,
325 .pvr_value = 0x003b0000,
Anton Blanchard834608f2006-01-09 15:42:30 +1100326 .cpu_name = "POWER5+ (gs)",
Stephen Rothwell49209602005-10-12 15:55:09 +1000327 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100328 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Stephen Rothwell49209602005-10-12 15:55:09 +1000329 .icache_bsize = 128,
330 .dcache_bsize = 128,
331 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600332 .pmc_type = PPC_PMC_IBM,
Anton Blanchard834608f2006-01-09 15:42:30 +1100333 .oprofile_cpu_type = "ppc64/power5+",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000334 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000335 .oprofile_mmcra_sihv = MMCRA_SIHV,
336 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100337 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100338 .platform = "power5+",
Stephen Rothwell49209602005-10-12 15:55:09 +1000339 },
Paul Mackerras974a76f2006-11-10 20:38:53 +1100340 { /* POWER6 in P5+ mode; 2.04-compliant processor */
341 .pvr_mask = 0xffffffff,
342 .pvr_value = 0x0f000001,
343 .cpu_name = "POWER5+",
344 .cpu_features = CPU_FTRS_POWER5,
345 .cpu_user_features = COMMON_USER_POWER5_PLUS,
346 .icache_bsize = 128,
347 .dcache_bsize = 128,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100348 .machine_check = machine_check_generic,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100349 .platform = "power5+",
350 },
Anton Blanchard03054d52006-04-29 09:51:06 +1000351 { /* Power6 */
352 .pvr_mask = 0xffff0000,
353 .pvr_value = 0x003e0000,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100354 .cpu_name = "POWER6 (raw)",
355 .cpu_features = CPU_FTRS_POWER6,
356 .cpu_user_features = COMMON_USER_POWER6 |
357 PPC_FEATURE_POWER6_EXT,
358 .icache_bsize = 128,
359 .dcache_bsize = 128,
360 .num_pmcs = 6,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000361 .pmc_type = PPC_PMC_IBM,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100362 .oprofile_cpu_type = "ppc64/power6",
363 .oprofile_type = PPC_OPROFILE_POWER4,
364 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
365 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
366 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
367 POWER6_MMCRA_OTHER,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100368 .machine_check = machine_check_generic,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100369 .platform = "power6x",
370 },
371 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
372 .pvr_mask = 0xffffffff,
373 .pvr_value = 0x0f000002,
374 .cpu_name = "POWER6 (architected)",
Anton Blanchard03054d52006-04-29 09:51:06 +1000375 .cpu_features = CPU_FTRS_POWER6,
376 .cpu_user_features = COMMON_USER_POWER6,
377 .icache_bsize = 128,
378 .dcache_bsize = 128,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100379 .machine_check = machine_check_generic,
Anton Blanchard03054d52006-04-29 09:51:06 +1000380 .platform = "power6",
381 },
Arnd Bergmannc902be72006-01-04 19:55:53 +0000382 { /* Cell Broadband Engine */
Stephen Rothwell49209602005-10-12 15:55:09 +1000383 .pvr_mask = 0xffff0000,
384 .pvr_value = 0x00700000,
385 .cpu_name = "Cell Broadband Engine",
386 .cpu_features = CPU_FTRS_CELL,
387 .cpu_user_features = COMMON_USER_PPC64 |
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +1100388 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
389 PPC_FEATURE_SMT,
Stephen Rothwell49209602005-10-12 15:55:09 +1000390 .icache_bsize = 128,
391 .dcache_bsize = 128,
Maynard Johnson18f21902006-11-20 18:45:16 +0100392 .num_pmcs = 4,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600393 .pmc_type = PPC_PMC_IBM,
Maynard Johnson18f21902006-11-20 18:45:16 +0100394 .oprofile_cpu_type = "ppc64/cell-be",
395 .oprofile_type = PPC_OPROFILE_CELL,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100396 .machine_check = machine_check_generic,
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,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100413 .machine_check = machine_check_generic,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500414 .platform = "pa6t",
415 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000416 { /* default match */
417 .pvr_mask = 0x00000000,
418 .pvr_value = 0x00000000,
419 .cpu_name = "POWER4 (compatible)",
420 .cpu_features = CPU_FTRS_COMPATIBLE,
421 .cpu_user_features = COMMON_USER_PPC64,
422 .icache_bsize = 128,
423 .dcache_bsize = 128,
424 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600425 .pmc_type = PPC_PMC_IBM,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100426 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100427 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000428 }
429#endif /* CONFIG_PPC64 */
430#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -0700431#if CLASSIC_PPC
Stephen Rothwell49209602005-10-12 15:55:09 +1000432 { /* 601 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700433 .pvr_mask = 0xffff0000,
434 .pvr_value = 0x00010000,
435 .cpu_name = "601",
Kumar Gala10b35d92005-09-23 14:08:58 -0500436 .cpu_features = CPU_FTRS_PPC601,
Stephen Rothwell49209602005-10-12 15:55:09 +1000437 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
Paul Mackerras98599012005-10-22 16:51:34 +1000438 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700439 .icache_bsize = 32,
440 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100441 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100442 .platform = "ppc601",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700443 },
444 { /* 603 */
445 .pvr_mask = 0xffff0000,
446 .pvr_value = 0x00030000,
447 .cpu_name = "603",
Kumar Gala10b35d92005-09-23 14:08:58 -0500448 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000449 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700450 .icache_bsize = 32,
451 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100452 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100453 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100454 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700455 },
456 { /* 603e */
457 .pvr_mask = 0xffff0000,
458 .pvr_value = 0x00060000,
459 .cpu_name = "603e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500460 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000461 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700462 .icache_bsize = 32,
463 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100464 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100465 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100466 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700467 },
468 { /* 603ev */
469 .pvr_mask = 0xffff0000,
470 .pvr_value = 0x00070000,
471 .cpu_name = "603ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500472 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000473 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700474 .icache_bsize = 32,
475 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100476 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100477 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100478 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700479 },
480 { /* 604 */
481 .pvr_mask = 0xffff0000,
482 .pvr_value = 0x00040000,
483 .cpu_name = "604",
Kumar Gala10b35d92005-09-23 14:08:58 -0500484 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000485 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700486 .icache_bsize = 32,
487 .dcache_bsize = 32,
488 .num_pmcs = 2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100489 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100490 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100491 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700492 },
493 { /* 604e */
494 .pvr_mask = 0xfffff000,
495 .pvr_value = 0x00090000,
496 .cpu_name = "604e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500497 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000498 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700499 .icache_bsize = 32,
500 .dcache_bsize = 32,
501 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100502 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100503 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100504 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700505 },
506 { /* 604r */
507 .pvr_mask = 0xffff0000,
508 .pvr_value = 0x00090000,
509 .cpu_name = "604r",
Kumar Gala10b35d92005-09-23 14:08:58 -0500510 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000511 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700512 .icache_bsize = 32,
513 .dcache_bsize = 32,
514 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100515 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100516 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100517 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700518 },
519 { /* 604ev */
520 .pvr_mask = 0xffff0000,
521 .pvr_value = 0x000a0000,
522 .cpu_name = "604ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500523 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000524 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700525 .icache_bsize = 32,
526 .dcache_bsize = 32,
527 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100528 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100529 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100530 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700531 },
532 { /* 740/750 (0x4202, don't support TAU ?) */
533 .pvr_mask = 0xffffffff,
534 .pvr_value = 0x00084202,
535 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500536 .cpu_features = CPU_FTRS_740_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000537 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700538 .icache_bsize = 32,
539 .dcache_bsize = 32,
540 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100541 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100542 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100543 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700544 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700545 { /* 750CX (80100 and 8010x?) */
546 .pvr_mask = 0xfffffff0,
547 .pvr_value = 0x00080100,
548 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500549 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000550 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700551 .icache_bsize = 32,
552 .dcache_bsize = 32,
553 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100554 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100555 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100556 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700557 },
558 { /* 750CX (82201 and 82202) */
559 .pvr_mask = 0xfffffff0,
560 .pvr_value = 0x00082200,
561 .cpu_name = "750CX",
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,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100568 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100569 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700570 },
571 { /* 750CXe (82214) */
572 .pvr_mask = 0xfffffff0,
573 .pvr_value = 0x00082210,
574 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500575 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000576 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700577 .icache_bsize = 32,
578 .dcache_bsize = 32,
579 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100580 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100581 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100582 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700583 },
Arthur Othieno7c316252005-09-03 15:55:52 -0700584 { /* 750CXe "Gekko" (83214) */
585 .pvr_mask = 0xffffffff,
586 .pvr_value = 0x00083214,
587 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500588 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000589 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Arthur Othieno7c316252005-09-03 15:55:52 -0700590 .icache_bsize = 32,
591 .dcache_bsize = 32,
592 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100593 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100594 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100595 .platform = "ppc750",
Arthur Othieno7c316252005-09-03 15:55:52 -0700596 },
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500597 { /* 750CL */
598 .pvr_mask = 0xfffff0f0,
599 .pvr_value = 0x00087010,
600 .cpu_name = "750CL",
Josh Boyera14c4502007-04-13 04:33:25 +1000601 .cpu_features = CPU_FTRS_750CL,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500602 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
603 .icache_bsize = 32,
604 .dcache_bsize = 32,
605 .num_pmcs = 4,
Josh Boyera14c4502007-04-13 04:33:25 +1000606 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100607 .machine_check = machine_check_generic,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500608 .platform = "ppc750",
609 },
Arthur Othienoac1ff042005-09-03 15:55:51 -0700610 { /* 745/755 */
611 .pvr_mask = 0xfffff000,
612 .pvr_value = 0x00083000,
613 .cpu_name = "745/755",
Kumar Gala10b35d92005-09-23 14:08:58 -0500614 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000615 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Arthur Othienoac1ff042005-09-03 15:55:51 -0700616 .icache_bsize = 32,
617 .dcache_bsize = 32,
618 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100619 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100620 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100621 .platform = "ppc750",
Arthur Othienoac1ff042005-09-03 15:55:51 -0700622 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700623 { /* 750FX rev 1.x */
624 .pvr_mask = 0xffffff00,
625 .pvr_value = 0x70000100,
626 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500627 .cpu_features = CPU_FTRS_750FX1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000628 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700629 .icache_bsize = 32,
630 .dcache_bsize = 32,
631 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100632 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100633 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100634 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700635 },
636 { /* 750FX rev 2.0 must disable HID0[DPM] */
637 .pvr_mask = 0xffffffff,
638 .pvr_value = 0x70000200,
639 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500640 .cpu_features = CPU_FTRS_750FX2,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000641 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700642 .icache_bsize = 32,
643 .dcache_bsize = 32,
644 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100645 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100646 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100647 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700648 },
649 { /* 750FX (All revs except 2.0) */
650 .pvr_mask = 0xffff0000,
651 .pvr_value = 0x70000000,
652 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500653 .cpu_features = CPU_FTRS_750FX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000654 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700655 .icache_bsize = 32,
656 .dcache_bsize = 32,
657 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100658 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100659 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100660 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700661 },
662 { /* 750GX */
663 .pvr_mask = 0xffff0000,
664 .pvr_value = 0x70020000,
665 .cpu_name = "750GX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500666 .cpu_features = CPU_FTRS_750GX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000667 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700668 .icache_bsize = 32,
669 .dcache_bsize = 32,
670 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100671 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100672 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100673 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700674 },
675 { /* 740/750 (L2CR bit need fixup for 740) */
676 .pvr_mask = 0xffff0000,
677 .pvr_value = 0x00080000,
678 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500679 .cpu_features = CPU_FTRS_740,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000680 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700681 .icache_bsize = 32,
682 .dcache_bsize = 32,
683 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100684 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100685 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100686 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700687 },
688 { /* 7400 rev 1.1 ? (no TAU) */
689 .pvr_mask = 0xffffffff,
690 .pvr_value = 0x000c1101,
691 .cpu_name = "7400 (1.1)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500692 .cpu_features = CPU_FTRS_7400_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000693 .cpu_user_features = COMMON_USER |
694 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700695 .icache_bsize = 32,
696 .dcache_bsize = 32,
697 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100698 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100699 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100700 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700701 },
702 { /* 7400 */
703 .pvr_mask = 0xffff0000,
704 .pvr_value = 0x000c0000,
705 .cpu_name = "7400",
Kumar Gala10b35d92005-09-23 14:08:58 -0500706 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000707 .cpu_user_features = COMMON_USER |
708 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700709 .icache_bsize = 32,
710 .dcache_bsize = 32,
711 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100712 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100713 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100714 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700715 },
716 { /* 7410 */
717 .pvr_mask = 0xffff0000,
718 .pvr_value = 0x800c0000,
719 .cpu_name = "7410",
Kumar Gala10b35d92005-09-23 14:08:58 -0500720 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000721 .cpu_user_features = COMMON_USER |
722 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700723 .icache_bsize = 32,
724 .dcache_bsize = 32,
725 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100726 .cpu_setup = __setup_cpu_7410,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100727 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100728 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700729 },
730 { /* 7450 2.0 - no doze/nap */
731 .pvr_mask = 0xffffffff,
732 .pvr_value = 0x80000200,
733 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500734 .cpu_features = CPU_FTRS_7450_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000735 .cpu_user_features = COMMON_USER |
736 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700737 .icache_bsize = 32,
738 .dcache_bsize = 32,
739 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600740 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600741 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000742 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100743 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100744 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700745 },
746 { /* 7450 2.1 */
747 .pvr_mask = 0xffffffff,
748 .pvr_value = 0x80000201,
749 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500750 .cpu_features = CPU_FTRS_7450_21,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000751 .cpu_user_features = COMMON_USER |
752 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700753 .icache_bsize = 32,
754 .dcache_bsize = 32,
755 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600756 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600757 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000758 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100759 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100760 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700761 },
762 { /* 7450 2.3 and newer */
763 .pvr_mask = 0xffff0000,
764 .pvr_value = 0x80000000,
765 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500766 .cpu_features = CPU_FTRS_7450_23,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000767 .cpu_user_features = COMMON_USER |
768 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700769 .icache_bsize = 32,
770 .dcache_bsize = 32,
771 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600772 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600773 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000774 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100775 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100776 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700777 },
778 { /* 7455 rev 1.x */
779 .pvr_mask = 0xffffff00,
780 .pvr_value = 0x80010100,
781 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500782 .cpu_features = CPU_FTRS_7455_1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000783 .cpu_user_features = COMMON_USER |
784 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700785 .icache_bsize = 32,
786 .dcache_bsize = 32,
787 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600788 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600789 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000790 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100791 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100792 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700793 },
794 { /* 7455 rev 2.0 */
795 .pvr_mask = 0xffffffff,
796 .pvr_value = 0x80010200,
797 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500798 .cpu_features = CPU_FTRS_7455_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000799 .cpu_user_features = COMMON_USER |
800 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700801 .icache_bsize = 32,
802 .dcache_bsize = 32,
803 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600804 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600805 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000806 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100807 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100808 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700809 },
810 { /* 7455 others */
811 .pvr_mask = 0xffff0000,
812 .pvr_value = 0x80010000,
813 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500814 .cpu_features = CPU_FTRS_7455,
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,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100823 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100824 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700825 },
826 { /* 7447/7457 Rev 1.0 */
827 .pvr_mask = 0xffffffff,
828 .pvr_value = 0x80020100,
829 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500830 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000831 .cpu_user_features = COMMON_USER |
832 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700833 .icache_bsize = 32,
834 .dcache_bsize = 32,
835 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600836 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600837 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000838 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100839 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100840 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700841 },
842 { /* 7447/7457 Rev 1.1 */
843 .pvr_mask = 0xffffffff,
844 .pvr_value = 0x80020101,
845 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500846 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000847 .cpu_user_features = COMMON_USER |
848 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700849 .icache_bsize = 32,
850 .dcache_bsize = 32,
851 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600852 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600853 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000854 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100855 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100856 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700857 },
858 { /* 7447/7457 Rev 1.2 and later */
859 .pvr_mask = 0xffff0000,
860 .pvr_value = 0x80020000,
861 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500862 .cpu_features = CPU_FTRS_7447,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000863 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700864 .icache_bsize = 32,
865 .dcache_bsize = 32,
866 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600867 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600868 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000869 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100870 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100871 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700872 },
873 { /* 7447A */
874 .pvr_mask = 0xffff0000,
875 .pvr_value = 0x80030000,
876 .cpu_name = "7447A",
Kumar Gala10b35d92005-09-23 14:08:58 -0500877 .cpu_features = CPU_FTRS_7447A,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000878 .cpu_user_features = COMMON_USER |
879 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700880 .icache_bsize = 32,
881 .dcache_bsize = 32,
882 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600883 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600884 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000885 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100886 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100887 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700888 },
Kumar Galabbde6302005-09-03 15:55:55 -0700889 { /* 7448 */
890 .pvr_mask = 0xffff0000,
891 .pvr_value = 0x80040000,
892 .cpu_name = "7448",
James.Yang3d372542007-05-02 16:34:43 -0500893 .cpu_features = CPU_FTRS_7448,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000894 .cpu_user_features = COMMON_USER |
895 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Kumar Galabbde6302005-09-03 15:55:55 -0700896 .icache_bsize = 32,
897 .dcache_bsize = 32,
898 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600899 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600900 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000901 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100902 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100903 .platform = "ppc7450",
Kumar Galabbde6302005-09-03 15:55:55 -0700904 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700905 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
906 .pvr_mask = 0x7fff0000,
907 .pvr_value = 0x00810000,
908 .cpu_name = "82xx",
Kumar Gala10b35d92005-09-23 14:08:58 -0500909 .cpu_features = CPU_FTRS_82XX,
Stephen Rothwell49209602005-10-12 15:55:09 +1000910 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700911 .icache_bsize = 32,
912 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100913 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100914 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100915 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700916 },
917 { /* All G2_LE (603e core, plus some) have the same pvr */
918 .pvr_mask = 0x7fff0000,
919 .pvr_value = 0x00820000,
920 .cpu_name = "G2_LE",
Kumar Gala10b35d92005-09-23 14:08:58 -0500921 .cpu_features = CPU_FTRS_G2_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000922 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700923 .icache_bsize = 32,
924 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100925 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100926 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100927 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700928 },
Kim Phillips6c4a2502006-10-02 20:10:24 -0500929 { /* e300c1 (a 603e core, plus some) on 83xx */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700930 .pvr_mask = 0x7fff0000,
931 .pvr_value = 0x00830000,
Kim Phillips6c4a2502006-10-02 20:10:24 -0500932 .cpu_name = "e300c1",
Kumar Gala10b35d92005-09-23 14:08:58 -0500933 .cpu_features = CPU_FTRS_E300,
Stephen Rothwell49209602005-10-12 15:55:09 +1000934 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700935 .icache_bsize = 32,
936 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100937 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100938 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100939 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700940 },
Kim Phillips6c4a2502006-10-02 20:10:24 -0500941 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
942 .pvr_mask = 0x7fff0000,
943 .pvr_value = 0x00840000,
944 .cpu_name = "e300c2",
Kim Phillipsaa42c692006-12-08 02:43:30 -0600945 .cpu_features = CPU_FTRS_E300C2,
Kim Phillips6c4a2502006-10-02 20:10:24 -0500946 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
947 .icache_bsize = 32,
948 .dcache_bsize = 32,
949 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100950 .machine_check = machine_check_generic,
Kim Phillips6c4a2502006-10-02 20:10:24 -0500951 .platform = "ppc603",
952 },
Li Yanga58d5242007-10-19 19:38:42 +0800953 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
Scott Wood57933f82006-12-01 12:57:05 -0600954 .pvr_mask = 0x7fff0000,
955 .pvr_value = 0x00850000,
956 .cpu_name = "e300c3",
957 .cpu_features = CPU_FTRS_E300,
958 .cpu_user_features = COMMON_USER,
959 .icache_bsize = 32,
960 .dcache_bsize = 32,
961 .cpu_setup = __setup_cpu_603,
962 .platform = "ppc603",
963 },
Li Yanga58d5242007-10-19 19:38:42 +0800964 { /* e300c4 (e300c1, plus one IU) */
965 .pvr_mask = 0x7fff0000,
966 .pvr_value = 0x00860000,
967 .cpu_name = "e300c4",
968 .cpu_features = CPU_FTRS_E300,
969 .cpu_user_features = COMMON_USER,
970 .icache_bsize = 32,
971 .dcache_bsize = 32,
972 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100973 .machine_check = machine_check_generic,
Li Yanga58d5242007-10-19 19:38:42 +0800974 .platform = "ppc603",
975 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700976 { /* default match, we assume split I/D cache & TB (non-601)... */
977 .pvr_mask = 0x00000000,
978 .pvr_value = 0x00000000,
979 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500980 .cpu_features = CPU_FTRS_CLASSIC32,
Stephen Rothwell49209602005-10-12 15:55:09 +1000981 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700982 .icache_bsize = 32,
983 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100984 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100985 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700986 },
987#endif /* CLASSIC_PPC */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700988#ifdef CONFIG_8xx
989 { /* 8xx */
990 .pvr_mask = 0xffff0000,
991 .pvr_value = 0x00500000,
992 .cpu_name = "8xx",
993 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
994 * if the 8xx code is there.... */
Kumar Gala10b35d92005-09-23 14:08:58 -0500995 .cpu_features = CPU_FTRS_8XX,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700996 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
997 .icache_bsize = 16,
998 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100999 .platform = "ppc823",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001000 },
1001#endif /* CONFIG_8xx */
1002#ifdef CONFIG_40x
1003 { /* 403GC */
1004 .pvr_mask = 0xffffff00,
1005 .pvr_value = 0x00200200,
1006 .cpu_name = "403GC",
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 | PPC_FEATURE_HAS_MMU,
1009 .icache_bsize = 16,
1010 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001011 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001012 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001013 },
1014 { /* 403GCX */
1015 .pvr_mask = 0xffffff00,
1016 .pvr_value = 0x00201400,
1017 .cpu_name = "403GCX",
Kumar Gala10b35d92005-09-23 14:08:58 -05001018 .cpu_features = CPU_FTRS_40X,
Paul Mackerras98599012005-10-22 16:51:34 +10001019 .cpu_user_features = PPC_FEATURE_32 |
1020 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001021 .icache_bsize = 16,
1022 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001023 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001024 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001025 },
1026 { /* 403G ?? */
1027 .pvr_mask = 0xffff0000,
1028 .pvr_value = 0x00200000,
1029 .cpu_name = "403G ??",
Kumar Gala10b35d92005-09-23 14:08:58 -05001030 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001031 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1032 .icache_bsize = 16,
1033 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001034 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001035 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001036 },
1037 { /* 405GP */
1038 .pvr_mask = 0xffff0000,
1039 .pvr_value = 0x40110000,
1040 .cpu_name = "405GP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001041 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001042 .cpu_user_features = PPC_FEATURE_32 |
1043 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1044 .icache_bsize = 32,
1045 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001046 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001047 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001048 },
1049 { /* STB 03xxx */
1050 .pvr_mask = 0xffff0000,
1051 .pvr_value = 0x40130000,
1052 .cpu_name = "STB03xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001053 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001054 .cpu_user_features = PPC_FEATURE_32 |
1055 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1056 .icache_bsize = 32,
1057 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001058 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001059 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001060 },
1061 { /* STB 04xxx */
1062 .pvr_mask = 0xffff0000,
1063 .pvr_value = 0x41810000,
1064 .cpu_name = "STB04xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001065 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001066 .cpu_user_features = PPC_FEATURE_32 |
1067 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1068 .icache_bsize = 32,
1069 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001070 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001071 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001072 },
1073 { /* NP405L */
1074 .pvr_mask = 0xffff0000,
1075 .pvr_value = 0x41610000,
1076 .cpu_name = "NP405L",
Kumar Gala10b35d92005-09-23 14:08:58 -05001077 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001078 .cpu_user_features = PPC_FEATURE_32 |
1079 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1080 .icache_bsize = 32,
1081 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001082 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001083 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001084 },
1085 { /* NP4GS3 */
1086 .pvr_mask = 0xffff0000,
1087 .pvr_value = 0x40B10000,
1088 .cpu_name = "NP4GS3",
Kumar Gala10b35d92005-09-23 14:08:58 -05001089 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001090 .cpu_user_features = PPC_FEATURE_32 |
1091 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1092 .icache_bsize = 32,
1093 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001094 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001095 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001096 },
1097 { /* NP405H */
1098 .pvr_mask = 0xffff0000,
1099 .pvr_value = 0x41410000,
1100 .cpu_name = "NP405H",
Kumar Gala10b35d92005-09-23 14:08:58 -05001101 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001102 .cpu_user_features = PPC_FEATURE_32 |
1103 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1104 .icache_bsize = 32,
1105 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001106 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001107 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001108 },
1109 { /* 405GPr */
1110 .pvr_mask = 0xffff0000,
1111 .pvr_value = 0x50910000,
1112 .cpu_name = "405GPr",
Kumar Gala10b35d92005-09-23 14:08:58 -05001113 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001114 .cpu_user_features = PPC_FEATURE_32 |
1115 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1116 .icache_bsize = 32,
1117 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001118 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001119 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001120 },
1121 { /* STBx25xx */
1122 .pvr_mask = 0xffff0000,
1123 .pvr_value = 0x51510000,
1124 .cpu_name = "STBx25xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001125 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001126 .cpu_user_features = PPC_FEATURE_32 |
1127 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1128 .icache_bsize = 32,
1129 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001130 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001131 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001132 },
1133 { /* 405LP */
1134 .pvr_mask = 0xffff0000,
1135 .pvr_value = 0x41F10000,
1136 .cpu_name = "405LP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001137 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001138 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1139 .icache_bsize = 32,
1140 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001141 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001142 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001143 },
1144 { /* Xilinx Virtex-II Pro */
Grant C. Likely72646c72006-01-19 01:13:20 -07001145 .pvr_mask = 0xfffff000,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001146 .pvr_value = 0x20010000,
1147 .cpu_name = "Virtex-II Pro",
Kumar Gala10b35d92005-09-23 14:08:58 -05001148 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001149 .cpu_user_features = PPC_FEATURE_32 |
1150 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1151 .icache_bsize = 32,
1152 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001153 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001154 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001155 },
Grant C. Likely72646c72006-01-19 01:13:20 -07001156 { /* Xilinx Virtex-4 FX */
1157 .pvr_mask = 0xfffff000,
1158 .pvr_value = 0x20011000,
1159 .cpu_name = "Virtex-4 FX",
1160 .cpu_features = CPU_FTRS_40X,
1161 .cpu_user_features = PPC_FEATURE_32 |
1162 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1163 .icache_bsize = 32,
1164 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001165 .machine_check = machine_check_4xx,
Peter Bergner838fdb42006-09-14 14:18:38 -05001166 .platform = "ppc405",
Grant C. Likely72646c72006-01-19 01:13:20 -07001167 },
Eugene Suroveginad95d602005-06-07 13:22:09 -07001168 { /* 405EP */
1169 .pvr_mask = 0xffff0000,
1170 .pvr_value = 0x51210000,
1171 .cpu_name = "405EP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001172 .cpu_features = CPU_FTRS_40X,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001173 .cpu_user_features = PPC_FEATURE_32 |
1174 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1175 .icache_bsize = 32,
1176 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001177 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001178 .platform = "ppc405",
Eugene Suroveginad95d602005-06-07 13:22:09 -07001179 },
Stefan Roese5d8476c2007-10-11 22:08:14 +10001180 { /* 405EX */
Stefan Roeseb676d842008-01-15 18:09:15 +11001181 .pvr_mask = 0xffff0004,
1182 .pvr_value = 0x12910004,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001183 .cpu_name = "405EX",
1184 .cpu_features = CPU_FTRS_40X,
1185 .cpu_user_features = PPC_FEATURE_32 |
1186 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1187 .icache_bsize = 32,
1188 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001189 .machine_check = machine_check_4xx,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001190 .platform = "ppc405",
1191 },
Stefan Roeseb676d842008-01-15 18:09:15 +11001192 { /* 405EXr */
1193 .pvr_mask = 0xffff0004,
1194 .pvr_value = 0x12910000,
1195 .cpu_name = "405EXr",
1196 .cpu_features = CPU_FTRS_40X,
1197 .cpu_user_features = PPC_FEATURE_32 |
1198 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1199 .icache_bsize = 32,
1200 .dcache_bsize = 32,
1201 .machine_check = machine_check_4xx,
1202 .platform = "ppc405",
1203 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001204
1205#endif /* CONFIG_40x */
1206#ifdef CONFIG_44x
Matt Porterc9cf73a2005-07-31 22:34:52 -07001207 {
1208 .pvr_mask = 0xf0000fff,
1209 .pvr_value = 0x40000850,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001210 .cpu_name = "440GR Rev. A",
1211 .cpu_features = CPU_FTRS_44X,
1212 .cpu_user_features = COMMON_USER_BOOKE,
1213 .icache_bsize = 32,
1214 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001215 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001216 .platform = "ppc440",
1217 },
1218 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1219 .pvr_mask = 0xf0000fff,
1220 .pvr_value = 0x40000858,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001221 .cpu_name = "440EP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001222 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001223 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001224 .icache_bsize = 32,
1225 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001226 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001227 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001228 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001229 },
1230 {
1231 .pvr_mask = 0xf0000fff,
1232 .pvr_value = 0x400008d3,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001233 .cpu_name = "440GR Rev. B",
1234 .cpu_features = CPU_FTRS_44X,
1235 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1236 .icache_bsize = 32,
1237 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001238 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001239 .platform = "ppc440",
1240 },
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001241 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1242 .pvr_mask = 0xf0000ff7,
1243 .pvr_value = 0x400008d4,
1244 .cpu_name = "440EP Rev. C",
1245 .cpu_features = CPU_FTRS_44X,
1246 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1247 .icache_bsize = 32,
1248 .dcache_bsize = 32,
1249 .cpu_setup = __setup_cpu_440ep,
1250 .machine_check = machine_check_4xx,
1251 .platform = "ppc440",
1252 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001253 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1254 .pvr_mask = 0xf0000fff,
1255 .pvr_value = 0x400008db,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001256 .cpu_name = "440EP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001257 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001258 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001259 .icache_bsize = 32,
1260 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001261 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001262 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001263 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001264 },
Valentine Barshak15fc9932007-08-29 17:40:30 +04001265 { /* 440GRX */
1266 .pvr_mask = 0xf0000ffb,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001267 .pvr_value = 0x200008D0,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001268 .cpu_name = "440GRX",
1269 .cpu_features = CPU_FTRS_44X,
1270 .cpu_user_features = COMMON_USER_BOOKE,
1271 .icache_bsize = 32,
1272 .dcache_bsize = 32,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001273 .cpu_setup = __setup_cpu_440grx,
Valentine Barshakb2be3b12007-12-22 03:22:23 +11001274 .machine_check = machine_check_440A,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001275 .platform = "ppc440",
Valentine Barshak15fc9932007-08-29 17:40:30 +04001276 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001277 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1278 .pvr_mask = 0xf0000ffb,
1279 .pvr_value = 0x200008D8,
1280 .cpu_name = "440EPX",
1281 .cpu_features = CPU_FTRS_44X,
1282 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1283 .icache_bsize = 32,
1284 .dcache_bsize = 32,
1285 .cpu_setup = __setup_cpu_440epx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001286 .machine_check = machine_check_440A,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001287 .platform = "ppc440",
1288 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001289 { /* 440GP Rev. B */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001290 .pvr_mask = 0xf0000fff,
1291 .pvr_value = 0x40000440,
1292 .cpu_name = "440GP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001293 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001294 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001295 .icache_bsize = 32,
1296 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001297 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001298 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001299 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001300 { /* 440GP Rev. C */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001301 .pvr_mask = 0xf0000fff,
1302 .pvr_value = 0x40000481,
1303 .cpu_name = "440GP Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001304 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001305 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001306 .icache_bsize = 32,
1307 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001308 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001309 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001310 },
1311 { /* 440GX Rev. A */
1312 .pvr_mask = 0xf0000fff,
1313 .pvr_value = 0x50000850,
1314 .cpu_name = "440GX Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001315 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001316 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001317 .icache_bsize = 32,
1318 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001319 .cpu_setup = __setup_cpu_440gx,
1320 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001321 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001322 },
1323 { /* 440GX Rev. B */
1324 .pvr_mask = 0xf0000fff,
1325 .pvr_value = 0x50000851,
1326 .cpu_name = "440GX Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001327 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001328 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001329 .icache_bsize = 32,
1330 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001331 .cpu_setup = __setup_cpu_440gx,
1332 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001333 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001334 },
1335 { /* 440GX Rev. C */
1336 .pvr_mask = 0xf0000fff,
1337 .pvr_value = 0x50000892,
1338 .cpu_name = "440GX Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001339 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001340 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001341 .icache_bsize = 32,
1342 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001343 .cpu_setup = __setup_cpu_440gx,
1344 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001345 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001346 },
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001347 { /* 440GX Rev. F */
1348 .pvr_mask = 0xf0000fff,
1349 .pvr_value = 0x50000894,
1350 .cpu_name = "440GX Rev. F",
Kumar Gala10b35d92005-09-23 14:08:58 -05001351 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001352 .cpu_user_features = COMMON_USER_BOOKE,
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001353 .icache_bsize = 32,
1354 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001355 .cpu_setup = __setup_cpu_440gx,
1356 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001357 .platform = "ppc440",
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001358 },
Matt Porter656de7e2005-09-03 15:55:42 -07001359 { /* 440SP Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001360 .pvr_mask = 0xfff00fff,
1361 .pvr_value = 0x53200891,
Matt Porter656de7e2005-09-03 15:55:42 -07001362 .cpu_name = "440SP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001363 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001364 .cpu_user_features = COMMON_USER_BOOKE,
Matt Porter656de7e2005-09-03 15:55:42 -07001365 .icache_bsize = 32,
1366 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001367 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001368 .platform = "ppc440",
Matt Porter656de7e2005-09-03 15:55:42 -07001369 },
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001370 { /* 440SPe Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001371 .pvr_mask = 0xfff00fff,
1372 .pvr_value = 0x53400890,
1373 .cpu_name = "440SPe Rev. A",
1374 .cpu_features = CPU_FTRS_44X,
1375 .cpu_user_features = COMMON_USER_BOOKE,
1376 .icache_bsize = 32,
1377 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001378 .cpu_setup = __setup_cpu_440spe,
1379 .machine_check = machine_check_440A,
Roland Dreier333e6152007-06-16 05:36:32 +10001380 .platform = "ppc440",
1381 },
1382 { /* 440SPe Rev. B */
1383 .pvr_mask = 0xfff00fff,
1384 .pvr_value = 0x53400891,
1385 .cpu_name = "440SPe Rev. B",
Kumar Galaa147c582006-12-08 02:34:38 -06001386 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001387 .cpu_user_features = COMMON_USER_BOOKE,
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001388 .icache_bsize = 32,
1389 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001390 .cpu_setup = __setup_cpu_440spe,
1391 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001392 .platform = "ppc440",
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001393 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001394#endif /* CONFIG_44x */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001395#ifdef CONFIG_FSL_BOOKE
Josh Boyere3e414b2007-12-24 08:44:47 -06001396#ifdef CONFIG_E200
Stephen Rothwell49209602005-10-12 15:55:09 +10001397 { /* e200z5 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001398 .pvr_mask = 0xfff00000,
1399 .pvr_value = 0x81000000,
1400 .cpu_name = "e200z5",
1401 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001402 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001403 .cpu_user_features = COMMON_USER_BOOKE |
1404 PPC_FEATURE_HAS_EFP_SINGLE |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001405 PPC_FEATURE_UNIFIED_CACHE,
1406 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001407 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001408 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001409 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001410 { /* e200z6 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001411 .pvr_mask = 0xfff00000,
1412 .pvr_value = 0x81100000,
1413 .cpu_name = "e200z6",
1414 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001415 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001416 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001417 PPC_FEATURE_HAS_SPE_COMP |
1418 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001419 PPC_FEATURE_UNIFIED_CACHE,
1420 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001421 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001422 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001423 },
Josh Boyere3e414b2007-12-24 08:44:47 -06001424#elif defined(CONFIG_E500)
Stephen Rothwell49209602005-10-12 15:55:09 +10001425 { /* e500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001426 .pvr_mask = 0xffff0000,
1427 .pvr_value = 0x80200000,
1428 .cpu_name = "e500",
1429 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001430 .cpu_features = CPU_FTRS_E500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001431 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001432 PPC_FEATURE_HAS_SPE_COMP |
1433 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001434 .icache_bsize = 32,
1435 .dcache_bsize = 32,
1436 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001437 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001438 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001439 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001440 .platform = "ppc8540",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001441 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001442 { /* e500v2 */
Kumar Gala5b37b702005-06-21 17:15:18 -07001443 .pvr_mask = 0xffff0000,
1444 .pvr_value = 0x80210000,
1445 .cpu_name = "e500v2",
1446 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001447 .cpu_features = CPU_FTRS_E500_2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001448 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001449 PPC_FEATURE_HAS_SPE_COMP |
1450 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1451 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
Kumar Gala5b37b702005-06-21 17:15:18 -07001452 .icache_bsize = 32,
1453 .dcache_bsize = 32,
1454 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001455 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001456 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001457 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001458 .platform = "ppc8548",
Kumar Gala5b37b702005-06-21 17:15:18 -07001459 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001460#endif
Josh Boyere3e414b2007-12-24 08:44:47 -06001461#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -07001462#if !CLASSIC_PPC
1463 { /* default match */
1464 .pvr_mask = 0x00000000,
1465 .pvr_value = 0x00000000,
1466 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -05001467 .cpu_features = CPU_FTRS_GENERIC_32,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001468 .cpu_user_features = PPC_FEATURE_32,
1469 .icache_bsize = 32,
1470 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001471 .platform = "powerpc",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001472 }
1473#endif /* !CLASSIC_PPC */
Stephen Rothwell49209602005-10-12 15:55:09 +10001474#endif /* CONFIG_PPC32 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001475};
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001476
Paul Mackerras87a72f92007-10-04 14:18:01 +10001477static struct cpu_spec the_cpu_spec;
1478
1479struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001480{
1481 struct cpu_spec *s = cpu_specs;
Paul Mackerras87a72f92007-10-04 14:18:01 +10001482 struct cpu_spec *t = &the_cpu_spec;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001483 int i;
1484
1485 s = PTRRELOC(s);
Paul Mackerras87a72f92007-10-04 14:18:01 +10001486 t = PTRRELOC(t);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001487
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001488 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
1489 if ((pvr & s->pvr_mask) == s->pvr_value) {
Paul Mackerras87a72f92007-10-04 14:18:01 +10001490 /*
1491 * If we are overriding a previous value derived
1492 * from the real PVR with a new value obtained
1493 * using a logical PVR value, don't modify the
1494 * performance monitor fields.
1495 */
1496 if (t->num_pmcs && !s->num_pmcs) {
1497 t->cpu_name = s->cpu_name;
1498 t->cpu_features = s->cpu_features;
1499 t->cpu_user_features = s->cpu_user_features;
1500 t->icache_bsize = s->icache_bsize;
1501 t->dcache_bsize = s->dcache_bsize;
1502 t->cpu_setup = s->cpu_setup;
1503 t->cpu_restore = s->cpu_restore;
1504 t->platform = s->platform;
1505 } else
1506 *t = *s;
1507 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001508#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
1509 /* ppc64 and booke expect identify_cpu to also call
1510 * setup_cpu for that processor. I will consolidate
1511 * that at a later time, for now, just use #ifdef.
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001512 * we also don't need to PTRRELOC the function pointer
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001513 * on ppc64 and booke as we are running at 0 in real
1514 * mode on ppc64 and reloc_offset is always 0 on booke.
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001515 */
1516 if (s->cpu_setup) {
1517 s->cpu_setup(offset, s);
1518 }
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001519#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001520 return s;
1521 }
1522 BUG();
1523 return NULL;
1524}
1525
Benjamin Herrenschmidt0909c8c2006-10-20 11:47:18 +10001526void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001527{
1528 struct fixup_entry {
1529 unsigned long mask;
1530 unsigned long value;
Benjamin Herrenschmidt0909c8c2006-10-20 11:47:18 +10001531 long start_off;
1532 long end_off;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001533 } *fcur, *fend;
1534
1535 fcur = fixup_start;
1536 fend = fixup_end;
1537
1538 for (; fcur < fend; fcur++) {
1539 unsigned int *pstart, *pend, *p;
1540
1541 if ((value & fcur->mask) == fcur->value)
1542 continue;
1543
1544 /* These PTRRELOCs will disappear once the new scheme for
1545 * modules and vdso is implemented
1546 */
Benjamin Herrenschmidt0909c8c2006-10-20 11:47:18 +10001547 pstart = ((unsigned int *)fcur) + (fcur->start_off / 4);
1548 pend = ((unsigned int *)fcur) + (fcur->end_off / 4);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001549
1550 for (p = pstart; p < pend; p++) {
1551 *p = 0x60000000u;
1552 asm volatile ("dcbst 0, %0" : : "r" (p));
1553 }
1554 asm volatile ("sync" : : : "memory");
1555 for (p = pstart; p < pend; p++)
1556 asm volatile ("icbi 0,%0" : : "r" (p));
1557 asm volatile ("sync; isync" : : : "memory");
1558 }
1559}