blob: be5ab18b03b5e46394efbc55077b2a0d61f49a31 [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,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000460 .oprofile_cpu_type = "ppc64/power7",
461 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000462 .platform = "power7",
463 },
Michael Neuling6f08cb32010-11-17 18:52:44 +0000464 { /* Power7+ */
465 .pvr_mask = 0xffff0000,
466 .pvr_value = 0x004A0000,
467 .cpu_name = "POWER7+ (raw)",
468 .cpu_features = CPU_FTRS_POWER7,
469 .cpu_user_features = COMMON_USER_POWER7,
470 .mmu_features = MMU_FTR_HPTE_TABLE |
471 MMU_FTR_TLBIE_206,
472 .icache_bsize = 128,
473 .dcache_bsize = 128,
474 .num_pmcs = 6,
475 .pmc_type = PPC_PMC_IBM,
476 .oprofile_cpu_type = "ppc64/power7",
477 .oprofile_type = PPC_OPROFILE_POWER4,
478 .platform = "power7+",
479 },
Arnd Bergmannc902be72006-01-04 19:55:53 +0000480 { /* Cell Broadband Engine */
Stephen Rothwell49209602005-10-12 15:55:09 +1000481 .pvr_mask = 0xffff0000,
482 .pvr_value = 0x00700000,
483 .cpu_name = "Cell Broadband Engine",
484 .cpu_features = CPU_FTRS_CELL,
485 .cpu_user_features = COMMON_USER_PPC64 |
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +1100486 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
487 PPC_FEATURE_SMT,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000488 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000489 .icache_bsize = 128,
490 .dcache_bsize = 128,
Maynard Johnson18f21902006-11-20 18:45:16 +0100491 .num_pmcs = 4,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600492 .pmc_type = PPC_PMC_IBM,
Maynard Johnson18f21902006-11-20 18:45:16 +0100493 .oprofile_cpu_type = "ppc64/cell-be",
494 .oprofile_type = PPC_OPROFILE_CELL,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100495 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100496 .platform = "ppc-cell-be",
Stephen Rothwell49209602005-10-12 15:55:09 +1000497 },
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500498 { /* PA Semi PA6T */
499 .pvr_mask = 0x7fff0000,
500 .pvr_value = 0x00900000,
501 .cpu_name = "PA6T",
502 .cpu_features = CPU_FTRS_PA6T,
503 .cpu_user_features = COMMON_USER_PA6T,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000504 .mmu_features = MMU_FTR_HPTE_TABLE,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500505 .icache_bsize = 64,
506 .dcache_bsize = 64,
507 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600508 .pmc_type = PPC_PMC_PA6T,
Olof Johansson11999192007-02-04 16:36:51 -0600509 .cpu_setup = __setup_cpu_pa6t,
510 .cpu_restore = __restore_cpu_pa6t,
Olof Johansson25fc5302007-04-18 16:38:21 +1000511 .oprofile_cpu_type = "ppc64/pa6t",
512 .oprofile_type = PPC_OPROFILE_PA6T,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100513 .machine_check = machine_check_generic,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500514 .platform = "pa6t",
515 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000516 { /* default match */
517 .pvr_mask = 0x00000000,
518 .pvr_value = 0x00000000,
519 .cpu_name = "POWER4 (compatible)",
520 .cpu_features = CPU_FTRS_COMPATIBLE,
521 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000522 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000523 .icache_bsize = 128,
524 .dcache_bsize = 128,
525 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600526 .pmc_type = PPC_PMC_IBM,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100527 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100528 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000529 }
Benjamin Herrenschmidt2d27cfd2009-07-23 23:15:59 +0000530#endif /* CONFIG_PPC_BOOK3S_64 */
Benjamin Herrenschmidt2d27cfd2009-07-23 23:15:59 +0000531
Stephen Rothwell49209602005-10-12 15:55:09 +1000532#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -0700533#if CLASSIC_PPC
Stephen Rothwell49209602005-10-12 15:55:09 +1000534 { /* 601 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700535 .pvr_mask = 0xffff0000,
536 .pvr_value = 0x00010000,
537 .cpu_name = "601",
Kumar Gala10b35d92005-09-23 14:08:58 -0500538 .cpu_features = CPU_FTRS_PPC601,
Stephen Rothwell49209602005-10-12 15:55:09 +1000539 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
Paul Mackerras98599012005-10-22 16:51:34 +1000540 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000541 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700542 .icache_bsize = 32,
543 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100544 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100545 .platform = "ppc601",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700546 },
547 { /* 603 */
548 .pvr_mask = 0xffff0000,
549 .pvr_value = 0x00030000,
550 .cpu_name = "603",
Kumar Gala10b35d92005-09-23 14:08:58 -0500551 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000552 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000553 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700554 .icache_bsize = 32,
555 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100556 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100557 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100558 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700559 },
560 { /* 603e */
561 .pvr_mask = 0xffff0000,
562 .pvr_value = 0x00060000,
563 .cpu_name = "603e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500564 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000565 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000566 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700567 .icache_bsize = 32,
568 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100569 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100570 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100571 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700572 },
573 { /* 603ev */
574 .pvr_mask = 0xffff0000,
575 .pvr_value = 0x00070000,
576 .cpu_name = "603ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500577 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000578 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000579 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700580 .icache_bsize = 32,
581 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100582 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100583 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100584 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700585 },
586 { /* 604 */
587 .pvr_mask = 0xffff0000,
588 .pvr_value = 0x00040000,
589 .cpu_name = "604",
Kumar Gala10b35d92005-09-23 14:08:58 -0500590 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000591 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000592 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700593 .icache_bsize = 32,
594 .dcache_bsize = 32,
595 .num_pmcs = 2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100596 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100597 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100598 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700599 },
600 { /* 604e */
601 .pvr_mask = 0xfffff000,
602 .pvr_value = 0x00090000,
603 .cpu_name = "604e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500604 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000605 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000606 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700607 .icache_bsize = 32,
608 .dcache_bsize = 32,
609 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100610 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100611 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100612 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700613 },
614 { /* 604r */
615 .pvr_mask = 0xffff0000,
616 .pvr_value = 0x00090000,
617 .cpu_name = "604r",
Kumar Gala10b35d92005-09-23 14:08:58 -0500618 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000619 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000620 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700621 .icache_bsize = 32,
622 .dcache_bsize = 32,
623 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100624 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100625 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100626 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700627 },
628 { /* 604ev */
629 .pvr_mask = 0xffff0000,
630 .pvr_value = 0x000a0000,
631 .cpu_name = "604ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500632 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000633 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000634 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700635 .icache_bsize = 32,
636 .dcache_bsize = 32,
637 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100638 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100639 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100640 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700641 },
642 { /* 740/750 (0x4202, don't support TAU ?) */
643 .pvr_mask = 0xffffffff,
644 .pvr_value = 0x00084202,
645 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500646 .cpu_features = CPU_FTRS_740_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000647 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000648 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700649 .icache_bsize = 32,
650 .dcache_bsize = 32,
651 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100652 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100653 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100654 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700655 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700656 { /* 750CX (80100 and 8010x?) */
657 .pvr_mask = 0xfffffff0,
658 .pvr_value = 0x00080100,
659 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500660 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000661 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000662 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700663 .icache_bsize = 32,
664 .dcache_bsize = 32,
665 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100666 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100667 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100668 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700669 },
670 { /* 750CX (82201 and 82202) */
671 .pvr_mask = 0xfffffff0,
672 .pvr_value = 0x00082200,
673 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500674 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000675 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000676 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700677 .icache_bsize = 32,
678 .dcache_bsize = 32,
679 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000680 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100681 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100682 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100683 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700684 },
685 { /* 750CXe (82214) */
686 .pvr_mask = 0xfffffff0,
687 .pvr_value = 0x00082210,
688 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500689 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000690 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000691 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700692 .icache_bsize = 32,
693 .dcache_bsize = 32,
694 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000695 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100696 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100697 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100698 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700699 },
Arthur Othieno7c316252005-09-03 15:55:52 -0700700 { /* 750CXe "Gekko" (83214) */
701 .pvr_mask = 0xffffffff,
702 .pvr_value = 0x00083214,
703 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500704 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000705 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000706 .mmu_features = MMU_FTR_HPTE_TABLE,
Arthur Othieno7c316252005-09-03 15:55:52 -0700707 .icache_bsize = 32,
708 .dcache_bsize = 32,
709 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000710 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100711 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100712 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100713 .platform = "ppc750",
Arthur Othieno7c316252005-09-03 15:55:52 -0700714 },
Albert Herranz45158dc2009-12-12 06:31:46 +0000715 { /* 750CL (and "Broadway") */
716 .pvr_mask = 0xfffff0e0,
717 .pvr_value = 0x00087000,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500718 .cpu_name = "750CL",
Josh Boyera14c4502007-04-13 04:33:25 +1000719 .cpu_features = CPU_FTRS_750CL,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500720 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000721 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500722 .icache_bsize = 32,
723 .dcache_bsize = 32,
724 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000725 .pmc_type = PPC_PMC_IBM,
Josh Boyera14c4502007-04-13 04:33:25 +1000726 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100727 .machine_check = machine_check_generic,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500728 .platform = "ppc750",
Dragos Tatulea04f56532009-09-16 11:58:15 +0300729 .oprofile_cpu_type = "ppc/750",
730 .oprofile_type = PPC_OPROFILE_G4,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500731 },
Arthur Othienoac1ff042005-09-03 15:55:51 -0700732 { /* 745/755 */
733 .pvr_mask = 0xfffff000,
734 .pvr_value = 0x00083000,
735 .cpu_name = "745/755",
Kumar Gala10b35d92005-09-23 14:08:58 -0500736 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000737 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000738 .mmu_features = MMU_FTR_HPTE_TABLE,
Arthur Othienoac1ff042005-09-03 15:55:51 -0700739 .icache_bsize = 32,
740 .dcache_bsize = 32,
741 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000742 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100743 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100744 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100745 .platform = "ppc750",
Arthur Othienoac1ff042005-09-03 15:55:51 -0700746 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700747 { /* 750FX rev 1.x */
748 .pvr_mask = 0xffffff00,
749 .pvr_value = 0x70000100,
750 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500751 .cpu_features = CPU_FTRS_750FX1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000752 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000753 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700754 .icache_bsize = 32,
755 .dcache_bsize = 32,
756 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000757 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100758 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100759 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100760 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000761 .oprofile_cpu_type = "ppc/750",
762 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700763 },
764 { /* 750FX rev 2.0 must disable HID0[DPM] */
765 .pvr_mask = 0xffffffff,
766 .pvr_value = 0x70000200,
767 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500768 .cpu_features = CPU_FTRS_750FX2,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000769 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000770 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700771 .icache_bsize = 32,
772 .dcache_bsize = 32,
773 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000774 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100775 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100776 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100777 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000778 .oprofile_cpu_type = "ppc/750",
779 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700780 },
781 { /* 750FX (All revs except 2.0) */
782 .pvr_mask = 0xffff0000,
783 .pvr_value = 0x70000000,
784 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500785 .cpu_features = CPU_FTRS_750FX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000786 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000787 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700788 .icache_bsize = 32,
789 .dcache_bsize = 32,
790 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000791 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100792 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100793 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100794 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000795 .oprofile_cpu_type = "ppc/750",
796 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700797 },
798 { /* 750GX */
799 .pvr_mask = 0xffff0000,
800 .pvr_value = 0x70020000,
801 .cpu_name = "750GX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500802 .cpu_features = CPU_FTRS_750GX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000803 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000804 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700805 .icache_bsize = 32,
806 .dcache_bsize = 32,
807 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000808 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100809 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100810 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100811 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000812 .oprofile_cpu_type = "ppc/750",
813 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700814 },
815 { /* 740/750 (L2CR bit need fixup for 740) */
816 .pvr_mask = 0xffff0000,
817 .pvr_value = 0x00080000,
818 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500819 .cpu_features = CPU_FTRS_740,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000820 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000821 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700822 .icache_bsize = 32,
823 .dcache_bsize = 32,
824 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000825 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100826 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100827 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100828 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700829 },
830 { /* 7400 rev 1.1 ? (no TAU) */
831 .pvr_mask = 0xffffffff,
832 .pvr_value = 0x000c1101,
833 .cpu_name = "7400 (1.1)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500834 .cpu_features = CPU_FTRS_7400_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000835 .cpu_user_features = COMMON_USER |
836 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000837 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700838 .icache_bsize = 32,
839 .dcache_bsize = 32,
840 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000841 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100842 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100843 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100844 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700845 },
846 { /* 7400 */
847 .pvr_mask = 0xffff0000,
848 .pvr_value = 0x000c0000,
849 .cpu_name = "7400",
Kumar Gala10b35d92005-09-23 14:08:58 -0500850 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000851 .cpu_user_features = COMMON_USER |
852 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000853 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700854 .icache_bsize = 32,
855 .dcache_bsize = 32,
856 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000857 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100858 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100859 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100860 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700861 },
862 { /* 7410 */
863 .pvr_mask = 0xffff0000,
864 .pvr_value = 0x800c0000,
865 .cpu_name = "7410",
Kumar Gala10b35d92005-09-23 14:08:58 -0500866 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000867 .cpu_user_features = COMMON_USER |
868 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000869 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700870 .icache_bsize = 32,
871 .dcache_bsize = 32,
872 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000873 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100874 .cpu_setup = __setup_cpu_7410,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100875 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100876 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700877 },
878 { /* 7450 2.0 - no doze/nap */
879 .pvr_mask = 0xffffffff,
880 .pvr_value = 0x80000200,
881 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500882 .cpu_features = CPU_FTRS_7450_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000883 .cpu_user_features = COMMON_USER |
884 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000885 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700886 .icache_bsize = 32,
887 .dcache_bsize = 32,
888 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000889 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600890 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600891 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000892 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100893 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100894 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700895 },
896 { /* 7450 2.1 */
897 .pvr_mask = 0xffffffff,
898 .pvr_value = 0x80000201,
899 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500900 .cpu_features = CPU_FTRS_7450_21,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000901 .cpu_user_features = COMMON_USER |
902 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000903 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700904 .icache_bsize = 32,
905 .dcache_bsize = 32,
906 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000907 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600908 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600909 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000910 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100911 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100912 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700913 },
914 { /* 7450 2.3 and newer */
915 .pvr_mask = 0xffff0000,
916 .pvr_value = 0x80000000,
917 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500918 .cpu_features = CPU_FTRS_7450_23,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000919 .cpu_user_features = COMMON_USER |
920 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000921 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700922 .icache_bsize = 32,
923 .dcache_bsize = 32,
924 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000925 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600926 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600927 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000928 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100929 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100930 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700931 },
932 { /* 7455 rev 1.x */
933 .pvr_mask = 0xffffff00,
934 .pvr_value = 0x80010100,
935 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500936 .cpu_features = CPU_FTRS_7455_1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000937 .cpu_user_features = COMMON_USER |
938 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000939 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700940 .icache_bsize = 32,
941 .dcache_bsize = 32,
942 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000943 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600944 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600945 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000946 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100947 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100948 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700949 },
950 { /* 7455 rev 2.0 */
951 .pvr_mask = 0xffffffff,
952 .pvr_value = 0x80010200,
953 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500954 .cpu_features = CPU_FTRS_7455_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000955 .cpu_user_features = COMMON_USER |
956 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000957 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700958 .icache_bsize = 32,
959 .dcache_bsize = 32,
960 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000961 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600962 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600963 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000964 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100965 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100966 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700967 },
968 { /* 7455 others */
969 .pvr_mask = 0xffff0000,
970 .pvr_value = 0x80010000,
971 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500972 .cpu_features = CPU_FTRS_7455,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000973 .cpu_user_features = COMMON_USER |
974 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000975 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700976 .icache_bsize = 32,
977 .dcache_bsize = 32,
978 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000979 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600980 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600981 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000982 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100983 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100984 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700985 },
986 { /* 7447/7457 Rev 1.0 */
987 .pvr_mask = 0xffffffff,
988 .pvr_value = 0x80020100,
989 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500990 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000991 .cpu_user_features = COMMON_USER |
992 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000993 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700994 .icache_bsize = 32,
995 .dcache_bsize = 32,
996 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000997 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600998 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600999 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001000 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001001 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001002 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001003 },
1004 { /* 7447/7457 Rev 1.1 */
1005 .pvr_mask = 0xffffffff,
1006 .pvr_value = 0x80020101,
1007 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -05001008 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001009 .cpu_user_features = COMMON_USER |
1010 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001011 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001012 .icache_bsize = 32,
1013 .dcache_bsize = 32,
1014 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001015 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001016 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001017 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001018 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001019 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001020 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001021 },
1022 { /* 7447/7457 Rev 1.2 and later */
1023 .pvr_mask = 0xffff0000,
1024 .pvr_value = 0x80020000,
1025 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -05001026 .cpu_features = CPU_FTRS_7447,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001027 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001028 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001029 .icache_bsize = 32,
1030 .dcache_bsize = 32,
1031 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001032 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001033 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001034 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001035 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001036 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001037 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001038 },
1039 { /* 7447A */
1040 .pvr_mask = 0xffff0000,
1041 .pvr_value = 0x80030000,
1042 .cpu_name = "7447A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001043 .cpu_features = CPU_FTRS_7447A,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001044 .cpu_user_features = COMMON_USER |
1045 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001046 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001047 .icache_bsize = 32,
1048 .dcache_bsize = 32,
1049 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001050 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001051 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001052 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001053 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001054 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001055 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001056 },
Kumar Galabbde6302005-09-03 15:55:55 -07001057 { /* 7448 */
1058 .pvr_mask = 0xffff0000,
1059 .pvr_value = 0x80040000,
1060 .cpu_name = "7448",
James.Yang3d372542007-05-02 16:34:43 -05001061 .cpu_features = CPU_FTRS_7448,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001062 .cpu_user_features = COMMON_USER |
1063 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001064 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Kumar Galabbde6302005-09-03 15:55:55 -07001065 .icache_bsize = 32,
1066 .dcache_bsize = 32,
1067 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001068 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001069 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001070 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001071 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001072 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001073 .platform = "ppc7450",
Kumar Galabbde6302005-09-03 15:55:55 -07001074 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001075 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
1076 .pvr_mask = 0x7fff0000,
1077 .pvr_value = 0x00810000,
1078 .cpu_name = "82xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001079 .cpu_features = CPU_FTRS_82XX,
Stephen Rothwell49209602005-10-12 15:55:09 +10001080 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001081 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001082 .icache_bsize = 32,
1083 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001084 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001085 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001086 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001087 },
1088 { /* All G2_LE (603e core, plus some) have the same pvr */
1089 .pvr_mask = 0x7fff0000,
1090 .pvr_value = 0x00820000,
1091 .cpu_name = "G2_LE",
Kumar Gala10b35d92005-09-23 14:08:58 -05001092 .cpu_features = CPU_FTRS_G2_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +10001093 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001094 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001095 .icache_bsize = 32,
1096 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001097 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001098 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001099 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001100 },
Kim Phillips6c4a2502006-10-02 20:10:24 -05001101 { /* e300c1 (a 603e core, plus some) on 83xx */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001102 .pvr_mask = 0x7fff0000,
1103 .pvr_value = 0x00830000,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001104 .cpu_name = "e300c1",
Kumar Gala10b35d92005-09-23 14:08:58 -05001105 .cpu_features = CPU_FTRS_E300,
Stephen Rothwell49209602005-10-12 15:55:09 +10001106 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001107 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001108 .icache_bsize = 32,
1109 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001110 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001111 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001112 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001113 },
Kim Phillips6c4a2502006-10-02 20:10:24 -05001114 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
1115 .pvr_mask = 0x7fff0000,
1116 .pvr_value = 0x00840000,
1117 .cpu_name = "e300c2",
Kim Phillipsaa42c692006-12-08 02:43:30 -06001118 .cpu_features = CPU_FTRS_E300C2,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001119 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Kumar Gala2319f122009-03-19 03:55:41 +00001120 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1121 MMU_FTR_NEED_DTLB_SW_LRU,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001122 .icache_bsize = 32,
1123 .dcache_bsize = 32,
1124 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001125 .machine_check = machine_check_generic,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001126 .platform = "ppc603",
1127 },
Li Yanga58d5242007-10-19 19:38:42 +08001128 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
Scott Wood57933f82006-12-01 12:57:05 -06001129 .pvr_mask = 0x7fff0000,
1130 .pvr_value = 0x00850000,
1131 .cpu_name = "e300c3",
1132 .cpu_features = CPU_FTRS_E300,
1133 .cpu_user_features = COMMON_USER,
Kumar Gala2319f122009-03-19 03:55:41 +00001134 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1135 MMU_FTR_NEED_DTLB_SW_LRU,
Scott Wood57933f82006-12-01 12:57:05 -06001136 .icache_bsize = 32,
1137 .dcache_bsize = 32,
1138 .cpu_setup = __setup_cpu_603,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001139 .num_pmcs = 4,
1140 .oprofile_cpu_type = "ppc/e300",
1141 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Scott Wood57933f82006-12-01 12:57:05 -06001142 .platform = "ppc603",
1143 },
Li Yanga58d5242007-10-19 19:38:42 +08001144 { /* e300c4 (e300c1, plus one IU) */
1145 .pvr_mask = 0x7fff0000,
1146 .pvr_value = 0x00860000,
1147 .cpu_name = "e300c4",
1148 .cpu_features = CPU_FTRS_E300,
1149 .cpu_user_features = COMMON_USER,
Kumar Gala2319f122009-03-19 03:55:41 +00001150 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1151 MMU_FTR_NEED_DTLB_SW_LRU,
Li Yanga58d5242007-10-19 19:38:42 +08001152 .icache_bsize = 32,
1153 .dcache_bsize = 32,
1154 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001155 .machine_check = machine_check_generic,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001156 .num_pmcs = 4,
1157 .oprofile_cpu_type = "ppc/e300",
1158 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Li Yanga58d5242007-10-19 19:38:42 +08001159 .platform = "ppc603",
1160 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001161 { /* default match, we assume split I/D cache & TB (non-601)... */
1162 .pvr_mask = 0x00000000,
1163 .pvr_value = 0x00000000,
1164 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -05001165 .cpu_features = CPU_FTRS_CLASSIC32,
Stephen Rothwell49209602005-10-12 15:55:09 +10001166 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001167 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001168 .icache_bsize = 32,
1169 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001170 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001171 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001172 },
1173#endif /* CLASSIC_PPC */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001174#ifdef CONFIG_8xx
1175 { /* 8xx */
1176 .pvr_mask = 0xffff0000,
1177 .pvr_value = 0x00500000,
1178 .cpu_name = "8xx",
1179 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1180 * if the 8xx code is there.... */
Kumar Gala10b35d92005-09-23 14:08:58 -05001181 .cpu_features = CPU_FTRS_8XX,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001182 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001183 .mmu_features = MMU_FTR_TYPE_8xx,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001184 .icache_bsize = 16,
1185 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001186 .platform = "ppc823",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001187 },
1188#endif /* CONFIG_8xx */
1189#ifdef CONFIG_40x
1190 { /* 403GC */
1191 .pvr_mask = 0xffffff00,
1192 .pvr_value = 0x00200200,
1193 .cpu_name = "403GC",
Kumar Gala10b35d92005-09-23 14:08:58 -05001194 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001195 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001196 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001197 .icache_bsize = 16,
1198 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001199 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001200 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001201 },
1202 { /* 403GCX */
1203 .pvr_mask = 0xffffff00,
1204 .pvr_value = 0x00201400,
1205 .cpu_name = "403GCX",
Kumar Gala10b35d92005-09-23 14:08:58 -05001206 .cpu_features = CPU_FTRS_40X,
Paul Mackerras98599012005-10-22 16:51:34 +10001207 .cpu_user_features = PPC_FEATURE_32 |
1208 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001209 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001210 .icache_bsize = 16,
1211 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001212 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001213 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001214 },
1215 { /* 403G ?? */
1216 .pvr_mask = 0xffff0000,
1217 .pvr_value = 0x00200000,
1218 .cpu_name = "403G ??",
Kumar Gala10b35d92005-09-23 14:08:58 -05001219 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001220 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001221 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001222 .icache_bsize = 16,
1223 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001224 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001225 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001226 },
1227 { /* 405GP */
1228 .pvr_mask = 0xffff0000,
1229 .pvr_value = 0x40110000,
1230 .cpu_name = "405GP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001231 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001232 .cpu_user_features = PPC_FEATURE_32 |
1233 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001234 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001235 .icache_bsize = 32,
1236 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001237 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001238 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001239 },
1240 { /* STB 03xxx */
1241 .pvr_mask = 0xffff0000,
1242 .pvr_value = 0x40130000,
1243 .cpu_name = "STB03xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001244 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001245 .cpu_user_features = PPC_FEATURE_32 |
1246 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001247 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001248 .icache_bsize = 32,
1249 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001250 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001251 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001252 },
1253 { /* STB 04xxx */
1254 .pvr_mask = 0xffff0000,
1255 .pvr_value = 0x41810000,
1256 .cpu_name = "STB04xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001257 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001258 .cpu_user_features = PPC_FEATURE_32 |
1259 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001260 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001261 .icache_bsize = 32,
1262 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001263 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001264 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001265 },
1266 { /* NP405L */
1267 .pvr_mask = 0xffff0000,
1268 .pvr_value = 0x41610000,
1269 .cpu_name = "NP405L",
Kumar Gala10b35d92005-09-23 14:08:58 -05001270 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001271 .cpu_user_features = PPC_FEATURE_32 |
1272 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001273 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001274 .icache_bsize = 32,
1275 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001276 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001277 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001278 },
1279 { /* NP4GS3 */
1280 .pvr_mask = 0xffff0000,
1281 .pvr_value = 0x40B10000,
1282 .cpu_name = "NP4GS3",
Kumar Gala10b35d92005-09-23 14:08:58 -05001283 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001284 .cpu_user_features = PPC_FEATURE_32 |
1285 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001286 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001287 .icache_bsize = 32,
1288 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001289 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001290 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001291 },
1292 { /* NP405H */
1293 .pvr_mask = 0xffff0000,
1294 .pvr_value = 0x41410000,
1295 .cpu_name = "NP405H",
Kumar Gala10b35d92005-09-23 14:08:58 -05001296 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001297 .cpu_user_features = PPC_FEATURE_32 |
1298 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001299 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001300 .icache_bsize = 32,
1301 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001302 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001303 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001304 },
1305 { /* 405GPr */
1306 .pvr_mask = 0xffff0000,
1307 .pvr_value = 0x50910000,
1308 .cpu_name = "405GPr",
Kumar Gala10b35d92005-09-23 14:08:58 -05001309 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001310 .cpu_user_features = PPC_FEATURE_32 |
1311 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001312 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001313 .icache_bsize = 32,
1314 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001315 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001316 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001317 },
1318 { /* STBx25xx */
1319 .pvr_mask = 0xffff0000,
1320 .pvr_value = 0x51510000,
1321 .cpu_name = "STBx25xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001322 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001323 .cpu_user_features = PPC_FEATURE_32 |
1324 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001325 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001326 .icache_bsize = 32,
1327 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001328 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001329 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001330 },
1331 { /* 405LP */
1332 .pvr_mask = 0xffff0000,
1333 .pvr_value = 0x41F10000,
1334 .cpu_name = "405LP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001335 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001336 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001337 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001338 .icache_bsize = 32,
1339 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001340 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001341 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001342 },
1343 { /* Xilinx Virtex-II Pro */
Grant C. Likely72646c72006-01-19 01:13:20 -07001344 .pvr_mask = 0xfffff000,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001345 .pvr_value = 0x20010000,
1346 .cpu_name = "Virtex-II Pro",
Kumar Gala10b35d92005-09-23 14:08:58 -05001347 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001348 .cpu_user_features = PPC_FEATURE_32 |
1349 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001350 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001351 .icache_bsize = 32,
1352 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001353 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001354 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001355 },
Grant C. Likely72646c72006-01-19 01:13:20 -07001356 { /* Xilinx Virtex-4 FX */
1357 .pvr_mask = 0xfffff000,
1358 .pvr_value = 0x20011000,
1359 .cpu_name = "Virtex-4 FX",
1360 .cpu_features = CPU_FTRS_40X,
1361 .cpu_user_features = PPC_FEATURE_32 |
1362 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001363 .mmu_features = MMU_FTR_TYPE_40x,
Grant C. Likely72646c72006-01-19 01:13:20 -07001364 .icache_bsize = 32,
1365 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001366 .machine_check = machine_check_4xx,
Peter Bergner838fdb42006-09-14 14:18:38 -05001367 .platform = "ppc405",
Grant C. Likely72646c72006-01-19 01:13:20 -07001368 },
Eugene Suroveginad95d602005-06-07 13:22:09 -07001369 { /* 405EP */
1370 .pvr_mask = 0xffff0000,
1371 .pvr_value = 0x51210000,
1372 .cpu_name = "405EP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001373 .cpu_features = CPU_FTRS_40X,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001374 .cpu_user_features = PPC_FEATURE_32 |
1375 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001376 .mmu_features = MMU_FTR_TYPE_40x,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001377 .icache_bsize = 32,
1378 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001379 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001380 .platform = "ppc405",
Eugene Suroveginad95d602005-06-07 13:22:09 -07001381 },
Lee Nipperff349102010-07-09 01:17:16 +00001382 { /* 405EX Rev. A/B with Security */
1383 .pvr_mask = 0xffff000f,
1384 .pvr_value = 0x12910007,
1385 .cpu_name = "405EX Rev. A/B",
Stefan Roese5d8476c2007-10-11 22:08:14 +10001386 .cpu_features = CPU_FTRS_40X,
1387 .cpu_user_features = PPC_FEATURE_32 |
1388 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001389 .mmu_features = MMU_FTR_TYPE_40x,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001390 .icache_bsize = 32,
1391 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001392 .machine_check = machine_check_4xx,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001393 .platform = "ppc405",
1394 },
Lee Nipperff349102010-07-09 01:17:16 +00001395 { /* 405EX Rev. C without Security */
1396 .pvr_mask = 0xffff000f,
1397 .pvr_value = 0x1291000d,
1398 .cpu_name = "405EX Rev. C",
1399 .cpu_features = CPU_FTRS_40X,
1400 .cpu_user_features = PPC_FEATURE_32 |
1401 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1402 .mmu_features = MMU_FTR_TYPE_40x,
1403 .icache_bsize = 32,
1404 .dcache_bsize = 32,
1405 .machine_check = machine_check_4xx,
1406 .platform = "ppc405",
1407 },
1408 { /* 405EX Rev. C with Security */
1409 .pvr_mask = 0xffff000f,
1410 .pvr_value = 0x1291000f,
1411 .cpu_name = "405EX Rev. C",
1412 .cpu_features = CPU_FTRS_40X,
1413 .cpu_user_features = PPC_FEATURE_32 |
1414 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1415 .mmu_features = MMU_FTR_TYPE_40x,
1416 .icache_bsize = 32,
1417 .dcache_bsize = 32,
1418 .machine_check = machine_check_4xx,
1419 .platform = "ppc405",
1420 },
1421 { /* 405EX Rev. D without Security */
1422 .pvr_mask = 0xffff000f,
1423 .pvr_value = 0x12910003,
1424 .cpu_name = "405EX Rev. D",
1425 .cpu_features = CPU_FTRS_40X,
1426 .cpu_user_features = PPC_FEATURE_32 |
1427 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1428 .mmu_features = MMU_FTR_TYPE_40x,
1429 .icache_bsize = 32,
1430 .dcache_bsize = 32,
1431 .machine_check = machine_check_4xx,
1432 .platform = "ppc405",
1433 },
1434 { /* 405EX Rev. D with Security */
1435 .pvr_mask = 0xffff000f,
1436 .pvr_value = 0x12910005,
1437 .cpu_name = "405EX Rev. D",
1438 .cpu_features = CPU_FTRS_40X,
1439 .cpu_user_features = PPC_FEATURE_32 |
1440 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1441 .mmu_features = MMU_FTR_TYPE_40x,
1442 .icache_bsize = 32,
1443 .dcache_bsize = 32,
1444 .machine_check = machine_check_4xx,
1445 .platform = "ppc405",
1446 },
1447 { /* 405EXr Rev. A/B without Security */
1448 .pvr_mask = 0xffff000f,
1449 .pvr_value = 0x12910001,
1450 .cpu_name = "405EXr Rev. A/B",
1451 .cpu_features = CPU_FTRS_40X,
1452 .cpu_user_features = PPC_FEATURE_32 |
1453 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1454 .mmu_features = MMU_FTR_TYPE_40x,
1455 .icache_bsize = 32,
1456 .dcache_bsize = 32,
1457 .machine_check = machine_check_4xx,
1458 .platform = "ppc405",
1459 },
1460 { /* 405EXr Rev. C without Security */
1461 .pvr_mask = 0xffff000f,
1462 .pvr_value = 0x12910009,
1463 .cpu_name = "405EXr Rev. C",
1464 .cpu_features = CPU_FTRS_40X,
1465 .cpu_user_features = PPC_FEATURE_32 |
1466 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1467 .mmu_features = MMU_FTR_TYPE_40x,
1468 .icache_bsize = 32,
1469 .dcache_bsize = 32,
1470 .machine_check = machine_check_4xx,
1471 .platform = "ppc405",
1472 },
1473 { /* 405EXr Rev. C with Security */
1474 .pvr_mask = 0xffff000f,
1475 .pvr_value = 0x1291000b,
1476 .cpu_name = "405EXr Rev. C",
1477 .cpu_features = CPU_FTRS_40X,
1478 .cpu_user_features = PPC_FEATURE_32 |
1479 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1480 .mmu_features = MMU_FTR_TYPE_40x,
1481 .icache_bsize = 32,
1482 .dcache_bsize = 32,
1483 .machine_check = machine_check_4xx,
1484 .platform = "ppc405",
1485 },
1486 { /* 405EXr Rev. D without Security */
1487 .pvr_mask = 0xffff000f,
Stefan Roeseb676d842008-01-15 18:09:15 +11001488 .pvr_value = 0x12910000,
Lee Nipperff349102010-07-09 01:17:16 +00001489 .cpu_name = "405EXr Rev. D",
1490 .cpu_features = CPU_FTRS_40X,
1491 .cpu_user_features = PPC_FEATURE_32 |
1492 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1493 .mmu_features = MMU_FTR_TYPE_40x,
1494 .icache_bsize = 32,
1495 .dcache_bsize = 32,
1496 .machine_check = machine_check_4xx,
1497 .platform = "ppc405",
1498 },
1499 { /* 405EXr Rev. D with Security */
1500 .pvr_mask = 0xffff000f,
1501 .pvr_value = 0x12910002,
1502 .cpu_name = "405EXr Rev. D",
Stefan Roeseb676d842008-01-15 18:09:15 +11001503 .cpu_features = CPU_FTRS_40X,
1504 .cpu_user_features = PPC_FEATURE_32 |
1505 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001506 .mmu_features = MMU_FTR_TYPE_40x,
Stefan Roeseb676d842008-01-15 18:09:15 +11001507 .icache_bsize = 32,
1508 .dcache_bsize = 32,
1509 .machine_check = machine_check_4xx,
1510 .platform = "ppc405",
1511 },
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001512 {
1513 /* 405EZ */
1514 .pvr_mask = 0xffff0000,
1515 .pvr_value = 0x41510000,
1516 .cpu_name = "405EZ",
1517 .cpu_features = CPU_FTRS_40X,
1518 .cpu_user_features = PPC_FEATURE_32 |
1519 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001520 .mmu_features = MMU_FTR_TYPE_40x,
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001521 .icache_bsize = 32,
1522 .dcache_bsize = 32,
1523 .machine_check = machine_check_4xx,
1524 .platform = "ppc405",
1525 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001526 { /* default match */
1527 .pvr_mask = 0x00000000,
1528 .pvr_value = 0x00000000,
1529 .cpu_name = "(generic 40x PPC)",
1530 .cpu_features = CPU_FTRS_40X,
1531 .cpu_user_features = PPC_FEATURE_32 |
1532 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001533 .mmu_features = MMU_FTR_TYPE_40x,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001534 .icache_bsize = 32,
1535 .dcache_bsize = 32,
1536 .machine_check = machine_check_4xx,
1537 .platform = "ppc405",
1538 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001539
1540#endif /* CONFIG_40x */
1541#ifdef CONFIG_44x
Matt Porterc9cf73a2005-07-31 22:34:52 -07001542 {
1543 .pvr_mask = 0xf0000fff,
1544 .pvr_value = 0x40000850,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001545 .cpu_name = "440GR Rev. A",
1546 .cpu_features = CPU_FTRS_44X,
1547 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001548 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001549 .icache_bsize = 32,
1550 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001551 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001552 .platform = "ppc440",
1553 },
1554 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1555 .pvr_mask = 0xf0000fff,
1556 .pvr_value = 0x40000858,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001557 .cpu_name = "440EP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001558 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001559 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001560 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001561 .icache_bsize = 32,
1562 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001563 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001564 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001565 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001566 },
1567 {
1568 .pvr_mask = 0xf0000fff,
1569 .pvr_value = 0x400008d3,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001570 .cpu_name = "440GR Rev. B",
1571 .cpu_features = CPU_FTRS_44X,
1572 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001573 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001574 .icache_bsize = 32,
1575 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001576 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001577 .platform = "ppc440",
1578 },
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001579 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1580 .pvr_mask = 0xf0000ff7,
1581 .pvr_value = 0x400008d4,
1582 .cpu_name = "440EP Rev. C",
1583 .cpu_features = CPU_FTRS_44X,
1584 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001585 .mmu_features = MMU_FTR_TYPE_44x,
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001586 .icache_bsize = 32,
1587 .dcache_bsize = 32,
1588 .cpu_setup = __setup_cpu_440ep,
1589 .machine_check = machine_check_4xx,
1590 .platform = "ppc440",
1591 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001592 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1593 .pvr_mask = 0xf0000fff,
1594 .pvr_value = 0x400008db,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001595 .cpu_name = "440EP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001596 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001597 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001598 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001599 .icache_bsize = 32,
1600 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001601 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001602 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001603 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001604 },
Valentine Barshak15fc9932007-08-29 17:40:30 +04001605 { /* 440GRX */
1606 .pvr_mask = 0xf0000ffb,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001607 .pvr_value = 0x200008D0,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001608 .cpu_name = "440GRX",
1609 .cpu_features = CPU_FTRS_44X,
1610 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001611 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001612 .icache_bsize = 32,
1613 .dcache_bsize = 32,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001614 .cpu_setup = __setup_cpu_440grx,
Valentine Barshakb2be3b12007-12-22 03:22:23 +11001615 .machine_check = machine_check_440A,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001616 .platform = "ppc440",
Valentine Barshak15fc9932007-08-29 17:40:30 +04001617 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001618 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1619 .pvr_mask = 0xf0000ffb,
1620 .pvr_value = 0x200008D8,
1621 .cpu_name = "440EPX",
1622 .cpu_features = CPU_FTRS_44X,
1623 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001624 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001625 .icache_bsize = 32,
1626 .dcache_bsize = 32,
1627 .cpu_setup = __setup_cpu_440epx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001628 .machine_check = machine_check_440A,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001629 .platform = "ppc440",
1630 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001631 { /* 440GP Rev. B */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001632 .pvr_mask = 0xf0000fff,
1633 .pvr_value = 0x40000440,
1634 .cpu_name = "440GP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001635 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001636 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001637 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001638 .icache_bsize = 32,
1639 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001640 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001641 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001642 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001643 { /* 440GP Rev. C */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001644 .pvr_mask = 0xf0000fff,
1645 .pvr_value = 0x40000481,
1646 .cpu_name = "440GP Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001647 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001648 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001649 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001650 .icache_bsize = 32,
1651 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001652 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001653 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001654 },
1655 { /* 440GX Rev. A */
1656 .pvr_mask = 0xf0000fff,
1657 .pvr_value = 0x50000850,
1658 .cpu_name = "440GX Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001659 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001660 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001661 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001662 .icache_bsize = 32,
1663 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001664 .cpu_setup = __setup_cpu_440gx,
1665 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001666 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001667 },
1668 { /* 440GX Rev. B */
1669 .pvr_mask = 0xf0000fff,
1670 .pvr_value = 0x50000851,
1671 .cpu_name = "440GX Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001672 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001673 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001674 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001675 .icache_bsize = 32,
1676 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001677 .cpu_setup = __setup_cpu_440gx,
1678 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001679 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001680 },
1681 { /* 440GX Rev. C */
1682 .pvr_mask = 0xf0000fff,
1683 .pvr_value = 0x50000892,
1684 .cpu_name = "440GX Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001685 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001686 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001687 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001688 .icache_bsize = 32,
1689 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001690 .cpu_setup = __setup_cpu_440gx,
1691 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001692 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001693 },
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001694 { /* 440GX Rev. F */
1695 .pvr_mask = 0xf0000fff,
1696 .pvr_value = 0x50000894,
1697 .cpu_name = "440GX Rev. F",
Kumar Gala10b35d92005-09-23 14:08:58 -05001698 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001699 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001700 .mmu_features = MMU_FTR_TYPE_44x,
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001701 .icache_bsize = 32,
1702 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001703 .cpu_setup = __setup_cpu_440gx,
1704 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001705 .platform = "ppc440",
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001706 },
Matt Porter656de7e2005-09-03 15:55:42 -07001707 { /* 440SP Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001708 .pvr_mask = 0xfff00fff,
1709 .pvr_value = 0x53200891,
Matt Porter656de7e2005-09-03 15:55:42 -07001710 .cpu_name = "440SP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001711 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001712 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001713 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porter656de7e2005-09-03 15:55:42 -07001714 .icache_bsize = 32,
1715 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001716 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001717 .platform = "ppc440",
Matt Porter656de7e2005-09-03 15:55:42 -07001718 },
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001719 { /* 440SPe Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001720 .pvr_mask = 0xfff00fff,
1721 .pvr_value = 0x53400890,
1722 .cpu_name = "440SPe Rev. A",
1723 .cpu_features = CPU_FTRS_44X,
1724 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001725 .mmu_features = MMU_FTR_TYPE_44x,
Roland Dreier333e6152007-06-16 05:36:32 +10001726 .icache_bsize = 32,
1727 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001728 .cpu_setup = __setup_cpu_440spe,
1729 .machine_check = machine_check_440A,
Roland Dreier333e6152007-06-16 05:36:32 +10001730 .platform = "ppc440",
1731 },
1732 { /* 440SPe Rev. B */
1733 .pvr_mask = 0xfff00fff,
1734 .pvr_value = 0x53400891,
1735 .cpu_name = "440SPe Rev. B",
Kumar Galaa147c582006-12-08 02:34:38 -06001736 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001737 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001738 .mmu_features = MMU_FTR_TYPE_44x,
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001739 .icache_bsize = 32,
1740 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001741 .cpu_setup = __setup_cpu_440spe,
1742 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001743 .platform = "ppc440",
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001744 },
John Linn23e72372008-07-01 09:42:07 -07001745 { /* 440 in Xilinx Virtex-5 FXT */
1746 .pvr_mask = 0xfffffff0,
1747 .pvr_value = 0x7ff21910,
1748 .cpu_name = "440 in Virtex-5 FXT",
1749 .cpu_features = CPU_FTRS_44X,
1750 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001751 .mmu_features = MMU_FTR_TYPE_44x,
John Linn23e72372008-07-01 09:42:07 -07001752 .icache_bsize = 32,
1753 .dcache_bsize = 32,
Grant Likely640d17d2008-12-04 05:39:55 +00001754 .cpu_setup = __setup_cpu_440x5,
1755 .machine_check = machine_check_440A,
John Linn23e72372008-07-01 09:42:07 -07001756 .platform = "ppc440",
1757 },
Stefan Roese464076a2008-02-24 08:07:41 +11001758 { /* 460EX */
Stefan Roese20d70342009-07-29 07:04:46 +00001759 .pvr_mask = 0xffff0006,
Stefan Roese464076a2008-02-24 08:07:41 +11001760 .pvr_value = 0x13020002,
1761 .cpu_name = "460EX",
Benjamin Herrenschmidt6d2170b2008-12-18 19:13:22 +00001762 .cpu_features = CPU_FTRS_440x6,
Stefan Roese464076a2008-02-24 08:07:41 +11001763 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001764 .mmu_features = MMU_FTR_TYPE_44x,
Stefan Roese464076a2008-02-24 08:07:41 +11001765 .icache_bsize = 32,
1766 .dcache_bsize = 32,
1767 .cpu_setup = __setup_cpu_460ex,
1768 .machine_check = machine_check_440A,
1769 .platform = "ppc440",
1770 },
Stefan Roese20d70342009-07-29 07:04:46 +00001771 { /* 460EX Rev B */
1772 .pvr_mask = 0xffff0007,
1773 .pvr_value = 0x13020004,
1774 .cpu_name = "460EX Rev. B",
1775 .cpu_features = CPU_FTRS_440x6,
1776 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1777 .mmu_features = MMU_FTR_TYPE_44x,
1778 .icache_bsize = 32,
1779 .dcache_bsize = 32,
1780 .cpu_setup = __setup_cpu_460ex,
1781 .machine_check = machine_check_440A,
1782 .platform = "ppc440",
1783 },
Stefan Roese464076a2008-02-24 08:07:41 +11001784 { /* 460GT */
Stefan Roese20d70342009-07-29 07:04:46 +00001785 .pvr_mask = 0xffff0006,
Stefan Roese464076a2008-02-24 08:07:41 +11001786 .pvr_value = 0x13020000,
1787 .cpu_name = "460GT",
Benjamin Herrenschmidt6d2170b2008-12-18 19:13:22 +00001788 .cpu_features = CPU_FTRS_440x6,
Josh Boyer939e6222008-06-11 07:52:40 -04001789 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001790 .mmu_features = MMU_FTR_TYPE_44x,
Stefan Roese464076a2008-02-24 08:07:41 +11001791 .icache_bsize = 32,
1792 .dcache_bsize = 32,
Josh Boyer939e6222008-06-11 07:52:40 -04001793 .cpu_setup = __setup_cpu_460gt,
Stefan Roese464076a2008-02-24 08:07:41 +11001794 .machine_check = machine_check_440A,
1795 .platform = "ppc440",
1796 },
Stefan Roese20d70342009-07-29 07:04:46 +00001797 { /* 460GT Rev B */
1798 .pvr_mask = 0xffff0007,
1799 .pvr_value = 0x13020005,
1800 .cpu_name = "460GT Rev. B",
1801 .cpu_features = CPU_FTRS_440x6,
1802 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1803 .mmu_features = MMU_FTR_TYPE_44x,
1804 .icache_bsize = 32,
1805 .dcache_bsize = 32,
1806 .cpu_setup = __setup_cpu_460gt,
1807 .machine_check = machine_check_440A,
1808 .platform = "ppc440",
1809 },
Madhulika Madishetty6c712092009-02-05 13:31:36 +00001810 { /* 460SX */
1811 .pvr_mask = 0xffffff00,
1812 .pvr_value = 0x13541800,
1813 .cpu_name = "460SX",
1814 .cpu_features = CPU_FTRS_44X,
1815 .cpu_user_features = COMMON_USER_BOOKE,
1816 .mmu_features = MMU_FTR_TYPE_44x,
1817 .icache_bsize = 32,
1818 .dcache_bsize = 32,
1819 .cpu_setup = __setup_cpu_460sx,
1820 .machine_check = machine_check_440A,
1821 .platform = "ppc440",
1822 },
Tirumala Marri6edc3232010-09-13 13:26:11 +00001823 { /* 464 in APM821xx */
1824 .pvr_mask = 0xffffff00,
1825 .pvr_value = 0x12C41C80,
1826 .cpu_name = "APM821XX",
1827 .cpu_features = CPU_FTRS_44X,
1828 .cpu_user_features = COMMON_USER_BOOKE |
1829 PPC_FEATURE_HAS_FPU,
1830 .mmu_features = MMU_FTR_TYPE_44x,
1831 .icache_bsize = 32,
1832 .dcache_bsize = 32,
1833 .cpu_setup = __setup_cpu_apm821xx,
1834 .machine_check = machine_check_440A,
1835 .platform = "ppc440",
1836 },
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001837 { /* 476 core */
1838 .pvr_mask = 0xffff0000,
1839 .pvr_value = 0x11a50000,
1840 .cpu_name = "476",
1841 .cpu_features = CPU_FTRS_47X,
1842 .cpu_user_features = COMMON_USER_BOOKE |
1843 PPC_FEATURE_HAS_FPU,
1844 .mmu_features = MMU_FTR_TYPE_47x |
1845 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1846 .icache_bsize = 32,
1847 .dcache_bsize = 128,
Dave Kleikampfc5e7092010-03-05 03:43:18 +00001848 .machine_check = machine_check_47x,
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001849 .platform = "ppc470",
1850 },
Torez Smithb4e8c8d2010-03-05 10:45:54 +00001851 { /* 476 iss */
1852 .pvr_mask = 0xffff0000,
1853 .pvr_value = 0x00050000,
1854 .cpu_name = "476",
1855 .cpu_features = CPU_FTRS_47X,
1856 .cpu_user_features = COMMON_USER_BOOKE |
1857 PPC_FEATURE_HAS_FPU,
Torez Smithb4e8c8d2010-03-05 10:45:54 +00001858 .mmu_features = MMU_FTR_TYPE_47x |
1859 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1860 .icache_bsize = 32,
1861 .dcache_bsize = 128,
1862 .machine_check = machine_check_47x,
1863 .platform = "ppc470",
1864 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001865 { /* default match */
1866 .pvr_mask = 0x00000000,
1867 .pvr_value = 0x00000000,
1868 .cpu_name = "(generic 44x PPC)",
1869 .cpu_features = CPU_FTRS_44X,
1870 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001871 .mmu_features = MMU_FTR_TYPE_44x,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001872 .icache_bsize = 32,
1873 .dcache_bsize = 32,
1874 .machine_check = machine_check_4xx,
1875 .platform = "ppc440",
1876 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001877#endif /* CONFIG_44x */
Josh Boyere3e414b2007-12-24 08:44:47 -06001878#ifdef CONFIG_E200
Stephen Rothwell49209602005-10-12 15:55:09 +10001879 { /* e200z5 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001880 .pvr_mask = 0xfff00000,
1881 .pvr_value = 0x81000000,
1882 .cpu_name = "e200z5",
1883 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001884 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001885 .cpu_user_features = COMMON_USER_BOOKE |
1886 PPC_FEATURE_HAS_EFP_SINGLE |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001887 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001888 .mmu_features = MMU_FTR_TYPE_FSL_E,
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001889 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001890 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001891 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001892 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001893 { /* e200z6 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001894 .pvr_mask = 0xfff00000,
1895 .pvr_value = 0x81100000,
1896 .cpu_name = "e200z6",
1897 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001898 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001899 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001900 PPC_FEATURE_HAS_SPE_COMP |
1901 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001902 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001903 .mmu_features = MMU_FTR_TYPE_FSL_E,
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001904 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001905 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001906 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001907 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001908 { /* default match */
1909 .pvr_mask = 0x00000000,
1910 .pvr_value = 0x00000000,
1911 .cpu_name = "(generic E200 PPC)",
1912 .cpu_features = CPU_FTRS_E200,
1913 .cpu_user_features = COMMON_USER_BOOKE |
1914 PPC_FEATURE_HAS_EFP_SINGLE |
1915 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001916 .mmu_features = MMU_FTR_TYPE_FSL_E,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001917 .dcache_bsize = 32,
Kumar Gala105c31d2009-01-08 08:31:20 -06001918 .cpu_setup = __setup_cpu_e200,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001919 .machine_check = machine_check_e200,
1920 .platform = "ppc5554",
Paul Mackerras516c8be2008-05-12 14:20:35 +10001921 }
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001922#endif /* CONFIG_E200 */
Kumar Gala4490c062010-10-08 08:32:11 -05001923#endif /* CONFIG_PPC32 */
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001924#ifdef CONFIG_E500
Kumar Gala4490c062010-10-08 08:32:11 -05001925#ifdef CONFIG_PPC32
Stephen Rothwell49209602005-10-12 15:55:09 +10001926 { /* e500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001927 .pvr_mask = 0xffff0000,
1928 .pvr_value = 0x80200000,
1929 .cpu_name = "e500",
Kumar Gala10b35d92005-09-23 14:08:58 -05001930 .cpu_features = CPU_FTRS_E500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001931 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001932 PPC_FEATURE_HAS_SPE_COMP |
1933 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001934 .mmu_features = MMU_FTR_TYPE_FSL_E,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001935 .icache_bsize = 32,
1936 .dcache_bsize = 32,
1937 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001938 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001939 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06001940 .cpu_setup = __setup_cpu_e500v1,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001941 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001942 .platform = "ppc8540",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001943 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001944 { /* e500v2 */
Kumar Gala5b37b702005-06-21 17:15:18 -07001945 .pvr_mask = 0xffff0000,
1946 .pvr_value = 0x80210000,
1947 .cpu_name = "e500v2",
Kumar Gala10b35d92005-09-23 14:08:58 -05001948 .cpu_features = CPU_FTRS_E500_2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001949 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001950 PPC_FEATURE_HAS_SPE_COMP |
1951 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1952 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001953 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS,
Kumar Gala5b37b702005-06-21 17:15:18 -07001954 .icache_bsize = 32,
1955 .dcache_bsize = 32,
1956 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001957 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001958 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06001959 .cpu_setup = __setup_cpu_e500v2,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001960 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001961 .platform = "ppc8548",
Kumar Gala5b37b702005-06-21 17:15:18 -07001962 },
Kumar Gala3dfa8772008-06-16 09:41:32 -05001963 { /* e500mc */
1964 .pvr_mask = 0xffff0000,
1965 .pvr_value = 0x80230000,
1966 .cpu_name = "e500mc",
Kumar Gala3dfa8772008-06-16 09:41:32 -05001967 .cpu_features = CPU_FTRS_E500MC,
1968 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Kumar Galac3071952009-02-10 22:26:06 -06001969 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
Kumar Gala323d23a2009-04-23 08:51:22 -05001970 MMU_FTR_USE_TLBILX,
Kumar Gala3dfa8772008-06-16 09:41:32 -05001971 .icache_bsize = 64,
1972 .dcache_bsize = 64,
1973 .num_pmcs = 4,
Scott Wooda1110652010-02-25 18:09:45 -06001974 .oprofile_cpu_type = "ppc/e500mc",
Kumar Gala3dfa8772008-06-16 09:41:32 -05001975 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06001976 .cpu_setup = __setup_cpu_e500mc,
Scott Woodfe04b112010-04-08 00:38:22 -05001977 .machine_check = machine_check_e500mc,
Kumar Gala3dfa8772008-06-16 09:41:32 -05001978 .platform = "ppce500mc",
1979 },
Kumar Gala4490c062010-10-08 08:32:11 -05001980#endif /* CONFIG_PPC32 */
1981 { /* e5500 */
1982 .pvr_mask = 0xffff0000,
1983 .pvr_value = 0x80240000,
1984 .cpu_name = "e5500",
1985 .cpu_features = CPU_FTRS_E500MC,
1986 .cpu_user_features = COMMON_USER_BOOKE,
1987 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
1988 MMU_FTR_USE_TLBILX,
1989 .icache_bsize = 64,
1990 .dcache_bsize = 64,
1991 .num_pmcs = 4,
1992 .oprofile_cpu_type = "ppc/e500mc",
1993 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1994 .cpu_setup = __setup_cpu_e5500,
1995 .cpu_restore = __restore_cpu_e5500,
1996 .machine_check = machine_check_e500mc,
1997 .platform = "ppce5500",
1998 },
1999#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -07002000 { /* default match */
2001 .pvr_mask = 0x00000000,
2002 .pvr_value = 0x00000000,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002003 .cpu_name = "(generic E500 PPC)",
2004 .cpu_features = CPU_FTRS_E500,
2005 .cpu_user_features = COMMON_USER_BOOKE |
2006 PPC_FEATURE_HAS_SPE_COMP |
2007 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00002008 .mmu_features = MMU_FTR_TYPE_FSL_E,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002009 .icache_bsize = 32,
2010 .dcache_bsize = 32,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002011 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002012 .platform = "powerpc",
Paul Mackerras516c8be2008-05-12 14:20:35 +10002013 }
Stephen Rothwell49209602005-10-12 15:55:09 +10002014#endif /* CONFIG_PPC32 */
Kumar Gala4490c062010-10-08 08:32:11 -05002015#endif /* CONFIG_E500 */
Kumar Galaf45c4482009-08-18 19:08:30 +00002016
2017#ifdef CONFIG_PPC_BOOK3E_64
2018 { /* This is a default entry to get going, to be replaced by
2019 * a real one at some stage
2020 */
2021#define CPU_FTRS_BASE_BOOK3E (CPU_FTR_USE_TB | \
2022 CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_SMT | \
2023 CPU_FTR_NODSISRALIGN | CPU_FTR_NOEXECUTE)
2024 .pvr_mask = 0x00000000,
2025 .pvr_value = 0x00000000,
2026 .cpu_name = "Book3E",
2027 .cpu_features = CPU_FTRS_BASE_BOOK3E,
2028 .cpu_user_features = COMMON_USER_PPC64,
2029 .mmu_features = MMU_FTR_TYPE_3E | MMU_FTR_USE_TLBILX |
2030 MMU_FTR_USE_TLBIVAX_BCAST |
2031 MMU_FTR_LOCK_BCAST_INVAL,
2032 .icache_bsize = 64,
2033 .dcache_bsize = 64,
2034 .num_pmcs = 0,
2035 .machine_check = machine_check_generic,
2036 .platform = "power6",
2037 },
2038#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -07002039};
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002040
Paul Mackerras87a72f92007-10-04 14:18:01 +10002041static struct cpu_spec the_cpu_spec;
2042
Michael Ellerman666435b2009-02-22 16:25:43 +00002043static void __init setup_cpu_spec(unsigned long offset, struct cpu_spec *s)
2044{
2045 struct cpu_spec *t = &the_cpu_spec;
Michael Ellerman2657dd42009-02-22 16:25:45 +00002046 struct cpu_spec old;
2047
Michael Ellerman666435b2009-02-22 16:25:43 +00002048 t = PTRRELOC(t);
Michael Ellerman2657dd42009-02-22 16:25:45 +00002049 old = *t;
2050
2051 /* Copy everything, then do fixups */
2052 *t = *s;
Michael Ellerman666435b2009-02-22 16:25:43 +00002053
2054 /*
2055 * If we are overriding a previous value derived from the real
2056 * PVR with a new value obtained using a logical PVR value,
2057 * don't modify the performance monitor fields.
2058 */
Michael Ellerman2657dd42009-02-22 16:25:45 +00002059 if (old.num_pmcs && !s->num_pmcs) {
2060 t->num_pmcs = old.num_pmcs;
2061 t->pmc_type = old.pmc_type;
2062 t->oprofile_type = old.oprofile_type;
2063 t->oprofile_mmcra_sihv = old.oprofile_mmcra_sihv;
2064 t->oprofile_mmcra_sipr = old.oprofile_mmcra_sipr;
2065 t->oprofile_mmcra_clear = old.oprofile_mmcra_clear;
2066
Michael Ellerman666435b2009-02-22 16:25:43 +00002067 /*
2068 * If we have passed through this logic once before and
2069 * have pulled the default case because the real PVR was
2070 * not found inside cpu_specs[], then we are possibly
2071 * running in compatibility mode. In that case, let the
2072 * oprofiler know which set of compatibility counters to
2073 * pull from by making sure the oprofile_cpu_type string
2074 * is set to that of compatibility mode. If the
2075 * oprofile_cpu_type already has a value, then we are
2076 * possibly overriding a real PVR with a logical one,
2077 * and, in that case, keep the current value for
2078 * oprofile_cpu_type.
2079 */
Benjamin Herrenschmidtb173f032009-05-14 18:34:06 +00002080 if (old.oprofile_cpu_type != NULL) {
Benjamin Herrenschmidt0203d6e2009-04-29 19:39:38 +00002081 t->oprofile_cpu_type = old.oprofile_cpu_type;
2082 t->oprofile_type = old.oprofile_type;
Michael Wolf79af6c42009-04-27 06:17:54 +00002083 }
Michael Ellerman2657dd42009-02-22 16:25:45 +00002084 }
Michael Ellerman666435b2009-02-22 16:25:43 +00002085
2086 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
2087
2088 /*
2089 * Set the base platform string once; assumes
2090 * we're called with real pvr first.
2091 */
2092 if (*PTRRELOC(&powerpc_base_platform) == NULL)
2093 *PTRRELOC(&powerpc_base_platform) = t->platform;
2094
2095#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
2096 /* ppc64 and booke expect identify_cpu to also call setup_cpu for
2097 * that processor. I will consolidate that at a later time, for now,
2098 * just use #ifdef. We also don't need to PTRRELOC the function
2099 * pointer on ppc64 and booke as we are running at 0 in real mode
2100 * on ppc64 and reloc_offset is always 0 on booke.
2101 */
2102 if (s->cpu_setup) {
2103 s->cpu_setup(offset, s);
2104 }
2105#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
2106}
2107
Paul Mackerras87a72f92007-10-04 14:18:01 +10002108struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002109{
2110 struct cpu_spec *s = cpu_specs;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002111 int i;
2112
2113 s = PTRRELOC(s);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002114
Michael Ellerman666435b2009-02-22 16:25:43 +00002115 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) {
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002116 if ((pvr & s->pvr_mask) == s->pvr_value) {
Michael Ellerman666435b2009-02-22 16:25:43 +00002117 setup_cpu_spec(offset, s);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002118 return s;
2119 }
Michael Ellerman666435b2009-02-22 16:25:43 +00002120 }
2121
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002122 BUG();
Michael Ellerman666435b2009-02-22 16:25:43 +00002123
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002124 return NULL;
2125}