blob: 4a24a2fc45740fc5b0622ec35c7550247be7f457 [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);
Kumar Gala400d2212005-09-27 15:13:12 -050051extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
52extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
53extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
54extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
55extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
56extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
57extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
58extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell49209602005-10-12 15:55:09 +100059#endif /* CONFIG_PPC32 */
Olof Johanssonf39b7a52006-08-11 00:07:08 -050060#ifdef CONFIG_PPC64
Kumar Gala400d2212005-09-27 15:13:12 -050061extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
Olof Johansson5b43d202006-10-04 23:41:41 -050062extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
Olof Johansson11999192007-02-04 16:36:51 -060063extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell40d244d2007-02-12 22:10:48 +110064extern void __restore_cpu_pa6t(void);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050065extern void __restore_cpu_ppc970(void);
Michael Neulinge952e6c2008-06-18 10:47:26 +100066extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec);
67extern void __restore_cpu_power7(void);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050068#endif /* CONFIG_PPC64 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070069
Linus Torvalds1da177e2005-04-16 15:20:36 -070070/* This table only contains "desktop" CPUs, it need to be filled with embedded
71 * ones as well...
72 */
Stephen Rothwell49209602005-10-12 15:55:09 +100073#define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
74 PPC_FEATURE_HAS_MMU)
75#define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +110076#define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +110077#define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
78 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
79#define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
80 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
Anton Blanchard03054d52006-04-29 09:51:06 +100081#define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
Paul Mackerrasfab5db92006-06-07 16:14:40 +100082 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
Nathan Lynch0f473312008-07-10 01:06:57 +100083 PPC_FEATURE_TRUE_LE | \
84 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Michael Neulinge952e6c2008-06-18 10:47:26 +100085#define COMMON_USER_POWER7 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
86 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
Nathan Lynch0f473312008-07-10 01:06:57 +100087 PPC_FEATURE_TRUE_LE | \
88 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -050089#define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
90 PPC_FEATURE_TRUE_LE | \
91 PPC_FEATURE_HAS_ALTIVEC_COMP)
Paul Mackerras80f15dc2006-01-14 10:11:39 +110092#define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
93 PPC_FEATURE_BOOKE)
Linus Torvalds1da177e2005-04-16 15:20:36 -070094
Paul Mackerras87a72f92007-10-04 14:18:01 +100095static struct cpu_spec __initdata cpu_specs[] = {
Stephen Rothwell49209602005-10-12 15:55:09 +100096#ifdef CONFIG_PPC64
97 { /* Power3 */
98 .pvr_mask = 0xffff0000,
99 .pvr_value = 0x00400000,
100 .cpu_name = "POWER3 (630)",
101 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000102 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000103 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000104 .icache_bsize = 128,
105 .dcache_bsize = 128,
106 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600107 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000108 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000109 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100110 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100111 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +1000112 },
113 { /* Power3+ */
114 .pvr_mask = 0xffff0000,
115 .pvr_value = 0x00410000,
116 .cpu_name = "POWER3 (630+)",
117 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000118 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000119 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000120 .icache_bsize = 128,
121 .dcache_bsize = 128,
122 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600123 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000124 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000125 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100126 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100127 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +1000128 },
129 { /* Northstar */
130 .pvr_mask = 0xffff0000,
131 .pvr_value = 0x00330000,
132 .cpu_name = "RS64-II (northstar)",
133 .cpu_features = CPU_FTRS_RS64,
134 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000135 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000136 .icache_bsize = 128,
137 .dcache_bsize = 128,
138 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600139 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000140 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000141 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100142 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100143 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000144 },
145 { /* Pulsar */
146 .pvr_mask = 0xffff0000,
147 .pvr_value = 0x00340000,
148 .cpu_name = "RS64-III (pulsar)",
149 .cpu_features = CPU_FTRS_RS64,
150 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000151 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000152 .icache_bsize = 128,
153 .dcache_bsize = 128,
154 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600155 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000156 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000157 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100158 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100159 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000160 },
161 { /* I-star */
162 .pvr_mask = 0xffff0000,
163 .pvr_value = 0x00360000,
164 .cpu_name = "RS64-III (icestar)",
165 .cpu_features = CPU_FTRS_RS64,
166 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000167 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000168 .icache_bsize = 128,
169 .dcache_bsize = 128,
170 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600171 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000172 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000173 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100174 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100175 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000176 },
177 { /* S-star */
178 .pvr_mask = 0xffff0000,
179 .pvr_value = 0x00370000,
180 .cpu_name = "RS64-IV (sstar)",
181 .cpu_features = CPU_FTRS_RS64,
182 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000183 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000184 .icache_bsize = 128,
185 .dcache_bsize = 128,
186 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600187 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000188 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000189 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100190 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100191 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000192 },
193 { /* Power4 */
194 .pvr_mask = 0xffff0000,
195 .pvr_value = 0x00350000,
196 .cpu_name = "POWER4 (gp)",
197 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100198 .cpu_user_features = COMMON_USER_POWER4,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000199 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000200 .icache_bsize = 128,
201 .dcache_bsize = 128,
202 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600203 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000204 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000205 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100206 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100207 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000208 },
209 { /* Power4+ */
210 .pvr_mask = 0xffff0000,
211 .pvr_value = 0x00380000,
212 .cpu_name = "POWER4+ (gq)",
213 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100214 .cpu_user_features = COMMON_USER_POWER4,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000215 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000216 .icache_bsize = 128,
217 .dcache_bsize = 128,
218 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600219 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000220 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000221 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100222 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100223 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000224 },
225 { /* PPC970 */
226 .pvr_mask = 0xffff0000,
227 .pvr_value = 0x00390000,
228 .cpu_name = "PPC970",
229 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100230 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000231 PPC_FEATURE_HAS_ALTIVEC_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000232 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000233 .icache_bsize = 128,
234 .dcache_bsize = 128,
235 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600236 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000237 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500238 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000239 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000240 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100241 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100242 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000243 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000244 { /* PPC970FX */
245 .pvr_mask = 0xffff0000,
246 .pvr_value = 0x003c0000,
247 .cpu_name = "PPC970FX",
Stephen Rothwell49209602005-10-12 15:55:09 +1000248 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100249 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000250 PPC_FEATURE_HAS_ALTIVEC_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000251 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000252 .icache_bsize = 128,
253 .dcache_bsize = 128,
254 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600255 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000256 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500257 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000258 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000259 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100260 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100261 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000262 },
Olof Johansson3546e812007-02-26 00:35:14 -0600263 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
264 .pvr_mask = 0xffffffff,
265 .pvr_value = 0x00440100,
266 .cpu_name = "PPC970MP",
267 .cpu_features = CPU_FTRS_PPC970,
268 .cpu_user_features = COMMON_USER_POWER4 |
269 PPC_FEATURE_HAS_ALTIVEC_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000270 .mmu_features = MMU_FTR_HPTE_TABLE,
Olof Johansson3546e812007-02-26 00:35:14 -0600271 .icache_bsize = 128,
272 .dcache_bsize = 128,
273 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000274 .pmc_type = PPC_PMC_IBM,
Olof Johansson3546e812007-02-26 00:35:14 -0600275 .cpu_setup = __setup_cpu_ppc970,
276 .cpu_restore = __restore_cpu_ppc970,
277 .oprofile_cpu_type = "ppc64/970MP",
278 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100279 .machine_check = machine_check_generic,
Olof Johansson3546e812007-02-26 00:35:14 -0600280 .platform = "ppc970",
281 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000282 { /* PPC970MP */
283 .pvr_mask = 0xffff0000,
284 .pvr_value = 0x00440000,
285 .cpu_name = "PPC970MP",
286 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100287 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000288 PPC_FEATURE_HAS_ALTIVEC_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000289 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000290 .icache_bsize = 128,
291 .dcache_bsize = 128,
Anton Blanchard87af41b2006-05-05 05:44:26 +1000292 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000293 .pmc_type = PPC_PMC_IBM,
Olof Johansson5b43d202006-10-04 23:41:41 -0500294 .cpu_setup = __setup_cpu_ppc970MP,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500295 .cpu_restore = __restore_cpu_ppc970,
Mike Wolffecb3522006-11-21 14:41:54 -0600296 .oprofile_cpu_type = "ppc64/970MP",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000297 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100298 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100299 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000300 },
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500301 { /* PPC970GX */
302 .pvr_mask = 0xffff0000,
303 .pvr_value = 0x00450000,
304 .cpu_name = "PPC970GX",
305 .cpu_features = CPU_FTRS_PPC970,
306 .cpu_user_features = COMMON_USER_POWER4 |
307 PPC_FEATURE_HAS_ALTIVEC_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000308 .mmu_features = MMU_FTR_HPTE_TABLE,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500309 .icache_bsize = 128,
310 .dcache_bsize = 128,
311 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600312 .pmc_type = PPC_PMC_IBM,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500313 .cpu_setup = __setup_cpu_ppc970,
314 .oprofile_cpu_type = "ppc64/970",
315 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100316 .machine_check = machine_check_generic,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500317 .platform = "ppc970",
318 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100319 { /* Power5 GR */
Stephen Rothwell49209602005-10-12 15:55:09 +1000320 .pvr_mask = 0xffff0000,
321 .pvr_value = 0x003a0000,
322 .cpu_name = "POWER5 (gr)",
323 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100324 .cpu_user_features = COMMON_USER_POWER5,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000325 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000326 .icache_bsize = 128,
327 .dcache_bsize = 128,
328 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600329 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000330 .oprofile_cpu_type = "ppc64/power5",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000331 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000332 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
333 * and above but only works on POWER5 and above
334 */
335 .oprofile_mmcra_sihv = MMCRA_SIHV,
336 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100337 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100338 .platform = "power5",
Stephen Rothwell49209602005-10-12 15:55:09 +1000339 },
Mike Wolf31a12ce2007-07-10 13:13:47 -0500340 { /* Power5++ */
341 .pvr_mask = 0xffffff00,
342 .pvr_value = 0x003b0300,
343 .cpu_name = "POWER5+ (gs)",
344 .cpu_features = CPU_FTRS_POWER5,
345 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000346 .mmu_features = MMU_FTR_HPTE_TABLE,
Mike Wolf31a12ce2007-07-10 13:13:47 -0500347 .icache_bsize = 128,
348 .dcache_bsize = 128,
349 .num_pmcs = 6,
350 .oprofile_cpu_type = "ppc64/power5++",
351 .oprofile_type = PPC_OPROFILE_POWER4,
352 .oprofile_mmcra_sihv = MMCRA_SIHV,
353 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100354 .machine_check = machine_check_generic,
Mike Wolf31a12ce2007-07-10 13:13:47 -0500355 .platform = "power5+",
356 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100357 { /* Power5 GS */
Stephen Rothwell49209602005-10-12 15:55:09 +1000358 .pvr_mask = 0xffff0000,
359 .pvr_value = 0x003b0000,
Anton Blanchard834608f2006-01-09 15:42:30 +1100360 .cpu_name = "POWER5+ (gs)",
Stephen Rothwell49209602005-10-12 15:55:09 +1000361 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100362 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000363 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000364 .icache_bsize = 128,
365 .dcache_bsize = 128,
366 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600367 .pmc_type = PPC_PMC_IBM,
Anton Blanchard834608f2006-01-09 15:42:30 +1100368 .oprofile_cpu_type = "ppc64/power5+",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000369 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000370 .oprofile_mmcra_sihv = MMCRA_SIHV,
371 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100372 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100373 .platform = "power5+",
Stephen Rothwell49209602005-10-12 15:55:09 +1000374 },
Paul Mackerras974a76f2006-11-10 20:38:53 +1100375 { /* POWER6 in P5+ mode; 2.04-compliant processor */
376 .pvr_mask = 0xffffffff,
377 .pvr_value = 0x0f000001,
378 .cpu_name = "POWER5+",
379 .cpu_features = CPU_FTRS_POWER5,
380 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000381 .mmu_features = MMU_FTR_HPTE_TABLE,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100382 .icache_bsize = 128,
383 .dcache_bsize = 128,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100384 .machine_check = machine_check_generic,
Michael Wolf79af6c42009-04-27 06:17:54 +0000385 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
386 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100387 .platform = "power5+",
388 },
Anton Blanchard03054d52006-04-29 09:51:06 +1000389 { /* Power6 */
390 .pvr_mask = 0xffff0000,
391 .pvr_value = 0x003e0000,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100392 .cpu_name = "POWER6 (raw)",
393 .cpu_features = CPU_FTRS_POWER6,
394 .cpu_user_features = COMMON_USER_POWER6 |
395 PPC_FEATURE_POWER6_EXT,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000396 .mmu_features = MMU_FTR_HPTE_TABLE,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100397 .icache_bsize = 128,
398 .dcache_bsize = 128,
399 .num_pmcs = 6,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000400 .pmc_type = PPC_PMC_IBM,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100401 .oprofile_cpu_type = "ppc64/power6",
402 .oprofile_type = PPC_OPROFILE_POWER4,
403 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
404 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
405 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
406 POWER6_MMCRA_OTHER,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100407 .machine_check = machine_check_generic,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100408 .platform = "power6x",
409 },
410 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
411 .pvr_mask = 0xffffffff,
412 .pvr_value = 0x0f000002,
413 .cpu_name = "POWER6 (architected)",
Anton Blanchard03054d52006-04-29 09:51:06 +1000414 .cpu_features = CPU_FTRS_POWER6,
415 .cpu_user_features = COMMON_USER_POWER6,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000416 .mmu_features = MMU_FTR_HPTE_TABLE,
Anton Blanchard03054d52006-04-29 09:51:06 +1000417 .icache_bsize = 128,
418 .dcache_bsize = 128,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100419 .machine_check = machine_check_generic,
Michael Wolf79af6c42009-04-27 06:17:54 +0000420 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
421 .oprofile_type = PPC_OPROFILE_POWER4,
Anton Blanchard03054d52006-04-29 09:51:06 +1000422 .platform = "power6",
423 },
Joel Schopp635f5a62008-06-19 06:18:21 +1000424 { /* 2.06-compliant processor, i.e. Power7 "architected" mode */
425 .pvr_mask = 0xffffffff,
426 .pvr_value = 0x0f000003,
427 .cpu_name = "POWER7 (architected)",
428 .cpu_features = CPU_FTRS_POWER7,
429 .cpu_user_features = COMMON_USER_POWER7,
Milton Miller60dbf432009-04-29 20:58:01 +0000430 .mmu_features = MMU_FTR_HPTE_TABLE |
431 MMU_FTR_TLBIE_206,
Joel Schopp635f5a62008-06-19 06:18:21 +1000432 .icache_bsize = 128,
433 .dcache_bsize = 128,
434 .machine_check = machine_check_generic,
Michael Wolf79af6c42009-04-27 06:17:54 +0000435 .oprofile_type = PPC_OPROFILE_POWER4,
436 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
Joel Schopp635f5a62008-06-19 06:18:21 +1000437 .platform = "power7",
438 },
Michael Neulinge952e6c2008-06-18 10:47:26 +1000439 { /* Power7 */
440 .pvr_mask = 0xffff0000,
441 .pvr_value = 0x003f0000,
Joel Schopp635f5a62008-06-19 06:18:21 +1000442 .cpu_name = "POWER7 (raw)",
Michael Neulinge952e6c2008-06-18 10:47:26 +1000443 .cpu_features = CPU_FTRS_POWER7,
444 .cpu_user_features = COMMON_USER_POWER7,
Milton Miller60dbf432009-04-29 20:58:01 +0000445 .mmu_features = MMU_FTR_HPTE_TABLE |
446 MMU_FTR_TLBIE_206,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000447 .icache_bsize = 128,
448 .dcache_bsize = 128,
449 .num_pmcs = 6,
450 .pmc_type = PPC_PMC_IBM,
451 .cpu_setup = __setup_cpu_power7,
452 .cpu_restore = __restore_cpu_power7,
453 .oprofile_cpu_type = "ppc64/power7",
454 .oprofile_type = PPC_OPROFILE_POWER4,
455 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
456 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
457 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
458 POWER6_MMCRA_OTHER,
459 .platform = "power7",
460 },
Arnd Bergmannc902be72006-01-04 19:55:53 +0000461 { /* Cell Broadband Engine */
Stephen Rothwell49209602005-10-12 15:55:09 +1000462 .pvr_mask = 0xffff0000,
463 .pvr_value = 0x00700000,
464 .cpu_name = "Cell Broadband Engine",
465 .cpu_features = CPU_FTRS_CELL,
466 .cpu_user_features = COMMON_USER_PPC64 |
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +1100467 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
468 PPC_FEATURE_SMT,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000469 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000470 .icache_bsize = 128,
471 .dcache_bsize = 128,
Maynard Johnson18f21902006-11-20 18:45:16 +0100472 .num_pmcs = 4,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600473 .pmc_type = PPC_PMC_IBM,
Maynard Johnson18f21902006-11-20 18:45:16 +0100474 .oprofile_cpu_type = "ppc64/cell-be",
475 .oprofile_type = PPC_OPROFILE_CELL,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100476 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100477 .platform = "ppc-cell-be",
Stephen Rothwell49209602005-10-12 15:55:09 +1000478 },
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500479 { /* PA Semi PA6T */
480 .pvr_mask = 0x7fff0000,
481 .pvr_value = 0x00900000,
482 .cpu_name = "PA6T",
483 .cpu_features = CPU_FTRS_PA6T,
484 .cpu_user_features = COMMON_USER_PA6T,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000485 .mmu_features = MMU_FTR_HPTE_TABLE,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500486 .icache_bsize = 64,
487 .dcache_bsize = 64,
488 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600489 .pmc_type = PPC_PMC_PA6T,
Olof Johansson11999192007-02-04 16:36:51 -0600490 .cpu_setup = __setup_cpu_pa6t,
491 .cpu_restore = __restore_cpu_pa6t,
Olof Johansson25fc5302007-04-18 16:38:21 +1000492 .oprofile_cpu_type = "ppc64/pa6t",
493 .oprofile_type = PPC_OPROFILE_PA6T,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100494 .machine_check = machine_check_generic,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500495 .platform = "pa6t",
496 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000497 { /* default match */
498 .pvr_mask = 0x00000000,
499 .pvr_value = 0x00000000,
500 .cpu_name = "POWER4 (compatible)",
501 .cpu_features = CPU_FTRS_COMPATIBLE,
502 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000503 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000504 .icache_bsize = 128,
505 .dcache_bsize = 128,
506 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600507 .pmc_type = PPC_PMC_IBM,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100508 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100509 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000510 }
511#endif /* CONFIG_PPC64 */
512#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -0700513#if CLASSIC_PPC
Stephen Rothwell49209602005-10-12 15:55:09 +1000514 { /* 601 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700515 .pvr_mask = 0xffff0000,
516 .pvr_value = 0x00010000,
517 .cpu_name = "601",
Kumar Gala10b35d92005-09-23 14:08:58 -0500518 .cpu_features = CPU_FTRS_PPC601,
Stephen Rothwell49209602005-10-12 15:55:09 +1000519 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
Paul Mackerras98599012005-10-22 16:51:34 +1000520 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000521 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700522 .icache_bsize = 32,
523 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100524 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100525 .platform = "ppc601",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700526 },
527 { /* 603 */
528 .pvr_mask = 0xffff0000,
529 .pvr_value = 0x00030000,
530 .cpu_name = "603",
Kumar Gala10b35d92005-09-23 14:08:58 -0500531 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000532 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000533 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700534 .icache_bsize = 32,
535 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100536 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100537 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100538 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700539 },
540 { /* 603e */
541 .pvr_mask = 0xffff0000,
542 .pvr_value = 0x00060000,
543 .cpu_name = "603e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500544 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000545 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000546 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700547 .icache_bsize = 32,
548 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100549 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100550 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100551 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700552 },
553 { /* 603ev */
554 .pvr_mask = 0xffff0000,
555 .pvr_value = 0x00070000,
556 .cpu_name = "603ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500557 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000558 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000559 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700560 .icache_bsize = 32,
561 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100562 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100563 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100564 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700565 },
566 { /* 604 */
567 .pvr_mask = 0xffff0000,
568 .pvr_value = 0x00040000,
569 .cpu_name = "604",
Kumar Gala10b35d92005-09-23 14:08:58 -0500570 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000571 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000572 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700573 .icache_bsize = 32,
574 .dcache_bsize = 32,
575 .num_pmcs = 2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100576 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100577 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100578 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700579 },
580 { /* 604e */
581 .pvr_mask = 0xfffff000,
582 .pvr_value = 0x00090000,
583 .cpu_name = "604e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500584 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000585 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000586 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700587 .icache_bsize = 32,
588 .dcache_bsize = 32,
589 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100590 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100591 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100592 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700593 },
594 { /* 604r */
595 .pvr_mask = 0xffff0000,
596 .pvr_value = 0x00090000,
597 .cpu_name = "604r",
Kumar Gala10b35d92005-09-23 14:08:58 -0500598 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000599 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000600 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700601 .icache_bsize = 32,
602 .dcache_bsize = 32,
603 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100604 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100605 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100606 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700607 },
608 { /* 604ev */
609 .pvr_mask = 0xffff0000,
610 .pvr_value = 0x000a0000,
611 .cpu_name = "604ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500612 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000613 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000614 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700615 .icache_bsize = 32,
616 .dcache_bsize = 32,
617 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100618 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100619 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100620 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700621 },
622 { /* 740/750 (0x4202, don't support TAU ?) */
623 .pvr_mask = 0xffffffff,
624 .pvr_value = 0x00084202,
625 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500626 .cpu_features = CPU_FTRS_740_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000627 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000628 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700629 .icache_bsize = 32,
630 .dcache_bsize = 32,
631 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100632 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100633 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100634 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700635 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700636 { /* 750CX (80100 and 8010x?) */
637 .pvr_mask = 0xfffffff0,
638 .pvr_value = 0x00080100,
639 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500640 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000641 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000642 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700643 .icache_bsize = 32,
644 .dcache_bsize = 32,
645 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100646 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100647 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100648 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700649 },
650 { /* 750CX (82201 and 82202) */
651 .pvr_mask = 0xfffffff0,
652 .pvr_value = 0x00082200,
653 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500654 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000655 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000656 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700657 .icache_bsize = 32,
658 .dcache_bsize = 32,
659 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000660 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100661 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100662 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100663 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700664 },
665 { /* 750CXe (82214) */
666 .pvr_mask = 0xfffffff0,
667 .pvr_value = 0x00082210,
668 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500669 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000670 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000671 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700672 .icache_bsize = 32,
673 .dcache_bsize = 32,
674 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000675 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100676 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100677 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100678 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700679 },
Arthur Othieno7c316252005-09-03 15:55:52 -0700680 { /* 750CXe "Gekko" (83214) */
681 .pvr_mask = 0xffffffff,
682 .pvr_value = 0x00083214,
683 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500684 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000685 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000686 .mmu_features = MMU_FTR_HPTE_TABLE,
Arthur Othieno7c316252005-09-03 15:55:52 -0700687 .icache_bsize = 32,
688 .dcache_bsize = 32,
689 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000690 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100691 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100692 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100693 .platform = "ppc750",
Arthur Othieno7c316252005-09-03 15:55:52 -0700694 },
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500695 { /* 750CL */
696 .pvr_mask = 0xfffff0f0,
697 .pvr_value = 0x00087010,
698 .cpu_name = "750CL",
Josh Boyera14c4502007-04-13 04:33:25 +1000699 .cpu_features = CPU_FTRS_750CL,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500700 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000701 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500702 .icache_bsize = 32,
703 .dcache_bsize = 32,
704 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000705 .pmc_type = PPC_PMC_IBM,
Josh Boyera14c4502007-04-13 04:33:25 +1000706 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100707 .machine_check = machine_check_generic,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500708 .platform = "ppc750",
709 },
Arthur Othienoac1ff042005-09-03 15:55:51 -0700710 { /* 745/755 */
711 .pvr_mask = 0xfffff000,
712 .pvr_value = 0x00083000,
713 .cpu_name = "745/755",
Kumar Gala10b35d92005-09-23 14:08:58 -0500714 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000715 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000716 .mmu_features = MMU_FTR_HPTE_TABLE,
Arthur Othienoac1ff042005-09-03 15:55:51 -0700717 .icache_bsize = 32,
718 .dcache_bsize = 32,
719 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000720 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100721 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100722 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100723 .platform = "ppc750",
Arthur Othienoac1ff042005-09-03 15:55:51 -0700724 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700725 { /* 750FX rev 1.x */
726 .pvr_mask = 0xffffff00,
727 .pvr_value = 0x70000100,
728 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500729 .cpu_features = CPU_FTRS_750FX1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000730 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000731 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700732 .icache_bsize = 32,
733 .dcache_bsize = 32,
734 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000735 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100736 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100737 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100738 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000739 .oprofile_cpu_type = "ppc/750",
740 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700741 },
742 { /* 750FX rev 2.0 must disable HID0[DPM] */
743 .pvr_mask = 0xffffffff,
744 .pvr_value = 0x70000200,
745 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500746 .cpu_features = CPU_FTRS_750FX2,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000747 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000748 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700749 .icache_bsize = 32,
750 .dcache_bsize = 32,
751 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000752 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100753 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100754 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100755 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000756 .oprofile_cpu_type = "ppc/750",
757 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700758 },
759 { /* 750FX (All revs except 2.0) */
760 .pvr_mask = 0xffff0000,
761 .pvr_value = 0x70000000,
762 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500763 .cpu_features = CPU_FTRS_750FX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000764 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000765 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700766 .icache_bsize = 32,
767 .dcache_bsize = 32,
768 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000769 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100770 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100771 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100772 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000773 .oprofile_cpu_type = "ppc/750",
774 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700775 },
776 { /* 750GX */
777 .pvr_mask = 0xffff0000,
778 .pvr_value = 0x70020000,
779 .cpu_name = "750GX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500780 .cpu_features = CPU_FTRS_750GX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000781 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000782 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700783 .icache_bsize = 32,
784 .dcache_bsize = 32,
785 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000786 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100787 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100788 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100789 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000790 .oprofile_cpu_type = "ppc/750",
791 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700792 },
793 { /* 740/750 (L2CR bit need fixup for 740) */
794 .pvr_mask = 0xffff0000,
795 .pvr_value = 0x00080000,
796 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500797 .cpu_features = CPU_FTRS_740,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000798 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000799 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700800 .icache_bsize = 32,
801 .dcache_bsize = 32,
802 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000803 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100804 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100805 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100806 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700807 },
808 { /* 7400 rev 1.1 ? (no TAU) */
809 .pvr_mask = 0xffffffff,
810 .pvr_value = 0x000c1101,
811 .cpu_name = "7400 (1.1)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500812 .cpu_features = CPU_FTRS_7400_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000813 .cpu_user_features = COMMON_USER |
814 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000815 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700816 .icache_bsize = 32,
817 .dcache_bsize = 32,
818 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000819 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100820 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100821 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100822 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700823 },
824 { /* 7400 */
825 .pvr_mask = 0xffff0000,
826 .pvr_value = 0x000c0000,
827 .cpu_name = "7400",
Kumar Gala10b35d92005-09-23 14:08:58 -0500828 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000829 .cpu_user_features = COMMON_USER |
830 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000831 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700832 .icache_bsize = 32,
833 .dcache_bsize = 32,
834 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000835 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100836 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100837 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100838 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700839 },
840 { /* 7410 */
841 .pvr_mask = 0xffff0000,
842 .pvr_value = 0x800c0000,
843 .cpu_name = "7410",
Kumar Gala10b35d92005-09-23 14:08:58 -0500844 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000845 .cpu_user_features = COMMON_USER |
846 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000847 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700848 .icache_bsize = 32,
849 .dcache_bsize = 32,
850 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000851 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100852 .cpu_setup = __setup_cpu_7410,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100853 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100854 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700855 },
856 { /* 7450 2.0 - no doze/nap */
857 .pvr_mask = 0xffffffff,
858 .pvr_value = 0x80000200,
859 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500860 .cpu_features = CPU_FTRS_7450_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000861 .cpu_user_features = COMMON_USER |
862 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000863 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700864 .icache_bsize = 32,
865 .dcache_bsize = 32,
866 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000867 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600868 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600869 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000870 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100871 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100872 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700873 },
874 { /* 7450 2.1 */
875 .pvr_mask = 0xffffffff,
876 .pvr_value = 0x80000201,
877 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500878 .cpu_features = CPU_FTRS_7450_21,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000879 .cpu_user_features = COMMON_USER |
880 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000881 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700882 .icache_bsize = 32,
883 .dcache_bsize = 32,
884 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000885 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600886 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600887 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000888 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100889 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100890 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700891 },
892 { /* 7450 2.3 and newer */
893 .pvr_mask = 0xffff0000,
894 .pvr_value = 0x80000000,
895 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500896 .cpu_features = CPU_FTRS_7450_23,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000897 .cpu_user_features = COMMON_USER |
898 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000899 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700900 .icache_bsize = 32,
901 .dcache_bsize = 32,
902 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000903 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600904 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600905 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000906 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100907 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100908 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700909 },
910 { /* 7455 rev 1.x */
911 .pvr_mask = 0xffffff00,
912 .pvr_value = 0x80010100,
913 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500914 .cpu_features = CPU_FTRS_7455_1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000915 .cpu_user_features = COMMON_USER |
916 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000917 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700918 .icache_bsize = 32,
919 .dcache_bsize = 32,
920 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000921 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600922 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600923 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000924 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100925 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100926 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700927 },
928 { /* 7455 rev 2.0 */
929 .pvr_mask = 0xffffffff,
930 .pvr_value = 0x80010200,
931 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500932 .cpu_features = CPU_FTRS_7455_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000933 .cpu_user_features = COMMON_USER |
934 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000935 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700936 .icache_bsize = 32,
937 .dcache_bsize = 32,
938 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000939 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600940 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600941 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000942 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100943 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100944 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700945 },
946 { /* 7455 others */
947 .pvr_mask = 0xffff0000,
948 .pvr_value = 0x80010000,
949 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500950 .cpu_features = CPU_FTRS_7455,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000951 .cpu_user_features = COMMON_USER |
952 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000953 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700954 .icache_bsize = 32,
955 .dcache_bsize = 32,
956 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000957 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600958 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600959 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000960 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100961 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100962 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700963 },
964 { /* 7447/7457 Rev 1.0 */
965 .pvr_mask = 0xffffffff,
966 .pvr_value = 0x80020100,
967 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500968 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000969 .cpu_user_features = COMMON_USER |
970 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000971 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700972 .icache_bsize = 32,
973 .dcache_bsize = 32,
974 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000975 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600976 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600977 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000978 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100979 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100980 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700981 },
982 { /* 7447/7457 Rev 1.1 */
983 .pvr_mask = 0xffffffff,
984 .pvr_value = 0x80020101,
985 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500986 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000987 .cpu_user_features = COMMON_USER |
988 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000989 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700990 .icache_bsize = 32,
991 .dcache_bsize = 32,
992 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000993 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600994 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600995 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000996 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100997 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100998 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700999 },
1000 { /* 7447/7457 Rev 1.2 and later */
1001 .pvr_mask = 0xffff0000,
1002 .pvr_value = 0x80020000,
1003 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -05001004 .cpu_features = CPU_FTRS_7447,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001005 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001006 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001007 .icache_bsize = 32,
1008 .dcache_bsize = 32,
1009 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001010 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001011 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001012 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001013 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001014 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001015 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001016 },
1017 { /* 7447A */
1018 .pvr_mask = 0xffff0000,
1019 .pvr_value = 0x80030000,
1020 .cpu_name = "7447A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001021 .cpu_features = CPU_FTRS_7447A,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001022 .cpu_user_features = COMMON_USER |
1023 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001024 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001025 .icache_bsize = 32,
1026 .dcache_bsize = 32,
1027 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001028 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001029 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001030 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001031 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001032 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001033 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001034 },
Kumar Galabbde6302005-09-03 15:55:55 -07001035 { /* 7448 */
1036 .pvr_mask = 0xffff0000,
1037 .pvr_value = 0x80040000,
1038 .cpu_name = "7448",
James.Yang3d372542007-05-02 16:34:43 -05001039 .cpu_features = CPU_FTRS_7448,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001040 .cpu_user_features = COMMON_USER |
1041 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001042 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Kumar Galabbde6302005-09-03 15:55:55 -07001043 .icache_bsize = 32,
1044 .dcache_bsize = 32,
1045 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001046 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001047 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001048 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001049 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001050 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001051 .platform = "ppc7450",
Kumar Galabbde6302005-09-03 15:55:55 -07001052 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001053 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
1054 .pvr_mask = 0x7fff0000,
1055 .pvr_value = 0x00810000,
1056 .cpu_name = "82xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001057 .cpu_features = CPU_FTRS_82XX,
Stephen Rothwell49209602005-10-12 15:55:09 +10001058 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001059 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001060 .icache_bsize = 32,
1061 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001062 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001063 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001064 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001065 },
1066 { /* All G2_LE (603e core, plus some) have the same pvr */
1067 .pvr_mask = 0x7fff0000,
1068 .pvr_value = 0x00820000,
1069 .cpu_name = "G2_LE",
Kumar Gala10b35d92005-09-23 14:08:58 -05001070 .cpu_features = CPU_FTRS_G2_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +10001071 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001072 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001073 .icache_bsize = 32,
1074 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001075 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001076 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001077 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001078 },
Kim Phillips6c4a2502006-10-02 20:10:24 -05001079 { /* e300c1 (a 603e core, plus some) on 83xx */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001080 .pvr_mask = 0x7fff0000,
1081 .pvr_value = 0x00830000,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001082 .cpu_name = "e300c1",
Kumar Gala10b35d92005-09-23 14:08:58 -05001083 .cpu_features = CPU_FTRS_E300,
Stephen Rothwell49209602005-10-12 15:55:09 +10001084 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001085 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001086 .icache_bsize = 32,
1087 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001088 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001089 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001090 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001091 },
Kim Phillips6c4a2502006-10-02 20:10:24 -05001092 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
1093 .pvr_mask = 0x7fff0000,
1094 .pvr_value = 0x00840000,
1095 .cpu_name = "e300c2",
Kim Phillipsaa42c692006-12-08 02:43:30 -06001096 .cpu_features = CPU_FTRS_E300C2,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001097 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Kumar Gala2319f122009-03-19 03:55:41 +00001098 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1099 MMU_FTR_NEED_DTLB_SW_LRU,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001100 .icache_bsize = 32,
1101 .dcache_bsize = 32,
1102 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001103 .machine_check = machine_check_generic,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001104 .platform = "ppc603",
1105 },
Li Yanga58d5242007-10-19 19:38:42 +08001106 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
Scott Wood57933f82006-12-01 12:57:05 -06001107 .pvr_mask = 0x7fff0000,
1108 .pvr_value = 0x00850000,
1109 .cpu_name = "e300c3",
1110 .cpu_features = CPU_FTRS_E300,
1111 .cpu_user_features = COMMON_USER,
Kumar Gala2319f122009-03-19 03:55:41 +00001112 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1113 MMU_FTR_NEED_DTLB_SW_LRU,
Scott Wood57933f82006-12-01 12:57:05 -06001114 .icache_bsize = 32,
1115 .dcache_bsize = 32,
1116 .cpu_setup = __setup_cpu_603,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001117 .num_pmcs = 4,
1118 .oprofile_cpu_type = "ppc/e300",
1119 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Scott Wood57933f82006-12-01 12:57:05 -06001120 .platform = "ppc603",
1121 },
Li Yanga58d5242007-10-19 19:38:42 +08001122 { /* e300c4 (e300c1, plus one IU) */
1123 .pvr_mask = 0x7fff0000,
1124 .pvr_value = 0x00860000,
1125 .cpu_name = "e300c4",
1126 .cpu_features = CPU_FTRS_E300,
1127 .cpu_user_features = COMMON_USER,
Kumar Gala2319f122009-03-19 03:55:41 +00001128 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1129 MMU_FTR_NEED_DTLB_SW_LRU,
Li Yanga58d5242007-10-19 19:38:42 +08001130 .icache_bsize = 32,
1131 .dcache_bsize = 32,
1132 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001133 .machine_check = machine_check_generic,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001134 .num_pmcs = 4,
1135 .oprofile_cpu_type = "ppc/e300",
1136 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Li Yanga58d5242007-10-19 19:38:42 +08001137 .platform = "ppc603",
1138 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001139 { /* default match, we assume split I/D cache & TB (non-601)... */
1140 .pvr_mask = 0x00000000,
1141 .pvr_value = 0x00000000,
1142 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -05001143 .cpu_features = CPU_FTRS_CLASSIC32,
Stephen Rothwell49209602005-10-12 15:55:09 +10001144 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001145 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001146 .icache_bsize = 32,
1147 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001148 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001149 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001150 },
1151#endif /* CLASSIC_PPC */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001152#ifdef CONFIG_8xx
1153 { /* 8xx */
1154 .pvr_mask = 0xffff0000,
1155 .pvr_value = 0x00500000,
1156 .cpu_name = "8xx",
1157 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1158 * if the 8xx code is there.... */
Kumar Gala10b35d92005-09-23 14:08:58 -05001159 .cpu_features = CPU_FTRS_8XX,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001160 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001161 .mmu_features = MMU_FTR_TYPE_8xx,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001162 .icache_bsize = 16,
1163 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001164 .platform = "ppc823",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001165 },
1166#endif /* CONFIG_8xx */
1167#ifdef CONFIG_40x
1168 { /* 403GC */
1169 .pvr_mask = 0xffffff00,
1170 .pvr_value = 0x00200200,
1171 .cpu_name = "403GC",
Kumar Gala10b35d92005-09-23 14:08:58 -05001172 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001173 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001174 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001175 .icache_bsize = 16,
1176 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001177 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001178 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001179 },
1180 { /* 403GCX */
1181 .pvr_mask = 0xffffff00,
1182 .pvr_value = 0x00201400,
1183 .cpu_name = "403GCX",
Kumar Gala10b35d92005-09-23 14:08:58 -05001184 .cpu_features = CPU_FTRS_40X,
Paul Mackerras98599012005-10-22 16:51:34 +10001185 .cpu_user_features = PPC_FEATURE_32 |
1186 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001187 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001188 .icache_bsize = 16,
1189 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001190 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001191 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001192 },
1193 { /* 403G ?? */
1194 .pvr_mask = 0xffff0000,
1195 .pvr_value = 0x00200000,
1196 .cpu_name = "403G ??",
Kumar Gala10b35d92005-09-23 14:08:58 -05001197 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001198 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001199 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001200 .icache_bsize = 16,
1201 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001202 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001203 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001204 },
1205 { /* 405GP */
1206 .pvr_mask = 0xffff0000,
1207 .pvr_value = 0x40110000,
1208 .cpu_name = "405GP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001209 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001210 .cpu_user_features = PPC_FEATURE_32 |
1211 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001212 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001213 .icache_bsize = 32,
1214 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001215 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001216 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001217 },
1218 { /* STB 03xxx */
1219 .pvr_mask = 0xffff0000,
1220 .pvr_value = 0x40130000,
1221 .cpu_name = "STB03xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001222 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001223 .cpu_user_features = PPC_FEATURE_32 |
1224 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001225 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001226 .icache_bsize = 32,
1227 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001228 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001229 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001230 },
1231 { /* STB 04xxx */
1232 .pvr_mask = 0xffff0000,
1233 .pvr_value = 0x41810000,
1234 .cpu_name = "STB04xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001235 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001236 .cpu_user_features = PPC_FEATURE_32 |
1237 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001238 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001239 .icache_bsize = 32,
1240 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001241 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001242 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001243 },
1244 { /* NP405L */
1245 .pvr_mask = 0xffff0000,
1246 .pvr_value = 0x41610000,
1247 .cpu_name = "NP405L",
Kumar Gala10b35d92005-09-23 14:08:58 -05001248 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001249 .cpu_user_features = PPC_FEATURE_32 |
1250 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001251 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001252 .icache_bsize = 32,
1253 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001254 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001255 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001256 },
1257 { /* NP4GS3 */
1258 .pvr_mask = 0xffff0000,
1259 .pvr_value = 0x40B10000,
1260 .cpu_name = "NP4GS3",
Kumar Gala10b35d92005-09-23 14:08:58 -05001261 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001262 .cpu_user_features = PPC_FEATURE_32 |
1263 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001264 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001265 .icache_bsize = 32,
1266 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001267 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001268 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001269 },
1270 { /* NP405H */
1271 .pvr_mask = 0xffff0000,
1272 .pvr_value = 0x41410000,
1273 .cpu_name = "NP405H",
Kumar Gala10b35d92005-09-23 14:08:58 -05001274 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001275 .cpu_user_features = PPC_FEATURE_32 |
1276 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001277 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001278 .icache_bsize = 32,
1279 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001280 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001281 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001282 },
1283 { /* 405GPr */
1284 .pvr_mask = 0xffff0000,
1285 .pvr_value = 0x50910000,
1286 .cpu_name = "405GPr",
Kumar Gala10b35d92005-09-23 14:08:58 -05001287 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001288 .cpu_user_features = PPC_FEATURE_32 |
1289 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001290 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001291 .icache_bsize = 32,
1292 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001293 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001294 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001295 },
1296 { /* STBx25xx */
1297 .pvr_mask = 0xffff0000,
1298 .pvr_value = 0x51510000,
1299 .cpu_name = "STBx25xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001300 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001301 .cpu_user_features = PPC_FEATURE_32 |
1302 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001303 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001304 .icache_bsize = 32,
1305 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001306 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001307 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001308 },
1309 { /* 405LP */
1310 .pvr_mask = 0xffff0000,
1311 .pvr_value = 0x41F10000,
1312 .cpu_name = "405LP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001313 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001314 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001315 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001316 .icache_bsize = 32,
1317 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001318 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001319 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001320 },
1321 { /* Xilinx Virtex-II Pro */
Grant C. Likely72646c72006-01-19 01:13:20 -07001322 .pvr_mask = 0xfffff000,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001323 .pvr_value = 0x20010000,
1324 .cpu_name = "Virtex-II Pro",
Kumar Gala10b35d92005-09-23 14:08:58 -05001325 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001326 .cpu_user_features = PPC_FEATURE_32 |
1327 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001328 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001329 .icache_bsize = 32,
1330 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001331 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001332 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001333 },
Grant C. Likely72646c72006-01-19 01:13:20 -07001334 { /* Xilinx Virtex-4 FX */
1335 .pvr_mask = 0xfffff000,
1336 .pvr_value = 0x20011000,
1337 .cpu_name = "Virtex-4 FX",
1338 .cpu_features = CPU_FTRS_40X,
1339 .cpu_user_features = PPC_FEATURE_32 |
1340 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001341 .mmu_features = MMU_FTR_TYPE_40x,
Grant C. Likely72646c72006-01-19 01:13:20 -07001342 .icache_bsize = 32,
1343 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001344 .machine_check = machine_check_4xx,
Peter Bergner838fdb42006-09-14 14:18:38 -05001345 .platform = "ppc405",
Grant C. Likely72646c72006-01-19 01:13:20 -07001346 },
Eugene Suroveginad95d602005-06-07 13:22:09 -07001347 { /* 405EP */
1348 .pvr_mask = 0xffff0000,
1349 .pvr_value = 0x51210000,
1350 .cpu_name = "405EP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001351 .cpu_features = CPU_FTRS_40X,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001352 .cpu_user_features = PPC_FEATURE_32 |
1353 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001354 .mmu_features = MMU_FTR_TYPE_40x,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001355 .icache_bsize = 32,
1356 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001357 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001358 .platform = "ppc405",
Eugene Suroveginad95d602005-06-07 13:22:09 -07001359 },
Stefan Roese5d8476c2007-10-11 22:08:14 +10001360 { /* 405EX */
Stefan Roeseb676d842008-01-15 18:09:15 +11001361 .pvr_mask = 0xffff0004,
1362 .pvr_value = 0x12910004,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001363 .cpu_name = "405EX",
1364 .cpu_features = CPU_FTRS_40X,
1365 .cpu_user_features = PPC_FEATURE_32 |
1366 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001367 .mmu_features = MMU_FTR_TYPE_40x,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001368 .icache_bsize = 32,
1369 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001370 .machine_check = machine_check_4xx,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001371 .platform = "ppc405",
1372 },
Stefan Roeseb676d842008-01-15 18:09:15 +11001373 { /* 405EXr */
1374 .pvr_mask = 0xffff0004,
1375 .pvr_value = 0x12910000,
1376 .cpu_name = "405EXr",
1377 .cpu_features = CPU_FTRS_40X,
1378 .cpu_user_features = PPC_FEATURE_32 |
1379 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001380 .mmu_features = MMU_FTR_TYPE_40x,
Stefan Roeseb676d842008-01-15 18:09:15 +11001381 .icache_bsize = 32,
1382 .dcache_bsize = 32,
1383 .machine_check = machine_check_4xx,
1384 .platform = "ppc405",
1385 },
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001386 {
1387 /* 405EZ */
1388 .pvr_mask = 0xffff0000,
1389 .pvr_value = 0x41510000,
1390 .cpu_name = "405EZ",
1391 .cpu_features = CPU_FTRS_40X,
1392 .cpu_user_features = PPC_FEATURE_32 |
1393 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001394 .mmu_features = MMU_FTR_TYPE_40x,
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001395 .icache_bsize = 32,
1396 .dcache_bsize = 32,
1397 .machine_check = machine_check_4xx,
1398 .platform = "ppc405",
1399 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001400 { /* default match */
1401 .pvr_mask = 0x00000000,
1402 .pvr_value = 0x00000000,
1403 .cpu_name = "(generic 40x PPC)",
1404 .cpu_features = CPU_FTRS_40X,
1405 .cpu_user_features = PPC_FEATURE_32 |
1406 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001407 .mmu_features = MMU_FTR_TYPE_40x,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001408 .icache_bsize = 32,
1409 .dcache_bsize = 32,
1410 .machine_check = machine_check_4xx,
1411 .platform = "ppc405",
1412 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001413
1414#endif /* CONFIG_40x */
1415#ifdef CONFIG_44x
Matt Porterc9cf73a2005-07-31 22:34:52 -07001416 {
1417 .pvr_mask = 0xf0000fff,
1418 .pvr_value = 0x40000850,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001419 .cpu_name = "440GR Rev. A",
1420 .cpu_features = CPU_FTRS_44X,
1421 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001422 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001423 .icache_bsize = 32,
1424 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001425 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001426 .platform = "ppc440",
1427 },
1428 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1429 .pvr_mask = 0xf0000fff,
1430 .pvr_value = 0x40000858,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001431 .cpu_name = "440EP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001432 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001433 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001434 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001435 .icache_bsize = 32,
1436 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001437 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001438 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001439 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001440 },
1441 {
1442 .pvr_mask = 0xf0000fff,
1443 .pvr_value = 0x400008d3,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001444 .cpu_name = "440GR Rev. B",
1445 .cpu_features = CPU_FTRS_44X,
1446 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001447 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001448 .icache_bsize = 32,
1449 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001450 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001451 .platform = "ppc440",
1452 },
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001453 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1454 .pvr_mask = 0xf0000ff7,
1455 .pvr_value = 0x400008d4,
1456 .cpu_name = "440EP Rev. C",
1457 .cpu_features = CPU_FTRS_44X,
1458 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001459 .mmu_features = MMU_FTR_TYPE_44x,
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001460 .icache_bsize = 32,
1461 .dcache_bsize = 32,
1462 .cpu_setup = __setup_cpu_440ep,
1463 .machine_check = machine_check_4xx,
1464 .platform = "ppc440",
1465 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001466 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1467 .pvr_mask = 0xf0000fff,
1468 .pvr_value = 0x400008db,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001469 .cpu_name = "440EP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001470 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001471 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001472 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001473 .icache_bsize = 32,
1474 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001475 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001476 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001477 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001478 },
Valentine Barshak15fc9932007-08-29 17:40:30 +04001479 { /* 440GRX */
1480 .pvr_mask = 0xf0000ffb,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001481 .pvr_value = 0x200008D0,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001482 .cpu_name = "440GRX",
1483 .cpu_features = CPU_FTRS_44X,
1484 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001485 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001486 .icache_bsize = 32,
1487 .dcache_bsize = 32,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001488 .cpu_setup = __setup_cpu_440grx,
Valentine Barshakb2be3b12007-12-22 03:22:23 +11001489 .machine_check = machine_check_440A,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001490 .platform = "ppc440",
Valentine Barshak15fc9932007-08-29 17:40:30 +04001491 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001492 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1493 .pvr_mask = 0xf0000ffb,
1494 .pvr_value = 0x200008D8,
1495 .cpu_name = "440EPX",
1496 .cpu_features = CPU_FTRS_44X,
1497 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001498 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001499 .icache_bsize = 32,
1500 .dcache_bsize = 32,
1501 .cpu_setup = __setup_cpu_440epx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001502 .machine_check = machine_check_440A,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001503 .platform = "ppc440",
1504 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001505 { /* 440GP Rev. B */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001506 .pvr_mask = 0xf0000fff,
1507 .pvr_value = 0x40000440,
1508 .cpu_name = "440GP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001509 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001510 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001511 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001512 .icache_bsize = 32,
1513 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001514 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001515 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001516 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001517 { /* 440GP Rev. C */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001518 .pvr_mask = 0xf0000fff,
1519 .pvr_value = 0x40000481,
1520 .cpu_name = "440GP Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001521 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001522 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001523 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001524 .icache_bsize = 32,
1525 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001526 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001527 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001528 },
1529 { /* 440GX Rev. A */
1530 .pvr_mask = 0xf0000fff,
1531 .pvr_value = 0x50000850,
1532 .cpu_name = "440GX Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001533 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001534 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001535 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001536 .icache_bsize = 32,
1537 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001538 .cpu_setup = __setup_cpu_440gx,
1539 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001540 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001541 },
1542 { /* 440GX Rev. B */
1543 .pvr_mask = 0xf0000fff,
1544 .pvr_value = 0x50000851,
1545 .cpu_name = "440GX Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001546 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001547 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001548 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001549 .icache_bsize = 32,
1550 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001551 .cpu_setup = __setup_cpu_440gx,
1552 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001553 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001554 },
1555 { /* 440GX Rev. C */
1556 .pvr_mask = 0xf0000fff,
1557 .pvr_value = 0x50000892,
1558 .cpu_name = "440GX Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001559 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001560 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001561 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001562 .icache_bsize = 32,
1563 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001564 .cpu_setup = __setup_cpu_440gx,
1565 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001566 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001567 },
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001568 { /* 440GX Rev. F */
1569 .pvr_mask = 0xf0000fff,
1570 .pvr_value = 0x50000894,
1571 .cpu_name = "440GX Rev. F",
Kumar Gala10b35d92005-09-23 14:08:58 -05001572 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001573 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001574 .mmu_features = MMU_FTR_TYPE_44x,
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001575 .icache_bsize = 32,
1576 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001577 .cpu_setup = __setup_cpu_440gx,
1578 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001579 .platform = "ppc440",
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001580 },
Matt Porter656de7e2005-09-03 15:55:42 -07001581 { /* 440SP Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001582 .pvr_mask = 0xfff00fff,
1583 .pvr_value = 0x53200891,
Matt Porter656de7e2005-09-03 15:55:42 -07001584 .cpu_name = "440SP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001585 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001586 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001587 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porter656de7e2005-09-03 15:55:42 -07001588 .icache_bsize = 32,
1589 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001590 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001591 .platform = "ppc440",
Matt Porter656de7e2005-09-03 15:55:42 -07001592 },
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001593 { /* 440SPe Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001594 .pvr_mask = 0xfff00fff,
1595 .pvr_value = 0x53400890,
1596 .cpu_name = "440SPe Rev. A",
1597 .cpu_features = CPU_FTRS_44X,
1598 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001599 .mmu_features = MMU_FTR_TYPE_44x,
Roland Dreier333e6152007-06-16 05:36:32 +10001600 .icache_bsize = 32,
1601 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001602 .cpu_setup = __setup_cpu_440spe,
1603 .machine_check = machine_check_440A,
Roland Dreier333e6152007-06-16 05:36:32 +10001604 .platform = "ppc440",
1605 },
1606 { /* 440SPe Rev. B */
1607 .pvr_mask = 0xfff00fff,
1608 .pvr_value = 0x53400891,
1609 .cpu_name = "440SPe Rev. B",
Kumar Galaa147c582006-12-08 02:34:38 -06001610 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001611 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001612 .mmu_features = MMU_FTR_TYPE_44x,
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001613 .icache_bsize = 32,
1614 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001615 .cpu_setup = __setup_cpu_440spe,
1616 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001617 .platform = "ppc440",
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001618 },
John Linn23e72372008-07-01 09:42:07 -07001619 { /* 440 in Xilinx Virtex-5 FXT */
1620 .pvr_mask = 0xfffffff0,
1621 .pvr_value = 0x7ff21910,
1622 .cpu_name = "440 in Virtex-5 FXT",
1623 .cpu_features = CPU_FTRS_44X,
1624 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001625 .mmu_features = MMU_FTR_TYPE_44x,
John Linn23e72372008-07-01 09:42:07 -07001626 .icache_bsize = 32,
1627 .dcache_bsize = 32,
Grant Likely640d17d2008-12-04 05:39:55 +00001628 .cpu_setup = __setup_cpu_440x5,
1629 .machine_check = machine_check_440A,
John Linn23e72372008-07-01 09:42:07 -07001630 .platform = "ppc440",
1631 },
Stefan Roese464076a2008-02-24 08:07:41 +11001632 { /* 460EX */
1633 .pvr_mask = 0xffff0002,
1634 .pvr_value = 0x13020002,
1635 .cpu_name = "460EX",
Benjamin Herrenschmidt6d2170b2008-12-18 19:13:22 +00001636 .cpu_features = CPU_FTRS_440x6,
Stefan Roese464076a2008-02-24 08:07:41 +11001637 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001638 .mmu_features = MMU_FTR_TYPE_44x,
Stefan Roese464076a2008-02-24 08:07:41 +11001639 .icache_bsize = 32,
1640 .dcache_bsize = 32,
1641 .cpu_setup = __setup_cpu_460ex,
1642 .machine_check = machine_check_440A,
1643 .platform = "ppc440",
1644 },
1645 { /* 460GT */
1646 .pvr_mask = 0xffff0002,
1647 .pvr_value = 0x13020000,
1648 .cpu_name = "460GT",
Benjamin Herrenschmidt6d2170b2008-12-18 19:13:22 +00001649 .cpu_features = CPU_FTRS_440x6,
Josh Boyer939e6222008-06-11 07:52:40 -04001650 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001651 .mmu_features = MMU_FTR_TYPE_44x,
Stefan Roese464076a2008-02-24 08:07:41 +11001652 .icache_bsize = 32,
1653 .dcache_bsize = 32,
Josh Boyer939e6222008-06-11 07:52:40 -04001654 .cpu_setup = __setup_cpu_460gt,
Stefan Roese464076a2008-02-24 08:07:41 +11001655 .machine_check = machine_check_440A,
1656 .platform = "ppc440",
1657 },
Madhulika Madishetty6c712092009-02-05 13:31:36 +00001658 { /* 460SX */
1659 .pvr_mask = 0xffffff00,
1660 .pvr_value = 0x13541800,
1661 .cpu_name = "460SX",
1662 .cpu_features = CPU_FTRS_44X,
1663 .cpu_user_features = COMMON_USER_BOOKE,
1664 .mmu_features = MMU_FTR_TYPE_44x,
1665 .icache_bsize = 32,
1666 .dcache_bsize = 32,
1667 .cpu_setup = __setup_cpu_460sx,
1668 .machine_check = machine_check_440A,
1669 .platform = "ppc440",
1670 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001671 { /* default match */
1672 .pvr_mask = 0x00000000,
1673 .pvr_value = 0x00000000,
1674 .cpu_name = "(generic 44x PPC)",
1675 .cpu_features = CPU_FTRS_44X,
1676 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001677 .mmu_features = MMU_FTR_TYPE_44x,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001678 .icache_bsize = 32,
1679 .dcache_bsize = 32,
1680 .machine_check = machine_check_4xx,
1681 .platform = "ppc440",
1682 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001683#endif /* CONFIG_44x */
Josh Boyere3e414b2007-12-24 08:44:47 -06001684#ifdef CONFIG_E200
Stephen Rothwell49209602005-10-12 15:55:09 +10001685 { /* e200z5 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001686 .pvr_mask = 0xfff00000,
1687 .pvr_value = 0x81000000,
1688 .cpu_name = "e200z5",
1689 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001690 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001691 .cpu_user_features = COMMON_USER_BOOKE |
1692 PPC_FEATURE_HAS_EFP_SINGLE |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001693 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001694 .mmu_features = MMU_FTR_TYPE_FSL_E,
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001695 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001696 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001697 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001698 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001699 { /* e200z6 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001700 .pvr_mask = 0xfff00000,
1701 .pvr_value = 0x81100000,
1702 .cpu_name = "e200z6",
1703 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001704 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001705 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001706 PPC_FEATURE_HAS_SPE_COMP |
1707 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001708 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001709 .mmu_features = MMU_FTR_TYPE_FSL_E,
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001710 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001711 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001712 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001713 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001714 { /* default match */
1715 .pvr_mask = 0x00000000,
1716 .pvr_value = 0x00000000,
1717 .cpu_name = "(generic E200 PPC)",
1718 .cpu_features = CPU_FTRS_E200,
1719 .cpu_user_features = COMMON_USER_BOOKE |
1720 PPC_FEATURE_HAS_EFP_SINGLE |
1721 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001722 .mmu_features = MMU_FTR_TYPE_FSL_E,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001723 .dcache_bsize = 32,
Kumar Gala105c31d2009-01-08 08:31:20 -06001724 .cpu_setup = __setup_cpu_e200,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001725 .machine_check = machine_check_e200,
1726 .platform = "ppc5554",
Paul Mackerras516c8be2008-05-12 14:20:35 +10001727 }
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001728#endif /* CONFIG_E200 */
1729#ifdef CONFIG_E500
Stephen Rothwell49209602005-10-12 15:55:09 +10001730 { /* e500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001731 .pvr_mask = 0xffff0000,
1732 .pvr_value = 0x80200000,
1733 .cpu_name = "e500",
Kumar Gala10b35d92005-09-23 14:08:58 -05001734 .cpu_features = CPU_FTRS_E500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001735 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001736 PPC_FEATURE_HAS_SPE_COMP |
1737 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001738 .mmu_features = MMU_FTR_TYPE_FSL_E,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001739 .icache_bsize = 32,
1740 .dcache_bsize = 32,
1741 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001742 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001743 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06001744 .cpu_setup = __setup_cpu_e500v1,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001745 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001746 .platform = "ppc8540",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001747 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001748 { /* e500v2 */
Kumar Gala5b37b702005-06-21 17:15:18 -07001749 .pvr_mask = 0xffff0000,
1750 .pvr_value = 0x80210000,
1751 .cpu_name = "e500v2",
Kumar Gala10b35d92005-09-23 14:08:58 -05001752 .cpu_features = CPU_FTRS_E500_2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001753 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001754 PPC_FEATURE_HAS_SPE_COMP |
1755 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1756 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001757 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS,
Kumar Gala5b37b702005-06-21 17:15:18 -07001758 .icache_bsize = 32,
1759 .dcache_bsize = 32,
1760 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001761 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001762 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06001763 .cpu_setup = __setup_cpu_e500v2,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001764 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001765 .platform = "ppc8548",
Kumar Gala5b37b702005-06-21 17:15:18 -07001766 },
Kumar Gala3dfa8772008-06-16 09:41:32 -05001767 { /* e500mc */
1768 .pvr_mask = 0xffff0000,
1769 .pvr_value = 0x80230000,
1770 .cpu_name = "e500mc",
Kumar Gala3dfa8772008-06-16 09:41:32 -05001771 .cpu_features = CPU_FTRS_E500MC,
1772 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Kumar Galac3071952009-02-10 22:26:06 -06001773 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
Kumar Gala323d23a2009-04-23 08:51:22 -05001774 MMU_FTR_USE_TLBILX,
Kumar Gala3dfa8772008-06-16 09:41:32 -05001775 .icache_bsize = 64,
1776 .dcache_bsize = 64,
1777 .num_pmcs = 4,
1778 .oprofile_cpu_type = "ppc/e500", /* xxx - galak, e500mc? */
1779 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06001780 .cpu_setup = __setup_cpu_e500mc,
Kumar Gala3dfa8772008-06-16 09:41:32 -05001781 .machine_check = machine_check_e500,
1782 .platform = "ppce500mc",
1783 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001784 { /* default match */
1785 .pvr_mask = 0x00000000,
1786 .pvr_value = 0x00000000,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001787 .cpu_name = "(generic E500 PPC)",
1788 .cpu_features = CPU_FTRS_E500,
1789 .cpu_user_features = COMMON_USER_BOOKE |
1790 PPC_FEATURE_HAS_SPE_COMP |
1791 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001792 .mmu_features = MMU_FTR_TYPE_FSL_E,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001793 .icache_bsize = 32,
1794 .dcache_bsize = 32,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001795 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001796 .platform = "powerpc",
Paul Mackerras516c8be2008-05-12 14:20:35 +10001797 }
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001798#endif /* CONFIG_E500 */
Stephen Rothwell49209602005-10-12 15:55:09 +10001799#endif /* CONFIG_PPC32 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001800};
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001801
Paul Mackerras87a72f92007-10-04 14:18:01 +10001802static struct cpu_spec the_cpu_spec;
1803
Michael Ellerman666435b2009-02-22 16:25:43 +00001804static void __init setup_cpu_spec(unsigned long offset, struct cpu_spec *s)
1805{
1806 struct cpu_spec *t = &the_cpu_spec;
Michael Ellerman2657dd42009-02-22 16:25:45 +00001807 struct cpu_spec old;
1808
Michael Ellerman666435b2009-02-22 16:25:43 +00001809 t = PTRRELOC(t);
Michael Ellerman2657dd42009-02-22 16:25:45 +00001810 old = *t;
1811
1812 /* Copy everything, then do fixups */
1813 *t = *s;
Michael Ellerman666435b2009-02-22 16:25:43 +00001814
1815 /*
1816 * If we are overriding a previous value derived from the real
1817 * PVR with a new value obtained using a logical PVR value,
1818 * don't modify the performance monitor fields.
1819 */
Michael Ellerman2657dd42009-02-22 16:25:45 +00001820 if (old.num_pmcs && !s->num_pmcs) {
1821 t->num_pmcs = old.num_pmcs;
1822 t->pmc_type = old.pmc_type;
1823 t->oprofile_type = old.oprofile_type;
1824 t->oprofile_mmcra_sihv = old.oprofile_mmcra_sihv;
1825 t->oprofile_mmcra_sipr = old.oprofile_mmcra_sipr;
1826 t->oprofile_mmcra_clear = old.oprofile_mmcra_clear;
1827
Michael Ellerman666435b2009-02-22 16:25:43 +00001828 /*
1829 * If we have passed through this logic once before and
1830 * have pulled the default case because the real PVR was
1831 * not found inside cpu_specs[], then we are possibly
1832 * running in compatibility mode. In that case, let the
1833 * oprofiler know which set of compatibility counters to
1834 * pull from by making sure the oprofile_cpu_type string
1835 * is set to that of compatibility mode. If the
1836 * oprofile_cpu_type already has a value, then we are
1837 * possibly overriding a real PVR with a logical one,
1838 * and, in that case, keep the current value for
1839 * oprofile_cpu_type.
1840 */
Benjamin Herrenschmidtb173f032009-05-14 18:34:06 +00001841 if (old.oprofile_cpu_type != NULL) {
Benjamin Herrenschmidt0203d6e2009-04-29 19:39:38 +00001842 t->oprofile_cpu_type = old.oprofile_cpu_type;
1843 t->oprofile_type = old.oprofile_type;
Michael Wolf79af6c42009-04-27 06:17:54 +00001844 }
Michael Ellerman2657dd42009-02-22 16:25:45 +00001845 }
Michael Ellerman666435b2009-02-22 16:25:43 +00001846
1847 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
1848
1849 /*
1850 * Set the base platform string once; assumes
1851 * we're called with real pvr first.
1852 */
1853 if (*PTRRELOC(&powerpc_base_platform) == NULL)
1854 *PTRRELOC(&powerpc_base_platform) = t->platform;
1855
1856#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
1857 /* ppc64 and booke expect identify_cpu to also call setup_cpu for
1858 * that processor. I will consolidate that at a later time, for now,
1859 * just use #ifdef. We also don't need to PTRRELOC the function
1860 * pointer on ppc64 and booke as we are running at 0 in real mode
1861 * on ppc64 and reloc_offset is always 0 on booke.
1862 */
1863 if (s->cpu_setup) {
1864 s->cpu_setup(offset, s);
1865 }
1866#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
1867}
1868
Paul Mackerras87a72f92007-10-04 14:18:01 +10001869struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001870{
1871 struct cpu_spec *s = cpu_specs;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001872 int i;
1873
1874 s = PTRRELOC(s);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001875
Michael Ellerman666435b2009-02-22 16:25:43 +00001876 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) {
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001877 if ((pvr & s->pvr_mask) == s->pvr_value) {
Michael Ellerman666435b2009-02-22 16:25:43 +00001878 setup_cpu_spec(offset, s);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001879 return s;
1880 }
Michael Ellerman666435b2009-02-22 16:25:43 +00001881 }
1882
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001883 BUG();
Michael Ellerman666435b2009-02-22 16:25:43 +00001884
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001885 return NULL;
1886}