blob: 9f38ecb178596b24d1cb54ccdfcec73f6cecebc1 [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[] = {
Benjamin Herrenschmidt2d27cfd2009-07-23 23:15:59 +000096#ifdef CONFIG_PPC_BOOK3S_64
Stephen Rothwell49209602005-10-12 15:55:09 +100097 { /* Power3 */
98 .pvr_mask = 0xffff0000,
99 .pvr_value = 0x00400000,
100 .cpu_name = "POWER3 (630)",
101 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000102 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000103 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000104 .icache_bsize = 128,
105 .dcache_bsize = 128,
106 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600107 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000108 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000109 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100110 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100111 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +1000112 },
113 { /* Power3+ */
114 .pvr_mask = 0xffff0000,
115 .pvr_value = 0x00410000,
116 .cpu_name = "POWER3 (630+)",
117 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000118 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000119 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000120 .icache_bsize = 128,
121 .dcache_bsize = 128,
122 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600123 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000124 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000125 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100126 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100127 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +1000128 },
129 { /* Northstar */
130 .pvr_mask = 0xffff0000,
131 .pvr_value = 0x00330000,
132 .cpu_name = "RS64-II (northstar)",
133 .cpu_features = CPU_FTRS_RS64,
134 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000135 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000136 .icache_bsize = 128,
137 .dcache_bsize = 128,
138 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600139 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000140 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000141 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100142 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100143 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000144 },
145 { /* Pulsar */
146 .pvr_mask = 0xffff0000,
147 .pvr_value = 0x00340000,
148 .cpu_name = "RS64-III (pulsar)",
149 .cpu_features = CPU_FTRS_RS64,
150 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000151 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000152 .icache_bsize = 128,
153 .dcache_bsize = 128,
154 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600155 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000156 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000157 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100158 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100159 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000160 },
161 { /* I-star */
162 .pvr_mask = 0xffff0000,
163 .pvr_value = 0x00360000,
164 .cpu_name = "RS64-III (icestar)",
165 .cpu_features = CPU_FTRS_RS64,
166 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000167 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000168 .icache_bsize = 128,
169 .dcache_bsize = 128,
170 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600171 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000172 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000173 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100174 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100175 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000176 },
177 { /* S-star */
178 .pvr_mask = 0xffff0000,
179 .pvr_value = 0x00370000,
180 .cpu_name = "RS64-IV (sstar)",
181 .cpu_features = CPU_FTRS_RS64,
182 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000183 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000184 .icache_bsize = 128,
185 .dcache_bsize = 128,
186 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600187 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000188 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000189 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100190 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100191 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000192 },
193 { /* Power4 */
194 .pvr_mask = 0xffff0000,
195 .pvr_value = 0x00350000,
196 .cpu_name = "POWER4 (gp)",
197 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100198 .cpu_user_features = COMMON_USER_POWER4,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000199 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000200 .icache_bsize = 128,
201 .dcache_bsize = 128,
202 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600203 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000204 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000205 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100206 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100207 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000208 },
209 { /* Power4+ */
210 .pvr_mask = 0xffff0000,
211 .pvr_value = 0x00380000,
212 .cpu_name = "POWER4+ (gq)",
213 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100214 .cpu_user_features = COMMON_USER_POWER4,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000215 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000216 .icache_bsize = 128,
217 .dcache_bsize = 128,
218 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600219 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000220 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000221 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100222 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100223 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000224 },
225 { /* PPC970 */
226 .pvr_mask = 0xffff0000,
227 .pvr_value = 0x00390000,
228 .cpu_name = "PPC970",
229 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100230 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000231 PPC_FEATURE_HAS_ALTIVEC_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000232 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000233 .icache_bsize = 128,
234 .dcache_bsize = 128,
235 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600236 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000237 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500238 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000239 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000240 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100241 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100242 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000243 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000244 { /* PPC970FX */
245 .pvr_mask = 0xffff0000,
246 .pvr_value = 0x003c0000,
247 .cpu_name = "PPC970FX",
Stephen Rothwell49209602005-10-12 15:55:09 +1000248 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100249 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000250 PPC_FEATURE_HAS_ALTIVEC_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000251 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000252 .icache_bsize = 128,
253 .dcache_bsize = 128,
254 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600255 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000256 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500257 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000258 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000259 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100260 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100261 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000262 },
Olof Johansson3546e812007-02-26 00:35:14 -0600263 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
264 .pvr_mask = 0xffffffff,
265 .pvr_value = 0x00440100,
266 .cpu_name = "PPC970MP",
267 .cpu_features = CPU_FTRS_PPC970,
268 .cpu_user_features = COMMON_USER_POWER4 |
269 PPC_FEATURE_HAS_ALTIVEC_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000270 .mmu_features = MMU_FTR_HPTE_TABLE,
Olof Johansson3546e812007-02-26 00:35:14 -0600271 .icache_bsize = 128,
272 .dcache_bsize = 128,
273 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000274 .pmc_type = PPC_PMC_IBM,
Olof Johansson3546e812007-02-26 00:35:14 -0600275 .cpu_setup = __setup_cpu_ppc970,
276 .cpu_restore = __restore_cpu_ppc970,
277 .oprofile_cpu_type = "ppc64/970MP",
278 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100279 .machine_check = machine_check_generic,
Olof Johansson3546e812007-02-26 00:35:14 -0600280 .platform = "ppc970",
281 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000282 { /* PPC970MP */
283 .pvr_mask = 0xffff0000,
284 .pvr_value = 0x00440000,
285 .cpu_name = "PPC970MP",
286 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100287 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000288 PPC_FEATURE_HAS_ALTIVEC_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000289 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000290 .icache_bsize = 128,
291 .dcache_bsize = 128,
Anton Blanchard87af41b2006-05-05 05:44:26 +1000292 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000293 .pmc_type = PPC_PMC_IBM,
Olof Johansson5b43d202006-10-04 23:41:41 -0500294 .cpu_setup = __setup_cpu_ppc970MP,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500295 .cpu_restore = __restore_cpu_ppc970,
Mike Wolffecb3522006-11-21 14:41:54 -0600296 .oprofile_cpu_type = "ppc64/970MP",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000297 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100298 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100299 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000300 },
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500301 { /* PPC970GX */
302 .pvr_mask = 0xffff0000,
303 .pvr_value = 0x00450000,
304 .cpu_name = "PPC970GX",
305 .cpu_features = CPU_FTRS_PPC970,
306 .cpu_user_features = COMMON_USER_POWER4 |
307 PPC_FEATURE_HAS_ALTIVEC_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000308 .mmu_features = MMU_FTR_HPTE_TABLE,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500309 .icache_bsize = 128,
310 .dcache_bsize = 128,
311 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600312 .pmc_type = PPC_PMC_IBM,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500313 .cpu_setup = __setup_cpu_ppc970,
314 .oprofile_cpu_type = "ppc64/970",
315 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100316 .machine_check = machine_check_generic,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500317 .platform = "ppc970",
318 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100319 { /* Power5 GR */
Stephen Rothwell49209602005-10-12 15:55:09 +1000320 .pvr_mask = 0xffff0000,
321 .pvr_value = 0x003a0000,
322 .cpu_name = "POWER5 (gr)",
323 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100324 .cpu_user_features = COMMON_USER_POWER5,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000325 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000326 .icache_bsize = 128,
327 .dcache_bsize = 128,
328 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600329 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000330 .oprofile_cpu_type = "ppc64/power5",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000331 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000332 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
333 * and above but only works on POWER5 and above
334 */
335 .oprofile_mmcra_sihv = MMCRA_SIHV,
336 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100337 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100338 .platform = "power5",
Stephen Rothwell49209602005-10-12 15:55:09 +1000339 },
Mike Wolf31a12ce2007-07-10 13:13:47 -0500340 { /* Power5++ */
341 .pvr_mask = 0xffffff00,
342 .pvr_value = 0x003b0300,
343 .cpu_name = "POWER5+ (gs)",
344 .cpu_features = CPU_FTRS_POWER5,
345 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000346 .mmu_features = MMU_FTR_HPTE_TABLE,
Mike Wolf31a12ce2007-07-10 13:13:47 -0500347 .icache_bsize = 128,
348 .dcache_bsize = 128,
349 .num_pmcs = 6,
350 .oprofile_cpu_type = "ppc64/power5++",
351 .oprofile_type = PPC_OPROFILE_POWER4,
352 .oprofile_mmcra_sihv = MMCRA_SIHV,
353 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100354 .machine_check = machine_check_generic,
Mike Wolf31a12ce2007-07-10 13:13:47 -0500355 .platform = "power5+",
356 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100357 { /* Power5 GS */
Stephen Rothwell49209602005-10-12 15:55:09 +1000358 .pvr_mask = 0xffff0000,
359 .pvr_value = 0x003b0000,
Anton Blanchard834608f2006-01-09 15:42:30 +1100360 .cpu_name = "POWER5+ (gs)",
Stephen Rothwell49209602005-10-12 15:55:09 +1000361 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100362 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000363 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000364 .icache_bsize = 128,
365 .dcache_bsize = 128,
366 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600367 .pmc_type = PPC_PMC_IBM,
Anton Blanchard834608f2006-01-09 15:42:30 +1100368 .oprofile_cpu_type = "ppc64/power5+",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000369 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000370 .oprofile_mmcra_sihv = MMCRA_SIHV,
371 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100372 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100373 .platform = "power5+",
Stephen Rothwell49209602005-10-12 15:55:09 +1000374 },
Paul Mackerras974a76f2006-11-10 20:38:53 +1100375 { /* POWER6 in P5+ mode; 2.04-compliant processor */
376 .pvr_mask = 0xffffffff,
377 .pvr_value = 0x0f000001,
378 .cpu_name = "POWER5+",
379 .cpu_features = CPU_FTRS_POWER5,
380 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000381 .mmu_features = MMU_FTR_HPTE_TABLE,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100382 .icache_bsize = 128,
383 .dcache_bsize = 128,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100384 .machine_check = machine_check_generic,
Michael Wolf79af6c42009-04-27 06:17:54 +0000385 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
386 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100387 .platform = "power5+",
388 },
Anton Blanchard03054d52006-04-29 09:51:06 +1000389 { /* Power6 */
390 .pvr_mask = 0xffff0000,
391 .pvr_value = 0x003e0000,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100392 .cpu_name = "POWER6 (raw)",
393 .cpu_features = CPU_FTRS_POWER6,
394 .cpu_user_features = COMMON_USER_POWER6 |
395 PPC_FEATURE_POWER6_EXT,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000396 .mmu_features = MMU_FTR_HPTE_TABLE,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100397 .icache_bsize = 128,
398 .dcache_bsize = 128,
399 .num_pmcs = 6,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000400 .pmc_type = PPC_PMC_IBM,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100401 .oprofile_cpu_type = "ppc64/power6",
402 .oprofile_type = PPC_OPROFILE_POWER4,
403 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
404 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
405 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
406 POWER6_MMCRA_OTHER,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100407 .machine_check = machine_check_generic,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100408 .platform = "power6x",
409 },
410 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
411 .pvr_mask = 0xffffffff,
412 .pvr_value = 0x0f000002,
413 .cpu_name = "POWER6 (architected)",
Anton Blanchard03054d52006-04-29 09:51:06 +1000414 .cpu_features = CPU_FTRS_POWER6,
415 .cpu_user_features = COMMON_USER_POWER6,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000416 .mmu_features = MMU_FTR_HPTE_TABLE,
Anton Blanchard03054d52006-04-29 09:51:06 +1000417 .icache_bsize = 128,
418 .dcache_bsize = 128,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100419 .machine_check = machine_check_generic,
Michael Wolf79af6c42009-04-27 06:17:54 +0000420 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
421 .oprofile_type = PPC_OPROFILE_POWER4,
Anton Blanchard03054d52006-04-29 09:51:06 +1000422 .platform = "power6",
423 },
Joel Schopp635f5a62008-06-19 06:18:21 +1000424 { /* 2.06-compliant processor, i.e. Power7 "architected" mode */
425 .pvr_mask = 0xffffffff,
426 .pvr_value = 0x0f000003,
427 .cpu_name = "POWER7 (architected)",
428 .cpu_features = CPU_FTRS_POWER7,
429 .cpu_user_features = COMMON_USER_POWER7,
Milton Miller60dbf432009-04-29 20:58:01 +0000430 .mmu_features = MMU_FTR_HPTE_TABLE |
431 MMU_FTR_TLBIE_206,
Joel Schopp635f5a62008-06-19 06:18:21 +1000432 .icache_bsize = 128,
433 .dcache_bsize = 128,
434 .machine_check = machine_check_generic,
Michael Wolf79af6c42009-04-27 06:17:54 +0000435 .oprofile_type = PPC_OPROFILE_POWER4,
436 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
Joel Schopp635f5a62008-06-19 06:18:21 +1000437 .platform = "power7",
438 },
Michael Neulinge952e6c2008-06-18 10:47:26 +1000439 { /* Power7 */
440 .pvr_mask = 0xffff0000,
441 .pvr_value = 0x003f0000,
Joel Schopp635f5a62008-06-19 06:18:21 +1000442 .cpu_name = "POWER7 (raw)",
Michael Neulinge952e6c2008-06-18 10:47:26 +1000443 .cpu_features = CPU_FTRS_POWER7,
444 .cpu_user_features = COMMON_USER_POWER7,
Milton Miller60dbf432009-04-29 20:58:01 +0000445 .mmu_features = MMU_FTR_HPTE_TABLE |
446 MMU_FTR_TLBIE_206,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000447 .icache_bsize = 128,
448 .dcache_bsize = 128,
449 .num_pmcs = 6,
450 .pmc_type = PPC_PMC_IBM,
451 .cpu_setup = __setup_cpu_power7,
452 .cpu_restore = __restore_cpu_power7,
453 .oprofile_cpu_type = "ppc64/power7",
454 .oprofile_type = PPC_OPROFILE_POWER4,
455 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
456 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
457 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
458 POWER6_MMCRA_OTHER,
459 .platform = "power7",
460 },
Arnd Bergmannc902be72006-01-04 19:55:53 +0000461 { /* Cell Broadband Engine */
Stephen Rothwell49209602005-10-12 15:55:09 +1000462 .pvr_mask = 0xffff0000,
463 .pvr_value = 0x00700000,
464 .cpu_name = "Cell Broadband Engine",
465 .cpu_features = CPU_FTRS_CELL,
466 .cpu_user_features = COMMON_USER_PPC64 |
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +1100467 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
468 PPC_FEATURE_SMT,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000469 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000470 .icache_bsize = 128,
471 .dcache_bsize = 128,
Maynard Johnson18f21902006-11-20 18:45:16 +0100472 .num_pmcs = 4,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600473 .pmc_type = PPC_PMC_IBM,
Maynard Johnson18f21902006-11-20 18:45:16 +0100474 .oprofile_cpu_type = "ppc64/cell-be",
475 .oprofile_type = PPC_OPROFILE_CELL,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100476 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100477 .platform = "ppc-cell-be",
Stephen Rothwell49209602005-10-12 15:55:09 +1000478 },
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500479 { /* PA Semi PA6T */
480 .pvr_mask = 0x7fff0000,
481 .pvr_value = 0x00900000,
482 .cpu_name = "PA6T",
483 .cpu_features = CPU_FTRS_PA6T,
484 .cpu_user_features = COMMON_USER_PA6T,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000485 .mmu_features = MMU_FTR_HPTE_TABLE,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500486 .icache_bsize = 64,
487 .dcache_bsize = 64,
488 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600489 .pmc_type = PPC_PMC_PA6T,
Olof Johansson11999192007-02-04 16:36:51 -0600490 .cpu_setup = __setup_cpu_pa6t,
491 .cpu_restore = __restore_cpu_pa6t,
Olof Johansson25fc5302007-04-18 16:38:21 +1000492 .oprofile_cpu_type = "ppc64/pa6t",
493 .oprofile_type = PPC_OPROFILE_PA6T,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100494 .machine_check = machine_check_generic,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500495 .platform = "pa6t",
496 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000497 { /* default match */
498 .pvr_mask = 0x00000000,
499 .pvr_value = 0x00000000,
500 .cpu_name = "POWER4 (compatible)",
501 .cpu_features = CPU_FTRS_COMPATIBLE,
502 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000503 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000504 .icache_bsize = 128,
505 .dcache_bsize = 128,
506 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600507 .pmc_type = PPC_PMC_IBM,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100508 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100509 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000510 }
Benjamin Herrenschmidt2d27cfd2009-07-23 23:15:59 +0000511#endif /* CONFIG_PPC_BOOK3S_64 */
512#ifdef CONFIG_PPC_BOOK3E_64
513 { /* This is a default entry to get going, to be replaced by
514 * a real one at some stage
515 */
516#define CPU_FTRS_BASE_BOOK3E (CPU_FTR_USE_TB | \
517 CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_SMT | \
518 CPU_FTR_NODSISRALIGN | CPU_FTR_NOEXECUTE)
519 .pvr_mask = 0x00000000,
520 .pvr_value = 0x00000000,
521 .cpu_name = "Book3E",
522 .cpu_features = CPU_FTRS_BASE_BOOK3E,
523 .cpu_user_features = COMMON_USER_PPC64,
524 .mmu_features = MMU_FTR_TYPE_3E | MMU_FTR_USE_TLBILX |
525 MMU_FTR_USE_TLBIVAX_BCAST |
526 MMU_FTR_LOCK_BCAST_INVAL,
527 .icache_bsize = 64,
528 .dcache_bsize = 64,
529 .num_pmcs = 0,
530 .machine_check = machine_check_generic,
531 .platform = "power6",
532 },
533#endif
534
Stephen Rothwell49209602005-10-12 15:55:09 +1000535#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -0700536#if CLASSIC_PPC
Stephen Rothwell49209602005-10-12 15:55:09 +1000537 { /* 601 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700538 .pvr_mask = 0xffff0000,
539 .pvr_value = 0x00010000,
540 .cpu_name = "601",
Kumar Gala10b35d92005-09-23 14:08:58 -0500541 .cpu_features = CPU_FTRS_PPC601,
Stephen Rothwell49209602005-10-12 15:55:09 +1000542 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
Paul Mackerras98599012005-10-22 16:51:34 +1000543 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000544 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700545 .icache_bsize = 32,
546 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100547 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100548 .platform = "ppc601",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700549 },
550 { /* 603 */
551 .pvr_mask = 0xffff0000,
552 .pvr_value = 0x00030000,
553 .cpu_name = "603",
Kumar Gala10b35d92005-09-23 14:08:58 -0500554 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000555 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000556 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700557 .icache_bsize = 32,
558 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100559 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100560 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100561 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700562 },
563 { /* 603e */
564 .pvr_mask = 0xffff0000,
565 .pvr_value = 0x00060000,
566 .cpu_name = "603e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500567 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000568 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000569 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700570 .icache_bsize = 32,
571 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100572 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100573 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100574 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700575 },
576 { /* 603ev */
577 .pvr_mask = 0xffff0000,
578 .pvr_value = 0x00070000,
579 .cpu_name = "603ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500580 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000581 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000582 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700583 .icache_bsize = 32,
584 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100585 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100586 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100587 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700588 },
589 { /* 604 */
590 .pvr_mask = 0xffff0000,
591 .pvr_value = 0x00040000,
592 .cpu_name = "604",
Kumar Gala10b35d92005-09-23 14:08:58 -0500593 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000594 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000595 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700596 .icache_bsize = 32,
597 .dcache_bsize = 32,
598 .num_pmcs = 2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100599 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100600 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100601 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700602 },
603 { /* 604e */
604 .pvr_mask = 0xfffff000,
605 .pvr_value = 0x00090000,
606 .cpu_name = "604e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500607 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000608 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000609 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700610 .icache_bsize = 32,
611 .dcache_bsize = 32,
612 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100613 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100614 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100615 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700616 },
617 { /* 604r */
618 .pvr_mask = 0xffff0000,
619 .pvr_value = 0x00090000,
620 .cpu_name = "604r",
Kumar Gala10b35d92005-09-23 14:08:58 -0500621 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000622 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000623 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700624 .icache_bsize = 32,
625 .dcache_bsize = 32,
626 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100627 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100628 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100629 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700630 },
631 { /* 604ev */
632 .pvr_mask = 0xffff0000,
633 .pvr_value = 0x000a0000,
634 .cpu_name = "604ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500635 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000636 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000637 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700638 .icache_bsize = 32,
639 .dcache_bsize = 32,
640 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100641 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100642 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100643 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700644 },
645 { /* 740/750 (0x4202, don't support TAU ?) */
646 .pvr_mask = 0xffffffff,
647 .pvr_value = 0x00084202,
648 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500649 .cpu_features = CPU_FTRS_740_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000650 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000651 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700652 .icache_bsize = 32,
653 .dcache_bsize = 32,
654 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100655 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100656 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100657 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700658 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700659 { /* 750CX (80100 and 8010x?) */
660 .pvr_mask = 0xfffffff0,
661 .pvr_value = 0x00080100,
662 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500663 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000664 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000665 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700666 .icache_bsize = 32,
667 .dcache_bsize = 32,
668 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100669 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100670 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100671 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700672 },
673 { /* 750CX (82201 and 82202) */
674 .pvr_mask = 0xfffffff0,
675 .pvr_value = 0x00082200,
676 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500677 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000678 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000679 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700680 .icache_bsize = 32,
681 .dcache_bsize = 32,
682 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000683 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100684 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100685 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100686 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700687 },
688 { /* 750CXe (82214) */
689 .pvr_mask = 0xfffffff0,
690 .pvr_value = 0x00082210,
691 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500692 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000693 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000694 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700695 .icache_bsize = 32,
696 .dcache_bsize = 32,
697 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000698 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100699 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100700 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100701 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700702 },
Arthur Othieno7c316252005-09-03 15:55:52 -0700703 { /* 750CXe "Gekko" (83214) */
704 .pvr_mask = 0xffffffff,
705 .pvr_value = 0x00083214,
706 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500707 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000708 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000709 .mmu_features = MMU_FTR_HPTE_TABLE,
Arthur Othieno7c316252005-09-03 15:55:52 -0700710 .icache_bsize = 32,
711 .dcache_bsize = 32,
712 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000713 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100714 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100715 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100716 .platform = "ppc750",
Arthur Othieno7c316252005-09-03 15:55:52 -0700717 },
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500718 { /* 750CL */
719 .pvr_mask = 0xfffff0f0,
720 .pvr_value = 0x00087010,
721 .cpu_name = "750CL",
Josh Boyera14c4502007-04-13 04:33:25 +1000722 .cpu_features = CPU_FTRS_750CL,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500723 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000724 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500725 .icache_bsize = 32,
726 .dcache_bsize = 32,
727 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000728 .pmc_type = PPC_PMC_IBM,
Josh Boyera14c4502007-04-13 04:33:25 +1000729 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100730 .machine_check = machine_check_generic,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500731 .platform = "ppc750",
732 },
Arthur Othienoac1ff042005-09-03 15:55:51 -0700733 { /* 745/755 */
734 .pvr_mask = 0xfffff000,
735 .pvr_value = 0x00083000,
736 .cpu_name = "745/755",
Kumar Gala10b35d92005-09-23 14:08:58 -0500737 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000738 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000739 .mmu_features = MMU_FTR_HPTE_TABLE,
Arthur Othienoac1ff042005-09-03 15:55:51 -0700740 .icache_bsize = 32,
741 .dcache_bsize = 32,
742 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000743 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100744 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100745 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100746 .platform = "ppc750",
Arthur Othienoac1ff042005-09-03 15:55:51 -0700747 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700748 { /* 750FX rev 1.x */
749 .pvr_mask = 0xffffff00,
750 .pvr_value = 0x70000100,
751 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500752 .cpu_features = CPU_FTRS_750FX1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000753 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000754 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700755 .icache_bsize = 32,
756 .dcache_bsize = 32,
757 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000758 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100759 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100760 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100761 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000762 .oprofile_cpu_type = "ppc/750",
763 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700764 },
765 { /* 750FX rev 2.0 must disable HID0[DPM] */
766 .pvr_mask = 0xffffffff,
767 .pvr_value = 0x70000200,
768 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500769 .cpu_features = CPU_FTRS_750FX2,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000770 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000771 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700772 .icache_bsize = 32,
773 .dcache_bsize = 32,
774 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000775 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100776 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100777 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100778 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000779 .oprofile_cpu_type = "ppc/750",
780 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700781 },
782 { /* 750FX (All revs except 2.0) */
783 .pvr_mask = 0xffff0000,
784 .pvr_value = 0x70000000,
785 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500786 .cpu_features = CPU_FTRS_750FX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000787 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000788 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700789 .icache_bsize = 32,
790 .dcache_bsize = 32,
791 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000792 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100793 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100794 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100795 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000796 .oprofile_cpu_type = "ppc/750",
797 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700798 },
799 { /* 750GX */
800 .pvr_mask = 0xffff0000,
801 .pvr_value = 0x70020000,
802 .cpu_name = "750GX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500803 .cpu_features = CPU_FTRS_750GX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000804 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000805 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700806 .icache_bsize = 32,
807 .dcache_bsize = 32,
808 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000809 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100810 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100811 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100812 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000813 .oprofile_cpu_type = "ppc/750",
814 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700815 },
816 { /* 740/750 (L2CR bit need fixup for 740) */
817 .pvr_mask = 0xffff0000,
818 .pvr_value = 0x00080000,
819 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500820 .cpu_features = CPU_FTRS_740,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000821 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000822 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700823 .icache_bsize = 32,
824 .dcache_bsize = 32,
825 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000826 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100827 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100828 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100829 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700830 },
831 { /* 7400 rev 1.1 ? (no TAU) */
832 .pvr_mask = 0xffffffff,
833 .pvr_value = 0x000c1101,
834 .cpu_name = "7400 (1.1)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500835 .cpu_features = CPU_FTRS_7400_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000836 .cpu_user_features = COMMON_USER |
837 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000838 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700839 .icache_bsize = 32,
840 .dcache_bsize = 32,
841 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000842 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100843 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100844 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100845 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700846 },
847 { /* 7400 */
848 .pvr_mask = 0xffff0000,
849 .pvr_value = 0x000c0000,
850 .cpu_name = "7400",
Kumar Gala10b35d92005-09-23 14:08:58 -0500851 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000852 .cpu_user_features = COMMON_USER |
853 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000854 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700855 .icache_bsize = 32,
856 .dcache_bsize = 32,
857 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000858 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100859 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100860 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100861 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700862 },
863 { /* 7410 */
864 .pvr_mask = 0xffff0000,
865 .pvr_value = 0x800c0000,
866 .cpu_name = "7410",
Kumar Gala10b35d92005-09-23 14:08:58 -0500867 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000868 .cpu_user_features = COMMON_USER |
869 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000870 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700871 .icache_bsize = 32,
872 .dcache_bsize = 32,
873 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000874 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100875 .cpu_setup = __setup_cpu_7410,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100876 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100877 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700878 },
879 { /* 7450 2.0 - no doze/nap */
880 .pvr_mask = 0xffffffff,
881 .pvr_value = 0x80000200,
882 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500883 .cpu_features = CPU_FTRS_7450_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000884 .cpu_user_features = COMMON_USER |
885 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000886 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700887 .icache_bsize = 32,
888 .dcache_bsize = 32,
889 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000890 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600891 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600892 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000893 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100894 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100895 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700896 },
897 { /* 7450 2.1 */
898 .pvr_mask = 0xffffffff,
899 .pvr_value = 0x80000201,
900 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500901 .cpu_features = CPU_FTRS_7450_21,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000902 .cpu_user_features = COMMON_USER |
903 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000904 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700905 .icache_bsize = 32,
906 .dcache_bsize = 32,
907 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000908 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600909 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600910 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000911 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100912 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100913 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700914 },
915 { /* 7450 2.3 and newer */
916 .pvr_mask = 0xffff0000,
917 .pvr_value = 0x80000000,
918 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500919 .cpu_features = CPU_FTRS_7450_23,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000920 .cpu_user_features = COMMON_USER |
921 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000922 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700923 .icache_bsize = 32,
924 .dcache_bsize = 32,
925 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000926 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600927 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600928 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000929 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100930 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100931 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700932 },
933 { /* 7455 rev 1.x */
934 .pvr_mask = 0xffffff00,
935 .pvr_value = 0x80010100,
936 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500937 .cpu_features = CPU_FTRS_7455_1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000938 .cpu_user_features = COMMON_USER |
939 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000940 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700941 .icache_bsize = 32,
942 .dcache_bsize = 32,
943 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000944 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600945 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600946 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000947 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100948 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100949 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700950 },
951 { /* 7455 rev 2.0 */
952 .pvr_mask = 0xffffffff,
953 .pvr_value = 0x80010200,
954 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500955 .cpu_features = CPU_FTRS_7455_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000956 .cpu_user_features = COMMON_USER |
957 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000958 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700959 .icache_bsize = 32,
960 .dcache_bsize = 32,
961 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000962 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600963 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600964 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000965 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100966 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100967 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700968 },
969 { /* 7455 others */
970 .pvr_mask = 0xffff0000,
971 .pvr_value = 0x80010000,
972 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500973 .cpu_features = CPU_FTRS_7455,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000974 .cpu_user_features = COMMON_USER |
975 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000976 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700977 .icache_bsize = 32,
978 .dcache_bsize = 32,
979 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000980 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600981 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600982 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000983 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100984 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100985 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700986 },
987 { /* 7447/7457 Rev 1.0 */
988 .pvr_mask = 0xffffffff,
989 .pvr_value = 0x80020100,
990 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500991 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000992 .cpu_user_features = COMMON_USER |
993 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000994 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700995 .icache_bsize = 32,
996 .dcache_bsize = 32,
997 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000998 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600999 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001000 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001001 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001002 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001003 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001004 },
1005 { /* 7447/7457 Rev 1.1 */
1006 .pvr_mask = 0xffffffff,
1007 .pvr_value = 0x80020101,
1008 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -05001009 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001010 .cpu_user_features = COMMON_USER |
1011 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001012 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001013 .icache_bsize = 32,
1014 .dcache_bsize = 32,
1015 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001016 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001017 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001018 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001019 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001020 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001021 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001022 },
1023 { /* 7447/7457 Rev 1.2 and later */
1024 .pvr_mask = 0xffff0000,
1025 .pvr_value = 0x80020000,
1026 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -05001027 .cpu_features = CPU_FTRS_7447,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001028 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001029 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001030 .icache_bsize = 32,
1031 .dcache_bsize = 32,
1032 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001033 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001034 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001035 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001036 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001037 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001038 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001039 },
1040 { /* 7447A */
1041 .pvr_mask = 0xffff0000,
1042 .pvr_value = 0x80030000,
1043 .cpu_name = "7447A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001044 .cpu_features = CPU_FTRS_7447A,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001045 .cpu_user_features = COMMON_USER |
1046 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001047 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001048 .icache_bsize = 32,
1049 .dcache_bsize = 32,
1050 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001051 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001052 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001053 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001054 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001055 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001056 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001057 },
Kumar Galabbde6302005-09-03 15:55:55 -07001058 { /* 7448 */
1059 .pvr_mask = 0xffff0000,
1060 .pvr_value = 0x80040000,
1061 .cpu_name = "7448",
James.Yang3d372542007-05-02 16:34:43 -05001062 .cpu_features = CPU_FTRS_7448,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001063 .cpu_user_features = COMMON_USER |
1064 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001065 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Kumar Galabbde6302005-09-03 15:55:55 -07001066 .icache_bsize = 32,
1067 .dcache_bsize = 32,
1068 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001069 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001070 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001071 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001072 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001073 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001074 .platform = "ppc7450",
Kumar Galabbde6302005-09-03 15:55:55 -07001075 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001076 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
1077 .pvr_mask = 0x7fff0000,
1078 .pvr_value = 0x00810000,
1079 .cpu_name = "82xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001080 .cpu_features = CPU_FTRS_82XX,
Stephen Rothwell49209602005-10-12 15:55:09 +10001081 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001082 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001083 .icache_bsize = 32,
1084 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001085 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001086 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001087 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001088 },
1089 { /* All G2_LE (603e core, plus some) have the same pvr */
1090 .pvr_mask = 0x7fff0000,
1091 .pvr_value = 0x00820000,
1092 .cpu_name = "G2_LE",
Kumar Gala10b35d92005-09-23 14:08:58 -05001093 .cpu_features = CPU_FTRS_G2_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +10001094 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001095 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001096 .icache_bsize = 32,
1097 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001098 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001099 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001100 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001101 },
Kim Phillips6c4a2502006-10-02 20:10:24 -05001102 { /* e300c1 (a 603e core, plus some) on 83xx */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001103 .pvr_mask = 0x7fff0000,
1104 .pvr_value = 0x00830000,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001105 .cpu_name = "e300c1",
Kumar Gala10b35d92005-09-23 14:08:58 -05001106 .cpu_features = CPU_FTRS_E300,
Stephen Rothwell49209602005-10-12 15:55:09 +10001107 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001108 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001109 .icache_bsize = 32,
1110 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001111 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001112 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001113 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001114 },
Kim Phillips6c4a2502006-10-02 20:10:24 -05001115 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
1116 .pvr_mask = 0x7fff0000,
1117 .pvr_value = 0x00840000,
1118 .cpu_name = "e300c2",
Kim Phillipsaa42c692006-12-08 02:43:30 -06001119 .cpu_features = CPU_FTRS_E300C2,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001120 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Kumar Gala2319f122009-03-19 03:55:41 +00001121 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1122 MMU_FTR_NEED_DTLB_SW_LRU,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001123 .icache_bsize = 32,
1124 .dcache_bsize = 32,
1125 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001126 .machine_check = machine_check_generic,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001127 .platform = "ppc603",
1128 },
Li Yanga58d5242007-10-19 19:38:42 +08001129 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
Scott Wood57933f82006-12-01 12:57:05 -06001130 .pvr_mask = 0x7fff0000,
1131 .pvr_value = 0x00850000,
1132 .cpu_name = "e300c3",
1133 .cpu_features = CPU_FTRS_E300,
1134 .cpu_user_features = COMMON_USER,
Kumar Gala2319f122009-03-19 03:55:41 +00001135 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1136 MMU_FTR_NEED_DTLB_SW_LRU,
Scott Wood57933f82006-12-01 12:57:05 -06001137 .icache_bsize = 32,
1138 .dcache_bsize = 32,
1139 .cpu_setup = __setup_cpu_603,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001140 .num_pmcs = 4,
1141 .oprofile_cpu_type = "ppc/e300",
1142 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Scott Wood57933f82006-12-01 12:57:05 -06001143 .platform = "ppc603",
1144 },
Li Yanga58d5242007-10-19 19:38:42 +08001145 { /* e300c4 (e300c1, plus one IU) */
1146 .pvr_mask = 0x7fff0000,
1147 .pvr_value = 0x00860000,
1148 .cpu_name = "e300c4",
1149 .cpu_features = CPU_FTRS_E300,
1150 .cpu_user_features = COMMON_USER,
Kumar Gala2319f122009-03-19 03:55:41 +00001151 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1152 MMU_FTR_NEED_DTLB_SW_LRU,
Li Yanga58d5242007-10-19 19:38:42 +08001153 .icache_bsize = 32,
1154 .dcache_bsize = 32,
1155 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001156 .machine_check = machine_check_generic,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001157 .num_pmcs = 4,
1158 .oprofile_cpu_type = "ppc/e300",
1159 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Li Yanga58d5242007-10-19 19:38:42 +08001160 .platform = "ppc603",
1161 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001162 { /* default match, we assume split I/D cache & TB (non-601)... */
1163 .pvr_mask = 0x00000000,
1164 .pvr_value = 0x00000000,
1165 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -05001166 .cpu_features = CPU_FTRS_CLASSIC32,
Stephen Rothwell49209602005-10-12 15:55:09 +10001167 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001168 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001169 .icache_bsize = 32,
1170 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001171 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001172 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001173 },
1174#endif /* CLASSIC_PPC */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001175#ifdef CONFIG_8xx
1176 { /* 8xx */
1177 .pvr_mask = 0xffff0000,
1178 .pvr_value = 0x00500000,
1179 .cpu_name = "8xx",
1180 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1181 * if the 8xx code is there.... */
Kumar Gala10b35d92005-09-23 14:08:58 -05001182 .cpu_features = CPU_FTRS_8XX,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001183 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001184 .mmu_features = MMU_FTR_TYPE_8xx,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001185 .icache_bsize = 16,
1186 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001187 .platform = "ppc823",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001188 },
1189#endif /* CONFIG_8xx */
1190#ifdef CONFIG_40x
1191 { /* 403GC */
1192 .pvr_mask = 0xffffff00,
1193 .pvr_value = 0x00200200,
1194 .cpu_name = "403GC",
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 { /* 403GCX */
1204 .pvr_mask = 0xffffff00,
1205 .pvr_value = 0x00201400,
1206 .cpu_name = "403GCX",
Kumar Gala10b35d92005-09-23 14:08:58 -05001207 .cpu_features = CPU_FTRS_40X,
Paul Mackerras98599012005-10-22 16:51:34 +10001208 .cpu_user_features = PPC_FEATURE_32 |
1209 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001210 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001211 .icache_bsize = 16,
1212 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001213 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001214 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001215 },
1216 { /* 403G ?? */
1217 .pvr_mask = 0xffff0000,
1218 .pvr_value = 0x00200000,
1219 .cpu_name = "403G ??",
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 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001222 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001223 .icache_bsize = 16,
1224 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001225 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001226 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001227 },
1228 { /* 405GP */
1229 .pvr_mask = 0xffff0000,
1230 .pvr_value = 0x40110000,
1231 .cpu_name = "405GP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001232 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001233 .cpu_user_features = PPC_FEATURE_32 |
1234 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001235 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001236 .icache_bsize = 32,
1237 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001238 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001239 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001240 },
1241 { /* STB 03xxx */
1242 .pvr_mask = 0xffff0000,
1243 .pvr_value = 0x40130000,
1244 .cpu_name = "STB03xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001245 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001246 .cpu_user_features = PPC_FEATURE_32 |
1247 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001248 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001249 .icache_bsize = 32,
1250 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001251 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001252 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001253 },
1254 { /* STB 04xxx */
1255 .pvr_mask = 0xffff0000,
1256 .pvr_value = 0x41810000,
1257 .cpu_name = "STB04xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001258 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001259 .cpu_user_features = PPC_FEATURE_32 |
1260 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001261 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001262 .icache_bsize = 32,
1263 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001264 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001265 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001266 },
1267 { /* NP405L */
1268 .pvr_mask = 0xffff0000,
1269 .pvr_value = 0x41610000,
1270 .cpu_name = "NP405L",
Kumar Gala10b35d92005-09-23 14:08:58 -05001271 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001272 .cpu_user_features = PPC_FEATURE_32 |
1273 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001274 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001275 .icache_bsize = 32,
1276 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001277 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001278 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001279 },
1280 { /* NP4GS3 */
1281 .pvr_mask = 0xffff0000,
1282 .pvr_value = 0x40B10000,
1283 .cpu_name = "NP4GS3",
Kumar Gala10b35d92005-09-23 14:08:58 -05001284 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001285 .cpu_user_features = PPC_FEATURE_32 |
1286 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001287 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001288 .icache_bsize = 32,
1289 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001290 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001291 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001292 },
1293 { /* NP405H */
1294 .pvr_mask = 0xffff0000,
1295 .pvr_value = 0x41410000,
1296 .cpu_name = "NP405H",
Kumar Gala10b35d92005-09-23 14:08:58 -05001297 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001298 .cpu_user_features = PPC_FEATURE_32 |
1299 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001300 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001301 .icache_bsize = 32,
1302 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001303 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001304 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001305 },
1306 { /* 405GPr */
1307 .pvr_mask = 0xffff0000,
1308 .pvr_value = 0x50910000,
1309 .cpu_name = "405GPr",
Kumar Gala10b35d92005-09-23 14:08:58 -05001310 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001311 .cpu_user_features = PPC_FEATURE_32 |
1312 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
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 { /* STBx25xx */
1320 .pvr_mask = 0xffff0000,
1321 .pvr_value = 0x51510000,
1322 .cpu_name = "STBx25xx",
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 },
1332 { /* 405LP */
1333 .pvr_mask = 0xffff0000,
1334 .pvr_value = 0x41F10000,
1335 .cpu_name = "405LP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001336 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001337 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001338 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001339 .icache_bsize = 32,
1340 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001341 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001342 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001343 },
1344 { /* Xilinx Virtex-II Pro */
Grant C. Likely72646c72006-01-19 01:13:20 -07001345 .pvr_mask = 0xfffff000,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001346 .pvr_value = 0x20010000,
1347 .cpu_name = "Virtex-II Pro",
Kumar Gala10b35d92005-09-23 14:08:58 -05001348 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001349 .cpu_user_features = PPC_FEATURE_32 |
1350 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001351 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001352 .icache_bsize = 32,
1353 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001354 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001355 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001356 },
Grant C. Likely72646c72006-01-19 01:13:20 -07001357 { /* Xilinx Virtex-4 FX */
1358 .pvr_mask = 0xfffff000,
1359 .pvr_value = 0x20011000,
1360 .cpu_name = "Virtex-4 FX",
1361 .cpu_features = CPU_FTRS_40X,
1362 .cpu_user_features = PPC_FEATURE_32 |
1363 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001364 .mmu_features = MMU_FTR_TYPE_40x,
Grant C. Likely72646c72006-01-19 01:13:20 -07001365 .icache_bsize = 32,
1366 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001367 .machine_check = machine_check_4xx,
Peter Bergner838fdb42006-09-14 14:18:38 -05001368 .platform = "ppc405",
Grant C. Likely72646c72006-01-19 01:13:20 -07001369 },
Eugene Suroveginad95d602005-06-07 13:22:09 -07001370 { /* 405EP */
1371 .pvr_mask = 0xffff0000,
1372 .pvr_value = 0x51210000,
1373 .cpu_name = "405EP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001374 .cpu_features = CPU_FTRS_40X,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001375 .cpu_user_features = PPC_FEATURE_32 |
1376 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001377 .mmu_features = MMU_FTR_TYPE_40x,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001378 .icache_bsize = 32,
1379 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001380 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001381 .platform = "ppc405",
Eugene Suroveginad95d602005-06-07 13:22:09 -07001382 },
Stefan Roese5d8476c2007-10-11 22:08:14 +10001383 { /* 405EX */
Stefan Roeseb676d842008-01-15 18:09:15 +11001384 .pvr_mask = 0xffff0004,
1385 .pvr_value = 0x12910004,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001386 .cpu_name = "405EX",
1387 .cpu_features = CPU_FTRS_40X,
1388 .cpu_user_features = PPC_FEATURE_32 |
1389 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001390 .mmu_features = MMU_FTR_TYPE_40x,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001391 .icache_bsize = 32,
1392 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001393 .machine_check = machine_check_4xx,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001394 .platform = "ppc405",
1395 },
Stefan Roeseb676d842008-01-15 18:09:15 +11001396 { /* 405EXr */
1397 .pvr_mask = 0xffff0004,
1398 .pvr_value = 0x12910000,
1399 .cpu_name = "405EXr",
1400 .cpu_features = CPU_FTRS_40X,
1401 .cpu_user_features = PPC_FEATURE_32 |
1402 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001403 .mmu_features = MMU_FTR_TYPE_40x,
Stefan Roeseb676d842008-01-15 18:09:15 +11001404 .icache_bsize = 32,
1405 .dcache_bsize = 32,
1406 .machine_check = machine_check_4xx,
1407 .platform = "ppc405",
1408 },
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001409 {
1410 /* 405EZ */
1411 .pvr_mask = 0xffff0000,
1412 .pvr_value = 0x41510000,
1413 .cpu_name = "405EZ",
1414 .cpu_features = CPU_FTRS_40X,
1415 .cpu_user_features = PPC_FEATURE_32 |
1416 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001417 .mmu_features = MMU_FTR_TYPE_40x,
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001418 .icache_bsize = 32,
1419 .dcache_bsize = 32,
1420 .machine_check = machine_check_4xx,
1421 .platform = "ppc405",
1422 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001423 { /* default match */
1424 .pvr_mask = 0x00000000,
1425 .pvr_value = 0x00000000,
1426 .cpu_name = "(generic 40x PPC)",
1427 .cpu_features = CPU_FTRS_40X,
1428 .cpu_user_features = PPC_FEATURE_32 |
1429 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001430 .mmu_features = MMU_FTR_TYPE_40x,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001431 .icache_bsize = 32,
1432 .dcache_bsize = 32,
1433 .machine_check = machine_check_4xx,
1434 .platform = "ppc405",
1435 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001436
1437#endif /* CONFIG_40x */
1438#ifdef CONFIG_44x
Matt Porterc9cf73a2005-07-31 22:34:52 -07001439 {
1440 .pvr_mask = 0xf0000fff,
1441 .pvr_value = 0x40000850,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001442 .cpu_name = "440GR Rev. A",
1443 .cpu_features = CPU_FTRS_44X,
1444 .cpu_user_features = COMMON_USER_BOOKE,
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 },
1451 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1452 .pvr_mask = 0xf0000fff,
1453 .pvr_value = 0x40000858,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001454 .cpu_name = "440EP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001455 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001456 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001457 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001458 .icache_bsize = 32,
1459 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001460 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001461 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001462 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001463 },
1464 {
1465 .pvr_mask = 0xf0000fff,
1466 .pvr_value = 0x400008d3,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001467 .cpu_name = "440GR Rev. B",
1468 .cpu_features = CPU_FTRS_44X,
1469 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001470 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001471 .icache_bsize = 32,
1472 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001473 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001474 .platform = "ppc440",
1475 },
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001476 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1477 .pvr_mask = 0xf0000ff7,
1478 .pvr_value = 0x400008d4,
1479 .cpu_name = "440EP Rev. C",
1480 .cpu_features = CPU_FTRS_44X,
1481 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001482 .mmu_features = MMU_FTR_TYPE_44x,
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001483 .icache_bsize = 32,
1484 .dcache_bsize = 32,
1485 .cpu_setup = __setup_cpu_440ep,
1486 .machine_check = machine_check_4xx,
1487 .platform = "ppc440",
1488 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001489 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1490 .pvr_mask = 0xf0000fff,
1491 .pvr_value = 0x400008db,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001492 .cpu_name = "440EP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001493 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001494 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001495 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001496 .icache_bsize = 32,
1497 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001498 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001499 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001500 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001501 },
Valentine Barshak15fc9932007-08-29 17:40:30 +04001502 { /* 440GRX */
1503 .pvr_mask = 0xf0000ffb,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001504 .pvr_value = 0x200008D0,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001505 .cpu_name = "440GRX",
1506 .cpu_features = CPU_FTRS_44X,
1507 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001508 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001509 .icache_bsize = 32,
1510 .dcache_bsize = 32,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001511 .cpu_setup = __setup_cpu_440grx,
Valentine Barshakb2be3b12007-12-22 03:22:23 +11001512 .machine_check = machine_check_440A,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001513 .platform = "ppc440",
Valentine Barshak15fc9932007-08-29 17:40:30 +04001514 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001515 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1516 .pvr_mask = 0xf0000ffb,
1517 .pvr_value = 0x200008D8,
1518 .cpu_name = "440EPX",
1519 .cpu_features = CPU_FTRS_44X,
1520 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001521 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001522 .icache_bsize = 32,
1523 .dcache_bsize = 32,
1524 .cpu_setup = __setup_cpu_440epx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001525 .machine_check = machine_check_440A,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001526 .platform = "ppc440",
1527 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001528 { /* 440GP Rev. B */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001529 .pvr_mask = 0xf0000fff,
1530 .pvr_value = 0x40000440,
1531 .cpu_name = "440GP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001532 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001533 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001534 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001535 .icache_bsize = 32,
1536 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001537 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001538 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001539 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001540 { /* 440GP Rev. C */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001541 .pvr_mask = 0xf0000fff,
1542 .pvr_value = 0x40000481,
1543 .cpu_name = "440GP Rev. C",
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 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001550 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001551 },
1552 { /* 440GX Rev. A */
1553 .pvr_mask = 0xf0000fff,
1554 .pvr_value = 0x50000850,
1555 .cpu_name = "440GX Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001556 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001557 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001558 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001559 .icache_bsize = 32,
1560 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001561 .cpu_setup = __setup_cpu_440gx,
1562 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001563 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001564 },
1565 { /* 440GX Rev. B */
1566 .pvr_mask = 0xf0000fff,
1567 .pvr_value = 0x50000851,
1568 .cpu_name = "440GX Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001569 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001570 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001571 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001572 .icache_bsize = 32,
1573 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001574 .cpu_setup = __setup_cpu_440gx,
1575 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001576 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001577 },
1578 { /* 440GX Rev. C */
1579 .pvr_mask = 0xf0000fff,
1580 .pvr_value = 0x50000892,
1581 .cpu_name = "440GX Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001582 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001583 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001584 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001585 .icache_bsize = 32,
1586 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001587 .cpu_setup = __setup_cpu_440gx,
1588 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001589 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001590 },
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001591 { /* 440GX Rev. F */
1592 .pvr_mask = 0xf0000fff,
1593 .pvr_value = 0x50000894,
1594 .cpu_name = "440GX Rev. F",
Kumar Gala10b35d92005-09-23 14:08:58 -05001595 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001596 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001597 .mmu_features = MMU_FTR_TYPE_44x,
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001598 .icache_bsize = 32,
1599 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001600 .cpu_setup = __setup_cpu_440gx,
1601 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001602 .platform = "ppc440",
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001603 },
Matt Porter656de7e2005-09-03 15:55:42 -07001604 { /* 440SP Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001605 .pvr_mask = 0xfff00fff,
1606 .pvr_value = 0x53200891,
Matt Porter656de7e2005-09-03 15:55:42 -07001607 .cpu_name = "440SP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001608 .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,
Matt Porter656de7e2005-09-03 15:55:42 -07001611 .icache_bsize = 32,
1612 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001613 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001614 .platform = "ppc440",
Matt Porter656de7e2005-09-03 15:55:42 -07001615 },
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001616 { /* 440SPe Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001617 .pvr_mask = 0xfff00fff,
1618 .pvr_value = 0x53400890,
1619 .cpu_name = "440SPe Rev. A",
1620 .cpu_features = CPU_FTRS_44X,
1621 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001622 .mmu_features = MMU_FTR_TYPE_44x,
Roland Dreier333e6152007-06-16 05:36:32 +10001623 .icache_bsize = 32,
1624 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001625 .cpu_setup = __setup_cpu_440spe,
1626 .machine_check = machine_check_440A,
Roland Dreier333e6152007-06-16 05:36:32 +10001627 .platform = "ppc440",
1628 },
1629 { /* 440SPe Rev. B */
1630 .pvr_mask = 0xfff00fff,
1631 .pvr_value = 0x53400891,
1632 .cpu_name = "440SPe Rev. B",
Kumar Galaa147c582006-12-08 02:34:38 -06001633 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001634 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001635 .mmu_features = MMU_FTR_TYPE_44x,
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001636 .icache_bsize = 32,
1637 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001638 .cpu_setup = __setup_cpu_440spe,
1639 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001640 .platform = "ppc440",
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001641 },
John Linn23e72372008-07-01 09:42:07 -07001642 { /* 440 in Xilinx Virtex-5 FXT */
1643 .pvr_mask = 0xfffffff0,
1644 .pvr_value = 0x7ff21910,
1645 .cpu_name = "440 in Virtex-5 FXT",
1646 .cpu_features = CPU_FTRS_44X,
1647 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001648 .mmu_features = MMU_FTR_TYPE_44x,
John Linn23e72372008-07-01 09:42:07 -07001649 .icache_bsize = 32,
1650 .dcache_bsize = 32,
Grant Likely640d17d2008-12-04 05:39:55 +00001651 .cpu_setup = __setup_cpu_440x5,
1652 .machine_check = machine_check_440A,
John Linn23e72372008-07-01 09:42:07 -07001653 .platform = "ppc440",
1654 },
Stefan Roese464076a2008-02-24 08:07:41 +11001655 { /* 460EX */
Stefan Roese20d70342009-07-29 07:04:46 +00001656 .pvr_mask = 0xffff0006,
Stefan Roese464076a2008-02-24 08:07:41 +11001657 .pvr_value = 0x13020002,
1658 .cpu_name = "460EX",
Benjamin Herrenschmidt6d2170b2008-12-18 19:13:22 +00001659 .cpu_features = CPU_FTRS_440x6,
Stefan Roese464076a2008-02-24 08:07:41 +11001660 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001661 .mmu_features = MMU_FTR_TYPE_44x,
Stefan Roese464076a2008-02-24 08:07:41 +11001662 .icache_bsize = 32,
1663 .dcache_bsize = 32,
1664 .cpu_setup = __setup_cpu_460ex,
1665 .machine_check = machine_check_440A,
1666 .platform = "ppc440",
1667 },
Stefan Roese20d70342009-07-29 07:04:46 +00001668 { /* 460EX Rev B */
1669 .pvr_mask = 0xffff0007,
1670 .pvr_value = 0x13020004,
1671 .cpu_name = "460EX Rev. B",
1672 .cpu_features = CPU_FTRS_440x6,
1673 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1674 .mmu_features = MMU_FTR_TYPE_44x,
1675 .icache_bsize = 32,
1676 .dcache_bsize = 32,
1677 .cpu_setup = __setup_cpu_460ex,
1678 .machine_check = machine_check_440A,
1679 .platform = "ppc440",
1680 },
Stefan Roese464076a2008-02-24 08:07:41 +11001681 { /* 460GT */
Stefan Roese20d70342009-07-29 07:04:46 +00001682 .pvr_mask = 0xffff0006,
Stefan Roese464076a2008-02-24 08:07:41 +11001683 .pvr_value = 0x13020000,
1684 .cpu_name = "460GT",
Benjamin Herrenschmidt6d2170b2008-12-18 19:13:22 +00001685 .cpu_features = CPU_FTRS_440x6,
Josh Boyer939e6222008-06-11 07:52:40 -04001686 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001687 .mmu_features = MMU_FTR_TYPE_44x,
Stefan Roese464076a2008-02-24 08:07:41 +11001688 .icache_bsize = 32,
1689 .dcache_bsize = 32,
Josh Boyer939e6222008-06-11 07:52:40 -04001690 .cpu_setup = __setup_cpu_460gt,
Stefan Roese464076a2008-02-24 08:07:41 +11001691 .machine_check = machine_check_440A,
1692 .platform = "ppc440",
1693 },
Stefan Roese20d70342009-07-29 07:04:46 +00001694 { /* 460GT Rev B */
1695 .pvr_mask = 0xffff0007,
1696 .pvr_value = 0x13020005,
1697 .cpu_name = "460GT Rev. B",
1698 .cpu_features = CPU_FTRS_440x6,
1699 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1700 .mmu_features = MMU_FTR_TYPE_44x,
1701 .icache_bsize = 32,
1702 .dcache_bsize = 32,
1703 .cpu_setup = __setup_cpu_460gt,
1704 .machine_check = machine_check_440A,
1705 .platform = "ppc440",
1706 },
Madhulika Madishetty6c712092009-02-05 13:31:36 +00001707 { /* 460SX */
1708 .pvr_mask = 0xffffff00,
1709 .pvr_value = 0x13541800,
1710 .cpu_name = "460SX",
1711 .cpu_features = CPU_FTRS_44X,
1712 .cpu_user_features = COMMON_USER_BOOKE,
1713 .mmu_features = MMU_FTR_TYPE_44x,
1714 .icache_bsize = 32,
1715 .dcache_bsize = 32,
1716 .cpu_setup = __setup_cpu_460sx,
1717 .machine_check = machine_check_440A,
1718 .platform = "ppc440",
1719 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001720 { /* default match */
1721 .pvr_mask = 0x00000000,
1722 .pvr_value = 0x00000000,
1723 .cpu_name = "(generic 44x PPC)",
1724 .cpu_features = CPU_FTRS_44X,
1725 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001726 .mmu_features = MMU_FTR_TYPE_44x,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001727 .icache_bsize = 32,
1728 .dcache_bsize = 32,
1729 .machine_check = machine_check_4xx,
1730 .platform = "ppc440",
1731 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001732#endif /* CONFIG_44x */
Josh Boyere3e414b2007-12-24 08:44:47 -06001733#ifdef CONFIG_E200
Stephen Rothwell49209602005-10-12 15:55:09 +10001734 { /* e200z5 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001735 .pvr_mask = 0xfff00000,
1736 .pvr_value = 0x81000000,
1737 .cpu_name = "e200z5",
1738 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001739 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001740 .cpu_user_features = COMMON_USER_BOOKE |
1741 PPC_FEATURE_HAS_EFP_SINGLE |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001742 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001743 .mmu_features = MMU_FTR_TYPE_FSL_E,
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001744 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001745 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001746 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001747 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001748 { /* e200z6 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001749 .pvr_mask = 0xfff00000,
1750 .pvr_value = 0x81100000,
1751 .cpu_name = "e200z6",
1752 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001753 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001754 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001755 PPC_FEATURE_HAS_SPE_COMP |
1756 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001757 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001758 .mmu_features = MMU_FTR_TYPE_FSL_E,
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001759 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001760 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001761 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001762 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001763 { /* default match */
1764 .pvr_mask = 0x00000000,
1765 .pvr_value = 0x00000000,
1766 .cpu_name = "(generic E200 PPC)",
1767 .cpu_features = CPU_FTRS_E200,
1768 .cpu_user_features = COMMON_USER_BOOKE |
1769 PPC_FEATURE_HAS_EFP_SINGLE |
1770 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001771 .mmu_features = MMU_FTR_TYPE_FSL_E,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001772 .dcache_bsize = 32,
Kumar Gala105c31d2009-01-08 08:31:20 -06001773 .cpu_setup = __setup_cpu_e200,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001774 .machine_check = machine_check_e200,
1775 .platform = "ppc5554",
Paul Mackerras516c8be2008-05-12 14:20:35 +10001776 }
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001777#endif /* CONFIG_E200 */
1778#ifdef CONFIG_E500
Stephen Rothwell49209602005-10-12 15:55:09 +10001779 { /* e500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001780 .pvr_mask = 0xffff0000,
1781 .pvr_value = 0x80200000,
1782 .cpu_name = "e500",
Kumar Gala10b35d92005-09-23 14:08:58 -05001783 .cpu_features = CPU_FTRS_E500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001784 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001785 PPC_FEATURE_HAS_SPE_COMP |
1786 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001787 .mmu_features = MMU_FTR_TYPE_FSL_E,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001788 .icache_bsize = 32,
1789 .dcache_bsize = 32,
1790 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001791 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001792 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06001793 .cpu_setup = __setup_cpu_e500v1,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001794 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001795 .platform = "ppc8540",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001796 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001797 { /* e500v2 */
Kumar Gala5b37b702005-06-21 17:15:18 -07001798 .pvr_mask = 0xffff0000,
1799 .pvr_value = 0x80210000,
1800 .cpu_name = "e500v2",
Kumar Gala10b35d92005-09-23 14:08:58 -05001801 .cpu_features = CPU_FTRS_E500_2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001802 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001803 PPC_FEATURE_HAS_SPE_COMP |
1804 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1805 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001806 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS,
Kumar Gala5b37b702005-06-21 17:15:18 -07001807 .icache_bsize = 32,
1808 .dcache_bsize = 32,
1809 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001810 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001811 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06001812 .cpu_setup = __setup_cpu_e500v2,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001813 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001814 .platform = "ppc8548",
Kumar Gala5b37b702005-06-21 17:15:18 -07001815 },
Kumar Gala3dfa8772008-06-16 09:41:32 -05001816 { /* e500mc */
1817 .pvr_mask = 0xffff0000,
1818 .pvr_value = 0x80230000,
1819 .cpu_name = "e500mc",
Kumar Gala3dfa8772008-06-16 09:41:32 -05001820 .cpu_features = CPU_FTRS_E500MC,
1821 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Kumar Galac3071952009-02-10 22:26:06 -06001822 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
Kumar Gala323d23a2009-04-23 08:51:22 -05001823 MMU_FTR_USE_TLBILX,
Kumar Gala3dfa8772008-06-16 09:41:32 -05001824 .icache_bsize = 64,
1825 .dcache_bsize = 64,
1826 .num_pmcs = 4,
1827 .oprofile_cpu_type = "ppc/e500", /* xxx - galak, e500mc? */
1828 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06001829 .cpu_setup = __setup_cpu_e500mc,
Kumar Gala3dfa8772008-06-16 09:41:32 -05001830 .machine_check = machine_check_e500,
1831 .platform = "ppce500mc",
1832 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001833 { /* default match */
1834 .pvr_mask = 0x00000000,
1835 .pvr_value = 0x00000000,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001836 .cpu_name = "(generic E500 PPC)",
1837 .cpu_features = CPU_FTRS_E500,
1838 .cpu_user_features = COMMON_USER_BOOKE |
1839 PPC_FEATURE_HAS_SPE_COMP |
1840 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001841 .mmu_features = MMU_FTR_TYPE_FSL_E,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001842 .icache_bsize = 32,
1843 .dcache_bsize = 32,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001844 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001845 .platform = "powerpc",
Paul Mackerras516c8be2008-05-12 14:20:35 +10001846 }
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001847#endif /* CONFIG_E500 */
Stephen Rothwell49209602005-10-12 15:55:09 +10001848#endif /* CONFIG_PPC32 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001849};
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001850
Paul Mackerras87a72f92007-10-04 14:18:01 +10001851static struct cpu_spec the_cpu_spec;
1852
Michael Ellerman666435b2009-02-22 16:25:43 +00001853static void __init setup_cpu_spec(unsigned long offset, struct cpu_spec *s)
1854{
1855 struct cpu_spec *t = &the_cpu_spec;
Michael Ellerman2657dd42009-02-22 16:25:45 +00001856 struct cpu_spec old;
1857
Michael Ellerman666435b2009-02-22 16:25:43 +00001858 t = PTRRELOC(t);
Michael Ellerman2657dd42009-02-22 16:25:45 +00001859 old = *t;
1860
1861 /* Copy everything, then do fixups */
1862 *t = *s;
Michael Ellerman666435b2009-02-22 16:25:43 +00001863
1864 /*
1865 * If we are overriding a previous value derived from the real
1866 * PVR with a new value obtained using a logical PVR value,
1867 * don't modify the performance monitor fields.
1868 */
Michael Ellerman2657dd42009-02-22 16:25:45 +00001869 if (old.num_pmcs && !s->num_pmcs) {
1870 t->num_pmcs = old.num_pmcs;
1871 t->pmc_type = old.pmc_type;
1872 t->oprofile_type = old.oprofile_type;
1873 t->oprofile_mmcra_sihv = old.oprofile_mmcra_sihv;
1874 t->oprofile_mmcra_sipr = old.oprofile_mmcra_sipr;
1875 t->oprofile_mmcra_clear = old.oprofile_mmcra_clear;
1876
Michael Ellerman666435b2009-02-22 16:25:43 +00001877 /*
1878 * If we have passed through this logic once before and
1879 * have pulled the default case because the real PVR was
1880 * not found inside cpu_specs[], then we are possibly
1881 * running in compatibility mode. In that case, let the
1882 * oprofiler know which set of compatibility counters to
1883 * pull from by making sure the oprofile_cpu_type string
1884 * is set to that of compatibility mode. If the
1885 * oprofile_cpu_type already has a value, then we are
1886 * possibly overriding a real PVR with a logical one,
1887 * and, in that case, keep the current value for
1888 * oprofile_cpu_type.
1889 */
Benjamin Herrenschmidtb173f032009-05-14 18:34:06 +00001890 if (old.oprofile_cpu_type != NULL) {
Benjamin Herrenschmidt0203d6e2009-04-29 19:39:38 +00001891 t->oprofile_cpu_type = old.oprofile_cpu_type;
1892 t->oprofile_type = old.oprofile_type;
Michael Wolf79af6c42009-04-27 06:17:54 +00001893 }
Michael Ellerman2657dd42009-02-22 16:25:45 +00001894 }
Michael Ellerman666435b2009-02-22 16:25:43 +00001895
1896 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
1897
1898 /*
1899 * Set the base platform string once; assumes
1900 * we're called with real pvr first.
1901 */
1902 if (*PTRRELOC(&powerpc_base_platform) == NULL)
1903 *PTRRELOC(&powerpc_base_platform) = t->platform;
1904
1905#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
1906 /* ppc64 and booke expect identify_cpu to also call setup_cpu for
1907 * that processor. I will consolidate that at a later time, for now,
1908 * just use #ifdef. We also don't need to PTRRELOC the function
1909 * pointer on ppc64 and booke as we are running at 0 in real mode
1910 * on ppc64 and reloc_offset is always 0 on booke.
1911 */
1912 if (s->cpu_setup) {
1913 s->cpu_setup(offset, s);
1914 }
1915#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
1916}
1917
Paul Mackerras87a72f92007-10-04 14:18:01 +10001918struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001919{
1920 struct cpu_spec *s = cpu_specs;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001921 int i;
1922
1923 s = PTRRELOC(s);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001924
Michael Ellerman666435b2009-02-22 16:25:43 +00001925 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) {
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001926 if ((pvr & s->pvr_mask) == s->pvr_value) {
Michael Ellerman666435b2009-02-22 16:25:43 +00001927 setup_cpu_spec(offset, s);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001928 return s;
1929 }
Michael Ellerman666435b2009-02-22 16:25:43 +00001930 }
1931
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001932 BUG();
Michael Ellerman666435b2009-02-22 16:25:43 +00001933
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001934 return NULL;
1935}