blob: 923f87aff20a4522f44d1e01f487938b598604ff [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 */
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +000022#include <asm/mmu.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070023
Kumar Gala400d2212005-09-27 15:13:12 -050024struct cpu_spec* cur_cpu_spec = NULL;
Stephen Rothwell49209602005-10-12 15:55:09 +100025EXPORT_SYMBOL(cur_cpu_spec);
Linus Torvalds1da177e2005-04-16 15:20:36 -070026
Nathan Lynch9115d132008-07-16 09:58:51 +100027/* The platform string corresponding to the real PVR */
28const char *powerpc_base_platform;
29
Stephen Rothwell49209602005-10-12 15:55:09 +100030/* NOTE:
31 * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's
32 * the responsibility of the appropriate CPU save/restore functions to
33 * eventually copy these settings over. Those save/restore aren't yet
34 * part of the cputable though. That has to be fixed for both ppc32
35 * and ppc64
36 */
Geoff Levandb26f1002006-05-19 14:24:18 +100037#ifdef CONFIG_PPC32
Valentine Barshak81127532007-09-22 00:46:57 +100038extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
39extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110040extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
Valentine Barshak340ffd22007-09-22 00:50:09 +100041extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110042extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
Grant Likely640d17d2008-12-04 05:39:55 +000043extern void __setup_cpu_440x5(unsigned long offset, struct cpu_spec* spec);
Stefan Roese464076a2008-02-24 08:07:41 +110044extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec);
Josh Boyer939e6222008-06-11 07:52:40 -040045extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec);
Kumar Gala400d2212005-09-27 15:13:12 -050046extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
47extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
48extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
49extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
50extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
51extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
52extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
53extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell49209602005-10-12 15:55:09 +100054#endif /* CONFIG_PPC32 */
Olof Johanssonf39b7a52006-08-11 00:07:08 -050055#ifdef CONFIG_PPC64
Kumar Gala400d2212005-09-27 15:13:12 -050056extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
Olof Johansson5b43d202006-10-04 23:41:41 -050057extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
Olof Johansson11999192007-02-04 16:36:51 -060058extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell40d244d2007-02-12 22:10:48 +110059extern void __restore_cpu_pa6t(void);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050060extern void __restore_cpu_ppc970(void);
Michael Neulinge952e6c2008-06-18 10:47:26 +100061extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec);
62extern void __restore_cpu_power7(void);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050063#endif /* CONFIG_PPC64 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070064
Linus Torvalds1da177e2005-04-16 15:20:36 -070065/* This table only contains "desktop" CPUs, it need to be filled with embedded
66 * ones as well...
67 */
Stephen Rothwell49209602005-10-12 15:55:09 +100068#define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
69 PPC_FEATURE_HAS_MMU)
70#define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +110071#define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
Benjamin Herrenschmidtaa5cb0212006-03-01 15:07:07 +110072#define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
73 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
74#define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
75 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
Anton Blanchard03054d52006-04-29 09:51:06 +100076#define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
Paul Mackerrasfab5db92006-06-07 16:14:40 +100077 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
Nathan Lynch0f473312008-07-10 01:06:57 +100078 PPC_FEATURE_TRUE_LE | \
79 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Michael Neulinge952e6c2008-06-18 10:47:26 +100080#define COMMON_USER_POWER7 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
81 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
Nathan Lynch0f473312008-07-10 01:06:57 +100082 PPC_FEATURE_TRUE_LE | \
83 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -050084#define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
85 PPC_FEATURE_TRUE_LE | \
86 PPC_FEATURE_HAS_ALTIVEC_COMP)
Paul Mackerras80f15dc2006-01-14 10:11:39 +110087#define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
88 PPC_FEATURE_BOOKE)
Linus Torvalds1da177e2005-04-16 15:20:36 -070089
Paul Mackerras87a72f92007-10-04 14:18:01 +100090static struct cpu_spec __initdata cpu_specs[] = {
Stephen Rothwell49209602005-10-12 15:55:09 +100091#ifdef CONFIG_PPC64
92 { /* Power3 */
93 .pvr_mask = 0xffff0000,
94 .pvr_value = 0x00400000,
95 .cpu_name = "POWER3 (630)",
96 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +100097 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +000098 .mmu_features = MMU_FTR_HPTE_TABLE,
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 { /* Power3+ */
109 .pvr_mask = 0xffff0000,
110 .pvr_value = 0x00410000,
111 .cpu_name = "POWER3 (630+)",
112 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000113 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000114 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000115 .icache_bsize = 128,
116 .dcache_bsize = 128,
117 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600118 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000119 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000120 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100121 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100122 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +1000123 },
124 { /* Northstar */
125 .pvr_mask = 0xffff0000,
126 .pvr_value = 0x00330000,
127 .cpu_name = "RS64-II (northstar)",
128 .cpu_features = CPU_FTRS_RS64,
129 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000130 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000131 .icache_bsize = 128,
132 .dcache_bsize = 128,
133 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600134 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000135 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000136 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100137 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100138 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000139 },
140 { /* Pulsar */
141 .pvr_mask = 0xffff0000,
142 .pvr_value = 0x00340000,
143 .cpu_name = "RS64-III (pulsar)",
144 .cpu_features = CPU_FTRS_RS64,
145 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000146 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000147 .icache_bsize = 128,
148 .dcache_bsize = 128,
149 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600150 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000151 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000152 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100153 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100154 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000155 },
156 { /* I-star */
157 .pvr_mask = 0xffff0000,
158 .pvr_value = 0x00360000,
159 .cpu_name = "RS64-III (icestar)",
160 .cpu_features = CPU_FTRS_RS64,
161 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000162 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000163 .icache_bsize = 128,
164 .dcache_bsize = 128,
165 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600166 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000167 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000168 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100169 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100170 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000171 },
172 { /* S-star */
173 .pvr_mask = 0xffff0000,
174 .pvr_value = 0x00370000,
175 .cpu_name = "RS64-IV (sstar)",
176 .cpu_features = CPU_FTRS_RS64,
177 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000178 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000179 .icache_bsize = 128,
180 .dcache_bsize = 128,
181 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600182 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000183 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000184 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100185 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100186 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000187 },
188 { /* Power4 */
189 .pvr_mask = 0xffff0000,
190 .pvr_value = 0x00350000,
191 .cpu_name = "POWER4 (gp)",
192 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100193 .cpu_user_features = COMMON_USER_POWER4,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000194 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000195 .icache_bsize = 128,
196 .dcache_bsize = 128,
197 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600198 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000199 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000200 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100201 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100202 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000203 },
204 { /* Power4+ */
205 .pvr_mask = 0xffff0000,
206 .pvr_value = 0x00380000,
207 .cpu_name = "POWER4+ (gq)",
208 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100209 .cpu_user_features = COMMON_USER_POWER4,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000210 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000211 .icache_bsize = 128,
212 .dcache_bsize = 128,
213 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600214 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000215 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000216 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100217 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100218 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000219 },
220 { /* PPC970 */
221 .pvr_mask = 0xffff0000,
222 .pvr_value = 0x00390000,
223 .cpu_name = "PPC970",
224 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100225 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000226 PPC_FEATURE_HAS_ALTIVEC_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000227 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000228 .icache_bsize = 128,
229 .dcache_bsize = 128,
230 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600231 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000232 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500233 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000234 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000235 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100236 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100237 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000238 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000239 { /* PPC970FX */
240 .pvr_mask = 0xffff0000,
241 .pvr_value = 0x003c0000,
242 .cpu_name = "PPC970FX",
Stephen Rothwell49209602005-10-12 15:55:09 +1000243 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100244 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000245 PPC_FEATURE_HAS_ALTIVEC_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000246 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000247 .icache_bsize = 128,
248 .dcache_bsize = 128,
249 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600250 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000251 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500252 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000253 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000254 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100255 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100256 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000257 },
Olof Johansson3546e812007-02-26 00:35:14 -0600258 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
259 .pvr_mask = 0xffffffff,
260 .pvr_value = 0x00440100,
261 .cpu_name = "PPC970MP",
262 .cpu_features = CPU_FTRS_PPC970,
263 .cpu_user_features = COMMON_USER_POWER4 |
264 PPC_FEATURE_HAS_ALTIVEC_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000265 .mmu_features = MMU_FTR_HPTE_TABLE,
Olof Johansson3546e812007-02-26 00:35:14 -0600266 .icache_bsize = 128,
267 .dcache_bsize = 128,
268 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000269 .pmc_type = PPC_PMC_IBM,
Olof Johansson3546e812007-02-26 00:35:14 -0600270 .cpu_setup = __setup_cpu_ppc970,
271 .cpu_restore = __restore_cpu_ppc970,
272 .oprofile_cpu_type = "ppc64/970MP",
273 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100274 .machine_check = machine_check_generic,
Olof Johansson3546e812007-02-26 00:35:14 -0600275 .platform = "ppc970",
276 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000277 { /* PPC970MP */
278 .pvr_mask = 0xffff0000,
279 .pvr_value = 0x00440000,
280 .cpu_name = "PPC970MP",
281 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100282 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000283 PPC_FEATURE_HAS_ALTIVEC_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000284 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000285 .icache_bsize = 128,
286 .dcache_bsize = 128,
Anton Blanchard87af41b2006-05-05 05:44:26 +1000287 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000288 .pmc_type = PPC_PMC_IBM,
Olof Johansson5b43d202006-10-04 23:41:41 -0500289 .cpu_setup = __setup_cpu_ppc970MP,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500290 .cpu_restore = __restore_cpu_ppc970,
Mike Wolffecb3522006-11-21 14:41:54 -0600291 .oprofile_cpu_type = "ppc64/970MP",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000292 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100293 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100294 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000295 },
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500296 { /* PPC970GX */
297 .pvr_mask = 0xffff0000,
298 .pvr_value = 0x00450000,
299 .cpu_name = "PPC970GX",
300 .cpu_features = CPU_FTRS_PPC970,
301 .cpu_user_features = COMMON_USER_POWER4 |
302 PPC_FEATURE_HAS_ALTIVEC_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000303 .mmu_features = MMU_FTR_HPTE_TABLE,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500304 .icache_bsize = 128,
305 .dcache_bsize = 128,
306 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600307 .pmc_type = PPC_PMC_IBM,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500308 .cpu_setup = __setup_cpu_ppc970,
309 .oprofile_cpu_type = "ppc64/970",
310 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100311 .machine_check = machine_check_generic,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500312 .platform = "ppc970",
313 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100314 { /* Power5 GR */
Stephen Rothwell49209602005-10-12 15:55:09 +1000315 .pvr_mask = 0xffff0000,
316 .pvr_value = 0x003a0000,
317 .cpu_name = "POWER5 (gr)",
318 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100319 .cpu_user_features = COMMON_USER_POWER5,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000320 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000321 .icache_bsize = 128,
322 .dcache_bsize = 128,
323 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600324 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000325 .oprofile_cpu_type = "ppc64/power5",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000326 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000327 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
328 * and above but only works on POWER5 and above
329 */
330 .oprofile_mmcra_sihv = MMCRA_SIHV,
331 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100332 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100333 .platform = "power5",
Stephen Rothwell49209602005-10-12 15:55:09 +1000334 },
Mike Wolf31a12ce2007-07-10 13:13:47 -0500335 { /* Power5++ */
336 .pvr_mask = 0xffffff00,
337 .pvr_value = 0x003b0300,
338 .cpu_name = "POWER5+ (gs)",
339 .cpu_features = CPU_FTRS_POWER5,
340 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000341 .mmu_features = MMU_FTR_HPTE_TABLE,
Mike Wolf31a12ce2007-07-10 13:13:47 -0500342 .icache_bsize = 128,
343 .dcache_bsize = 128,
344 .num_pmcs = 6,
345 .oprofile_cpu_type = "ppc64/power5++",
346 .oprofile_type = PPC_OPROFILE_POWER4,
347 .oprofile_mmcra_sihv = MMCRA_SIHV,
348 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100349 .machine_check = machine_check_generic,
Mike Wolf31a12ce2007-07-10 13:13:47 -0500350 .platform = "power5+",
351 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100352 { /* Power5 GS */
Stephen Rothwell49209602005-10-12 15:55:09 +1000353 .pvr_mask = 0xffff0000,
354 .pvr_value = 0x003b0000,
Anton Blanchard834608f2006-01-09 15:42:30 +1100355 .cpu_name = "POWER5+ (gs)",
Stephen Rothwell49209602005-10-12 15:55:09 +1000356 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100357 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000358 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000359 .icache_bsize = 128,
360 .dcache_bsize = 128,
361 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600362 .pmc_type = PPC_PMC_IBM,
Anton Blanchard834608f2006-01-09 15:42:30 +1100363 .oprofile_cpu_type = "ppc64/power5+",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000364 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000365 .oprofile_mmcra_sihv = MMCRA_SIHV,
366 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100367 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100368 .platform = "power5+",
Stephen Rothwell49209602005-10-12 15:55:09 +1000369 },
Paul Mackerras974a76f2006-11-10 20:38:53 +1100370 { /* POWER6 in P5+ mode; 2.04-compliant processor */
371 .pvr_mask = 0xffffffff,
372 .pvr_value = 0x0f000001,
373 .cpu_name = "POWER5+",
374 .cpu_features = CPU_FTRS_POWER5,
375 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000376 .mmu_features = MMU_FTR_HPTE_TABLE,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100377 .icache_bsize = 128,
378 .dcache_bsize = 128,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100379 .machine_check = machine_check_generic,
Torez Smith79e25ba2008-07-18 06:42:07 +1000380 .oprofile_cpu_type = "ppc64/compat-power5+",
Paul Mackerras974a76f2006-11-10 20:38:53 +1100381 .platform = "power5+",
382 },
Anton Blanchard03054d52006-04-29 09:51:06 +1000383 { /* Power6 */
384 .pvr_mask = 0xffff0000,
385 .pvr_value = 0x003e0000,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100386 .cpu_name = "POWER6 (raw)",
387 .cpu_features = CPU_FTRS_POWER6,
388 .cpu_user_features = COMMON_USER_POWER6 |
389 PPC_FEATURE_POWER6_EXT,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000390 .mmu_features = MMU_FTR_HPTE_TABLE,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100391 .icache_bsize = 128,
392 .dcache_bsize = 128,
393 .num_pmcs = 6,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000394 .pmc_type = PPC_PMC_IBM,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100395 .oprofile_cpu_type = "ppc64/power6",
396 .oprofile_type = PPC_OPROFILE_POWER4,
397 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
398 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
399 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
400 POWER6_MMCRA_OTHER,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100401 .machine_check = machine_check_generic,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100402 .platform = "power6x",
403 },
404 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
405 .pvr_mask = 0xffffffff,
406 .pvr_value = 0x0f000002,
407 .cpu_name = "POWER6 (architected)",
Anton Blanchard03054d52006-04-29 09:51:06 +1000408 .cpu_features = CPU_FTRS_POWER6,
409 .cpu_user_features = COMMON_USER_POWER6,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000410 .mmu_features = MMU_FTR_HPTE_TABLE,
Anton Blanchard03054d52006-04-29 09:51:06 +1000411 .icache_bsize = 128,
412 .dcache_bsize = 128,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100413 .machine_check = machine_check_generic,
Torez Smith79e25ba2008-07-18 06:42:07 +1000414 .oprofile_cpu_type = "ppc64/compat-power6",
Anton Blanchard03054d52006-04-29 09:51:06 +1000415 .platform = "power6",
416 },
Joel Schopp635f5a62008-06-19 06:18:21 +1000417 { /* 2.06-compliant processor, i.e. Power7 "architected" mode */
418 .pvr_mask = 0xffffffff,
419 .pvr_value = 0x0f000003,
420 .cpu_name = "POWER7 (architected)",
421 .cpu_features = CPU_FTRS_POWER7,
422 .cpu_user_features = COMMON_USER_POWER7,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000423 .mmu_features = MMU_FTR_HPTE_TABLE,
Joel Schopp635f5a62008-06-19 06:18:21 +1000424 .icache_bsize = 128,
425 .dcache_bsize = 128,
426 .machine_check = machine_check_generic,
Torez Smith79e25ba2008-07-18 06:42:07 +1000427 .oprofile_cpu_type = "ppc64/compat-power7",
Joel Schopp635f5a62008-06-19 06:18:21 +1000428 .platform = "power7",
429 },
Michael Neulinge952e6c2008-06-18 10:47:26 +1000430 { /* Power7 */
431 .pvr_mask = 0xffff0000,
432 .pvr_value = 0x003f0000,
Joel Schopp635f5a62008-06-19 06:18:21 +1000433 .cpu_name = "POWER7 (raw)",
Michael Neulinge952e6c2008-06-18 10:47:26 +1000434 .cpu_features = CPU_FTRS_POWER7,
435 .cpu_user_features = COMMON_USER_POWER7,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000436 .mmu_features = MMU_FTR_HPTE_TABLE,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000437 .icache_bsize = 128,
438 .dcache_bsize = 128,
439 .num_pmcs = 6,
440 .pmc_type = PPC_PMC_IBM,
441 .cpu_setup = __setup_cpu_power7,
442 .cpu_restore = __restore_cpu_power7,
443 .oprofile_cpu_type = "ppc64/power7",
444 .oprofile_type = PPC_OPROFILE_POWER4,
445 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
446 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
447 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
448 POWER6_MMCRA_OTHER,
449 .platform = "power7",
450 },
Arnd Bergmannc902be72006-01-04 19:55:53 +0000451 { /* Cell Broadband Engine */
Stephen Rothwell49209602005-10-12 15:55:09 +1000452 .pvr_mask = 0xffff0000,
453 .pvr_value = 0x00700000,
454 .cpu_name = "Cell Broadband Engine",
455 .cpu_features = CPU_FTRS_CELL,
456 .cpu_user_features = COMMON_USER_PPC64 |
Benjamin Herrenschmidtaa5cb0212006-03-01 15:07:07 +1100457 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
458 PPC_FEATURE_SMT,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000459 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000460 .icache_bsize = 128,
461 .dcache_bsize = 128,
Maynard Johnson18f21902006-11-20 18:45:16 +0100462 .num_pmcs = 4,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600463 .pmc_type = PPC_PMC_IBM,
Maynard Johnson18f21902006-11-20 18:45:16 +0100464 .oprofile_cpu_type = "ppc64/cell-be",
465 .oprofile_type = PPC_OPROFILE_CELL,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100466 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100467 .platform = "ppc-cell-be",
Stephen Rothwell49209602005-10-12 15:55:09 +1000468 },
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500469 { /* PA Semi PA6T */
470 .pvr_mask = 0x7fff0000,
471 .pvr_value = 0x00900000,
472 .cpu_name = "PA6T",
473 .cpu_features = CPU_FTRS_PA6T,
474 .cpu_user_features = COMMON_USER_PA6T,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000475 .mmu_features = MMU_FTR_HPTE_TABLE,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500476 .icache_bsize = 64,
477 .dcache_bsize = 64,
478 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600479 .pmc_type = PPC_PMC_PA6T,
Olof Johansson11999192007-02-04 16:36:51 -0600480 .cpu_setup = __setup_cpu_pa6t,
481 .cpu_restore = __restore_cpu_pa6t,
Olof Johansson25fc5302007-04-18 16:38:21 +1000482 .oprofile_cpu_type = "ppc64/pa6t",
483 .oprofile_type = PPC_OPROFILE_PA6T,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100484 .machine_check = machine_check_generic,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500485 .platform = "pa6t",
486 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000487 { /* default match */
488 .pvr_mask = 0x00000000,
489 .pvr_value = 0x00000000,
490 .cpu_name = "POWER4 (compatible)",
491 .cpu_features = CPU_FTRS_COMPATIBLE,
492 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000493 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000494 .icache_bsize = 128,
495 .dcache_bsize = 128,
496 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600497 .pmc_type = PPC_PMC_IBM,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100498 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100499 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000500 }
501#endif /* CONFIG_PPC64 */
502#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -0700503#if CLASSIC_PPC
Stephen Rothwell49209602005-10-12 15:55:09 +1000504 { /* 601 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700505 .pvr_mask = 0xffff0000,
506 .pvr_value = 0x00010000,
507 .cpu_name = "601",
Kumar Gala10b35d92005-09-23 14:08:58 -0500508 .cpu_features = CPU_FTRS_PPC601,
Stephen Rothwell49209602005-10-12 15:55:09 +1000509 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
Paul Mackerras98599012005-10-22 16:51:34 +1000510 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000511 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700512 .icache_bsize = 32,
513 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100514 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100515 .platform = "ppc601",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700516 },
517 { /* 603 */
518 .pvr_mask = 0xffff0000,
519 .pvr_value = 0x00030000,
520 .cpu_name = "603",
Kumar Gala10b35d92005-09-23 14:08:58 -0500521 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000522 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000523 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700524 .icache_bsize = 32,
525 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100526 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100527 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100528 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700529 },
530 { /* 603e */
531 .pvr_mask = 0xffff0000,
532 .pvr_value = 0x00060000,
533 .cpu_name = "603e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500534 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000535 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000536 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700537 .icache_bsize = 32,
538 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100539 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100540 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100541 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700542 },
543 { /* 603ev */
544 .pvr_mask = 0xffff0000,
545 .pvr_value = 0x00070000,
546 .cpu_name = "603ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500547 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000548 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000549 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700550 .icache_bsize = 32,
551 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100552 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100553 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100554 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700555 },
556 { /* 604 */
557 .pvr_mask = 0xffff0000,
558 .pvr_value = 0x00040000,
559 .cpu_name = "604",
Kumar Gala10b35d92005-09-23 14:08:58 -0500560 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000561 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000562 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700563 .icache_bsize = 32,
564 .dcache_bsize = 32,
565 .num_pmcs = 2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100566 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100567 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100568 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700569 },
570 { /* 604e */
571 .pvr_mask = 0xfffff000,
572 .pvr_value = 0x00090000,
573 .cpu_name = "604e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500574 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000575 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000576 .mmu_features = MMU_FTR_HPTE_TABLE,
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_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100581 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100582 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700583 },
584 { /* 604r */
585 .pvr_mask = 0xffff0000,
586 .pvr_value = 0x00090000,
587 .cpu_name = "604r",
Kumar Gala10b35d92005-09-23 14:08:58 -0500588 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000589 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000590 .mmu_features = MMU_FTR_HPTE_TABLE,
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_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100595 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100596 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700597 },
598 { /* 604ev */
599 .pvr_mask = 0xffff0000,
600 .pvr_value = 0x000a0000,
601 .cpu_name = "604ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500602 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000603 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000604 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700605 .icache_bsize = 32,
606 .dcache_bsize = 32,
607 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100608 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100609 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100610 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700611 },
612 { /* 740/750 (0x4202, don't support TAU ?) */
613 .pvr_mask = 0xffffffff,
614 .pvr_value = 0x00084202,
615 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500616 .cpu_features = CPU_FTRS_740_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000617 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000618 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700619 .icache_bsize = 32,
620 .dcache_bsize = 32,
621 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100622 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100623 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100624 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700625 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700626 { /* 750CX (80100 and 8010x?) */
627 .pvr_mask = 0xfffffff0,
628 .pvr_value = 0x00080100,
629 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500630 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000631 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000632 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700633 .icache_bsize = 32,
634 .dcache_bsize = 32,
635 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100636 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100637 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100638 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700639 },
640 { /* 750CX (82201 and 82202) */
641 .pvr_mask = 0xfffffff0,
642 .pvr_value = 0x00082200,
643 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500644 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000645 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000646 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700647 .icache_bsize = 32,
648 .dcache_bsize = 32,
649 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000650 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100651 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100652 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100653 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700654 },
655 { /* 750CXe (82214) */
656 .pvr_mask = 0xfffffff0,
657 .pvr_value = 0x00082210,
658 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500659 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000660 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000661 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700662 .icache_bsize = 32,
663 .dcache_bsize = 32,
664 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000665 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100666 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100667 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100668 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700669 },
Arthur Othieno7c316252005-09-03 15:55:52 -0700670 { /* 750CXe "Gekko" (83214) */
671 .pvr_mask = 0xffffffff,
672 .pvr_value = 0x00083214,
673 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500674 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000675 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000676 .mmu_features = MMU_FTR_HPTE_TABLE,
Arthur Othieno7c316252005-09-03 15:55:52 -0700677 .icache_bsize = 32,
678 .dcache_bsize = 32,
679 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000680 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100681 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100682 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100683 .platform = "ppc750",
Arthur Othieno7c316252005-09-03 15:55:52 -0700684 },
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500685 { /* 750CL */
686 .pvr_mask = 0xfffff0f0,
687 .pvr_value = 0x00087010,
688 .cpu_name = "750CL",
Josh Boyera14c4502007-04-13 04:33:25 +1000689 .cpu_features = CPU_FTRS_750CL,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500690 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000691 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500692 .icache_bsize = 32,
693 .dcache_bsize = 32,
694 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000695 .pmc_type = PPC_PMC_IBM,
Josh Boyera14c4502007-04-13 04:33:25 +1000696 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100697 .machine_check = machine_check_generic,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500698 .platform = "ppc750",
699 },
Arthur Othienoac1ff042005-09-03 15:55:51 -0700700 { /* 745/755 */
701 .pvr_mask = 0xfffff000,
702 .pvr_value = 0x00083000,
703 .cpu_name = "745/755",
Kumar Gala10b35d92005-09-23 14:08:58 -0500704 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000705 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000706 .mmu_features = MMU_FTR_HPTE_TABLE,
Arthur Othienoac1ff042005-09-03 15:55:51 -0700707 .icache_bsize = 32,
708 .dcache_bsize = 32,
709 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000710 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100711 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100712 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100713 .platform = "ppc750",
Arthur Othienoac1ff042005-09-03 15:55:51 -0700714 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700715 { /* 750FX rev 1.x */
716 .pvr_mask = 0xffffff00,
717 .pvr_value = 0x70000100,
718 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500719 .cpu_features = CPU_FTRS_750FX1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000720 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000721 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700722 .icache_bsize = 32,
723 .dcache_bsize = 32,
724 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000725 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100726 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100727 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100728 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700729 },
730 { /* 750FX rev 2.0 must disable HID0[DPM] */
731 .pvr_mask = 0xffffffff,
732 .pvr_value = 0x70000200,
733 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500734 .cpu_features = CPU_FTRS_750FX2,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000735 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000736 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700737 .icache_bsize = 32,
738 .dcache_bsize = 32,
739 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000740 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100741 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100742 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100743 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700744 },
745 { /* 750FX (All revs except 2.0) */
746 .pvr_mask = 0xffff0000,
747 .pvr_value = 0x70000000,
748 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500749 .cpu_features = CPU_FTRS_750FX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000750 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000751 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700752 .icache_bsize = 32,
753 .dcache_bsize = 32,
754 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000755 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100756 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100757 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100758 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700759 },
760 { /* 750GX */
761 .pvr_mask = 0xffff0000,
762 .pvr_value = 0x70020000,
763 .cpu_name = "750GX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500764 .cpu_features = CPU_FTRS_750GX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000765 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000766 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700767 .icache_bsize = 32,
768 .dcache_bsize = 32,
769 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000770 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100771 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100772 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100773 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700774 },
775 { /* 740/750 (L2CR bit need fixup for 740) */
776 .pvr_mask = 0xffff0000,
777 .pvr_value = 0x00080000,
778 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500779 .cpu_features = CPU_FTRS_740,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000780 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000781 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700782 .icache_bsize = 32,
783 .dcache_bsize = 32,
784 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000785 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100786 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100787 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100788 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700789 },
790 { /* 7400 rev 1.1 ? (no TAU) */
791 .pvr_mask = 0xffffffff,
792 .pvr_value = 0x000c1101,
793 .cpu_name = "7400 (1.1)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500794 .cpu_features = CPU_FTRS_7400_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000795 .cpu_user_features = COMMON_USER |
796 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000797 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700798 .icache_bsize = 32,
799 .dcache_bsize = 32,
800 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000801 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100802 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100803 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100804 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700805 },
806 { /* 7400 */
807 .pvr_mask = 0xffff0000,
808 .pvr_value = 0x000c0000,
809 .cpu_name = "7400",
Kumar Gala10b35d92005-09-23 14:08:58 -0500810 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000811 .cpu_user_features = COMMON_USER |
812 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000813 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700814 .icache_bsize = 32,
815 .dcache_bsize = 32,
816 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000817 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100818 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100819 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100820 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700821 },
822 { /* 7410 */
823 .pvr_mask = 0xffff0000,
824 .pvr_value = 0x800c0000,
825 .cpu_name = "7410",
Kumar Gala10b35d92005-09-23 14:08:58 -0500826 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000827 .cpu_user_features = COMMON_USER |
828 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000829 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700830 .icache_bsize = 32,
831 .dcache_bsize = 32,
832 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000833 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100834 .cpu_setup = __setup_cpu_7410,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100835 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100836 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700837 },
838 { /* 7450 2.0 - no doze/nap */
839 .pvr_mask = 0xffffffff,
840 .pvr_value = 0x80000200,
841 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500842 .cpu_features = CPU_FTRS_7450_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000843 .cpu_user_features = COMMON_USER |
844 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000845 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700846 .icache_bsize = 32,
847 .dcache_bsize = 32,
848 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000849 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600850 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600851 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000852 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100853 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100854 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700855 },
856 { /* 7450 2.1 */
857 .pvr_mask = 0xffffffff,
858 .pvr_value = 0x80000201,
859 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500860 .cpu_features = CPU_FTRS_7450_21,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000861 .cpu_user_features = COMMON_USER |
862 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000863 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700864 .icache_bsize = 32,
865 .dcache_bsize = 32,
866 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000867 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600868 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600869 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000870 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100871 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100872 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700873 },
874 { /* 7450 2.3 and newer */
875 .pvr_mask = 0xffff0000,
876 .pvr_value = 0x80000000,
877 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500878 .cpu_features = CPU_FTRS_7450_23,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000879 .cpu_user_features = COMMON_USER |
880 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000881 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700882 .icache_bsize = 32,
883 .dcache_bsize = 32,
884 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000885 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600886 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600887 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000888 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100889 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100890 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700891 },
892 { /* 7455 rev 1.x */
893 .pvr_mask = 0xffffff00,
894 .pvr_value = 0x80010100,
895 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500896 .cpu_features = CPU_FTRS_7455_1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000897 .cpu_user_features = COMMON_USER |
898 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000899 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700900 .icache_bsize = 32,
901 .dcache_bsize = 32,
902 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000903 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600904 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600905 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000906 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100907 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100908 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700909 },
910 { /* 7455 rev 2.0 */
911 .pvr_mask = 0xffffffff,
912 .pvr_value = 0x80010200,
913 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500914 .cpu_features = CPU_FTRS_7455_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000915 .cpu_user_features = COMMON_USER |
916 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000917 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700918 .icache_bsize = 32,
919 .dcache_bsize = 32,
920 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000921 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600922 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600923 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000924 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100925 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100926 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700927 },
928 { /* 7455 others */
929 .pvr_mask = 0xffff0000,
930 .pvr_value = 0x80010000,
931 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500932 .cpu_features = CPU_FTRS_7455,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000933 .cpu_user_features = COMMON_USER |
934 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000935 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700936 .icache_bsize = 32,
937 .dcache_bsize = 32,
938 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000939 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600940 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600941 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000942 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100943 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100944 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700945 },
946 { /* 7447/7457 Rev 1.0 */
947 .pvr_mask = 0xffffffff,
948 .pvr_value = 0x80020100,
949 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500950 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000951 .cpu_user_features = COMMON_USER |
952 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000953 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700954 .icache_bsize = 32,
955 .dcache_bsize = 32,
956 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000957 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600958 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600959 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000960 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100961 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100962 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700963 },
964 { /* 7447/7457 Rev 1.1 */
965 .pvr_mask = 0xffffffff,
966 .pvr_value = 0x80020101,
967 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500968 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000969 .cpu_user_features = COMMON_USER |
970 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000971 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700972 .icache_bsize = 32,
973 .dcache_bsize = 32,
974 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000975 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600976 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600977 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000978 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100979 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100980 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700981 },
982 { /* 7447/7457 Rev 1.2 and later */
983 .pvr_mask = 0xffff0000,
984 .pvr_value = 0x80020000,
985 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500986 .cpu_features = CPU_FTRS_7447,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000987 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000988 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700989 .icache_bsize = 32,
990 .dcache_bsize = 32,
991 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000992 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600993 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600994 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000995 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100996 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100997 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700998 },
999 { /* 7447A */
1000 .pvr_mask = 0xffff0000,
1001 .pvr_value = 0x80030000,
1002 .cpu_name = "7447A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001003 .cpu_features = CPU_FTRS_7447A,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001004 .cpu_user_features = COMMON_USER |
1005 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001006 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001007 .icache_bsize = 32,
1008 .dcache_bsize = 32,
1009 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001010 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001011 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001012 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001013 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001014 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001015 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001016 },
Kumar Galabbde6302005-09-03 15:55:55 -07001017 { /* 7448 */
1018 .pvr_mask = 0xffff0000,
1019 .pvr_value = 0x80040000,
1020 .cpu_name = "7448",
James.Yang3d372542007-05-02 16:34:43 -05001021 .cpu_features = CPU_FTRS_7448,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001022 .cpu_user_features = COMMON_USER |
1023 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001024 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Kumar Galabbde6302005-09-03 15:55:55 -07001025 .icache_bsize = 32,
1026 .dcache_bsize = 32,
1027 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001028 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001029 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001030 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001031 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001032 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001033 .platform = "ppc7450",
Kumar Galabbde6302005-09-03 15:55:55 -07001034 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001035 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
1036 .pvr_mask = 0x7fff0000,
1037 .pvr_value = 0x00810000,
1038 .cpu_name = "82xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001039 .cpu_features = CPU_FTRS_82XX,
Stephen Rothwell49209602005-10-12 15:55:09 +10001040 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001041 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001042 .icache_bsize = 32,
1043 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001044 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001045 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001046 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001047 },
1048 { /* All G2_LE (603e core, plus some) have the same pvr */
1049 .pvr_mask = 0x7fff0000,
1050 .pvr_value = 0x00820000,
1051 .cpu_name = "G2_LE",
Kumar Gala10b35d92005-09-23 14:08:58 -05001052 .cpu_features = CPU_FTRS_G2_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +10001053 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001054 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001055 .icache_bsize = 32,
1056 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001057 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001058 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001059 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001060 },
Kim Phillips6c4a2502006-10-02 20:10:24 -05001061 { /* e300c1 (a 603e core, plus some) on 83xx */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001062 .pvr_mask = 0x7fff0000,
1063 .pvr_value = 0x00830000,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001064 .cpu_name = "e300c1",
Kumar Gala10b35d92005-09-23 14:08:58 -05001065 .cpu_features = CPU_FTRS_E300,
Stephen Rothwell49209602005-10-12 15:55:09 +10001066 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001067 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001068 .icache_bsize = 32,
1069 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001070 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001071 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001072 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001073 },
Kim Phillips6c4a2502006-10-02 20:10:24 -05001074 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
1075 .pvr_mask = 0x7fff0000,
1076 .pvr_value = 0x00840000,
1077 .cpu_name = "e300c2",
Kim Phillipsaa42c692006-12-08 02:43:30 -06001078 .cpu_features = CPU_FTRS_E300C2,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001079 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001080 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001081 .icache_bsize = 32,
1082 .dcache_bsize = 32,
1083 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001084 .machine_check = machine_check_generic,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001085 .platform = "ppc603",
1086 },
Li Yanga58d5242007-10-19 19:38:42 +08001087 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
Scott Wood57933f82006-12-01 12:57:05 -06001088 .pvr_mask = 0x7fff0000,
1089 .pvr_value = 0x00850000,
1090 .cpu_name = "e300c3",
1091 .cpu_features = CPU_FTRS_E300,
1092 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001093 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Scott Wood57933f82006-12-01 12:57:05 -06001094 .icache_bsize = 32,
1095 .dcache_bsize = 32,
1096 .cpu_setup = __setup_cpu_603,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001097 .num_pmcs = 4,
1098 .oprofile_cpu_type = "ppc/e300",
1099 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Scott Wood57933f82006-12-01 12:57:05 -06001100 .platform = "ppc603",
1101 },
Li Yanga58d5242007-10-19 19:38:42 +08001102 { /* e300c4 (e300c1, plus one IU) */
1103 .pvr_mask = 0x7fff0000,
1104 .pvr_value = 0x00860000,
1105 .cpu_name = "e300c4",
1106 .cpu_features = CPU_FTRS_E300,
1107 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001108 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Li Yanga58d5242007-10-19 19:38:42 +08001109 .icache_bsize = 32,
1110 .dcache_bsize = 32,
1111 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001112 .machine_check = machine_check_generic,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001113 .num_pmcs = 4,
1114 .oprofile_cpu_type = "ppc/e300",
1115 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Li Yanga58d5242007-10-19 19:38:42 +08001116 .platform = "ppc603",
1117 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001118 { /* default match, we assume split I/D cache & TB (non-601)... */
1119 .pvr_mask = 0x00000000,
1120 .pvr_value = 0x00000000,
1121 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -05001122 .cpu_features = CPU_FTRS_CLASSIC32,
Stephen Rothwell49209602005-10-12 15:55:09 +10001123 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001124 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001125 .icache_bsize = 32,
1126 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001127 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001128 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001129 },
1130#endif /* CLASSIC_PPC */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001131#ifdef CONFIG_8xx
1132 { /* 8xx */
1133 .pvr_mask = 0xffff0000,
1134 .pvr_value = 0x00500000,
1135 .cpu_name = "8xx",
1136 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1137 * if the 8xx code is there.... */
Kumar Gala10b35d92005-09-23 14:08:58 -05001138 .cpu_features = CPU_FTRS_8XX,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001139 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001140 .mmu_features = MMU_FTR_TYPE_8xx,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001141 .icache_bsize = 16,
1142 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001143 .platform = "ppc823",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001144 },
1145#endif /* CONFIG_8xx */
1146#ifdef CONFIG_40x
1147 { /* 403GC */
1148 .pvr_mask = 0xffffff00,
1149 .pvr_value = 0x00200200,
1150 .cpu_name = "403GC",
Kumar Gala10b35d92005-09-23 14:08:58 -05001151 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001152 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001153 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001154 .icache_bsize = 16,
1155 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001156 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001157 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001158 },
1159 { /* 403GCX */
1160 .pvr_mask = 0xffffff00,
1161 .pvr_value = 0x00201400,
1162 .cpu_name = "403GCX",
Kumar Gala10b35d92005-09-23 14:08:58 -05001163 .cpu_features = CPU_FTRS_40X,
Paul Mackerras98599012005-10-22 16:51:34 +10001164 .cpu_user_features = PPC_FEATURE_32 |
1165 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001166 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001167 .icache_bsize = 16,
1168 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001169 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001170 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001171 },
1172 { /* 403G ?? */
1173 .pvr_mask = 0xffff0000,
1174 .pvr_value = 0x00200000,
1175 .cpu_name = "403G ??",
Kumar Gala10b35d92005-09-23 14:08:58 -05001176 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001177 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001178 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001179 .icache_bsize = 16,
1180 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001181 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001182 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001183 },
1184 { /* 405GP */
1185 .pvr_mask = 0xffff0000,
1186 .pvr_value = 0x40110000,
1187 .cpu_name = "405GP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001188 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001189 .cpu_user_features = PPC_FEATURE_32 |
1190 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001191 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001192 .icache_bsize = 32,
1193 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001194 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001195 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001196 },
1197 { /* STB 03xxx */
1198 .pvr_mask = 0xffff0000,
1199 .pvr_value = 0x40130000,
1200 .cpu_name = "STB03xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001201 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001202 .cpu_user_features = PPC_FEATURE_32 |
1203 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001204 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001205 .icache_bsize = 32,
1206 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001207 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001208 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001209 },
1210 { /* STB 04xxx */
1211 .pvr_mask = 0xffff0000,
1212 .pvr_value = 0x41810000,
1213 .cpu_name = "STB04xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001214 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001215 .cpu_user_features = PPC_FEATURE_32 |
1216 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001217 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001218 .icache_bsize = 32,
1219 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001220 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001221 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001222 },
1223 { /* NP405L */
1224 .pvr_mask = 0xffff0000,
1225 .pvr_value = 0x41610000,
1226 .cpu_name = "NP405L",
Kumar Gala10b35d92005-09-23 14:08:58 -05001227 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001228 .cpu_user_features = PPC_FEATURE_32 |
1229 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001230 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001231 .icache_bsize = 32,
1232 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001233 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001234 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001235 },
1236 { /* NP4GS3 */
1237 .pvr_mask = 0xffff0000,
1238 .pvr_value = 0x40B10000,
1239 .cpu_name = "NP4GS3",
Kumar Gala10b35d92005-09-23 14:08:58 -05001240 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001241 .cpu_user_features = PPC_FEATURE_32 |
1242 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001243 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001244 .icache_bsize = 32,
1245 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001246 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001247 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001248 },
1249 { /* NP405H */
1250 .pvr_mask = 0xffff0000,
1251 .pvr_value = 0x41410000,
1252 .cpu_name = "NP405H",
Kumar Gala10b35d92005-09-23 14:08:58 -05001253 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001254 .cpu_user_features = PPC_FEATURE_32 |
1255 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001256 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001257 .icache_bsize = 32,
1258 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001259 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001260 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001261 },
1262 { /* 405GPr */
1263 .pvr_mask = 0xffff0000,
1264 .pvr_value = 0x50910000,
1265 .cpu_name = "405GPr",
Kumar Gala10b35d92005-09-23 14:08:58 -05001266 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001267 .cpu_user_features = PPC_FEATURE_32 |
1268 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001269 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001270 .icache_bsize = 32,
1271 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001272 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001273 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001274 },
1275 { /* STBx25xx */
1276 .pvr_mask = 0xffff0000,
1277 .pvr_value = 0x51510000,
1278 .cpu_name = "STBx25xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001279 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001280 .cpu_user_features = PPC_FEATURE_32 |
1281 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001282 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001283 .icache_bsize = 32,
1284 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001285 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001286 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001287 },
1288 { /* 405LP */
1289 .pvr_mask = 0xffff0000,
1290 .pvr_value = 0x41F10000,
1291 .cpu_name = "405LP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001292 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001293 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001294 .mmu_features = MMU_FTR_TYPE_40x,
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 = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001299 },
1300 { /* Xilinx Virtex-II Pro */
Grant C. Likely72646c72006-01-19 01:13:20 -07001301 .pvr_mask = 0xfffff000,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001302 .pvr_value = 0x20010000,
1303 .cpu_name = "Virtex-II Pro",
Kumar Gala10b35d92005-09-23 14:08:58 -05001304 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001305 .cpu_user_features = PPC_FEATURE_32 |
1306 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001307 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001308 .icache_bsize = 32,
1309 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001310 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001311 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001312 },
Grant C. Likely72646c72006-01-19 01:13:20 -07001313 { /* Xilinx Virtex-4 FX */
1314 .pvr_mask = 0xfffff000,
1315 .pvr_value = 0x20011000,
1316 .cpu_name = "Virtex-4 FX",
1317 .cpu_features = CPU_FTRS_40X,
1318 .cpu_user_features = PPC_FEATURE_32 |
1319 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001320 .mmu_features = MMU_FTR_TYPE_40x,
Grant C. Likely72646c72006-01-19 01:13:20 -07001321 .icache_bsize = 32,
1322 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001323 .machine_check = machine_check_4xx,
Peter Bergner838fdb42006-09-14 14:18:38 -05001324 .platform = "ppc405",
Grant C. Likely72646c72006-01-19 01:13:20 -07001325 },
Eugene Suroveginad95d602005-06-07 13:22:09 -07001326 { /* 405EP */
1327 .pvr_mask = 0xffff0000,
1328 .pvr_value = 0x51210000,
1329 .cpu_name = "405EP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001330 .cpu_features = CPU_FTRS_40X,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001331 .cpu_user_features = PPC_FEATURE_32 |
1332 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001333 .mmu_features = MMU_FTR_TYPE_40x,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001334 .icache_bsize = 32,
1335 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001336 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001337 .platform = "ppc405",
Eugene Suroveginad95d602005-06-07 13:22:09 -07001338 },
Stefan Roese5d8476c2007-10-11 22:08:14 +10001339 { /* 405EX */
Stefan Roeseb676d842008-01-15 18:09:15 +11001340 .pvr_mask = 0xffff0004,
1341 .pvr_value = 0x12910004,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001342 .cpu_name = "405EX",
1343 .cpu_features = CPU_FTRS_40X,
1344 .cpu_user_features = PPC_FEATURE_32 |
1345 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001346 .mmu_features = MMU_FTR_TYPE_40x,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001347 .icache_bsize = 32,
1348 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001349 .machine_check = machine_check_4xx,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001350 .platform = "ppc405",
1351 },
Stefan Roeseb676d842008-01-15 18:09:15 +11001352 { /* 405EXr */
1353 .pvr_mask = 0xffff0004,
1354 .pvr_value = 0x12910000,
1355 .cpu_name = "405EXr",
1356 .cpu_features = CPU_FTRS_40X,
1357 .cpu_user_features = PPC_FEATURE_32 |
1358 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001359 .mmu_features = MMU_FTR_TYPE_40x,
Stefan Roeseb676d842008-01-15 18:09:15 +11001360 .icache_bsize = 32,
1361 .dcache_bsize = 32,
1362 .machine_check = machine_check_4xx,
1363 .platform = "ppc405",
1364 },
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001365 {
1366 /* 405EZ */
1367 .pvr_mask = 0xffff0000,
1368 .pvr_value = 0x41510000,
1369 .cpu_name = "405EZ",
1370 .cpu_features = CPU_FTRS_40X,
1371 .cpu_user_features = PPC_FEATURE_32 |
1372 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001373 .mmu_features = MMU_FTR_TYPE_40x,
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001374 .icache_bsize = 32,
1375 .dcache_bsize = 32,
1376 .machine_check = machine_check_4xx,
1377 .platform = "ppc405",
1378 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001379 { /* default match */
1380 .pvr_mask = 0x00000000,
1381 .pvr_value = 0x00000000,
1382 .cpu_name = "(generic 40x PPC)",
1383 .cpu_features = CPU_FTRS_40X,
1384 .cpu_user_features = PPC_FEATURE_32 |
1385 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001386 .mmu_features = MMU_FTR_TYPE_40x,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001387 .icache_bsize = 32,
1388 .dcache_bsize = 32,
1389 .machine_check = machine_check_4xx,
1390 .platform = "ppc405",
1391 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001392
1393#endif /* CONFIG_40x */
1394#ifdef CONFIG_44x
Matt Porterc9cf73a2005-07-31 22:34:52 -07001395 {
1396 .pvr_mask = 0xf0000fff,
1397 .pvr_value = 0x40000850,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001398 .cpu_name = "440GR Rev. A",
1399 .cpu_features = CPU_FTRS_44X,
1400 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001401 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001402 .icache_bsize = 32,
1403 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001404 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001405 .platform = "ppc440",
1406 },
1407 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1408 .pvr_mask = 0xf0000fff,
1409 .pvr_value = 0x40000858,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001410 .cpu_name = "440EP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001411 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001412 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001413 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001414 .icache_bsize = 32,
1415 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001416 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001417 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001418 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001419 },
1420 {
1421 .pvr_mask = 0xf0000fff,
1422 .pvr_value = 0x400008d3,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001423 .cpu_name = "440GR Rev. B",
1424 .cpu_features = CPU_FTRS_44X,
1425 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001426 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001427 .icache_bsize = 32,
1428 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001429 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001430 .platform = "ppc440",
1431 },
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001432 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1433 .pvr_mask = 0xf0000ff7,
1434 .pvr_value = 0x400008d4,
1435 .cpu_name = "440EP Rev. C",
1436 .cpu_features = CPU_FTRS_44X,
1437 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001438 .mmu_features = MMU_FTR_TYPE_44x,
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001439 .icache_bsize = 32,
1440 .dcache_bsize = 32,
1441 .cpu_setup = __setup_cpu_440ep,
1442 .machine_check = machine_check_4xx,
1443 .platform = "ppc440",
1444 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001445 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1446 .pvr_mask = 0xf0000fff,
1447 .pvr_value = 0x400008db,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001448 .cpu_name = "440EP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001449 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001450 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001451 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001452 .icache_bsize = 32,
1453 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001454 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001455 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001456 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001457 },
Valentine Barshak15fc9932007-08-29 17:40:30 +04001458 { /* 440GRX */
1459 .pvr_mask = 0xf0000ffb,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001460 .pvr_value = 0x200008D0,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001461 .cpu_name = "440GRX",
1462 .cpu_features = CPU_FTRS_44X,
1463 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001464 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001465 .icache_bsize = 32,
1466 .dcache_bsize = 32,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001467 .cpu_setup = __setup_cpu_440grx,
Valentine Barshakb2be3b12007-12-22 03:22:23 +11001468 .machine_check = machine_check_440A,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001469 .platform = "ppc440",
Valentine Barshak15fc9932007-08-29 17:40:30 +04001470 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001471 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1472 .pvr_mask = 0xf0000ffb,
1473 .pvr_value = 0x200008D8,
1474 .cpu_name = "440EPX",
1475 .cpu_features = CPU_FTRS_44X,
1476 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001477 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001478 .icache_bsize = 32,
1479 .dcache_bsize = 32,
1480 .cpu_setup = __setup_cpu_440epx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001481 .machine_check = machine_check_440A,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001482 .platform = "ppc440",
1483 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001484 { /* 440GP Rev. B */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001485 .pvr_mask = 0xf0000fff,
1486 .pvr_value = 0x40000440,
1487 .cpu_name = "440GP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001488 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001489 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001490 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001491 .icache_bsize = 32,
1492 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001493 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001494 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001495 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001496 { /* 440GP Rev. C */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001497 .pvr_mask = 0xf0000fff,
1498 .pvr_value = 0x40000481,
1499 .cpu_name = "440GP Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001500 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001501 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001502 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001503 .icache_bsize = 32,
1504 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001505 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001506 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001507 },
1508 { /* 440GX Rev. A */
1509 .pvr_mask = 0xf0000fff,
1510 .pvr_value = 0x50000850,
1511 .cpu_name = "440GX Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001512 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001513 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001514 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001515 .icache_bsize = 32,
1516 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001517 .cpu_setup = __setup_cpu_440gx,
1518 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001519 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001520 },
1521 { /* 440GX Rev. B */
1522 .pvr_mask = 0xf0000fff,
1523 .pvr_value = 0x50000851,
1524 .cpu_name = "440GX Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001525 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001526 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001527 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001528 .icache_bsize = 32,
1529 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001530 .cpu_setup = __setup_cpu_440gx,
1531 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001532 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001533 },
1534 { /* 440GX Rev. C */
1535 .pvr_mask = 0xf0000fff,
1536 .pvr_value = 0x50000892,
1537 .cpu_name = "440GX Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001538 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001539 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001540 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001541 .icache_bsize = 32,
1542 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001543 .cpu_setup = __setup_cpu_440gx,
1544 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001545 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001546 },
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001547 { /* 440GX Rev. F */
1548 .pvr_mask = 0xf0000fff,
1549 .pvr_value = 0x50000894,
1550 .cpu_name = "440GX Rev. F",
Kumar Gala10b35d92005-09-23 14:08:58 -05001551 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001552 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001553 .mmu_features = MMU_FTR_TYPE_44x,
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001554 .icache_bsize = 32,
1555 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001556 .cpu_setup = __setup_cpu_440gx,
1557 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001558 .platform = "ppc440",
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001559 },
Matt Porter656de7e2005-09-03 15:55:42 -07001560 { /* 440SP Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001561 .pvr_mask = 0xfff00fff,
1562 .pvr_value = 0x53200891,
Matt Porter656de7e2005-09-03 15:55:42 -07001563 .cpu_name = "440SP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001564 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001565 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001566 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porter656de7e2005-09-03 15:55:42 -07001567 .icache_bsize = 32,
1568 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001569 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001570 .platform = "ppc440",
Matt Porter656de7e2005-09-03 15:55:42 -07001571 },
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001572 { /* 440SPe Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001573 .pvr_mask = 0xfff00fff,
1574 .pvr_value = 0x53400890,
1575 .cpu_name = "440SPe Rev. A",
1576 .cpu_features = CPU_FTRS_44X,
1577 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001578 .mmu_features = MMU_FTR_TYPE_44x,
Roland Dreier333e6152007-06-16 05:36:32 +10001579 .icache_bsize = 32,
1580 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001581 .cpu_setup = __setup_cpu_440spe,
1582 .machine_check = machine_check_440A,
Roland Dreier333e6152007-06-16 05:36:32 +10001583 .platform = "ppc440",
1584 },
1585 { /* 440SPe Rev. B */
1586 .pvr_mask = 0xfff00fff,
1587 .pvr_value = 0x53400891,
1588 .cpu_name = "440SPe Rev. B",
Kumar Galaa147c582006-12-08 02:34:38 -06001589 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001590 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001591 .mmu_features = MMU_FTR_TYPE_44x,
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001592 .icache_bsize = 32,
1593 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001594 .cpu_setup = __setup_cpu_440spe,
1595 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001596 .platform = "ppc440",
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001597 },
John Linn23e72372008-07-01 09:42:07 -07001598 { /* 440 in Xilinx Virtex-5 FXT */
1599 .pvr_mask = 0xfffffff0,
1600 .pvr_value = 0x7ff21910,
1601 .cpu_name = "440 in Virtex-5 FXT",
1602 .cpu_features = CPU_FTRS_44X,
1603 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001604 .mmu_features = MMU_FTR_TYPE_44x,
John Linn23e72372008-07-01 09:42:07 -07001605 .icache_bsize = 32,
1606 .dcache_bsize = 32,
Grant Likely640d17d2008-12-04 05:39:55 +00001607 .cpu_setup = __setup_cpu_440x5,
1608 .machine_check = machine_check_440A,
John Linn23e72372008-07-01 09:42:07 -07001609 .platform = "ppc440",
1610 },
Stefan Roese464076a2008-02-24 08:07:41 +11001611 { /* 460EX */
1612 .pvr_mask = 0xffff0002,
1613 .pvr_value = 0x13020002,
1614 .cpu_name = "460EX",
Benjamin Herrenschmidt6d2170b2008-12-18 19:13:22 +00001615 .cpu_features = CPU_FTRS_440x6,
Stefan Roese464076a2008-02-24 08:07:41 +11001616 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001617 .mmu_features = MMU_FTR_TYPE_44x,
Stefan Roese464076a2008-02-24 08:07:41 +11001618 .icache_bsize = 32,
1619 .dcache_bsize = 32,
1620 .cpu_setup = __setup_cpu_460ex,
1621 .machine_check = machine_check_440A,
1622 .platform = "ppc440",
1623 },
1624 { /* 460GT */
1625 .pvr_mask = 0xffff0002,
1626 .pvr_value = 0x13020000,
1627 .cpu_name = "460GT",
Benjamin Herrenschmidt6d2170b2008-12-18 19:13:22 +00001628 .cpu_features = CPU_FTRS_440x6,
Josh Boyer939e6222008-06-11 07:52:40 -04001629 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001630 .mmu_features = MMU_FTR_TYPE_44x,
Stefan Roese464076a2008-02-24 08:07:41 +11001631 .icache_bsize = 32,
1632 .dcache_bsize = 32,
Josh Boyer939e6222008-06-11 07:52:40 -04001633 .cpu_setup = __setup_cpu_460gt,
Stefan Roese464076a2008-02-24 08:07:41 +11001634 .machine_check = machine_check_440A,
1635 .platform = "ppc440",
1636 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001637 { /* default match */
1638 .pvr_mask = 0x00000000,
1639 .pvr_value = 0x00000000,
1640 .cpu_name = "(generic 44x PPC)",
1641 .cpu_features = CPU_FTRS_44X,
1642 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001643 .mmu_features = MMU_FTR_TYPE_44x,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001644 .icache_bsize = 32,
1645 .dcache_bsize = 32,
1646 .machine_check = machine_check_4xx,
1647 .platform = "ppc440",
1648 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001649#endif /* CONFIG_44x */
Josh Boyere3e414b2007-12-24 08:44:47 -06001650#ifdef CONFIG_E200
Stephen Rothwell49209602005-10-12 15:55:09 +10001651 { /* e200z5 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001652 .pvr_mask = 0xfff00000,
1653 .pvr_value = 0x81000000,
1654 .cpu_name = "e200z5",
1655 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001656 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001657 .cpu_user_features = COMMON_USER_BOOKE |
1658 PPC_FEATURE_HAS_EFP_SINGLE |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001659 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001660 .mmu_features = MMU_FTR_TYPE_FSL_E,
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001661 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001662 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001663 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001664 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001665 { /* e200z6 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001666 .pvr_mask = 0xfff00000,
1667 .pvr_value = 0x81100000,
1668 .cpu_name = "e200z6",
1669 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001670 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001671 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001672 PPC_FEATURE_HAS_SPE_COMP |
1673 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001674 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001675 .mmu_features = MMU_FTR_TYPE_FSL_E,
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001676 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001677 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001678 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001679 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001680 { /* default match */
1681 .pvr_mask = 0x00000000,
1682 .pvr_value = 0x00000000,
1683 .cpu_name = "(generic E200 PPC)",
1684 .cpu_features = CPU_FTRS_E200,
1685 .cpu_user_features = COMMON_USER_BOOKE |
1686 PPC_FEATURE_HAS_EFP_SINGLE |
1687 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001688 .mmu_features = MMU_FTR_TYPE_FSL_E,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001689 .dcache_bsize = 32,
1690 .machine_check = machine_check_e200,
1691 .platform = "ppc5554",
Paul Mackerras516c8be2008-05-12 14:20:35 +10001692 }
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001693#endif /* CONFIG_E200 */
1694#ifdef CONFIG_E500
Stephen Rothwell49209602005-10-12 15:55:09 +10001695 { /* e500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001696 .pvr_mask = 0xffff0000,
1697 .pvr_value = 0x80200000,
1698 .cpu_name = "e500",
Kumar Gala10b35d92005-09-23 14:08:58 -05001699 .cpu_features = CPU_FTRS_E500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001700 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001701 PPC_FEATURE_HAS_SPE_COMP |
1702 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001703 .mmu_features = MMU_FTR_TYPE_FSL_E,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001704 .icache_bsize = 32,
1705 .dcache_bsize = 32,
1706 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001707 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001708 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001709 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001710 .platform = "ppc8540",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001711 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001712 { /* e500v2 */
Kumar Gala5b37b702005-06-21 17:15:18 -07001713 .pvr_mask = 0xffff0000,
1714 .pvr_value = 0x80210000,
1715 .cpu_name = "e500v2",
Kumar Gala10b35d92005-09-23 14:08:58 -05001716 .cpu_features = CPU_FTRS_E500_2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001717 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001718 PPC_FEATURE_HAS_SPE_COMP |
1719 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1720 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001721 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS,
Kumar Gala5b37b702005-06-21 17:15:18 -07001722 .icache_bsize = 32,
1723 .dcache_bsize = 32,
1724 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001725 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001726 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001727 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001728 .platform = "ppc8548",
Kumar Gala5b37b702005-06-21 17:15:18 -07001729 },
Kumar Gala3dfa8772008-06-16 09:41:32 -05001730 { /* e500mc */
1731 .pvr_mask = 0xffff0000,
1732 .pvr_value = 0x80230000,
1733 .cpu_name = "e500mc",
Kumar Gala3dfa8772008-06-16 09:41:32 -05001734 .cpu_features = CPU_FTRS_E500MC,
1735 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001736 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS,
Kumar Gala3dfa8772008-06-16 09:41:32 -05001737 .icache_bsize = 64,
1738 .dcache_bsize = 64,
1739 .num_pmcs = 4,
1740 .oprofile_cpu_type = "ppc/e500", /* xxx - galak, e500mc? */
1741 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1742 .machine_check = machine_check_e500,
1743 .platform = "ppce500mc",
1744 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001745 { /* default match */
1746 .pvr_mask = 0x00000000,
1747 .pvr_value = 0x00000000,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001748 .cpu_name = "(generic E500 PPC)",
1749 .cpu_features = CPU_FTRS_E500,
1750 .cpu_user_features = COMMON_USER_BOOKE |
1751 PPC_FEATURE_HAS_SPE_COMP |
1752 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001753 .mmu_features = MMU_FTR_TYPE_FSL_E,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001754 .icache_bsize = 32,
1755 .dcache_bsize = 32,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001756 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001757 .platform = "powerpc",
Paul Mackerras516c8be2008-05-12 14:20:35 +10001758 }
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001759#endif /* CONFIG_E500 */
Stephen Rothwell49209602005-10-12 15:55:09 +10001760#endif /* CONFIG_PPC32 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001761};
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001762
Paul Mackerras87a72f92007-10-04 14:18:01 +10001763static struct cpu_spec the_cpu_spec;
1764
1765struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001766{
1767 struct cpu_spec *s = cpu_specs;
Paul Mackerras87a72f92007-10-04 14:18:01 +10001768 struct cpu_spec *t = &the_cpu_spec;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001769 int i;
1770
1771 s = PTRRELOC(s);
Paul Mackerras87a72f92007-10-04 14:18:01 +10001772 t = PTRRELOC(t);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001773
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001774 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
1775 if ((pvr & s->pvr_mask) == s->pvr_value) {
Paul Mackerras87a72f92007-10-04 14:18:01 +10001776 /*
1777 * If we are overriding a previous value derived
1778 * from the real PVR with a new value obtained
1779 * using a logical PVR value, don't modify the
1780 * performance monitor fields.
1781 */
1782 if (t->num_pmcs && !s->num_pmcs) {
1783 t->cpu_name = s->cpu_name;
1784 t->cpu_features = s->cpu_features;
1785 t->cpu_user_features = s->cpu_user_features;
1786 t->icache_bsize = s->icache_bsize;
1787 t->dcache_bsize = s->dcache_bsize;
1788 t->cpu_setup = s->cpu_setup;
1789 t->cpu_restore = s->cpu_restore;
1790 t->platform = s->platform;
Torez Smith79e25ba2008-07-18 06:42:07 +10001791 /*
1792 * If we have passed through this logic once
1793 * before and have pulled the default case
1794 * because the real PVR was not found inside
1795 * cpu_specs[], then we are possibly running in
1796 * compatibility mode. In that case, let the
1797 * oprofiler know which set of compatibility
1798 * counters to pull from by making sure the
1799 * oprofile_cpu_type string is set to that of
1800 * compatibility mode. If the oprofile_cpu_type
1801 * already has a value, then we are possibly
1802 * overriding a real PVR with a logical one, and,
1803 * in that case, keep the current value for
1804 * oprofile_cpu_type.
1805 */
1806 if (t->oprofile_cpu_type == NULL)
1807 t->oprofile_cpu_type = s->oprofile_cpu_type;
Paul Mackerras87a72f92007-10-04 14:18:01 +10001808 } else
1809 *t = *s;
1810 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
Nathan Lynch9115d132008-07-16 09:58:51 +10001811
1812 /*
1813 * Set the base platform string once; assumes
1814 * we're called with real pvr first.
1815 */
Nathan Lynchfc532f82008-07-25 17:50:30 -05001816 if (*PTRRELOC(&powerpc_base_platform) == NULL)
1817 *PTRRELOC(&powerpc_base_platform) = t->platform;
Nathan Lynch9115d132008-07-16 09:58:51 +10001818
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001819#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
Stefan Roese464076a2008-02-24 08:07:41 +11001820 /* ppc64 and booke expect identify_cpu to also call
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001821 * setup_cpu for that processor. I will consolidate
1822 * that at a later time, for now, just use #ifdef.
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001823 * we also don't need to PTRRELOC the function pointer
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001824 * on ppc64 and booke as we are running at 0 in real
1825 * mode on ppc64 and reloc_offset is always 0 on booke.
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001826 */
1827 if (s->cpu_setup) {
1828 s->cpu_setup(offset, s);
1829 }
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001830#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001831 return s;
1832 }
1833 BUG();
1834 return NULL;
1835}