blob: 19599ef352bc89ddb8039a65cf22419d82c25c9f [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>
Paul Gortmaker4b16f8e2011-07-22 18:24:23 -040017#include <linux/export.h>
Kumar Gala400d2212005-09-27 15:13:12 -050018
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>
David Howellsae3a1972012-03-28 18:30:02 +010023#include <asm/setup.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070024
Kumar Gala400d2212005-09-27 15:13:12 -050025struct cpu_spec* cur_cpu_spec = NULL;
Stephen Rothwell49209602005-10-12 15:55:09 +100026EXPORT_SYMBOL(cur_cpu_spec);
Linus Torvalds1da177e2005-04-16 15:20:36 -070027
Nathan Lynch9115d132008-07-16 09:58:51 +100028/* The platform string corresponding to the real PVR */
29const char *powerpc_base_platform;
30
Stephen Rothwell49209602005-10-12 15:55:09 +100031/* NOTE:
32 * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's
33 * the responsibility of the appropriate CPU save/restore functions to
34 * eventually copy these settings over. Those save/restore aren't yet
35 * part of the cputable though. That has to be fixed for both ppc32
36 * and ppc64
37 */
Geoff Levandb26f1002006-05-19 14:24:18 +100038#ifdef CONFIG_PPC32
Kumar Gala105c31d2009-01-08 08:31:20 -060039extern void __setup_cpu_e200(unsigned long offset, struct cpu_spec* spec);
40extern void __setup_cpu_e500v1(unsigned long offset, struct cpu_spec* spec);
41extern void __setup_cpu_e500v2(unsigned long offset, struct cpu_spec* spec);
42extern void __setup_cpu_e500mc(unsigned long offset, struct cpu_spec* spec);
Valentine Barshak81127532007-09-22 00:46:57 +100043extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
44extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110045extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
Valentine Barshak340ffd22007-09-22 00:50:09 +100046extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110047extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
Grant Likely640d17d2008-12-04 05:39:55 +000048extern void __setup_cpu_440x5(unsigned long offset, struct cpu_spec* spec);
Stefan Roese464076a2008-02-24 08:07:41 +110049extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec);
Josh Boyer939e6222008-06-11 07:52:40 -040050extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec);
Madhulika Madishetty6c712092009-02-05 13:31:36 +000051extern void __setup_cpu_460sx(unsigned long offset, struct cpu_spec *spec);
Tirumala Marri6edc3232010-09-13 13:26:11 +000052extern void __setup_cpu_apm821xx(unsigned long offset, struct cpu_spec *spec);
Kumar Gala400d2212005-09-27 15:13:12 -050053extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
54extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
55extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
56extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
57extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
58extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
59extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
60extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell49209602005-10-12 15:55:09 +100061#endif /* CONFIG_PPC32 */
Olof Johanssonf39b7a52006-08-11 00:07:08 -050062#ifdef CONFIG_PPC64
Kumar Gala400d2212005-09-27 15:13:12 -050063extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
Olof Johansson5b43d202006-10-04 23:41:41 -050064extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
Olof Johansson11999192007-02-04 16:36:51 -060065extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
Benjamin Herrenschmidt76b4eda2011-04-14 22:32:01 +000066extern void __setup_cpu_a2(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell40d244d2007-02-12 22:10:48 +110067extern void __restore_cpu_pa6t(void);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050068extern void __restore_cpu_ppc970(void);
Michael Neulinge952e6c2008-06-18 10:47:26 +100069extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec);
70extern void __restore_cpu_power7(void);
Michael Neulingaec937b2012-10-30 19:34:14 +000071extern void __setup_cpu_power8(unsigned long offset, struct cpu_spec* spec);
72extern void __restore_cpu_power8(void);
Benjamin Herrenschmidt76b4eda2011-04-14 22:32:01 +000073extern void __restore_cpu_a2(void);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050074#endif /* CONFIG_PPC64 */
Kumar Gala4490c062010-10-08 08:32:11 -050075#if defined(CONFIG_E500)
76extern void __setup_cpu_e5500(unsigned long offset, struct cpu_spec* spec);
77extern void __restore_cpu_e5500(void);
78#endif /* CONFIG_E500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070079
Linus Torvalds1da177e2005-04-16 15:20:36 -070080/* This table only contains "desktop" CPUs, it need to be filled with embedded
81 * ones as well...
82 */
Stephen Rothwell49209602005-10-12 15:55:09 +100083#define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
84 PPC_FEATURE_HAS_MMU)
85#define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +110086#define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +110087#define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
88 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
89#define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
90 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
Anton Blanchard03054d52006-04-29 09:51:06 +100091#define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
Paul Mackerrasfab5db92006-06-07 16:14:40 +100092 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
Nathan Lynch0f473312008-07-10 01:06:57 +100093 PPC_FEATURE_TRUE_LE | \
94 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Michael Neulinge952e6c2008-06-18 10:47:26 +100095#define COMMON_USER_POWER7 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
96 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
Nathan Lynch0f473312008-07-10 01:06:57 +100097 PPC_FEATURE_TRUE_LE | \
98 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Michael Neuling71e18492012-10-30 19:34:15 +000099#define COMMON_USER_POWER8 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
100 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
101 PPC_FEATURE_TRUE_LE | \
102 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500103#define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
104 PPC_FEATURE_TRUE_LE | \
105 PPC_FEATURE_HAS_ALTIVEC_COMP)
Kumar Galaf45c4482009-08-18 19:08:30 +0000106#ifdef CONFIG_PPC_BOOK3E_64
107#define COMMON_USER_BOOKE (COMMON_USER_PPC64 | PPC_FEATURE_BOOKE)
108#else
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100109#define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
110 PPC_FEATURE_BOOKE)
Kumar Galaf45c4482009-08-18 19:08:30 +0000111#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -0700112
Paul Mackerras87a72f92007-10-04 14:18:01 +1000113static struct cpu_spec __initdata cpu_specs[] = {
Benjamin Herrenschmidt2d27cfd2009-07-23 23:15:59 +0000114#ifdef CONFIG_PPC_BOOK3S_64
Stephen Rothwell49209602005-10-12 15:55:09 +1000115 { /* Power3 */
116 .pvr_mask = 0xffff0000,
117 .pvr_value = 0x00400000,
118 .cpu_name = "POWER3 (630)",
119 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000120 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000121 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000122 .icache_bsize = 128,
123 .dcache_bsize = 128,
124 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600125 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000126 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000127 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100128 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +1000129 },
130 { /* Power3+ */
131 .pvr_mask = 0xffff0000,
132 .pvr_value = 0x00410000,
133 .cpu_name = "POWER3 (630+)",
134 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000135 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000136 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000137 .icache_bsize = 128,
138 .dcache_bsize = 128,
139 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600140 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000141 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000142 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100143 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +1000144 },
145 { /* Northstar */
146 .pvr_mask = 0xffff0000,
147 .pvr_value = 0x00330000,
148 .cpu_name = "RS64-II (northstar)",
149 .cpu_features = CPU_FTRS_RS64,
150 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000151 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000152 .icache_bsize = 128,
153 .dcache_bsize = 128,
154 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600155 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000156 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000157 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100158 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000159 },
160 { /* Pulsar */
161 .pvr_mask = 0xffff0000,
162 .pvr_value = 0x00340000,
163 .cpu_name = "RS64-III (pulsar)",
164 .cpu_features = CPU_FTRS_RS64,
165 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000166 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000167 .icache_bsize = 128,
168 .dcache_bsize = 128,
169 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600170 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000171 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000172 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100173 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000174 },
175 { /* I-star */
176 .pvr_mask = 0xffff0000,
177 .pvr_value = 0x00360000,
178 .cpu_name = "RS64-III (icestar)",
179 .cpu_features = CPU_FTRS_RS64,
180 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000181 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000182 .icache_bsize = 128,
183 .dcache_bsize = 128,
184 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600185 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000186 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000187 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100188 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000189 },
190 { /* S-star */
191 .pvr_mask = 0xffff0000,
192 .pvr_value = 0x00370000,
193 .cpu_name = "RS64-IV (sstar)",
194 .cpu_features = CPU_FTRS_RS64,
195 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000196 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000197 .icache_bsize = 128,
198 .dcache_bsize = 128,
199 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600200 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000201 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000202 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100203 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000204 },
205 { /* Power4 */
206 .pvr_mask = 0xffff0000,
207 .pvr_value = 0x00350000,
208 .cpu_name = "POWER4 (gp)",
209 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100210 .cpu_user_features = COMMON_USER_POWER4,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000211 .mmu_features = MMU_FTRS_POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000212 .icache_bsize = 128,
213 .dcache_bsize = 128,
214 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600215 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000216 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000217 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100218 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000219 },
220 { /* Power4+ */
221 .pvr_mask = 0xffff0000,
222 .pvr_value = 0x00380000,
223 .cpu_name = "POWER4+ (gq)",
224 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100225 .cpu_user_features = COMMON_USER_POWER4,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000226 .mmu_features = MMU_FTRS_POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000227 .icache_bsize = 128,
228 .dcache_bsize = 128,
229 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600230 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000231 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000232 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100233 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000234 },
235 { /* PPC970 */
236 .pvr_mask = 0xffff0000,
237 .pvr_value = 0x00390000,
238 .cpu_name = "PPC970",
239 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100240 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000241 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000242 .mmu_features = MMU_FTRS_PPC970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000243 .icache_bsize = 128,
244 .dcache_bsize = 128,
245 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600246 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000247 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500248 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000249 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000250 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100251 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000252 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000253 { /* PPC970FX */
254 .pvr_mask = 0xffff0000,
255 .pvr_value = 0x003c0000,
256 .cpu_name = "PPC970FX",
Stephen Rothwell49209602005-10-12 15:55:09 +1000257 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100258 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000259 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000260 .mmu_features = MMU_FTRS_PPC970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000261 .icache_bsize = 128,
262 .dcache_bsize = 128,
263 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600264 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000265 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500266 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000267 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000268 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100269 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000270 },
Olof Johansson3546e812007-02-26 00:35:14 -0600271 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
272 .pvr_mask = 0xffffffff,
273 .pvr_value = 0x00440100,
274 .cpu_name = "PPC970MP",
275 .cpu_features = CPU_FTRS_PPC970,
276 .cpu_user_features = COMMON_USER_POWER4 |
277 PPC_FEATURE_HAS_ALTIVEC_COMP,
Benjamin Herrenschmidtd63ac5f2013-03-13 09:55:02 +1100278 .mmu_features = MMU_FTRS_PPC970,
Olof Johansson3546e812007-02-26 00:35:14 -0600279 .icache_bsize = 128,
280 .dcache_bsize = 128,
281 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000282 .pmc_type = PPC_PMC_IBM,
Olof Johansson3546e812007-02-26 00:35:14 -0600283 .cpu_setup = __setup_cpu_ppc970,
284 .cpu_restore = __restore_cpu_ppc970,
285 .oprofile_cpu_type = "ppc64/970MP",
286 .oprofile_type = PPC_OPROFILE_POWER4,
287 .platform = "ppc970",
288 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000289 { /* PPC970MP */
290 .pvr_mask = 0xffff0000,
291 .pvr_value = 0x00440000,
292 .cpu_name = "PPC970MP",
293 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100294 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000295 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000296 .mmu_features = MMU_FTRS_PPC970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000297 .icache_bsize = 128,
298 .dcache_bsize = 128,
Anton Blanchard87af41b2006-05-05 05:44:26 +1000299 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000300 .pmc_type = PPC_PMC_IBM,
Olof Johansson5b43d202006-10-04 23:41:41 -0500301 .cpu_setup = __setup_cpu_ppc970MP,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500302 .cpu_restore = __restore_cpu_ppc970,
Mike Wolffecb3522006-11-21 14:41:54 -0600303 .oprofile_cpu_type = "ppc64/970MP",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000304 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100305 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000306 },
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500307 { /* PPC970GX */
308 .pvr_mask = 0xffff0000,
309 .pvr_value = 0x00450000,
310 .cpu_name = "PPC970GX",
311 .cpu_features = CPU_FTRS_PPC970,
312 .cpu_user_features = COMMON_USER_POWER4 |
313 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000314 .mmu_features = MMU_FTRS_PPC970,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500315 .icache_bsize = 128,
316 .dcache_bsize = 128,
317 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600318 .pmc_type = PPC_PMC_IBM,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500319 .cpu_setup = __setup_cpu_ppc970,
320 .oprofile_cpu_type = "ppc64/970",
321 .oprofile_type = PPC_OPROFILE_POWER4,
322 .platform = "ppc970",
323 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100324 { /* Power5 GR */
Stephen Rothwell49209602005-10-12 15:55:09 +1000325 .pvr_mask = 0xffff0000,
326 .pvr_value = 0x003a0000,
327 .cpu_name = "POWER5 (gr)",
328 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100329 .cpu_user_features = COMMON_USER_POWER5,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000330 .mmu_features = MMU_FTRS_POWER5,
Stephen Rothwell49209602005-10-12 15:55:09 +1000331 .icache_bsize = 128,
332 .dcache_bsize = 128,
333 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600334 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000335 .oprofile_cpu_type = "ppc64/power5",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000336 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000337 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
338 * and above but only works on POWER5 and above
339 */
340 .oprofile_mmcra_sihv = MMCRA_SIHV,
341 .oprofile_mmcra_sipr = MMCRA_SIPR,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100342 .platform = "power5",
Stephen Rothwell49209602005-10-12 15:55:09 +1000343 },
Mike Wolf31a12ce2007-07-10 13:13:47 -0500344 { /* Power5++ */
345 .pvr_mask = 0xffffff00,
346 .pvr_value = 0x003b0300,
347 .cpu_name = "POWER5+ (gs)",
348 .cpu_features = CPU_FTRS_POWER5,
349 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000350 .mmu_features = MMU_FTRS_POWER5,
Mike Wolf31a12ce2007-07-10 13:13:47 -0500351 .icache_bsize = 128,
352 .dcache_bsize = 128,
353 .num_pmcs = 6,
354 .oprofile_cpu_type = "ppc64/power5++",
355 .oprofile_type = PPC_OPROFILE_POWER4,
356 .oprofile_mmcra_sihv = MMCRA_SIHV,
357 .oprofile_mmcra_sipr = MMCRA_SIPR,
358 .platform = "power5+",
359 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100360 { /* Power5 GS */
Stephen Rothwell49209602005-10-12 15:55:09 +1000361 .pvr_mask = 0xffff0000,
362 .pvr_value = 0x003b0000,
Anton Blanchard834608f2006-01-09 15:42:30 +1100363 .cpu_name = "POWER5+ (gs)",
Stephen Rothwell49209602005-10-12 15:55:09 +1000364 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100365 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000366 .mmu_features = MMU_FTRS_POWER5,
Stephen Rothwell49209602005-10-12 15:55:09 +1000367 .icache_bsize = 128,
368 .dcache_bsize = 128,
369 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600370 .pmc_type = PPC_PMC_IBM,
Anton Blanchard834608f2006-01-09 15:42:30 +1100371 .oprofile_cpu_type = "ppc64/power5+",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000372 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000373 .oprofile_mmcra_sihv = MMCRA_SIHV,
374 .oprofile_mmcra_sipr = MMCRA_SIPR,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100375 .platform = "power5+",
Stephen Rothwell49209602005-10-12 15:55:09 +1000376 },
Paul Mackerras974a76f2006-11-10 20:38:53 +1100377 { /* POWER6 in P5+ mode; 2.04-compliant processor */
378 .pvr_mask = 0xffffffff,
379 .pvr_value = 0x0f000001,
380 .cpu_name = "POWER5+",
381 .cpu_features = CPU_FTRS_POWER5,
382 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000383 .mmu_features = MMU_FTRS_POWER5,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100384 .icache_bsize = 128,
385 .dcache_bsize = 128,
Michael Wolf79af6c42009-04-27 06:17:54 +0000386 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
387 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100388 .platform = "power5+",
389 },
Anton Blanchard03054d52006-04-29 09:51:06 +1000390 { /* Power6 */
391 .pvr_mask = 0xffff0000,
392 .pvr_value = 0x003e0000,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100393 .cpu_name = "POWER6 (raw)",
394 .cpu_features = CPU_FTRS_POWER6,
395 .cpu_user_features = COMMON_USER_POWER6 |
396 PPC_FEATURE_POWER6_EXT,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000397 .mmu_features = MMU_FTRS_POWER6,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100398 .icache_bsize = 128,
399 .dcache_bsize = 128,
400 .num_pmcs = 6,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000401 .pmc_type = PPC_PMC_IBM,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100402 .oprofile_cpu_type = "ppc64/power6",
403 .oprofile_type = PPC_OPROFILE_POWER4,
404 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
405 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
406 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
407 POWER6_MMCRA_OTHER,
408 .platform = "power6x",
409 },
410 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
411 .pvr_mask = 0xffffffff,
412 .pvr_value = 0x0f000002,
413 .cpu_name = "POWER6 (architected)",
Anton Blanchard03054d52006-04-29 09:51:06 +1000414 .cpu_features = CPU_FTRS_POWER6,
415 .cpu_user_features = COMMON_USER_POWER6,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000416 .mmu_features = MMU_FTRS_POWER6,
Anton Blanchard03054d52006-04-29 09:51:06 +1000417 .icache_bsize = 128,
418 .dcache_bsize = 128,
Michael Wolf79af6c42009-04-27 06:17:54 +0000419 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
420 .oprofile_type = PPC_OPROFILE_POWER4,
Anton Blanchard03054d52006-04-29 09:51:06 +1000421 .platform = "power6",
422 },
Joel Schopp635f5a62008-06-19 06:18:21 +1000423 { /* 2.06-compliant processor, i.e. Power7 "architected" mode */
424 .pvr_mask = 0xffffffff,
425 .pvr_value = 0x0f000003,
426 .cpu_name = "POWER7 (architected)",
427 .cpu_features = CPU_FTRS_POWER7,
428 .cpu_user_features = COMMON_USER_POWER7,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000429 .mmu_features = MMU_FTRS_POWER7,
Joel Schopp635f5a62008-06-19 06:18:21 +1000430 .icache_bsize = 128,
431 .dcache_bsize = 128,
Michael Wolf79af6c42009-04-27 06:17:54 +0000432 .oprofile_type = PPC_OPROFILE_POWER4,
433 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
Benjamin Herrenschmidt24cc67d2011-01-20 18:50:55 +1100434 .cpu_setup = __setup_cpu_power7,
435 .cpu_restore = __restore_cpu_power7,
Joel Schopp635f5a62008-06-19 06:18:21 +1000436 .platform = "power7",
437 },
Michael Neulingc674e702012-11-08 20:26:42 +0000438 { /* 2.07-compliant processor, i.e. Power8 "architected" mode */
439 .pvr_mask = 0xffffffff,
440 .pvr_value = 0x0f000004,
441 .cpu_name = "POWER8 (architected)",
442 .cpu_features = CPU_FTRS_POWER8,
443 .cpu_user_features = COMMON_USER_POWER8,
444 .mmu_features = MMU_FTRS_POWER8,
445 .icache_bsize = 128,
446 .dcache_bsize = 128,
447 .oprofile_type = PPC_OPROFILE_POWER4,
448 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
449 .cpu_setup = __setup_cpu_power8,
450 .cpu_restore = __restore_cpu_power8,
451 .platform = "power8",
452 },
Michael Neulinge952e6c2008-06-18 10:47:26 +1000453 { /* Power7 */
454 .pvr_mask = 0xffff0000,
455 .pvr_value = 0x003f0000,
Joel Schopp635f5a62008-06-19 06:18:21 +1000456 .cpu_name = "POWER7 (raw)",
Michael Neulinge952e6c2008-06-18 10:47:26 +1000457 .cpu_features = CPU_FTRS_POWER7,
458 .cpu_user_features = COMMON_USER_POWER7,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000459 .mmu_features = MMU_FTRS_POWER7,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000460 .icache_bsize = 128,
461 .dcache_bsize = 128,
462 .num_pmcs = 6,
463 .pmc_type = PPC_PMC_IBM,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000464 .oprofile_cpu_type = "ppc64/power7",
465 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt24cc67d2011-01-20 18:50:55 +1100466 .cpu_setup = __setup_cpu_power7,
467 .cpu_restore = __restore_cpu_power7,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000468 .platform = "power7",
469 },
Michael Neuling6f08cb32010-11-17 18:52:44 +0000470 { /* Power7+ */
471 .pvr_mask = 0xffff0000,
472 .pvr_value = 0x004A0000,
473 .cpu_name = "POWER7+ (raw)",
474 .cpu_features = CPU_FTRS_POWER7,
475 .cpu_user_features = COMMON_USER_POWER7,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000476 .mmu_features = MMU_FTRS_POWER7,
Michael Neuling6f08cb32010-11-17 18:52:44 +0000477 .icache_bsize = 128,
478 .dcache_bsize = 128,
479 .num_pmcs = 6,
480 .pmc_type = PPC_PMC_IBM,
481 .oprofile_cpu_type = "ppc64/power7",
482 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt24cc67d2011-01-20 18:50:55 +1100483 .cpu_setup = __setup_cpu_power7,
484 .cpu_restore = __restore_cpu_power7,
Michael Neuling6f08cb32010-11-17 18:52:44 +0000485 .platform = "power7+",
486 },
Michael Neuling71e18492012-10-30 19:34:15 +0000487 { /* Power8 */
488 .pvr_mask = 0xffff0000,
489 .pvr_value = 0x004b0000,
490 .cpu_name = "POWER8 (raw)",
491 .cpu_features = CPU_FTRS_POWER8,
492 .cpu_user_features = COMMON_USER_POWER8,
493 .mmu_features = MMU_FTRS_POWER8,
494 .icache_bsize = 128,
495 .dcache_bsize = 128,
496 .num_pmcs = 6,
497 .pmc_type = PPC_PMC_IBM,
498 .oprofile_cpu_type = "ppc64/power8",
499 .oprofile_type = PPC_OPROFILE_POWER4,
500 .cpu_setup = __setup_cpu_power8,
501 .cpu_restore = __restore_cpu_power8,
502 .platform = "power8",
503 },
Arnd Bergmannc902be72006-01-04 19:55:53 +0000504 { /* Cell Broadband Engine */
Stephen Rothwell49209602005-10-12 15:55:09 +1000505 .pvr_mask = 0xffff0000,
506 .pvr_value = 0x00700000,
507 .cpu_name = "Cell Broadband Engine",
508 .cpu_features = CPU_FTRS_CELL,
509 .cpu_user_features = COMMON_USER_PPC64 |
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +1100510 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
511 PPC_FEATURE_SMT,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000512 .mmu_features = MMU_FTRS_CELL,
Stephen Rothwell49209602005-10-12 15:55:09 +1000513 .icache_bsize = 128,
514 .dcache_bsize = 128,
Maynard Johnson18f21902006-11-20 18:45:16 +0100515 .num_pmcs = 4,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600516 .pmc_type = PPC_PMC_IBM,
Maynard Johnson18f21902006-11-20 18:45:16 +0100517 .oprofile_cpu_type = "ppc64/cell-be",
518 .oprofile_type = PPC_OPROFILE_CELL,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100519 .platform = "ppc-cell-be",
Stephen Rothwell49209602005-10-12 15:55:09 +1000520 },
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500521 { /* PA Semi PA6T */
522 .pvr_mask = 0x7fff0000,
523 .pvr_value = 0x00900000,
524 .cpu_name = "PA6T",
525 .cpu_features = CPU_FTRS_PA6T,
526 .cpu_user_features = COMMON_USER_PA6T,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000527 .mmu_features = MMU_FTRS_PA6T,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500528 .icache_bsize = 64,
529 .dcache_bsize = 64,
530 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600531 .pmc_type = PPC_PMC_PA6T,
Olof Johansson11999192007-02-04 16:36:51 -0600532 .cpu_setup = __setup_cpu_pa6t,
533 .cpu_restore = __restore_cpu_pa6t,
Olof Johansson25fc5302007-04-18 16:38:21 +1000534 .oprofile_cpu_type = "ppc64/pa6t",
535 .oprofile_type = PPC_OPROFILE_PA6T,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500536 .platform = "pa6t",
537 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000538 { /* default match */
539 .pvr_mask = 0x00000000,
540 .pvr_value = 0x00000000,
541 .cpu_name = "POWER4 (compatible)",
542 .cpu_features = CPU_FTRS_COMPATIBLE,
543 .cpu_user_features = COMMON_USER_PPC64,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000544 .mmu_features = MMU_FTRS_DEFAULT_HPTE_ARCH_V2,
Stephen Rothwell49209602005-10-12 15:55:09 +1000545 .icache_bsize = 128,
546 .dcache_bsize = 128,
547 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600548 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100549 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000550 }
Benjamin Herrenschmidt2d27cfd2009-07-23 23:15:59 +0000551#endif /* CONFIG_PPC_BOOK3S_64 */
Benjamin Herrenschmidt2d27cfd2009-07-23 23:15:59 +0000552
Stephen Rothwell49209602005-10-12 15:55:09 +1000553#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -0700554#if CLASSIC_PPC
Stephen Rothwell49209602005-10-12 15:55:09 +1000555 { /* 601 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700556 .pvr_mask = 0xffff0000,
557 .pvr_value = 0x00010000,
558 .cpu_name = "601",
Kumar Gala10b35d92005-09-23 14:08:58 -0500559 .cpu_features = CPU_FTRS_PPC601,
Stephen Rothwell49209602005-10-12 15:55:09 +1000560 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
Paul Mackerras98599012005-10-22 16:51:34 +1000561 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
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,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100565 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100566 .platform = "ppc601",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700567 },
568 { /* 603 */
569 .pvr_mask = 0xffff0000,
570 .pvr_value = 0x00030000,
571 .cpu_name = "603",
Kumar Gala10b35d92005-09-23 14:08:58 -0500572 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000573 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000574 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700575 .icache_bsize = 32,
576 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100577 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100578 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100579 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700580 },
581 { /* 603e */
582 .pvr_mask = 0xffff0000,
583 .pvr_value = 0x00060000,
584 .cpu_name = "603e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500585 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000586 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000587 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700588 .icache_bsize = 32,
589 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100590 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100591 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100592 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700593 },
594 { /* 603ev */
595 .pvr_mask = 0xffff0000,
596 .pvr_value = 0x00070000,
597 .cpu_name = "603ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500598 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000599 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000600 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700601 .icache_bsize = 32,
602 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100603 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100604 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100605 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700606 },
607 { /* 604 */
608 .pvr_mask = 0xffff0000,
609 .pvr_value = 0x00040000,
610 .cpu_name = "604",
Kumar Gala10b35d92005-09-23 14:08:58 -0500611 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000612 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000613 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700614 .icache_bsize = 32,
615 .dcache_bsize = 32,
616 .num_pmcs = 2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100617 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100618 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100619 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700620 },
621 { /* 604e */
622 .pvr_mask = 0xfffff000,
623 .pvr_value = 0x00090000,
624 .cpu_name = "604e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500625 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000626 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000627 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700628 .icache_bsize = 32,
629 .dcache_bsize = 32,
630 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100631 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100632 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100633 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700634 },
635 { /* 604r */
636 .pvr_mask = 0xffff0000,
637 .pvr_value = 0x00090000,
638 .cpu_name = "604r",
Kumar Gala10b35d92005-09-23 14:08:58 -0500639 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000640 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000641 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700642 .icache_bsize = 32,
643 .dcache_bsize = 32,
644 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100645 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100646 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100647 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700648 },
649 { /* 604ev */
650 .pvr_mask = 0xffff0000,
651 .pvr_value = 0x000a0000,
652 .cpu_name = "604ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500653 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000654 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000655 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700656 .icache_bsize = 32,
657 .dcache_bsize = 32,
658 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100659 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100660 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100661 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700662 },
663 { /* 740/750 (0x4202, don't support TAU ?) */
664 .pvr_mask = 0xffffffff,
665 .pvr_value = 0x00084202,
666 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500667 .cpu_features = CPU_FTRS_740_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000668 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000669 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700670 .icache_bsize = 32,
671 .dcache_bsize = 32,
672 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100673 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100674 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100675 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700676 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700677 { /* 750CX (80100 and 8010x?) */
678 .pvr_mask = 0xfffffff0,
679 .pvr_value = 0x00080100,
680 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500681 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000682 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000683 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700684 .icache_bsize = 32,
685 .dcache_bsize = 32,
686 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100687 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100688 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100689 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700690 },
691 { /* 750CX (82201 and 82202) */
692 .pvr_mask = 0xfffffff0,
693 .pvr_value = 0x00082200,
694 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500695 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000696 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000697 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700698 .icache_bsize = 32,
699 .dcache_bsize = 32,
700 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000701 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100702 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100703 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100704 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700705 },
706 { /* 750CXe (82214) */
707 .pvr_mask = 0xfffffff0,
708 .pvr_value = 0x00082210,
709 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500710 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000711 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000712 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700713 .icache_bsize = 32,
714 .dcache_bsize = 32,
715 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000716 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100717 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100718 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100719 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700720 },
Arthur Othieno7c316252005-09-03 15:55:52 -0700721 { /* 750CXe "Gekko" (83214) */
722 .pvr_mask = 0xffffffff,
723 .pvr_value = 0x00083214,
724 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500725 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000726 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000727 .mmu_features = MMU_FTR_HPTE_TABLE,
Arthur Othieno7c316252005-09-03 15:55:52 -0700728 .icache_bsize = 32,
729 .dcache_bsize = 32,
730 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000731 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100732 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100733 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100734 .platform = "ppc750",
Arthur Othieno7c316252005-09-03 15:55:52 -0700735 },
Albert Herranz45158dc2009-12-12 06:31:46 +0000736 { /* 750CL (and "Broadway") */
737 .pvr_mask = 0xfffff0e0,
738 .pvr_value = 0x00087000,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500739 .cpu_name = "750CL",
Josh Boyera14c4502007-04-13 04:33:25 +1000740 .cpu_features = CPU_FTRS_750CL,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500741 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000742 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500743 .icache_bsize = 32,
744 .dcache_bsize = 32,
745 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000746 .pmc_type = PPC_PMC_IBM,
Josh Boyera14c4502007-04-13 04:33:25 +1000747 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100748 .machine_check = machine_check_generic,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500749 .platform = "ppc750",
Dragos Tatulea04f56532009-09-16 11:58:15 +0300750 .oprofile_cpu_type = "ppc/750",
751 .oprofile_type = PPC_OPROFILE_G4,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500752 },
Arthur Othienoac1ff042005-09-03 15:55:51 -0700753 { /* 745/755 */
754 .pvr_mask = 0xfffff000,
755 .pvr_value = 0x00083000,
756 .cpu_name = "745/755",
Kumar Gala10b35d92005-09-23 14:08:58 -0500757 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000758 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000759 .mmu_features = MMU_FTR_HPTE_TABLE,
Arthur Othienoac1ff042005-09-03 15:55:51 -0700760 .icache_bsize = 32,
761 .dcache_bsize = 32,
762 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000763 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100764 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100765 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100766 .platform = "ppc750",
Arthur Othienoac1ff042005-09-03 15:55:51 -0700767 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700768 { /* 750FX rev 1.x */
769 .pvr_mask = 0xffffff00,
770 .pvr_value = 0x70000100,
771 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500772 .cpu_features = CPU_FTRS_750FX1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000773 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000774 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700775 .icache_bsize = 32,
776 .dcache_bsize = 32,
777 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000778 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100779 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100780 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100781 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000782 .oprofile_cpu_type = "ppc/750",
783 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700784 },
785 { /* 750FX rev 2.0 must disable HID0[DPM] */
786 .pvr_mask = 0xffffffff,
787 .pvr_value = 0x70000200,
788 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500789 .cpu_features = CPU_FTRS_750FX2,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000790 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000791 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700792 .icache_bsize = 32,
793 .dcache_bsize = 32,
794 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000795 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100796 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100797 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100798 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000799 .oprofile_cpu_type = "ppc/750",
800 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700801 },
802 { /* 750FX (All revs except 2.0) */
803 .pvr_mask = 0xffff0000,
804 .pvr_value = 0x70000000,
805 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500806 .cpu_features = CPU_FTRS_750FX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000807 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000808 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700809 .icache_bsize = 32,
810 .dcache_bsize = 32,
811 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000812 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100813 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100814 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100815 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000816 .oprofile_cpu_type = "ppc/750",
817 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700818 },
819 { /* 750GX */
820 .pvr_mask = 0xffff0000,
821 .pvr_value = 0x70020000,
822 .cpu_name = "750GX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500823 .cpu_features = CPU_FTRS_750GX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000824 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000825 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700826 .icache_bsize = 32,
827 .dcache_bsize = 32,
828 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000829 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100830 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100831 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100832 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000833 .oprofile_cpu_type = "ppc/750",
834 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700835 },
836 { /* 740/750 (L2CR bit need fixup for 740) */
837 .pvr_mask = 0xffff0000,
838 .pvr_value = 0x00080000,
839 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500840 .cpu_features = CPU_FTRS_740,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000841 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000842 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700843 .icache_bsize = 32,
844 .dcache_bsize = 32,
845 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000846 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100847 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100848 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100849 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700850 },
851 { /* 7400 rev 1.1 ? (no TAU) */
852 .pvr_mask = 0xffffffff,
853 .pvr_value = 0x000c1101,
854 .cpu_name = "7400 (1.1)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500855 .cpu_features = CPU_FTRS_7400_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000856 .cpu_user_features = COMMON_USER |
857 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000858 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700859 .icache_bsize = 32,
860 .dcache_bsize = 32,
861 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000862 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100863 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100864 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100865 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700866 },
867 { /* 7400 */
868 .pvr_mask = 0xffff0000,
869 .pvr_value = 0x000c0000,
870 .cpu_name = "7400",
Kumar Gala10b35d92005-09-23 14:08:58 -0500871 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000872 .cpu_user_features = COMMON_USER |
873 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000874 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700875 .icache_bsize = 32,
876 .dcache_bsize = 32,
877 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000878 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100879 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100880 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100881 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700882 },
883 { /* 7410 */
884 .pvr_mask = 0xffff0000,
885 .pvr_value = 0x800c0000,
886 .cpu_name = "7410",
Kumar Gala10b35d92005-09-23 14:08:58 -0500887 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000888 .cpu_user_features = COMMON_USER |
889 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000890 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700891 .icache_bsize = 32,
892 .dcache_bsize = 32,
893 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000894 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100895 .cpu_setup = __setup_cpu_7410,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100896 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100897 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700898 },
899 { /* 7450 2.0 - no doze/nap */
900 .pvr_mask = 0xffffffff,
901 .pvr_value = 0x80000200,
902 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500903 .cpu_features = CPU_FTRS_7450_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000904 .cpu_user_features = COMMON_USER |
905 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000906 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700907 .icache_bsize = 32,
908 .dcache_bsize = 32,
909 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000910 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600911 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600912 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000913 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100914 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100915 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700916 },
917 { /* 7450 2.1 */
918 .pvr_mask = 0xffffffff,
919 .pvr_value = 0x80000201,
920 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500921 .cpu_features = CPU_FTRS_7450_21,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000922 .cpu_user_features = COMMON_USER |
923 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000924 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700925 .icache_bsize = 32,
926 .dcache_bsize = 32,
927 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000928 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600929 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600930 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000931 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100932 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100933 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700934 },
935 { /* 7450 2.3 and newer */
936 .pvr_mask = 0xffff0000,
937 .pvr_value = 0x80000000,
938 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500939 .cpu_features = CPU_FTRS_7450_23,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000940 .cpu_user_features = COMMON_USER |
941 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000942 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700943 .icache_bsize = 32,
944 .dcache_bsize = 32,
945 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000946 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600947 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600948 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000949 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100950 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100951 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700952 },
953 { /* 7455 rev 1.x */
954 .pvr_mask = 0xffffff00,
955 .pvr_value = 0x80010100,
956 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500957 .cpu_features = CPU_FTRS_7455_1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000958 .cpu_user_features = COMMON_USER |
959 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000960 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700961 .icache_bsize = 32,
962 .dcache_bsize = 32,
963 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000964 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600965 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600966 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000967 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100968 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100969 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700970 },
971 { /* 7455 rev 2.0 */
972 .pvr_mask = 0xffffffff,
973 .pvr_value = 0x80010200,
974 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500975 .cpu_features = CPU_FTRS_7455_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000976 .cpu_user_features = COMMON_USER |
977 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000978 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700979 .icache_bsize = 32,
980 .dcache_bsize = 32,
981 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000982 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600983 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600984 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000985 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100986 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100987 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700988 },
989 { /* 7455 others */
990 .pvr_mask = 0xffff0000,
991 .pvr_value = 0x80010000,
992 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500993 .cpu_features = CPU_FTRS_7455,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000994 .cpu_user_features = COMMON_USER |
995 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000996 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700997 .icache_bsize = 32,
998 .dcache_bsize = 32,
999 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001000 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001001 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001002 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001003 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001004 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001005 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001006 },
1007 { /* 7447/7457 Rev 1.0 */
1008 .pvr_mask = 0xffffffff,
1009 .pvr_value = 0x80020100,
1010 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -05001011 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001012 .cpu_user_features = COMMON_USER |
1013 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001014 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001015 .icache_bsize = 32,
1016 .dcache_bsize = 32,
1017 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001018 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001019 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001020 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001021 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001022 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001023 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001024 },
1025 { /* 7447/7457 Rev 1.1 */
1026 .pvr_mask = 0xffffffff,
1027 .pvr_value = 0x80020101,
1028 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -05001029 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001030 .cpu_user_features = COMMON_USER |
1031 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001032 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001033 .icache_bsize = 32,
1034 .dcache_bsize = 32,
1035 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001036 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001037 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001038 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001039 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001040 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001041 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001042 },
1043 { /* 7447/7457 Rev 1.2 and later */
1044 .pvr_mask = 0xffff0000,
1045 .pvr_value = 0x80020000,
1046 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -05001047 .cpu_features = CPU_FTRS_7447,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001048 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001049 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001050 .icache_bsize = 32,
1051 .dcache_bsize = 32,
1052 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001053 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001054 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001055 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001056 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001057 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001058 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001059 },
1060 { /* 7447A */
1061 .pvr_mask = 0xffff0000,
1062 .pvr_value = 0x80030000,
1063 .cpu_name = "7447A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001064 .cpu_features = CPU_FTRS_7447A,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001065 .cpu_user_features = COMMON_USER |
1066 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001067 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001068 .icache_bsize = 32,
1069 .dcache_bsize = 32,
1070 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001071 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001072 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001073 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001074 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001075 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001076 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001077 },
Kumar Galabbde6302005-09-03 15:55:55 -07001078 { /* 7448 */
1079 .pvr_mask = 0xffff0000,
1080 .pvr_value = 0x80040000,
1081 .cpu_name = "7448",
James.Yang3d372542007-05-02 16:34:43 -05001082 .cpu_features = CPU_FTRS_7448,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001083 .cpu_user_features = COMMON_USER |
1084 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001085 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Kumar Galabbde6302005-09-03 15:55:55 -07001086 .icache_bsize = 32,
1087 .dcache_bsize = 32,
1088 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001089 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001090 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001091 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001092 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001093 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001094 .platform = "ppc7450",
Kumar Galabbde6302005-09-03 15:55:55 -07001095 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001096 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
1097 .pvr_mask = 0x7fff0000,
1098 .pvr_value = 0x00810000,
1099 .cpu_name = "82xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001100 .cpu_features = CPU_FTRS_82XX,
Stephen Rothwell49209602005-10-12 15:55:09 +10001101 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001102 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001103 .icache_bsize = 32,
1104 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001105 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001106 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001107 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001108 },
1109 { /* All G2_LE (603e core, plus some) have the same pvr */
1110 .pvr_mask = 0x7fff0000,
1111 .pvr_value = 0x00820000,
1112 .cpu_name = "G2_LE",
Kumar Gala10b35d92005-09-23 14:08:58 -05001113 .cpu_features = CPU_FTRS_G2_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +10001114 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001115 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001116 .icache_bsize = 32,
1117 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001118 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001119 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001120 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001121 },
Kim Phillips6c4a2502006-10-02 20:10:24 -05001122 { /* e300c1 (a 603e core, plus some) on 83xx */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001123 .pvr_mask = 0x7fff0000,
1124 .pvr_value = 0x00830000,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001125 .cpu_name = "e300c1",
Kumar Gala10b35d92005-09-23 14:08:58 -05001126 .cpu_features = CPU_FTRS_E300,
Stephen Rothwell49209602005-10-12 15:55:09 +10001127 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001128 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001129 .icache_bsize = 32,
1130 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001131 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001132 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001133 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001134 },
Kim Phillips6c4a2502006-10-02 20:10:24 -05001135 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
1136 .pvr_mask = 0x7fff0000,
1137 .pvr_value = 0x00840000,
1138 .cpu_name = "e300c2",
Kim Phillipsaa42c692006-12-08 02:43:30 -06001139 .cpu_features = CPU_FTRS_E300C2,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001140 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Kumar Gala2319f122009-03-19 03:55:41 +00001141 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1142 MMU_FTR_NEED_DTLB_SW_LRU,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001143 .icache_bsize = 32,
1144 .dcache_bsize = 32,
1145 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001146 .machine_check = machine_check_generic,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001147 .platform = "ppc603",
1148 },
Li Yanga58d5242007-10-19 19:38:42 +08001149 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
Scott Wood57933f82006-12-01 12:57:05 -06001150 .pvr_mask = 0x7fff0000,
1151 .pvr_value = 0x00850000,
1152 .cpu_name = "e300c3",
1153 .cpu_features = CPU_FTRS_E300,
1154 .cpu_user_features = COMMON_USER,
Kumar Gala2319f122009-03-19 03:55:41 +00001155 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1156 MMU_FTR_NEED_DTLB_SW_LRU,
Scott Wood57933f82006-12-01 12:57:05 -06001157 .icache_bsize = 32,
1158 .dcache_bsize = 32,
1159 .cpu_setup = __setup_cpu_603,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001160 .num_pmcs = 4,
1161 .oprofile_cpu_type = "ppc/e300",
1162 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Scott Wood57933f82006-12-01 12:57:05 -06001163 .platform = "ppc603",
1164 },
Li Yanga58d5242007-10-19 19:38:42 +08001165 { /* e300c4 (e300c1, plus one IU) */
1166 .pvr_mask = 0x7fff0000,
1167 .pvr_value = 0x00860000,
1168 .cpu_name = "e300c4",
1169 .cpu_features = CPU_FTRS_E300,
1170 .cpu_user_features = COMMON_USER,
Kumar Gala2319f122009-03-19 03:55:41 +00001171 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1172 MMU_FTR_NEED_DTLB_SW_LRU,
Li Yanga58d5242007-10-19 19:38:42 +08001173 .icache_bsize = 32,
1174 .dcache_bsize = 32,
1175 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001176 .machine_check = machine_check_generic,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001177 .num_pmcs = 4,
1178 .oprofile_cpu_type = "ppc/e300",
1179 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Li Yanga58d5242007-10-19 19:38:42 +08001180 .platform = "ppc603",
1181 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001182 { /* default match, we assume split I/D cache & TB (non-601)... */
1183 .pvr_mask = 0x00000000,
1184 .pvr_value = 0x00000000,
1185 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -05001186 .cpu_features = CPU_FTRS_CLASSIC32,
Stephen Rothwell49209602005-10-12 15:55:09 +10001187 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001188 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001189 .icache_bsize = 32,
1190 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001191 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001192 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001193 },
1194#endif /* CLASSIC_PPC */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001195#ifdef CONFIG_8xx
1196 { /* 8xx */
1197 .pvr_mask = 0xffff0000,
1198 .pvr_value = 0x00500000,
1199 .cpu_name = "8xx",
1200 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1201 * if the 8xx code is there.... */
Kumar Gala10b35d92005-09-23 14:08:58 -05001202 .cpu_features = CPU_FTRS_8XX,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001203 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001204 .mmu_features = MMU_FTR_TYPE_8xx,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001205 .icache_bsize = 16,
1206 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001207 .platform = "ppc823",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001208 },
1209#endif /* CONFIG_8xx */
1210#ifdef CONFIG_40x
1211 { /* 403GC */
1212 .pvr_mask = 0xffffff00,
1213 .pvr_value = 0x00200200,
1214 .cpu_name = "403GC",
Kumar Gala10b35d92005-09-23 14:08:58 -05001215 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001216 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001217 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001218 .icache_bsize = 16,
1219 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001220 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001221 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001222 },
1223 { /* 403GCX */
1224 .pvr_mask = 0xffffff00,
1225 .pvr_value = 0x00201400,
1226 .cpu_name = "403GCX",
Kumar Gala10b35d92005-09-23 14:08:58 -05001227 .cpu_features = CPU_FTRS_40X,
Paul Mackerras98599012005-10-22 16:51:34 +10001228 .cpu_user_features = PPC_FEATURE_32 |
1229 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001230 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001231 .icache_bsize = 16,
1232 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001233 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001234 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001235 },
1236 { /* 403G ?? */
1237 .pvr_mask = 0xffff0000,
1238 .pvr_value = 0x00200000,
1239 .cpu_name = "403G ??",
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 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001242 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001243 .icache_bsize = 16,
1244 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001245 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001246 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001247 },
1248 { /* 405GP */
1249 .pvr_mask = 0xffff0000,
1250 .pvr_value = 0x40110000,
1251 .cpu_name = "405GP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001252 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001253 .cpu_user_features = PPC_FEATURE_32 |
1254 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001255 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001256 .icache_bsize = 32,
1257 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001258 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001259 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001260 },
1261 { /* STB 03xxx */
1262 .pvr_mask = 0xffff0000,
1263 .pvr_value = 0x40130000,
1264 .cpu_name = "STB03xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001265 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001266 .cpu_user_features = PPC_FEATURE_32 |
1267 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001268 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001269 .icache_bsize = 32,
1270 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001271 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001272 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001273 },
1274 { /* STB 04xxx */
1275 .pvr_mask = 0xffff0000,
1276 .pvr_value = 0x41810000,
1277 .cpu_name = "STB04xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001278 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001279 .cpu_user_features = PPC_FEATURE_32 |
1280 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001281 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001282 .icache_bsize = 32,
1283 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001284 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001285 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001286 },
1287 { /* NP405L */
1288 .pvr_mask = 0xffff0000,
1289 .pvr_value = 0x41610000,
1290 .cpu_name = "NP405L",
Kumar Gala10b35d92005-09-23 14:08:58 -05001291 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001292 .cpu_user_features = PPC_FEATURE_32 |
1293 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
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 { /* NP4GS3 */
1301 .pvr_mask = 0xffff0000,
1302 .pvr_value = 0x40B10000,
1303 .cpu_name = "NP4GS3",
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 },
1313 { /* NP405H */
1314 .pvr_mask = 0xffff0000,
1315 .pvr_value = 0x41410000,
1316 .cpu_name = "NP405H",
Kumar Gala10b35d92005-09-23 14:08:58 -05001317 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001318 .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,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001321 .icache_bsize = 32,
1322 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001323 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001324 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001325 },
1326 { /* 405GPr */
1327 .pvr_mask = 0xffff0000,
1328 .pvr_value = 0x50910000,
1329 .cpu_name = "405GPr",
Kumar Gala10b35d92005-09-23 14:08:58 -05001330 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -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,
Linus Torvalds1da177e2005-04-16 15:20:36 -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",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001338 },
1339 { /* STBx25xx */
1340 .pvr_mask = 0xffff0000,
1341 .pvr_value = 0x51510000,
1342 .cpu_name = "STBx25xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001343 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001344 .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,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001347 .icache_bsize = 32,
1348 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001349 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001350 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001351 },
1352 { /* 405LP */
1353 .pvr_mask = 0xffff0000,
1354 .pvr_value = 0x41F10000,
1355 .cpu_name = "405LP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001356 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001357 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001358 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001359 .icache_bsize = 32,
1360 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001361 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001362 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001363 },
1364 { /* Xilinx Virtex-II Pro */
Grant C. Likely72646c72006-01-19 01:13:20 -07001365 .pvr_mask = 0xfffff000,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001366 .pvr_value = 0x20010000,
1367 .cpu_name = "Virtex-II Pro",
Kumar Gala10b35d92005-09-23 14:08:58 -05001368 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001369 .cpu_user_features = PPC_FEATURE_32 |
1370 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001371 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001372 .icache_bsize = 32,
1373 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001374 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001375 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001376 },
Grant C. Likely72646c72006-01-19 01:13:20 -07001377 { /* Xilinx Virtex-4 FX */
1378 .pvr_mask = 0xfffff000,
1379 .pvr_value = 0x20011000,
1380 .cpu_name = "Virtex-4 FX",
1381 .cpu_features = CPU_FTRS_40X,
1382 .cpu_user_features = PPC_FEATURE_32 |
1383 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001384 .mmu_features = MMU_FTR_TYPE_40x,
Grant C. Likely72646c72006-01-19 01:13:20 -07001385 .icache_bsize = 32,
1386 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001387 .machine_check = machine_check_4xx,
Peter Bergner838fdb42006-09-14 14:18:38 -05001388 .platform = "ppc405",
Grant C. Likely72646c72006-01-19 01:13:20 -07001389 },
Eugene Suroveginad95d602005-06-07 13:22:09 -07001390 { /* 405EP */
1391 .pvr_mask = 0xffff0000,
1392 .pvr_value = 0x51210000,
1393 .cpu_name = "405EP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001394 .cpu_features = CPU_FTRS_40X,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001395 .cpu_user_features = PPC_FEATURE_32 |
1396 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001397 .mmu_features = MMU_FTR_TYPE_40x,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001398 .icache_bsize = 32,
1399 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001400 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001401 .platform = "ppc405",
Eugene Suroveginad95d602005-06-07 13:22:09 -07001402 },
Lee Nipperff349102010-07-09 01:17:16 +00001403 { /* 405EX Rev. A/B with Security */
1404 .pvr_mask = 0xffff000f,
1405 .pvr_value = 0x12910007,
1406 .cpu_name = "405EX Rev. A/B",
Stefan Roese5d8476c2007-10-11 22:08:14 +10001407 .cpu_features = CPU_FTRS_40X,
1408 .cpu_user_features = PPC_FEATURE_32 |
1409 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001410 .mmu_features = MMU_FTR_TYPE_40x,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001411 .icache_bsize = 32,
1412 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001413 .machine_check = machine_check_4xx,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001414 .platform = "ppc405",
1415 },
Lee Nipperff349102010-07-09 01:17:16 +00001416 { /* 405EX Rev. C without Security */
1417 .pvr_mask = 0xffff000f,
1418 .pvr_value = 0x1291000d,
1419 .cpu_name = "405EX Rev. C",
1420 .cpu_features = CPU_FTRS_40X,
1421 .cpu_user_features = PPC_FEATURE_32 |
1422 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1423 .mmu_features = MMU_FTR_TYPE_40x,
1424 .icache_bsize = 32,
1425 .dcache_bsize = 32,
1426 .machine_check = machine_check_4xx,
1427 .platform = "ppc405",
1428 },
1429 { /* 405EX Rev. C with Security */
1430 .pvr_mask = 0xffff000f,
1431 .pvr_value = 0x1291000f,
1432 .cpu_name = "405EX Rev. C",
1433 .cpu_features = CPU_FTRS_40X,
1434 .cpu_user_features = PPC_FEATURE_32 |
1435 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1436 .mmu_features = MMU_FTR_TYPE_40x,
1437 .icache_bsize = 32,
1438 .dcache_bsize = 32,
1439 .machine_check = machine_check_4xx,
1440 .platform = "ppc405",
1441 },
1442 { /* 405EX Rev. D without Security */
1443 .pvr_mask = 0xffff000f,
1444 .pvr_value = 0x12910003,
1445 .cpu_name = "405EX Rev. D",
1446 .cpu_features = CPU_FTRS_40X,
1447 .cpu_user_features = PPC_FEATURE_32 |
1448 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1449 .mmu_features = MMU_FTR_TYPE_40x,
1450 .icache_bsize = 32,
1451 .dcache_bsize = 32,
1452 .machine_check = machine_check_4xx,
1453 .platform = "ppc405",
1454 },
1455 { /* 405EX Rev. D with Security */
1456 .pvr_mask = 0xffff000f,
1457 .pvr_value = 0x12910005,
1458 .cpu_name = "405EX Rev. D",
1459 .cpu_features = CPU_FTRS_40X,
1460 .cpu_user_features = PPC_FEATURE_32 |
1461 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1462 .mmu_features = MMU_FTR_TYPE_40x,
1463 .icache_bsize = 32,
1464 .dcache_bsize = 32,
1465 .machine_check = machine_check_4xx,
1466 .platform = "ppc405",
1467 },
1468 { /* 405EXr Rev. A/B without Security */
1469 .pvr_mask = 0xffff000f,
1470 .pvr_value = 0x12910001,
1471 .cpu_name = "405EXr Rev. A/B",
1472 .cpu_features = CPU_FTRS_40X,
1473 .cpu_user_features = PPC_FEATURE_32 |
1474 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1475 .mmu_features = MMU_FTR_TYPE_40x,
1476 .icache_bsize = 32,
1477 .dcache_bsize = 32,
1478 .machine_check = machine_check_4xx,
1479 .platform = "ppc405",
1480 },
1481 { /* 405EXr Rev. C without Security */
1482 .pvr_mask = 0xffff000f,
1483 .pvr_value = 0x12910009,
1484 .cpu_name = "405EXr Rev. C",
1485 .cpu_features = CPU_FTRS_40X,
1486 .cpu_user_features = PPC_FEATURE_32 |
1487 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1488 .mmu_features = MMU_FTR_TYPE_40x,
1489 .icache_bsize = 32,
1490 .dcache_bsize = 32,
1491 .machine_check = machine_check_4xx,
1492 .platform = "ppc405",
1493 },
1494 { /* 405EXr Rev. C with Security */
1495 .pvr_mask = 0xffff000f,
1496 .pvr_value = 0x1291000b,
1497 .cpu_name = "405EXr Rev. C",
1498 .cpu_features = CPU_FTRS_40X,
1499 .cpu_user_features = PPC_FEATURE_32 |
1500 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1501 .mmu_features = MMU_FTR_TYPE_40x,
1502 .icache_bsize = 32,
1503 .dcache_bsize = 32,
1504 .machine_check = machine_check_4xx,
1505 .platform = "ppc405",
1506 },
1507 { /* 405EXr Rev. D without Security */
1508 .pvr_mask = 0xffff000f,
Stefan Roeseb676d842008-01-15 18:09:15 +11001509 .pvr_value = 0x12910000,
Lee Nipperff349102010-07-09 01:17:16 +00001510 .cpu_name = "405EXr Rev. D",
1511 .cpu_features = CPU_FTRS_40X,
1512 .cpu_user_features = PPC_FEATURE_32 |
1513 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1514 .mmu_features = MMU_FTR_TYPE_40x,
1515 .icache_bsize = 32,
1516 .dcache_bsize = 32,
1517 .machine_check = machine_check_4xx,
1518 .platform = "ppc405",
1519 },
1520 { /* 405EXr Rev. D with Security */
1521 .pvr_mask = 0xffff000f,
1522 .pvr_value = 0x12910002,
1523 .cpu_name = "405EXr Rev. D",
Stefan Roeseb676d842008-01-15 18:09:15 +11001524 .cpu_features = CPU_FTRS_40X,
1525 .cpu_user_features = PPC_FEATURE_32 |
1526 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001527 .mmu_features = MMU_FTR_TYPE_40x,
Stefan Roeseb676d842008-01-15 18:09:15 +11001528 .icache_bsize = 32,
1529 .dcache_bsize = 32,
1530 .machine_check = machine_check_4xx,
1531 .platform = "ppc405",
1532 },
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001533 {
1534 /* 405EZ */
1535 .pvr_mask = 0xffff0000,
1536 .pvr_value = 0x41510000,
1537 .cpu_name = "405EZ",
1538 .cpu_features = CPU_FTRS_40X,
1539 .cpu_user_features = PPC_FEATURE_32 |
1540 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001541 .mmu_features = MMU_FTR_TYPE_40x,
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001542 .icache_bsize = 32,
1543 .dcache_bsize = 32,
1544 .machine_check = machine_check_4xx,
1545 .platform = "ppc405",
1546 },
Tanmay Inamdard5b9ee72011-11-28 21:01:41 +00001547 { /* APM8018X */
1548 .pvr_mask = 0xffff0000,
1549 .pvr_value = 0x7ff11432,
1550 .cpu_name = "APM8018X",
1551 .cpu_features = CPU_FTRS_40X,
1552 .cpu_user_features = PPC_FEATURE_32 |
1553 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1554 .mmu_features = MMU_FTR_TYPE_40x,
1555 .icache_bsize = 32,
1556 .dcache_bsize = 32,
1557 .machine_check = machine_check_4xx,
1558 .platform = "ppc405",
1559 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001560 { /* default match */
1561 .pvr_mask = 0x00000000,
1562 .pvr_value = 0x00000000,
1563 .cpu_name = "(generic 40x PPC)",
1564 .cpu_features = CPU_FTRS_40X,
1565 .cpu_user_features = PPC_FEATURE_32 |
1566 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001567 .mmu_features = MMU_FTR_TYPE_40x,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001568 .icache_bsize = 32,
1569 .dcache_bsize = 32,
1570 .machine_check = machine_check_4xx,
1571 .platform = "ppc405",
1572 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001573
1574#endif /* CONFIG_40x */
1575#ifdef CONFIG_44x
Matt Porterc9cf73a2005-07-31 22:34:52 -07001576 {
1577 .pvr_mask = 0xf0000fff,
1578 .pvr_value = 0x40000850,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001579 .cpu_name = "440GR Rev. A",
1580 .cpu_features = CPU_FTRS_44X,
1581 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001582 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001583 .icache_bsize = 32,
1584 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001585 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001586 .platform = "ppc440",
1587 },
1588 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1589 .pvr_mask = 0xf0000fff,
1590 .pvr_value = 0x40000858,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001591 .cpu_name = "440EP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001592 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001593 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001594 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001595 .icache_bsize = 32,
1596 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001597 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001598 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001599 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001600 },
1601 {
1602 .pvr_mask = 0xf0000fff,
1603 .pvr_value = 0x400008d3,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001604 .cpu_name = "440GR Rev. B",
1605 .cpu_features = CPU_FTRS_44X,
1606 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001607 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001608 .icache_bsize = 32,
1609 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001610 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001611 .platform = "ppc440",
1612 },
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001613 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1614 .pvr_mask = 0xf0000ff7,
1615 .pvr_value = 0x400008d4,
1616 .cpu_name = "440EP Rev. C",
1617 .cpu_features = CPU_FTRS_44X,
1618 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001619 .mmu_features = MMU_FTR_TYPE_44x,
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001620 .icache_bsize = 32,
1621 .dcache_bsize = 32,
1622 .cpu_setup = __setup_cpu_440ep,
1623 .machine_check = machine_check_4xx,
1624 .platform = "ppc440",
1625 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001626 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1627 .pvr_mask = 0xf0000fff,
1628 .pvr_value = 0x400008db,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001629 .cpu_name = "440EP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001630 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001631 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001632 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001633 .icache_bsize = 32,
1634 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001635 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001636 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001637 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001638 },
Valentine Barshak15fc9932007-08-29 17:40:30 +04001639 { /* 440GRX */
1640 .pvr_mask = 0xf0000ffb,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001641 .pvr_value = 0x200008D0,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001642 .cpu_name = "440GRX",
1643 .cpu_features = CPU_FTRS_44X,
1644 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001645 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001646 .icache_bsize = 32,
1647 .dcache_bsize = 32,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001648 .cpu_setup = __setup_cpu_440grx,
Valentine Barshakb2be3b12007-12-22 03:22:23 +11001649 .machine_check = machine_check_440A,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001650 .platform = "ppc440",
Valentine Barshak15fc9932007-08-29 17:40:30 +04001651 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001652 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1653 .pvr_mask = 0xf0000ffb,
1654 .pvr_value = 0x200008D8,
1655 .cpu_name = "440EPX",
1656 .cpu_features = CPU_FTRS_44X,
1657 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001658 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001659 .icache_bsize = 32,
1660 .dcache_bsize = 32,
1661 .cpu_setup = __setup_cpu_440epx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001662 .machine_check = machine_check_440A,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001663 .platform = "ppc440",
1664 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001665 { /* 440GP Rev. B */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001666 .pvr_mask = 0xf0000fff,
1667 .pvr_value = 0x40000440,
1668 .cpu_name = "440GP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001669 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001670 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001671 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001672 .icache_bsize = 32,
1673 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001674 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001675 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001676 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001677 { /* 440GP Rev. C */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001678 .pvr_mask = 0xf0000fff,
1679 .pvr_value = 0x40000481,
1680 .cpu_name = "440GP Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001681 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001682 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001683 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001684 .icache_bsize = 32,
1685 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001686 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001687 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001688 },
1689 { /* 440GX Rev. A */
1690 .pvr_mask = 0xf0000fff,
1691 .pvr_value = 0x50000850,
1692 .cpu_name = "440GX Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001693 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001694 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001695 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001696 .icache_bsize = 32,
1697 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001698 .cpu_setup = __setup_cpu_440gx,
1699 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001700 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001701 },
1702 { /* 440GX Rev. B */
1703 .pvr_mask = 0xf0000fff,
1704 .pvr_value = 0x50000851,
1705 .cpu_name = "440GX Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001706 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001707 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001708 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001709 .icache_bsize = 32,
1710 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001711 .cpu_setup = __setup_cpu_440gx,
1712 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001713 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001714 },
1715 { /* 440GX Rev. C */
1716 .pvr_mask = 0xf0000fff,
1717 .pvr_value = 0x50000892,
1718 .cpu_name = "440GX Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001719 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001720 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001721 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001722 .icache_bsize = 32,
1723 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001724 .cpu_setup = __setup_cpu_440gx,
1725 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001726 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001727 },
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001728 { /* 440GX Rev. F */
1729 .pvr_mask = 0xf0000fff,
1730 .pvr_value = 0x50000894,
1731 .cpu_name = "440GX Rev. F",
Kumar Gala10b35d92005-09-23 14:08:58 -05001732 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001733 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001734 .mmu_features = MMU_FTR_TYPE_44x,
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001735 .icache_bsize = 32,
1736 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001737 .cpu_setup = __setup_cpu_440gx,
1738 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001739 .platform = "ppc440",
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001740 },
Matt Porter656de7e2005-09-03 15:55:42 -07001741 { /* 440SP Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001742 .pvr_mask = 0xfff00fff,
1743 .pvr_value = 0x53200891,
Matt Porter656de7e2005-09-03 15:55:42 -07001744 .cpu_name = "440SP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001745 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001746 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001747 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porter656de7e2005-09-03 15:55:42 -07001748 .icache_bsize = 32,
1749 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001750 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001751 .platform = "ppc440",
Matt Porter656de7e2005-09-03 15:55:42 -07001752 },
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001753 { /* 440SPe Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001754 .pvr_mask = 0xfff00fff,
1755 .pvr_value = 0x53400890,
1756 .cpu_name = "440SPe Rev. A",
1757 .cpu_features = CPU_FTRS_44X,
1758 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001759 .mmu_features = MMU_FTR_TYPE_44x,
Roland Dreier333e6152007-06-16 05:36:32 +10001760 .icache_bsize = 32,
1761 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001762 .cpu_setup = __setup_cpu_440spe,
1763 .machine_check = machine_check_440A,
Roland Dreier333e6152007-06-16 05:36:32 +10001764 .platform = "ppc440",
1765 },
1766 { /* 440SPe Rev. B */
1767 .pvr_mask = 0xfff00fff,
1768 .pvr_value = 0x53400891,
1769 .cpu_name = "440SPe Rev. B",
Kumar Galaa147c582006-12-08 02:34:38 -06001770 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001771 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001772 .mmu_features = MMU_FTR_TYPE_44x,
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001773 .icache_bsize = 32,
1774 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001775 .cpu_setup = __setup_cpu_440spe,
1776 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001777 .platform = "ppc440",
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001778 },
John Linn23e72372008-07-01 09:42:07 -07001779 { /* 440 in Xilinx Virtex-5 FXT */
1780 .pvr_mask = 0xfffffff0,
1781 .pvr_value = 0x7ff21910,
1782 .cpu_name = "440 in Virtex-5 FXT",
1783 .cpu_features = CPU_FTRS_44X,
1784 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001785 .mmu_features = MMU_FTR_TYPE_44x,
John Linn23e72372008-07-01 09:42:07 -07001786 .icache_bsize = 32,
1787 .dcache_bsize = 32,
Grant Likely640d17d2008-12-04 05:39:55 +00001788 .cpu_setup = __setup_cpu_440x5,
1789 .machine_check = machine_check_440A,
John Linn23e72372008-07-01 09:42:07 -07001790 .platform = "ppc440",
1791 },
Stefan Roese464076a2008-02-24 08:07:41 +11001792 { /* 460EX */
Stefan Roese20d70342009-07-29 07:04:46 +00001793 .pvr_mask = 0xffff0006,
Stefan Roese464076a2008-02-24 08:07:41 +11001794 .pvr_value = 0x13020002,
1795 .cpu_name = "460EX",
Benjamin Herrenschmidt6d2170b2008-12-18 19:13:22 +00001796 .cpu_features = CPU_FTRS_440x6,
Stefan Roese464076a2008-02-24 08:07:41 +11001797 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001798 .mmu_features = MMU_FTR_TYPE_44x,
Stefan Roese464076a2008-02-24 08:07:41 +11001799 .icache_bsize = 32,
1800 .dcache_bsize = 32,
1801 .cpu_setup = __setup_cpu_460ex,
1802 .machine_check = machine_check_440A,
1803 .platform = "ppc440",
1804 },
Stefan Roese20d70342009-07-29 07:04:46 +00001805 { /* 460EX Rev B */
1806 .pvr_mask = 0xffff0007,
1807 .pvr_value = 0x13020004,
1808 .cpu_name = "460EX Rev. B",
1809 .cpu_features = CPU_FTRS_440x6,
1810 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1811 .mmu_features = MMU_FTR_TYPE_44x,
1812 .icache_bsize = 32,
1813 .dcache_bsize = 32,
1814 .cpu_setup = __setup_cpu_460ex,
1815 .machine_check = machine_check_440A,
1816 .platform = "ppc440",
1817 },
Stefan Roese464076a2008-02-24 08:07:41 +11001818 { /* 460GT */
Stefan Roese20d70342009-07-29 07:04:46 +00001819 .pvr_mask = 0xffff0006,
Stefan Roese464076a2008-02-24 08:07:41 +11001820 .pvr_value = 0x13020000,
1821 .cpu_name = "460GT",
Benjamin Herrenschmidt6d2170b2008-12-18 19:13:22 +00001822 .cpu_features = CPU_FTRS_440x6,
Josh Boyer939e6222008-06-11 07:52:40 -04001823 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001824 .mmu_features = MMU_FTR_TYPE_44x,
Stefan Roese464076a2008-02-24 08:07:41 +11001825 .icache_bsize = 32,
1826 .dcache_bsize = 32,
Josh Boyer939e6222008-06-11 07:52:40 -04001827 .cpu_setup = __setup_cpu_460gt,
Stefan Roese464076a2008-02-24 08:07:41 +11001828 .machine_check = machine_check_440A,
1829 .platform = "ppc440",
1830 },
Stefan Roese20d70342009-07-29 07:04:46 +00001831 { /* 460GT Rev B */
1832 .pvr_mask = 0xffff0007,
1833 .pvr_value = 0x13020005,
1834 .cpu_name = "460GT Rev. B",
1835 .cpu_features = CPU_FTRS_440x6,
1836 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1837 .mmu_features = MMU_FTR_TYPE_44x,
1838 .icache_bsize = 32,
1839 .dcache_bsize = 32,
1840 .cpu_setup = __setup_cpu_460gt,
1841 .machine_check = machine_check_440A,
1842 .platform = "ppc440",
1843 },
Madhulika Madishetty6c712092009-02-05 13:31:36 +00001844 { /* 460SX */
1845 .pvr_mask = 0xffffff00,
1846 .pvr_value = 0x13541800,
1847 .cpu_name = "460SX",
1848 .cpu_features = CPU_FTRS_44X,
1849 .cpu_user_features = COMMON_USER_BOOKE,
1850 .mmu_features = MMU_FTR_TYPE_44x,
1851 .icache_bsize = 32,
1852 .dcache_bsize = 32,
1853 .cpu_setup = __setup_cpu_460sx,
1854 .machine_check = machine_check_440A,
1855 .platform = "ppc440",
1856 },
Tirumala Marri6edc3232010-09-13 13:26:11 +00001857 { /* 464 in APM821xx */
Vinh Nguyen Huu Tuong7c801162011-12-20 02:43:34 +00001858 .pvr_mask = 0xfffffff0,
Tirumala Marri6edc3232010-09-13 13:26:11 +00001859 .pvr_value = 0x12C41C80,
1860 .cpu_name = "APM821XX",
1861 .cpu_features = CPU_FTRS_44X,
1862 .cpu_user_features = COMMON_USER_BOOKE |
1863 PPC_FEATURE_HAS_FPU,
1864 .mmu_features = MMU_FTR_TYPE_44x,
1865 .icache_bsize = 32,
1866 .dcache_bsize = 32,
1867 .cpu_setup = __setup_cpu_apm821xx,
1868 .machine_check = machine_check_440A,
1869 .platform = "ppc440",
1870 },
Dave Kleikampc48d0db2011-01-26 06:17:58 +00001871 { /* 476 DD2 core */
1872 .pvr_mask = 0xffffffff,
1873 .pvr_value = 0x11a52080,
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001874 .cpu_name = "476",
Dave Kleikampc48d0db2011-01-26 06:17:58 +00001875 .cpu_features = CPU_FTRS_47X | CPU_FTR_476_DD2,
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001876 .cpu_user_features = COMMON_USER_BOOKE |
1877 PPC_FEATURE_HAS_FPU,
1878 .mmu_features = MMU_FTR_TYPE_47x |
1879 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1880 .icache_bsize = 32,
1881 .dcache_bsize = 128,
Dave Kleikampfc5e7092010-03-05 03:43:18 +00001882 .machine_check = machine_check_47x,
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001883 .platform = "ppc470",
1884 },
Tony Breedsdf777bd2011-11-30 21:39:23 +00001885 { /* 476fpe */
1886 .pvr_mask = 0xffff0000,
1887 .pvr_value = 0x7ff50000,
1888 .cpu_name = "476fpe",
1889 .cpu_features = CPU_FTRS_47X | CPU_FTR_476_DD2,
1890 .cpu_user_features = COMMON_USER_BOOKE |
1891 PPC_FEATURE_HAS_FPU,
1892 .mmu_features = MMU_FTR_TYPE_47x |
1893 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1894 .icache_bsize = 32,
1895 .dcache_bsize = 128,
1896 .machine_check = machine_check_47x,
1897 .platform = "ppc470",
1898 },
Torez Smithb4e8c8d2010-03-05 10:45:54 +00001899 { /* 476 iss */
1900 .pvr_mask = 0xffff0000,
1901 .pvr_value = 0x00050000,
1902 .cpu_name = "476",
1903 .cpu_features = CPU_FTRS_47X,
1904 .cpu_user_features = COMMON_USER_BOOKE |
1905 PPC_FEATURE_HAS_FPU,
Torez Smithb4e8c8d2010-03-05 10:45:54 +00001906 .mmu_features = MMU_FTR_TYPE_47x |
1907 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1908 .icache_bsize = 32,
1909 .dcache_bsize = 128,
1910 .machine_check = machine_check_47x,
1911 .platform = "ppc470",
1912 },
Dave Kleikampc48d0db2011-01-26 06:17:58 +00001913 { /* 476 others */
1914 .pvr_mask = 0xffff0000,
1915 .pvr_value = 0x11a50000,
1916 .cpu_name = "476",
1917 .cpu_features = CPU_FTRS_47X,
1918 .cpu_user_features = COMMON_USER_BOOKE |
1919 PPC_FEATURE_HAS_FPU,
1920 .mmu_features = MMU_FTR_TYPE_47x |
1921 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1922 .icache_bsize = 32,
1923 .dcache_bsize = 128,
1924 .machine_check = machine_check_47x,
1925 .platform = "ppc470",
1926 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001927 { /* default match */
1928 .pvr_mask = 0x00000000,
1929 .pvr_value = 0x00000000,
1930 .cpu_name = "(generic 44x PPC)",
1931 .cpu_features = CPU_FTRS_44X,
1932 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001933 .mmu_features = MMU_FTR_TYPE_44x,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001934 .icache_bsize = 32,
1935 .dcache_bsize = 32,
1936 .machine_check = machine_check_4xx,
1937 .platform = "ppc440",
1938 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001939#endif /* CONFIG_44x */
Josh Boyere3e414b2007-12-24 08:44:47 -06001940#ifdef CONFIG_E200
Stephen Rothwell49209602005-10-12 15:55:09 +10001941 { /* e200z5 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001942 .pvr_mask = 0xfff00000,
1943 .pvr_value = 0x81000000,
1944 .cpu_name = "e200z5",
1945 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001946 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001947 .cpu_user_features = COMMON_USER_BOOKE |
1948 PPC_FEATURE_HAS_EFP_SINGLE |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001949 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001950 .mmu_features = MMU_FTR_TYPE_FSL_E,
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001951 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001952 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001953 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001954 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001955 { /* e200z6 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001956 .pvr_mask = 0xfff00000,
1957 .pvr_value = 0x81100000,
1958 .cpu_name = "e200z6",
1959 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001960 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001961 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001962 PPC_FEATURE_HAS_SPE_COMP |
1963 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001964 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001965 .mmu_features = MMU_FTR_TYPE_FSL_E,
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001966 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001967 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001968 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001969 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001970 { /* default match */
1971 .pvr_mask = 0x00000000,
1972 .pvr_value = 0x00000000,
1973 .cpu_name = "(generic E200 PPC)",
1974 .cpu_features = CPU_FTRS_E200,
1975 .cpu_user_features = COMMON_USER_BOOKE |
1976 PPC_FEATURE_HAS_EFP_SINGLE |
1977 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001978 .mmu_features = MMU_FTR_TYPE_FSL_E,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001979 .dcache_bsize = 32,
Kumar Gala105c31d2009-01-08 08:31:20 -06001980 .cpu_setup = __setup_cpu_e200,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001981 .machine_check = machine_check_e200,
1982 .platform = "ppc5554",
Paul Mackerras516c8be2008-05-12 14:20:35 +10001983 }
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001984#endif /* CONFIG_E200 */
Kumar Gala4490c062010-10-08 08:32:11 -05001985#endif /* CONFIG_PPC32 */
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001986#ifdef CONFIG_E500
Kumar Gala4490c062010-10-08 08:32:11 -05001987#ifdef CONFIG_PPC32
Stephen Rothwell49209602005-10-12 15:55:09 +10001988 { /* e500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001989 .pvr_mask = 0xffff0000,
1990 .pvr_value = 0x80200000,
1991 .cpu_name = "e500",
Kumar Gala10b35d92005-09-23 14:08:58 -05001992 .cpu_features = CPU_FTRS_E500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001993 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001994 PPC_FEATURE_HAS_SPE_COMP |
1995 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001996 .mmu_features = MMU_FTR_TYPE_FSL_E,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001997 .icache_bsize = 32,
1998 .dcache_bsize = 32,
1999 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06002000 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06002001 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06002002 .cpu_setup = __setup_cpu_e500v1,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11002003 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002004 .platform = "ppc8540",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002005 },
Stephen Rothwell49209602005-10-12 15:55:09 +10002006 { /* e500v2 */
Kumar Gala5b37b702005-06-21 17:15:18 -07002007 .pvr_mask = 0xffff0000,
2008 .pvr_value = 0x80210000,
2009 .cpu_name = "e500v2",
Kumar Gala10b35d92005-09-23 14:08:58 -05002010 .cpu_features = CPU_FTRS_E500_2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002011 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05002012 PPC_FEATURE_HAS_SPE_COMP |
2013 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
2014 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00002015 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS,
Kumar Gala5b37b702005-06-21 17:15:18 -07002016 .icache_bsize = 32,
2017 .dcache_bsize = 32,
2018 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06002019 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06002020 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06002021 .cpu_setup = __setup_cpu_e500v2,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11002022 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002023 .platform = "ppc8548",
Kumar Gala5b37b702005-06-21 17:15:18 -07002024 },
Kumar Gala3dfa8772008-06-16 09:41:32 -05002025 { /* e500mc */
2026 .pvr_mask = 0xffff0000,
2027 .pvr_value = 0x80230000,
2028 .cpu_name = "e500mc",
Kumar Gala3dfa8772008-06-16 09:41:32 -05002029 .cpu_features = CPU_FTRS_E500MC,
2030 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Kumar Galac3071952009-02-10 22:26:06 -06002031 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
Kumar Gala323d23a2009-04-23 08:51:22 -05002032 MMU_FTR_USE_TLBILX,
Kumar Gala3dfa8772008-06-16 09:41:32 -05002033 .icache_bsize = 64,
2034 .dcache_bsize = 64,
2035 .num_pmcs = 4,
Scott Wooda1110652010-02-25 18:09:45 -06002036 .oprofile_cpu_type = "ppc/e500mc",
Kumar Gala3dfa8772008-06-16 09:41:32 -05002037 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06002038 .cpu_setup = __setup_cpu_e500mc,
Scott Woodfe04b112010-04-08 00:38:22 -05002039 .machine_check = machine_check_e500mc,
Kumar Gala3dfa8772008-06-16 09:41:32 -05002040 .platform = "ppce500mc",
2041 },
Kumar Gala4490c062010-10-08 08:32:11 -05002042#endif /* CONFIG_PPC32 */
2043 { /* e5500 */
2044 .pvr_mask = 0xffff0000,
2045 .pvr_value = 0x80240000,
2046 .cpu_name = "e5500",
Kumar Gala11ed0db2011-04-06 00:11:06 -05002047 .cpu_features = CPU_FTRS_E5500,
Kumar Galafb9be232011-06-02 11:26:13 -05002048 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Kumar Gala4490c062010-10-08 08:32:11 -05002049 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
2050 MMU_FTR_USE_TLBILX,
2051 .icache_bsize = 64,
2052 .dcache_bsize = 64,
2053 .num_pmcs = 4,
2054 .oprofile_cpu_type = "ppc/e500mc",
2055 .oprofile_type = PPC_OPROFILE_FSL_EMB,
2056 .cpu_setup = __setup_cpu_e5500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05302057#ifndef CONFIG_PPC32
Kumar Gala4490c062010-10-08 08:32:11 -05002058 .cpu_restore = __restore_cpu_e5500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05302059#endif
Kumar Gala4490c062010-10-08 08:32:11 -05002060 .machine_check = machine_check_e500mc,
2061 .platform = "ppce5500",
2062 },
Kumar Gala10241842011-11-06 11:51:07 -06002063 { /* e6500 */
2064 .pvr_mask = 0xffff0000,
2065 .pvr_value = 0x80400000,
2066 .cpu_name = "e6500",
2067 .cpu_features = CPU_FTRS_E6500,
2068 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
2069 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
2070 MMU_FTR_USE_TLBILX,
2071 .icache_bsize = 64,
2072 .dcache_bsize = 64,
2073 .num_pmcs = 4,
2074 .oprofile_cpu_type = "ppc/e6500",
2075 .oprofile_type = PPC_OPROFILE_FSL_EMB,
2076 .cpu_setup = __setup_cpu_e5500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05302077#ifndef CONFIG_PPC32
Kumar Gala10241842011-11-06 11:51:07 -06002078 .cpu_restore = __restore_cpu_e5500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05302079#endif
Kumar Gala10241842011-11-06 11:51:07 -06002080 .machine_check = machine_check_e500mc,
2081 .platform = "ppce6500",
2082 },
Kumar Gala4490c062010-10-08 08:32:11 -05002083#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -07002084 { /* default match */
2085 .pvr_mask = 0x00000000,
2086 .pvr_value = 0x00000000,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002087 .cpu_name = "(generic E500 PPC)",
2088 .cpu_features = CPU_FTRS_E500,
2089 .cpu_user_features = COMMON_USER_BOOKE |
2090 PPC_FEATURE_HAS_SPE_COMP |
2091 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00002092 .mmu_features = MMU_FTR_TYPE_FSL_E,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002093 .icache_bsize = 32,
2094 .dcache_bsize = 32,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002095 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002096 .platform = "powerpc",
Paul Mackerras516c8be2008-05-12 14:20:35 +10002097 }
Stephen Rothwell49209602005-10-12 15:55:09 +10002098#endif /* CONFIG_PPC32 */
Kumar Gala4490c062010-10-08 08:32:11 -05002099#endif /* CONFIG_E500 */
Kumar Galaf45c4482009-08-18 19:08:30 +00002100
Benjamin Herrenschmidt76b4eda2011-04-14 22:32:01 +00002101#ifdef CONFIG_PPC_A2
2102 { /* Standard A2 (>= DD2) + FPU core */
2103 .pvr_mask = 0xffff0000,
2104 .pvr_value = 0x00480000,
2105 .cpu_name = "A2 (>= DD2)",
2106 .cpu_features = CPU_FTRS_A2,
2107 .cpu_user_features = COMMON_USER_PPC64,
Matt Evans44ae3ab2011-04-06 19:48:50 +00002108 .mmu_features = MMU_FTRS_A2,
Benjamin Herrenschmidt76b4eda2011-04-14 22:32:01 +00002109 .icache_bsize = 64,
2110 .dcache_bsize = 64,
2111 .num_pmcs = 0,
2112 .cpu_setup = __setup_cpu_a2,
2113 .cpu_restore = __restore_cpu_a2,
2114 .machine_check = machine_check_generic,
2115 .platform = "ppca2",
2116 },
Kumar Galaf45c4482009-08-18 19:08:30 +00002117 { /* This is a default entry to get going, to be replaced by
2118 * a real one at some stage
2119 */
2120#define CPU_FTRS_BASE_BOOK3E (CPU_FTR_USE_TB | \
2121 CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_SMT | \
2122 CPU_FTR_NODSISRALIGN | CPU_FTR_NOEXECUTE)
2123 .pvr_mask = 0x00000000,
2124 .pvr_value = 0x00000000,
2125 .cpu_name = "Book3E",
2126 .cpu_features = CPU_FTRS_BASE_BOOK3E,
2127 .cpu_user_features = COMMON_USER_PPC64,
2128 .mmu_features = MMU_FTR_TYPE_3E | MMU_FTR_USE_TLBILX |
2129 MMU_FTR_USE_TLBIVAX_BCAST |
2130 MMU_FTR_LOCK_BCAST_INVAL,
2131 .icache_bsize = 64,
2132 .dcache_bsize = 64,
2133 .num_pmcs = 0,
2134 .machine_check = machine_check_generic,
2135 .platform = "power6",
2136 },
Benjamin Herrenschmidt76b4eda2011-04-14 22:32:01 +00002137#endif /* CONFIG_PPC_A2 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002138};
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002139
Paul Mackerras87a72f92007-10-04 14:18:01 +10002140static struct cpu_spec the_cpu_spec;
2141
Scott Wood26ee9762011-07-25 11:04:36 +00002142static struct cpu_spec * __init setup_cpu_spec(unsigned long offset,
2143 struct cpu_spec *s)
Michael Ellerman666435b2009-02-22 16:25:43 +00002144{
2145 struct cpu_spec *t = &the_cpu_spec;
Michael Ellerman2657dd42009-02-22 16:25:45 +00002146 struct cpu_spec old;
2147
Michael Ellerman666435b2009-02-22 16:25:43 +00002148 t = PTRRELOC(t);
Michael Ellerman2657dd42009-02-22 16:25:45 +00002149 old = *t;
2150
2151 /* Copy everything, then do fixups */
2152 *t = *s;
Michael Ellerman666435b2009-02-22 16:25:43 +00002153
2154 /*
2155 * If we are overriding a previous value derived from the real
2156 * PVR with a new value obtained using a logical PVR value,
2157 * don't modify the performance monitor fields.
2158 */
Michael Ellerman2657dd42009-02-22 16:25:45 +00002159 if (old.num_pmcs && !s->num_pmcs) {
2160 t->num_pmcs = old.num_pmcs;
2161 t->pmc_type = old.pmc_type;
2162 t->oprofile_type = old.oprofile_type;
2163 t->oprofile_mmcra_sihv = old.oprofile_mmcra_sihv;
2164 t->oprofile_mmcra_sipr = old.oprofile_mmcra_sipr;
2165 t->oprofile_mmcra_clear = old.oprofile_mmcra_clear;
2166
Michael Ellerman666435b2009-02-22 16:25:43 +00002167 /*
2168 * If we have passed through this logic once before and
2169 * have pulled the default case because the real PVR was
2170 * not found inside cpu_specs[], then we are possibly
2171 * running in compatibility mode. In that case, let the
2172 * oprofiler know which set of compatibility counters to
2173 * pull from by making sure the oprofile_cpu_type string
2174 * is set to that of compatibility mode. If the
2175 * oprofile_cpu_type already has a value, then we are
2176 * possibly overriding a real PVR with a logical one,
2177 * and, in that case, keep the current value for
2178 * oprofile_cpu_type.
2179 */
Benjamin Herrenschmidtb173f032009-05-14 18:34:06 +00002180 if (old.oprofile_cpu_type != NULL) {
Benjamin Herrenschmidt0203d6e2009-04-29 19:39:38 +00002181 t->oprofile_cpu_type = old.oprofile_cpu_type;
2182 t->oprofile_type = old.oprofile_type;
Michael Wolf79af6c42009-04-27 06:17:54 +00002183 }
Michael Ellerman2657dd42009-02-22 16:25:45 +00002184 }
Michael Ellerman666435b2009-02-22 16:25:43 +00002185
2186 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
2187
2188 /*
2189 * Set the base platform string once; assumes
2190 * we're called with real pvr first.
2191 */
2192 if (*PTRRELOC(&powerpc_base_platform) == NULL)
2193 *PTRRELOC(&powerpc_base_platform) = t->platform;
2194
2195#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
2196 /* ppc64 and booke expect identify_cpu to also call setup_cpu for
2197 * that processor. I will consolidate that at a later time, for now,
2198 * just use #ifdef. We also don't need to PTRRELOC the function
2199 * pointer on ppc64 and booke as we are running at 0 in real mode
2200 * on ppc64 and reloc_offset is always 0 on booke.
2201 */
Benjamin Herrenschmidtaf9eef32011-01-20 20:36:03 +00002202 if (t->cpu_setup) {
2203 t->cpu_setup(offset, t);
Michael Ellerman666435b2009-02-22 16:25:43 +00002204 }
2205#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
Scott Wood26ee9762011-07-25 11:04:36 +00002206
2207 return t;
Michael Ellerman666435b2009-02-22 16:25:43 +00002208}
2209
Paul Mackerras87a72f92007-10-04 14:18:01 +10002210struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002211{
2212 struct cpu_spec *s = cpu_specs;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002213 int i;
2214
2215 s = PTRRELOC(s);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002216
Michael Ellerman666435b2009-02-22 16:25:43 +00002217 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) {
Scott Wood26ee9762011-07-25 11:04:36 +00002218 if ((pvr & s->pvr_mask) == s->pvr_value)
2219 return setup_cpu_spec(offset, s);
Michael Ellerman666435b2009-02-22 16:25:43 +00002220 }
2221
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002222 BUG();
Michael Ellerman666435b2009-02-22 16:25:43 +00002223
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002224 return NULL;
2225}