blob: 455faa389876e51f3afaa732f74949b6859ae95c [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);
Benjamin Herrenschmidt76b4eda2011-04-14 22:32:01 +000071extern void __restore_cpu_a2(void);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050072#endif /* CONFIG_PPC64 */
Kumar Gala4490c062010-10-08 08:32:11 -050073#if defined(CONFIG_E500)
74extern void __setup_cpu_e5500(unsigned long offset, struct cpu_spec* spec);
75extern void __restore_cpu_e5500(void);
76#endif /* CONFIG_E500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070077
Linus Torvalds1da177e2005-04-16 15:20:36 -070078/* This table only contains "desktop" CPUs, it need to be filled with embedded
79 * ones as well...
80 */
Stephen Rothwell49209602005-10-12 15:55:09 +100081#define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
82 PPC_FEATURE_HAS_MMU)
83#define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +110084#define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
Benjamin Herrenschmidtaa5cb0212006-03-01 15:07:07 +110085#define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
86 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
87#define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
88 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
Anton Blanchard03054d52006-04-29 09:51:06 +100089#define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
Paul Mackerrasfab5db92006-06-07 16:14:40 +100090 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
Nathan Lynch0f473312008-07-10 01:06:57 +100091 PPC_FEATURE_TRUE_LE | \
92 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Michael Neulinge952e6c2008-06-18 10:47:26 +100093#define COMMON_USER_POWER7 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
94 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
Nathan Lynch0f473312008-07-10 01:06:57 +100095 PPC_FEATURE_TRUE_LE | \
96 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -050097#define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
98 PPC_FEATURE_TRUE_LE | \
99 PPC_FEATURE_HAS_ALTIVEC_COMP)
Kumar Galaf45c4482009-08-18 19:08:30 +0000100#ifdef CONFIG_PPC_BOOK3E_64
101#define COMMON_USER_BOOKE (COMMON_USER_PPC64 | PPC_FEATURE_BOOKE)
102#else
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100103#define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
104 PPC_FEATURE_BOOKE)
Kumar Galaf45c4482009-08-18 19:08:30 +0000105#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -0700106
Paul Mackerras87a72f92007-10-04 14:18:01 +1000107static struct cpu_spec __initdata cpu_specs[] = {
Benjamin Herrenschmidt2d27cfd2009-07-23 23:15:59 +0000108#ifdef CONFIG_PPC_BOOK3S_64
Stephen Rothwell49209602005-10-12 15:55:09 +1000109 { /* Power3 */
110 .pvr_mask = 0xffff0000,
111 .pvr_value = 0x00400000,
112 .cpu_name = "POWER3 (630)",
113 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000114 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000115 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000116 .icache_bsize = 128,
117 .dcache_bsize = 128,
118 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600119 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000120 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000121 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100122 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +1000123 },
124 { /* Power3+ */
125 .pvr_mask = 0xffff0000,
126 .pvr_value = 0x00410000,
127 .cpu_name = "POWER3 (630+)",
128 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000129 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000130 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000131 .icache_bsize = 128,
132 .dcache_bsize = 128,
133 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600134 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000135 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000136 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100137 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +1000138 },
139 { /* Northstar */
140 .pvr_mask = 0xffff0000,
141 .pvr_value = 0x00330000,
142 .cpu_name = "RS64-II (northstar)",
143 .cpu_features = CPU_FTRS_RS64,
144 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000145 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000146 .icache_bsize = 128,
147 .dcache_bsize = 128,
148 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600149 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000150 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000151 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100152 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000153 },
154 { /* Pulsar */
155 .pvr_mask = 0xffff0000,
156 .pvr_value = 0x00340000,
157 .cpu_name = "RS64-III (pulsar)",
158 .cpu_features = CPU_FTRS_RS64,
159 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000160 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000161 .icache_bsize = 128,
162 .dcache_bsize = 128,
163 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600164 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000165 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000166 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100167 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000168 },
169 { /* I-star */
170 .pvr_mask = 0xffff0000,
171 .pvr_value = 0x00360000,
172 .cpu_name = "RS64-III (icestar)",
173 .cpu_features = CPU_FTRS_RS64,
174 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000175 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000176 .icache_bsize = 128,
177 .dcache_bsize = 128,
178 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600179 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000180 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000181 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100182 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000183 },
184 { /* S-star */
185 .pvr_mask = 0xffff0000,
186 .pvr_value = 0x00370000,
187 .cpu_name = "RS64-IV (sstar)",
188 .cpu_features = CPU_FTRS_RS64,
189 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000190 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000191 .icache_bsize = 128,
192 .dcache_bsize = 128,
193 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600194 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000195 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000196 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100197 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000198 },
199 { /* Power4 */
200 .pvr_mask = 0xffff0000,
201 .pvr_value = 0x00350000,
202 .cpu_name = "POWER4 (gp)",
203 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100204 .cpu_user_features = COMMON_USER_POWER4,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000205 .mmu_features = MMU_FTRS_POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000206 .icache_bsize = 128,
207 .dcache_bsize = 128,
208 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600209 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000210 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000211 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100212 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000213 },
214 { /* Power4+ */
215 .pvr_mask = 0xffff0000,
216 .pvr_value = 0x00380000,
217 .cpu_name = "POWER4+ (gq)",
218 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100219 .cpu_user_features = COMMON_USER_POWER4,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000220 .mmu_features = MMU_FTRS_POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000221 .icache_bsize = 128,
222 .dcache_bsize = 128,
223 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600224 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000225 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000226 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100227 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000228 },
229 { /* PPC970 */
230 .pvr_mask = 0xffff0000,
231 .pvr_value = 0x00390000,
232 .cpu_name = "PPC970",
233 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100234 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000235 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000236 .mmu_features = MMU_FTRS_PPC970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000237 .icache_bsize = 128,
238 .dcache_bsize = 128,
239 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600240 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000241 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500242 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000243 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000244 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100245 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000246 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000247 { /* PPC970FX */
248 .pvr_mask = 0xffff0000,
249 .pvr_value = 0x003c0000,
250 .cpu_name = "PPC970FX",
Stephen Rothwell49209602005-10-12 15:55:09 +1000251 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100252 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000253 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000254 .mmu_features = MMU_FTRS_PPC970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000255 .icache_bsize = 128,
256 .dcache_bsize = 128,
257 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600258 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000259 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500260 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000261 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000262 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100263 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000264 },
Olof Johansson3546e812007-02-26 00:35:14 -0600265 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
266 .pvr_mask = 0xffffffff,
267 .pvr_value = 0x00440100,
268 .cpu_name = "PPC970MP",
269 .cpu_features = CPU_FTRS_PPC970,
270 .cpu_user_features = COMMON_USER_POWER4 |
271 PPC_FEATURE_HAS_ALTIVEC_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000272 .mmu_features = MMU_FTR_HPTE_TABLE,
Olof Johansson3546e812007-02-26 00:35:14 -0600273 .icache_bsize = 128,
274 .dcache_bsize = 128,
275 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000276 .pmc_type = PPC_PMC_IBM,
Olof Johansson3546e812007-02-26 00:35:14 -0600277 .cpu_setup = __setup_cpu_ppc970,
278 .cpu_restore = __restore_cpu_ppc970,
279 .oprofile_cpu_type = "ppc64/970MP",
280 .oprofile_type = PPC_OPROFILE_POWER4,
281 .platform = "ppc970",
282 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000283 { /* PPC970MP */
284 .pvr_mask = 0xffff0000,
285 .pvr_value = 0x00440000,
286 .cpu_name = "PPC970MP",
287 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100288 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000289 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000290 .mmu_features = MMU_FTRS_PPC970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000291 .icache_bsize = 128,
292 .dcache_bsize = 128,
Anton Blanchard87af41b2006-05-05 05:44:26 +1000293 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000294 .pmc_type = PPC_PMC_IBM,
Olof Johansson5b43d202006-10-04 23:41:41 -0500295 .cpu_setup = __setup_cpu_ppc970MP,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500296 .cpu_restore = __restore_cpu_ppc970,
Mike Wolffecb3522006-11-21 14:41:54 -0600297 .oprofile_cpu_type = "ppc64/970MP",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000298 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100299 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000300 },
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500301 { /* PPC970GX */
302 .pvr_mask = 0xffff0000,
303 .pvr_value = 0x00450000,
304 .cpu_name = "PPC970GX",
305 .cpu_features = CPU_FTRS_PPC970,
306 .cpu_user_features = COMMON_USER_POWER4 |
307 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000308 .mmu_features = MMU_FTRS_PPC970,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500309 .icache_bsize = 128,
310 .dcache_bsize = 128,
311 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600312 .pmc_type = PPC_PMC_IBM,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500313 .cpu_setup = __setup_cpu_ppc970,
314 .oprofile_cpu_type = "ppc64/970",
315 .oprofile_type = PPC_OPROFILE_POWER4,
316 .platform = "ppc970",
317 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100318 { /* Power5 GR */
Stephen Rothwell49209602005-10-12 15:55:09 +1000319 .pvr_mask = 0xffff0000,
320 .pvr_value = 0x003a0000,
321 .cpu_name = "POWER5 (gr)",
322 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100323 .cpu_user_features = COMMON_USER_POWER5,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000324 .mmu_features = MMU_FTRS_POWER5,
Stephen Rothwell49209602005-10-12 15:55:09 +1000325 .icache_bsize = 128,
326 .dcache_bsize = 128,
327 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600328 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000329 .oprofile_cpu_type = "ppc64/power5",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000330 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000331 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
332 * and above but only works on POWER5 and above
333 */
334 .oprofile_mmcra_sihv = MMCRA_SIHV,
335 .oprofile_mmcra_sipr = MMCRA_SIPR,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100336 .platform = "power5",
Stephen Rothwell49209602005-10-12 15:55:09 +1000337 },
Mike Wolf31a12ce2007-07-10 13:13:47 -0500338 { /* Power5++ */
339 .pvr_mask = 0xffffff00,
340 .pvr_value = 0x003b0300,
341 .cpu_name = "POWER5+ (gs)",
342 .cpu_features = CPU_FTRS_POWER5,
343 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000344 .mmu_features = MMU_FTRS_POWER5,
Mike Wolf31a12ce2007-07-10 13:13:47 -0500345 .icache_bsize = 128,
346 .dcache_bsize = 128,
347 .num_pmcs = 6,
348 .oprofile_cpu_type = "ppc64/power5++",
349 .oprofile_type = PPC_OPROFILE_POWER4,
350 .oprofile_mmcra_sihv = MMCRA_SIHV,
351 .oprofile_mmcra_sipr = MMCRA_SIPR,
352 .platform = "power5+",
353 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100354 { /* Power5 GS */
Stephen Rothwell49209602005-10-12 15:55:09 +1000355 .pvr_mask = 0xffff0000,
356 .pvr_value = 0x003b0000,
Anton Blanchard834608f2006-01-09 15:42:30 +1100357 .cpu_name = "POWER5+ (gs)",
Stephen Rothwell49209602005-10-12 15:55:09 +1000358 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100359 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000360 .mmu_features = MMU_FTRS_POWER5,
Stephen Rothwell49209602005-10-12 15:55:09 +1000361 .icache_bsize = 128,
362 .dcache_bsize = 128,
363 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600364 .pmc_type = PPC_PMC_IBM,
Anton Blanchard834608f2006-01-09 15:42:30 +1100365 .oprofile_cpu_type = "ppc64/power5+",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000366 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000367 .oprofile_mmcra_sihv = MMCRA_SIHV,
368 .oprofile_mmcra_sipr = MMCRA_SIPR,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100369 .platform = "power5+",
Stephen Rothwell49209602005-10-12 15:55:09 +1000370 },
Paul Mackerras974a76f2006-11-10 20:38:53 +1100371 { /* POWER6 in P5+ mode; 2.04-compliant processor */
372 .pvr_mask = 0xffffffff,
373 .pvr_value = 0x0f000001,
374 .cpu_name = "POWER5+",
375 .cpu_features = CPU_FTRS_POWER5,
376 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000377 .mmu_features = MMU_FTRS_POWER5,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100378 .icache_bsize = 128,
379 .dcache_bsize = 128,
Michael Wolf79af6c42009-04-27 06:17:54 +0000380 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
381 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100382 .platform = "power5+",
383 },
Anton Blanchard03054d52006-04-29 09:51:06 +1000384 { /* Power6 */
385 .pvr_mask = 0xffff0000,
386 .pvr_value = 0x003e0000,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100387 .cpu_name = "POWER6 (raw)",
388 .cpu_features = CPU_FTRS_POWER6,
389 .cpu_user_features = COMMON_USER_POWER6 |
390 PPC_FEATURE_POWER6_EXT,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000391 .mmu_features = MMU_FTRS_POWER6,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100392 .icache_bsize = 128,
393 .dcache_bsize = 128,
394 .num_pmcs = 6,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000395 .pmc_type = PPC_PMC_IBM,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100396 .oprofile_cpu_type = "ppc64/power6",
397 .oprofile_type = PPC_OPROFILE_POWER4,
398 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
399 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
400 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
401 POWER6_MMCRA_OTHER,
402 .platform = "power6x",
403 },
404 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
405 .pvr_mask = 0xffffffff,
406 .pvr_value = 0x0f000002,
407 .cpu_name = "POWER6 (architected)",
Anton Blanchard03054d52006-04-29 09:51:06 +1000408 .cpu_features = CPU_FTRS_POWER6,
409 .cpu_user_features = COMMON_USER_POWER6,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000410 .mmu_features = MMU_FTRS_POWER6,
Anton Blanchard03054d52006-04-29 09:51:06 +1000411 .icache_bsize = 128,
412 .dcache_bsize = 128,
Michael Wolf79af6c42009-04-27 06:17:54 +0000413 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
414 .oprofile_type = PPC_OPROFILE_POWER4,
Anton Blanchard03054d52006-04-29 09:51:06 +1000415 .platform = "power6",
416 },
Joel Schopp635f5a62008-06-19 06:18:21 +1000417 { /* 2.06-compliant processor, i.e. Power7 "architected" mode */
418 .pvr_mask = 0xffffffff,
419 .pvr_value = 0x0f000003,
420 .cpu_name = "POWER7 (architected)",
421 .cpu_features = CPU_FTRS_POWER7,
422 .cpu_user_features = COMMON_USER_POWER7,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000423 .mmu_features = MMU_FTRS_POWER7,
Joel Schopp635f5a62008-06-19 06:18:21 +1000424 .icache_bsize = 128,
425 .dcache_bsize = 128,
Michael Wolf79af6c42009-04-27 06:17:54 +0000426 .oprofile_type = PPC_OPROFILE_POWER4,
427 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
Benjamin Herrenschmidt24cc67d2011-01-20 18:50:55 +1100428 .cpu_setup = __setup_cpu_power7,
429 .cpu_restore = __restore_cpu_power7,
Joel Schopp635f5a62008-06-19 06:18:21 +1000430 .platform = "power7",
431 },
Michael Neulinge952e6c2008-06-18 10:47:26 +1000432 { /* Power7 */
433 .pvr_mask = 0xffff0000,
434 .pvr_value = 0x003f0000,
Joel Schopp635f5a62008-06-19 06:18:21 +1000435 .cpu_name = "POWER7 (raw)",
Michael Neulinge952e6c2008-06-18 10:47:26 +1000436 .cpu_features = CPU_FTRS_POWER7,
437 .cpu_user_features = COMMON_USER_POWER7,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000438 .mmu_features = MMU_FTRS_POWER7,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000439 .icache_bsize = 128,
440 .dcache_bsize = 128,
441 .num_pmcs = 6,
442 .pmc_type = PPC_PMC_IBM,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000443 .oprofile_cpu_type = "ppc64/power7",
444 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt24cc67d2011-01-20 18:50:55 +1100445 .cpu_setup = __setup_cpu_power7,
446 .cpu_restore = __restore_cpu_power7,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000447 .platform = "power7",
448 },
Michael Neuling6f08cb32010-11-17 18:52:44 +0000449 { /* Power7+ */
450 .pvr_mask = 0xffff0000,
451 .pvr_value = 0x004A0000,
452 .cpu_name = "POWER7+ (raw)",
453 .cpu_features = CPU_FTRS_POWER7,
454 .cpu_user_features = COMMON_USER_POWER7,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000455 .mmu_features = MMU_FTRS_POWER7,
Michael Neuling6f08cb32010-11-17 18:52:44 +0000456 .icache_bsize = 128,
457 .dcache_bsize = 128,
458 .num_pmcs = 6,
459 .pmc_type = PPC_PMC_IBM,
460 .oprofile_cpu_type = "ppc64/power7",
461 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt24cc67d2011-01-20 18:50:55 +1100462 .cpu_setup = __setup_cpu_power7,
463 .cpu_restore = __restore_cpu_power7,
Michael Neuling6f08cb32010-11-17 18:52:44 +0000464 .platform = "power7+",
465 },
Arnd Bergmannc902be72006-01-04 19:55:53 +0000466 { /* Cell Broadband Engine */
Stephen Rothwell49209602005-10-12 15:55:09 +1000467 .pvr_mask = 0xffff0000,
468 .pvr_value = 0x00700000,
469 .cpu_name = "Cell Broadband Engine",
470 .cpu_features = CPU_FTRS_CELL,
471 .cpu_user_features = COMMON_USER_PPC64 |
Benjamin Herrenschmidtaa5cb0212006-03-01 15:07:07 +1100472 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
473 PPC_FEATURE_SMT,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000474 .mmu_features = MMU_FTRS_CELL,
Stephen Rothwell49209602005-10-12 15:55:09 +1000475 .icache_bsize = 128,
476 .dcache_bsize = 128,
Maynard Johnson18f21902006-11-20 18:45:16 +0100477 .num_pmcs = 4,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600478 .pmc_type = PPC_PMC_IBM,
Maynard Johnson18f21902006-11-20 18:45:16 +0100479 .oprofile_cpu_type = "ppc64/cell-be",
480 .oprofile_type = PPC_OPROFILE_CELL,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100481 .platform = "ppc-cell-be",
Stephen Rothwell49209602005-10-12 15:55:09 +1000482 },
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500483 { /* PA Semi PA6T */
484 .pvr_mask = 0x7fff0000,
485 .pvr_value = 0x00900000,
486 .cpu_name = "PA6T",
487 .cpu_features = CPU_FTRS_PA6T,
488 .cpu_user_features = COMMON_USER_PA6T,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000489 .mmu_features = MMU_FTRS_PA6T,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500490 .icache_bsize = 64,
491 .dcache_bsize = 64,
492 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600493 .pmc_type = PPC_PMC_PA6T,
Olof Johansson11999192007-02-04 16:36:51 -0600494 .cpu_setup = __setup_cpu_pa6t,
495 .cpu_restore = __restore_cpu_pa6t,
Olof Johansson25fc5302007-04-18 16:38:21 +1000496 .oprofile_cpu_type = "ppc64/pa6t",
497 .oprofile_type = PPC_OPROFILE_PA6T,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500498 .platform = "pa6t",
499 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000500 { /* default match */
501 .pvr_mask = 0x00000000,
502 .pvr_value = 0x00000000,
503 .cpu_name = "POWER4 (compatible)",
504 .cpu_features = CPU_FTRS_COMPATIBLE,
505 .cpu_user_features = COMMON_USER_PPC64,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000506 .mmu_features = MMU_FTRS_DEFAULT_HPTE_ARCH_V2,
Stephen Rothwell49209602005-10-12 15:55:09 +1000507 .icache_bsize = 128,
508 .dcache_bsize = 128,
509 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600510 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100511 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000512 }
Benjamin Herrenschmidt2d27cfd2009-07-23 23:15:59 +0000513#endif /* CONFIG_PPC_BOOK3S_64 */
Benjamin Herrenschmidt2d27cfd2009-07-23 23:15:59 +0000514
Stephen Rothwell49209602005-10-12 15:55:09 +1000515#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -0700516#if CLASSIC_PPC
Stephen Rothwell49209602005-10-12 15:55:09 +1000517 { /* 601 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700518 .pvr_mask = 0xffff0000,
519 .pvr_value = 0x00010000,
520 .cpu_name = "601",
Kumar Gala10b35d92005-09-23 14:08:58 -0500521 .cpu_features = CPU_FTRS_PPC601,
Stephen Rothwell49209602005-10-12 15:55:09 +1000522 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
Paul Mackerras98599012005-10-22 16:51:34 +1000523 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000524 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700525 .icache_bsize = 32,
526 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100527 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100528 .platform = "ppc601",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700529 },
530 { /* 603 */
531 .pvr_mask = 0xffff0000,
532 .pvr_value = 0x00030000,
533 .cpu_name = "603",
Kumar Gala10b35d92005-09-23 14:08:58 -0500534 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000535 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000536 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700537 .icache_bsize = 32,
538 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100539 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100540 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100541 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700542 },
543 { /* 603e */
544 .pvr_mask = 0xffff0000,
545 .pvr_value = 0x00060000,
546 .cpu_name = "603e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500547 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000548 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000549 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700550 .icache_bsize = 32,
551 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100552 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100553 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100554 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700555 },
556 { /* 603ev */
557 .pvr_mask = 0xffff0000,
558 .pvr_value = 0x00070000,
559 .cpu_name = "603ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500560 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000561 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000562 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700563 .icache_bsize = 32,
564 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100565 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100566 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100567 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700568 },
569 { /* 604 */
570 .pvr_mask = 0xffff0000,
571 .pvr_value = 0x00040000,
572 .cpu_name = "604",
Kumar Gala10b35d92005-09-23 14:08:58 -0500573 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000574 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000575 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700576 .icache_bsize = 32,
577 .dcache_bsize = 32,
578 .num_pmcs = 2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100579 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100580 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100581 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700582 },
583 { /* 604e */
584 .pvr_mask = 0xfffff000,
585 .pvr_value = 0x00090000,
586 .cpu_name = "604e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500587 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000588 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000589 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700590 .icache_bsize = 32,
591 .dcache_bsize = 32,
592 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100593 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100594 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100595 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700596 },
597 { /* 604r */
598 .pvr_mask = 0xffff0000,
599 .pvr_value = 0x00090000,
600 .cpu_name = "604r",
Kumar Gala10b35d92005-09-23 14:08:58 -0500601 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000602 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000603 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700604 .icache_bsize = 32,
605 .dcache_bsize = 32,
606 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100607 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100608 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100609 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700610 },
611 { /* 604ev */
612 .pvr_mask = 0xffff0000,
613 .pvr_value = 0x000a0000,
614 .cpu_name = "604ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500615 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000616 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000617 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700618 .icache_bsize = 32,
619 .dcache_bsize = 32,
620 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100621 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100622 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100623 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700624 },
625 { /* 740/750 (0x4202, don't support TAU ?) */
626 .pvr_mask = 0xffffffff,
627 .pvr_value = 0x00084202,
628 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500629 .cpu_features = CPU_FTRS_740_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000630 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000631 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700632 .icache_bsize = 32,
633 .dcache_bsize = 32,
634 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100635 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100636 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100637 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700638 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700639 { /* 750CX (80100 and 8010x?) */
640 .pvr_mask = 0xfffffff0,
641 .pvr_value = 0x00080100,
642 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500643 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000644 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000645 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700646 .icache_bsize = 32,
647 .dcache_bsize = 32,
648 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100649 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100650 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100651 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700652 },
653 { /* 750CX (82201 and 82202) */
654 .pvr_mask = 0xfffffff0,
655 .pvr_value = 0x00082200,
656 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500657 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000658 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000659 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700660 .icache_bsize = 32,
661 .dcache_bsize = 32,
662 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000663 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100664 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100665 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100666 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700667 },
668 { /* 750CXe (82214) */
669 .pvr_mask = 0xfffffff0,
670 .pvr_value = 0x00082210,
671 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500672 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000673 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000674 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700675 .icache_bsize = 32,
676 .dcache_bsize = 32,
677 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000678 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100679 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100680 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100681 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700682 },
Arthur Othieno7c316252005-09-03 15:55:52 -0700683 { /* 750CXe "Gekko" (83214) */
684 .pvr_mask = 0xffffffff,
685 .pvr_value = 0x00083214,
686 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500687 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000688 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000689 .mmu_features = MMU_FTR_HPTE_TABLE,
Arthur Othieno7c316252005-09-03 15:55:52 -0700690 .icache_bsize = 32,
691 .dcache_bsize = 32,
692 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000693 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100694 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100695 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100696 .platform = "ppc750",
Arthur Othieno7c316252005-09-03 15:55:52 -0700697 },
Albert Herranz45158dc2009-12-12 06:31:46 +0000698 { /* 750CL (and "Broadway") */
699 .pvr_mask = 0xfffff0e0,
700 .pvr_value = 0x00087000,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500701 .cpu_name = "750CL",
Josh Boyera14c4502007-04-13 04:33:25 +1000702 .cpu_features = CPU_FTRS_750CL,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500703 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000704 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500705 .icache_bsize = 32,
706 .dcache_bsize = 32,
707 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000708 .pmc_type = PPC_PMC_IBM,
Josh Boyera14c4502007-04-13 04:33:25 +1000709 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100710 .machine_check = machine_check_generic,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500711 .platform = "ppc750",
Dragos Tatulea04f56534772009-09-16 11:58:15 +0300712 .oprofile_cpu_type = "ppc/750",
713 .oprofile_type = PPC_OPROFILE_G4,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500714 },
Arthur Othienoac1ff042005-09-03 15:55:51 -0700715 { /* 745/755 */
716 .pvr_mask = 0xfffff000,
717 .pvr_value = 0x00083000,
718 .cpu_name = "745/755",
Kumar Gala10b35d92005-09-23 14:08:58 -0500719 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000720 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000721 .mmu_features = MMU_FTR_HPTE_TABLE,
Arthur Othienoac1ff042005-09-03 15:55:51 -0700722 .icache_bsize = 32,
723 .dcache_bsize = 32,
724 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000725 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100726 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100727 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100728 .platform = "ppc750",
Arthur Othienoac1ff042005-09-03 15:55:51 -0700729 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700730 { /* 750FX rev 1.x */
731 .pvr_mask = 0xffffff00,
732 .pvr_value = 0x70000100,
733 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500734 .cpu_features = CPU_FTRS_750FX1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000735 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000736 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700737 .icache_bsize = 32,
738 .dcache_bsize = 32,
739 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000740 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100741 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100742 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100743 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000744 .oprofile_cpu_type = "ppc/750",
745 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700746 },
747 { /* 750FX rev 2.0 must disable HID0[DPM] */
748 .pvr_mask = 0xffffffff,
749 .pvr_value = 0x70000200,
750 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500751 .cpu_features = CPU_FTRS_750FX2,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000752 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000753 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700754 .icache_bsize = 32,
755 .dcache_bsize = 32,
756 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000757 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100758 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100759 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100760 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000761 .oprofile_cpu_type = "ppc/750",
762 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700763 },
764 { /* 750FX (All revs except 2.0) */
765 .pvr_mask = 0xffff0000,
766 .pvr_value = 0x70000000,
767 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500768 .cpu_features = CPU_FTRS_750FX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000769 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000770 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700771 .icache_bsize = 32,
772 .dcache_bsize = 32,
773 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000774 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100775 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100776 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100777 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000778 .oprofile_cpu_type = "ppc/750",
779 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700780 },
781 { /* 750GX */
782 .pvr_mask = 0xffff0000,
783 .pvr_value = 0x70020000,
784 .cpu_name = "750GX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500785 .cpu_features = CPU_FTRS_750GX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000786 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000787 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700788 .icache_bsize = 32,
789 .dcache_bsize = 32,
790 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000791 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100792 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100793 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100794 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000795 .oprofile_cpu_type = "ppc/750",
796 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700797 },
798 { /* 740/750 (L2CR bit need fixup for 740) */
799 .pvr_mask = 0xffff0000,
800 .pvr_value = 0x00080000,
801 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500802 .cpu_features = CPU_FTRS_740,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000803 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000804 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700805 .icache_bsize = 32,
806 .dcache_bsize = 32,
807 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000808 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100809 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100810 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100811 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700812 },
813 { /* 7400 rev 1.1 ? (no TAU) */
814 .pvr_mask = 0xffffffff,
815 .pvr_value = 0x000c1101,
816 .cpu_name = "7400 (1.1)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500817 .cpu_features = CPU_FTRS_7400_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000818 .cpu_user_features = COMMON_USER |
819 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000820 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700821 .icache_bsize = 32,
822 .dcache_bsize = 32,
823 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000824 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100825 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100826 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100827 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700828 },
829 { /* 7400 */
830 .pvr_mask = 0xffff0000,
831 .pvr_value = 0x000c0000,
832 .cpu_name = "7400",
Kumar Gala10b35d92005-09-23 14:08:58 -0500833 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000834 .cpu_user_features = COMMON_USER |
835 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000836 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700837 .icache_bsize = 32,
838 .dcache_bsize = 32,
839 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000840 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100841 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100842 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100843 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700844 },
845 { /* 7410 */
846 .pvr_mask = 0xffff0000,
847 .pvr_value = 0x800c0000,
848 .cpu_name = "7410",
Kumar Gala10b35d92005-09-23 14:08:58 -0500849 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000850 .cpu_user_features = COMMON_USER |
851 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000852 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700853 .icache_bsize = 32,
854 .dcache_bsize = 32,
855 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000856 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100857 .cpu_setup = __setup_cpu_7410,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100858 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100859 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700860 },
861 { /* 7450 2.0 - no doze/nap */
862 .pvr_mask = 0xffffffff,
863 .pvr_value = 0x80000200,
864 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500865 .cpu_features = CPU_FTRS_7450_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000866 .cpu_user_features = COMMON_USER |
867 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000868 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700869 .icache_bsize = 32,
870 .dcache_bsize = 32,
871 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000872 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600873 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600874 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000875 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100876 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100877 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700878 },
879 { /* 7450 2.1 */
880 .pvr_mask = 0xffffffff,
881 .pvr_value = 0x80000201,
882 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500883 .cpu_features = CPU_FTRS_7450_21,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000884 .cpu_user_features = COMMON_USER |
885 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000886 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700887 .icache_bsize = 32,
888 .dcache_bsize = 32,
889 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000890 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600891 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600892 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000893 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100894 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100895 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700896 },
897 { /* 7450 2.3 and newer */
898 .pvr_mask = 0xffff0000,
899 .pvr_value = 0x80000000,
900 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500901 .cpu_features = CPU_FTRS_7450_23,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000902 .cpu_user_features = COMMON_USER |
903 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000904 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700905 .icache_bsize = 32,
906 .dcache_bsize = 32,
907 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000908 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600909 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600910 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000911 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100912 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100913 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700914 },
915 { /* 7455 rev 1.x */
916 .pvr_mask = 0xffffff00,
917 .pvr_value = 0x80010100,
918 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500919 .cpu_features = CPU_FTRS_7455_1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000920 .cpu_user_features = COMMON_USER |
921 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000922 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700923 .icache_bsize = 32,
924 .dcache_bsize = 32,
925 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000926 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600927 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600928 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000929 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100930 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100931 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700932 },
933 { /* 7455 rev 2.0 */
934 .pvr_mask = 0xffffffff,
935 .pvr_value = 0x80010200,
936 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500937 .cpu_features = CPU_FTRS_7455_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000938 .cpu_user_features = COMMON_USER |
939 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000940 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700941 .icache_bsize = 32,
942 .dcache_bsize = 32,
943 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000944 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600945 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600946 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000947 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100948 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100949 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700950 },
951 { /* 7455 others */
952 .pvr_mask = 0xffff0000,
953 .pvr_value = 0x80010000,
954 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500955 .cpu_features = CPU_FTRS_7455,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000956 .cpu_user_features = COMMON_USER |
957 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000958 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700959 .icache_bsize = 32,
960 .dcache_bsize = 32,
961 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000962 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600963 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600964 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000965 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100966 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100967 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700968 },
969 { /* 7447/7457 Rev 1.0 */
970 .pvr_mask = 0xffffffff,
971 .pvr_value = 0x80020100,
972 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500973 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000974 .cpu_user_features = COMMON_USER |
975 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000976 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700977 .icache_bsize = 32,
978 .dcache_bsize = 32,
979 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000980 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600981 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600982 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000983 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100984 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100985 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700986 },
987 { /* 7447/7457 Rev 1.1 */
988 .pvr_mask = 0xffffffff,
989 .pvr_value = 0x80020101,
990 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500991 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000992 .cpu_user_features = COMMON_USER |
993 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000994 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700995 .icache_bsize = 32,
996 .dcache_bsize = 32,
997 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000998 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600999 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001000 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001001 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001002 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001003 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001004 },
1005 { /* 7447/7457 Rev 1.2 and later */
1006 .pvr_mask = 0xffff0000,
1007 .pvr_value = 0x80020000,
1008 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -05001009 .cpu_features = CPU_FTRS_7447,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001010 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001011 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001012 .icache_bsize = 32,
1013 .dcache_bsize = 32,
1014 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001015 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001016 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001017 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001018 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001019 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001020 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001021 },
1022 { /* 7447A */
1023 .pvr_mask = 0xffff0000,
1024 .pvr_value = 0x80030000,
1025 .cpu_name = "7447A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001026 .cpu_features = CPU_FTRS_7447A,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001027 .cpu_user_features = COMMON_USER |
1028 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001029 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001030 .icache_bsize = 32,
1031 .dcache_bsize = 32,
1032 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001033 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001034 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001035 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001036 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001037 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001038 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001039 },
Kumar Galabbde6302005-09-03 15:55:55 -07001040 { /* 7448 */
1041 .pvr_mask = 0xffff0000,
1042 .pvr_value = 0x80040000,
1043 .cpu_name = "7448",
James.Yang3d372542007-05-02 16:34:43 -05001044 .cpu_features = CPU_FTRS_7448,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001045 .cpu_user_features = COMMON_USER |
1046 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001047 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Kumar Galabbde6302005-09-03 15:55:55 -07001048 .icache_bsize = 32,
1049 .dcache_bsize = 32,
1050 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001051 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001052 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001053 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001054 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001055 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001056 .platform = "ppc7450",
Kumar Galabbde6302005-09-03 15:55:55 -07001057 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001058 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
1059 .pvr_mask = 0x7fff0000,
1060 .pvr_value = 0x00810000,
1061 .cpu_name = "82xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001062 .cpu_features = CPU_FTRS_82XX,
Stephen Rothwell49209602005-10-12 15:55:09 +10001063 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001064 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001065 .icache_bsize = 32,
1066 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001067 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001068 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001069 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001070 },
1071 { /* All G2_LE (603e core, plus some) have the same pvr */
1072 .pvr_mask = 0x7fff0000,
1073 .pvr_value = 0x00820000,
1074 .cpu_name = "G2_LE",
Kumar Gala10b35d92005-09-23 14:08:58 -05001075 .cpu_features = CPU_FTRS_G2_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +10001076 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001077 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001078 .icache_bsize = 32,
1079 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001080 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001081 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001082 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001083 },
Kim Phillips6c4a2502006-10-02 20:10:24 -05001084 { /* e300c1 (a 603e core, plus some) on 83xx */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001085 .pvr_mask = 0x7fff0000,
1086 .pvr_value = 0x00830000,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001087 .cpu_name = "e300c1",
Kumar Gala10b35d92005-09-23 14:08:58 -05001088 .cpu_features = CPU_FTRS_E300,
Stephen Rothwell49209602005-10-12 15:55:09 +10001089 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001090 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001091 .icache_bsize = 32,
1092 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001093 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001094 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001095 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001096 },
Kim Phillips6c4a2502006-10-02 20:10:24 -05001097 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
1098 .pvr_mask = 0x7fff0000,
1099 .pvr_value = 0x00840000,
1100 .cpu_name = "e300c2",
Kim Phillipsaa42c692006-12-08 02:43:30 -06001101 .cpu_features = CPU_FTRS_E300C2,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001102 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Kumar Gala2319f122009-03-19 03:55:41 +00001103 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1104 MMU_FTR_NEED_DTLB_SW_LRU,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001105 .icache_bsize = 32,
1106 .dcache_bsize = 32,
1107 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001108 .machine_check = machine_check_generic,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001109 .platform = "ppc603",
1110 },
Li Yanga58d5242007-10-19 19:38:42 +08001111 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
Scott Wood57933f82006-12-01 12:57:05 -06001112 .pvr_mask = 0x7fff0000,
1113 .pvr_value = 0x00850000,
1114 .cpu_name = "e300c3",
1115 .cpu_features = CPU_FTRS_E300,
1116 .cpu_user_features = COMMON_USER,
Kumar Gala2319f122009-03-19 03:55:41 +00001117 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1118 MMU_FTR_NEED_DTLB_SW_LRU,
Scott Wood57933f82006-12-01 12:57:05 -06001119 .icache_bsize = 32,
1120 .dcache_bsize = 32,
1121 .cpu_setup = __setup_cpu_603,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001122 .num_pmcs = 4,
1123 .oprofile_cpu_type = "ppc/e300",
1124 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Scott Wood57933f82006-12-01 12:57:05 -06001125 .platform = "ppc603",
1126 },
Li Yanga58d5242007-10-19 19:38:42 +08001127 { /* e300c4 (e300c1, plus one IU) */
1128 .pvr_mask = 0x7fff0000,
1129 .pvr_value = 0x00860000,
1130 .cpu_name = "e300c4",
1131 .cpu_features = CPU_FTRS_E300,
1132 .cpu_user_features = COMMON_USER,
Kumar Gala2319f122009-03-19 03:55:41 +00001133 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1134 MMU_FTR_NEED_DTLB_SW_LRU,
Li Yanga58d5242007-10-19 19:38:42 +08001135 .icache_bsize = 32,
1136 .dcache_bsize = 32,
1137 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001138 .machine_check = machine_check_generic,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001139 .num_pmcs = 4,
1140 .oprofile_cpu_type = "ppc/e300",
1141 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Li Yanga58d5242007-10-19 19:38:42 +08001142 .platform = "ppc603",
1143 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001144 { /* default match, we assume split I/D cache & TB (non-601)... */
1145 .pvr_mask = 0x00000000,
1146 .pvr_value = 0x00000000,
1147 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -05001148 .cpu_features = CPU_FTRS_CLASSIC32,
Stephen Rothwell49209602005-10-12 15:55:09 +10001149 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001150 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001151 .icache_bsize = 32,
1152 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001153 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001154 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001155 },
1156#endif /* CLASSIC_PPC */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001157#ifdef CONFIG_8xx
1158 { /* 8xx */
1159 .pvr_mask = 0xffff0000,
1160 .pvr_value = 0x00500000,
1161 .cpu_name = "8xx",
1162 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1163 * if the 8xx code is there.... */
Kumar Gala10b35d92005-09-23 14:08:58 -05001164 .cpu_features = CPU_FTRS_8XX,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001165 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001166 .mmu_features = MMU_FTR_TYPE_8xx,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001167 .icache_bsize = 16,
1168 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001169 .platform = "ppc823",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001170 },
1171#endif /* CONFIG_8xx */
1172#ifdef CONFIG_40x
1173 { /* 403GC */
1174 .pvr_mask = 0xffffff00,
1175 .pvr_value = 0x00200200,
1176 .cpu_name = "403GC",
Kumar Gala10b35d92005-09-23 14:08:58 -05001177 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001178 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001179 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001180 .icache_bsize = 16,
1181 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001182 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001183 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001184 },
1185 { /* 403GCX */
1186 .pvr_mask = 0xffffff00,
1187 .pvr_value = 0x00201400,
1188 .cpu_name = "403GCX",
Kumar Gala10b35d92005-09-23 14:08:58 -05001189 .cpu_features = CPU_FTRS_40X,
Paul Mackerras98599012005-10-22 16:51:34 +10001190 .cpu_user_features = PPC_FEATURE_32 |
1191 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001192 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001193 .icache_bsize = 16,
1194 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001195 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001196 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001197 },
1198 { /* 403G ?? */
1199 .pvr_mask = 0xffff0000,
1200 .pvr_value = 0x00200000,
1201 .cpu_name = "403G ??",
Kumar Gala10b35d92005-09-23 14:08:58 -05001202 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001203 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001204 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001205 .icache_bsize = 16,
1206 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001207 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001208 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001209 },
1210 { /* 405GP */
1211 .pvr_mask = 0xffff0000,
1212 .pvr_value = 0x40110000,
1213 .cpu_name = "405GP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001214 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001215 .cpu_user_features = PPC_FEATURE_32 |
1216 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001217 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001218 .icache_bsize = 32,
1219 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001220 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001221 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001222 },
1223 { /* STB 03xxx */
1224 .pvr_mask = 0xffff0000,
1225 .pvr_value = 0x40130000,
1226 .cpu_name = "STB03xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001227 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001228 .cpu_user_features = PPC_FEATURE_32 |
1229 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001230 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001231 .icache_bsize = 32,
1232 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001233 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001234 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001235 },
1236 { /* STB 04xxx */
1237 .pvr_mask = 0xffff0000,
1238 .pvr_value = 0x41810000,
1239 .cpu_name = "STB04xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001240 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001241 .cpu_user_features = PPC_FEATURE_32 |
1242 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001243 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001244 .icache_bsize = 32,
1245 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001246 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001247 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001248 },
1249 { /* NP405L */
1250 .pvr_mask = 0xffff0000,
1251 .pvr_value = 0x41610000,
1252 .cpu_name = "NP405L",
Kumar Gala10b35d92005-09-23 14:08:58 -05001253 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001254 .cpu_user_features = PPC_FEATURE_32 |
1255 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001256 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001257 .icache_bsize = 32,
1258 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001259 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001260 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001261 },
1262 { /* NP4GS3 */
1263 .pvr_mask = 0xffff0000,
1264 .pvr_value = 0x40B10000,
1265 .cpu_name = "NP4GS3",
Kumar Gala10b35d92005-09-23 14:08:58 -05001266 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001267 .cpu_user_features = PPC_FEATURE_32 |
1268 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001269 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001270 .icache_bsize = 32,
1271 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001272 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001273 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001274 },
1275 { /* NP405H */
1276 .pvr_mask = 0xffff0000,
1277 .pvr_value = 0x41410000,
1278 .cpu_name = "NP405H",
Kumar Gala10b35d92005-09-23 14:08:58 -05001279 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001280 .cpu_user_features = PPC_FEATURE_32 |
1281 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001282 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001283 .icache_bsize = 32,
1284 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001285 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001286 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001287 },
1288 { /* 405GPr */
1289 .pvr_mask = 0xffff0000,
1290 .pvr_value = 0x50910000,
1291 .cpu_name = "405GPr",
Kumar Gala10b35d92005-09-23 14:08:58 -05001292 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001293 .cpu_user_features = PPC_FEATURE_32 |
1294 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001295 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001296 .icache_bsize = 32,
1297 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001298 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001299 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001300 },
1301 { /* STBx25xx */
1302 .pvr_mask = 0xffff0000,
1303 .pvr_value = 0x51510000,
1304 .cpu_name = "STBx25xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001305 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001306 .cpu_user_features = PPC_FEATURE_32 |
1307 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001308 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001309 .icache_bsize = 32,
1310 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001311 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001312 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001313 },
1314 { /* 405LP */
1315 .pvr_mask = 0xffff0000,
1316 .pvr_value = 0x41F10000,
1317 .cpu_name = "405LP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001318 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001319 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001320 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001321 .icache_bsize = 32,
1322 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001323 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001324 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001325 },
1326 { /* Xilinx Virtex-II Pro */
Grant C. Likely72646c72006-01-19 01:13:20 -07001327 .pvr_mask = 0xfffff000,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001328 .pvr_value = 0x20010000,
1329 .cpu_name = "Virtex-II Pro",
Kumar Gala10b35d92005-09-23 14:08:58 -05001330 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001331 .cpu_user_features = PPC_FEATURE_32 |
1332 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001333 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001334 .icache_bsize = 32,
1335 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001336 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001337 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001338 },
Grant C. Likely72646c72006-01-19 01:13:20 -07001339 { /* Xilinx Virtex-4 FX */
1340 .pvr_mask = 0xfffff000,
1341 .pvr_value = 0x20011000,
1342 .cpu_name = "Virtex-4 FX",
1343 .cpu_features = CPU_FTRS_40X,
1344 .cpu_user_features = PPC_FEATURE_32 |
1345 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001346 .mmu_features = MMU_FTR_TYPE_40x,
Grant C. Likely72646c72006-01-19 01:13:20 -07001347 .icache_bsize = 32,
1348 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001349 .machine_check = machine_check_4xx,
Peter Bergner838fdb42006-09-14 14:18:38 -05001350 .platform = "ppc405",
Grant C. Likely72646c72006-01-19 01:13:20 -07001351 },
Eugene Suroveginad95d602005-06-07 13:22:09 -07001352 { /* 405EP */
1353 .pvr_mask = 0xffff0000,
1354 .pvr_value = 0x51210000,
1355 .cpu_name = "405EP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001356 .cpu_features = CPU_FTRS_40X,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001357 .cpu_user_features = PPC_FEATURE_32 |
1358 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001359 .mmu_features = MMU_FTR_TYPE_40x,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001360 .icache_bsize = 32,
1361 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001362 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001363 .platform = "ppc405",
Eugene Suroveginad95d602005-06-07 13:22:09 -07001364 },
Lee Nipperff349102010-07-09 01:17:16 +00001365 { /* 405EX Rev. A/B with Security */
1366 .pvr_mask = 0xffff000f,
1367 .pvr_value = 0x12910007,
1368 .cpu_name = "405EX Rev. A/B",
Stefan Roese5d8476c2007-10-11 22:08:14 +10001369 .cpu_features = CPU_FTRS_40X,
1370 .cpu_user_features = PPC_FEATURE_32 |
1371 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001372 .mmu_features = MMU_FTR_TYPE_40x,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001373 .icache_bsize = 32,
1374 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001375 .machine_check = machine_check_4xx,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001376 .platform = "ppc405",
1377 },
Lee Nipperff349102010-07-09 01:17:16 +00001378 { /* 405EX Rev. C without Security */
1379 .pvr_mask = 0xffff000f,
1380 .pvr_value = 0x1291000d,
1381 .cpu_name = "405EX Rev. C",
1382 .cpu_features = CPU_FTRS_40X,
1383 .cpu_user_features = PPC_FEATURE_32 |
1384 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1385 .mmu_features = MMU_FTR_TYPE_40x,
1386 .icache_bsize = 32,
1387 .dcache_bsize = 32,
1388 .machine_check = machine_check_4xx,
1389 .platform = "ppc405",
1390 },
1391 { /* 405EX Rev. C with Security */
1392 .pvr_mask = 0xffff000f,
1393 .pvr_value = 0x1291000f,
1394 .cpu_name = "405EX Rev. C",
1395 .cpu_features = CPU_FTRS_40X,
1396 .cpu_user_features = PPC_FEATURE_32 |
1397 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1398 .mmu_features = MMU_FTR_TYPE_40x,
1399 .icache_bsize = 32,
1400 .dcache_bsize = 32,
1401 .machine_check = machine_check_4xx,
1402 .platform = "ppc405",
1403 },
1404 { /* 405EX Rev. D without Security */
1405 .pvr_mask = 0xffff000f,
1406 .pvr_value = 0x12910003,
1407 .cpu_name = "405EX Rev. D",
1408 .cpu_features = CPU_FTRS_40X,
1409 .cpu_user_features = PPC_FEATURE_32 |
1410 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1411 .mmu_features = MMU_FTR_TYPE_40x,
1412 .icache_bsize = 32,
1413 .dcache_bsize = 32,
1414 .machine_check = machine_check_4xx,
1415 .platform = "ppc405",
1416 },
1417 { /* 405EX Rev. D with Security */
1418 .pvr_mask = 0xffff000f,
1419 .pvr_value = 0x12910005,
1420 .cpu_name = "405EX Rev. D",
1421 .cpu_features = CPU_FTRS_40X,
1422 .cpu_user_features = PPC_FEATURE_32 |
1423 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1424 .mmu_features = MMU_FTR_TYPE_40x,
1425 .icache_bsize = 32,
1426 .dcache_bsize = 32,
1427 .machine_check = machine_check_4xx,
1428 .platform = "ppc405",
1429 },
1430 { /* 405EXr Rev. A/B without Security */
1431 .pvr_mask = 0xffff000f,
1432 .pvr_value = 0x12910001,
1433 .cpu_name = "405EXr Rev. A/B",
1434 .cpu_features = CPU_FTRS_40X,
1435 .cpu_user_features = PPC_FEATURE_32 |
1436 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1437 .mmu_features = MMU_FTR_TYPE_40x,
1438 .icache_bsize = 32,
1439 .dcache_bsize = 32,
1440 .machine_check = machine_check_4xx,
1441 .platform = "ppc405",
1442 },
1443 { /* 405EXr Rev. C without Security */
1444 .pvr_mask = 0xffff000f,
1445 .pvr_value = 0x12910009,
1446 .cpu_name = "405EXr Rev. C",
1447 .cpu_features = CPU_FTRS_40X,
1448 .cpu_user_features = PPC_FEATURE_32 |
1449 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1450 .mmu_features = MMU_FTR_TYPE_40x,
1451 .icache_bsize = 32,
1452 .dcache_bsize = 32,
1453 .machine_check = machine_check_4xx,
1454 .platform = "ppc405",
1455 },
1456 { /* 405EXr Rev. C with Security */
1457 .pvr_mask = 0xffff000f,
1458 .pvr_value = 0x1291000b,
1459 .cpu_name = "405EXr Rev. C",
1460 .cpu_features = CPU_FTRS_40X,
1461 .cpu_user_features = PPC_FEATURE_32 |
1462 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1463 .mmu_features = MMU_FTR_TYPE_40x,
1464 .icache_bsize = 32,
1465 .dcache_bsize = 32,
1466 .machine_check = machine_check_4xx,
1467 .platform = "ppc405",
1468 },
1469 { /* 405EXr Rev. D without Security */
1470 .pvr_mask = 0xffff000f,
Stefan Roeseb676d842008-01-15 18:09:15 +11001471 .pvr_value = 0x12910000,
Lee Nipperff349102010-07-09 01:17:16 +00001472 .cpu_name = "405EXr Rev. D",
1473 .cpu_features = CPU_FTRS_40X,
1474 .cpu_user_features = PPC_FEATURE_32 |
1475 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1476 .mmu_features = MMU_FTR_TYPE_40x,
1477 .icache_bsize = 32,
1478 .dcache_bsize = 32,
1479 .machine_check = machine_check_4xx,
1480 .platform = "ppc405",
1481 },
1482 { /* 405EXr Rev. D with Security */
1483 .pvr_mask = 0xffff000f,
1484 .pvr_value = 0x12910002,
1485 .cpu_name = "405EXr Rev. D",
Stefan Roeseb676d842008-01-15 18:09:15 +11001486 .cpu_features = CPU_FTRS_40X,
1487 .cpu_user_features = PPC_FEATURE_32 |
1488 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001489 .mmu_features = MMU_FTR_TYPE_40x,
Stefan Roeseb676d842008-01-15 18:09:15 +11001490 .icache_bsize = 32,
1491 .dcache_bsize = 32,
1492 .machine_check = machine_check_4xx,
1493 .platform = "ppc405",
1494 },
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001495 {
1496 /* 405EZ */
1497 .pvr_mask = 0xffff0000,
1498 .pvr_value = 0x41510000,
1499 .cpu_name = "405EZ",
1500 .cpu_features = CPU_FTRS_40X,
1501 .cpu_user_features = PPC_FEATURE_32 |
1502 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001503 .mmu_features = MMU_FTR_TYPE_40x,
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001504 .icache_bsize = 32,
1505 .dcache_bsize = 32,
1506 .machine_check = machine_check_4xx,
1507 .platform = "ppc405",
1508 },
Tanmay Inamdard5b9ee72011-11-28 21:01:41 +00001509 { /* APM8018X */
1510 .pvr_mask = 0xffff0000,
1511 .pvr_value = 0x7ff11432,
1512 .cpu_name = "APM8018X",
1513 .cpu_features = CPU_FTRS_40X,
1514 .cpu_user_features = PPC_FEATURE_32 |
1515 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1516 .mmu_features = MMU_FTR_TYPE_40x,
1517 .icache_bsize = 32,
1518 .dcache_bsize = 32,
1519 .machine_check = machine_check_4xx,
1520 .platform = "ppc405",
1521 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001522 { /* default match */
1523 .pvr_mask = 0x00000000,
1524 .pvr_value = 0x00000000,
1525 .cpu_name = "(generic 40x PPC)",
1526 .cpu_features = CPU_FTRS_40X,
1527 .cpu_user_features = PPC_FEATURE_32 |
1528 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001529 .mmu_features = MMU_FTR_TYPE_40x,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001530 .icache_bsize = 32,
1531 .dcache_bsize = 32,
1532 .machine_check = machine_check_4xx,
1533 .platform = "ppc405",
1534 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001535
1536#endif /* CONFIG_40x */
1537#ifdef CONFIG_44x
Matt Porterc9cf73a2005-07-31 22:34:52 -07001538 {
1539 .pvr_mask = 0xf0000fff,
1540 .pvr_value = 0x40000850,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001541 .cpu_name = "440GR Rev. A",
1542 .cpu_features = CPU_FTRS_44X,
1543 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001544 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001545 .icache_bsize = 32,
1546 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001547 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001548 .platform = "ppc440",
1549 },
1550 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1551 .pvr_mask = 0xf0000fff,
1552 .pvr_value = 0x40000858,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001553 .cpu_name = "440EP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001554 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001555 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001556 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001557 .icache_bsize = 32,
1558 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001559 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001560 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001561 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001562 },
1563 {
1564 .pvr_mask = 0xf0000fff,
1565 .pvr_value = 0x400008d3,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001566 .cpu_name = "440GR Rev. B",
1567 .cpu_features = CPU_FTRS_44X,
1568 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001569 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001570 .icache_bsize = 32,
1571 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001572 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001573 .platform = "ppc440",
1574 },
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001575 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1576 .pvr_mask = 0xf0000ff7,
1577 .pvr_value = 0x400008d4,
1578 .cpu_name = "440EP Rev. C",
1579 .cpu_features = CPU_FTRS_44X,
1580 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001581 .mmu_features = MMU_FTR_TYPE_44x,
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001582 .icache_bsize = 32,
1583 .dcache_bsize = 32,
1584 .cpu_setup = __setup_cpu_440ep,
1585 .machine_check = machine_check_4xx,
1586 .platform = "ppc440",
1587 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001588 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1589 .pvr_mask = 0xf0000fff,
1590 .pvr_value = 0x400008db,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001591 .cpu_name = "440EP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001592 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001593 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001594 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001595 .icache_bsize = 32,
1596 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001597 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001598 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001599 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001600 },
Valentine Barshak15fc9932007-08-29 17:40:30 +04001601 { /* 440GRX */
1602 .pvr_mask = 0xf0000ffb,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001603 .pvr_value = 0x200008D0,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001604 .cpu_name = "440GRX",
1605 .cpu_features = CPU_FTRS_44X,
1606 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001607 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001608 .icache_bsize = 32,
1609 .dcache_bsize = 32,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001610 .cpu_setup = __setup_cpu_440grx,
Valentine Barshakb2be3b12007-12-22 03:22:23 +11001611 .machine_check = machine_check_440A,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001612 .platform = "ppc440",
Valentine Barshak15fc9932007-08-29 17:40:30 +04001613 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001614 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1615 .pvr_mask = 0xf0000ffb,
1616 .pvr_value = 0x200008D8,
1617 .cpu_name = "440EPX",
1618 .cpu_features = CPU_FTRS_44X,
1619 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001620 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001621 .icache_bsize = 32,
1622 .dcache_bsize = 32,
1623 .cpu_setup = __setup_cpu_440epx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001624 .machine_check = machine_check_440A,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001625 .platform = "ppc440",
1626 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001627 { /* 440GP Rev. B */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001628 .pvr_mask = 0xf0000fff,
1629 .pvr_value = 0x40000440,
1630 .cpu_name = "440GP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001631 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001632 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001633 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001634 .icache_bsize = 32,
1635 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001636 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001637 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001638 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001639 { /* 440GP Rev. C */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001640 .pvr_mask = 0xf0000fff,
1641 .pvr_value = 0x40000481,
1642 .cpu_name = "440GP Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001643 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001644 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001645 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001646 .icache_bsize = 32,
1647 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001648 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001649 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001650 },
1651 { /* 440GX Rev. A */
1652 .pvr_mask = 0xf0000fff,
1653 .pvr_value = 0x50000850,
1654 .cpu_name = "440GX Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001655 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001656 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001657 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001658 .icache_bsize = 32,
1659 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001660 .cpu_setup = __setup_cpu_440gx,
1661 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001662 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001663 },
1664 { /* 440GX Rev. B */
1665 .pvr_mask = 0xf0000fff,
1666 .pvr_value = 0x50000851,
1667 .cpu_name = "440GX Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001668 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001669 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001670 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001671 .icache_bsize = 32,
1672 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001673 .cpu_setup = __setup_cpu_440gx,
1674 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001675 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001676 },
1677 { /* 440GX Rev. C */
1678 .pvr_mask = 0xf0000fff,
1679 .pvr_value = 0x50000892,
1680 .cpu_name = "440GX Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001681 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001682 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001683 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001684 .icache_bsize = 32,
1685 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001686 .cpu_setup = __setup_cpu_440gx,
1687 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001688 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001689 },
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001690 { /* 440GX Rev. F */
1691 .pvr_mask = 0xf0000fff,
1692 .pvr_value = 0x50000894,
1693 .cpu_name = "440GX Rev. F",
Kumar Gala10b35d92005-09-23 14:08:58 -05001694 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001695 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001696 .mmu_features = MMU_FTR_TYPE_44x,
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001697 .icache_bsize = 32,
1698 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001699 .cpu_setup = __setup_cpu_440gx,
1700 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001701 .platform = "ppc440",
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001702 },
Matt Porter656de7e2005-09-03 15:55:42 -07001703 { /* 440SP Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001704 .pvr_mask = 0xfff00fff,
1705 .pvr_value = 0x53200891,
Matt Porter656de7e2005-09-03 15:55:42 -07001706 .cpu_name = "440SP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001707 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001708 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001709 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porter656de7e2005-09-03 15:55:42 -07001710 .icache_bsize = 32,
1711 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001712 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001713 .platform = "ppc440",
Matt Porter656de7e2005-09-03 15:55:42 -07001714 },
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001715 { /* 440SPe Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001716 .pvr_mask = 0xfff00fff,
1717 .pvr_value = 0x53400890,
1718 .cpu_name = "440SPe Rev. A",
1719 .cpu_features = CPU_FTRS_44X,
1720 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001721 .mmu_features = MMU_FTR_TYPE_44x,
Roland Dreier333e6152007-06-16 05:36:32 +10001722 .icache_bsize = 32,
1723 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001724 .cpu_setup = __setup_cpu_440spe,
1725 .machine_check = machine_check_440A,
Roland Dreier333e6152007-06-16 05:36:32 +10001726 .platform = "ppc440",
1727 },
1728 { /* 440SPe Rev. B */
1729 .pvr_mask = 0xfff00fff,
1730 .pvr_value = 0x53400891,
1731 .cpu_name = "440SPe Rev. B",
Kumar Galaa147c582006-12-08 02:34:38 -06001732 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001733 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001734 .mmu_features = MMU_FTR_TYPE_44x,
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001735 .icache_bsize = 32,
1736 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001737 .cpu_setup = __setup_cpu_440spe,
1738 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001739 .platform = "ppc440",
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001740 },
John Linn23e72372008-07-01 09:42:07 -07001741 { /* 440 in Xilinx Virtex-5 FXT */
1742 .pvr_mask = 0xfffffff0,
1743 .pvr_value = 0x7ff21910,
1744 .cpu_name = "440 in Virtex-5 FXT",
1745 .cpu_features = CPU_FTRS_44X,
1746 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001747 .mmu_features = MMU_FTR_TYPE_44x,
John Linn23e72372008-07-01 09:42:07 -07001748 .icache_bsize = 32,
1749 .dcache_bsize = 32,
Grant Likely640d17d2008-12-04 05:39:55 +00001750 .cpu_setup = __setup_cpu_440x5,
1751 .machine_check = machine_check_440A,
John Linn23e72372008-07-01 09:42:07 -07001752 .platform = "ppc440",
1753 },
Stefan Roese464076a2008-02-24 08:07:41 +11001754 { /* 460EX */
Stefan Roese20d70342009-07-29 07:04:46 +00001755 .pvr_mask = 0xffff0006,
Stefan Roese464076a2008-02-24 08:07:41 +11001756 .pvr_value = 0x13020002,
1757 .cpu_name = "460EX",
Benjamin Herrenschmidt6d2170b2008-12-18 19:13:22 +00001758 .cpu_features = CPU_FTRS_440x6,
Stefan Roese464076a2008-02-24 08:07:41 +11001759 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001760 .mmu_features = MMU_FTR_TYPE_44x,
Stefan Roese464076a2008-02-24 08:07:41 +11001761 .icache_bsize = 32,
1762 .dcache_bsize = 32,
1763 .cpu_setup = __setup_cpu_460ex,
1764 .machine_check = machine_check_440A,
1765 .platform = "ppc440",
1766 },
Stefan Roese20d70342009-07-29 07:04:46 +00001767 { /* 460EX Rev B */
1768 .pvr_mask = 0xffff0007,
1769 .pvr_value = 0x13020004,
1770 .cpu_name = "460EX Rev. B",
1771 .cpu_features = CPU_FTRS_440x6,
1772 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1773 .mmu_features = MMU_FTR_TYPE_44x,
1774 .icache_bsize = 32,
1775 .dcache_bsize = 32,
1776 .cpu_setup = __setup_cpu_460ex,
1777 .machine_check = machine_check_440A,
1778 .platform = "ppc440",
1779 },
Stefan Roese464076a2008-02-24 08:07:41 +11001780 { /* 460GT */
Stefan Roese20d70342009-07-29 07:04:46 +00001781 .pvr_mask = 0xffff0006,
Stefan Roese464076a2008-02-24 08:07:41 +11001782 .pvr_value = 0x13020000,
1783 .cpu_name = "460GT",
Benjamin Herrenschmidt6d2170b2008-12-18 19:13:22 +00001784 .cpu_features = CPU_FTRS_440x6,
Josh Boyer939e6222008-06-11 07:52:40 -04001785 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001786 .mmu_features = MMU_FTR_TYPE_44x,
Stefan Roese464076a2008-02-24 08:07:41 +11001787 .icache_bsize = 32,
1788 .dcache_bsize = 32,
Josh Boyer939e6222008-06-11 07:52:40 -04001789 .cpu_setup = __setup_cpu_460gt,
Stefan Roese464076a2008-02-24 08:07:41 +11001790 .machine_check = machine_check_440A,
1791 .platform = "ppc440",
1792 },
Stefan Roese20d70342009-07-29 07:04:46 +00001793 { /* 460GT Rev B */
1794 .pvr_mask = 0xffff0007,
1795 .pvr_value = 0x13020005,
1796 .cpu_name = "460GT Rev. B",
1797 .cpu_features = CPU_FTRS_440x6,
1798 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1799 .mmu_features = MMU_FTR_TYPE_44x,
1800 .icache_bsize = 32,
1801 .dcache_bsize = 32,
1802 .cpu_setup = __setup_cpu_460gt,
1803 .machine_check = machine_check_440A,
1804 .platform = "ppc440",
1805 },
Madhulika Madishetty6c712092009-02-05 13:31:36 +00001806 { /* 460SX */
1807 .pvr_mask = 0xffffff00,
1808 .pvr_value = 0x13541800,
1809 .cpu_name = "460SX",
1810 .cpu_features = CPU_FTRS_44X,
1811 .cpu_user_features = COMMON_USER_BOOKE,
1812 .mmu_features = MMU_FTR_TYPE_44x,
1813 .icache_bsize = 32,
1814 .dcache_bsize = 32,
1815 .cpu_setup = __setup_cpu_460sx,
1816 .machine_check = machine_check_440A,
1817 .platform = "ppc440",
1818 },
Tirumala Marri6edc3232010-09-13 13:26:11 +00001819 { /* 464 in APM821xx */
Vinh Nguyen Huu Tuong7c801162011-12-20 02:43:34 +00001820 .pvr_mask = 0xfffffff0,
Tirumala Marri6edc3232010-09-13 13:26:11 +00001821 .pvr_value = 0x12C41C80,
1822 .cpu_name = "APM821XX",
1823 .cpu_features = CPU_FTRS_44X,
1824 .cpu_user_features = COMMON_USER_BOOKE |
1825 PPC_FEATURE_HAS_FPU,
1826 .mmu_features = MMU_FTR_TYPE_44x,
1827 .icache_bsize = 32,
1828 .dcache_bsize = 32,
1829 .cpu_setup = __setup_cpu_apm821xx,
1830 .machine_check = machine_check_440A,
1831 .platform = "ppc440",
1832 },
Dave Kleikampc48d0db2011-01-26 06:17:58 +00001833 { /* 476 DD2 core */
1834 .pvr_mask = 0xffffffff,
1835 .pvr_value = 0x11a52080,
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001836 .cpu_name = "476",
Dave Kleikampc48d0db2011-01-26 06:17:58 +00001837 .cpu_features = CPU_FTRS_47X | CPU_FTR_476_DD2,
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001838 .cpu_user_features = COMMON_USER_BOOKE |
1839 PPC_FEATURE_HAS_FPU,
1840 .mmu_features = MMU_FTR_TYPE_47x |
1841 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1842 .icache_bsize = 32,
1843 .dcache_bsize = 128,
Dave Kleikampfc5e7092010-03-05 03:43:18 +00001844 .machine_check = machine_check_47x,
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001845 .platform = "ppc470",
1846 },
Tony Breedsdf777bd2011-11-30 21:39:23 +00001847 { /* 476fpe */
1848 .pvr_mask = 0xffff0000,
1849 .pvr_value = 0x7ff50000,
1850 .cpu_name = "476fpe",
1851 .cpu_features = CPU_FTRS_47X | CPU_FTR_476_DD2,
1852 .cpu_user_features = COMMON_USER_BOOKE |
1853 PPC_FEATURE_HAS_FPU,
1854 .mmu_features = MMU_FTR_TYPE_47x |
1855 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1856 .icache_bsize = 32,
1857 .dcache_bsize = 128,
1858 .machine_check = machine_check_47x,
1859 .platform = "ppc470",
1860 },
Torez Smithb4e8c8d2010-03-05 10:45:54 +00001861 { /* 476 iss */
1862 .pvr_mask = 0xffff0000,
1863 .pvr_value = 0x00050000,
1864 .cpu_name = "476",
1865 .cpu_features = CPU_FTRS_47X,
1866 .cpu_user_features = COMMON_USER_BOOKE |
1867 PPC_FEATURE_HAS_FPU,
Torez Smithb4e8c8d2010-03-05 10:45:54 +00001868 .mmu_features = MMU_FTR_TYPE_47x |
1869 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1870 .icache_bsize = 32,
1871 .dcache_bsize = 128,
1872 .machine_check = machine_check_47x,
1873 .platform = "ppc470",
1874 },
Dave Kleikampc48d0db2011-01-26 06:17:58 +00001875 { /* 476 others */
1876 .pvr_mask = 0xffff0000,
1877 .pvr_value = 0x11a50000,
1878 .cpu_name = "476",
1879 .cpu_features = CPU_FTRS_47X,
1880 .cpu_user_features = COMMON_USER_BOOKE |
1881 PPC_FEATURE_HAS_FPU,
1882 .mmu_features = MMU_FTR_TYPE_47x |
1883 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1884 .icache_bsize = 32,
1885 .dcache_bsize = 128,
1886 .machine_check = machine_check_47x,
1887 .platform = "ppc470",
1888 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001889 { /* default match */
1890 .pvr_mask = 0x00000000,
1891 .pvr_value = 0x00000000,
1892 .cpu_name = "(generic 44x PPC)",
1893 .cpu_features = CPU_FTRS_44X,
1894 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001895 .mmu_features = MMU_FTR_TYPE_44x,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001896 .icache_bsize = 32,
1897 .dcache_bsize = 32,
1898 .machine_check = machine_check_4xx,
1899 .platform = "ppc440",
1900 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001901#endif /* CONFIG_44x */
Josh Boyere3e414b2007-12-24 08:44:47 -06001902#ifdef CONFIG_E200
Stephen Rothwell49209602005-10-12 15:55:09 +10001903 { /* e200z5 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001904 .pvr_mask = 0xfff00000,
1905 .pvr_value = 0x81000000,
1906 .cpu_name = "e200z5",
1907 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001908 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001909 .cpu_user_features = COMMON_USER_BOOKE |
1910 PPC_FEATURE_HAS_EFP_SINGLE |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001911 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001912 .mmu_features = MMU_FTR_TYPE_FSL_E,
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001913 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001914 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001915 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001916 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001917 { /* e200z6 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001918 .pvr_mask = 0xfff00000,
1919 .pvr_value = 0x81100000,
1920 .cpu_name = "e200z6",
1921 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001922 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001923 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001924 PPC_FEATURE_HAS_SPE_COMP |
1925 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001926 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001927 .mmu_features = MMU_FTR_TYPE_FSL_E,
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001928 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001929 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001930 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001931 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001932 { /* default match */
1933 .pvr_mask = 0x00000000,
1934 .pvr_value = 0x00000000,
1935 .cpu_name = "(generic E200 PPC)",
1936 .cpu_features = CPU_FTRS_E200,
1937 .cpu_user_features = COMMON_USER_BOOKE |
1938 PPC_FEATURE_HAS_EFP_SINGLE |
1939 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001940 .mmu_features = MMU_FTR_TYPE_FSL_E,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001941 .dcache_bsize = 32,
Kumar Gala105c31d2009-01-08 08:31:20 -06001942 .cpu_setup = __setup_cpu_e200,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001943 .machine_check = machine_check_e200,
1944 .platform = "ppc5554",
Paul Mackerras516c8be2008-05-12 14:20:35 +10001945 }
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001946#endif /* CONFIG_E200 */
Kumar Gala4490c062010-10-08 08:32:11 -05001947#endif /* CONFIG_PPC32 */
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001948#ifdef CONFIG_E500
Kumar Gala4490c062010-10-08 08:32:11 -05001949#ifdef CONFIG_PPC32
Stephen Rothwell49209602005-10-12 15:55:09 +10001950 { /* e500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001951 .pvr_mask = 0xffff0000,
1952 .pvr_value = 0x80200000,
1953 .cpu_name = "e500",
Kumar Gala10b35d92005-09-23 14:08:58 -05001954 .cpu_features = CPU_FTRS_E500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001955 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001956 PPC_FEATURE_HAS_SPE_COMP |
1957 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001958 .mmu_features = MMU_FTR_TYPE_FSL_E,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001959 .icache_bsize = 32,
1960 .dcache_bsize = 32,
1961 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001962 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001963 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06001964 .cpu_setup = __setup_cpu_e500v1,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001965 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001966 .platform = "ppc8540",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001967 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001968 { /* e500v2 */
Kumar Gala5b37b702005-06-21 17:15:18 -07001969 .pvr_mask = 0xffff0000,
1970 .pvr_value = 0x80210000,
1971 .cpu_name = "e500v2",
Kumar Gala10b35d92005-09-23 14:08:58 -05001972 .cpu_features = CPU_FTRS_E500_2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001973 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001974 PPC_FEATURE_HAS_SPE_COMP |
1975 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1976 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001977 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS,
Kumar Gala5b37b702005-06-21 17:15:18 -07001978 .icache_bsize = 32,
1979 .dcache_bsize = 32,
1980 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001981 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001982 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06001983 .cpu_setup = __setup_cpu_e500v2,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001984 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001985 .platform = "ppc8548",
Kumar Gala5b37b702005-06-21 17:15:18 -07001986 },
Kumar Gala3dfa8772008-06-16 09:41:32 -05001987 { /* e500mc */
1988 .pvr_mask = 0xffff0000,
1989 .pvr_value = 0x80230000,
1990 .cpu_name = "e500mc",
Kumar Gala3dfa8772008-06-16 09:41:32 -05001991 .cpu_features = CPU_FTRS_E500MC,
1992 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Kumar Galac3071952009-02-10 22:26:06 -06001993 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
Kumar Gala323d23a2009-04-23 08:51:22 -05001994 MMU_FTR_USE_TLBILX,
Kumar Gala3dfa8772008-06-16 09:41:32 -05001995 .icache_bsize = 64,
1996 .dcache_bsize = 64,
1997 .num_pmcs = 4,
Scott Wooda11106542010-02-25 18:09:45 -06001998 .oprofile_cpu_type = "ppc/e500mc",
Kumar Gala3dfa8772008-06-16 09:41:32 -05001999 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06002000 .cpu_setup = __setup_cpu_e500mc,
Scott Woodfe04b112010-04-08 00:38:22 -05002001 .machine_check = machine_check_e500mc,
Kumar Gala3dfa8772008-06-16 09:41:32 -05002002 .platform = "ppce500mc",
2003 },
Kumar Gala4490c062010-10-08 08:32:11 -05002004#endif /* CONFIG_PPC32 */
2005 { /* e5500 */
2006 .pvr_mask = 0xffff0000,
2007 .pvr_value = 0x80240000,
2008 .cpu_name = "e5500",
Kumar Gala11ed0db2011-04-06 00:11:06 -05002009 .cpu_features = CPU_FTRS_E5500,
Kumar Galafb9be232011-06-02 11:26:13 -05002010 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Kumar Gala4490c062010-10-08 08:32:11 -05002011 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
2012 MMU_FTR_USE_TLBILX,
2013 .icache_bsize = 64,
2014 .dcache_bsize = 64,
2015 .num_pmcs = 4,
2016 .oprofile_cpu_type = "ppc/e500mc",
2017 .oprofile_type = PPC_OPROFILE_FSL_EMB,
2018 .cpu_setup = __setup_cpu_e5500,
2019 .cpu_restore = __restore_cpu_e5500,
2020 .machine_check = machine_check_e500mc,
2021 .platform = "ppce5500",
2022 },
Kumar Gala10241842011-11-06 11:51:07 -06002023 { /* e6500 */
2024 .pvr_mask = 0xffff0000,
2025 .pvr_value = 0x80400000,
2026 .cpu_name = "e6500",
2027 .cpu_features = CPU_FTRS_E6500,
2028 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
2029 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
2030 MMU_FTR_USE_TLBILX,
2031 .icache_bsize = 64,
2032 .dcache_bsize = 64,
2033 .num_pmcs = 4,
2034 .oprofile_cpu_type = "ppc/e6500",
2035 .oprofile_type = PPC_OPROFILE_FSL_EMB,
2036 .cpu_setup = __setup_cpu_e5500,
2037 .cpu_restore = __restore_cpu_e5500,
2038 .machine_check = machine_check_e500mc,
2039 .platform = "ppce6500",
2040 },
Kumar Gala4490c062010-10-08 08:32:11 -05002041#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -07002042 { /* default match */
2043 .pvr_mask = 0x00000000,
2044 .pvr_value = 0x00000000,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002045 .cpu_name = "(generic E500 PPC)",
2046 .cpu_features = CPU_FTRS_E500,
2047 .cpu_user_features = COMMON_USER_BOOKE |
2048 PPC_FEATURE_HAS_SPE_COMP |
2049 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00002050 .mmu_features = MMU_FTR_TYPE_FSL_E,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002051 .icache_bsize = 32,
2052 .dcache_bsize = 32,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002053 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002054 .platform = "powerpc",
Paul Mackerras516c8be2008-05-12 14:20:35 +10002055 }
Stephen Rothwell49209602005-10-12 15:55:09 +10002056#endif /* CONFIG_PPC32 */
Kumar Gala4490c062010-10-08 08:32:11 -05002057#endif /* CONFIG_E500 */
Kumar Galaf45c4482009-08-18 19:08:30 +00002058
Benjamin Herrenschmidt76b4eda2011-04-14 22:32:01 +00002059#ifdef CONFIG_PPC_A2
2060 { /* Standard A2 (>= DD2) + FPU core */
2061 .pvr_mask = 0xffff0000,
2062 .pvr_value = 0x00480000,
2063 .cpu_name = "A2 (>= DD2)",
2064 .cpu_features = CPU_FTRS_A2,
2065 .cpu_user_features = COMMON_USER_PPC64,
Matt Evans44ae3ab2011-04-06 19:48:50 +00002066 .mmu_features = MMU_FTRS_A2,
Benjamin Herrenschmidt76b4eda2011-04-14 22:32:01 +00002067 .icache_bsize = 64,
2068 .dcache_bsize = 64,
2069 .num_pmcs = 0,
2070 .cpu_setup = __setup_cpu_a2,
2071 .cpu_restore = __restore_cpu_a2,
2072 .machine_check = machine_check_generic,
2073 .platform = "ppca2",
2074 },
Kumar Galaf45c4482009-08-18 19:08:30 +00002075 { /* This is a default entry to get going, to be replaced by
2076 * a real one at some stage
2077 */
2078#define CPU_FTRS_BASE_BOOK3E (CPU_FTR_USE_TB | \
2079 CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_SMT | \
2080 CPU_FTR_NODSISRALIGN | CPU_FTR_NOEXECUTE)
2081 .pvr_mask = 0x00000000,
2082 .pvr_value = 0x00000000,
2083 .cpu_name = "Book3E",
2084 .cpu_features = CPU_FTRS_BASE_BOOK3E,
2085 .cpu_user_features = COMMON_USER_PPC64,
2086 .mmu_features = MMU_FTR_TYPE_3E | MMU_FTR_USE_TLBILX |
2087 MMU_FTR_USE_TLBIVAX_BCAST |
2088 MMU_FTR_LOCK_BCAST_INVAL,
2089 .icache_bsize = 64,
2090 .dcache_bsize = 64,
2091 .num_pmcs = 0,
2092 .machine_check = machine_check_generic,
2093 .platform = "power6",
2094 },
Benjamin Herrenschmidt76b4eda2011-04-14 22:32:01 +00002095#endif /* CONFIG_PPC_A2 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002096};
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002097
Paul Mackerras87a72f92007-10-04 14:18:01 +10002098static struct cpu_spec the_cpu_spec;
2099
Scott Wood26ee9762011-07-25 11:04:36 +00002100static struct cpu_spec * __init setup_cpu_spec(unsigned long offset,
2101 struct cpu_spec *s)
Michael Ellerman666435b2009-02-22 16:25:43 +00002102{
2103 struct cpu_spec *t = &the_cpu_spec;
Michael Ellerman2657dd42009-02-22 16:25:45 +00002104 struct cpu_spec old;
2105
Michael Ellerman666435b2009-02-22 16:25:43 +00002106 t = PTRRELOC(t);
Michael Ellerman2657dd42009-02-22 16:25:45 +00002107 old = *t;
2108
2109 /* Copy everything, then do fixups */
2110 *t = *s;
Michael Ellerman666435b2009-02-22 16:25:43 +00002111
2112 /*
2113 * If we are overriding a previous value derived from the real
2114 * PVR with a new value obtained using a logical PVR value,
2115 * don't modify the performance monitor fields.
2116 */
Michael Ellerman2657dd42009-02-22 16:25:45 +00002117 if (old.num_pmcs && !s->num_pmcs) {
2118 t->num_pmcs = old.num_pmcs;
2119 t->pmc_type = old.pmc_type;
2120 t->oprofile_type = old.oprofile_type;
2121 t->oprofile_mmcra_sihv = old.oprofile_mmcra_sihv;
2122 t->oprofile_mmcra_sipr = old.oprofile_mmcra_sipr;
2123 t->oprofile_mmcra_clear = old.oprofile_mmcra_clear;
2124
Michael Ellerman666435b2009-02-22 16:25:43 +00002125 /*
2126 * If we have passed through this logic once before and
2127 * have pulled the default case because the real PVR was
2128 * not found inside cpu_specs[], then we are possibly
2129 * running in compatibility mode. In that case, let the
2130 * oprofiler know which set of compatibility counters to
2131 * pull from by making sure the oprofile_cpu_type string
2132 * is set to that of compatibility mode. If the
2133 * oprofile_cpu_type already has a value, then we are
2134 * possibly overriding a real PVR with a logical one,
2135 * and, in that case, keep the current value for
2136 * oprofile_cpu_type.
2137 */
Benjamin Herrenschmidtb173f032009-05-14 18:34:06 +00002138 if (old.oprofile_cpu_type != NULL) {
Benjamin Herrenschmidt0203d6e2009-04-29 19:39:38 +00002139 t->oprofile_cpu_type = old.oprofile_cpu_type;
2140 t->oprofile_type = old.oprofile_type;
Michael Wolf79af6c42009-04-27 06:17:54 +00002141 }
Michael Ellerman2657dd42009-02-22 16:25:45 +00002142 }
Michael Ellerman666435b2009-02-22 16:25:43 +00002143
2144 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
2145
2146 /*
2147 * Set the base platform string once; assumes
2148 * we're called with real pvr first.
2149 */
2150 if (*PTRRELOC(&powerpc_base_platform) == NULL)
2151 *PTRRELOC(&powerpc_base_platform) = t->platform;
2152
2153#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
2154 /* ppc64 and booke expect identify_cpu to also call setup_cpu for
2155 * that processor. I will consolidate that at a later time, for now,
2156 * just use #ifdef. We also don't need to PTRRELOC the function
2157 * pointer on ppc64 and booke as we are running at 0 in real mode
2158 * on ppc64 and reloc_offset is always 0 on booke.
2159 */
Benjamin Herrenschmidtaf9eef32011-01-20 20:36:03 +00002160 if (t->cpu_setup) {
2161 t->cpu_setup(offset, t);
Michael Ellerman666435b2009-02-22 16:25:43 +00002162 }
2163#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
Scott Wood26ee9762011-07-25 11:04:36 +00002164
2165 return t;
Michael Ellerman666435b2009-02-22 16:25:43 +00002166}
2167
Paul Mackerras87a72f92007-10-04 14:18:01 +10002168struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002169{
2170 struct cpu_spec *s = cpu_specs;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002171 int i;
2172
2173 s = PTRRELOC(s);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002174
Michael Ellerman666435b2009-02-22 16:25:43 +00002175 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) {
Scott Wood26ee9762011-07-25 11:04:36 +00002176 if ((pvr & s->pvr_mask) == s->pvr_value)
2177 return setup_cpu_spec(offset, s);
Michael Ellerman666435b2009-02-22 16:25:43 +00002178 }
2179
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002180 BUG();
Michael Ellerman666435b2009-02-22 16:25:43 +00002181
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002182 return NULL;
2183}