blob: f7f3c215d06f30f3251ceea62bf6521f3813bb81 [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);
Michael Neulinge952e6c2008-06-18 10:47:26 +100056extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec);
57extern void __restore_cpu_power7(void);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050058#endif /* CONFIG_PPC64 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070059
Linus Torvalds1da177e2005-04-16 15:20:36 -070060/* This table only contains "desktop" CPUs, it need to be filled with embedded
61 * ones as well...
62 */
Stephen Rothwell49209602005-10-12 15:55:09 +100063#define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
64 PPC_FEATURE_HAS_MMU)
65#define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +110066#define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +110067#define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
68 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
69#define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
70 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
Anton Blanchard03054d52006-04-29 09:51:06 +100071#define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
Paul Mackerrasfab5db92006-06-07 16:14:40 +100072 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
Nathan Lynch0f473312008-07-10 01:06:57 +100073 PPC_FEATURE_TRUE_LE | \
74 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Michael Neulinge952e6c2008-06-18 10:47:26 +100075#define COMMON_USER_POWER7 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
76 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
Nathan Lynch0f473312008-07-10 01:06:57 +100077 PPC_FEATURE_TRUE_LE | \
78 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -050079#define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
80 PPC_FEATURE_TRUE_LE | \
81 PPC_FEATURE_HAS_ALTIVEC_COMP)
Paul Mackerras80f15dc2006-01-14 10:11:39 +110082#define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
83 PPC_FEATURE_BOOKE)
Linus Torvalds1da177e2005-04-16 15:20:36 -070084
Paul Mackerras87a72f92007-10-04 14:18:01 +100085static struct cpu_spec __initdata cpu_specs[] = {
Stephen Rothwell49209602005-10-12 15:55:09 +100086#ifdef CONFIG_PPC64
87 { /* Power3 */
88 .pvr_mask = 0xffff0000,
89 .pvr_value = 0x00400000,
90 .cpu_name = "POWER3 (630)",
91 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +100092 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +100093 .icache_bsize = 128,
94 .dcache_bsize = 128,
95 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -060096 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +100097 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +000098 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110099 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100100 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +1000101 },
102 { /* Power3+ */
103 .pvr_mask = 0xffff0000,
104 .pvr_value = 0x00410000,
105 .cpu_name = "POWER3 (630+)",
106 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000107 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000108 .icache_bsize = 128,
109 .dcache_bsize = 128,
110 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600111 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000112 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000113 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100114 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100115 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +1000116 },
117 { /* Northstar */
118 .pvr_mask = 0xffff0000,
119 .pvr_value = 0x00330000,
120 .cpu_name = "RS64-II (northstar)",
121 .cpu_features = CPU_FTRS_RS64,
122 .cpu_user_features = COMMON_USER_PPC64,
123 .icache_bsize = 128,
124 .dcache_bsize = 128,
125 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600126 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000127 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000128 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100129 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100130 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000131 },
132 { /* Pulsar */
133 .pvr_mask = 0xffff0000,
134 .pvr_value = 0x00340000,
135 .cpu_name = "RS64-III (pulsar)",
136 .cpu_features = CPU_FTRS_RS64,
137 .cpu_user_features = COMMON_USER_PPC64,
138 .icache_bsize = 128,
139 .dcache_bsize = 128,
140 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600141 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000142 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000143 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100144 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100145 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000146 },
147 { /* I-star */
148 .pvr_mask = 0xffff0000,
149 .pvr_value = 0x00360000,
150 .cpu_name = "RS64-III (icestar)",
151 .cpu_features = CPU_FTRS_RS64,
152 .cpu_user_features = COMMON_USER_PPC64,
153 .icache_bsize = 128,
154 .dcache_bsize = 128,
155 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600156 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000157 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000158 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100159 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100160 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000161 },
162 { /* S-star */
163 .pvr_mask = 0xffff0000,
164 .pvr_value = 0x00370000,
165 .cpu_name = "RS64-IV (sstar)",
166 .cpu_features = CPU_FTRS_RS64,
167 .cpu_user_features = COMMON_USER_PPC64,
168 .icache_bsize = 128,
169 .dcache_bsize = 128,
170 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600171 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000172 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000173 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100174 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100175 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000176 },
177 { /* Power4 */
178 .pvr_mask = 0xffff0000,
179 .pvr_value = 0x00350000,
180 .cpu_name = "POWER4 (gp)",
181 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100182 .cpu_user_features = COMMON_USER_POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000183 .icache_bsize = 128,
184 .dcache_bsize = 128,
185 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600186 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000187 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000188 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100189 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100190 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000191 },
192 { /* Power4+ */
193 .pvr_mask = 0xffff0000,
194 .pvr_value = 0x00380000,
195 .cpu_name = "POWER4+ (gq)",
196 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100197 .cpu_user_features = COMMON_USER_POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000198 .icache_bsize = 128,
199 .dcache_bsize = 128,
200 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600201 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000202 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000203 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100204 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100205 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000206 },
207 { /* PPC970 */
208 .pvr_mask = 0xffff0000,
209 .pvr_value = 0x00390000,
210 .cpu_name = "PPC970",
211 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100212 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000213 PPC_FEATURE_HAS_ALTIVEC_COMP,
214 .icache_bsize = 128,
215 .dcache_bsize = 128,
216 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600217 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000218 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500219 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000220 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000221 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100222 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100223 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000224 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000225 { /* PPC970FX */
226 .pvr_mask = 0xffff0000,
227 .pvr_value = 0x003c0000,
228 .cpu_name = "PPC970FX",
Stephen Rothwell49209602005-10-12 15:55:09 +1000229 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100230 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000231 PPC_FEATURE_HAS_ALTIVEC_COMP,
232 .icache_bsize = 128,
233 .dcache_bsize = 128,
234 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600235 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000236 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500237 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000238 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000239 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100240 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100241 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000242 },
Olof Johansson3546e812007-02-26 00:35:14 -0600243 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
244 .pvr_mask = 0xffffffff,
245 .pvr_value = 0x00440100,
246 .cpu_name = "PPC970MP",
247 .cpu_features = CPU_FTRS_PPC970,
248 .cpu_user_features = COMMON_USER_POWER4 |
249 PPC_FEATURE_HAS_ALTIVEC_COMP,
250 .icache_bsize = 128,
251 .dcache_bsize = 128,
252 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000253 .pmc_type = PPC_PMC_IBM,
Olof Johansson3546e812007-02-26 00:35:14 -0600254 .cpu_setup = __setup_cpu_ppc970,
255 .cpu_restore = __restore_cpu_ppc970,
256 .oprofile_cpu_type = "ppc64/970MP",
257 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100258 .machine_check = machine_check_generic,
Olof Johansson3546e812007-02-26 00:35:14 -0600259 .platform = "ppc970",
260 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000261 { /* PPC970MP */
262 .pvr_mask = 0xffff0000,
263 .pvr_value = 0x00440000,
264 .cpu_name = "PPC970MP",
265 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100266 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000267 PPC_FEATURE_HAS_ALTIVEC_COMP,
268 .icache_bsize = 128,
269 .dcache_bsize = 128,
Anton Blanchard87af41b2006-05-05 05:44:26 +1000270 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000271 .pmc_type = PPC_PMC_IBM,
Olof Johansson5b43d202006-10-04 23:41:41 -0500272 .cpu_setup = __setup_cpu_ppc970MP,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500273 .cpu_restore = __restore_cpu_ppc970,
Mike Wolffecb3522006-11-21 14:41:54 -0600274 .oprofile_cpu_type = "ppc64/970MP",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000275 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100276 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100277 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000278 },
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500279 { /* PPC970GX */
280 .pvr_mask = 0xffff0000,
281 .pvr_value = 0x00450000,
282 .cpu_name = "PPC970GX",
283 .cpu_features = CPU_FTRS_PPC970,
284 .cpu_user_features = COMMON_USER_POWER4 |
285 PPC_FEATURE_HAS_ALTIVEC_COMP,
286 .icache_bsize = 128,
287 .dcache_bsize = 128,
288 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600289 .pmc_type = PPC_PMC_IBM,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500290 .cpu_setup = __setup_cpu_ppc970,
291 .oprofile_cpu_type = "ppc64/970",
292 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100293 .machine_check = machine_check_generic,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500294 .platform = "ppc970",
295 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100296 { /* Power5 GR */
Stephen Rothwell49209602005-10-12 15:55:09 +1000297 .pvr_mask = 0xffff0000,
298 .pvr_value = 0x003a0000,
299 .cpu_name = "POWER5 (gr)",
300 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100301 .cpu_user_features = COMMON_USER_POWER5,
Stephen Rothwell49209602005-10-12 15:55:09 +1000302 .icache_bsize = 128,
303 .dcache_bsize = 128,
304 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600305 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000306 .oprofile_cpu_type = "ppc64/power5",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000307 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000308 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
309 * and above but only works on POWER5 and above
310 */
311 .oprofile_mmcra_sihv = MMCRA_SIHV,
312 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100313 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100314 .platform = "power5",
Stephen Rothwell49209602005-10-12 15:55:09 +1000315 },
Mike Wolf31a12ce2007-07-10 13:13:47 -0500316 { /* Power5++ */
317 .pvr_mask = 0xffffff00,
318 .pvr_value = 0x003b0300,
319 .cpu_name = "POWER5+ (gs)",
320 .cpu_features = CPU_FTRS_POWER5,
321 .cpu_user_features = COMMON_USER_POWER5_PLUS,
322 .icache_bsize = 128,
323 .dcache_bsize = 128,
324 .num_pmcs = 6,
325 .oprofile_cpu_type = "ppc64/power5++",
326 .oprofile_type = PPC_OPROFILE_POWER4,
327 .oprofile_mmcra_sihv = MMCRA_SIHV,
328 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100329 .machine_check = machine_check_generic,
Mike Wolf31a12ce2007-07-10 13:13:47 -0500330 .platform = "power5+",
331 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100332 { /* Power5 GS */
Stephen Rothwell49209602005-10-12 15:55:09 +1000333 .pvr_mask = 0xffff0000,
334 .pvr_value = 0x003b0000,
Anton Blanchard834608f2006-01-09 15:42:30 +1100335 .cpu_name = "POWER5+ (gs)",
Stephen Rothwell49209602005-10-12 15:55:09 +1000336 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100337 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Stephen Rothwell49209602005-10-12 15:55:09 +1000338 .icache_bsize = 128,
339 .dcache_bsize = 128,
340 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600341 .pmc_type = PPC_PMC_IBM,
Anton Blanchard834608f2006-01-09 15:42:30 +1100342 .oprofile_cpu_type = "ppc64/power5+",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000343 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000344 .oprofile_mmcra_sihv = MMCRA_SIHV,
345 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100346 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100347 .platform = "power5+",
Stephen Rothwell49209602005-10-12 15:55:09 +1000348 },
Paul Mackerras974a76f2006-11-10 20:38:53 +1100349 { /* POWER6 in P5+ mode; 2.04-compliant processor */
350 .pvr_mask = 0xffffffff,
351 .pvr_value = 0x0f000001,
352 .cpu_name = "POWER5+",
353 .cpu_features = CPU_FTRS_POWER5,
354 .cpu_user_features = COMMON_USER_POWER5_PLUS,
355 .icache_bsize = 128,
356 .dcache_bsize = 128,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100357 .machine_check = machine_check_generic,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100358 .platform = "power5+",
359 },
Anton Blanchard03054d52006-04-29 09:51:06 +1000360 { /* Power6 */
361 .pvr_mask = 0xffff0000,
362 .pvr_value = 0x003e0000,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100363 .cpu_name = "POWER6 (raw)",
364 .cpu_features = CPU_FTRS_POWER6,
365 .cpu_user_features = COMMON_USER_POWER6 |
366 PPC_FEATURE_POWER6_EXT,
367 .icache_bsize = 128,
368 .dcache_bsize = 128,
369 .num_pmcs = 6,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000370 .pmc_type = PPC_PMC_IBM,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100371 .oprofile_cpu_type = "ppc64/power6",
372 .oprofile_type = PPC_OPROFILE_POWER4,
373 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
374 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
375 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
376 POWER6_MMCRA_OTHER,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100377 .machine_check = machine_check_generic,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100378 .platform = "power6x",
379 },
380 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
381 .pvr_mask = 0xffffffff,
382 .pvr_value = 0x0f000002,
383 .cpu_name = "POWER6 (architected)",
Anton Blanchard03054d52006-04-29 09:51:06 +1000384 .cpu_features = CPU_FTRS_POWER6,
385 .cpu_user_features = COMMON_USER_POWER6,
386 .icache_bsize = 128,
387 .dcache_bsize = 128,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100388 .machine_check = machine_check_generic,
Anton Blanchard03054d52006-04-29 09:51:06 +1000389 .platform = "power6",
390 },
Joel Schopp635f5a62008-06-19 06:18:21 +1000391 { /* 2.06-compliant processor, i.e. Power7 "architected" mode */
392 .pvr_mask = 0xffffffff,
393 .pvr_value = 0x0f000003,
394 .cpu_name = "POWER7 (architected)",
395 .cpu_features = CPU_FTRS_POWER7,
396 .cpu_user_features = COMMON_USER_POWER7,
397 .icache_bsize = 128,
398 .dcache_bsize = 128,
399 .machine_check = machine_check_generic,
400 .platform = "power7",
401 },
Michael Neulinge952e6c2008-06-18 10:47:26 +1000402 { /* Power7 */
403 .pvr_mask = 0xffff0000,
404 .pvr_value = 0x003f0000,
Joel Schopp635f5a62008-06-19 06:18:21 +1000405 .cpu_name = "POWER7 (raw)",
Michael Neulinge952e6c2008-06-18 10:47:26 +1000406 .cpu_features = CPU_FTRS_POWER7,
407 .cpu_user_features = COMMON_USER_POWER7,
408 .icache_bsize = 128,
409 .dcache_bsize = 128,
410 .num_pmcs = 6,
411 .pmc_type = PPC_PMC_IBM,
412 .cpu_setup = __setup_cpu_power7,
413 .cpu_restore = __restore_cpu_power7,
414 .oprofile_cpu_type = "ppc64/power7",
415 .oprofile_type = PPC_OPROFILE_POWER4,
416 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
417 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
418 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
419 POWER6_MMCRA_OTHER,
420 .platform = "power7",
421 },
Arnd Bergmannc902be72006-01-04 19:55:53 +0000422 { /* Cell Broadband Engine */
Stephen Rothwell49209602005-10-12 15:55:09 +1000423 .pvr_mask = 0xffff0000,
424 .pvr_value = 0x00700000,
425 .cpu_name = "Cell Broadband Engine",
426 .cpu_features = CPU_FTRS_CELL,
427 .cpu_user_features = COMMON_USER_PPC64 |
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +1100428 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
429 PPC_FEATURE_SMT,
Stephen Rothwell49209602005-10-12 15:55:09 +1000430 .icache_bsize = 128,
431 .dcache_bsize = 128,
Maynard Johnson18f21902006-11-20 18:45:16 +0100432 .num_pmcs = 4,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600433 .pmc_type = PPC_PMC_IBM,
Maynard Johnson18f21902006-11-20 18:45:16 +0100434 .oprofile_cpu_type = "ppc64/cell-be",
435 .oprofile_type = PPC_OPROFILE_CELL,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100436 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100437 .platform = "ppc-cell-be",
Stephen Rothwell49209602005-10-12 15:55:09 +1000438 },
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500439 { /* PA Semi PA6T */
440 .pvr_mask = 0x7fff0000,
441 .pvr_value = 0x00900000,
442 .cpu_name = "PA6T",
443 .cpu_features = CPU_FTRS_PA6T,
444 .cpu_user_features = COMMON_USER_PA6T,
445 .icache_bsize = 64,
446 .dcache_bsize = 64,
447 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600448 .pmc_type = PPC_PMC_PA6T,
Olof Johansson11999192007-02-04 16:36:51 -0600449 .cpu_setup = __setup_cpu_pa6t,
450 .cpu_restore = __restore_cpu_pa6t,
Olof Johansson25fc5302007-04-18 16:38:21 +1000451 .oprofile_cpu_type = "ppc64/pa6t",
452 .oprofile_type = PPC_OPROFILE_PA6T,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100453 .machine_check = machine_check_generic,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500454 .platform = "pa6t",
455 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000456 { /* default match */
457 .pvr_mask = 0x00000000,
458 .pvr_value = 0x00000000,
459 .cpu_name = "POWER4 (compatible)",
460 .cpu_features = CPU_FTRS_COMPATIBLE,
461 .cpu_user_features = COMMON_USER_PPC64,
462 .icache_bsize = 128,
463 .dcache_bsize = 128,
464 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600465 .pmc_type = PPC_PMC_IBM,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100466 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100467 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000468 }
469#endif /* CONFIG_PPC64 */
470#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -0700471#if CLASSIC_PPC
Stephen Rothwell49209602005-10-12 15:55:09 +1000472 { /* 601 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700473 .pvr_mask = 0xffff0000,
474 .pvr_value = 0x00010000,
475 .cpu_name = "601",
Kumar Gala10b35d92005-09-23 14:08:58 -0500476 .cpu_features = CPU_FTRS_PPC601,
Stephen Rothwell49209602005-10-12 15:55:09 +1000477 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
Paul Mackerras98599012005-10-22 16:51:34 +1000478 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700479 .icache_bsize = 32,
480 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100481 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100482 .platform = "ppc601",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700483 },
484 { /* 603 */
485 .pvr_mask = 0xffff0000,
486 .pvr_value = 0x00030000,
487 .cpu_name = "603",
Kumar Gala10b35d92005-09-23 14:08:58 -0500488 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000489 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700490 .icache_bsize = 32,
491 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100492 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100493 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100494 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700495 },
496 { /* 603e */
497 .pvr_mask = 0xffff0000,
498 .pvr_value = 0x00060000,
499 .cpu_name = "603e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500500 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000501 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700502 .icache_bsize = 32,
503 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100504 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100505 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100506 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700507 },
508 { /* 603ev */
509 .pvr_mask = 0xffff0000,
510 .pvr_value = 0x00070000,
511 .cpu_name = "603ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500512 .cpu_features = CPU_FTRS_603,
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,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100516 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100517 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100518 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700519 },
520 { /* 604 */
521 .pvr_mask = 0xffff0000,
522 .pvr_value = 0x00040000,
523 .cpu_name = "604",
Kumar Gala10b35d92005-09-23 14:08:58 -0500524 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000525 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700526 .icache_bsize = 32,
527 .dcache_bsize = 32,
528 .num_pmcs = 2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100529 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100530 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100531 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700532 },
533 { /* 604e */
534 .pvr_mask = 0xfffff000,
535 .pvr_value = 0x00090000,
536 .cpu_name = "604e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500537 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000538 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700539 .icache_bsize = 32,
540 .dcache_bsize = 32,
541 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100542 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100543 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100544 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700545 },
546 { /* 604r */
547 .pvr_mask = 0xffff0000,
548 .pvr_value = 0x00090000,
549 .cpu_name = "604r",
Kumar Gala10b35d92005-09-23 14:08:58 -0500550 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000551 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700552 .icache_bsize = 32,
553 .dcache_bsize = 32,
554 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100555 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100556 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100557 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700558 },
559 { /* 604ev */
560 .pvr_mask = 0xffff0000,
561 .pvr_value = 0x000a0000,
562 .cpu_name = "604ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500563 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000564 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700565 .icache_bsize = 32,
566 .dcache_bsize = 32,
567 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100568 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100569 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100570 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700571 },
572 { /* 740/750 (0x4202, don't support TAU ?) */
573 .pvr_mask = 0xffffffff,
574 .pvr_value = 0x00084202,
575 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500576 .cpu_features = CPU_FTRS_740_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000577 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700578 .icache_bsize = 32,
579 .dcache_bsize = 32,
580 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100581 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100582 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100583 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700584 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700585 { /* 750CX (80100 and 8010x?) */
586 .pvr_mask = 0xfffffff0,
587 .pvr_value = 0x00080100,
588 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500589 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000590 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700591 .icache_bsize = 32,
592 .dcache_bsize = 32,
593 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100594 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100595 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100596 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700597 },
598 { /* 750CX (82201 and 82202) */
599 .pvr_mask = 0xfffffff0,
600 .pvr_value = 0x00082200,
601 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500602 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000603 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700604 .icache_bsize = 32,
605 .dcache_bsize = 32,
606 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100607 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100608 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100609 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700610 },
611 { /* 750CXe (82214) */
612 .pvr_mask = 0xfffffff0,
613 .pvr_value = 0x00082210,
614 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500615 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000616 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700617 .icache_bsize = 32,
618 .dcache_bsize = 32,
619 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100620 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100621 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100622 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700623 },
Arthur Othieno7c316252005-09-03 15:55:52 -0700624 { /* 750CXe "Gekko" (83214) */
625 .pvr_mask = 0xffffffff,
626 .pvr_value = 0x00083214,
627 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500628 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000629 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Arthur Othieno7c316252005-09-03 15:55:52 -0700630 .icache_bsize = 32,
631 .dcache_bsize = 32,
632 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100633 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100634 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100635 .platform = "ppc750",
Arthur Othieno7c316252005-09-03 15:55:52 -0700636 },
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500637 { /* 750CL */
638 .pvr_mask = 0xfffff0f0,
639 .pvr_value = 0x00087010,
640 .cpu_name = "750CL",
Josh Boyera14c4502007-04-13 04:33:25 +1000641 .cpu_features = CPU_FTRS_750CL,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500642 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
643 .icache_bsize = 32,
644 .dcache_bsize = 32,
645 .num_pmcs = 4,
Josh Boyera14c4502007-04-13 04:33:25 +1000646 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100647 .machine_check = machine_check_generic,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500648 .platform = "ppc750",
649 },
Arthur Othienoac1ff042005-09-03 15:55:51 -0700650 { /* 745/755 */
651 .pvr_mask = 0xfffff000,
652 .pvr_value = 0x00083000,
653 .cpu_name = "745/755",
Kumar Gala10b35d92005-09-23 14:08:58 -0500654 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000655 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Arthur Othienoac1ff042005-09-03 15:55:51 -0700656 .icache_bsize = 32,
657 .dcache_bsize = 32,
658 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100659 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100660 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100661 .platform = "ppc750",
Arthur Othienoac1ff042005-09-03 15:55:51 -0700662 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700663 { /* 750FX rev 1.x */
664 .pvr_mask = 0xffffff00,
665 .pvr_value = 0x70000100,
666 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500667 .cpu_features = CPU_FTRS_750FX1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000668 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700669 .icache_bsize = 32,
670 .dcache_bsize = 32,
671 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100672 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100673 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100674 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700675 },
676 { /* 750FX rev 2.0 must disable HID0[DPM] */
677 .pvr_mask = 0xffffffff,
678 .pvr_value = 0x70000200,
679 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500680 .cpu_features = CPU_FTRS_750FX2,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000681 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700682 .icache_bsize = 32,
683 .dcache_bsize = 32,
684 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100685 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100686 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100687 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700688 },
689 { /* 750FX (All revs except 2.0) */
690 .pvr_mask = 0xffff0000,
691 .pvr_value = 0x70000000,
692 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500693 .cpu_features = CPU_FTRS_750FX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000694 .cpu_user_features = COMMON_USER | 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_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100699 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100700 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700701 },
702 { /* 750GX */
703 .pvr_mask = 0xffff0000,
704 .pvr_value = 0x70020000,
705 .cpu_name = "750GX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500706 .cpu_features = CPU_FTRS_750GX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000707 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700708 .icache_bsize = 32,
709 .dcache_bsize = 32,
710 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100711 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100712 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100713 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700714 },
715 { /* 740/750 (L2CR bit need fixup for 740) */
716 .pvr_mask = 0xffff0000,
717 .pvr_value = 0x00080000,
718 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500719 .cpu_features = CPU_FTRS_740,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000720 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700721 .icache_bsize = 32,
722 .dcache_bsize = 32,
723 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100724 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100725 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100726 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700727 },
728 { /* 7400 rev 1.1 ? (no TAU) */
729 .pvr_mask = 0xffffffff,
730 .pvr_value = 0x000c1101,
731 .cpu_name = "7400 (1.1)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500732 .cpu_features = CPU_FTRS_7400_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000733 .cpu_user_features = COMMON_USER |
734 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700735 .icache_bsize = 32,
736 .dcache_bsize = 32,
737 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100738 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100739 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100740 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700741 },
742 { /* 7400 */
743 .pvr_mask = 0xffff0000,
744 .pvr_value = 0x000c0000,
745 .cpu_name = "7400",
Kumar Gala10b35d92005-09-23 14:08:58 -0500746 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000747 .cpu_user_features = COMMON_USER |
748 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700749 .icache_bsize = 32,
750 .dcache_bsize = 32,
751 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100752 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100753 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100754 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700755 },
756 { /* 7410 */
757 .pvr_mask = 0xffff0000,
758 .pvr_value = 0x800c0000,
759 .cpu_name = "7410",
Kumar Gala10b35d92005-09-23 14:08:58 -0500760 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000761 .cpu_user_features = COMMON_USER |
762 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700763 .icache_bsize = 32,
764 .dcache_bsize = 32,
765 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100766 .cpu_setup = __setup_cpu_7410,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100767 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100768 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700769 },
770 { /* 7450 2.0 - no doze/nap */
771 .pvr_mask = 0xffffffff,
772 .pvr_value = 0x80000200,
773 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500774 .cpu_features = CPU_FTRS_7450_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000775 .cpu_user_features = COMMON_USER |
776 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700777 .icache_bsize = 32,
778 .dcache_bsize = 32,
779 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600780 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600781 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000782 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100783 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100784 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700785 },
786 { /* 7450 2.1 */
787 .pvr_mask = 0xffffffff,
788 .pvr_value = 0x80000201,
789 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500790 .cpu_features = CPU_FTRS_7450_21,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000791 .cpu_user_features = COMMON_USER |
792 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700793 .icache_bsize = 32,
794 .dcache_bsize = 32,
795 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600796 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600797 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000798 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100799 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100800 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700801 },
802 { /* 7450 2.3 and newer */
803 .pvr_mask = 0xffff0000,
804 .pvr_value = 0x80000000,
805 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500806 .cpu_features = CPU_FTRS_7450_23,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000807 .cpu_user_features = COMMON_USER |
808 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700809 .icache_bsize = 32,
810 .dcache_bsize = 32,
811 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600812 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600813 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000814 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100815 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100816 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700817 },
818 { /* 7455 rev 1.x */
819 .pvr_mask = 0xffffff00,
820 .pvr_value = 0x80010100,
821 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500822 .cpu_features = CPU_FTRS_7455_1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000823 .cpu_user_features = COMMON_USER |
824 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700825 .icache_bsize = 32,
826 .dcache_bsize = 32,
827 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600828 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600829 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000830 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100831 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100832 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700833 },
834 { /* 7455 rev 2.0 */
835 .pvr_mask = 0xffffffff,
836 .pvr_value = 0x80010200,
837 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500838 .cpu_features = CPU_FTRS_7455_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000839 .cpu_user_features = COMMON_USER |
840 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700841 .icache_bsize = 32,
842 .dcache_bsize = 32,
843 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600844 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600845 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000846 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100847 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100848 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700849 },
850 { /* 7455 others */
851 .pvr_mask = 0xffff0000,
852 .pvr_value = 0x80010000,
853 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500854 .cpu_features = CPU_FTRS_7455,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000855 .cpu_user_features = COMMON_USER |
856 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700857 .icache_bsize = 32,
858 .dcache_bsize = 32,
859 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600860 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600861 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000862 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100863 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100864 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700865 },
866 { /* 7447/7457 Rev 1.0 */
867 .pvr_mask = 0xffffffff,
868 .pvr_value = 0x80020100,
869 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500870 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000871 .cpu_user_features = COMMON_USER |
872 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700873 .icache_bsize = 32,
874 .dcache_bsize = 32,
875 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600876 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600877 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000878 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100879 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100880 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700881 },
882 { /* 7447/7457 Rev 1.1 */
883 .pvr_mask = 0xffffffff,
884 .pvr_value = 0x80020101,
885 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500886 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000887 .cpu_user_features = COMMON_USER |
888 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700889 .icache_bsize = 32,
890 .dcache_bsize = 32,
891 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600892 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600893 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000894 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100895 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100896 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700897 },
898 { /* 7447/7457 Rev 1.2 and later */
899 .pvr_mask = 0xffff0000,
900 .pvr_value = 0x80020000,
901 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500902 .cpu_features = CPU_FTRS_7447,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000903 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700904 .icache_bsize = 32,
905 .dcache_bsize = 32,
906 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600907 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600908 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000909 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100910 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100911 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700912 },
913 { /* 7447A */
914 .pvr_mask = 0xffff0000,
915 .pvr_value = 0x80030000,
916 .cpu_name = "7447A",
Kumar Gala10b35d92005-09-23 14:08:58 -0500917 .cpu_features = CPU_FTRS_7447A,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000918 .cpu_user_features = COMMON_USER |
919 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700920 .icache_bsize = 32,
921 .dcache_bsize = 32,
922 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600923 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600924 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000925 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100926 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100927 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700928 },
Kumar Galabbde6302005-09-03 15:55:55 -0700929 { /* 7448 */
930 .pvr_mask = 0xffff0000,
931 .pvr_value = 0x80040000,
932 .cpu_name = "7448",
James.Yang3d372542007-05-02 16:34:43 -0500933 .cpu_features = CPU_FTRS_7448,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000934 .cpu_user_features = COMMON_USER |
935 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Kumar Galabbde6302005-09-03 15:55:55 -0700936 .icache_bsize = 32,
937 .dcache_bsize = 32,
938 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600939 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600940 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000941 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100942 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100943 .platform = "ppc7450",
Kumar Galabbde6302005-09-03 15:55:55 -0700944 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700945 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
946 .pvr_mask = 0x7fff0000,
947 .pvr_value = 0x00810000,
948 .cpu_name = "82xx",
Kumar Gala10b35d92005-09-23 14:08:58 -0500949 .cpu_features = CPU_FTRS_82XX,
Stephen Rothwell49209602005-10-12 15:55:09 +1000950 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700951 .icache_bsize = 32,
952 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100953 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100954 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100955 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700956 },
957 { /* All G2_LE (603e core, plus some) have the same pvr */
958 .pvr_mask = 0x7fff0000,
959 .pvr_value = 0x00820000,
960 .cpu_name = "G2_LE",
Kumar Gala10b35d92005-09-23 14:08:58 -0500961 .cpu_features = CPU_FTRS_G2_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000962 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700963 .icache_bsize = 32,
964 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100965 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100966 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100967 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700968 },
Kim Phillips6c4a2502006-10-02 20:10:24 -0500969 { /* e300c1 (a 603e core, plus some) on 83xx */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700970 .pvr_mask = 0x7fff0000,
971 .pvr_value = 0x00830000,
Kim Phillips6c4a2502006-10-02 20:10:24 -0500972 .cpu_name = "e300c1",
Kumar Gala10b35d92005-09-23 14:08:58 -0500973 .cpu_features = CPU_FTRS_E300,
Stephen Rothwell49209602005-10-12 15:55:09 +1000974 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700975 .icache_bsize = 32,
976 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100977 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100978 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100979 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700980 },
Kim Phillips6c4a2502006-10-02 20:10:24 -0500981 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
982 .pvr_mask = 0x7fff0000,
983 .pvr_value = 0x00840000,
984 .cpu_name = "e300c2",
Kim Phillipsaa42c692006-12-08 02:43:30 -0600985 .cpu_features = CPU_FTRS_E300C2,
Kim Phillips6c4a2502006-10-02 20:10:24 -0500986 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
987 .icache_bsize = 32,
988 .dcache_bsize = 32,
989 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100990 .machine_check = machine_check_generic,
Kim Phillips6c4a2502006-10-02 20:10:24 -0500991 .platform = "ppc603",
992 },
Li Yanga58d5242007-10-19 19:38:42 +0800993 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
Scott Wood57933f82006-12-01 12:57:05 -0600994 .pvr_mask = 0x7fff0000,
995 .pvr_value = 0x00850000,
996 .cpu_name = "e300c3",
997 .cpu_features = CPU_FTRS_E300,
998 .cpu_user_features = COMMON_USER,
999 .icache_bsize = 32,
1000 .dcache_bsize = 32,
1001 .cpu_setup = __setup_cpu_603,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001002 .num_pmcs = 4,
1003 .oprofile_cpu_type = "ppc/e300",
1004 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Scott Wood57933f82006-12-01 12:57:05 -06001005 .platform = "ppc603",
1006 },
Li Yanga58d5242007-10-19 19:38:42 +08001007 { /* e300c4 (e300c1, plus one IU) */
1008 .pvr_mask = 0x7fff0000,
1009 .pvr_value = 0x00860000,
1010 .cpu_name = "e300c4",
1011 .cpu_features = CPU_FTRS_E300,
1012 .cpu_user_features = COMMON_USER,
1013 .icache_bsize = 32,
1014 .dcache_bsize = 32,
1015 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001016 .machine_check = machine_check_generic,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001017 .num_pmcs = 4,
1018 .oprofile_cpu_type = "ppc/e300",
1019 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Li Yanga58d5242007-10-19 19:38:42 +08001020 .platform = "ppc603",
1021 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001022 { /* default match, we assume split I/D cache & TB (non-601)... */
1023 .pvr_mask = 0x00000000,
1024 .pvr_value = 0x00000000,
1025 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -05001026 .cpu_features = CPU_FTRS_CLASSIC32,
Stephen Rothwell49209602005-10-12 15:55:09 +10001027 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001028 .icache_bsize = 32,
1029 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001030 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001031 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001032 },
1033#endif /* CLASSIC_PPC */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001034#ifdef CONFIG_8xx
1035 { /* 8xx */
1036 .pvr_mask = 0xffff0000,
1037 .pvr_value = 0x00500000,
1038 .cpu_name = "8xx",
1039 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1040 * if the 8xx code is there.... */
Kumar Gala10b35d92005-09-23 14:08:58 -05001041 .cpu_features = CPU_FTRS_8XX,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001042 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1043 .icache_bsize = 16,
1044 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001045 .platform = "ppc823",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001046 },
1047#endif /* CONFIG_8xx */
1048#ifdef CONFIG_40x
1049 { /* 403GC */
1050 .pvr_mask = 0xffffff00,
1051 .pvr_value = 0x00200200,
1052 .cpu_name = "403GC",
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 | PPC_FEATURE_HAS_MMU,
1055 .icache_bsize = 16,
1056 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001057 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001058 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001059 },
1060 { /* 403GCX */
1061 .pvr_mask = 0xffffff00,
1062 .pvr_value = 0x00201400,
1063 .cpu_name = "403GCX",
Kumar Gala10b35d92005-09-23 14:08:58 -05001064 .cpu_features = CPU_FTRS_40X,
Paul Mackerras98599012005-10-22 16:51:34 +10001065 .cpu_user_features = PPC_FEATURE_32 |
1066 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001067 .icache_bsize = 16,
1068 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001069 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001070 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001071 },
1072 { /* 403G ?? */
1073 .pvr_mask = 0xffff0000,
1074 .pvr_value = 0x00200000,
1075 .cpu_name = "403G ??",
Kumar Gala10b35d92005-09-23 14:08:58 -05001076 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001077 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1078 .icache_bsize = 16,
1079 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001080 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001081 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001082 },
1083 { /* 405GP */
1084 .pvr_mask = 0xffff0000,
1085 .pvr_value = 0x40110000,
1086 .cpu_name = "405GP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001087 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001088 .cpu_user_features = PPC_FEATURE_32 |
1089 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1090 .icache_bsize = 32,
1091 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001092 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001093 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001094 },
1095 { /* STB 03xxx */
1096 .pvr_mask = 0xffff0000,
1097 .pvr_value = 0x40130000,
1098 .cpu_name = "STB03xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001099 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001100 .cpu_user_features = PPC_FEATURE_32 |
1101 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1102 .icache_bsize = 32,
1103 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001104 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001105 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001106 },
1107 { /* STB 04xxx */
1108 .pvr_mask = 0xffff0000,
1109 .pvr_value = 0x41810000,
1110 .cpu_name = "STB04xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001111 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001112 .cpu_user_features = PPC_FEATURE_32 |
1113 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1114 .icache_bsize = 32,
1115 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001116 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001117 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001118 },
1119 { /* NP405L */
1120 .pvr_mask = 0xffff0000,
1121 .pvr_value = 0x41610000,
1122 .cpu_name = "NP405L",
Kumar Gala10b35d92005-09-23 14:08:58 -05001123 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001124 .cpu_user_features = PPC_FEATURE_32 |
1125 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1126 .icache_bsize = 32,
1127 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001128 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001129 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001130 },
1131 { /* NP4GS3 */
1132 .pvr_mask = 0xffff0000,
1133 .pvr_value = 0x40B10000,
1134 .cpu_name = "NP4GS3",
Kumar Gala10b35d92005-09-23 14:08:58 -05001135 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001136 .cpu_user_features = PPC_FEATURE_32 |
1137 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1138 .icache_bsize = 32,
1139 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001140 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001141 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001142 },
1143 { /* NP405H */
1144 .pvr_mask = 0xffff0000,
1145 .pvr_value = 0x41410000,
1146 .cpu_name = "NP405H",
Kumar Gala10b35d92005-09-23 14:08:58 -05001147 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001148 .cpu_user_features = PPC_FEATURE_32 |
1149 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1150 .icache_bsize = 32,
1151 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001152 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001153 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001154 },
1155 { /* 405GPr */
1156 .pvr_mask = 0xffff0000,
1157 .pvr_value = 0x50910000,
1158 .cpu_name = "405GPr",
Kumar Gala10b35d92005-09-23 14:08:58 -05001159 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001160 .cpu_user_features = PPC_FEATURE_32 |
1161 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1162 .icache_bsize = 32,
1163 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001164 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001165 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001166 },
1167 { /* STBx25xx */
1168 .pvr_mask = 0xffff0000,
1169 .pvr_value = 0x51510000,
1170 .cpu_name = "STBx25xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001171 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001172 .cpu_user_features = PPC_FEATURE_32 |
1173 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1174 .icache_bsize = 32,
1175 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001176 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001177 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001178 },
1179 { /* 405LP */
1180 .pvr_mask = 0xffff0000,
1181 .pvr_value = 0x41F10000,
1182 .cpu_name = "405LP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001183 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001184 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1185 .icache_bsize = 32,
1186 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001187 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001188 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001189 },
1190 { /* Xilinx Virtex-II Pro */
Grant C. Likely72646c72006-01-19 01:13:20 -07001191 .pvr_mask = 0xfffff000,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001192 .pvr_value = 0x20010000,
1193 .cpu_name = "Virtex-II Pro",
Kumar Gala10b35d92005-09-23 14:08:58 -05001194 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001195 .cpu_user_features = PPC_FEATURE_32 |
1196 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1197 .icache_bsize = 32,
1198 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001199 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001200 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001201 },
Grant C. Likely72646c72006-01-19 01:13:20 -07001202 { /* Xilinx Virtex-4 FX */
1203 .pvr_mask = 0xfffff000,
1204 .pvr_value = 0x20011000,
1205 .cpu_name = "Virtex-4 FX",
1206 .cpu_features = CPU_FTRS_40X,
1207 .cpu_user_features = PPC_FEATURE_32 |
1208 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1209 .icache_bsize = 32,
1210 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001211 .machine_check = machine_check_4xx,
Peter Bergner838fdb42006-09-14 14:18:38 -05001212 .platform = "ppc405",
Grant C. Likely72646c72006-01-19 01:13:20 -07001213 },
Eugene Suroveginad95d602005-06-07 13:22:09 -07001214 { /* 405EP */
1215 .pvr_mask = 0xffff0000,
1216 .pvr_value = 0x51210000,
1217 .cpu_name = "405EP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001218 .cpu_features = CPU_FTRS_40X,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001219 .cpu_user_features = PPC_FEATURE_32 |
1220 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1221 .icache_bsize = 32,
1222 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001223 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001224 .platform = "ppc405",
Eugene Suroveginad95d602005-06-07 13:22:09 -07001225 },
Stefan Roese5d8476c2007-10-11 22:08:14 +10001226 { /* 405EX */
Stefan Roeseb676d842008-01-15 18:09:15 +11001227 .pvr_mask = 0xffff0004,
1228 .pvr_value = 0x12910004,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001229 .cpu_name = "405EX",
1230 .cpu_features = CPU_FTRS_40X,
1231 .cpu_user_features = PPC_FEATURE_32 |
1232 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1233 .icache_bsize = 32,
1234 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001235 .machine_check = machine_check_4xx,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001236 .platform = "ppc405",
1237 },
Stefan Roeseb676d842008-01-15 18:09:15 +11001238 { /* 405EXr */
1239 .pvr_mask = 0xffff0004,
1240 .pvr_value = 0x12910000,
1241 .cpu_name = "405EXr",
1242 .cpu_features = CPU_FTRS_40X,
1243 .cpu_user_features = PPC_FEATURE_32 |
1244 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1245 .icache_bsize = 32,
1246 .dcache_bsize = 32,
1247 .machine_check = machine_check_4xx,
1248 .platform = "ppc405",
1249 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001250 { /* default match */
1251 .pvr_mask = 0x00000000,
1252 .pvr_value = 0x00000000,
1253 .cpu_name = "(generic 40x PPC)",
1254 .cpu_features = CPU_FTRS_40X,
1255 .cpu_user_features = PPC_FEATURE_32 |
1256 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1257 .icache_bsize = 32,
1258 .dcache_bsize = 32,
1259 .machine_check = machine_check_4xx,
1260 .platform = "ppc405",
1261 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001262
1263#endif /* CONFIG_40x */
1264#ifdef CONFIG_44x
Matt Porterc9cf73a2005-07-31 22:34:52 -07001265 {
1266 .pvr_mask = 0xf0000fff,
1267 .pvr_value = 0x40000850,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001268 .cpu_name = "440GR Rev. A",
1269 .cpu_features = CPU_FTRS_44X,
1270 .cpu_user_features = COMMON_USER_BOOKE,
1271 .icache_bsize = 32,
1272 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001273 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001274 .platform = "ppc440",
1275 },
1276 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1277 .pvr_mask = 0xf0000fff,
1278 .pvr_value = 0x40000858,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001279 .cpu_name = "440EP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001280 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001281 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001282 .icache_bsize = 32,
1283 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001284 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001285 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001286 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001287 },
1288 {
1289 .pvr_mask = 0xf0000fff,
1290 .pvr_value = 0x400008d3,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001291 .cpu_name = "440GR Rev. B",
1292 .cpu_features = CPU_FTRS_44X,
1293 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1294 .icache_bsize = 32,
1295 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001296 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001297 .platform = "ppc440",
1298 },
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001299 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1300 .pvr_mask = 0xf0000ff7,
1301 .pvr_value = 0x400008d4,
1302 .cpu_name = "440EP Rev. C",
1303 .cpu_features = CPU_FTRS_44X,
1304 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1305 .icache_bsize = 32,
1306 .dcache_bsize = 32,
1307 .cpu_setup = __setup_cpu_440ep,
1308 .machine_check = machine_check_4xx,
1309 .platform = "ppc440",
1310 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001311 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1312 .pvr_mask = 0xf0000fff,
1313 .pvr_value = 0x400008db,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001314 .cpu_name = "440EP Rev. B",
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 | PPC_FEATURE_HAS_FPU,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001317 .icache_bsize = 32,
1318 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001319 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001320 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001321 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001322 },
Valentine Barshak15fc9932007-08-29 17:40:30 +04001323 { /* 440GRX */
1324 .pvr_mask = 0xf0000ffb,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001325 .pvr_value = 0x200008D0,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001326 .cpu_name = "440GRX",
1327 .cpu_features = CPU_FTRS_44X,
1328 .cpu_user_features = COMMON_USER_BOOKE,
1329 .icache_bsize = 32,
1330 .dcache_bsize = 32,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001331 .cpu_setup = __setup_cpu_440grx,
Valentine Barshakb2be3b12007-12-22 03:22:23 +11001332 .machine_check = machine_check_440A,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001333 .platform = "ppc440",
Valentine Barshak15fc9932007-08-29 17:40:30 +04001334 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001335 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1336 .pvr_mask = 0xf0000ffb,
1337 .pvr_value = 0x200008D8,
1338 .cpu_name = "440EPX",
1339 .cpu_features = CPU_FTRS_44X,
1340 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1341 .icache_bsize = 32,
1342 .dcache_bsize = 32,
1343 .cpu_setup = __setup_cpu_440epx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001344 .machine_check = machine_check_440A,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001345 .platform = "ppc440",
1346 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001347 { /* 440GP Rev. B */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001348 .pvr_mask = 0xf0000fff,
1349 .pvr_value = 0x40000440,
1350 .cpu_name = "440GP Rev. B",
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,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001353 .icache_bsize = 32,
1354 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001355 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001356 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001357 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001358 { /* 440GP Rev. C */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001359 .pvr_mask = 0xf0000fff,
1360 .pvr_value = 0x40000481,
1361 .cpu_name = "440GP Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001362 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001363 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001364 .icache_bsize = 32,
1365 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001366 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001367 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001368 },
1369 { /* 440GX Rev. A */
1370 .pvr_mask = 0xf0000fff,
1371 .pvr_value = 0x50000850,
1372 .cpu_name = "440GX Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001373 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001374 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001375 .icache_bsize = 32,
1376 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001377 .cpu_setup = __setup_cpu_440gx,
1378 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001379 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001380 },
1381 { /* 440GX Rev. B */
1382 .pvr_mask = 0xf0000fff,
1383 .pvr_value = 0x50000851,
1384 .cpu_name = "440GX Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001385 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001386 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001387 .icache_bsize = 32,
1388 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001389 .cpu_setup = __setup_cpu_440gx,
1390 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001391 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001392 },
1393 { /* 440GX Rev. C */
1394 .pvr_mask = 0xf0000fff,
1395 .pvr_value = 0x50000892,
1396 .cpu_name = "440GX Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001397 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001398 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001399 .icache_bsize = 32,
1400 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001401 .cpu_setup = __setup_cpu_440gx,
1402 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001403 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001404 },
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001405 { /* 440GX Rev. F */
1406 .pvr_mask = 0xf0000fff,
1407 .pvr_value = 0x50000894,
1408 .cpu_name = "440GX Rev. F",
Kumar Gala10b35d92005-09-23 14:08:58 -05001409 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001410 .cpu_user_features = COMMON_USER_BOOKE,
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001411 .icache_bsize = 32,
1412 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001413 .cpu_setup = __setup_cpu_440gx,
1414 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001415 .platform = "ppc440",
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001416 },
Matt Porter656de7e2005-09-03 15:55:42 -07001417 { /* 440SP Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001418 .pvr_mask = 0xfff00fff,
1419 .pvr_value = 0x53200891,
Matt Porter656de7e2005-09-03 15:55:42 -07001420 .cpu_name = "440SP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001421 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001422 .cpu_user_features = COMMON_USER_BOOKE,
Matt Porter656de7e2005-09-03 15:55:42 -07001423 .icache_bsize = 32,
1424 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001425 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001426 .platform = "ppc440",
Matt Porter656de7e2005-09-03 15:55:42 -07001427 },
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001428 { /* 440SPe Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001429 .pvr_mask = 0xfff00fff,
1430 .pvr_value = 0x53400890,
1431 .cpu_name = "440SPe Rev. A",
1432 .cpu_features = CPU_FTRS_44X,
1433 .cpu_user_features = COMMON_USER_BOOKE,
1434 .icache_bsize = 32,
1435 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001436 .cpu_setup = __setup_cpu_440spe,
1437 .machine_check = machine_check_440A,
Roland Dreier333e6152007-06-16 05:36:32 +10001438 .platform = "ppc440",
1439 },
1440 { /* 440SPe Rev. B */
1441 .pvr_mask = 0xfff00fff,
1442 .pvr_value = 0x53400891,
1443 .cpu_name = "440SPe Rev. B",
Kumar Galaa147c582006-12-08 02:34:38 -06001444 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001445 .cpu_user_features = COMMON_USER_BOOKE,
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001446 .icache_bsize = 32,
1447 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001448 .cpu_setup = __setup_cpu_440spe,
1449 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001450 .platform = "ppc440",
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001451 },
John Linn23e72372008-07-01 09:42:07 -07001452 { /* 440 in Xilinx Virtex-5 FXT */
1453 .pvr_mask = 0xfffffff0,
1454 .pvr_value = 0x7ff21910,
1455 .cpu_name = "440 in Virtex-5 FXT",
1456 .cpu_features = CPU_FTRS_44X,
1457 .cpu_user_features = COMMON_USER_BOOKE,
1458 .icache_bsize = 32,
1459 .dcache_bsize = 32,
1460 .platform = "ppc440",
1461 },
Stefan Roese464076a2008-02-24 08:07:41 +11001462 { /* 460EX */
1463 .pvr_mask = 0xffff0002,
1464 .pvr_value = 0x13020002,
1465 .cpu_name = "460EX",
1466 .cpu_features = CPU_FTRS_44X,
1467 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1468 .icache_bsize = 32,
1469 .dcache_bsize = 32,
1470 .cpu_setup = __setup_cpu_460ex,
1471 .machine_check = machine_check_440A,
1472 .platform = "ppc440",
1473 },
1474 { /* 460GT */
1475 .pvr_mask = 0xffff0002,
1476 .pvr_value = 0x13020000,
1477 .cpu_name = "460GT",
1478 .cpu_features = CPU_FTRS_44X,
Josh Boyer939e6222008-06-11 07:52:40 -04001479 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Stefan Roese464076a2008-02-24 08:07:41 +11001480 .icache_bsize = 32,
1481 .dcache_bsize = 32,
Josh Boyer939e6222008-06-11 07:52:40 -04001482 .cpu_setup = __setup_cpu_460gt,
Stefan Roese464076a2008-02-24 08:07:41 +11001483 .machine_check = machine_check_440A,
1484 .platform = "ppc440",
1485 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001486 { /* default match */
1487 .pvr_mask = 0x00000000,
1488 .pvr_value = 0x00000000,
1489 .cpu_name = "(generic 44x PPC)",
1490 .cpu_features = CPU_FTRS_44X,
1491 .cpu_user_features = COMMON_USER_BOOKE,
1492 .icache_bsize = 32,
1493 .dcache_bsize = 32,
1494 .machine_check = machine_check_4xx,
1495 .platform = "ppc440",
1496 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001497#endif /* CONFIG_44x */
Josh Boyere3e414b2007-12-24 08:44:47 -06001498#ifdef CONFIG_E200
Stephen Rothwell49209602005-10-12 15:55:09 +10001499 { /* e200z5 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001500 .pvr_mask = 0xfff00000,
1501 .pvr_value = 0x81000000,
1502 .cpu_name = "e200z5",
1503 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001504 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001505 .cpu_user_features = COMMON_USER_BOOKE |
1506 PPC_FEATURE_HAS_EFP_SINGLE |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001507 PPC_FEATURE_UNIFIED_CACHE,
1508 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001509 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001510 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001511 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001512 { /* e200z6 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001513 .pvr_mask = 0xfff00000,
1514 .pvr_value = 0x81100000,
1515 .cpu_name = "e200z6",
1516 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001517 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001518 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001519 PPC_FEATURE_HAS_SPE_COMP |
1520 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001521 PPC_FEATURE_UNIFIED_CACHE,
1522 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001523 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001524 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001525 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001526 { /* default match */
1527 .pvr_mask = 0x00000000,
1528 .pvr_value = 0x00000000,
1529 .cpu_name = "(generic E200 PPC)",
1530 .cpu_features = CPU_FTRS_E200,
1531 .cpu_user_features = COMMON_USER_BOOKE |
1532 PPC_FEATURE_HAS_EFP_SINGLE |
1533 PPC_FEATURE_UNIFIED_CACHE,
1534 .dcache_bsize = 32,
1535 .machine_check = machine_check_e200,
1536 .platform = "ppc5554",
Paul Mackerras516c8be2008-05-12 14:20:35 +10001537 }
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001538#endif /* CONFIG_E200 */
1539#ifdef CONFIG_E500
Stephen Rothwell49209602005-10-12 15:55:09 +10001540 { /* e500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001541 .pvr_mask = 0xffff0000,
1542 .pvr_value = 0x80200000,
1543 .cpu_name = "e500",
Kumar Gala10b35d92005-09-23 14:08:58 -05001544 .cpu_features = CPU_FTRS_E500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001545 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001546 PPC_FEATURE_HAS_SPE_COMP |
1547 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001548 .icache_bsize = 32,
1549 .dcache_bsize = 32,
1550 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001551 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001552 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001553 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001554 .platform = "ppc8540",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001555 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001556 { /* e500v2 */
Kumar Gala5b37b702005-06-21 17:15:18 -07001557 .pvr_mask = 0xffff0000,
1558 .pvr_value = 0x80210000,
1559 .cpu_name = "e500v2",
Kumar Gala10b35d92005-09-23 14:08:58 -05001560 .cpu_features = CPU_FTRS_E500_2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001561 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001562 PPC_FEATURE_HAS_SPE_COMP |
1563 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1564 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
Kumar Gala5b37b702005-06-21 17:15:18 -07001565 .icache_bsize = 32,
1566 .dcache_bsize = 32,
1567 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001568 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001569 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001570 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001571 .platform = "ppc8548",
Kumar Gala5b37b702005-06-21 17:15:18 -07001572 },
Kumar Gala3dfa8772008-06-16 09:41:32 -05001573 { /* e500mc */
1574 .pvr_mask = 0xffff0000,
1575 .pvr_value = 0x80230000,
1576 .cpu_name = "e500mc",
Kumar Gala3dfa8772008-06-16 09:41:32 -05001577 .cpu_features = CPU_FTRS_E500MC,
1578 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1579 .icache_bsize = 64,
1580 .dcache_bsize = 64,
1581 .num_pmcs = 4,
1582 .oprofile_cpu_type = "ppc/e500", /* xxx - galak, e500mc? */
1583 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1584 .machine_check = machine_check_e500,
1585 .platform = "ppce500mc",
1586 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001587 { /* default match */
1588 .pvr_mask = 0x00000000,
1589 .pvr_value = 0x00000000,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001590 .cpu_name = "(generic E500 PPC)",
1591 .cpu_features = CPU_FTRS_E500,
1592 .cpu_user_features = COMMON_USER_BOOKE |
1593 PPC_FEATURE_HAS_SPE_COMP |
1594 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001595 .icache_bsize = 32,
1596 .dcache_bsize = 32,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001597 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001598 .platform = "powerpc",
Paul Mackerras516c8be2008-05-12 14:20:35 +10001599 }
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001600#endif /* CONFIG_E500 */
Stephen Rothwell49209602005-10-12 15:55:09 +10001601#endif /* CONFIG_PPC32 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001602};
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001603
Paul Mackerras87a72f92007-10-04 14:18:01 +10001604static struct cpu_spec the_cpu_spec;
1605
1606struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001607{
1608 struct cpu_spec *s = cpu_specs;
Paul Mackerras87a72f92007-10-04 14:18:01 +10001609 struct cpu_spec *t = &the_cpu_spec;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001610 int i;
1611
1612 s = PTRRELOC(s);
Paul Mackerras87a72f92007-10-04 14:18:01 +10001613 t = PTRRELOC(t);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001614
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001615 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
1616 if ((pvr & s->pvr_mask) == s->pvr_value) {
Paul Mackerras87a72f92007-10-04 14:18:01 +10001617 /*
1618 * If we are overriding a previous value derived
1619 * from the real PVR with a new value obtained
1620 * using a logical PVR value, don't modify the
1621 * performance monitor fields.
1622 */
1623 if (t->num_pmcs && !s->num_pmcs) {
1624 t->cpu_name = s->cpu_name;
1625 t->cpu_features = s->cpu_features;
1626 t->cpu_user_features = s->cpu_user_features;
1627 t->icache_bsize = s->icache_bsize;
1628 t->dcache_bsize = s->dcache_bsize;
1629 t->cpu_setup = s->cpu_setup;
1630 t->cpu_restore = s->cpu_restore;
1631 t->platform = s->platform;
1632 } else
1633 *t = *s;
1634 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001635#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
Stefan Roese464076a2008-02-24 08:07:41 +11001636 /* ppc64 and booke expect identify_cpu to also call
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001637 * setup_cpu for that processor. I will consolidate
1638 * that at a later time, for now, just use #ifdef.
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001639 * we also don't need to PTRRELOC the function pointer
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001640 * on ppc64 and booke as we are running at 0 in real
1641 * mode on ppc64 and reloc_offset is always 0 on booke.
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001642 */
1643 if (s->cpu_setup) {
1644 s->cpu_setup(offset, s);
1645 }
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001646#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001647 return s;
1648 }
1649 BUG();
1650 return NULL;
1651}