blob: f9c40f869c6e8088abd17d01213377fe5538f985 [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,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000430 .mmu_features = MMU_FTR_HPTE_TABLE,
Joel Schopp635f5a62008-06-19 06:18:21 +1000431 .icache_bsize = 128,
432 .dcache_bsize = 128,
433 .machine_check = machine_check_generic,
Michael Wolf79af6c42009-04-27 06:17:54 +0000434 .oprofile_type = PPC_OPROFILE_POWER4,
435 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
Joel Schopp635f5a62008-06-19 06:18:21 +1000436 .platform = "power7",
437 },
Michael Neulinge952e6c2008-06-18 10:47:26 +1000438 { /* Power7 */
439 .pvr_mask = 0xffff0000,
440 .pvr_value = 0x003f0000,
Joel Schopp635f5a62008-06-19 06:18:21 +1000441 .cpu_name = "POWER7 (raw)",
Michael Neulinge952e6c2008-06-18 10:47:26 +1000442 .cpu_features = CPU_FTRS_POWER7,
443 .cpu_user_features = COMMON_USER_POWER7,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000444 .mmu_features = MMU_FTR_HPTE_TABLE,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000445 .icache_bsize = 128,
446 .dcache_bsize = 128,
447 .num_pmcs = 6,
448 .pmc_type = PPC_PMC_IBM,
449 .cpu_setup = __setup_cpu_power7,
450 .cpu_restore = __restore_cpu_power7,
451 .oprofile_cpu_type = "ppc64/power7",
452 .oprofile_type = PPC_OPROFILE_POWER4,
453 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
454 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
455 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
456 POWER6_MMCRA_OTHER,
457 .platform = "power7",
458 },
Arnd Bergmannc902be72006-01-04 19:55:53 +0000459 { /* Cell Broadband Engine */
Stephen Rothwell49209602005-10-12 15:55:09 +1000460 .pvr_mask = 0xffff0000,
461 .pvr_value = 0x00700000,
462 .cpu_name = "Cell Broadband Engine",
463 .cpu_features = CPU_FTRS_CELL,
464 .cpu_user_features = COMMON_USER_PPC64 |
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +1100465 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
466 PPC_FEATURE_SMT,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000467 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000468 .icache_bsize = 128,
469 .dcache_bsize = 128,
Maynard Johnson18f21902006-11-20 18:45:16 +0100470 .num_pmcs = 4,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600471 .pmc_type = PPC_PMC_IBM,
Maynard Johnson18f21902006-11-20 18:45:16 +0100472 .oprofile_cpu_type = "ppc64/cell-be",
473 .oprofile_type = PPC_OPROFILE_CELL,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100474 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100475 .platform = "ppc-cell-be",
Stephen Rothwell49209602005-10-12 15:55:09 +1000476 },
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500477 { /* PA Semi PA6T */
478 .pvr_mask = 0x7fff0000,
479 .pvr_value = 0x00900000,
480 .cpu_name = "PA6T",
481 .cpu_features = CPU_FTRS_PA6T,
482 .cpu_user_features = COMMON_USER_PA6T,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000483 .mmu_features = MMU_FTR_HPTE_TABLE,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500484 .icache_bsize = 64,
485 .dcache_bsize = 64,
486 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600487 .pmc_type = PPC_PMC_PA6T,
Olof Johansson11999192007-02-04 16:36:51 -0600488 .cpu_setup = __setup_cpu_pa6t,
489 .cpu_restore = __restore_cpu_pa6t,
Olof Johansson25fc5302007-04-18 16:38:21 +1000490 .oprofile_cpu_type = "ppc64/pa6t",
491 .oprofile_type = PPC_OPROFILE_PA6T,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100492 .machine_check = machine_check_generic,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500493 .platform = "pa6t",
494 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000495 { /* default match */
496 .pvr_mask = 0x00000000,
497 .pvr_value = 0x00000000,
498 .cpu_name = "POWER4 (compatible)",
499 .cpu_features = CPU_FTRS_COMPATIBLE,
500 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000501 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000502 .icache_bsize = 128,
503 .dcache_bsize = 128,
504 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600505 .pmc_type = PPC_PMC_IBM,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100506 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100507 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000508 }
509#endif /* CONFIG_PPC64 */
510#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -0700511#if CLASSIC_PPC
Stephen Rothwell49209602005-10-12 15:55:09 +1000512 { /* 601 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700513 .pvr_mask = 0xffff0000,
514 .pvr_value = 0x00010000,
515 .cpu_name = "601",
Kumar Gala10b35d92005-09-23 14:08:58 -0500516 .cpu_features = CPU_FTRS_PPC601,
Stephen Rothwell49209602005-10-12 15:55:09 +1000517 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
Paul Mackerras98599012005-10-22 16:51:34 +1000518 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000519 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700520 .icache_bsize = 32,
521 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100522 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100523 .platform = "ppc601",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700524 },
525 { /* 603 */
526 .pvr_mask = 0xffff0000,
527 .pvr_value = 0x00030000,
528 .cpu_name = "603",
Kumar Gala10b35d92005-09-23 14:08:58 -0500529 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000530 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000531 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700532 .icache_bsize = 32,
533 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100534 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100535 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100536 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700537 },
538 { /* 603e */
539 .pvr_mask = 0xffff0000,
540 .pvr_value = 0x00060000,
541 .cpu_name = "603e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500542 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000543 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000544 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700545 .icache_bsize = 32,
546 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100547 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100548 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100549 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700550 },
551 { /* 603ev */
552 .pvr_mask = 0xffff0000,
553 .pvr_value = 0x00070000,
554 .cpu_name = "603ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500555 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000556 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000557 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700558 .icache_bsize = 32,
559 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100560 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100561 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100562 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700563 },
564 { /* 604 */
565 .pvr_mask = 0xffff0000,
566 .pvr_value = 0x00040000,
567 .cpu_name = "604",
Kumar Gala10b35d92005-09-23 14:08:58 -0500568 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000569 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000570 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700571 .icache_bsize = 32,
572 .dcache_bsize = 32,
573 .num_pmcs = 2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100574 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100575 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100576 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700577 },
578 { /* 604e */
579 .pvr_mask = 0xfffff000,
580 .pvr_value = 0x00090000,
581 .cpu_name = "604e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500582 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000583 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000584 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700585 .icache_bsize = 32,
586 .dcache_bsize = 32,
587 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100588 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100589 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100590 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700591 },
592 { /* 604r */
593 .pvr_mask = 0xffff0000,
594 .pvr_value = 0x00090000,
595 .cpu_name = "604r",
Kumar Gala10b35d92005-09-23 14:08:58 -0500596 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000597 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000598 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700599 .icache_bsize = 32,
600 .dcache_bsize = 32,
601 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100602 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100603 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100604 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700605 },
606 { /* 604ev */
607 .pvr_mask = 0xffff0000,
608 .pvr_value = 0x000a0000,
609 .cpu_name = "604ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500610 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000611 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000612 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700613 .icache_bsize = 32,
614 .dcache_bsize = 32,
615 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100616 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100617 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100618 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700619 },
620 { /* 740/750 (0x4202, don't support TAU ?) */
621 .pvr_mask = 0xffffffff,
622 .pvr_value = 0x00084202,
623 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500624 .cpu_features = CPU_FTRS_740_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000625 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000626 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700627 .icache_bsize = 32,
628 .dcache_bsize = 32,
629 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100630 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100631 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100632 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700633 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700634 { /* 750CX (80100 and 8010x?) */
635 .pvr_mask = 0xfffffff0,
636 .pvr_value = 0x00080100,
637 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500638 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000639 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000640 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700641 .icache_bsize = 32,
642 .dcache_bsize = 32,
643 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100644 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100645 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100646 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700647 },
648 { /* 750CX (82201 and 82202) */
649 .pvr_mask = 0xfffffff0,
650 .pvr_value = 0x00082200,
651 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500652 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000653 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000654 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700655 .icache_bsize = 32,
656 .dcache_bsize = 32,
657 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000658 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100659 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100660 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100661 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700662 },
663 { /* 750CXe (82214) */
664 .pvr_mask = 0xfffffff0,
665 .pvr_value = 0x00082210,
666 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500667 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000668 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000669 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700670 .icache_bsize = 32,
671 .dcache_bsize = 32,
672 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000673 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100674 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100675 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100676 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700677 },
Arthur Othieno7c316252005-09-03 15:55:52 -0700678 { /* 750CXe "Gekko" (83214) */
679 .pvr_mask = 0xffffffff,
680 .pvr_value = 0x00083214,
681 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500682 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000683 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000684 .mmu_features = MMU_FTR_HPTE_TABLE,
Arthur Othieno7c316252005-09-03 15:55:52 -0700685 .icache_bsize = 32,
686 .dcache_bsize = 32,
687 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000688 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100689 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100690 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100691 .platform = "ppc750",
Arthur Othieno7c316252005-09-03 15:55:52 -0700692 },
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500693 { /* 750CL */
694 .pvr_mask = 0xfffff0f0,
695 .pvr_value = 0x00087010,
696 .cpu_name = "750CL",
Josh Boyera14c4502007-04-13 04:33:25 +1000697 .cpu_features = CPU_FTRS_750CL,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500698 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000699 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500700 .icache_bsize = 32,
701 .dcache_bsize = 32,
702 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000703 .pmc_type = PPC_PMC_IBM,
Josh Boyera14c4502007-04-13 04:33:25 +1000704 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100705 .machine_check = machine_check_generic,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500706 .platform = "ppc750",
707 },
Arthur Othienoac1ff042005-09-03 15:55:51 -0700708 { /* 745/755 */
709 .pvr_mask = 0xfffff000,
710 .pvr_value = 0x00083000,
711 .cpu_name = "745/755",
Kumar Gala10b35d92005-09-23 14:08:58 -0500712 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000713 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000714 .mmu_features = MMU_FTR_HPTE_TABLE,
Arthur Othienoac1ff042005-09-03 15:55:51 -0700715 .icache_bsize = 32,
716 .dcache_bsize = 32,
717 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000718 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100719 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100720 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100721 .platform = "ppc750",
Arthur Othienoac1ff042005-09-03 15:55:51 -0700722 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700723 { /* 750FX rev 1.x */
724 .pvr_mask = 0xffffff00,
725 .pvr_value = 0x70000100,
726 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500727 .cpu_features = CPU_FTRS_750FX1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000728 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000729 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700730 .icache_bsize = 32,
731 .dcache_bsize = 32,
732 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000733 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100734 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100735 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100736 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000737 .oprofile_cpu_type = "ppc/750",
738 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700739 },
740 { /* 750FX rev 2.0 must disable HID0[DPM] */
741 .pvr_mask = 0xffffffff,
742 .pvr_value = 0x70000200,
743 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500744 .cpu_features = CPU_FTRS_750FX2,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000745 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000746 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700747 .icache_bsize = 32,
748 .dcache_bsize = 32,
749 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000750 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100751 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100752 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100753 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000754 .oprofile_cpu_type = "ppc/750",
755 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700756 },
757 { /* 750FX (All revs except 2.0) */
758 .pvr_mask = 0xffff0000,
759 .pvr_value = 0x70000000,
760 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500761 .cpu_features = CPU_FTRS_750FX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000762 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000763 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700764 .icache_bsize = 32,
765 .dcache_bsize = 32,
766 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000767 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100768 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100769 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100770 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000771 .oprofile_cpu_type = "ppc/750",
772 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700773 },
774 { /* 750GX */
775 .pvr_mask = 0xffff0000,
776 .pvr_value = 0x70020000,
777 .cpu_name = "750GX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500778 .cpu_features = CPU_FTRS_750GX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000779 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000780 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700781 .icache_bsize = 32,
782 .dcache_bsize = 32,
783 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000784 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100785 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100786 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100787 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000788 .oprofile_cpu_type = "ppc/750",
789 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700790 },
791 { /* 740/750 (L2CR bit need fixup for 740) */
792 .pvr_mask = 0xffff0000,
793 .pvr_value = 0x00080000,
794 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500795 .cpu_features = CPU_FTRS_740,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000796 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000797 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700798 .icache_bsize = 32,
799 .dcache_bsize = 32,
800 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000801 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100802 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100803 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100804 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700805 },
806 { /* 7400 rev 1.1 ? (no TAU) */
807 .pvr_mask = 0xffffffff,
808 .pvr_value = 0x000c1101,
809 .cpu_name = "7400 (1.1)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500810 .cpu_features = CPU_FTRS_7400_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000811 .cpu_user_features = COMMON_USER |
812 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000813 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700814 .icache_bsize = 32,
815 .dcache_bsize = 32,
816 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000817 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100818 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100819 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100820 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700821 },
822 { /* 7400 */
823 .pvr_mask = 0xffff0000,
824 .pvr_value = 0x000c0000,
825 .cpu_name = "7400",
Kumar Gala10b35d92005-09-23 14:08:58 -0500826 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000827 .cpu_user_features = COMMON_USER |
828 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000829 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700830 .icache_bsize = 32,
831 .dcache_bsize = 32,
832 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000833 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100834 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100835 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100836 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700837 },
838 { /* 7410 */
839 .pvr_mask = 0xffff0000,
840 .pvr_value = 0x800c0000,
841 .cpu_name = "7410",
Kumar Gala10b35d92005-09-23 14:08:58 -0500842 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000843 .cpu_user_features = COMMON_USER |
844 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000845 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700846 .icache_bsize = 32,
847 .dcache_bsize = 32,
848 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000849 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100850 .cpu_setup = __setup_cpu_7410,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100851 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100852 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700853 },
854 { /* 7450 2.0 - no doze/nap */
855 .pvr_mask = 0xffffffff,
856 .pvr_value = 0x80000200,
857 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500858 .cpu_features = CPU_FTRS_7450_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000859 .cpu_user_features = COMMON_USER |
860 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000861 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700862 .icache_bsize = 32,
863 .dcache_bsize = 32,
864 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000865 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600866 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600867 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000868 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100869 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100870 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700871 },
872 { /* 7450 2.1 */
873 .pvr_mask = 0xffffffff,
874 .pvr_value = 0x80000201,
875 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500876 .cpu_features = CPU_FTRS_7450_21,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000877 .cpu_user_features = COMMON_USER |
878 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000879 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700880 .icache_bsize = 32,
881 .dcache_bsize = 32,
882 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000883 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600884 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600885 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000886 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100887 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100888 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700889 },
890 { /* 7450 2.3 and newer */
891 .pvr_mask = 0xffff0000,
892 .pvr_value = 0x80000000,
893 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500894 .cpu_features = CPU_FTRS_7450_23,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000895 .cpu_user_features = COMMON_USER |
896 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000897 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700898 .icache_bsize = 32,
899 .dcache_bsize = 32,
900 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000901 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600902 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600903 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000904 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100905 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100906 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700907 },
908 { /* 7455 rev 1.x */
909 .pvr_mask = 0xffffff00,
910 .pvr_value = 0x80010100,
911 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500912 .cpu_features = CPU_FTRS_7455_1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000913 .cpu_user_features = COMMON_USER |
914 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000915 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700916 .icache_bsize = 32,
917 .dcache_bsize = 32,
918 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000919 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600920 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600921 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000922 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100923 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100924 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700925 },
926 { /* 7455 rev 2.0 */
927 .pvr_mask = 0xffffffff,
928 .pvr_value = 0x80010200,
929 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500930 .cpu_features = CPU_FTRS_7455_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000931 .cpu_user_features = COMMON_USER |
932 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000933 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700934 .icache_bsize = 32,
935 .dcache_bsize = 32,
936 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000937 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600938 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600939 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000940 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100941 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100942 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700943 },
944 { /* 7455 others */
945 .pvr_mask = 0xffff0000,
946 .pvr_value = 0x80010000,
947 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500948 .cpu_features = CPU_FTRS_7455,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000949 .cpu_user_features = COMMON_USER |
950 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000951 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700952 .icache_bsize = 32,
953 .dcache_bsize = 32,
954 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000955 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600956 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600957 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000958 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100959 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100960 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700961 },
962 { /* 7447/7457 Rev 1.0 */
963 .pvr_mask = 0xffffffff,
964 .pvr_value = 0x80020100,
965 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500966 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000967 .cpu_user_features = COMMON_USER |
968 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000969 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700970 .icache_bsize = 32,
971 .dcache_bsize = 32,
972 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000973 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600974 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600975 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000976 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100977 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100978 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700979 },
980 { /* 7447/7457 Rev 1.1 */
981 .pvr_mask = 0xffffffff,
982 .pvr_value = 0x80020101,
983 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500984 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000985 .cpu_user_features = COMMON_USER |
986 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000987 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700988 .icache_bsize = 32,
989 .dcache_bsize = 32,
990 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000991 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600992 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600993 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000994 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100995 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100996 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700997 },
998 { /* 7447/7457 Rev 1.2 and later */
999 .pvr_mask = 0xffff0000,
1000 .pvr_value = 0x80020000,
1001 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -05001002 .cpu_features = CPU_FTRS_7447,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001003 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001004 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001005 .icache_bsize = 32,
1006 .dcache_bsize = 32,
1007 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001008 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001009 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001010 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001011 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001012 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001013 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001014 },
1015 { /* 7447A */
1016 .pvr_mask = 0xffff0000,
1017 .pvr_value = 0x80030000,
1018 .cpu_name = "7447A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001019 .cpu_features = CPU_FTRS_7447A,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001020 .cpu_user_features = COMMON_USER |
1021 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001022 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001023 .icache_bsize = 32,
1024 .dcache_bsize = 32,
1025 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001026 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001027 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001028 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001029 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001030 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001031 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001032 },
Kumar Galabbde6302005-09-03 15:55:55 -07001033 { /* 7448 */
1034 .pvr_mask = 0xffff0000,
1035 .pvr_value = 0x80040000,
1036 .cpu_name = "7448",
James.Yang3d372542007-05-02 16:34:43 -05001037 .cpu_features = CPU_FTRS_7448,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001038 .cpu_user_features = COMMON_USER |
1039 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001040 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Kumar Galabbde6302005-09-03 15:55:55 -07001041 .icache_bsize = 32,
1042 .dcache_bsize = 32,
1043 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001044 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001045 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001046 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001047 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001048 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001049 .platform = "ppc7450",
Kumar Galabbde6302005-09-03 15:55:55 -07001050 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001051 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
1052 .pvr_mask = 0x7fff0000,
1053 .pvr_value = 0x00810000,
1054 .cpu_name = "82xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001055 .cpu_features = CPU_FTRS_82XX,
Stephen Rothwell49209602005-10-12 15:55:09 +10001056 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001057 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001058 .icache_bsize = 32,
1059 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001060 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001061 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001062 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001063 },
1064 { /* All G2_LE (603e core, plus some) have the same pvr */
1065 .pvr_mask = 0x7fff0000,
1066 .pvr_value = 0x00820000,
1067 .cpu_name = "G2_LE",
Kumar Gala10b35d92005-09-23 14:08:58 -05001068 .cpu_features = CPU_FTRS_G2_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +10001069 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001070 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001071 .icache_bsize = 32,
1072 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001073 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001074 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001075 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001076 },
Kim Phillips6c4a2502006-10-02 20:10:24 -05001077 { /* e300c1 (a 603e core, plus some) on 83xx */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001078 .pvr_mask = 0x7fff0000,
1079 .pvr_value = 0x00830000,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001080 .cpu_name = "e300c1",
Kumar Gala10b35d92005-09-23 14:08:58 -05001081 .cpu_features = CPU_FTRS_E300,
Stephen Rothwell49209602005-10-12 15:55:09 +10001082 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001083 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001084 .icache_bsize = 32,
1085 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001086 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001087 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001088 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001089 },
Kim Phillips6c4a2502006-10-02 20:10:24 -05001090 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
1091 .pvr_mask = 0x7fff0000,
1092 .pvr_value = 0x00840000,
1093 .cpu_name = "e300c2",
Kim Phillipsaa42c692006-12-08 02:43:30 -06001094 .cpu_features = CPU_FTRS_E300C2,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001095 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Kumar Gala2319f122009-03-19 03:55:41 +00001096 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1097 MMU_FTR_NEED_DTLB_SW_LRU,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001098 .icache_bsize = 32,
1099 .dcache_bsize = 32,
1100 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001101 .machine_check = machine_check_generic,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001102 .platform = "ppc603",
1103 },
Li Yanga58d5242007-10-19 19:38:42 +08001104 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
Scott Wood57933f82006-12-01 12:57:05 -06001105 .pvr_mask = 0x7fff0000,
1106 .pvr_value = 0x00850000,
1107 .cpu_name = "e300c3",
1108 .cpu_features = CPU_FTRS_E300,
1109 .cpu_user_features = COMMON_USER,
Kumar Gala2319f122009-03-19 03:55:41 +00001110 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1111 MMU_FTR_NEED_DTLB_SW_LRU,
Scott Wood57933f82006-12-01 12:57:05 -06001112 .icache_bsize = 32,
1113 .dcache_bsize = 32,
1114 .cpu_setup = __setup_cpu_603,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001115 .num_pmcs = 4,
1116 .oprofile_cpu_type = "ppc/e300",
1117 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Scott Wood57933f82006-12-01 12:57:05 -06001118 .platform = "ppc603",
1119 },
Li Yanga58d5242007-10-19 19:38:42 +08001120 { /* e300c4 (e300c1, plus one IU) */
1121 .pvr_mask = 0x7fff0000,
1122 .pvr_value = 0x00860000,
1123 .cpu_name = "e300c4",
1124 .cpu_features = CPU_FTRS_E300,
1125 .cpu_user_features = COMMON_USER,
Kumar Gala2319f122009-03-19 03:55:41 +00001126 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1127 MMU_FTR_NEED_DTLB_SW_LRU,
Li Yanga58d5242007-10-19 19:38:42 +08001128 .icache_bsize = 32,
1129 .dcache_bsize = 32,
1130 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001131 .machine_check = machine_check_generic,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001132 .num_pmcs = 4,
1133 .oprofile_cpu_type = "ppc/e300",
1134 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Li Yanga58d5242007-10-19 19:38:42 +08001135 .platform = "ppc603",
1136 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001137 { /* default match, we assume split I/D cache & TB (non-601)... */
1138 .pvr_mask = 0x00000000,
1139 .pvr_value = 0x00000000,
1140 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -05001141 .cpu_features = CPU_FTRS_CLASSIC32,
Stephen Rothwell49209602005-10-12 15:55:09 +10001142 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001143 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001144 .icache_bsize = 32,
1145 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001146 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001147 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001148 },
1149#endif /* CLASSIC_PPC */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001150#ifdef CONFIG_8xx
1151 { /* 8xx */
1152 .pvr_mask = 0xffff0000,
1153 .pvr_value = 0x00500000,
1154 .cpu_name = "8xx",
1155 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1156 * if the 8xx code is there.... */
Kumar Gala10b35d92005-09-23 14:08:58 -05001157 .cpu_features = CPU_FTRS_8XX,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001158 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001159 .mmu_features = MMU_FTR_TYPE_8xx,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001160 .icache_bsize = 16,
1161 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001162 .platform = "ppc823",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001163 },
1164#endif /* CONFIG_8xx */
1165#ifdef CONFIG_40x
1166 { /* 403GC */
1167 .pvr_mask = 0xffffff00,
1168 .pvr_value = 0x00200200,
1169 .cpu_name = "403GC",
Kumar Gala10b35d92005-09-23 14:08:58 -05001170 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001171 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001172 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001173 .icache_bsize = 16,
1174 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001175 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001176 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001177 },
1178 { /* 403GCX */
1179 .pvr_mask = 0xffffff00,
1180 .pvr_value = 0x00201400,
1181 .cpu_name = "403GCX",
Kumar Gala10b35d92005-09-23 14:08:58 -05001182 .cpu_features = CPU_FTRS_40X,
Paul Mackerras98599012005-10-22 16:51:34 +10001183 .cpu_user_features = PPC_FEATURE_32 |
1184 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001185 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001186 .icache_bsize = 16,
1187 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001188 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001189 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001190 },
1191 { /* 403G ?? */
1192 .pvr_mask = 0xffff0000,
1193 .pvr_value = 0x00200000,
1194 .cpu_name = "403G ??",
Kumar Gala10b35d92005-09-23 14:08:58 -05001195 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001196 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001197 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001198 .icache_bsize = 16,
1199 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001200 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001201 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001202 },
1203 { /* 405GP */
1204 .pvr_mask = 0xffff0000,
1205 .pvr_value = 0x40110000,
1206 .cpu_name = "405GP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001207 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001208 .cpu_user_features = PPC_FEATURE_32 |
1209 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001210 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001211 .icache_bsize = 32,
1212 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001213 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001214 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001215 },
1216 { /* STB 03xxx */
1217 .pvr_mask = 0xffff0000,
1218 .pvr_value = 0x40130000,
1219 .cpu_name = "STB03xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001220 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001221 .cpu_user_features = PPC_FEATURE_32 |
1222 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001223 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001224 .icache_bsize = 32,
1225 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001226 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001227 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001228 },
1229 { /* STB 04xxx */
1230 .pvr_mask = 0xffff0000,
1231 .pvr_value = 0x41810000,
1232 .cpu_name = "STB04xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001233 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001234 .cpu_user_features = PPC_FEATURE_32 |
1235 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001236 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001237 .icache_bsize = 32,
1238 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001239 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001240 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001241 },
1242 { /* NP405L */
1243 .pvr_mask = 0xffff0000,
1244 .pvr_value = 0x41610000,
1245 .cpu_name = "NP405L",
Kumar Gala10b35d92005-09-23 14:08:58 -05001246 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001247 .cpu_user_features = PPC_FEATURE_32 |
1248 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001249 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001250 .icache_bsize = 32,
1251 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001252 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001253 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001254 },
1255 { /* NP4GS3 */
1256 .pvr_mask = 0xffff0000,
1257 .pvr_value = 0x40B10000,
1258 .cpu_name = "NP4GS3",
Kumar Gala10b35d92005-09-23 14:08:58 -05001259 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001260 .cpu_user_features = PPC_FEATURE_32 |
1261 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001262 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001263 .icache_bsize = 32,
1264 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001265 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001266 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001267 },
1268 { /* NP405H */
1269 .pvr_mask = 0xffff0000,
1270 .pvr_value = 0x41410000,
1271 .cpu_name = "NP405H",
Kumar Gala10b35d92005-09-23 14:08:58 -05001272 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001273 .cpu_user_features = PPC_FEATURE_32 |
1274 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001275 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001276 .icache_bsize = 32,
1277 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001278 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001279 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001280 },
1281 { /* 405GPr */
1282 .pvr_mask = 0xffff0000,
1283 .pvr_value = 0x50910000,
1284 .cpu_name = "405GPr",
Kumar Gala10b35d92005-09-23 14:08:58 -05001285 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001286 .cpu_user_features = PPC_FEATURE_32 |
1287 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001288 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001289 .icache_bsize = 32,
1290 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001291 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001292 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001293 },
1294 { /* STBx25xx */
1295 .pvr_mask = 0xffff0000,
1296 .pvr_value = 0x51510000,
1297 .cpu_name = "STBx25xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001298 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001299 .cpu_user_features = PPC_FEATURE_32 |
1300 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001301 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001302 .icache_bsize = 32,
1303 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001304 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001305 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001306 },
1307 { /* 405LP */
1308 .pvr_mask = 0xffff0000,
1309 .pvr_value = 0x41F10000,
1310 .cpu_name = "405LP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001311 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001312 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001313 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001314 .icache_bsize = 32,
1315 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001316 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001317 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001318 },
1319 { /* Xilinx Virtex-II Pro */
Grant C. Likely72646c72006-01-19 01:13:20 -07001320 .pvr_mask = 0xfffff000,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001321 .pvr_value = 0x20010000,
1322 .cpu_name = "Virtex-II Pro",
Kumar Gala10b35d92005-09-23 14:08:58 -05001323 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001324 .cpu_user_features = PPC_FEATURE_32 |
1325 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001326 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001327 .icache_bsize = 32,
1328 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001329 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001330 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001331 },
Grant C. Likely72646c72006-01-19 01:13:20 -07001332 { /* Xilinx Virtex-4 FX */
1333 .pvr_mask = 0xfffff000,
1334 .pvr_value = 0x20011000,
1335 .cpu_name = "Virtex-4 FX",
1336 .cpu_features = CPU_FTRS_40X,
1337 .cpu_user_features = PPC_FEATURE_32 |
1338 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001339 .mmu_features = MMU_FTR_TYPE_40x,
Grant C. Likely72646c72006-01-19 01:13:20 -07001340 .icache_bsize = 32,
1341 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001342 .machine_check = machine_check_4xx,
Peter Bergner838fdb42006-09-14 14:18:38 -05001343 .platform = "ppc405",
Grant C. Likely72646c72006-01-19 01:13:20 -07001344 },
Eugene Suroveginad95d602005-06-07 13:22:09 -07001345 { /* 405EP */
1346 .pvr_mask = 0xffff0000,
1347 .pvr_value = 0x51210000,
1348 .cpu_name = "405EP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001349 .cpu_features = CPU_FTRS_40X,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001350 .cpu_user_features = PPC_FEATURE_32 |
1351 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001352 .mmu_features = MMU_FTR_TYPE_40x,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001353 .icache_bsize = 32,
1354 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001355 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001356 .platform = "ppc405",
Eugene Suroveginad95d602005-06-07 13:22:09 -07001357 },
Stefan Roese5d8476c2007-10-11 22:08:14 +10001358 { /* 405EX */
Stefan Roeseb676d842008-01-15 18:09:15 +11001359 .pvr_mask = 0xffff0004,
1360 .pvr_value = 0x12910004,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001361 .cpu_name = "405EX",
1362 .cpu_features = CPU_FTRS_40X,
1363 .cpu_user_features = PPC_FEATURE_32 |
1364 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001365 .mmu_features = MMU_FTR_TYPE_40x,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001366 .icache_bsize = 32,
1367 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001368 .machine_check = machine_check_4xx,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001369 .platform = "ppc405",
1370 },
Stefan Roeseb676d842008-01-15 18:09:15 +11001371 { /* 405EXr */
1372 .pvr_mask = 0xffff0004,
1373 .pvr_value = 0x12910000,
1374 .cpu_name = "405EXr",
1375 .cpu_features = CPU_FTRS_40X,
1376 .cpu_user_features = PPC_FEATURE_32 |
1377 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001378 .mmu_features = MMU_FTR_TYPE_40x,
Stefan Roeseb676d842008-01-15 18:09:15 +11001379 .icache_bsize = 32,
1380 .dcache_bsize = 32,
1381 .machine_check = machine_check_4xx,
1382 .platform = "ppc405",
1383 },
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001384 {
1385 /* 405EZ */
1386 .pvr_mask = 0xffff0000,
1387 .pvr_value = 0x41510000,
1388 .cpu_name = "405EZ",
1389 .cpu_features = CPU_FTRS_40X,
1390 .cpu_user_features = PPC_FEATURE_32 |
1391 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001392 .mmu_features = MMU_FTR_TYPE_40x,
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001393 .icache_bsize = 32,
1394 .dcache_bsize = 32,
1395 .machine_check = machine_check_4xx,
1396 .platform = "ppc405",
1397 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001398 { /* default match */
1399 .pvr_mask = 0x00000000,
1400 .pvr_value = 0x00000000,
1401 .cpu_name = "(generic 40x PPC)",
1402 .cpu_features = CPU_FTRS_40X,
1403 .cpu_user_features = PPC_FEATURE_32 |
1404 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001405 .mmu_features = MMU_FTR_TYPE_40x,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001406 .icache_bsize = 32,
1407 .dcache_bsize = 32,
1408 .machine_check = machine_check_4xx,
1409 .platform = "ppc405",
1410 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001411
1412#endif /* CONFIG_40x */
1413#ifdef CONFIG_44x
Matt Porterc9cf73a2005-07-31 22:34:52 -07001414 {
1415 .pvr_mask = 0xf0000fff,
1416 .pvr_value = 0x40000850,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001417 .cpu_name = "440GR Rev. A",
1418 .cpu_features = CPU_FTRS_44X,
1419 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001420 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001421 .icache_bsize = 32,
1422 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001423 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001424 .platform = "ppc440",
1425 },
1426 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1427 .pvr_mask = 0xf0000fff,
1428 .pvr_value = 0x40000858,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001429 .cpu_name = "440EP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001430 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001431 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001432 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001433 .icache_bsize = 32,
1434 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001435 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001436 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001437 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001438 },
1439 {
1440 .pvr_mask = 0xf0000fff,
1441 .pvr_value = 0x400008d3,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001442 .cpu_name = "440GR Rev. B",
1443 .cpu_features = CPU_FTRS_44X,
1444 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001445 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001446 .icache_bsize = 32,
1447 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001448 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001449 .platform = "ppc440",
1450 },
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001451 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1452 .pvr_mask = 0xf0000ff7,
1453 .pvr_value = 0x400008d4,
1454 .cpu_name = "440EP Rev. C",
1455 .cpu_features = CPU_FTRS_44X,
1456 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001457 .mmu_features = MMU_FTR_TYPE_44x,
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001458 .icache_bsize = 32,
1459 .dcache_bsize = 32,
1460 .cpu_setup = __setup_cpu_440ep,
1461 .machine_check = machine_check_4xx,
1462 .platform = "ppc440",
1463 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001464 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1465 .pvr_mask = 0xf0000fff,
1466 .pvr_value = 0x400008db,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001467 .cpu_name = "440EP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001468 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001469 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001470 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001471 .icache_bsize = 32,
1472 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001473 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001474 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001475 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001476 },
Valentine Barshak15fc9932007-08-29 17:40:30 +04001477 { /* 440GRX */
1478 .pvr_mask = 0xf0000ffb,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001479 .pvr_value = 0x200008D0,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001480 .cpu_name = "440GRX",
1481 .cpu_features = CPU_FTRS_44X,
1482 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001483 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001484 .icache_bsize = 32,
1485 .dcache_bsize = 32,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001486 .cpu_setup = __setup_cpu_440grx,
Valentine Barshakb2be3b12007-12-22 03:22:23 +11001487 .machine_check = machine_check_440A,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001488 .platform = "ppc440",
Valentine Barshak15fc9932007-08-29 17:40:30 +04001489 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001490 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1491 .pvr_mask = 0xf0000ffb,
1492 .pvr_value = 0x200008D8,
1493 .cpu_name = "440EPX",
1494 .cpu_features = CPU_FTRS_44X,
1495 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001496 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001497 .icache_bsize = 32,
1498 .dcache_bsize = 32,
1499 .cpu_setup = __setup_cpu_440epx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001500 .machine_check = machine_check_440A,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001501 .platform = "ppc440",
1502 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001503 { /* 440GP Rev. B */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001504 .pvr_mask = 0xf0000fff,
1505 .pvr_value = 0x40000440,
1506 .cpu_name = "440GP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001507 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001508 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001509 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001510 .icache_bsize = 32,
1511 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001512 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001513 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001514 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001515 { /* 440GP Rev. C */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001516 .pvr_mask = 0xf0000fff,
1517 .pvr_value = 0x40000481,
1518 .cpu_name = "440GP Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001519 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001520 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001521 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001522 .icache_bsize = 32,
1523 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001524 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001525 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001526 },
1527 { /* 440GX Rev. A */
1528 .pvr_mask = 0xf0000fff,
1529 .pvr_value = 0x50000850,
1530 .cpu_name = "440GX Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001531 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001532 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001533 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001534 .icache_bsize = 32,
1535 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001536 .cpu_setup = __setup_cpu_440gx,
1537 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001538 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001539 },
1540 { /* 440GX Rev. B */
1541 .pvr_mask = 0xf0000fff,
1542 .pvr_value = 0x50000851,
1543 .cpu_name = "440GX Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001544 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001545 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001546 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001547 .icache_bsize = 32,
1548 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001549 .cpu_setup = __setup_cpu_440gx,
1550 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001551 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001552 },
1553 { /* 440GX Rev. C */
1554 .pvr_mask = 0xf0000fff,
1555 .pvr_value = 0x50000892,
1556 .cpu_name = "440GX Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001557 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001558 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001559 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001560 .icache_bsize = 32,
1561 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001562 .cpu_setup = __setup_cpu_440gx,
1563 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001564 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001565 },
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001566 { /* 440GX Rev. F */
1567 .pvr_mask = 0xf0000fff,
1568 .pvr_value = 0x50000894,
1569 .cpu_name = "440GX Rev. F",
Kumar Gala10b35d92005-09-23 14:08:58 -05001570 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001571 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001572 .mmu_features = MMU_FTR_TYPE_44x,
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001573 .icache_bsize = 32,
1574 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001575 .cpu_setup = __setup_cpu_440gx,
1576 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001577 .platform = "ppc440",
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001578 },
Matt Porter656de7e2005-09-03 15:55:42 -07001579 { /* 440SP Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001580 .pvr_mask = 0xfff00fff,
1581 .pvr_value = 0x53200891,
Matt Porter656de7e2005-09-03 15:55:42 -07001582 .cpu_name = "440SP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001583 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001584 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001585 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porter656de7e2005-09-03 15:55:42 -07001586 .icache_bsize = 32,
1587 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001588 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001589 .platform = "ppc440",
Matt Porter656de7e2005-09-03 15:55:42 -07001590 },
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001591 { /* 440SPe Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001592 .pvr_mask = 0xfff00fff,
1593 .pvr_value = 0x53400890,
1594 .cpu_name = "440SPe Rev. A",
1595 .cpu_features = CPU_FTRS_44X,
1596 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001597 .mmu_features = MMU_FTR_TYPE_44x,
Roland Dreier333e6152007-06-16 05:36:32 +10001598 .icache_bsize = 32,
1599 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001600 .cpu_setup = __setup_cpu_440spe,
1601 .machine_check = machine_check_440A,
Roland Dreier333e6152007-06-16 05:36:32 +10001602 .platform = "ppc440",
1603 },
1604 { /* 440SPe Rev. B */
1605 .pvr_mask = 0xfff00fff,
1606 .pvr_value = 0x53400891,
1607 .cpu_name = "440SPe Rev. B",
Kumar Galaa147c582006-12-08 02:34:38 -06001608 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001609 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001610 .mmu_features = MMU_FTR_TYPE_44x,
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001611 .icache_bsize = 32,
1612 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001613 .cpu_setup = __setup_cpu_440spe,
1614 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001615 .platform = "ppc440",
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001616 },
John Linn23e72372008-07-01 09:42:07 -07001617 { /* 440 in Xilinx Virtex-5 FXT */
1618 .pvr_mask = 0xfffffff0,
1619 .pvr_value = 0x7ff21910,
1620 .cpu_name = "440 in Virtex-5 FXT",
1621 .cpu_features = CPU_FTRS_44X,
1622 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001623 .mmu_features = MMU_FTR_TYPE_44x,
John Linn23e72372008-07-01 09:42:07 -07001624 .icache_bsize = 32,
1625 .dcache_bsize = 32,
Grant Likely640d17d2008-12-04 05:39:55 +00001626 .cpu_setup = __setup_cpu_440x5,
1627 .machine_check = machine_check_440A,
John Linn23e72372008-07-01 09:42:07 -07001628 .platform = "ppc440",
1629 },
Stefan Roese464076a2008-02-24 08:07:41 +11001630 { /* 460EX */
1631 .pvr_mask = 0xffff0002,
1632 .pvr_value = 0x13020002,
1633 .cpu_name = "460EX",
Benjamin Herrenschmidt6d2170b2008-12-18 19:13:22 +00001634 .cpu_features = CPU_FTRS_440x6,
Stefan Roese464076a2008-02-24 08:07:41 +11001635 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001636 .mmu_features = MMU_FTR_TYPE_44x,
Stefan Roese464076a2008-02-24 08:07:41 +11001637 .icache_bsize = 32,
1638 .dcache_bsize = 32,
1639 .cpu_setup = __setup_cpu_460ex,
1640 .machine_check = machine_check_440A,
1641 .platform = "ppc440",
1642 },
1643 { /* 460GT */
1644 .pvr_mask = 0xffff0002,
1645 .pvr_value = 0x13020000,
1646 .cpu_name = "460GT",
Benjamin Herrenschmidt6d2170b2008-12-18 19:13:22 +00001647 .cpu_features = CPU_FTRS_440x6,
Josh Boyer939e6222008-06-11 07:52:40 -04001648 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001649 .mmu_features = MMU_FTR_TYPE_44x,
Stefan Roese464076a2008-02-24 08:07:41 +11001650 .icache_bsize = 32,
1651 .dcache_bsize = 32,
Josh Boyer939e6222008-06-11 07:52:40 -04001652 .cpu_setup = __setup_cpu_460gt,
Stefan Roese464076a2008-02-24 08:07:41 +11001653 .machine_check = machine_check_440A,
1654 .platform = "ppc440",
1655 },
Madhulika Madishetty6c712092009-02-05 13:31:36 +00001656 { /* 460SX */
1657 .pvr_mask = 0xffffff00,
1658 .pvr_value = 0x13541800,
1659 .cpu_name = "460SX",
1660 .cpu_features = CPU_FTRS_44X,
1661 .cpu_user_features = COMMON_USER_BOOKE,
1662 .mmu_features = MMU_FTR_TYPE_44x,
1663 .icache_bsize = 32,
1664 .dcache_bsize = 32,
1665 .cpu_setup = __setup_cpu_460sx,
1666 .machine_check = machine_check_440A,
1667 .platform = "ppc440",
1668 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001669 { /* default match */
1670 .pvr_mask = 0x00000000,
1671 .pvr_value = 0x00000000,
1672 .cpu_name = "(generic 44x PPC)",
1673 .cpu_features = CPU_FTRS_44X,
1674 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001675 .mmu_features = MMU_FTR_TYPE_44x,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001676 .icache_bsize = 32,
1677 .dcache_bsize = 32,
1678 .machine_check = machine_check_4xx,
1679 .platform = "ppc440",
1680 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001681#endif /* CONFIG_44x */
Josh Boyere3e414b2007-12-24 08:44:47 -06001682#ifdef CONFIG_E200
Stephen Rothwell49209602005-10-12 15:55:09 +10001683 { /* e200z5 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001684 .pvr_mask = 0xfff00000,
1685 .pvr_value = 0x81000000,
1686 .cpu_name = "e200z5",
1687 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001688 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001689 .cpu_user_features = COMMON_USER_BOOKE |
1690 PPC_FEATURE_HAS_EFP_SINGLE |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001691 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001692 .mmu_features = MMU_FTR_TYPE_FSL_E,
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001693 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001694 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001695 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001696 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001697 { /* e200z6 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001698 .pvr_mask = 0xfff00000,
1699 .pvr_value = 0x81100000,
1700 .cpu_name = "e200z6",
1701 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001702 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001703 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001704 PPC_FEATURE_HAS_SPE_COMP |
1705 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001706 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001707 .mmu_features = MMU_FTR_TYPE_FSL_E,
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001708 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001709 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001710 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001711 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001712 { /* default match */
1713 .pvr_mask = 0x00000000,
1714 .pvr_value = 0x00000000,
1715 .cpu_name = "(generic E200 PPC)",
1716 .cpu_features = CPU_FTRS_E200,
1717 .cpu_user_features = COMMON_USER_BOOKE |
1718 PPC_FEATURE_HAS_EFP_SINGLE |
1719 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001720 .mmu_features = MMU_FTR_TYPE_FSL_E,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001721 .dcache_bsize = 32,
Kumar Gala105c31d2009-01-08 08:31:20 -06001722 .cpu_setup = __setup_cpu_e200,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001723 .machine_check = machine_check_e200,
1724 .platform = "ppc5554",
Paul Mackerras516c8be2008-05-12 14:20:35 +10001725 }
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001726#endif /* CONFIG_E200 */
1727#ifdef CONFIG_E500
Stephen Rothwell49209602005-10-12 15:55:09 +10001728 { /* e500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001729 .pvr_mask = 0xffff0000,
1730 .pvr_value = 0x80200000,
1731 .cpu_name = "e500",
Kumar Gala10b35d92005-09-23 14:08:58 -05001732 .cpu_features = CPU_FTRS_E500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001733 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001734 PPC_FEATURE_HAS_SPE_COMP |
1735 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001736 .mmu_features = MMU_FTR_TYPE_FSL_E,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001737 .icache_bsize = 32,
1738 .dcache_bsize = 32,
1739 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001740 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001741 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06001742 .cpu_setup = __setup_cpu_e500v1,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001743 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001744 .platform = "ppc8540",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001745 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001746 { /* e500v2 */
Kumar Gala5b37b702005-06-21 17:15:18 -07001747 .pvr_mask = 0xffff0000,
1748 .pvr_value = 0x80210000,
1749 .cpu_name = "e500v2",
Kumar Gala10b35d92005-09-23 14:08:58 -05001750 .cpu_features = CPU_FTRS_E500_2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001751 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001752 PPC_FEATURE_HAS_SPE_COMP |
1753 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1754 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001755 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS,
Kumar Gala5b37b702005-06-21 17:15:18 -07001756 .icache_bsize = 32,
1757 .dcache_bsize = 32,
1758 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001759 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001760 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06001761 .cpu_setup = __setup_cpu_e500v2,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001762 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001763 .platform = "ppc8548",
Kumar Gala5b37b702005-06-21 17:15:18 -07001764 },
Kumar Gala3dfa8772008-06-16 09:41:32 -05001765 { /* e500mc */
1766 .pvr_mask = 0xffff0000,
1767 .pvr_value = 0x80230000,
1768 .cpu_name = "e500mc",
Kumar Gala3dfa8772008-06-16 09:41:32 -05001769 .cpu_features = CPU_FTRS_E500MC,
1770 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Kumar Galac3071952009-02-10 22:26:06 -06001771 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
Kumar Gala323d23a2009-04-23 08:51:22 -05001772 MMU_FTR_USE_TLBILX,
Kumar Gala3dfa8772008-06-16 09:41:32 -05001773 .icache_bsize = 64,
1774 .dcache_bsize = 64,
1775 .num_pmcs = 4,
1776 .oprofile_cpu_type = "ppc/e500", /* xxx - galak, e500mc? */
1777 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06001778 .cpu_setup = __setup_cpu_e500mc,
Kumar Gala3dfa8772008-06-16 09:41:32 -05001779 .machine_check = machine_check_e500,
1780 .platform = "ppce500mc",
1781 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001782 { /* default match */
1783 .pvr_mask = 0x00000000,
1784 .pvr_value = 0x00000000,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001785 .cpu_name = "(generic E500 PPC)",
1786 .cpu_features = CPU_FTRS_E500,
1787 .cpu_user_features = COMMON_USER_BOOKE |
1788 PPC_FEATURE_HAS_SPE_COMP |
1789 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001790 .mmu_features = MMU_FTR_TYPE_FSL_E,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001791 .icache_bsize = 32,
1792 .dcache_bsize = 32,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001793 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001794 .platform = "powerpc",
Paul Mackerras516c8be2008-05-12 14:20:35 +10001795 }
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001796#endif /* CONFIG_E500 */
Stephen Rothwell49209602005-10-12 15:55:09 +10001797#endif /* CONFIG_PPC32 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001798};
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001799
Paul Mackerras87a72f92007-10-04 14:18:01 +10001800static struct cpu_spec the_cpu_spec;
1801
Michael Ellerman666435b2009-02-22 16:25:43 +00001802static void __init setup_cpu_spec(unsigned long offset, struct cpu_spec *s)
1803{
1804 struct cpu_spec *t = &the_cpu_spec;
Michael Ellerman2657dd42009-02-22 16:25:45 +00001805 struct cpu_spec old;
1806
Michael Ellerman666435b2009-02-22 16:25:43 +00001807 t = PTRRELOC(t);
Michael Ellerman2657dd42009-02-22 16:25:45 +00001808 old = *t;
1809
1810 /* Copy everything, then do fixups */
1811 *t = *s;
Michael Ellerman666435b2009-02-22 16:25:43 +00001812
1813 /*
1814 * If we are overriding a previous value derived from the real
1815 * PVR with a new value obtained using a logical PVR value,
1816 * don't modify the performance monitor fields.
1817 */
Michael Ellerman2657dd42009-02-22 16:25:45 +00001818 if (old.num_pmcs && !s->num_pmcs) {
1819 t->num_pmcs = old.num_pmcs;
1820 t->pmc_type = old.pmc_type;
1821 t->oprofile_type = old.oprofile_type;
1822 t->oprofile_mmcra_sihv = old.oprofile_mmcra_sihv;
1823 t->oprofile_mmcra_sipr = old.oprofile_mmcra_sipr;
1824 t->oprofile_mmcra_clear = old.oprofile_mmcra_clear;
1825
Michael Ellerman666435b2009-02-22 16:25:43 +00001826 /*
1827 * If we have passed through this logic once before and
1828 * have pulled the default case because the real PVR was
1829 * not found inside cpu_specs[], then we are possibly
1830 * running in compatibility mode. In that case, let the
1831 * oprofiler know which set of compatibility counters to
1832 * pull from by making sure the oprofile_cpu_type string
1833 * is set to that of compatibility mode. If the
1834 * oprofile_cpu_type already has a value, then we are
1835 * possibly overriding a real PVR with a logical one,
1836 * and, in that case, keep the current value for
1837 * oprofile_cpu_type.
1838 */
Michael Wolf79af6c42009-04-27 06:17:54 +00001839 if (old.oprofile_cpu_type == NULL) {
Benjamin Herrenschmidt0203d6e2009-04-29 19:39:38 +00001840 t->oprofile_cpu_type = old.oprofile_cpu_type;
1841 t->oprofile_type = old.oprofile_type;
Michael Wolf79af6c42009-04-27 06:17:54 +00001842 }
Michael Ellerman2657dd42009-02-22 16:25:45 +00001843 }
Michael Ellerman666435b2009-02-22 16:25:43 +00001844
1845 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
1846
1847 /*
1848 * Set the base platform string once; assumes
1849 * we're called with real pvr first.
1850 */
1851 if (*PTRRELOC(&powerpc_base_platform) == NULL)
1852 *PTRRELOC(&powerpc_base_platform) = t->platform;
1853
1854#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
1855 /* ppc64 and booke expect identify_cpu to also call setup_cpu for
1856 * that processor. I will consolidate that at a later time, for now,
1857 * just use #ifdef. We also don't need to PTRRELOC the function
1858 * pointer on ppc64 and booke as we are running at 0 in real mode
1859 * on ppc64 and reloc_offset is always 0 on booke.
1860 */
1861 if (s->cpu_setup) {
1862 s->cpu_setup(offset, s);
1863 }
1864#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
1865}
1866
Paul Mackerras87a72f92007-10-04 14:18:01 +10001867struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001868{
1869 struct cpu_spec *s = cpu_specs;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001870 int i;
1871
1872 s = PTRRELOC(s);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001873
Michael Ellerman666435b2009-02-22 16:25:43 +00001874 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) {
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001875 if ((pvr & s->pvr_mask) == s->pvr_value) {
Michael Ellerman666435b2009-02-22 16:25:43 +00001876 setup_cpu_spec(offset, s);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001877 return s;
1878 }
Michael Ellerman666435b2009-02-22 16:25:43 +00001879 }
1880
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001881 BUG();
Michael Ellerman666435b2009-02-22 16:25:43 +00001882
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001883 return NULL;
1884}