blob: 96a908f1cd876ac1d4456e884da8c3cdd5c4e7c8 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Linus Torvalds1da177e2005-04-16 15:20:36 -07002 * Copyright (C) 2001 Ben. Herrenschmidt (benh@kernel.crashing.org)
3 *
Stephen Rothwell49209602005-10-12 15:55:09 +10004 * Modifications for ppc64:
5 * Copyright (C) 2003 Dave Engebretsen <engebret@us.ibm.com>
6 *
Linus Torvalds1da177e2005-04-16 15:20:36 -07007 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version
10 * 2 of the License, or (at your option) any later version.
11 */
12
Linus Torvalds1da177e2005-04-16 15:20:36 -070013#include <linux/string.h>
14#include <linux/sched.h>
15#include <linux/threads.h>
16#include <linux/init.h>
Kumar Gala400d2212005-09-27 15:13:12 -050017#include <linux/module.h>
18
19#include <asm/oprofile_impl.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070020#include <asm/cputable.h>
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +100021#include <asm/prom.h> /* for PTRRELOC on ARCH=ppc */
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +000022#include <asm/mmu.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070023
Kumar Gala400d2212005-09-27 15:13:12 -050024struct cpu_spec* cur_cpu_spec = NULL;
Stephen Rothwell49209602005-10-12 15:55:09 +100025EXPORT_SYMBOL(cur_cpu_spec);
Linus Torvalds1da177e2005-04-16 15:20:36 -070026
Nathan Lynch9115d132008-07-16 09:58:51 +100027/* The platform string corresponding to the real PVR */
28const char *powerpc_base_platform;
29
Stephen Rothwell49209602005-10-12 15:55:09 +100030/* NOTE:
31 * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's
32 * the responsibility of the appropriate CPU save/restore functions to
33 * eventually copy these settings over. Those save/restore aren't yet
34 * part of the cputable though. That has to be fixed for both ppc32
35 * and ppc64
36 */
Geoff Levandb26f1002006-05-19 14:24:18 +100037#ifdef CONFIG_PPC32
Kumar Gala105c31d2009-01-08 08:31:20 -060038extern void __setup_cpu_e200(unsigned long offset, struct cpu_spec* spec);
39extern void __setup_cpu_e500v1(unsigned long offset, struct cpu_spec* spec);
40extern void __setup_cpu_e500v2(unsigned long offset, struct cpu_spec* spec);
41extern void __setup_cpu_e500mc(unsigned long offset, struct cpu_spec* spec);
Valentine Barshak81127532007-09-22 00:46:57 +100042extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
43extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110044extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
Valentine Barshak340ffd22007-09-22 00:50:09 +100045extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110046extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
Grant Likely640d17d2008-12-04 05:39:55 +000047extern void __setup_cpu_440x5(unsigned long offset, struct cpu_spec* spec);
Stefan Roese464076a2008-02-24 08:07:41 +110048extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec);
Josh Boyer939e6222008-06-11 07:52:40 -040049extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec);
Madhulika Madishetty6c712092009-02-05 13:31:36 +000050extern void __setup_cpu_460sx(unsigned long offset, struct cpu_spec *spec);
Tirumala Marri6edc3232010-09-13 13:26:11 +000051extern void __setup_cpu_apm821xx(unsigned long offset, struct cpu_spec *spec);
Kumar Gala400d2212005-09-27 15:13:12 -050052extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
53extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
54extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
55extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
56extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
57extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
58extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
59extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell49209602005-10-12 15:55:09 +100060#endif /* CONFIG_PPC32 */
Olof Johanssonf39b7a52006-08-11 00:07:08 -050061#ifdef CONFIG_PPC64
Kumar Gala400d2212005-09-27 15:13:12 -050062extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
Olof Johansson5b43d202006-10-04 23:41:41 -050063extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
Olof Johansson11999192007-02-04 16:36:51 -060064extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell40d244d2007-02-12 22:10:48 +110065extern void __restore_cpu_pa6t(void);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050066extern void __restore_cpu_ppc970(void);
Michael Neulinge952e6c2008-06-18 10:47:26 +100067extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec);
68extern void __restore_cpu_power7(void);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050069#endif /* CONFIG_PPC64 */
Kumar Gala4490c062010-10-08 08:32:11 -050070#if defined(CONFIG_E500)
71extern void __setup_cpu_e5500(unsigned long offset, struct cpu_spec* spec);
72extern void __restore_cpu_e5500(void);
73#endif /* CONFIG_E500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070074
Linus Torvalds1da177e2005-04-16 15:20:36 -070075/* This table only contains "desktop" CPUs, it need to be filled with embedded
76 * ones as well...
77 */
Stephen Rothwell49209602005-10-12 15:55:09 +100078#define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
79 PPC_FEATURE_HAS_MMU)
80#define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +110081#define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +110082#define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
83 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
84#define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
85 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
Anton Blanchard03054d52006-04-29 09:51:06 +100086#define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
Paul Mackerrasfab5db92006-06-07 16:14:40 +100087 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
Nathan Lynch0f473312008-07-10 01:06:57 +100088 PPC_FEATURE_TRUE_LE | \
89 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Michael Neulinge952e6c2008-06-18 10:47:26 +100090#define COMMON_USER_POWER7 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
91 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
Nathan Lynch0f473312008-07-10 01:06:57 +100092 PPC_FEATURE_TRUE_LE | \
93 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -050094#define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
95 PPC_FEATURE_TRUE_LE | \
96 PPC_FEATURE_HAS_ALTIVEC_COMP)
Kumar Galaf45c4482009-08-18 19:08:30 +000097#ifdef CONFIG_PPC_BOOK3E_64
98#define COMMON_USER_BOOKE (COMMON_USER_PPC64 | PPC_FEATURE_BOOKE)
99#else
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100100#define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
101 PPC_FEATURE_BOOKE)
Kumar Galaf45c4482009-08-18 19:08:30 +0000102#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -0700103
Paul Mackerras87a72f92007-10-04 14:18:01 +1000104static struct cpu_spec __initdata cpu_specs[] = {
Benjamin Herrenschmidt2d27cfd2009-07-23 23:15:59 +0000105#ifdef CONFIG_PPC_BOOK3S_64
Stephen Rothwell49209602005-10-12 15:55:09 +1000106 { /* Power3 */
107 .pvr_mask = 0xffff0000,
108 .pvr_value = 0x00400000,
109 .cpu_name = "POWER3 (630)",
110 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000111 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000112 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000113 .icache_bsize = 128,
114 .dcache_bsize = 128,
115 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600116 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000117 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000118 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100119 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100120 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +1000121 },
122 { /* Power3+ */
123 .pvr_mask = 0xffff0000,
124 .pvr_value = 0x00410000,
125 .cpu_name = "POWER3 (630+)",
126 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000127 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000128 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000129 .icache_bsize = 128,
130 .dcache_bsize = 128,
131 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600132 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000133 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000134 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100135 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100136 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +1000137 },
138 { /* Northstar */
139 .pvr_mask = 0xffff0000,
140 .pvr_value = 0x00330000,
141 .cpu_name = "RS64-II (northstar)",
142 .cpu_features = CPU_FTRS_RS64,
143 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000144 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000145 .icache_bsize = 128,
146 .dcache_bsize = 128,
147 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600148 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000149 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000150 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100151 .machine_check = machine_check_generic,
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,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100167 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100168 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000169 },
170 { /* I-star */
171 .pvr_mask = 0xffff0000,
172 .pvr_value = 0x00360000,
173 .cpu_name = "RS64-III (icestar)",
174 .cpu_features = CPU_FTRS_RS64,
175 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000176 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000177 .icache_bsize = 128,
178 .dcache_bsize = 128,
179 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600180 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000181 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000182 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100183 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100184 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000185 },
186 { /* S-star */
187 .pvr_mask = 0xffff0000,
188 .pvr_value = 0x00370000,
189 .cpu_name = "RS64-IV (sstar)",
190 .cpu_features = CPU_FTRS_RS64,
191 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000192 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000193 .icache_bsize = 128,
194 .dcache_bsize = 128,
195 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600196 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000197 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000198 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100199 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100200 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000201 },
202 { /* Power4 */
203 .pvr_mask = 0xffff0000,
204 .pvr_value = 0x00350000,
205 .cpu_name = "POWER4 (gp)",
206 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100207 .cpu_user_features = COMMON_USER_POWER4,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000208 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000209 .icache_bsize = 128,
210 .dcache_bsize = 128,
211 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600212 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000213 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000214 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100215 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100216 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000217 },
218 { /* Power4+ */
219 .pvr_mask = 0xffff0000,
220 .pvr_value = 0x00380000,
221 .cpu_name = "POWER4+ (gq)",
222 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100223 .cpu_user_features = COMMON_USER_POWER4,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000224 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000225 .icache_bsize = 128,
226 .dcache_bsize = 128,
227 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600228 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000229 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000230 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100231 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100232 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000233 },
234 { /* PPC970 */
235 .pvr_mask = 0xffff0000,
236 .pvr_value = 0x00390000,
237 .cpu_name = "PPC970",
238 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100239 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000240 PPC_FEATURE_HAS_ALTIVEC_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000241 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000242 .icache_bsize = 128,
243 .dcache_bsize = 128,
244 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600245 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000246 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500247 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000248 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000249 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100250 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100251 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000252 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000253 { /* PPC970FX */
254 .pvr_mask = 0xffff0000,
255 .pvr_value = 0x003c0000,
256 .cpu_name = "PPC970FX",
Stephen Rothwell49209602005-10-12 15:55:09 +1000257 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100258 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000259 PPC_FEATURE_HAS_ALTIVEC_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000260 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000261 .icache_bsize = 128,
262 .dcache_bsize = 128,
263 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600264 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000265 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500266 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000267 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000268 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100269 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100270 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000271 },
Olof Johansson3546e812007-02-26 00:35:14 -0600272 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
273 .pvr_mask = 0xffffffff,
274 .pvr_value = 0x00440100,
275 .cpu_name = "PPC970MP",
276 .cpu_features = CPU_FTRS_PPC970,
277 .cpu_user_features = COMMON_USER_POWER4 |
278 PPC_FEATURE_HAS_ALTIVEC_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000279 .mmu_features = MMU_FTR_HPTE_TABLE,
Olof Johansson3546e812007-02-26 00:35:14 -0600280 .icache_bsize = 128,
281 .dcache_bsize = 128,
282 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000283 .pmc_type = PPC_PMC_IBM,
Olof Johansson3546e812007-02-26 00:35:14 -0600284 .cpu_setup = __setup_cpu_ppc970,
285 .cpu_restore = __restore_cpu_ppc970,
286 .oprofile_cpu_type = "ppc64/970MP",
287 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100288 .machine_check = machine_check_generic,
Olof Johansson3546e812007-02-26 00:35:14 -0600289 .platform = "ppc970",
290 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000291 { /* PPC970MP */
292 .pvr_mask = 0xffff0000,
293 .pvr_value = 0x00440000,
294 .cpu_name = "PPC970MP",
295 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100296 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000297 PPC_FEATURE_HAS_ALTIVEC_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000298 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000299 .icache_bsize = 128,
300 .dcache_bsize = 128,
Anton Blanchard87af41b2006-05-05 05:44:26 +1000301 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000302 .pmc_type = PPC_PMC_IBM,
Olof Johansson5b43d202006-10-04 23:41:41 -0500303 .cpu_setup = __setup_cpu_ppc970MP,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500304 .cpu_restore = __restore_cpu_ppc970,
Mike Wolffecb3522006-11-21 14:41:54 -0600305 .oprofile_cpu_type = "ppc64/970MP",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000306 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100307 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100308 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000309 },
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500310 { /* PPC970GX */
311 .pvr_mask = 0xffff0000,
312 .pvr_value = 0x00450000,
313 .cpu_name = "PPC970GX",
314 .cpu_features = CPU_FTRS_PPC970,
315 .cpu_user_features = COMMON_USER_POWER4 |
316 PPC_FEATURE_HAS_ALTIVEC_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000317 .mmu_features = MMU_FTR_HPTE_TABLE,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500318 .icache_bsize = 128,
319 .dcache_bsize = 128,
320 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600321 .pmc_type = PPC_PMC_IBM,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500322 .cpu_setup = __setup_cpu_ppc970,
323 .oprofile_cpu_type = "ppc64/970",
324 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100325 .machine_check = machine_check_generic,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500326 .platform = "ppc970",
327 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100328 { /* Power5 GR */
Stephen Rothwell49209602005-10-12 15:55:09 +1000329 .pvr_mask = 0xffff0000,
330 .pvr_value = 0x003a0000,
331 .cpu_name = "POWER5 (gr)",
332 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100333 .cpu_user_features = COMMON_USER_POWER5,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000334 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000335 .icache_bsize = 128,
336 .dcache_bsize = 128,
337 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600338 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000339 .oprofile_cpu_type = "ppc64/power5",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000340 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000341 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
342 * and above but only works on POWER5 and above
343 */
344 .oprofile_mmcra_sihv = MMCRA_SIHV,
345 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100346 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100347 .platform = "power5",
Stephen Rothwell49209602005-10-12 15:55:09 +1000348 },
Mike Wolf31a12ce2007-07-10 13:13:47 -0500349 { /* Power5++ */
350 .pvr_mask = 0xffffff00,
351 .pvr_value = 0x003b0300,
352 .cpu_name = "POWER5+ (gs)",
353 .cpu_features = CPU_FTRS_POWER5,
354 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000355 .mmu_features = MMU_FTR_HPTE_TABLE,
Mike Wolf31a12ce2007-07-10 13:13:47 -0500356 .icache_bsize = 128,
357 .dcache_bsize = 128,
358 .num_pmcs = 6,
359 .oprofile_cpu_type = "ppc64/power5++",
360 .oprofile_type = PPC_OPROFILE_POWER4,
361 .oprofile_mmcra_sihv = MMCRA_SIHV,
362 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100363 .machine_check = machine_check_generic,
Mike Wolf31a12ce2007-07-10 13:13:47 -0500364 .platform = "power5+",
365 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100366 { /* Power5 GS */
Stephen Rothwell49209602005-10-12 15:55:09 +1000367 .pvr_mask = 0xffff0000,
368 .pvr_value = 0x003b0000,
Anton Blanchard834608f2006-01-09 15:42:30 +1100369 .cpu_name = "POWER5+ (gs)",
Stephen Rothwell49209602005-10-12 15:55:09 +1000370 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100371 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000372 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000373 .icache_bsize = 128,
374 .dcache_bsize = 128,
375 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600376 .pmc_type = PPC_PMC_IBM,
Anton Blanchard834608f2006-01-09 15:42:30 +1100377 .oprofile_cpu_type = "ppc64/power5+",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000378 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000379 .oprofile_mmcra_sihv = MMCRA_SIHV,
380 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100381 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100382 .platform = "power5+",
Stephen Rothwell49209602005-10-12 15:55:09 +1000383 },
Paul Mackerras974a76f2006-11-10 20:38:53 +1100384 { /* POWER6 in P5+ mode; 2.04-compliant processor */
385 .pvr_mask = 0xffffffff,
386 .pvr_value = 0x0f000001,
387 .cpu_name = "POWER5+",
388 .cpu_features = CPU_FTRS_POWER5,
389 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000390 .mmu_features = MMU_FTR_HPTE_TABLE,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100391 .icache_bsize = 128,
392 .dcache_bsize = 128,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100393 .machine_check = machine_check_generic,
Michael Wolf79af6c42009-04-27 06:17:54 +0000394 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
395 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100396 .platform = "power5+",
397 },
Anton Blanchard03054d52006-04-29 09:51:06 +1000398 { /* Power6 */
399 .pvr_mask = 0xffff0000,
400 .pvr_value = 0x003e0000,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100401 .cpu_name = "POWER6 (raw)",
402 .cpu_features = CPU_FTRS_POWER6,
403 .cpu_user_features = COMMON_USER_POWER6 |
404 PPC_FEATURE_POWER6_EXT,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000405 .mmu_features = MMU_FTR_HPTE_TABLE,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100406 .icache_bsize = 128,
407 .dcache_bsize = 128,
408 .num_pmcs = 6,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000409 .pmc_type = PPC_PMC_IBM,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100410 .oprofile_cpu_type = "ppc64/power6",
411 .oprofile_type = PPC_OPROFILE_POWER4,
412 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
413 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
414 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
415 POWER6_MMCRA_OTHER,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100416 .machine_check = machine_check_generic,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100417 .platform = "power6x",
418 },
419 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
420 .pvr_mask = 0xffffffff,
421 .pvr_value = 0x0f000002,
422 .cpu_name = "POWER6 (architected)",
Anton Blanchard03054d52006-04-29 09:51:06 +1000423 .cpu_features = CPU_FTRS_POWER6,
424 .cpu_user_features = COMMON_USER_POWER6,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000425 .mmu_features = MMU_FTR_HPTE_TABLE,
Anton Blanchard03054d52006-04-29 09:51:06 +1000426 .icache_bsize = 128,
427 .dcache_bsize = 128,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100428 .machine_check = machine_check_generic,
Michael Wolf79af6c42009-04-27 06:17:54 +0000429 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
430 .oprofile_type = PPC_OPROFILE_POWER4,
Anton Blanchard03054d52006-04-29 09:51:06 +1000431 .platform = "power6",
432 },
Joel Schopp635f5a62008-06-19 06:18:21 +1000433 { /* 2.06-compliant processor, i.e. Power7 "architected" mode */
434 .pvr_mask = 0xffffffff,
435 .pvr_value = 0x0f000003,
436 .cpu_name = "POWER7 (architected)",
437 .cpu_features = CPU_FTRS_POWER7,
438 .cpu_user_features = COMMON_USER_POWER7,
Milton Miller60dbf432009-04-29 20:58:01 +0000439 .mmu_features = MMU_FTR_HPTE_TABLE |
440 MMU_FTR_TLBIE_206,
Joel Schopp635f5a62008-06-19 06:18:21 +1000441 .icache_bsize = 128,
442 .dcache_bsize = 128,
443 .machine_check = machine_check_generic,
Michael Wolf79af6c42009-04-27 06:17:54 +0000444 .oprofile_type = PPC_OPROFILE_POWER4,
445 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
Joel Schopp635f5a62008-06-19 06:18:21 +1000446 .platform = "power7",
447 },
Michael Neulinge952e6c2008-06-18 10:47:26 +1000448 { /* Power7 */
449 .pvr_mask = 0xffff0000,
450 .pvr_value = 0x003f0000,
Joel Schopp635f5a62008-06-19 06:18:21 +1000451 .cpu_name = "POWER7 (raw)",
Michael Neulinge952e6c2008-06-18 10:47:26 +1000452 .cpu_features = CPU_FTRS_POWER7,
453 .cpu_user_features = COMMON_USER_POWER7,
Milton Miller60dbf432009-04-29 20:58:01 +0000454 .mmu_features = MMU_FTR_HPTE_TABLE |
455 MMU_FTR_TLBIE_206,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000456 .icache_bsize = 128,
457 .dcache_bsize = 128,
458 .num_pmcs = 6,
459 .pmc_type = PPC_PMC_IBM,
460 .cpu_setup = __setup_cpu_power7,
461 .cpu_restore = __restore_cpu_power7,
462 .oprofile_cpu_type = "ppc64/power7",
463 .oprofile_type = PPC_OPROFILE_POWER4,
464 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
465 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
466 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
467 POWER6_MMCRA_OTHER,
468 .platform = "power7",
469 },
Arnd Bergmannc902be72006-01-04 19:55:53 +0000470 { /* Cell Broadband Engine */
Stephen Rothwell49209602005-10-12 15:55:09 +1000471 .pvr_mask = 0xffff0000,
472 .pvr_value = 0x00700000,
473 .cpu_name = "Cell Broadband Engine",
474 .cpu_features = CPU_FTRS_CELL,
475 .cpu_user_features = COMMON_USER_PPC64 |
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +1100476 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
477 PPC_FEATURE_SMT,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000478 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000479 .icache_bsize = 128,
480 .dcache_bsize = 128,
Maynard Johnson18f21902006-11-20 18:45:16 +0100481 .num_pmcs = 4,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600482 .pmc_type = PPC_PMC_IBM,
Maynard Johnson18f21902006-11-20 18:45:16 +0100483 .oprofile_cpu_type = "ppc64/cell-be",
484 .oprofile_type = PPC_OPROFILE_CELL,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100485 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100486 .platform = "ppc-cell-be",
Stephen Rothwell49209602005-10-12 15:55:09 +1000487 },
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500488 { /* PA Semi PA6T */
489 .pvr_mask = 0x7fff0000,
490 .pvr_value = 0x00900000,
491 .cpu_name = "PA6T",
492 .cpu_features = CPU_FTRS_PA6T,
493 .cpu_user_features = COMMON_USER_PA6T,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000494 .mmu_features = MMU_FTR_HPTE_TABLE,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500495 .icache_bsize = 64,
496 .dcache_bsize = 64,
497 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600498 .pmc_type = PPC_PMC_PA6T,
Olof Johansson11999192007-02-04 16:36:51 -0600499 .cpu_setup = __setup_cpu_pa6t,
500 .cpu_restore = __restore_cpu_pa6t,
Olof Johansson25fc5302007-04-18 16:38:21 +1000501 .oprofile_cpu_type = "ppc64/pa6t",
502 .oprofile_type = PPC_OPROFILE_PA6T,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100503 .machine_check = machine_check_generic,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500504 .platform = "pa6t",
505 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000506 { /* default match */
507 .pvr_mask = 0x00000000,
508 .pvr_value = 0x00000000,
509 .cpu_name = "POWER4 (compatible)",
510 .cpu_features = CPU_FTRS_COMPATIBLE,
511 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000512 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000513 .icache_bsize = 128,
514 .dcache_bsize = 128,
515 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600516 .pmc_type = PPC_PMC_IBM,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100517 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100518 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000519 }
Benjamin Herrenschmidt2d27cfd2009-07-23 23:15:59 +0000520#endif /* CONFIG_PPC_BOOK3S_64 */
Benjamin Herrenschmidt2d27cfd2009-07-23 23:15:59 +0000521
Stephen Rothwell49209602005-10-12 15:55:09 +1000522#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -0700523#if CLASSIC_PPC
Stephen Rothwell49209602005-10-12 15:55:09 +1000524 { /* 601 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700525 .pvr_mask = 0xffff0000,
526 .pvr_value = 0x00010000,
527 .cpu_name = "601",
Kumar Gala10b35d92005-09-23 14:08:58 -0500528 .cpu_features = CPU_FTRS_PPC601,
Stephen Rothwell49209602005-10-12 15:55:09 +1000529 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
Paul Mackerras98599012005-10-22 16:51:34 +1000530 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000531 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700532 .icache_bsize = 32,
533 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100534 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100535 .platform = "ppc601",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700536 },
537 { /* 603 */
538 .pvr_mask = 0xffff0000,
539 .pvr_value = 0x00030000,
540 .cpu_name = "603",
Kumar Gala10b35d92005-09-23 14:08:58 -0500541 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000542 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000543 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700544 .icache_bsize = 32,
545 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100546 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100547 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100548 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700549 },
550 { /* 603e */
551 .pvr_mask = 0xffff0000,
552 .pvr_value = 0x00060000,
553 .cpu_name = "603e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500554 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000555 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000556 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700557 .icache_bsize = 32,
558 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100559 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100560 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100561 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700562 },
563 { /* 603ev */
564 .pvr_mask = 0xffff0000,
565 .pvr_value = 0x00070000,
566 .cpu_name = "603ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500567 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000568 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000569 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700570 .icache_bsize = 32,
571 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100572 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100573 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100574 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700575 },
576 { /* 604 */
577 .pvr_mask = 0xffff0000,
578 .pvr_value = 0x00040000,
579 .cpu_name = "604",
Kumar Gala10b35d92005-09-23 14:08:58 -0500580 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000581 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000582 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700583 .icache_bsize = 32,
584 .dcache_bsize = 32,
585 .num_pmcs = 2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100586 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100587 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100588 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700589 },
590 { /* 604e */
591 .pvr_mask = 0xfffff000,
592 .pvr_value = 0x00090000,
593 .cpu_name = "604e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500594 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000595 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000596 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700597 .icache_bsize = 32,
598 .dcache_bsize = 32,
599 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100600 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100601 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100602 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700603 },
604 { /* 604r */
605 .pvr_mask = 0xffff0000,
606 .pvr_value = 0x00090000,
607 .cpu_name = "604r",
Kumar Gala10b35d92005-09-23 14:08:58 -0500608 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000609 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000610 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700611 .icache_bsize = 32,
612 .dcache_bsize = 32,
613 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100614 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100615 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100616 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700617 },
618 { /* 604ev */
619 .pvr_mask = 0xffff0000,
620 .pvr_value = 0x000a0000,
621 .cpu_name = "604ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500622 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000623 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000624 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700625 .icache_bsize = 32,
626 .dcache_bsize = 32,
627 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100628 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100629 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100630 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700631 },
632 { /* 740/750 (0x4202, don't support TAU ?) */
633 .pvr_mask = 0xffffffff,
634 .pvr_value = 0x00084202,
635 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500636 .cpu_features = CPU_FTRS_740_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000637 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000638 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700639 .icache_bsize = 32,
640 .dcache_bsize = 32,
641 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100642 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100643 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100644 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700645 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700646 { /* 750CX (80100 and 8010x?) */
647 .pvr_mask = 0xfffffff0,
648 .pvr_value = 0x00080100,
649 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500650 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000651 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000652 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700653 .icache_bsize = 32,
654 .dcache_bsize = 32,
655 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100656 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100657 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100658 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700659 },
660 { /* 750CX (82201 and 82202) */
661 .pvr_mask = 0xfffffff0,
662 .pvr_value = 0x00082200,
663 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500664 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000665 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000666 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700667 .icache_bsize = 32,
668 .dcache_bsize = 32,
669 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000670 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100671 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100672 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100673 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700674 },
675 { /* 750CXe (82214) */
676 .pvr_mask = 0xfffffff0,
677 .pvr_value = 0x00082210,
678 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500679 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000680 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000681 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700682 .icache_bsize = 32,
683 .dcache_bsize = 32,
684 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000685 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100686 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100687 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100688 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700689 },
Arthur Othieno7c316252005-09-03 15:55:52 -0700690 { /* 750CXe "Gekko" (83214) */
691 .pvr_mask = 0xffffffff,
692 .pvr_value = 0x00083214,
693 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500694 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000695 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000696 .mmu_features = MMU_FTR_HPTE_TABLE,
Arthur Othieno7c316252005-09-03 15:55:52 -0700697 .icache_bsize = 32,
698 .dcache_bsize = 32,
699 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000700 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100701 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100702 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100703 .platform = "ppc750",
Arthur Othieno7c316252005-09-03 15:55:52 -0700704 },
Albert Herranz45158dc2009-12-12 06:31:46 +0000705 { /* 750CL (and "Broadway") */
706 .pvr_mask = 0xfffff0e0,
707 .pvr_value = 0x00087000,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500708 .cpu_name = "750CL",
Josh Boyera14c4502007-04-13 04:33:25 +1000709 .cpu_features = CPU_FTRS_750CL,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500710 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000711 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500712 .icache_bsize = 32,
713 .dcache_bsize = 32,
714 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000715 .pmc_type = PPC_PMC_IBM,
Josh Boyera14c4502007-04-13 04:33:25 +1000716 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100717 .machine_check = machine_check_generic,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500718 .platform = "ppc750",
Dragos Tatulea04f56532009-09-16 11:58:15 +0300719 .oprofile_cpu_type = "ppc/750",
720 .oprofile_type = PPC_OPROFILE_G4,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500721 },
Arthur Othienoac1ff042005-09-03 15:55:51 -0700722 { /* 745/755 */
723 .pvr_mask = 0xfffff000,
724 .pvr_value = 0x00083000,
725 .cpu_name = "745/755",
Kumar Gala10b35d92005-09-23 14:08:58 -0500726 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000727 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000728 .mmu_features = MMU_FTR_HPTE_TABLE,
Arthur Othienoac1ff042005-09-03 15:55:51 -0700729 .icache_bsize = 32,
730 .dcache_bsize = 32,
731 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000732 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100733 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100734 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100735 .platform = "ppc750",
Arthur Othienoac1ff042005-09-03 15:55:51 -0700736 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700737 { /* 750FX rev 1.x */
738 .pvr_mask = 0xffffff00,
739 .pvr_value = 0x70000100,
740 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500741 .cpu_features = CPU_FTRS_750FX1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000742 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000743 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700744 .icache_bsize = 32,
745 .dcache_bsize = 32,
746 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000747 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100748 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100749 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100750 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000751 .oprofile_cpu_type = "ppc/750",
752 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700753 },
754 { /* 750FX rev 2.0 must disable HID0[DPM] */
755 .pvr_mask = 0xffffffff,
756 .pvr_value = 0x70000200,
757 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500758 .cpu_features = CPU_FTRS_750FX2,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000759 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000760 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700761 .icache_bsize = 32,
762 .dcache_bsize = 32,
763 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000764 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100765 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100766 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100767 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000768 .oprofile_cpu_type = "ppc/750",
769 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700770 },
771 { /* 750FX (All revs except 2.0) */
772 .pvr_mask = 0xffff0000,
773 .pvr_value = 0x70000000,
774 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500775 .cpu_features = CPU_FTRS_750FX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000776 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000777 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700778 .icache_bsize = 32,
779 .dcache_bsize = 32,
780 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000781 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100782 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100783 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100784 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000785 .oprofile_cpu_type = "ppc/750",
786 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700787 },
788 { /* 750GX */
789 .pvr_mask = 0xffff0000,
790 .pvr_value = 0x70020000,
791 .cpu_name = "750GX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500792 .cpu_features = CPU_FTRS_750GX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000793 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000794 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700795 .icache_bsize = 32,
796 .dcache_bsize = 32,
797 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000798 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100799 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100800 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100801 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000802 .oprofile_cpu_type = "ppc/750",
803 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700804 },
805 { /* 740/750 (L2CR bit need fixup for 740) */
806 .pvr_mask = 0xffff0000,
807 .pvr_value = 0x00080000,
808 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500809 .cpu_features = CPU_FTRS_740,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000810 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000811 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700812 .icache_bsize = 32,
813 .dcache_bsize = 32,
814 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000815 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100816 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100817 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100818 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700819 },
820 { /* 7400 rev 1.1 ? (no TAU) */
821 .pvr_mask = 0xffffffff,
822 .pvr_value = 0x000c1101,
823 .cpu_name = "7400 (1.1)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500824 .cpu_features = CPU_FTRS_7400_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000825 .cpu_user_features = COMMON_USER |
826 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000827 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700828 .icache_bsize = 32,
829 .dcache_bsize = 32,
830 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000831 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100832 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100833 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100834 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700835 },
836 { /* 7400 */
837 .pvr_mask = 0xffff0000,
838 .pvr_value = 0x000c0000,
839 .cpu_name = "7400",
Kumar Gala10b35d92005-09-23 14:08:58 -0500840 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000841 .cpu_user_features = COMMON_USER |
842 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000843 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700844 .icache_bsize = 32,
845 .dcache_bsize = 32,
846 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000847 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100848 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100849 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100850 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700851 },
852 { /* 7410 */
853 .pvr_mask = 0xffff0000,
854 .pvr_value = 0x800c0000,
855 .cpu_name = "7410",
Kumar Gala10b35d92005-09-23 14:08:58 -0500856 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000857 .cpu_user_features = COMMON_USER |
858 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000859 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700860 .icache_bsize = 32,
861 .dcache_bsize = 32,
862 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000863 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100864 .cpu_setup = __setup_cpu_7410,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100865 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100866 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700867 },
868 { /* 7450 2.0 - no doze/nap */
869 .pvr_mask = 0xffffffff,
870 .pvr_value = 0x80000200,
871 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500872 .cpu_features = CPU_FTRS_7450_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000873 .cpu_user_features = COMMON_USER |
874 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000875 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700876 .icache_bsize = 32,
877 .dcache_bsize = 32,
878 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000879 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600880 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600881 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000882 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100883 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100884 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700885 },
886 { /* 7450 2.1 */
887 .pvr_mask = 0xffffffff,
888 .pvr_value = 0x80000201,
889 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500890 .cpu_features = CPU_FTRS_7450_21,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000891 .cpu_user_features = COMMON_USER |
892 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000893 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700894 .icache_bsize = 32,
895 .dcache_bsize = 32,
896 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000897 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600898 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600899 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000900 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100901 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100902 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700903 },
904 { /* 7450 2.3 and newer */
905 .pvr_mask = 0xffff0000,
906 .pvr_value = 0x80000000,
907 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500908 .cpu_features = CPU_FTRS_7450_23,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000909 .cpu_user_features = COMMON_USER |
910 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000911 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700912 .icache_bsize = 32,
913 .dcache_bsize = 32,
914 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000915 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600916 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600917 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000918 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100919 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100920 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700921 },
922 { /* 7455 rev 1.x */
923 .pvr_mask = 0xffffff00,
924 .pvr_value = 0x80010100,
925 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500926 .cpu_features = CPU_FTRS_7455_1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000927 .cpu_user_features = COMMON_USER |
928 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000929 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700930 .icache_bsize = 32,
931 .dcache_bsize = 32,
932 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000933 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600934 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600935 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000936 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100937 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100938 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700939 },
940 { /* 7455 rev 2.0 */
941 .pvr_mask = 0xffffffff,
942 .pvr_value = 0x80010200,
943 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500944 .cpu_features = CPU_FTRS_7455_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000945 .cpu_user_features = COMMON_USER |
946 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000947 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700948 .icache_bsize = 32,
949 .dcache_bsize = 32,
950 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000951 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600952 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600953 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000954 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100955 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100956 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700957 },
958 { /* 7455 others */
959 .pvr_mask = 0xffff0000,
960 .pvr_value = 0x80010000,
961 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500962 .cpu_features = CPU_FTRS_7455,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000963 .cpu_user_features = COMMON_USER |
964 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000965 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700966 .icache_bsize = 32,
967 .dcache_bsize = 32,
968 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000969 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600970 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600971 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000972 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100973 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100974 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700975 },
976 { /* 7447/7457 Rev 1.0 */
977 .pvr_mask = 0xffffffff,
978 .pvr_value = 0x80020100,
979 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500980 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000981 .cpu_user_features = COMMON_USER |
982 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000983 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700984 .icache_bsize = 32,
985 .dcache_bsize = 32,
986 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000987 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600988 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600989 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000990 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100991 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100992 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700993 },
994 { /* 7447/7457 Rev 1.1 */
995 .pvr_mask = 0xffffffff,
996 .pvr_value = 0x80020101,
997 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500998 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000999 .cpu_user_features = COMMON_USER |
1000 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001001 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001002 .icache_bsize = 32,
1003 .dcache_bsize = 32,
1004 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001005 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001006 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001007 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001008 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001009 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001010 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001011 },
1012 { /* 7447/7457 Rev 1.2 and later */
1013 .pvr_mask = 0xffff0000,
1014 .pvr_value = 0x80020000,
1015 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -05001016 .cpu_features = CPU_FTRS_7447,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001017 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001018 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001019 .icache_bsize = 32,
1020 .dcache_bsize = 32,
1021 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001022 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001023 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001024 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001025 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001026 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001027 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001028 },
1029 { /* 7447A */
1030 .pvr_mask = 0xffff0000,
1031 .pvr_value = 0x80030000,
1032 .cpu_name = "7447A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001033 .cpu_features = CPU_FTRS_7447A,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001034 .cpu_user_features = COMMON_USER |
1035 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001036 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001037 .icache_bsize = 32,
1038 .dcache_bsize = 32,
1039 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001040 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001041 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001042 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001043 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001044 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001045 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001046 },
Kumar Galabbde6302005-09-03 15:55:55 -07001047 { /* 7448 */
1048 .pvr_mask = 0xffff0000,
1049 .pvr_value = 0x80040000,
1050 .cpu_name = "7448",
James.Yang3d372542007-05-02 16:34:43 -05001051 .cpu_features = CPU_FTRS_7448,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001052 .cpu_user_features = COMMON_USER |
1053 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001054 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Kumar Galabbde6302005-09-03 15:55:55 -07001055 .icache_bsize = 32,
1056 .dcache_bsize = 32,
1057 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001058 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001059 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001060 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001061 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001062 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001063 .platform = "ppc7450",
Kumar Galabbde6302005-09-03 15:55:55 -07001064 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001065 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
1066 .pvr_mask = 0x7fff0000,
1067 .pvr_value = 0x00810000,
1068 .cpu_name = "82xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001069 .cpu_features = CPU_FTRS_82XX,
Stephen Rothwell49209602005-10-12 15:55:09 +10001070 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001071 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001072 .icache_bsize = 32,
1073 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001074 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001075 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001076 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001077 },
1078 { /* All G2_LE (603e core, plus some) have the same pvr */
1079 .pvr_mask = 0x7fff0000,
1080 .pvr_value = 0x00820000,
1081 .cpu_name = "G2_LE",
Kumar Gala10b35d92005-09-23 14:08:58 -05001082 .cpu_features = CPU_FTRS_G2_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +10001083 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001084 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001085 .icache_bsize = 32,
1086 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001087 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001088 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001089 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001090 },
Kim Phillips6c4a2502006-10-02 20:10:24 -05001091 { /* e300c1 (a 603e core, plus some) on 83xx */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001092 .pvr_mask = 0x7fff0000,
1093 .pvr_value = 0x00830000,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001094 .cpu_name = "e300c1",
Kumar Gala10b35d92005-09-23 14:08:58 -05001095 .cpu_features = CPU_FTRS_E300,
Stephen Rothwell49209602005-10-12 15:55:09 +10001096 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001097 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001098 .icache_bsize = 32,
1099 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001100 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001101 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001102 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001103 },
Kim Phillips6c4a2502006-10-02 20:10:24 -05001104 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
1105 .pvr_mask = 0x7fff0000,
1106 .pvr_value = 0x00840000,
1107 .cpu_name = "e300c2",
Kim Phillipsaa42c692006-12-08 02:43:30 -06001108 .cpu_features = CPU_FTRS_E300C2,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001109 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Kumar Gala2319f122009-03-19 03:55:41 +00001110 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1111 MMU_FTR_NEED_DTLB_SW_LRU,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001112 .icache_bsize = 32,
1113 .dcache_bsize = 32,
1114 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001115 .machine_check = machine_check_generic,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001116 .platform = "ppc603",
1117 },
Li Yanga58d5242007-10-19 19:38:42 +08001118 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
Scott Wood57933f82006-12-01 12:57:05 -06001119 .pvr_mask = 0x7fff0000,
1120 .pvr_value = 0x00850000,
1121 .cpu_name = "e300c3",
1122 .cpu_features = CPU_FTRS_E300,
1123 .cpu_user_features = COMMON_USER,
Kumar Gala2319f122009-03-19 03:55:41 +00001124 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1125 MMU_FTR_NEED_DTLB_SW_LRU,
Scott Wood57933f82006-12-01 12:57:05 -06001126 .icache_bsize = 32,
1127 .dcache_bsize = 32,
1128 .cpu_setup = __setup_cpu_603,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001129 .num_pmcs = 4,
1130 .oprofile_cpu_type = "ppc/e300",
1131 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Scott Wood57933f82006-12-01 12:57:05 -06001132 .platform = "ppc603",
1133 },
Li Yanga58d5242007-10-19 19:38:42 +08001134 { /* e300c4 (e300c1, plus one IU) */
1135 .pvr_mask = 0x7fff0000,
1136 .pvr_value = 0x00860000,
1137 .cpu_name = "e300c4",
1138 .cpu_features = CPU_FTRS_E300,
1139 .cpu_user_features = COMMON_USER,
Kumar Gala2319f122009-03-19 03:55:41 +00001140 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1141 MMU_FTR_NEED_DTLB_SW_LRU,
Li Yanga58d5242007-10-19 19:38:42 +08001142 .icache_bsize = 32,
1143 .dcache_bsize = 32,
1144 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001145 .machine_check = machine_check_generic,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001146 .num_pmcs = 4,
1147 .oprofile_cpu_type = "ppc/e300",
1148 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Li Yanga58d5242007-10-19 19:38:42 +08001149 .platform = "ppc603",
1150 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001151 { /* default match, we assume split I/D cache & TB (non-601)... */
1152 .pvr_mask = 0x00000000,
1153 .pvr_value = 0x00000000,
1154 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -05001155 .cpu_features = CPU_FTRS_CLASSIC32,
Stephen Rothwell49209602005-10-12 15:55:09 +10001156 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001157 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001158 .icache_bsize = 32,
1159 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001160 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001161 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001162 },
1163#endif /* CLASSIC_PPC */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001164#ifdef CONFIG_8xx
1165 { /* 8xx */
1166 .pvr_mask = 0xffff0000,
1167 .pvr_value = 0x00500000,
1168 .cpu_name = "8xx",
1169 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1170 * if the 8xx code is there.... */
Kumar Gala10b35d92005-09-23 14:08:58 -05001171 .cpu_features = CPU_FTRS_8XX,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001172 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001173 .mmu_features = MMU_FTR_TYPE_8xx,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001174 .icache_bsize = 16,
1175 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001176 .platform = "ppc823",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001177 },
1178#endif /* CONFIG_8xx */
1179#ifdef CONFIG_40x
1180 { /* 403GC */
1181 .pvr_mask = 0xffffff00,
1182 .pvr_value = 0x00200200,
1183 .cpu_name = "403GC",
Kumar Gala10b35d92005-09-23 14:08:58 -05001184 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001185 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001186 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001187 .icache_bsize = 16,
1188 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001189 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001190 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001191 },
1192 { /* 403GCX */
1193 .pvr_mask = 0xffffff00,
1194 .pvr_value = 0x00201400,
1195 .cpu_name = "403GCX",
Kumar Gala10b35d92005-09-23 14:08:58 -05001196 .cpu_features = CPU_FTRS_40X,
Paul Mackerras98599012005-10-22 16:51:34 +10001197 .cpu_user_features = PPC_FEATURE_32 |
1198 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001199 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001200 .icache_bsize = 16,
1201 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001202 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001203 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001204 },
1205 { /* 403G ?? */
1206 .pvr_mask = 0xffff0000,
1207 .pvr_value = 0x00200000,
1208 .cpu_name = "403G ??",
Kumar Gala10b35d92005-09-23 14:08:58 -05001209 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001210 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001211 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001212 .icache_bsize = 16,
1213 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001214 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001215 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001216 },
1217 { /* 405GP */
1218 .pvr_mask = 0xffff0000,
1219 .pvr_value = 0x40110000,
1220 .cpu_name = "405GP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001221 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001222 .cpu_user_features = PPC_FEATURE_32 |
1223 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001224 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001225 .icache_bsize = 32,
1226 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001227 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001228 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001229 },
1230 { /* STB 03xxx */
1231 .pvr_mask = 0xffff0000,
1232 .pvr_value = 0x40130000,
1233 .cpu_name = "STB03xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001234 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001235 .cpu_user_features = PPC_FEATURE_32 |
1236 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001237 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001238 .icache_bsize = 32,
1239 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001240 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001241 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001242 },
1243 { /* STB 04xxx */
1244 .pvr_mask = 0xffff0000,
1245 .pvr_value = 0x41810000,
1246 .cpu_name = "STB04xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001247 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001248 .cpu_user_features = PPC_FEATURE_32 |
1249 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001250 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001251 .icache_bsize = 32,
1252 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001253 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001254 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001255 },
1256 { /* NP405L */
1257 .pvr_mask = 0xffff0000,
1258 .pvr_value = 0x41610000,
1259 .cpu_name = "NP405L",
Kumar Gala10b35d92005-09-23 14:08:58 -05001260 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001261 .cpu_user_features = PPC_FEATURE_32 |
1262 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001263 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001264 .icache_bsize = 32,
1265 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001266 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001267 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001268 },
1269 { /* NP4GS3 */
1270 .pvr_mask = 0xffff0000,
1271 .pvr_value = 0x40B10000,
1272 .cpu_name = "NP4GS3",
Kumar Gala10b35d92005-09-23 14:08:58 -05001273 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001274 .cpu_user_features = PPC_FEATURE_32 |
1275 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001276 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001277 .icache_bsize = 32,
1278 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001279 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001280 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001281 },
1282 { /* NP405H */
1283 .pvr_mask = 0xffff0000,
1284 .pvr_value = 0x41410000,
1285 .cpu_name = "NP405H",
Kumar Gala10b35d92005-09-23 14:08:58 -05001286 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001287 .cpu_user_features = PPC_FEATURE_32 |
1288 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001289 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001290 .icache_bsize = 32,
1291 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001292 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001293 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001294 },
1295 { /* 405GPr */
1296 .pvr_mask = 0xffff0000,
1297 .pvr_value = 0x50910000,
1298 .cpu_name = "405GPr",
Kumar Gala10b35d92005-09-23 14:08:58 -05001299 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001300 .cpu_user_features = PPC_FEATURE_32 |
1301 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001302 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001303 .icache_bsize = 32,
1304 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001305 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001306 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001307 },
1308 { /* STBx25xx */
1309 .pvr_mask = 0xffff0000,
1310 .pvr_value = 0x51510000,
1311 .cpu_name = "STBx25xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001312 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001313 .cpu_user_features = PPC_FEATURE_32 |
1314 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001315 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001316 .icache_bsize = 32,
1317 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001318 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001319 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001320 },
1321 { /* 405LP */
1322 .pvr_mask = 0xffff0000,
1323 .pvr_value = 0x41F10000,
1324 .cpu_name = "405LP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001325 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001326 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001327 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001328 .icache_bsize = 32,
1329 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001330 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001331 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001332 },
1333 { /* Xilinx Virtex-II Pro */
Grant C. Likely72646c72006-01-19 01:13:20 -07001334 .pvr_mask = 0xfffff000,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001335 .pvr_value = 0x20010000,
1336 .cpu_name = "Virtex-II Pro",
Kumar Gala10b35d92005-09-23 14:08:58 -05001337 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001338 .cpu_user_features = PPC_FEATURE_32 |
1339 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001340 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001341 .icache_bsize = 32,
1342 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001343 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001344 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001345 },
Grant C. Likely72646c72006-01-19 01:13:20 -07001346 { /* Xilinx Virtex-4 FX */
1347 .pvr_mask = 0xfffff000,
1348 .pvr_value = 0x20011000,
1349 .cpu_name = "Virtex-4 FX",
1350 .cpu_features = CPU_FTRS_40X,
1351 .cpu_user_features = PPC_FEATURE_32 |
1352 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001353 .mmu_features = MMU_FTR_TYPE_40x,
Grant C. Likely72646c72006-01-19 01:13:20 -07001354 .icache_bsize = 32,
1355 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001356 .machine_check = machine_check_4xx,
Peter Bergner838fdb42006-09-14 14:18:38 -05001357 .platform = "ppc405",
Grant C. Likely72646c72006-01-19 01:13:20 -07001358 },
Eugene Suroveginad95d602005-06-07 13:22:09 -07001359 { /* 405EP */
1360 .pvr_mask = 0xffff0000,
1361 .pvr_value = 0x51210000,
1362 .cpu_name = "405EP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001363 .cpu_features = CPU_FTRS_40X,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001364 .cpu_user_features = PPC_FEATURE_32 |
1365 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001366 .mmu_features = MMU_FTR_TYPE_40x,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001367 .icache_bsize = 32,
1368 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001369 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001370 .platform = "ppc405",
Eugene Suroveginad95d602005-06-07 13:22:09 -07001371 },
Lee Nipperff349102010-07-09 01:17:16 +00001372 { /* 405EX Rev. A/B with Security */
1373 .pvr_mask = 0xffff000f,
1374 .pvr_value = 0x12910007,
1375 .cpu_name = "405EX Rev. A/B",
Stefan Roese5d8476c2007-10-11 22:08:14 +10001376 .cpu_features = CPU_FTRS_40X,
1377 .cpu_user_features = PPC_FEATURE_32 |
1378 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001379 .mmu_features = MMU_FTR_TYPE_40x,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001380 .icache_bsize = 32,
1381 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001382 .machine_check = machine_check_4xx,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001383 .platform = "ppc405",
1384 },
Lee Nipperff349102010-07-09 01:17:16 +00001385 { /* 405EX Rev. C without Security */
1386 .pvr_mask = 0xffff000f,
1387 .pvr_value = 0x1291000d,
1388 .cpu_name = "405EX Rev. C",
1389 .cpu_features = CPU_FTRS_40X,
1390 .cpu_user_features = PPC_FEATURE_32 |
1391 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1392 .mmu_features = MMU_FTR_TYPE_40x,
1393 .icache_bsize = 32,
1394 .dcache_bsize = 32,
1395 .machine_check = machine_check_4xx,
1396 .platform = "ppc405",
1397 },
1398 { /* 405EX Rev. C with Security */
1399 .pvr_mask = 0xffff000f,
1400 .pvr_value = 0x1291000f,
1401 .cpu_name = "405EX Rev. C",
1402 .cpu_features = CPU_FTRS_40X,
1403 .cpu_user_features = PPC_FEATURE_32 |
1404 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1405 .mmu_features = MMU_FTR_TYPE_40x,
1406 .icache_bsize = 32,
1407 .dcache_bsize = 32,
1408 .machine_check = machine_check_4xx,
1409 .platform = "ppc405",
1410 },
1411 { /* 405EX Rev. D without Security */
1412 .pvr_mask = 0xffff000f,
1413 .pvr_value = 0x12910003,
1414 .cpu_name = "405EX Rev. D",
1415 .cpu_features = CPU_FTRS_40X,
1416 .cpu_user_features = PPC_FEATURE_32 |
1417 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1418 .mmu_features = MMU_FTR_TYPE_40x,
1419 .icache_bsize = 32,
1420 .dcache_bsize = 32,
1421 .machine_check = machine_check_4xx,
1422 .platform = "ppc405",
1423 },
1424 { /* 405EX Rev. D with Security */
1425 .pvr_mask = 0xffff000f,
1426 .pvr_value = 0x12910005,
1427 .cpu_name = "405EX Rev. D",
1428 .cpu_features = CPU_FTRS_40X,
1429 .cpu_user_features = PPC_FEATURE_32 |
1430 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1431 .mmu_features = MMU_FTR_TYPE_40x,
1432 .icache_bsize = 32,
1433 .dcache_bsize = 32,
1434 .machine_check = machine_check_4xx,
1435 .platform = "ppc405",
1436 },
1437 { /* 405EXr Rev. A/B without Security */
1438 .pvr_mask = 0xffff000f,
1439 .pvr_value = 0x12910001,
1440 .cpu_name = "405EXr Rev. A/B",
1441 .cpu_features = CPU_FTRS_40X,
1442 .cpu_user_features = PPC_FEATURE_32 |
1443 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1444 .mmu_features = MMU_FTR_TYPE_40x,
1445 .icache_bsize = 32,
1446 .dcache_bsize = 32,
1447 .machine_check = machine_check_4xx,
1448 .platform = "ppc405",
1449 },
1450 { /* 405EXr Rev. C without Security */
1451 .pvr_mask = 0xffff000f,
1452 .pvr_value = 0x12910009,
1453 .cpu_name = "405EXr Rev. C",
1454 .cpu_features = CPU_FTRS_40X,
1455 .cpu_user_features = PPC_FEATURE_32 |
1456 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1457 .mmu_features = MMU_FTR_TYPE_40x,
1458 .icache_bsize = 32,
1459 .dcache_bsize = 32,
1460 .machine_check = machine_check_4xx,
1461 .platform = "ppc405",
1462 },
1463 { /* 405EXr Rev. C with Security */
1464 .pvr_mask = 0xffff000f,
1465 .pvr_value = 0x1291000b,
1466 .cpu_name = "405EXr Rev. C",
1467 .cpu_features = CPU_FTRS_40X,
1468 .cpu_user_features = PPC_FEATURE_32 |
1469 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1470 .mmu_features = MMU_FTR_TYPE_40x,
1471 .icache_bsize = 32,
1472 .dcache_bsize = 32,
1473 .machine_check = machine_check_4xx,
1474 .platform = "ppc405",
1475 },
1476 { /* 405EXr Rev. D without Security */
1477 .pvr_mask = 0xffff000f,
Stefan Roeseb676d842008-01-15 18:09:15 +11001478 .pvr_value = 0x12910000,
Lee Nipperff349102010-07-09 01:17:16 +00001479 .cpu_name = "405EXr Rev. D",
1480 .cpu_features = CPU_FTRS_40X,
1481 .cpu_user_features = PPC_FEATURE_32 |
1482 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1483 .mmu_features = MMU_FTR_TYPE_40x,
1484 .icache_bsize = 32,
1485 .dcache_bsize = 32,
1486 .machine_check = machine_check_4xx,
1487 .platform = "ppc405",
1488 },
1489 { /* 405EXr Rev. D with Security */
1490 .pvr_mask = 0xffff000f,
1491 .pvr_value = 0x12910002,
1492 .cpu_name = "405EXr Rev. D",
Stefan Roeseb676d842008-01-15 18:09:15 +11001493 .cpu_features = CPU_FTRS_40X,
1494 .cpu_user_features = PPC_FEATURE_32 |
1495 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001496 .mmu_features = MMU_FTR_TYPE_40x,
Stefan Roeseb676d842008-01-15 18:09:15 +11001497 .icache_bsize = 32,
1498 .dcache_bsize = 32,
1499 .machine_check = machine_check_4xx,
1500 .platform = "ppc405",
1501 },
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001502 {
1503 /* 405EZ */
1504 .pvr_mask = 0xffff0000,
1505 .pvr_value = 0x41510000,
1506 .cpu_name = "405EZ",
1507 .cpu_features = CPU_FTRS_40X,
1508 .cpu_user_features = PPC_FEATURE_32 |
1509 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001510 .mmu_features = MMU_FTR_TYPE_40x,
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001511 .icache_bsize = 32,
1512 .dcache_bsize = 32,
1513 .machine_check = machine_check_4xx,
1514 .platform = "ppc405",
1515 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001516 { /* default match */
1517 .pvr_mask = 0x00000000,
1518 .pvr_value = 0x00000000,
1519 .cpu_name = "(generic 40x PPC)",
1520 .cpu_features = CPU_FTRS_40X,
1521 .cpu_user_features = PPC_FEATURE_32 |
1522 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001523 .mmu_features = MMU_FTR_TYPE_40x,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001524 .icache_bsize = 32,
1525 .dcache_bsize = 32,
1526 .machine_check = machine_check_4xx,
1527 .platform = "ppc405",
1528 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001529
1530#endif /* CONFIG_40x */
1531#ifdef CONFIG_44x
Matt Porterc9cf73a2005-07-31 22:34:52 -07001532 {
1533 .pvr_mask = 0xf0000fff,
1534 .pvr_value = 0x40000850,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001535 .cpu_name = "440GR Rev. A",
1536 .cpu_features = CPU_FTRS_44X,
1537 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001538 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001539 .icache_bsize = 32,
1540 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001541 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001542 .platform = "ppc440",
1543 },
1544 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1545 .pvr_mask = 0xf0000fff,
1546 .pvr_value = 0x40000858,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001547 .cpu_name = "440EP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001548 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001549 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001550 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001551 .icache_bsize = 32,
1552 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001553 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001554 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001555 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001556 },
1557 {
1558 .pvr_mask = 0xf0000fff,
1559 .pvr_value = 0x400008d3,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001560 .cpu_name = "440GR Rev. B",
1561 .cpu_features = CPU_FTRS_44X,
1562 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001563 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001564 .icache_bsize = 32,
1565 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001566 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001567 .platform = "ppc440",
1568 },
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001569 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1570 .pvr_mask = 0xf0000ff7,
1571 .pvr_value = 0x400008d4,
1572 .cpu_name = "440EP Rev. C",
1573 .cpu_features = CPU_FTRS_44X,
1574 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001575 .mmu_features = MMU_FTR_TYPE_44x,
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001576 .icache_bsize = 32,
1577 .dcache_bsize = 32,
1578 .cpu_setup = __setup_cpu_440ep,
1579 .machine_check = machine_check_4xx,
1580 .platform = "ppc440",
1581 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001582 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1583 .pvr_mask = 0xf0000fff,
1584 .pvr_value = 0x400008db,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001585 .cpu_name = "440EP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001586 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001587 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001588 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001589 .icache_bsize = 32,
1590 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001591 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001592 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001593 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001594 },
Valentine Barshak15fc9932007-08-29 17:40:30 +04001595 { /* 440GRX */
1596 .pvr_mask = 0xf0000ffb,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001597 .pvr_value = 0x200008D0,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001598 .cpu_name = "440GRX",
1599 .cpu_features = CPU_FTRS_44X,
1600 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001601 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001602 .icache_bsize = 32,
1603 .dcache_bsize = 32,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001604 .cpu_setup = __setup_cpu_440grx,
Valentine Barshakb2be3b12007-12-22 03:22:23 +11001605 .machine_check = machine_check_440A,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001606 .platform = "ppc440",
Valentine Barshak15fc9932007-08-29 17:40:30 +04001607 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001608 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1609 .pvr_mask = 0xf0000ffb,
1610 .pvr_value = 0x200008D8,
1611 .cpu_name = "440EPX",
1612 .cpu_features = CPU_FTRS_44X,
1613 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001614 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001615 .icache_bsize = 32,
1616 .dcache_bsize = 32,
1617 .cpu_setup = __setup_cpu_440epx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001618 .machine_check = machine_check_440A,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001619 .platform = "ppc440",
1620 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001621 { /* 440GP Rev. B */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001622 .pvr_mask = 0xf0000fff,
1623 .pvr_value = 0x40000440,
1624 .cpu_name = "440GP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001625 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001626 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001627 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001628 .icache_bsize = 32,
1629 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001630 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001631 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001632 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001633 { /* 440GP Rev. C */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001634 .pvr_mask = 0xf0000fff,
1635 .pvr_value = 0x40000481,
1636 .cpu_name = "440GP Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001637 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001638 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001639 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001640 .icache_bsize = 32,
1641 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001642 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001643 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001644 },
1645 { /* 440GX Rev. A */
1646 .pvr_mask = 0xf0000fff,
1647 .pvr_value = 0x50000850,
1648 .cpu_name = "440GX Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001649 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001650 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001651 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001652 .icache_bsize = 32,
1653 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001654 .cpu_setup = __setup_cpu_440gx,
1655 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001656 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001657 },
1658 { /* 440GX Rev. B */
1659 .pvr_mask = 0xf0000fff,
1660 .pvr_value = 0x50000851,
1661 .cpu_name = "440GX Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001662 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001663 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001664 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001665 .icache_bsize = 32,
1666 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001667 .cpu_setup = __setup_cpu_440gx,
1668 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001669 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001670 },
1671 { /* 440GX Rev. C */
1672 .pvr_mask = 0xf0000fff,
1673 .pvr_value = 0x50000892,
1674 .cpu_name = "440GX Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001675 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001676 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001677 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001678 .icache_bsize = 32,
1679 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001680 .cpu_setup = __setup_cpu_440gx,
1681 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001682 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001683 },
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001684 { /* 440GX Rev. F */
1685 .pvr_mask = 0xf0000fff,
1686 .pvr_value = 0x50000894,
1687 .cpu_name = "440GX Rev. F",
Kumar Gala10b35d92005-09-23 14:08:58 -05001688 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001689 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001690 .mmu_features = MMU_FTR_TYPE_44x,
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001691 .icache_bsize = 32,
1692 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001693 .cpu_setup = __setup_cpu_440gx,
1694 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001695 .platform = "ppc440",
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001696 },
Matt Porter656de7e2005-09-03 15:55:42 -07001697 { /* 440SP Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001698 .pvr_mask = 0xfff00fff,
1699 .pvr_value = 0x53200891,
Matt Porter656de7e2005-09-03 15:55:42 -07001700 .cpu_name = "440SP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001701 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001702 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001703 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porter656de7e2005-09-03 15:55:42 -07001704 .icache_bsize = 32,
1705 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001706 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001707 .platform = "ppc440",
Matt Porter656de7e2005-09-03 15:55:42 -07001708 },
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001709 { /* 440SPe Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001710 .pvr_mask = 0xfff00fff,
1711 .pvr_value = 0x53400890,
1712 .cpu_name = "440SPe Rev. A",
1713 .cpu_features = CPU_FTRS_44X,
1714 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001715 .mmu_features = MMU_FTR_TYPE_44x,
Roland Dreier333e6152007-06-16 05:36:32 +10001716 .icache_bsize = 32,
1717 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001718 .cpu_setup = __setup_cpu_440spe,
1719 .machine_check = machine_check_440A,
Roland Dreier333e6152007-06-16 05:36:32 +10001720 .platform = "ppc440",
1721 },
1722 { /* 440SPe Rev. B */
1723 .pvr_mask = 0xfff00fff,
1724 .pvr_value = 0x53400891,
1725 .cpu_name = "440SPe Rev. B",
Kumar Galaa147c582006-12-08 02:34:38 -06001726 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001727 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001728 .mmu_features = MMU_FTR_TYPE_44x,
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001729 .icache_bsize = 32,
1730 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001731 .cpu_setup = __setup_cpu_440spe,
1732 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001733 .platform = "ppc440",
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001734 },
John Linn23e72372008-07-01 09:42:07 -07001735 { /* 440 in Xilinx Virtex-5 FXT */
1736 .pvr_mask = 0xfffffff0,
1737 .pvr_value = 0x7ff21910,
1738 .cpu_name = "440 in Virtex-5 FXT",
1739 .cpu_features = CPU_FTRS_44X,
1740 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001741 .mmu_features = MMU_FTR_TYPE_44x,
John Linn23e72372008-07-01 09:42:07 -07001742 .icache_bsize = 32,
1743 .dcache_bsize = 32,
Grant Likely640d17d2008-12-04 05:39:55 +00001744 .cpu_setup = __setup_cpu_440x5,
1745 .machine_check = machine_check_440A,
John Linn23e72372008-07-01 09:42:07 -07001746 .platform = "ppc440",
1747 },
Stefan Roese464076a2008-02-24 08:07:41 +11001748 { /* 460EX */
Stefan Roese20d70342009-07-29 07:04:46 +00001749 .pvr_mask = 0xffff0006,
Stefan Roese464076a2008-02-24 08:07:41 +11001750 .pvr_value = 0x13020002,
1751 .cpu_name = "460EX",
Benjamin Herrenschmidt6d2170b2008-12-18 19:13:22 +00001752 .cpu_features = CPU_FTRS_440x6,
Stefan Roese464076a2008-02-24 08:07:41 +11001753 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001754 .mmu_features = MMU_FTR_TYPE_44x,
Stefan Roese464076a2008-02-24 08:07:41 +11001755 .icache_bsize = 32,
1756 .dcache_bsize = 32,
1757 .cpu_setup = __setup_cpu_460ex,
1758 .machine_check = machine_check_440A,
1759 .platform = "ppc440",
1760 },
Stefan Roese20d70342009-07-29 07:04:46 +00001761 { /* 460EX Rev B */
1762 .pvr_mask = 0xffff0007,
1763 .pvr_value = 0x13020004,
1764 .cpu_name = "460EX Rev. B",
1765 .cpu_features = CPU_FTRS_440x6,
1766 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1767 .mmu_features = MMU_FTR_TYPE_44x,
1768 .icache_bsize = 32,
1769 .dcache_bsize = 32,
1770 .cpu_setup = __setup_cpu_460ex,
1771 .machine_check = machine_check_440A,
1772 .platform = "ppc440",
1773 },
Stefan Roese464076a2008-02-24 08:07:41 +11001774 { /* 460GT */
Stefan Roese20d70342009-07-29 07:04:46 +00001775 .pvr_mask = 0xffff0006,
Stefan Roese464076a2008-02-24 08:07:41 +11001776 .pvr_value = 0x13020000,
1777 .cpu_name = "460GT",
Benjamin Herrenschmidt6d2170b2008-12-18 19:13:22 +00001778 .cpu_features = CPU_FTRS_440x6,
Josh Boyer939e6222008-06-11 07:52:40 -04001779 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001780 .mmu_features = MMU_FTR_TYPE_44x,
Stefan Roese464076a2008-02-24 08:07:41 +11001781 .icache_bsize = 32,
1782 .dcache_bsize = 32,
Josh Boyer939e6222008-06-11 07:52:40 -04001783 .cpu_setup = __setup_cpu_460gt,
Stefan Roese464076a2008-02-24 08:07:41 +11001784 .machine_check = machine_check_440A,
1785 .platform = "ppc440",
1786 },
Stefan Roese20d70342009-07-29 07:04:46 +00001787 { /* 460GT Rev B */
1788 .pvr_mask = 0xffff0007,
1789 .pvr_value = 0x13020005,
1790 .cpu_name = "460GT Rev. B",
1791 .cpu_features = CPU_FTRS_440x6,
1792 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1793 .mmu_features = MMU_FTR_TYPE_44x,
1794 .icache_bsize = 32,
1795 .dcache_bsize = 32,
1796 .cpu_setup = __setup_cpu_460gt,
1797 .machine_check = machine_check_440A,
1798 .platform = "ppc440",
1799 },
Madhulika Madishetty6c712092009-02-05 13:31:36 +00001800 { /* 460SX */
1801 .pvr_mask = 0xffffff00,
1802 .pvr_value = 0x13541800,
1803 .cpu_name = "460SX",
1804 .cpu_features = CPU_FTRS_44X,
1805 .cpu_user_features = COMMON_USER_BOOKE,
1806 .mmu_features = MMU_FTR_TYPE_44x,
1807 .icache_bsize = 32,
1808 .dcache_bsize = 32,
1809 .cpu_setup = __setup_cpu_460sx,
1810 .machine_check = machine_check_440A,
1811 .platform = "ppc440",
1812 },
Tirumala Marri6edc3232010-09-13 13:26:11 +00001813 { /* 464 in APM821xx */
1814 .pvr_mask = 0xffffff00,
1815 .pvr_value = 0x12C41C80,
1816 .cpu_name = "APM821XX",
1817 .cpu_features = CPU_FTRS_44X,
1818 .cpu_user_features = COMMON_USER_BOOKE |
1819 PPC_FEATURE_HAS_FPU,
1820 .mmu_features = MMU_FTR_TYPE_44x,
1821 .icache_bsize = 32,
1822 .dcache_bsize = 32,
1823 .cpu_setup = __setup_cpu_apm821xx,
1824 .machine_check = machine_check_440A,
1825 .platform = "ppc440",
1826 },
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001827 { /* 476 core */
1828 .pvr_mask = 0xffff0000,
1829 .pvr_value = 0x11a50000,
1830 .cpu_name = "476",
1831 .cpu_features = CPU_FTRS_47X,
1832 .cpu_user_features = COMMON_USER_BOOKE |
1833 PPC_FEATURE_HAS_FPU,
1834 .mmu_features = MMU_FTR_TYPE_47x |
1835 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1836 .icache_bsize = 32,
1837 .dcache_bsize = 128,
Dave Kleikampfc5e7092010-03-05 03:43:18 +00001838 .machine_check = machine_check_47x,
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001839 .platform = "ppc470",
1840 },
Torez Smithb4e8c8d2010-03-05 10:45:54 +00001841 { /* 476 iss */
1842 .pvr_mask = 0xffff0000,
1843 .pvr_value = 0x00050000,
1844 .cpu_name = "476",
1845 .cpu_features = CPU_FTRS_47X,
1846 .cpu_user_features = COMMON_USER_BOOKE |
1847 PPC_FEATURE_HAS_FPU,
Torez Smithb4e8c8d2010-03-05 10:45:54 +00001848 .mmu_features = MMU_FTR_TYPE_47x |
1849 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1850 .icache_bsize = 32,
1851 .dcache_bsize = 128,
1852 .machine_check = machine_check_47x,
1853 .platform = "ppc470",
1854 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001855 { /* default match */
1856 .pvr_mask = 0x00000000,
1857 .pvr_value = 0x00000000,
1858 .cpu_name = "(generic 44x PPC)",
1859 .cpu_features = CPU_FTRS_44X,
1860 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001861 .mmu_features = MMU_FTR_TYPE_44x,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001862 .icache_bsize = 32,
1863 .dcache_bsize = 32,
1864 .machine_check = machine_check_4xx,
1865 .platform = "ppc440",
1866 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001867#endif /* CONFIG_44x */
Josh Boyere3e414b2007-12-24 08:44:47 -06001868#ifdef CONFIG_E200
Stephen Rothwell49209602005-10-12 15:55:09 +10001869 { /* e200z5 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001870 .pvr_mask = 0xfff00000,
1871 .pvr_value = 0x81000000,
1872 .cpu_name = "e200z5",
1873 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001874 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001875 .cpu_user_features = COMMON_USER_BOOKE |
1876 PPC_FEATURE_HAS_EFP_SINGLE |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001877 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001878 .mmu_features = MMU_FTR_TYPE_FSL_E,
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001879 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001880 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001881 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001882 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001883 { /* e200z6 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001884 .pvr_mask = 0xfff00000,
1885 .pvr_value = 0x81100000,
1886 .cpu_name = "e200z6",
1887 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001888 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001889 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001890 PPC_FEATURE_HAS_SPE_COMP |
1891 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001892 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001893 .mmu_features = MMU_FTR_TYPE_FSL_E,
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001894 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001895 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001896 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001897 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001898 { /* default match */
1899 .pvr_mask = 0x00000000,
1900 .pvr_value = 0x00000000,
1901 .cpu_name = "(generic E200 PPC)",
1902 .cpu_features = CPU_FTRS_E200,
1903 .cpu_user_features = COMMON_USER_BOOKE |
1904 PPC_FEATURE_HAS_EFP_SINGLE |
1905 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001906 .mmu_features = MMU_FTR_TYPE_FSL_E,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001907 .dcache_bsize = 32,
Kumar Gala105c31d2009-01-08 08:31:20 -06001908 .cpu_setup = __setup_cpu_e200,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001909 .machine_check = machine_check_e200,
1910 .platform = "ppc5554",
Paul Mackerras516c8be2008-05-12 14:20:35 +10001911 }
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001912#endif /* CONFIG_E200 */
Kumar Gala4490c062010-10-08 08:32:11 -05001913#endif /* CONFIG_PPC32 */
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001914#ifdef CONFIG_E500
Kumar Gala4490c062010-10-08 08:32:11 -05001915#ifdef CONFIG_PPC32
Stephen Rothwell49209602005-10-12 15:55:09 +10001916 { /* e500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001917 .pvr_mask = 0xffff0000,
1918 .pvr_value = 0x80200000,
1919 .cpu_name = "e500",
Kumar Gala10b35d92005-09-23 14:08:58 -05001920 .cpu_features = CPU_FTRS_E500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001921 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001922 PPC_FEATURE_HAS_SPE_COMP |
1923 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001924 .mmu_features = MMU_FTR_TYPE_FSL_E,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001925 .icache_bsize = 32,
1926 .dcache_bsize = 32,
1927 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001928 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001929 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06001930 .cpu_setup = __setup_cpu_e500v1,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001931 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001932 .platform = "ppc8540",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001933 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001934 { /* e500v2 */
Kumar Gala5b37b702005-06-21 17:15:18 -07001935 .pvr_mask = 0xffff0000,
1936 .pvr_value = 0x80210000,
1937 .cpu_name = "e500v2",
Kumar Gala10b35d92005-09-23 14:08:58 -05001938 .cpu_features = CPU_FTRS_E500_2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001939 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001940 PPC_FEATURE_HAS_SPE_COMP |
1941 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1942 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001943 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS,
Kumar Gala5b37b702005-06-21 17:15:18 -07001944 .icache_bsize = 32,
1945 .dcache_bsize = 32,
1946 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001947 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001948 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06001949 .cpu_setup = __setup_cpu_e500v2,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001950 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001951 .platform = "ppc8548",
Kumar Gala5b37b702005-06-21 17:15:18 -07001952 },
Kumar Gala3dfa8772008-06-16 09:41:32 -05001953 { /* e500mc */
1954 .pvr_mask = 0xffff0000,
1955 .pvr_value = 0x80230000,
1956 .cpu_name = "e500mc",
Kumar Gala3dfa8772008-06-16 09:41:32 -05001957 .cpu_features = CPU_FTRS_E500MC,
1958 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Kumar Galac3071952009-02-10 22:26:06 -06001959 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
Kumar Gala323d23a2009-04-23 08:51:22 -05001960 MMU_FTR_USE_TLBILX,
Kumar Gala3dfa8772008-06-16 09:41:32 -05001961 .icache_bsize = 64,
1962 .dcache_bsize = 64,
1963 .num_pmcs = 4,
Scott Wooda1110652010-02-25 18:09:45 -06001964 .oprofile_cpu_type = "ppc/e500mc",
Kumar Gala3dfa8772008-06-16 09:41:32 -05001965 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06001966 .cpu_setup = __setup_cpu_e500mc,
Scott Woodfe04b112010-04-08 00:38:22 -05001967 .machine_check = machine_check_e500mc,
Kumar Gala3dfa8772008-06-16 09:41:32 -05001968 .platform = "ppce500mc",
1969 },
Kumar Gala4490c062010-10-08 08:32:11 -05001970#endif /* CONFIG_PPC32 */
1971 { /* e5500 */
1972 .pvr_mask = 0xffff0000,
1973 .pvr_value = 0x80240000,
1974 .cpu_name = "e5500",
1975 .cpu_features = CPU_FTRS_E500MC,
1976 .cpu_user_features = COMMON_USER_BOOKE,
1977 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
1978 MMU_FTR_USE_TLBILX,
1979 .icache_bsize = 64,
1980 .dcache_bsize = 64,
1981 .num_pmcs = 4,
1982 .oprofile_cpu_type = "ppc/e500mc",
1983 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1984 .cpu_setup = __setup_cpu_e5500,
1985 .cpu_restore = __restore_cpu_e5500,
1986 .machine_check = machine_check_e500mc,
1987 .platform = "ppce5500",
1988 },
1989#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -07001990 { /* default match */
1991 .pvr_mask = 0x00000000,
1992 .pvr_value = 0x00000000,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001993 .cpu_name = "(generic E500 PPC)",
1994 .cpu_features = CPU_FTRS_E500,
1995 .cpu_user_features = COMMON_USER_BOOKE |
1996 PPC_FEATURE_HAS_SPE_COMP |
1997 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001998 .mmu_features = MMU_FTR_TYPE_FSL_E,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001999 .icache_bsize = 32,
2000 .dcache_bsize = 32,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002001 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002002 .platform = "powerpc",
Paul Mackerras516c8be2008-05-12 14:20:35 +10002003 }
Stephen Rothwell49209602005-10-12 15:55:09 +10002004#endif /* CONFIG_PPC32 */
Kumar Gala4490c062010-10-08 08:32:11 -05002005#endif /* CONFIG_E500 */
Kumar Galaf45c4482009-08-18 19:08:30 +00002006
2007#ifdef CONFIG_PPC_BOOK3E_64
2008 { /* This is a default entry to get going, to be replaced by
2009 * a real one at some stage
2010 */
2011#define CPU_FTRS_BASE_BOOK3E (CPU_FTR_USE_TB | \
2012 CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_SMT | \
2013 CPU_FTR_NODSISRALIGN | CPU_FTR_NOEXECUTE)
2014 .pvr_mask = 0x00000000,
2015 .pvr_value = 0x00000000,
2016 .cpu_name = "Book3E",
2017 .cpu_features = CPU_FTRS_BASE_BOOK3E,
2018 .cpu_user_features = COMMON_USER_PPC64,
2019 .mmu_features = MMU_FTR_TYPE_3E | MMU_FTR_USE_TLBILX |
2020 MMU_FTR_USE_TLBIVAX_BCAST |
2021 MMU_FTR_LOCK_BCAST_INVAL,
2022 .icache_bsize = 64,
2023 .dcache_bsize = 64,
2024 .num_pmcs = 0,
2025 .machine_check = machine_check_generic,
2026 .platform = "power6",
2027 },
2028#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -07002029};
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002030
Paul Mackerras87a72f92007-10-04 14:18:01 +10002031static struct cpu_spec the_cpu_spec;
2032
Michael Ellerman666435b2009-02-22 16:25:43 +00002033static void __init setup_cpu_spec(unsigned long offset, struct cpu_spec *s)
2034{
2035 struct cpu_spec *t = &the_cpu_spec;
Michael Ellerman2657dd42009-02-22 16:25:45 +00002036 struct cpu_spec old;
2037
Michael Ellerman666435b2009-02-22 16:25:43 +00002038 t = PTRRELOC(t);
Michael Ellerman2657dd42009-02-22 16:25:45 +00002039 old = *t;
2040
2041 /* Copy everything, then do fixups */
2042 *t = *s;
Michael Ellerman666435b2009-02-22 16:25:43 +00002043
2044 /*
2045 * If we are overriding a previous value derived from the real
2046 * PVR with a new value obtained using a logical PVR value,
2047 * don't modify the performance monitor fields.
2048 */
Michael Ellerman2657dd42009-02-22 16:25:45 +00002049 if (old.num_pmcs && !s->num_pmcs) {
2050 t->num_pmcs = old.num_pmcs;
2051 t->pmc_type = old.pmc_type;
2052 t->oprofile_type = old.oprofile_type;
2053 t->oprofile_mmcra_sihv = old.oprofile_mmcra_sihv;
2054 t->oprofile_mmcra_sipr = old.oprofile_mmcra_sipr;
2055 t->oprofile_mmcra_clear = old.oprofile_mmcra_clear;
2056
Michael Ellerman666435b2009-02-22 16:25:43 +00002057 /*
2058 * If we have passed through this logic once before and
2059 * have pulled the default case because the real PVR was
2060 * not found inside cpu_specs[], then we are possibly
2061 * running in compatibility mode. In that case, let the
2062 * oprofiler know which set of compatibility counters to
2063 * pull from by making sure the oprofile_cpu_type string
2064 * is set to that of compatibility mode. If the
2065 * oprofile_cpu_type already has a value, then we are
2066 * possibly overriding a real PVR with a logical one,
2067 * and, in that case, keep the current value for
2068 * oprofile_cpu_type.
2069 */
Benjamin Herrenschmidtb173f032009-05-14 18:34:06 +00002070 if (old.oprofile_cpu_type != NULL) {
Benjamin Herrenschmidt0203d6e2009-04-29 19:39:38 +00002071 t->oprofile_cpu_type = old.oprofile_cpu_type;
2072 t->oprofile_type = old.oprofile_type;
Michael Wolf79af6c42009-04-27 06:17:54 +00002073 }
Michael Ellerman2657dd42009-02-22 16:25:45 +00002074 }
Michael Ellerman666435b2009-02-22 16:25:43 +00002075
2076 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
2077
2078 /*
2079 * Set the base platform string once; assumes
2080 * we're called with real pvr first.
2081 */
2082 if (*PTRRELOC(&powerpc_base_platform) == NULL)
2083 *PTRRELOC(&powerpc_base_platform) = t->platform;
2084
2085#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
2086 /* ppc64 and booke expect identify_cpu to also call setup_cpu for
2087 * that processor. I will consolidate that at a later time, for now,
2088 * just use #ifdef. We also don't need to PTRRELOC the function
2089 * pointer on ppc64 and booke as we are running at 0 in real mode
2090 * on ppc64 and reloc_offset is always 0 on booke.
2091 */
2092 if (s->cpu_setup) {
2093 s->cpu_setup(offset, s);
2094 }
2095#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
2096}
2097
Paul Mackerras87a72f92007-10-04 14:18:01 +10002098struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002099{
2100 struct cpu_spec *s = cpu_specs;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002101 int i;
2102
2103 s = PTRRELOC(s);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002104
Michael Ellerman666435b2009-02-22 16:25:43 +00002105 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) {
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002106 if ((pvr & s->pvr_mask) == s->pvr_value) {
Michael Ellerman666435b2009-02-22 16:25:43 +00002107 setup_cpu_spec(offset, s);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002108 return s;
2109 }
Michael Ellerman666435b2009-02-22 16:25:43 +00002110 }
2111
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002112 BUG();
Michael Ellerman666435b2009-02-22 16:25:43 +00002113
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002114 return NULL;
2115}