blob: 216ff845caf8afe70d10cbc481726977a5949bd4 [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 Herrenschmidtaa5cb0212006-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 Herrenschmidt7c03d652008-12-18 19:13:32 +0000278 .mmu_features = MMU_FTR_HPTE_TABLE,
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 Neulinge952e6c2008-06-18 10:47:26 +1000438 { /* Power7 */
439 .pvr_mask = 0xffff0000,
440 .pvr_value = 0x003f0000,
Joel Schopp635f5a62008-06-19 06:18:21 +1000441 .cpu_name = "POWER7 (raw)",
Michael Neulinge952e6c2008-06-18 10:47:26 +1000442 .cpu_features = CPU_FTRS_POWER7,
443 .cpu_user_features = COMMON_USER_POWER7,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000444 .mmu_features = MMU_FTRS_POWER7,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000445 .icache_bsize = 128,
446 .dcache_bsize = 128,
447 .num_pmcs = 6,
448 .pmc_type = PPC_PMC_IBM,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000449 .oprofile_cpu_type = "ppc64/power7",
450 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt24cc67d2011-01-20 18:50:55 +1100451 .cpu_setup = __setup_cpu_power7,
452 .cpu_restore = __restore_cpu_power7,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000453 .platform = "power7",
454 },
Michael Neuling6f08cb32010-11-17 18:52:44 +0000455 { /* Power7+ */
456 .pvr_mask = 0xffff0000,
457 .pvr_value = 0x004A0000,
458 .cpu_name = "POWER7+ (raw)",
459 .cpu_features = CPU_FTRS_POWER7,
460 .cpu_user_features = COMMON_USER_POWER7,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000461 .mmu_features = MMU_FTRS_POWER7,
Michael Neuling6f08cb32010-11-17 18:52:44 +0000462 .icache_bsize = 128,
463 .dcache_bsize = 128,
464 .num_pmcs = 6,
465 .pmc_type = PPC_PMC_IBM,
466 .oprofile_cpu_type = "ppc64/power7",
467 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt24cc67d2011-01-20 18:50:55 +1100468 .cpu_setup = __setup_cpu_power7,
469 .cpu_restore = __restore_cpu_power7,
Michael Neuling6f08cb32010-11-17 18:52:44 +0000470 .platform = "power7+",
471 },
Michael Neuling71e18492012-10-30 19:34:15 +0000472 { /* Power8 */
473 .pvr_mask = 0xffff0000,
474 .pvr_value = 0x004b0000,
475 .cpu_name = "POWER8 (raw)",
476 .cpu_features = CPU_FTRS_POWER8,
477 .cpu_user_features = COMMON_USER_POWER8,
478 .mmu_features = MMU_FTRS_POWER8,
479 .icache_bsize = 128,
480 .dcache_bsize = 128,
481 .num_pmcs = 6,
482 .pmc_type = PPC_PMC_IBM,
483 .oprofile_cpu_type = "ppc64/power8",
484 .oprofile_type = PPC_OPROFILE_POWER4,
485 .cpu_setup = __setup_cpu_power8,
486 .cpu_restore = __restore_cpu_power8,
487 .platform = "power8",
488 },
Arnd Bergmannc902be72006-01-04 19:55:53 +0000489 { /* Cell Broadband Engine */
Stephen Rothwell49209602005-10-12 15:55:09 +1000490 .pvr_mask = 0xffff0000,
491 .pvr_value = 0x00700000,
492 .cpu_name = "Cell Broadband Engine",
493 .cpu_features = CPU_FTRS_CELL,
494 .cpu_user_features = COMMON_USER_PPC64 |
Benjamin Herrenschmidtaa5cb0212006-03-01 15:07:07 +1100495 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
496 PPC_FEATURE_SMT,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000497 .mmu_features = MMU_FTRS_CELL,
Stephen Rothwell49209602005-10-12 15:55:09 +1000498 .icache_bsize = 128,
499 .dcache_bsize = 128,
Maynard Johnson18f21902006-11-20 18:45:16 +0100500 .num_pmcs = 4,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600501 .pmc_type = PPC_PMC_IBM,
Maynard Johnson18f21902006-11-20 18:45:16 +0100502 .oprofile_cpu_type = "ppc64/cell-be",
503 .oprofile_type = PPC_OPROFILE_CELL,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100504 .platform = "ppc-cell-be",
Stephen Rothwell49209602005-10-12 15:55:09 +1000505 },
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500506 { /* PA Semi PA6T */
507 .pvr_mask = 0x7fff0000,
508 .pvr_value = 0x00900000,
509 .cpu_name = "PA6T",
510 .cpu_features = CPU_FTRS_PA6T,
511 .cpu_user_features = COMMON_USER_PA6T,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000512 .mmu_features = MMU_FTRS_PA6T,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500513 .icache_bsize = 64,
514 .dcache_bsize = 64,
515 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600516 .pmc_type = PPC_PMC_PA6T,
Olof Johansson11999192007-02-04 16:36:51 -0600517 .cpu_setup = __setup_cpu_pa6t,
518 .cpu_restore = __restore_cpu_pa6t,
Olof Johansson25fc5302007-04-18 16:38:21 +1000519 .oprofile_cpu_type = "ppc64/pa6t",
520 .oprofile_type = PPC_OPROFILE_PA6T,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500521 .platform = "pa6t",
522 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000523 { /* default match */
524 .pvr_mask = 0x00000000,
525 .pvr_value = 0x00000000,
526 .cpu_name = "POWER4 (compatible)",
527 .cpu_features = CPU_FTRS_COMPATIBLE,
528 .cpu_user_features = COMMON_USER_PPC64,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000529 .mmu_features = MMU_FTRS_DEFAULT_HPTE_ARCH_V2,
Stephen Rothwell49209602005-10-12 15:55:09 +1000530 .icache_bsize = 128,
531 .dcache_bsize = 128,
532 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600533 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100534 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000535 }
Benjamin Herrenschmidt2d27cfd2009-07-23 23:15:59 +0000536#endif /* CONFIG_PPC_BOOK3S_64 */
Benjamin Herrenschmidt2d27cfd2009-07-23 23:15:59 +0000537
Stephen Rothwell49209602005-10-12 15:55:09 +1000538#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -0700539#if CLASSIC_PPC
Stephen Rothwell49209602005-10-12 15:55:09 +1000540 { /* 601 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700541 .pvr_mask = 0xffff0000,
542 .pvr_value = 0x00010000,
543 .cpu_name = "601",
Kumar Gala10b35d92005-09-23 14:08:58 -0500544 .cpu_features = CPU_FTRS_PPC601,
Stephen Rothwell49209602005-10-12 15:55:09 +1000545 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
Paul Mackerras98599012005-10-22 16:51:34 +1000546 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000547 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700548 .icache_bsize = 32,
549 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100550 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100551 .platform = "ppc601",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700552 },
553 { /* 603 */
554 .pvr_mask = 0xffff0000,
555 .pvr_value = 0x00030000,
556 .cpu_name = "603",
Kumar Gala10b35d92005-09-23 14:08:58 -0500557 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000558 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000559 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700560 .icache_bsize = 32,
561 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100562 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100563 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100564 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700565 },
566 { /* 603e */
567 .pvr_mask = 0xffff0000,
568 .pvr_value = 0x00060000,
569 .cpu_name = "603e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500570 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000571 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000572 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700573 .icache_bsize = 32,
574 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100575 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100576 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100577 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700578 },
579 { /* 603ev */
580 .pvr_mask = 0xffff0000,
581 .pvr_value = 0x00070000,
582 .cpu_name = "603ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500583 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000584 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000585 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700586 .icache_bsize = 32,
587 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100588 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100589 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100590 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700591 },
592 { /* 604 */
593 .pvr_mask = 0xffff0000,
594 .pvr_value = 0x00040000,
595 .cpu_name = "604",
Kumar Gala10b35d92005-09-23 14:08:58 -0500596 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000597 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000598 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700599 .icache_bsize = 32,
600 .dcache_bsize = 32,
601 .num_pmcs = 2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100602 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100603 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100604 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700605 },
606 { /* 604e */
607 .pvr_mask = 0xfffff000,
608 .pvr_value = 0x00090000,
609 .cpu_name = "604e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500610 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000611 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000612 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700613 .icache_bsize = 32,
614 .dcache_bsize = 32,
615 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100616 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100617 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100618 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700619 },
620 { /* 604r */
621 .pvr_mask = 0xffff0000,
622 .pvr_value = 0x00090000,
623 .cpu_name = "604r",
Kumar Gala10b35d92005-09-23 14:08:58 -0500624 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000625 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000626 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700627 .icache_bsize = 32,
628 .dcache_bsize = 32,
629 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100630 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100631 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100632 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700633 },
634 { /* 604ev */
635 .pvr_mask = 0xffff0000,
636 .pvr_value = 0x000a0000,
637 .cpu_name = "604ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500638 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000639 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000640 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700641 .icache_bsize = 32,
642 .dcache_bsize = 32,
643 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100644 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100645 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100646 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700647 },
648 { /* 740/750 (0x4202, don't support TAU ?) */
649 .pvr_mask = 0xffffffff,
650 .pvr_value = 0x00084202,
651 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500652 .cpu_features = CPU_FTRS_740_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000653 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000654 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700655 .icache_bsize = 32,
656 .dcache_bsize = 32,
657 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100658 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100659 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100660 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700661 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700662 { /* 750CX (80100 and 8010x?) */
663 .pvr_mask = 0xfffffff0,
664 .pvr_value = 0x00080100,
665 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500666 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000667 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000668 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700669 .icache_bsize = 32,
670 .dcache_bsize = 32,
671 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100672 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100673 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100674 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700675 },
676 { /* 750CX (82201 and 82202) */
677 .pvr_mask = 0xfffffff0,
678 .pvr_value = 0x00082200,
679 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500680 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000681 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000682 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700683 .icache_bsize = 32,
684 .dcache_bsize = 32,
685 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000686 .pmc_type = PPC_PMC_IBM,
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 { /* 750CXe (82214) */
692 .pvr_mask = 0xfffffff0,
693 .pvr_value = 0x00082210,
694 .cpu_name = "750CXe",
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 },
Arthur Othieno7c316252005-09-03 15:55:52 -0700706 { /* 750CXe "Gekko" (83214) */
707 .pvr_mask = 0xffffffff,
708 .pvr_value = 0x00083214,
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,
Arthur Othieno7c316252005-09-03 15:55:52 -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",
Arthur Othieno7c316252005-09-03 15:55:52 -0700720 },
Albert Herranz45158dc2009-12-12 06:31:46 +0000721 { /* 750CL (and "Broadway") */
722 .pvr_mask = 0xfffff0e0,
723 .pvr_value = 0x00087000,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500724 .cpu_name = "750CL",
Josh Boyera14c4502007-04-13 04:33:25 +1000725 .cpu_features = CPU_FTRS_750CL,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500726 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000727 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500728 .icache_bsize = 32,
729 .dcache_bsize = 32,
730 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000731 .pmc_type = PPC_PMC_IBM,
Josh Boyera14c4502007-04-13 04:33:25 +1000732 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100733 .machine_check = machine_check_generic,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500734 .platform = "ppc750",
Dragos Tatulea04f56534772009-09-16 11:58:15 +0300735 .oprofile_cpu_type = "ppc/750",
736 .oprofile_type = PPC_OPROFILE_G4,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500737 },
Arthur Othienoac1ff042005-09-03 15:55:51 -0700738 { /* 745/755 */
739 .pvr_mask = 0xfffff000,
740 .pvr_value = 0x00083000,
741 .cpu_name = "745/755",
Kumar Gala10b35d92005-09-23 14:08:58 -0500742 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000743 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000744 .mmu_features = MMU_FTR_HPTE_TABLE,
Arthur Othienoac1ff042005-09-03 15:55:51 -0700745 .icache_bsize = 32,
746 .dcache_bsize = 32,
747 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000748 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100749 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100750 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100751 .platform = "ppc750",
Arthur Othienoac1ff042005-09-03 15:55:51 -0700752 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700753 { /* 750FX rev 1.x */
754 .pvr_mask = 0xffffff00,
755 .pvr_value = 0x70000100,
756 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500757 .cpu_features = CPU_FTRS_750FX1,
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,
Linus Torvalds1da177e2005-04-16 15:20:36 -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",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000767 .oprofile_cpu_type = "ppc/750",
768 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700769 },
770 { /* 750FX rev 2.0 must disable HID0[DPM] */
771 .pvr_mask = 0xffffffff,
772 .pvr_value = 0x70000200,
773 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500774 .cpu_features = CPU_FTRS_750FX2,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000775 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000776 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700777 .icache_bsize = 32,
778 .dcache_bsize = 32,
779 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000780 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100781 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100782 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100783 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000784 .oprofile_cpu_type = "ppc/750",
785 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700786 },
787 { /* 750FX (All revs except 2.0) */
788 .pvr_mask = 0xffff0000,
789 .pvr_value = 0x70000000,
790 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500791 .cpu_features = CPU_FTRS_750FX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000792 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000793 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700794 .icache_bsize = 32,
795 .dcache_bsize = 32,
796 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000797 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100798 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100799 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100800 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000801 .oprofile_cpu_type = "ppc/750",
802 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700803 },
804 { /* 750GX */
805 .pvr_mask = 0xffff0000,
806 .pvr_value = 0x70020000,
807 .cpu_name = "750GX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500808 .cpu_features = CPU_FTRS_750GX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000809 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000810 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700811 .icache_bsize = 32,
812 .dcache_bsize = 32,
813 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000814 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100815 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100816 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100817 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000818 .oprofile_cpu_type = "ppc/750",
819 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700820 },
821 { /* 740/750 (L2CR bit need fixup for 740) */
822 .pvr_mask = 0xffff0000,
823 .pvr_value = 0x00080000,
824 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500825 .cpu_features = CPU_FTRS_740,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000826 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000827 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700828 .icache_bsize = 32,
829 .dcache_bsize = 32,
830 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000831 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100832 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100833 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100834 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700835 },
836 { /* 7400 rev 1.1 ? (no TAU) */
837 .pvr_mask = 0xffffffff,
838 .pvr_value = 0x000c1101,
839 .cpu_name = "7400 (1.1)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500840 .cpu_features = CPU_FTRS_7400_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000841 .cpu_user_features = COMMON_USER |
842 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000843 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700844 .icache_bsize = 32,
845 .dcache_bsize = 32,
846 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000847 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100848 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100849 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100850 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700851 },
852 { /* 7400 */
853 .pvr_mask = 0xffff0000,
854 .pvr_value = 0x000c0000,
855 .cpu_name = "7400",
Kumar Gala10b35d92005-09-23 14:08:58 -0500856 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000857 .cpu_user_features = COMMON_USER |
858 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000859 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700860 .icache_bsize = 32,
861 .dcache_bsize = 32,
862 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000863 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100864 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100865 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100866 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700867 },
868 { /* 7410 */
869 .pvr_mask = 0xffff0000,
870 .pvr_value = 0x800c0000,
871 .cpu_name = "7410",
Kumar Gala10b35d92005-09-23 14:08:58 -0500872 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000873 .cpu_user_features = COMMON_USER |
874 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000875 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700876 .icache_bsize = 32,
877 .dcache_bsize = 32,
878 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000879 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100880 .cpu_setup = __setup_cpu_7410,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100881 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100882 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700883 },
884 { /* 7450 2.0 - no doze/nap */
885 .pvr_mask = 0xffffffff,
886 .pvr_value = 0x80000200,
887 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500888 .cpu_features = CPU_FTRS_7450_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000889 .cpu_user_features = COMMON_USER |
890 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000891 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700892 .icache_bsize = 32,
893 .dcache_bsize = 32,
894 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000895 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600896 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600897 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000898 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100899 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100900 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700901 },
902 { /* 7450 2.1 */
903 .pvr_mask = 0xffffffff,
904 .pvr_value = 0x80000201,
905 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500906 .cpu_features = CPU_FTRS_7450_21,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000907 .cpu_user_features = COMMON_USER |
908 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000909 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700910 .icache_bsize = 32,
911 .dcache_bsize = 32,
912 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000913 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600914 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600915 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000916 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100917 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100918 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700919 },
920 { /* 7450 2.3 and newer */
921 .pvr_mask = 0xffff0000,
922 .pvr_value = 0x80000000,
923 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500924 .cpu_features = CPU_FTRS_7450_23,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000925 .cpu_user_features = COMMON_USER |
926 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000927 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700928 .icache_bsize = 32,
929 .dcache_bsize = 32,
930 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000931 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600932 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600933 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000934 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100935 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100936 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700937 },
938 { /* 7455 rev 1.x */
939 .pvr_mask = 0xffffff00,
940 .pvr_value = 0x80010100,
941 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500942 .cpu_features = CPU_FTRS_7455_1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000943 .cpu_user_features = COMMON_USER |
944 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000945 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700946 .icache_bsize = 32,
947 .dcache_bsize = 32,
948 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000949 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600950 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600951 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000952 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100953 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100954 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700955 },
956 { /* 7455 rev 2.0 */
957 .pvr_mask = 0xffffffff,
958 .pvr_value = 0x80010200,
959 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500960 .cpu_features = CPU_FTRS_7455_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000961 .cpu_user_features = COMMON_USER |
962 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000963 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700964 .icache_bsize = 32,
965 .dcache_bsize = 32,
966 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000967 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600968 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600969 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000970 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100971 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100972 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700973 },
974 { /* 7455 others */
975 .pvr_mask = 0xffff0000,
976 .pvr_value = 0x80010000,
977 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500978 .cpu_features = CPU_FTRS_7455,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000979 .cpu_user_features = COMMON_USER |
980 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000981 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700982 .icache_bsize = 32,
983 .dcache_bsize = 32,
984 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000985 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600986 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600987 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000988 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100989 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100990 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700991 },
992 { /* 7447/7457 Rev 1.0 */
993 .pvr_mask = 0xffffffff,
994 .pvr_value = 0x80020100,
995 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500996 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000997 .cpu_user_features = COMMON_USER |
998 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000999 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001000 .icache_bsize = 32,
1001 .dcache_bsize = 32,
1002 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001003 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001004 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001005 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001006 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001007 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001008 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001009 },
1010 { /* 7447/7457 Rev 1.1 */
1011 .pvr_mask = 0xffffffff,
1012 .pvr_value = 0x80020101,
1013 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -05001014 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001015 .cpu_user_features = COMMON_USER |
1016 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001017 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001018 .icache_bsize = 32,
1019 .dcache_bsize = 32,
1020 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001021 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001022 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001023 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001024 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001025 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001026 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001027 },
1028 { /* 7447/7457 Rev 1.2 and later */
1029 .pvr_mask = 0xffff0000,
1030 .pvr_value = 0x80020000,
1031 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -05001032 .cpu_features = CPU_FTRS_7447,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001033 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001034 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001035 .icache_bsize = 32,
1036 .dcache_bsize = 32,
1037 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001038 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001039 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001040 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001041 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001042 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001043 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001044 },
1045 { /* 7447A */
1046 .pvr_mask = 0xffff0000,
1047 .pvr_value = 0x80030000,
1048 .cpu_name = "7447A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001049 .cpu_features = CPU_FTRS_7447A,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001050 .cpu_user_features = COMMON_USER |
1051 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001052 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001053 .icache_bsize = 32,
1054 .dcache_bsize = 32,
1055 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001056 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001057 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001058 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001059 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001060 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001061 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001062 },
Kumar Galabbde6302005-09-03 15:55:55 -07001063 { /* 7448 */
1064 .pvr_mask = 0xffff0000,
1065 .pvr_value = 0x80040000,
1066 .cpu_name = "7448",
James.Yang3d372542007-05-02 16:34:43 -05001067 .cpu_features = CPU_FTRS_7448,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001068 .cpu_user_features = COMMON_USER |
1069 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001070 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Kumar Galabbde6302005-09-03 15:55:55 -07001071 .icache_bsize = 32,
1072 .dcache_bsize = 32,
1073 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001074 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001075 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001076 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001077 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001078 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001079 .platform = "ppc7450",
Kumar Galabbde6302005-09-03 15:55:55 -07001080 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001081 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
1082 .pvr_mask = 0x7fff0000,
1083 .pvr_value = 0x00810000,
1084 .cpu_name = "82xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001085 .cpu_features = CPU_FTRS_82XX,
Stephen Rothwell49209602005-10-12 15:55:09 +10001086 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001087 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001088 .icache_bsize = 32,
1089 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001090 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001091 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001092 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001093 },
1094 { /* All G2_LE (603e core, plus some) have the same pvr */
1095 .pvr_mask = 0x7fff0000,
1096 .pvr_value = 0x00820000,
1097 .cpu_name = "G2_LE",
Kumar Gala10b35d92005-09-23 14:08:58 -05001098 .cpu_features = CPU_FTRS_G2_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +10001099 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001100 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001101 .icache_bsize = 32,
1102 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001103 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001104 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001105 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001106 },
Kim Phillips6c4a2502006-10-02 20:10:24 -05001107 { /* e300c1 (a 603e core, plus some) on 83xx */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001108 .pvr_mask = 0x7fff0000,
1109 .pvr_value = 0x00830000,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001110 .cpu_name = "e300c1",
Kumar Gala10b35d92005-09-23 14:08:58 -05001111 .cpu_features = CPU_FTRS_E300,
Stephen Rothwell49209602005-10-12 15:55:09 +10001112 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001113 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001114 .icache_bsize = 32,
1115 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001116 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001117 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001118 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001119 },
Kim Phillips6c4a2502006-10-02 20:10:24 -05001120 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
1121 .pvr_mask = 0x7fff0000,
1122 .pvr_value = 0x00840000,
1123 .cpu_name = "e300c2",
Kim Phillipsaa42c692006-12-08 02:43:30 -06001124 .cpu_features = CPU_FTRS_E300C2,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001125 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Kumar Gala2319f122009-03-19 03:55:41 +00001126 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1127 MMU_FTR_NEED_DTLB_SW_LRU,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001128 .icache_bsize = 32,
1129 .dcache_bsize = 32,
1130 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001131 .machine_check = machine_check_generic,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001132 .platform = "ppc603",
1133 },
Li Yanga58d5242007-10-19 19:38:42 +08001134 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
Scott Wood57933f82006-12-01 12:57:05 -06001135 .pvr_mask = 0x7fff0000,
1136 .pvr_value = 0x00850000,
1137 .cpu_name = "e300c3",
1138 .cpu_features = CPU_FTRS_E300,
1139 .cpu_user_features = COMMON_USER,
Kumar Gala2319f122009-03-19 03:55:41 +00001140 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1141 MMU_FTR_NEED_DTLB_SW_LRU,
Scott Wood57933f82006-12-01 12:57:05 -06001142 .icache_bsize = 32,
1143 .dcache_bsize = 32,
1144 .cpu_setup = __setup_cpu_603,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001145 .num_pmcs = 4,
1146 .oprofile_cpu_type = "ppc/e300",
1147 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Scott Wood57933f82006-12-01 12:57:05 -06001148 .platform = "ppc603",
1149 },
Li Yanga58d5242007-10-19 19:38:42 +08001150 { /* e300c4 (e300c1, plus one IU) */
1151 .pvr_mask = 0x7fff0000,
1152 .pvr_value = 0x00860000,
1153 .cpu_name = "e300c4",
1154 .cpu_features = CPU_FTRS_E300,
1155 .cpu_user_features = COMMON_USER,
Kumar Gala2319f122009-03-19 03:55:41 +00001156 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1157 MMU_FTR_NEED_DTLB_SW_LRU,
Li Yanga58d5242007-10-19 19:38:42 +08001158 .icache_bsize = 32,
1159 .dcache_bsize = 32,
1160 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001161 .machine_check = machine_check_generic,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001162 .num_pmcs = 4,
1163 .oprofile_cpu_type = "ppc/e300",
1164 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Li Yanga58d5242007-10-19 19:38:42 +08001165 .platform = "ppc603",
1166 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001167 { /* default match, we assume split I/D cache & TB (non-601)... */
1168 .pvr_mask = 0x00000000,
1169 .pvr_value = 0x00000000,
1170 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -05001171 .cpu_features = CPU_FTRS_CLASSIC32,
Stephen Rothwell49209602005-10-12 15:55:09 +10001172 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001173 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001174 .icache_bsize = 32,
1175 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001176 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001177 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001178 },
1179#endif /* CLASSIC_PPC */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001180#ifdef CONFIG_8xx
1181 { /* 8xx */
1182 .pvr_mask = 0xffff0000,
1183 .pvr_value = 0x00500000,
1184 .cpu_name = "8xx",
1185 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1186 * if the 8xx code is there.... */
Kumar Gala10b35d92005-09-23 14:08:58 -05001187 .cpu_features = CPU_FTRS_8XX,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001188 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001189 .mmu_features = MMU_FTR_TYPE_8xx,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001190 .icache_bsize = 16,
1191 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001192 .platform = "ppc823",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001193 },
1194#endif /* CONFIG_8xx */
1195#ifdef CONFIG_40x
1196 { /* 403GC */
1197 .pvr_mask = 0xffffff00,
1198 .pvr_value = 0x00200200,
1199 .cpu_name = "403GC",
Kumar Gala10b35d92005-09-23 14:08:58 -05001200 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001201 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001202 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001203 .icache_bsize = 16,
1204 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001205 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001206 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001207 },
1208 { /* 403GCX */
1209 .pvr_mask = 0xffffff00,
1210 .pvr_value = 0x00201400,
1211 .cpu_name = "403GCX",
Kumar Gala10b35d92005-09-23 14:08:58 -05001212 .cpu_features = CPU_FTRS_40X,
Paul Mackerras98599012005-10-22 16:51:34 +10001213 .cpu_user_features = PPC_FEATURE_32 |
1214 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001215 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001216 .icache_bsize = 16,
1217 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001218 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001219 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001220 },
1221 { /* 403G ?? */
1222 .pvr_mask = 0xffff0000,
1223 .pvr_value = 0x00200000,
1224 .cpu_name = "403G ??",
Kumar Gala10b35d92005-09-23 14:08:58 -05001225 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001226 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001227 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001228 .icache_bsize = 16,
1229 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001230 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001231 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001232 },
1233 { /* 405GP */
1234 .pvr_mask = 0xffff0000,
1235 .pvr_value = 0x40110000,
1236 .cpu_name = "405GP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001237 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001238 .cpu_user_features = PPC_FEATURE_32 |
1239 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001240 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001241 .icache_bsize = 32,
1242 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001243 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001244 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001245 },
1246 { /* STB 03xxx */
1247 .pvr_mask = 0xffff0000,
1248 .pvr_value = 0x40130000,
1249 .cpu_name = "STB03xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001250 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001251 .cpu_user_features = PPC_FEATURE_32 |
1252 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001253 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001254 .icache_bsize = 32,
1255 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001256 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001257 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001258 },
1259 { /* STB 04xxx */
1260 .pvr_mask = 0xffff0000,
1261 .pvr_value = 0x41810000,
1262 .cpu_name = "STB04xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001263 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001264 .cpu_user_features = PPC_FEATURE_32 |
1265 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001266 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001267 .icache_bsize = 32,
1268 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001269 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001270 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001271 },
1272 { /* NP405L */
1273 .pvr_mask = 0xffff0000,
1274 .pvr_value = 0x41610000,
1275 .cpu_name = "NP405L",
Kumar Gala10b35d92005-09-23 14:08:58 -05001276 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001277 .cpu_user_features = PPC_FEATURE_32 |
1278 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001279 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001280 .icache_bsize = 32,
1281 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001282 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001283 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001284 },
1285 { /* NP4GS3 */
1286 .pvr_mask = 0xffff0000,
1287 .pvr_value = 0x40B10000,
1288 .cpu_name = "NP4GS3",
Kumar Gala10b35d92005-09-23 14:08:58 -05001289 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001290 .cpu_user_features = PPC_FEATURE_32 |
1291 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001292 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001293 .icache_bsize = 32,
1294 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001295 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001296 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001297 },
1298 { /* NP405H */
1299 .pvr_mask = 0xffff0000,
1300 .pvr_value = 0x41410000,
1301 .cpu_name = "NP405H",
Kumar Gala10b35d92005-09-23 14:08:58 -05001302 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001303 .cpu_user_features = PPC_FEATURE_32 |
1304 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001305 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001306 .icache_bsize = 32,
1307 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001308 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001309 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001310 },
1311 { /* 405GPr */
1312 .pvr_mask = 0xffff0000,
1313 .pvr_value = 0x50910000,
1314 .cpu_name = "405GPr",
Kumar Gala10b35d92005-09-23 14:08:58 -05001315 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001316 .cpu_user_features = PPC_FEATURE_32 |
1317 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001318 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001319 .icache_bsize = 32,
1320 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001321 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001322 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001323 },
1324 { /* STBx25xx */
1325 .pvr_mask = 0xffff0000,
1326 .pvr_value = 0x51510000,
1327 .cpu_name = "STBx25xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001328 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001329 .cpu_user_features = PPC_FEATURE_32 |
1330 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001331 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001332 .icache_bsize = 32,
1333 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001334 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001335 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001336 },
1337 { /* 405LP */
1338 .pvr_mask = 0xffff0000,
1339 .pvr_value = 0x41F10000,
1340 .cpu_name = "405LP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001341 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001342 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001343 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001344 .icache_bsize = 32,
1345 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001346 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001347 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001348 },
1349 { /* Xilinx Virtex-II Pro */
Grant C. Likely72646c72006-01-19 01:13:20 -07001350 .pvr_mask = 0xfffff000,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001351 .pvr_value = 0x20010000,
1352 .cpu_name = "Virtex-II Pro",
Kumar Gala10b35d92005-09-23 14:08:58 -05001353 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001354 .cpu_user_features = PPC_FEATURE_32 |
1355 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001356 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001357 .icache_bsize = 32,
1358 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001359 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001360 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001361 },
Grant C. Likely72646c72006-01-19 01:13:20 -07001362 { /* Xilinx Virtex-4 FX */
1363 .pvr_mask = 0xfffff000,
1364 .pvr_value = 0x20011000,
1365 .cpu_name = "Virtex-4 FX",
1366 .cpu_features = CPU_FTRS_40X,
1367 .cpu_user_features = PPC_FEATURE_32 |
1368 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001369 .mmu_features = MMU_FTR_TYPE_40x,
Grant C. Likely72646c72006-01-19 01:13:20 -07001370 .icache_bsize = 32,
1371 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001372 .machine_check = machine_check_4xx,
Peter Bergner838fdb42006-09-14 14:18:38 -05001373 .platform = "ppc405",
Grant C. Likely72646c72006-01-19 01:13:20 -07001374 },
Eugene Suroveginad95d602005-06-07 13:22:09 -07001375 { /* 405EP */
1376 .pvr_mask = 0xffff0000,
1377 .pvr_value = 0x51210000,
1378 .cpu_name = "405EP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001379 .cpu_features = CPU_FTRS_40X,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001380 .cpu_user_features = PPC_FEATURE_32 |
1381 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001382 .mmu_features = MMU_FTR_TYPE_40x,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001383 .icache_bsize = 32,
1384 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001385 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001386 .platform = "ppc405",
Eugene Suroveginad95d602005-06-07 13:22:09 -07001387 },
Lee Nipperff349102010-07-09 01:17:16 +00001388 { /* 405EX Rev. A/B with Security */
1389 .pvr_mask = 0xffff000f,
1390 .pvr_value = 0x12910007,
1391 .cpu_name = "405EX Rev. A/B",
Stefan Roese5d8476c2007-10-11 22:08:14 +10001392 .cpu_features = CPU_FTRS_40X,
1393 .cpu_user_features = PPC_FEATURE_32 |
1394 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001395 .mmu_features = MMU_FTR_TYPE_40x,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001396 .icache_bsize = 32,
1397 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001398 .machine_check = machine_check_4xx,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001399 .platform = "ppc405",
1400 },
Lee Nipperff349102010-07-09 01:17:16 +00001401 { /* 405EX Rev. C without Security */
1402 .pvr_mask = 0xffff000f,
1403 .pvr_value = 0x1291000d,
1404 .cpu_name = "405EX Rev. C",
1405 .cpu_features = CPU_FTRS_40X,
1406 .cpu_user_features = PPC_FEATURE_32 |
1407 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1408 .mmu_features = MMU_FTR_TYPE_40x,
1409 .icache_bsize = 32,
1410 .dcache_bsize = 32,
1411 .machine_check = machine_check_4xx,
1412 .platform = "ppc405",
1413 },
1414 { /* 405EX Rev. C with Security */
1415 .pvr_mask = 0xffff000f,
1416 .pvr_value = 0x1291000f,
1417 .cpu_name = "405EX Rev. C",
1418 .cpu_features = CPU_FTRS_40X,
1419 .cpu_user_features = PPC_FEATURE_32 |
1420 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1421 .mmu_features = MMU_FTR_TYPE_40x,
1422 .icache_bsize = 32,
1423 .dcache_bsize = 32,
1424 .machine_check = machine_check_4xx,
1425 .platform = "ppc405",
1426 },
1427 { /* 405EX Rev. D without Security */
1428 .pvr_mask = 0xffff000f,
1429 .pvr_value = 0x12910003,
1430 .cpu_name = "405EX Rev. D",
1431 .cpu_features = CPU_FTRS_40X,
1432 .cpu_user_features = PPC_FEATURE_32 |
1433 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1434 .mmu_features = MMU_FTR_TYPE_40x,
1435 .icache_bsize = 32,
1436 .dcache_bsize = 32,
1437 .machine_check = machine_check_4xx,
1438 .platform = "ppc405",
1439 },
1440 { /* 405EX Rev. D with Security */
1441 .pvr_mask = 0xffff000f,
1442 .pvr_value = 0x12910005,
1443 .cpu_name = "405EX Rev. D",
1444 .cpu_features = CPU_FTRS_40X,
1445 .cpu_user_features = PPC_FEATURE_32 |
1446 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1447 .mmu_features = MMU_FTR_TYPE_40x,
1448 .icache_bsize = 32,
1449 .dcache_bsize = 32,
1450 .machine_check = machine_check_4xx,
1451 .platform = "ppc405",
1452 },
1453 { /* 405EXr Rev. A/B without Security */
1454 .pvr_mask = 0xffff000f,
1455 .pvr_value = 0x12910001,
1456 .cpu_name = "405EXr Rev. A/B",
1457 .cpu_features = CPU_FTRS_40X,
1458 .cpu_user_features = PPC_FEATURE_32 |
1459 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1460 .mmu_features = MMU_FTR_TYPE_40x,
1461 .icache_bsize = 32,
1462 .dcache_bsize = 32,
1463 .machine_check = machine_check_4xx,
1464 .platform = "ppc405",
1465 },
1466 { /* 405EXr Rev. C without Security */
1467 .pvr_mask = 0xffff000f,
1468 .pvr_value = 0x12910009,
1469 .cpu_name = "405EXr Rev. C",
1470 .cpu_features = CPU_FTRS_40X,
1471 .cpu_user_features = PPC_FEATURE_32 |
1472 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1473 .mmu_features = MMU_FTR_TYPE_40x,
1474 .icache_bsize = 32,
1475 .dcache_bsize = 32,
1476 .machine_check = machine_check_4xx,
1477 .platform = "ppc405",
1478 },
1479 { /* 405EXr Rev. C with Security */
1480 .pvr_mask = 0xffff000f,
1481 .pvr_value = 0x1291000b,
1482 .cpu_name = "405EXr Rev. C",
1483 .cpu_features = CPU_FTRS_40X,
1484 .cpu_user_features = PPC_FEATURE_32 |
1485 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1486 .mmu_features = MMU_FTR_TYPE_40x,
1487 .icache_bsize = 32,
1488 .dcache_bsize = 32,
1489 .machine_check = machine_check_4xx,
1490 .platform = "ppc405",
1491 },
1492 { /* 405EXr Rev. D without Security */
1493 .pvr_mask = 0xffff000f,
Stefan Roeseb676d842008-01-15 18:09:15 +11001494 .pvr_value = 0x12910000,
Lee Nipperff349102010-07-09 01:17:16 +00001495 .cpu_name = "405EXr Rev. D",
1496 .cpu_features = CPU_FTRS_40X,
1497 .cpu_user_features = PPC_FEATURE_32 |
1498 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1499 .mmu_features = MMU_FTR_TYPE_40x,
1500 .icache_bsize = 32,
1501 .dcache_bsize = 32,
1502 .machine_check = machine_check_4xx,
1503 .platform = "ppc405",
1504 },
1505 { /* 405EXr Rev. D with Security */
1506 .pvr_mask = 0xffff000f,
1507 .pvr_value = 0x12910002,
1508 .cpu_name = "405EXr Rev. D",
Stefan Roeseb676d842008-01-15 18:09:15 +11001509 .cpu_features = CPU_FTRS_40X,
1510 .cpu_user_features = PPC_FEATURE_32 |
1511 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001512 .mmu_features = MMU_FTR_TYPE_40x,
Stefan Roeseb676d842008-01-15 18:09:15 +11001513 .icache_bsize = 32,
1514 .dcache_bsize = 32,
1515 .machine_check = machine_check_4xx,
1516 .platform = "ppc405",
1517 },
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001518 {
1519 /* 405EZ */
1520 .pvr_mask = 0xffff0000,
1521 .pvr_value = 0x41510000,
1522 .cpu_name = "405EZ",
1523 .cpu_features = CPU_FTRS_40X,
1524 .cpu_user_features = PPC_FEATURE_32 |
1525 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001526 .mmu_features = MMU_FTR_TYPE_40x,
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001527 .icache_bsize = 32,
1528 .dcache_bsize = 32,
1529 .machine_check = machine_check_4xx,
1530 .platform = "ppc405",
1531 },
Tanmay Inamdard5b9ee72011-11-28 21:01:41 +00001532 { /* APM8018X */
1533 .pvr_mask = 0xffff0000,
1534 .pvr_value = 0x7ff11432,
1535 .cpu_name = "APM8018X",
1536 .cpu_features = CPU_FTRS_40X,
1537 .cpu_user_features = PPC_FEATURE_32 |
1538 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1539 .mmu_features = MMU_FTR_TYPE_40x,
1540 .icache_bsize = 32,
1541 .dcache_bsize = 32,
1542 .machine_check = machine_check_4xx,
1543 .platform = "ppc405",
1544 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001545 { /* default match */
1546 .pvr_mask = 0x00000000,
1547 .pvr_value = 0x00000000,
1548 .cpu_name = "(generic 40x PPC)",
1549 .cpu_features = CPU_FTRS_40X,
1550 .cpu_user_features = PPC_FEATURE_32 |
1551 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001552 .mmu_features = MMU_FTR_TYPE_40x,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001553 .icache_bsize = 32,
1554 .dcache_bsize = 32,
1555 .machine_check = machine_check_4xx,
1556 .platform = "ppc405",
1557 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001558
1559#endif /* CONFIG_40x */
1560#ifdef CONFIG_44x
Matt Porterc9cf73a2005-07-31 22:34:52 -07001561 {
1562 .pvr_mask = 0xf0000fff,
1563 .pvr_value = 0x40000850,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001564 .cpu_name = "440GR Rev. A",
1565 .cpu_features = CPU_FTRS_44X,
1566 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001567 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001568 .icache_bsize = 32,
1569 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001570 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001571 .platform = "ppc440",
1572 },
1573 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1574 .pvr_mask = 0xf0000fff,
1575 .pvr_value = 0x40000858,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001576 .cpu_name = "440EP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001577 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001578 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001579 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001580 .icache_bsize = 32,
1581 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001582 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001583 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001584 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001585 },
1586 {
1587 .pvr_mask = 0xf0000fff,
1588 .pvr_value = 0x400008d3,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001589 .cpu_name = "440GR Rev. B",
1590 .cpu_features = CPU_FTRS_44X,
1591 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001592 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001593 .icache_bsize = 32,
1594 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001595 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001596 .platform = "ppc440",
1597 },
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001598 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1599 .pvr_mask = 0xf0000ff7,
1600 .pvr_value = 0x400008d4,
1601 .cpu_name = "440EP Rev. C",
1602 .cpu_features = CPU_FTRS_44X,
1603 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001604 .mmu_features = MMU_FTR_TYPE_44x,
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001605 .icache_bsize = 32,
1606 .dcache_bsize = 32,
1607 .cpu_setup = __setup_cpu_440ep,
1608 .machine_check = machine_check_4xx,
1609 .platform = "ppc440",
1610 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001611 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1612 .pvr_mask = 0xf0000fff,
1613 .pvr_value = 0x400008db,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001614 .cpu_name = "440EP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001615 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001616 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001617 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001618 .icache_bsize = 32,
1619 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001620 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001621 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001622 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001623 },
Valentine Barshak15fc9932007-08-29 17:40:30 +04001624 { /* 440GRX */
1625 .pvr_mask = 0xf0000ffb,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001626 .pvr_value = 0x200008D0,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001627 .cpu_name = "440GRX",
1628 .cpu_features = CPU_FTRS_44X,
1629 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001630 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001631 .icache_bsize = 32,
1632 .dcache_bsize = 32,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001633 .cpu_setup = __setup_cpu_440grx,
Valentine Barshakb2be3b12007-12-22 03:22:23 +11001634 .machine_check = machine_check_440A,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001635 .platform = "ppc440",
Valentine Barshak15fc9932007-08-29 17:40:30 +04001636 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001637 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1638 .pvr_mask = 0xf0000ffb,
1639 .pvr_value = 0x200008D8,
1640 .cpu_name = "440EPX",
1641 .cpu_features = CPU_FTRS_44X,
1642 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001643 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001644 .icache_bsize = 32,
1645 .dcache_bsize = 32,
1646 .cpu_setup = __setup_cpu_440epx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001647 .machine_check = machine_check_440A,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001648 .platform = "ppc440",
1649 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001650 { /* 440GP Rev. B */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001651 .pvr_mask = 0xf0000fff,
1652 .pvr_value = 0x40000440,
1653 .cpu_name = "440GP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001654 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001655 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001656 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001657 .icache_bsize = 32,
1658 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001659 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001660 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001661 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001662 { /* 440GP Rev. C */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001663 .pvr_mask = 0xf0000fff,
1664 .pvr_value = 0x40000481,
1665 .cpu_name = "440GP Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001666 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001667 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001668 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001669 .icache_bsize = 32,
1670 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001671 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001672 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001673 },
1674 { /* 440GX Rev. A */
1675 .pvr_mask = 0xf0000fff,
1676 .pvr_value = 0x50000850,
1677 .cpu_name = "440GX Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001678 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001679 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001680 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001681 .icache_bsize = 32,
1682 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001683 .cpu_setup = __setup_cpu_440gx,
1684 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001685 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001686 },
1687 { /* 440GX Rev. B */
1688 .pvr_mask = 0xf0000fff,
1689 .pvr_value = 0x50000851,
1690 .cpu_name = "440GX Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001691 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001692 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001693 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001694 .icache_bsize = 32,
1695 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001696 .cpu_setup = __setup_cpu_440gx,
1697 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001698 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001699 },
1700 { /* 440GX Rev. C */
1701 .pvr_mask = 0xf0000fff,
1702 .pvr_value = 0x50000892,
1703 .cpu_name = "440GX Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001704 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001705 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001706 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001707 .icache_bsize = 32,
1708 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001709 .cpu_setup = __setup_cpu_440gx,
1710 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001711 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001712 },
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001713 { /* 440GX Rev. F */
1714 .pvr_mask = 0xf0000fff,
1715 .pvr_value = 0x50000894,
1716 .cpu_name = "440GX Rev. F",
Kumar Gala10b35d92005-09-23 14:08:58 -05001717 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001718 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001719 .mmu_features = MMU_FTR_TYPE_44x,
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001720 .icache_bsize = 32,
1721 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001722 .cpu_setup = __setup_cpu_440gx,
1723 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001724 .platform = "ppc440",
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001725 },
Matt Porter656de7e2005-09-03 15:55:42 -07001726 { /* 440SP Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001727 .pvr_mask = 0xfff00fff,
1728 .pvr_value = 0x53200891,
Matt Porter656de7e2005-09-03 15:55:42 -07001729 .cpu_name = "440SP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001730 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001731 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001732 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porter656de7e2005-09-03 15:55:42 -07001733 .icache_bsize = 32,
1734 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001735 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001736 .platform = "ppc440",
Matt Porter656de7e2005-09-03 15:55:42 -07001737 },
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001738 { /* 440SPe Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001739 .pvr_mask = 0xfff00fff,
1740 .pvr_value = 0x53400890,
1741 .cpu_name = "440SPe Rev. A",
1742 .cpu_features = CPU_FTRS_44X,
1743 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001744 .mmu_features = MMU_FTR_TYPE_44x,
Roland Dreier333e6152007-06-16 05:36:32 +10001745 .icache_bsize = 32,
1746 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001747 .cpu_setup = __setup_cpu_440spe,
1748 .machine_check = machine_check_440A,
Roland Dreier333e6152007-06-16 05:36:32 +10001749 .platform = "ppc440",
1750 },
1751 { /* 440SPe Rev. B */
1752 .pvr_mask = 0xfff00fff,
1753 .pvr_value = 0x53400891,
1754 .cpu_name = "440SPe Rev. B",
Kumar Galaa147c582006-12-08 02:34:38 -06001755 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001756 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001757 .mmu_features = MMU_FTR_TYPE_44x,
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001758 .icache_bsize = 32,
1759 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001760 .cpu_setup = __setup_cpu_440spe,
1761 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001762 .platform = "ppc440",
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001763 },
John Linn23e72372008-07-01 09:42:07 -07001764 { /* 440 in Xilinx Virtex-5 FXT */
1765 .pvr_mask = 0xfffffff0,
1766 .pvr_value = 0x7ff21910,
1767 .cpu_name = "440 in Virtex-5 FXT",
1768 .cpu_features = CPU_FTRS_44X,
1769 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001770 .mmu_features = MMU_FTR_TYPE_44x,
John Linn23e72372008-07-01 09:42:07 -07001771 .icache_bsize = 32,
1772 .dcache_bsize = 32,
Grant Likely640d17d2008-12-04 05:39:55 +00001773 .cpu_setup = __setup_cpu_440x5,
1774 .machine_check = machine_check_440A,
John Linn23e72372008-07-01 09:42:07 -07001775 .platform = "ppc440",
1776 },
Stefan Roese464076a2008-02-24 08:07:41 +11001777 { /* 460EX */
Stefan Roese20d70342009-07-29 07:04:46 +00001778 .pvr_mask = 0xffff0006,
Stefan Roese464076a2008-02-24 08:07:41 +11001779 .pvr_value = 0x13020002,
1780 .cpu_name = "460EX",
Benjamin Herrenschmidt6d2170b2008-12-18 19:13:22 +00001781 .cpu_features = CPU_FTRS_440x6,
Stefan Roese464076a2008-02-24 08:07:41 +11001782 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001783 .mmu_features = MMU_FTR_TYPE_44x,
Stefan Roese464076a2008-02-24 08:07:41 +11001784 .icache_bsize = 32,
1785 .dcache_bsize = 32,
1786 .cpu_setup = __setup_cpu_460ex,
1787 .machine_check = machine_check_440A,
1788 .platform = "ppc440",
1789 },
Stefan Roese20d70342009-07-29 07:04:46 +00001790 { /* 460EX Rev B */
1791 .pvr_mask = 0xffff0007,
1792 .pvr_value = 0x13020004,
1793 .cpu_name = "460EX Rev. B",
1794 .cpu_features = CPU_FTRS_440x6,
1795 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1796 .mmu_features = MMU_FTR_TYPE_44x,
1797 .icache_bsize = 32,
1798 .dcache_bsize = 32,
1799 .cpu_setup = __setup_cpu_460ex,
1800 .machine_check = machine_check_440A,
1801 .platform = "ppc440",
1802 },
Stefan Roese464076a2008-02-24 08:07:41 +11001803 { /* 460GT */
Stefan Roese20d70342009-07-29 07:04:46 +00001804 .pvr_mask = 0xffff0006,
Stefan Roese464076a2008-02-24 08:07:41 +11001805 .pvr_value = 0x13020000,
1806 .cpu_name = "460GT",
Benjamin Herrenschmidt6d2170b2008-12-18 19:13:22 +00001807 .cpu_features = CPU_FTRS_440x6,
Josh Boyer939e6222008-06-11 07:52:40 -04001808 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001809 .mmu_features = MMU_FTR_TYPE_44x,
Stefan Roese464076a2008-02-24 08:07:41 +11001810 .icache_bsize = 32,
1811 .dcache_bsize = 32,
Josh Boyer939e6222008-06-11 07:52:40 -04001812 .cpu_setup = __setup_cpu_460gt,
Stefan Roese464076a2008-02-24 08:07:41 +11001813 .machine_check = machine_check_440A,
1814 .platform = "ppc440",
1815 },
Stefan Roese20d70342009-07-29 07:04:46 +00001816 { /* 460GT Rev B */
1817 .pvr_mask = 0xffff0007,
1818 .pvr_value = 0x13020005,
1819 .cpu_name = "460GT Rev. B",
1820 .cpu_features = CPU_FTRS_440x6,
1821 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1822 .mmu_features = MMU_FTR_TYPE_44x,
1823 .icache_bsize = 32,
1824 .dcache_bsize = 32,
1825 .cpu_setup = __setup_cpu_460gt,
1826 .machine_check = machine_check_440A,
1827 .platform = "ppc440",
1828 },
Madhulika Madishetty6c712092009-02-05 13:31:36 +00001829 { /* 460SX */
1830 .pvr_mask = 0xffffff00,
1831 .pvr_value = 0x13541800,
1832 .cpu_name = "460SX",
1833 .cpu_features = CPU_FTRS_44X,
1834 .cpu_user_features = COMMON_USER_BOOKE,
1835 .mmu_features = MMU_FTR_TYPE_44x,
1836 .icache_bsize = 32,
1837 .dcache_bsize = 32,
1838 .cpu_setup = __setup_cpu_460sx,
1839 .machine_check = machine_check_440A,
1840 .platform = "ppc440",
1841 },
Tirumala Marri6edc3232010-09-13 13:26:11 +00001842 { /* 464 in APM821xx */
Vinh Nguyen Huu Tuong7c801162011-12-20 02:43:34 +00001843 .pvr_mask = 0xfffffff0,
Tirumala Marri6edc3232010-09-13 13:26:11 +00001844 .pvr_value = 0x12C41C80,
1845 .cpu_name = "APM821XX",
1846 .cpu_features = CPU_FTRS_44X,
1847 .cpu_user_features = COMMON_USER_BOOKE |
1848 PPC_FEATURE_HAS_FPU,
1849 .mmu_features = MMU_FTR_TYPE_44x,
1850 .icache_bsize = 32,
1851 .dcache_bsize = 32,
1852 .cpu_setup = __setup_cpu_apm821xx,
1853 .machine_check = machine_check_440A,
1854 .platform = "ppc440",
1855 },
Dave Kleikampc48d0db2011-01-26 06:17:58 +00001856 { /* 476 DD2 core */
1857 .pvr_mask = 0xffffffff,
1858 .pvr_value = 0x11a52080,
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001859 .cpu_name = "476",
Dave Kleikampc48d0db2011-01-26 06:17:58 +00001860 .cpu_features = CPU_FTRS_47X | CPU_FTR_476_DD2,
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001861 .cpu_user_features = COMMON_USER_BOOKE |
1862 PPC_FEATURE_HAS_FPU,
1863 .mmu_features = MMU_FTR_TYPE_47x |
1864 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1865 .icache_bsize = 32,
1866 .dcache_bsize = 128,
Dave Kleikampfc5e7092010-03-05 03:43:18 +00001867 .machine_check = machine_check_47x,
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001868 .platform = "ppc470",
1869 },
Tony Breedsdf777bd2011-11-30 21:39:23 +00001870 { /* 476fpe */
1871 .pvr_mask = 0xffff0000,
1872 .pvr_value = 0x7ff50000,
1873 .cpu_name = "476fpe",
1874 .cpu_features = CPU_FTRS_47X | CPU_FTR_476_DD2,
1875 .cpu_user_features = COMMON_USER_BOOKE |
1876 PPC_FEATURE_HAS_FPU,
1877 .mmu_features = MMU_FTR_TYPE_47x |
1878 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1879 .icache_bsize = 32,
1880 .dcache_bsize = 128,
1881 .machine_check = machine_check_47x,
1882 .platform = "ppc470",
1883 },
Torez Smithb4e8c8d2010-03-05 10:45:54 +00001884 { /* 476 iss */
1885 .pvr_mask = 0xffff0000,
1886 .pvr_value = 0x00050000,
1887 .cpu_name = "476",
1888 .cpu_features = CPU_FTRS_47X,
1889 .cpu_user_features = COMMON_USER_BOOKE |
1890 PPC_FEATURE_HAS_FPU,
Torez Smithb4e8c8d2010-03-05 10:45:54 +00001891 .mmu_features = MMU_FTR_TYPE_47x |
1892 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1893 .icache_bsize = 32,
1894 .dcache_bsize = 128,
1895 .machine_check = machine_check_47x,
1896 .platform = "ppc470",
1897 },
Dave Kleikampc48d0db2011-01-26 06:17:58 +00001898 { /* 476 others */
1899 .pvr_mask = 0xffff0000,
1900 .pvr_value = 0x11a50000,
1901 .cpu_name = "476",
1902 .cpu_features = CPU_FTRS_47X,
1903 .cpu_user_features = COMMON_USER_BOOKE |
1904 PPC_FEATURE_HAS_FPU,
1905 .mmu_features = MMU_FTR_TYPE_47x |
1906 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1907 .icache_bsize = 32,
1908 .dcache_bsize = 128,
1909 .machine_check = machine_check_47x,
1910 .platform = "ppc470",
1911 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001912 { /* default match */
1913 .pvr_mask = 0x00000000,
1914 .pvr_value = 0x00000000,
1915 .cpu_name = "(generic 44x PPC)",
1916 .cpu_features = CPU_FTRS_44X,
1917 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001918 .mmu_features = MMU_FTR_TYPE_44x,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001919 .icache_bsize = 32,
1920 .dcache_bsize = 32,
1921 .machine_check = machine_check_4xx,
1922 .platform = "ppc440",
1923 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001924#endif /* CONFIG_44x */
Josh Boyere3e414b2007-12-24 08:44:47 -06001925#ifdef CONFIG_E200
Stephen Rothwell49209602005-10-12 15:55:09 +10001926 { /* e200z5 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001927 .pvr_mask = 0xfff00000,
1928 .pvr_value = 0x81000000,
1929 .cpu_name = "e200z5",
1930 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001931 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001932 .cpu_user_features = COMMON_USER_BOOKE |
1933 PPC_FEATURE_HAS_EFP_SINGLE |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001934 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001935 .mmu_features = MMU_FTR_TYPE_FSL_E,
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001936 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001937 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001938 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001939 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001940 { /* e200z6 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001941 .pvr_mask = 0xfff00000,
1942 .pvr_value = 0x81100000,
1943 .cpu_name = "e200z6",
1944 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001945 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001946 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001947 PPC_FEATURE_HAS_SPE_COMP |
1948 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
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 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001955 { /* default match */
1956 .pvr_mask = 0x00000000,
1957 .pvr_value = 0x00000000,
1958 .cpu_name = "(generic E200 PPC)",
1959 .cpu_features = CPU_FTRS_E200,
1960 .cpu_user_features = COMMON_USER_BOOKE |
1961 PPC_FEATURE_HAS_EFP_SINGLE |
1962 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001963 .mmu_features = MMU_FTR_TYPE_FSL_E,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001964 .dcache_bsize = 32,
Kumar Gala105c31d2009-01-08 08:31:20 -06001965 .cpu_setup = __setup_cpu_e200,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001966 .machine_check = machine_check_e200,
1967 .platform = "ppc5554",
Paul Mackerras516c8be2008-05-12 14:20:35 +10001968 }
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001969#endif /* CONFIG_E200 */
Kumar Gala4490c062010-10-08 08:32:11 -05001970#endif /* CONFIG_PPC32 */
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001971#ifdef CONFIG_E500
Kumar Gala4490c062010-10-08 08:32:11 -05001972#ifdef CONFIG_PPC32
Stephen Rothwell49209602005-10-12 15:55:09 +10001973 { /* e500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001974 .pvr_mask = 0xffff0000,
1975 .pvr_value = 0x80200000,
1976 .cpu_name = "e500",
Kumar Gala10b35d92005-09-23 14:08:58 -05001977 .cpu_features = CPU_FTRS_E500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001978 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001979 PPC_FEATURE_HAS_SPE_COMP |
1980 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001981 .mmu_features = MMU_FTR_TYPE_FSL_E,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001982 .icache_bsize = 32,
1983 .dcache_bsize = 32,
1984 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001985 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001986 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06001987 .cpu_setup = __setup_cpu_e500v1,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001988 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001989 .platform = "ppc8540",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001990 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001991 { /* e500v2 */
Kumar Gala5b37b702005-06-21 17:15:18 -07001992 .pvr_mask = 0xffff0000,
1993 .pvr_value = 0x80210000,
1994 .cpu_name = "e500v2",
Kumar Gala10b35d92005-09-23 14:08:58 -05001995 .cpu_features = CPU_FTRS_E500_2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001996 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001997 PPC_FEATURE_HAS_SPE_COMP |
1998 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1999 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00002000 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS,
Kumar Gala5b37b702005-06-21 17:15:18 -07002001 .icache_bsize = 32,
2002 .dcache_bsize = 32,
2003 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06002004 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06002005 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06002006 .cpu_setup = __setup_cpu_e500v2,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11002007 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002008 .platform = "ppc8548",
Kumar Gala5b37b702005-06-21 17:15:18 -07002009 },
Kumar Gala3dfa8772008-06-16 09:41:32 -05002010 { /* e500mc */
2011 .pvr_mask = 0xffff0000,
2012 .pvr_value = 0x80230000,
2013 .cpu_name = "e500mc",
Kumar Gala3dfa8772008-06-16 09:41:32 -05002014 .cpu_features = CPU_FTRS_E500MC,
2015 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Kumar Galac3071952009-02-10 22:26:06 -06002016 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
Kumar Gala323d23a2009-04-23 08:51:22 -05002017 MMU_FTR_USE_TLBILX,
Kumar Gala3dfa8772008-06-16 09:41:32 -05002018 .icache_bsize = 64,
2019 .dcache_bsize = 64,
2020 .num_pmcs = 4,
Scott Wooda11106542010-02-25 18:09:45 -06002021 .oprofile_cpu_type = "ppc/e500mc",
Kumar Gala3dfa8772008-06-16 09:41:32 -05002022 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06002023 .cpu_setup = __setup_cpu_e500mc,
Scott Woodfe04b112010-04-08 00:38:22 -05002024 .machine_check = machine_check_e500mc,
Kumar Gala3dfa8772008-06-16 09:41:32 -05002025 .platform = "ppce500mc",
2026 },
Kumar Gala4490c062010-10-08 08:32:11 -05002027#endif /* CONFIG_PPC32 */
2028 { /* e5500 */
2029 .pvr_mask = 0xffff0000,
2030 .pvr_value = 0x80240000,
2031 .cpu_name = "e5500",
Kumar Gala11ed0db2011-04-06 00:11:06 -05002032 .cpu_features = CPU_FTRS_E5500,
Kumar Galafb9be232011-06-02 11:26:13 -05002033 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Kumar Gala4490c062010-10-08 08:32:11 -05002034 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
2035 MMU_FTR_USE_TLBILX,
2036 .icache_bsize = 64,
2037 .dcache_bsize = 64,
2038 .num_pmcs = 4,
2039 .oprofile_cpu_type = "ppc/e500mc",
2040 .oprofile_type = PPC_OPROFILE_FSL_EMB,
2041 .cpu_setup = __setup_cpu_e5500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05302042#ifndef CONFIG_PPC32
Kumar Gala4490c062010-10-08 08:32:11 -05002043 .cpu_restore = __restore_cpu_e5500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05302044#endif
Kumar Gala4490c062010-10-08 08:32:11 -05002045 .machine_check = machine_check_e500mc,
2046 .platform = "ppce5500",
2047 },
Kumar Gala10241842011-11-06 11:51:07 -06002048 { /* e6500 */
2049 .pvr_mask = 0xffff0000,
2050 .pvr_value = 0x80400000,
2051 .cpu_name = "e6500",
2052 .cpu_features = CPU_FTRS_E6500,
2053 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
2054 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
2055 MMU_FTR_USE_TLBILX,
2056 .icache_bsize = 64,
2057 .dcache_bsize = 64,
2058 .num_pmcs = 4,
2059 .oprofile_cpu_type = "ppc/e6500",
2060 .oprofile_type = PPC_OPROFILE_FSL_EMB,
2061 .cpu_setup = __setup_cpu_e5500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05302062#ifndef CONFIG_PPC32
Kumar Gala10241842011-11-06 11:51:07 -06002063 .cpu_restore = __restore_cpu_e5500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05302064#endif
Kumar Gala10241842011-11-06 11:51:07 -06002065 .machine_check = machine_check_e500mc,
2066 .platform = "ppce6500",
2067 },
Kumar Gala4490c062010-10-08 08:32:11 -05002068#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -07002069 { /* default match */
2070 .pvr_mask = 0x00000000,
2071 .pvr_value = 0x00000000,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002072 .cpu_name = "(generic E500 PPC)",
2073 .cpu_features = CPU_FTRS_E500,
2074 .cpu_user_features = COMMON_USER_BOOKE |
2075 PPC_FEATURE_HAS_SPE_COMP |
2076 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00002077 .mmu_features = MMU_FTR_TYPE_FSL_E,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002078 .icache_bsize = 32,
2079 .dcache_bsize = 32,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002080 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002081 .platform = "powerpc",
Paul Mackerras516c8be2008-05-12 14:20:35 +10002082 }
Stephen Rothwell49209602005-10-12 15:55:09 +10002083#endif /* CONFIG_PPC32 */
Kumar Gala4490c062010-10-08 08:32:11 -05002084#endif /* CONFIG_E500 */
Kumar Galaf45c4482009-08-18 19:08:30 +00002085
Benjamin Herrenschmidt76b4eda2011-04-14 22:32:01 +00002086#ifdef CONFIG_PPC_A2
2087 { /* Standard A2 (>= DD2) + FPU core */
2088 .pvr_mask = 0xffff0000,
2089 .pvr_value = 0x00480000,
2090 .cpu_name = "A2 (>= DD2)",
2091 .cpu_features = CPU_FTRS_A2,
2092 .cpu_user_features = COMMON_USER_PPC64,
Matt Evans44ae3ab2011-04-06 19:48:50 +00002093 .mmu_features = MMU_FTRS_A2,
Benjamin Herrenschmidt76b4eda2011-04-14 22:32:01 +00002094 .icache_bsize = 64,
2095 .dcache_bsize = 64,
2096 .num_pmcs = 0,
2097 .cpu_setup = __setup_cpu_a2,
2098 .cpu_restore = __restore_cpu_a2,
2099 .machine_check = machine_check_generic,
2100 .platform = "ppca2",
2101 },
Kumar Galaf45c4482009-08-18 19:08:30 +00002102 { /* This is a default entry to get going, to be replaced by
2103 * a real one at some stage
2104 */
2105#define CPU_FTRS_BASE_BOOK3E (CPU_FTR_USE_TB | \
2106 CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_SMT | \
2107 CPU_FTR_NODSISRALIGN | CPU_FTR_NOEXECUTE)
2108 .pvr_mask = 0x00000000,
2109 .pvr_value = 0x00000000,
2110 .cpu_name = "Book3E",
2111 .cpu_features = CPU_FTRS_BASE_BOOK3E,
2112 .cpu_user_features = COMMON_USER_PPC64,
2113 .mmu_features = MMU_FTR_TYPE_3E | MMU_FTR_USE_TLBILX |
2114 MMU_FTR_USE_TLBIVAX_BCAST |
2115 MMU_FTR_LOCK_BCAST_INVAL,
2116 .icache_bsize = 64,
2117 .dcache_bsize = 64,
2118 .num_pmcs = 0,
2119 .machine_check = machine_check_generic,
2120 .platform = "power6",
2121 },
Benjamin Herrenschmidt76b4eda2011-04-14 22:32:01 +00002122#endif /* CONFIG_PPC_A2 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002123};
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002124
Paul Mackerras87a72f92007-10-04 14:18:01 +10002125static struct cpu_spec the_cpu_spec;
2126
Scott Wood26ee9762011-07-25 11:04:36 +00002127static struct cpu_spec * __init setup_cpu_spec(unsigned long offset,
2128 struct cpu_spec *s)
Michael Ellerman666435b2009-02-22 16:25:43 +00002129{
2130 struct cpu_spec *t = &the_cpu_spec;
Michael Ellerman2657dd42009-02-22 16:25:45 +00002131 struct cpu_spec old;
2132
Michael Ellerman666435b2009-02-22 16:25:43 +00002133 t = PTRRELOC(t);
Michael Ellerman2657dd42009-02-22 16:25:45 +00002134 old = *t;
2135
2136 /* Copy everything, then do fixups */
2137 *t = *s;
Michael Ellerman666435b2009-02-22 16:25:43 +00002138
2139 /*
2140 * If we are overriding a previous value derived from the real
2141 * PVR with a new value obtained using a logical PVR value,
2142 * don't modify the performance monitor fields.
2143 */
Michael Ellerman2657dd42009-02-22 16:25:45 +00002144 if (old.num_pmcs && !s->num_pmcs) {
2145 t->num_pmcs = old.num_pmcs;
2146 t->pmc_type = old.pmc_type;
2147 t->oprofile_type = old.oprofile_type;
2148 t->oprofile_mmcra_sihv = old.oprofile_mmcra_sihv;
2149 t->oprofile_mmcra_sipr = old.oprofile_mmcra_sipr;
2150 t->oprofile_mmcra_clear = old.oprofile_mmcra_clear;
2151
Michael Ellerman666435b2009-02-22 16:25:43 +00002152 /*
2153 * If we have passed through this logic once before and
2154 * have pulled the default case because the real PVR was
2155 * not found inside cpu_specs[], then we are possibly
2156 * running in compatibility mode. In that case, let the
2157 * oprofiler know which set of compatibility counters to
2158 * pull from by making sure the oprofile_cpu_type string
2159 * is set to that of compatibility mode. If the
2160 * oprofile_cpu_type already has a value, then we are
2161 * possibly overriding a real PVR with a logical one,
2162 * and, in that case, keep the current value for
2163 * oprofile_cpu_type.
2164 */
Benjamin Herrenschmidtb173f032009-05-14 18:34:06 +00002165 if (old.oprofile_cpu_type != NULL) {
Benjamin Herrenschmidt0203d6e2009-04-29 19:39:38 +00002166 t->oprofile_cpu_type = old.oprofile_cpu_type;
2167 t->oprofile_type = old.oprofile_type;
Michael Wolf79af6c42009-04-27 06:17:54 +00002168 }
Michael Ellerman2657dd42009-02-22 16:25:45 +00002169 }
Michael Ellerman666435b2009-02-22 16:25:43 +00002170
2171 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
2172
2173 /*
2174 * Set the base platform string once; assumes
2175 * we're called with real pvr first.
2176 */
2177 if (*PTRRELOC(&powerpc_base_platform) == NULL)
2178 *PTRRELOC(&powerpc_base_platform) = t->platform;
2179
2180#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
2181 /* ppc64 and booke expect identify_cpu to also call setup_cpu for
2182 * that processor. I will consolidate that at a later time, for now,
2183 * just use #ifdef. We also don't need to PTRRELOC the function
2184 * pointer on ppc64 and booke as we are running at 0 in real mode
2185 * on ppc64 and reloc_offset is always 0 on booke.
2186 */
Benjamin Herrenschmidtaf9eef32011-01-20 20:36:03 +00002187 if (t->cpu_setup) {
2188 t->cpu_setup(offset, t);
Michael Ellerman666435b2009-02-22 16:25:43 +00002189 }
2190#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
Scott Wood26ee9762011-07-25 11:04:36 +00002191
2192 return t;
Michael Ellerman666435b2009-02-22 16:25:43 +00002193}
2194
Paul Mackerras87a72f92007-10-04 14:18:01 +10002195struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002196{
2197 struct cpu_spec *s = cpu_specs;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002198 int i;
2199
2200 s = PTRRELOC(s);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002201
Michael Ellerman666435b2009-02-22 16:25:43 +00002202 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) {
Scott Wood26ee9762011-07-25 11:04:36 +00002203 if ((pvr & s->pvr_mask) == s->pvr_value)
2204 return setup_cpu_spec(offset, s);
Michael Ellerman666435b2009-02-22 16:25:43 +00002205 }
2206
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002207 BUG();
Michael Ellerman666435b2009-02-22 16:25:43 +00002208
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002209 return NULL;
2210}