blob: cd1b687544f30e4d74b9cf5ebd76c4c10bcbb718 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Linus Torvalds1da177e2005-04-16 15:20:36 -07002 * Copyright (C) 2001 Ben. Herrenschmidt (benh@kernel.crashing.org)
3 *
Stephen Rothwell49209602005-10-12 15:55:09 +10004 * Modifications for ppc64:
5 * Copyright (C) 2003 Dave Engebretsen <engebret@us.ibm.com>
6 *
Linus Torvalds1da177e2005-04-16 15:20:36 -07007 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version
10 * 2 of the License, or (at your option) any later version.
11 */
12
Linus Torvalds1da177e2005-04-16 15:20:36 -070013#include <linux/string.h>
14#include <linux/sched.h>
15#include <linux/threads.h>
16#include <linux/init.h>
Kumar Gala400d2212005-09-27 15:13:12 -050017#include <linux/module.h>
18
19#include <asm/oprofile_impl.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070020#include <asm/cputable.h>
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +100021#include <asm/prom.h> /* for PTRRELOC on ARCH=ppc */
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +000022#include <asm/mmu.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070023
Kumar Gala400d2212005-09-27 15:13:12 -050024struct cpu_spec* cur_cpu_spec = NULL;
Stephen Rothwell49209602005-10-12 15:55:09 +100025EXPORT_SYMBOL(cur_cpu_spec);
Linus Torvalds1da177e2005-04-16 15:20:36 -070026
Nathan Lynch9115d132008-07-16 09:58:51 +100027/* The platform string corresponding to the real PVR */
28const char *powerpc_base_platform;
29
Stephen Rothwell49209602005-10-12 15:55:09 +100030/* NOTE:
31 * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's
32 * the responsibility of the appropriate CPU save/restore functions to
33 * eventually copy these settings over. Those save/restore aren't yet
34 * part of the cputable though. That has to be fixed for both ppc32
35 * and ppc64
36 */
Geoff Levandb26f1002006-05-19 14:24:18 +100037#ifdef CONFIG_PPC32
Kumar Gala105c31d2009-01-08 08:31:20 -060038extern void __setup_cpu_e200(unsigned long offset, struct cpu_spec* spec);
39extern void __setup_cpu_e500v1(unsigned long offset, struct cpu_spec* spec);
40extern void __setup_cpu_e500v2(unsigned long offset, struct cpu_spec* spec);
41extern void __setup_cpu_e500mc(unsigned long offset, struct cpu_spec* spec);
Valentine Barshak81127532007-09-22 00:46:57 +100042extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
43extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110044extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
Valentine Barshak340ffd22007-09-22 00:50:09 +100045extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110046extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
Grant Likely640d17d2008-12-04 05:39:55 +000047extern void __setup_cpu_440x5(unsigned long offset, struct cpu_spec* spec);
Stefan Roese464076a2008-02-24 08:07:41 +110048extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec);
Josh Boyer939e6222008-06-11 07:52:40 -040049extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec);
Madhulika Madishetty6c712092009-02-05 13:31:36 +000050extern void __setup_cpu_460sx(unsigned long offset, struct cpu_spec *spec);
Kumar Gala400d2212005-09-27 15:13:12 -050051extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
52extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
53extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
54extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
55extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
56extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
57extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
58extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell49209602005-10-12 15:55:09 +100059#endif /* CONFIG_PPC32 */
Olof Johanssonf39b7a52006-08-11 00:07:08 -050060#ifdef CONFIG_PPC64
Kumar Gala400d2212005-09-27 15:13:12 -050061extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
Olof Johansson5b43d202006-10-04 23:41:41 -050062extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
Olof Johansson11999192007-02-04 16:36:51 -060063extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell40d244d2007-02-12 22:10:48 +110064extern void __restore_cpu_pa6t(void);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050065extern void __restore_cpu_ppc970(void);
Michael Neulinge952e6c2008-06-18 10:47:26 +100066extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec);
67extern void __restore_cpu_power7(void);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050068#endif /* CONFIG_PPC64 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070069
Linus Torvalds1da177e2005-04-16 15:20:36 -070070/* This table only contains "desktop" CPUs, it need to be filled with embedded
71 * ones as well...
72 */
Stephen Rothwell49209602005-10-12 15:55:09 +100073#define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
74 PPC_FEATURE_HAS_MMU)
75#define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +110076#define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +110077#define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
78 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
79#define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
80 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
Anton Blanchard03054d52006-04-29 09:51:06 +100081#define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
Paul Mackerrasfab5db92006-06-07 16:14:40 +100082 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
Nathan Lynch0f473312008-07-10 01:06:57 +100083 PPC_FEATURE_TRUE_LE | \
84 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Michael Neulinge952e6c2008-06-18 10:47:26 +100085#define COMMON_USER_POWER7 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
86 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
Nathan Lynch0f473312008-07-10 01:06:57 +100087 PPC_FEATURE_TRUE_LE | \
88 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -050089#define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
90 PPC_FEATURE_TRUE_LE | \
91 PPC_FEATURE_HAS_ALTIVEC_COMP)
Paul Mackerras80f15dc2006-01-14 10:11:39 +110092#define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
93 PPC_FEATURE_BOOKE)
Linus Torvalds1da177e2005-04-16 15:20:36 -070094
Paul Mackerras87a72f92007-10-04 14:18:01 +100095static struct cpu_spec __initdata cpu_specs[] = {
Stephen Rothwell49209602005-10-12 15:55:09 +100096#ifdef CONFIG_PPC64
97 { /* Power3 */
98 .pvr_mask = 0xffff0000,
99 .pvr_value = 0x00400000,
100 .cpu_name = "POWER3 (630)",
101 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000102 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000103 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000104 .icache_bsize = 128,
105 .dcache_bsize = 128,
106 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600107 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000108 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000109 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100110 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100111 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +1000112 },
113 { /* Power3+ */
114 .pvr_mask = 0xffff0000,
115 .pvr_value = 0x00410000,
116 .cpu_name = "POWER3 (630+)",
117 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000118 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000119 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000120 .icache_bsize = 128,
121 .dcache_bsize = 128,
122 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600123 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000124 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000125 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100126 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100127 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +1000128 },
129 { /* Northstar */
130 .pvr_mask = 0xffff0000,
131 .pvr_value = 0x00330000,
132 .cpu_name = "RS64-II (northstar)",
133 .cpu_features = CPU_FTRS_RS64,
134 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000135 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000136 .icache_bsize = 128,
137 .dcache_bsize = 128,
138 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600139 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000140 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000141 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100142 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100143 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000144 },
145 { /* Pulsar */
146 .pvr_mask = 0xffff0000,
147 .pvr_value = 0x00340000,
148 .cpu_name = "RS64-III (pulsar)",
149 .cpu_features = CPU_FTRS_RS64,
150 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000151 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000152 .icache_bsize = 128,
153 .dcache_bsize = 128,
154 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600155 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000156 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000157 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100158 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100159 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000160 },
161 { /* I-star */
162 .pvr_mask = 0xffff0000,
163 .pvr_value = 0x00360000,
164 .cpu_name = "RS64-III (icestar)",
165 .cpu_features = CPU_FTRS_RS64,
166 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000167 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000168 .icache_bsize = 128,
169 .dcache_bsize = 128,
170 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600171 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000172 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000173 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100174 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100175 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000176 },
177 { /* S-star */
178 .pvr_mask = 0xffff0000,
179 .pvr_value = 0x00370000,
180 .cpu_name = "RS64-IV (sstar)",
181 .cpu_features = CPU_FTRS_RS64,
182 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000183 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000184 .icache_bsize = 128,
185 .dcache_bsize = 128,
186 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600187 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000188 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000189 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100190 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100191 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000192 },
193 { /* Power4 */
194 .pvr_mask = 0xffff0000,
195 .pvr_value = 0x00350000,
196 .cpu_name = "POWER4 (gp)",
197 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100198 .cpu_user_features = COMMON_USER_POWER4,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000199 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000200 .icache_bsize = 128,
201 .dcache_bsize = 128,
202 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600203 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000204 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000205 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100206 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100207 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000208 },
209 { /* Power4+ */
210 .pvr_mask = 0xffff0000,
211 .pvr_value = 0x00380000,
212 .cpu_name = "POWER4+ (gq)",
213 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100214 .cpu_user_features = COMMON_USER_POWER4,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000215 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000216 .icache_bsize = 128,
217 .dcache_bsize = 128,
218 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600219 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000220 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000221 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100222 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100223 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000224 },
225 { /* PPC970 */
226 .pvr_mask = 0xffff0000,
227 .pvr_value = 0x00390000,
228 .cpu_name = "PPC970",
229 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100230 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000231 PPC_FEATURE_HAS_ALTIVEC_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000232 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000233 .icache_bsize = 128,
234 .dcache_bsize = 128,
235 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600236 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000237 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500238 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000239 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000240 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100241 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100242 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000243 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000244 { /* PPC970FX */
245 .pvr_mask = 0xffff0000,
246 .pvr_value = 0x003c0000,
247 .cpu_name = "PPC970FX",
Stephen Rothwell49209602005-10-12 15:55:09 +1000248 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100249 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000250 PPC_FEATURE_HAS_ALTIVEC_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000251 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000252 .icache_bsize = 128,
253 .dcache_bsize = 128,
254 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600255 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000256 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500257 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000258 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000259 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100260 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100261 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000262 },
Olof Johansson3546e812007-02-26 00:35:14 -0600263 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
264 .pvr_mask = 0xffffffff,
265 .pvr_value = 0x00440100,
266 .cpu_name = "PPC970MP",
267 .cpu_features = CPU_FTRS_PPC970,
268 .cpu_user_features = COMMON_USER_POWER4 |
269 PPC_FEATURE_HAS_ALTIVEC_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000270 .mmu_features = MMU_FTR_HPTE_TABLE,
Olof Johansson3546e812007-02-26 00:35:14 -0600271 .icache_bsize = 128,
272 .dcache_bsize = 128,
273 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000274 .pmc_type = PPC_PMC_IBM,
Olof Johansson3546e812007-02-26 00:35:14 -0600275 .cpu_setup = __setup_cpu_ppc970,
276 .cpu_restore = __restore_cpu_ppc970,
277 .oprofile_cpu_type = "ppc64/970MP",
278 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100279 .machine_check = machine_check_generic,
Olof Johansson3546e812007-02-26 00:35:14 -0600280 .platform = "ppc970",
281 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000282 { /* PPC970MP */
283 .pvr_mask = 0xffff0000,
284 .pvr_value = 0x00440000,
285 .cpu_name = "PPC970MP",
286 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100287 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000288 PPC_FEATURE_HAS_ALTIVEC_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000289 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000290 .icache_bsize = 128,
291 .dcache_bsize = 128,
Anton Blanchard87af41b2006-05-05 05:44:26 +1000292 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000293 .pmc_type = PPC_PMC_IBM,
Olof Johansson5b43d202006-10-04 23:41:41 -0500294 .cpu_setup = __setup_cpu_ppc970MP,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500295 .cpu_restore = __restore_cpu_ppc970,
Mike Wolffecb3522006-11-21 14:41:54 -0600296 .oprofile_cpu_type = "ppc64/970MP",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000297 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100298 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100299 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000300 },
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500301 { /* PPC970GX */
302 .pvr_mask = 0xffff0000,
303 .pvr_value = 0x00450000,
304 .cpu_name = "PPC970GX",
305 .cpu_features = CPU_FTRS_PPC970,
306 .cpu_user_features = COMMON_USER_POWER4 |
307 PPC_FEATURE_HAS_ALTIVEC_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000308 .mmu_features = MMU_FTR_HPTE_TABLE,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500309 .icache_bsize = 128,
310 .dcache_bsize = 128,
311 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600312 .pmc_type = PPC_PMC_IBM,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500313 .cpu_setup = __setup_cpu_ppc970,
314 .oprofile_cpu_type = "ppc64/970",
315 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100316 .machine_check = machine_check_generic,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500317 .platform = "ppc970",
318 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100319 { /* Power5 GR */
Stephen Rothwell49209602005-10-12 15:55:09 +1000320 .pvr_mask = 0xffff0000,
321 .pvr_value = 0x003a0000,
322 .cpu_name = "POWER5 (gr)",
323 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100324 .cpu_user_features = COMMON_USER_POWER5,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000325 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000326 .icache_bsize = 128,
327 .dcache_bsize = 128,
328 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600329 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000330 .oprofile_cpu_type = "ppc64/power5",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000331 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000332 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
333 * and above but only works on POWER5 and above
334 */
335 .oprofile_mmcra_sihv = MMCRA_SIHV,
336 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100337 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100338 .platform = "power5",
Stephen Rothwell49209602005-10-12 15:55:09 +1000339 },
Mike Wolf31a12ce2007-07-10 13:13:47 -0500340 { /* Power5++ */
341 .pvr_mask = 0xffffff00,
342 .pvr_value = 0x003b0300,
343 .cpu_name = "POWER5+ (gs)",
344 .cpu_features = CPU_FTRS_POWER5,
345 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000346 .mmu_features = MMU_FTR_HPTE_TABLE,
Mike Wolf31a12ce2007-07-10 13:13:47 -0500347 .icache_bsize = 128,
348 .dcache_bsize = 128,
349 .num_pmcs = 6,
350 .oprofile_cpu_type = "ppc64/power5++",
351 .oprofile_type = PPC_OPROFILE_POWER4,
352 .oprofile_mmcra_sihv = MMCRA_SIHV,
353 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100354 .machine_check = machine_check_generic,
Mike Wolf31a12ce2007-07-10 13:13:47 -0500355 .platform = "power5+",
356 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100357 { /* Power5 GS */
Stephen Rothwell49209602005-10-12 15:55:09 +1000358 .pvr_mask = 0xffff0000,
359 .pvr_value = 0x003b0000,
Anton Blanchard834608f2006-01-09 15:42:30 +1100360 .cpu_name = "POWER5+ (gs)",
Stephen Rothwell49209602005-10-12 15:55:09 +1000361 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100362 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000363 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000364 .icache_bsize = 128,
365 .dcache_bsize = 128,
366 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600367 .pmc_type = PPC_PMC_IBM,
Anton Blanchard834608f2006-01-09 15:42:30 +1100368 .oprofile_cpu_type = "ppc64/power5+",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000369 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000370 .oprofile_mmcra_sihv = MMCRA_SIHV,
371 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100372 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100373 .platform = "power5+",
Stephen Rothwell49209602005-10-12 15:55:09 +1000374 },
Paul Mackerras974a76f2006-11-10 20:38:53 +1100375 { /* POWER6 in P5+ mode; 2.04-compliant processor */
376 .pvr_mask = 0xffffffff,
377 .pvr_value = 0x0f000001,
378 .cpu_name = "POWER5+",
379 .cpu_features = CPU_FTRS_POWER5,
380 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000381 .mmu_features = MMU_FTR_HPTE_TABLE,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100382 .icache_bsize = 128,
383 .dcache_bsize = 128,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100384 .machine_check = machine_check_generic,
Torez Smith79e25ba2008-07-18 06:42:07 +1000385 .oprofile_cpu_type = "ppc64/compat-power5+",
Paul Mackerras974a76f2006-11-10 20:38:53 +1100386 .platform = "power5+",
387 },
Anton Blanchard03054d52006-04-29 09:51:06 +1000388 { /* Power6 */
389 .pvr_mask = 0xffff0000,
390 .pvr_value = 0x003e0000,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100391 .cpu_name = "POWER6 (raw)",
392 .cpu_features = CPU_FTRS_POWER6,
393 .cpu_user_features = COMMON_USER_POWER6 |
394 PPC_FEATURE_POWER6_EXT,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000395 .mmu_features = MMU_FTR_HPTE_TABLE,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100396 .icache_bsize = 128,
397 .dcache_bsize = 128,
398 .num_pmcs = 6,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000399 .pmc_type = PPC_PMC_IBM,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100400 .oprofile_cpu_type = "ppc64/power6",
401 .oprofile_type = PPC_OPROFILE_POWER4,
402 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
403 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
404 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
405 POWER6_MMCRA_OTHER,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100406 .machine_check = machine_check_generic,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100407 .platform = "power6x",
408 },
409 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
410 .pvr_mask = 0xffffffff,
411 .pvr_value = 0x0f000002,
412 .cpu_name = "POWER6 (architected)",
Anton Blanchard03054d52006-04-29 09:51:06 +1000413 .cpu_features = CPU_FTRS_POWER6,
414 .cpu_user_features = COMMON_USER_POWER6,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000415 .mmu_features = MMU_FTR_HPTE_TABLE,
Anton Blanchard03054d52006-04-29 09:51:06 +1000416 .icache_bsize = 128,
417 .dcache_bsize = 128,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100418 .machine_check = machine_check_generic,
Torez Smith79e25ba2008-07-18 06:42:07 +1000419 .oprofile_cpu_type = "ppc64/compat-power6",
Anton Blanchard03054d52006-04-29 09:51:06 +1000420 .platform = "power6",
421 },
Joel Schopp635f5a62008-06-19 06:18:21 +1000422 { /* 2.06-compliant processor, i.e. Power7 "architected" mode */
423 .pvr_mask = 0xffffffff,
424 .pvr_value = 0x0f000003,
425 .cpu_name = "POWER7 (architected)",
426 .cpu_features = CPU_FTRS_POWER7,
427 .cpu_user_features = COMMON_USER_POWER7,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000428 .mmu_features = MMU_FTR_HPTE_TABLE,
Joel Schopp635f5a62008-06-19 06:18:21 +1000429 .icache_bsize = 128,
430 .dcache_bsize = 128,
431 .machine_check = machine_check_generic,
Torez Smith79e25ba2008-07-18 06:42:07 +1000432 .oprofile_cpu_type = "ppc64/compat-power7",
Joel Schopp635f5a62008-06-19 06:18:21 +1000433 .platform = "power7",
434 },
Michael Neulinge952e6c2008-06-18 10:47:26 +1000435 { /* Power7 */
436 .pvr_mask = 0xffff0000,
437 .pvr_value = 0x003f0000,
Joel Schopp635f5a62008-06-19 06:18:21 +1000438 .cpu_name = "POWER7 (raw)",
Michael Neulinge952e6c2008-06-18 10:47:26 +1000439 .cpu_features = CPU_FTRS_POWER7,
440 .cpu_user_features = COMMON_USER_POWER7,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000441 .mmu_features = MMU_FTR_HPTE_TABLE,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000442 .icache_bsize = 128,
443 .dcache_bsize = 128,
444 .num_pmcs = 6,
445 .pmc_type = PPC_PMC_IBM,
446 .cpu_setup = __setup_cpu_power7,
447 .cpu_restore = __restore_cpu_power7,
448 .oprofile_cpu_type = "ppc64/power7",
449 .oprofile_type = PPC_OPROFILE_POWER4,
450 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
451 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
452 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
453 POWER6_MMCRA_OTHER,
454 .platform = "power7",
455 },
Arnd Bergmannc902be72006-01-04 19:55:53 +0000456 { /* Cell Broadband Engine */
Stephen Rothwell49209602005-10-12 15:55:09 +1000457 .pvr_mask = 0xffff0000,
458 .pvr_value = 0x00700000,
459 .cpu_name = "Cell Broadband Engine",
460 .cpu_features = CPU_FTRS_CELL,
461 .cpu_user_features = COMMON_USER_PPC64 |
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +1100462 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
463 PPC_FEATURE_SMT,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000464 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000465 .icache_bsize = 128,
466 .dcache_bsize = 128,
Maynard Johnson18f21902006-11-20 18:45:16 +0100467 .num_pmcs = 4,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600468 .pmc_type = PPC_PMC_IBM,
Maynard Johnson18f21902006-11-20 18:45:16 +0100469 .oprofile_cpu_type = "ppc64/cell-be",
470 .oprofile_type = PPC_OPROFILE_CELL,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100471 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100472 .platform = "ppc-cell-be",
Stephen Rothwell49209602005-10-12 15:55:09 +1000473 },
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500474 { /* PA Semi PA6T */
475 .pvr_mask = 0x7fff0000,
476 .pvr_value = 0x00900000,
477 .cpu_name = "PA6T",
478 .cpu_features = CPU_FTRS_PA6T,
479 .cpu_user_features = COMMON_USER_PA6T,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000480 .mmu_features = MMU_FTR_HPTE_TABLE,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500481 .icache_bsize = 64,
482 .dcache_bsize = 64,
483 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600484 .pmc_type = PPC_PMC_PA6T,
Olof Johansson11999192007-02-04 16:36:51 -0600485 .cpu_setup = __setup_cpu_pa6t,
486 .cpu_restore = __restore_cpu_pa6t,
Olof Johansson25fc5302007-04-18 16:38:21 +1000487 .oprofile_cpu_type = "ppc64/pa6t",
488 .oprofile_type = PPC_OPROFILE_PA6T,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100489 .machine_check = machine_check_generic,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500490 .platform = "pa6t",
491 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000492 { /* default match */
493 .pvr_mask = 0x00000000,
494 .pvr_value = 0x00000000,
495 .cpu_name = "POWER4 (compatible)",
496 .cpu_features = CPU_FTRS_COMPATIBLE,
497 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000498 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000499 .icache_bsize = 128,
500 .dcache_bsize = 128,
501 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600502 .pmc_type = PPC_PMC_IBM,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100503 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100504 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000505 }
506#endif /* CONFIG_PPC64 */
507#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -0700508#if CLASSIC_PPC
Stephen Rothwell49209602005-10-12 15:55:09 +1000509 { /* 601 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700510 .pvr_mask = 0xffff0000,
511 .pvr_value = 0x00010000,
512 .cpu_name = "601",
Kumar Gala10b35d92005-09-23 14:08:58 -0500513 .cpu_features = CPU_FTRS_PPC601,
Stephen Rothwell49209602005-10-12 15:55:09 +1000514 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
Paul Mackerras98599012005-10-22 16:51:34 +1000515 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000516 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700517 .icache_bsize = 32,
518 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100519 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100520 .platform = "ppc601",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700521 },
522 { /* 603 */
523 .pvr_mask = 0xffff0000,
524 .pvr_value = 0x00030000,
525 .cpu_name = "603",
Kumar Gala10b35d92005-09-23 14:08:58 -0500526 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000527 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000528 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700529 .icache_bsize = 32,
530 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100531 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100532 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100533 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700534 },
535 { /* 603e */
536 .pvr_mask = 0xffff0000,
537 .pvr_value = 0x00060000,
538 .cpu_name = "603e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500539 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000540 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000541 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700542 .icache_bsize = 32,
543 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100544 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100545 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100546 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700547 },
548 { /* 603ev */
549 .pvr_mask = 0xffff0000,
550 .pvr_value = 0x00070000,
551 .cpu_name = "603ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500552 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000553 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000554 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700555 .icache_bsize = 32,
556 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100557 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100558 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100559 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700560 },
561 { /* 604 */
562 .pvr_mask = 0xffff0000,
563 .pvr_value = 0x00040000,
564 .cpu_name = "604",
Kumar Gala10b35d92005-09-23 14:08:58 -0500565 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000566 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000567 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700568 .icache_bsize = 32,
569 .dcache_bsize = 32,
570 .num_pmcs = 2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100571 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100572 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100573 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700574 },
575 { /* 604e */
576 .pvr_mask = 0xfffff000,
577 .pvr_value = 0x00090000,
578 .cpu_name = "604e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500579 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000580 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000581 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700582 .icache_bsize = 32,
583 .dcache_bsize = 32,
584 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100585 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100586 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100587 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700588 },
589 { /* 604r */
590 .pvr_mask = 0xffff0000,
591 .pvr_value = 0x00090000,
592 .cpu_name = "604r",
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 = 4,
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 { /* 604ev */
604 .pvr_mask = 0xffff0000,
605 .pvr_value = 0x000a0000,
606 .cpu_name = "604ev",
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 { /* 740/750 (0x4202, don't support TAU ?) */
618 .pvr_mask = 0xffffffff,
619 .pvr_value = 0x00084202,
620 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500621 .cpu_features = CPU_FTRS_740_NOTAU,
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_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100628 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100629 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700630 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700631 { /* 750CX (80100 and 8010x?) */
632 .pvr_mask = 0xfffffff0,
633 .pvr_value = 0x00080100,
634 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500635 .cpu_features = CPU_FTRS_750,
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_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100642 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100643 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700644 },
645 { /* 750CX (82201 and 82202) */
646 .pvr_mask = 0xfffffff0,
647 .pvr_value = 0x00082200,
648 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500649 .cpu_features = CPU_FTRS_750,
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,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000655 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100656 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100657 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100658 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700659 },
660 { /* 750CXe (82214) */
661 .pvr_mask = 0xfffffff0,
662 .pvr_value = 0x00082210,
663 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500664 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000665 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000666 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700667 .icache_bsize = 32,
668 .dcache_bsize = 32,
669 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000670 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100671 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100672 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100673 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700674 },
Arthur Othieno7c316252005-09-03 15:55:52 -0700675 { /* 750CXe "Gekko" (83214) */
676 .pvr_mask = 0xffffffff,
677 .pvr_value = 0x00083214,
678 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500679 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000680 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000681 .mmu_features = MMU_FTR_HPTE_TABLE,
Arthur Othieno7c316252005-09-03 15:55:52 -0700682 .icache_bsize = 32,
683 .dcache_bsize = 32,
684 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000685 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100686 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100687 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100688 .platform = "ppc750",
Arthur Othieno7c316252005-09-03 15:55:52 -0700689 },
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500690 { /* 750CL */
691 .pvr_mask = 0xfffff0f0,
692 .pvr_value = 0x00087010,
693 .cpu_name = "750CL",
Josh Boyera14c4502007-04-13 04:33:25 +1000694 .cpu_features = CPU_FTRS_750CL,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500695 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000696 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500697 .icache_bsize = 32,
698 .dcache_bsize = 32,
699 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000700 .pmc_type = PPC_PMC_IBM,
Josh Boyera14c4502007-04-13 04:33:25 +1000701 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100702 .machine_check = machine_check_generic,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500703 .platform = "ppc750",
704 },
Arthur Othienoac1ff042005-09-03 15:55:51 -0700705 { /* 745/755 */
706 .pvr_mask = 0xfffff000,
707 .pvr_value = 0x00083000,
708 .cpu_name = "745/755",
Kumar Gala10b35d92005-09-23 14:08:58 -0500709 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000710 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000711 .mmu_features = MMU_FTR_HPTE_TABLE,
Arthur Othienoac1ff042005-09-03 15:55:51 -0700712 .icache_bsize = 32,
713 .dcache_bsize = 32,
714 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000715 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100716 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100717 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100718 .platform = "ppc750",
Arthur Othienoac1ff042005-09-03 15:55:51 -0700719 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700720 { /* 750FX rev 1.x */
721 .pvr_mask = 0xffffff00,
722 .pvr_value = 0x70000100,
723 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500724 .cpu_features = CPU_FTRS_750FX1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000725 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000726 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700727 .icache_bsize = 32,
728 .dcache_bsize = 32,
729 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000730 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100731 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100732 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100733 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000734 .oprofile_cpu_type = "ppc/750",
735 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700736 },
737 { /* 750FX rev 2.0 must disable HID0[DPM] */
738 .pvr_mask = 0xffffffff,
739 .pvr_value = 0x70000200,
740 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500741 .cpu_features = CPU_FTRS_750FX2,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000742 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000743 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700744 .icache_bsize = 32,
745 .dcache_bsize = 32,
746 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000747 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100748 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100749 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100750 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000751 .oprofile_cpu_type = "ppc/750",
752 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700753 },
754 { /* 750FX (All revs except 2.0) */
755 .pvr_mask = 0xffff0000,
756 .pvr_value = 0x70000000,
757 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500758 .cpu_features = CPU_FTRS_750FX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000759 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000760 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700761 .icache_bsize = 32,
762 .dcache_bsize = 32,
763 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000764 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100765 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100766 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100767 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000768 .oprofile_cpu_type = "ppc/750",
769 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700770 },
771 { /* 750GX */
772 .pvr_mask = 0xffff0000,
773 .pvr_value = 0x70020000,
774 .cpu_name = "750GX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500775 .cpu_features = CPU_FTRS_750GX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000776 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000777 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700778 .icache_bsize = 32,
779 .dcache_bsize = 32,
780 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000781 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100782 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100783 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100784 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000785 .oprofile_cpu_type = "ppc/750",
786 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700787 },
788 { /* 740/750 (L2CR bit need fixup for 740) */
789 .pvr_mask = 0xffff0000,
790 .pvr_value = 0x00080000,
791 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500792 .cpu_features = CPU_FTRS_740,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000793 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000794 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700795 .icache_bsize = 32,
796 .dcache_bsize = 32,
797 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000798 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100799 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100800 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100801 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700802 },
803 { /* 7400 rev 1.1 ? (no TAU) */
804 .pvr_mask = 0xffffffff,
805 .pvr_value = 0x000c1101,
806 .cpu_name = "7400 (1.1)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500807 .cpu_features = CPU_FTRS_7400_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000808 .cpu_user_features = COMMON_USER |
809 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000810 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700811 .icache_bsize = 32,
812 .dcache_bsize = 32,
813 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000814 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100815 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100816 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100817 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700818 },
819 { /* 7400 */
820 .pvr_mask = 0xffff0000,
821 .pvr_value = 0x000c0000,
822 .cpu_name = "7400",
Kumar Gala10b35d92005-09-23 14:08:58 -0500823 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000824 .cpu_user_features = COMMON_USER |
825 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000826 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700827 .icache_bsize = 32,
828 .dcache_bsize = 32,
829 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000830 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100831 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100832 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100833 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700834 },
835 { /* 7410 */
836 .pvr_mask = 0xffff0000,
837 .pvr_value = 0x800c0000,
838 .cpu_name = "7410",
Kumar Gala10b35d92005-09-23 14:08:58 -0500839 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000840 .cpu_user_features = COMMON_USER |
841 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000842 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700843 .icache_bsize = 32,
844 .dcache_bsize = 32,
845 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000846 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100847 .cpu_setup = __setup_cpu_7410,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100848 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100849 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700850 },
851 { /* 7450 2.0 - no doze/nap */
852 .pvr_mask = 0xffffffff,
853 .pvr_value = 0x80000200,
854 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500855 .cpu_features = CPU_FTRS_7450_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000856 .cpu_user_features = COMMON_USER |
857 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000858 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700859 .icache_bsize = 32,
860 .dcache_bsize = 32,
861 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000862 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600863 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600864 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000865 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100866 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100867 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700868 },
869 { /* 7450 2.1 */
870 .pvr_mask = 0xffffffff,
871 .pvr_value = 0x80000201,
872 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500873 .cpu_features = CPU_FTRS_7450_21,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000874 .cpu_user_features = COMMON_USER |
875 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000876 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700877 .icache_bsize = 32,
878 .dcache_bsize = 32,
879 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000880 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600881 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600882 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000883 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100884 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100885 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700886 },
887 { /* 7450 2.3 and newer */
888 .pvr_mask = 0xffff0000,
889 .pvr_value = 0x80000000,
890 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500891 .cpu_features = CPU_FTRS_7450_23,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000892 .cpu_user_features = COMMON_USER |
893 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000894 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700895 .icache_bsize = 32,
896 .dcache_bsize = 32,
897 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000898 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600899 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600900 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000901 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100902 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100903 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700904 },
905 { /* 7455 rev 1.x */
906 .pvr_mask = 0xffffff00,
907 .pvr_value = 0x80010100,
908 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500909 .cpu_features = CPU_FTRS_7455_1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000910 .cpu_user_features = COMMON_USER |
911 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000912 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700913 .icache_bsize = 32,
914 .dcache_bsize = 32,
915 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000916 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600917 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600918 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000919 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100920 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100921 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700922 },
923 { /* 7455 rev 2.0 */
924 .pvr_mask = 0xffffffff,
925 .pvr_value = 0x80010200,
926 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500927 .cpu_features = CPU_FTRS_7455_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000928 .cpu_user_features = COMMON_USER |
929 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000930 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700931 .icache_bsize = 32,
932 .dcache_bsize = 32,
933 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000934 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600935 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600936 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000937 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100938 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100939 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700940 },
941 { /* 7455 others */
942 .pvr_mask = 0xffff0000,
943 .pvr_value = 0x80010000,
944 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500945 .cpu_features = CPU_FTRS_7455,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000946 .cpu_user_features = COMMON_USER |
947 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000948 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700949 .icache_bsize = 32,
950 .dcache_bsize = 32,
951 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000952 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600953 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600954 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000955 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100956 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100957 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700958 },
959 { /* 7447/7457 Rev 1.0 */
960 .pvr_mask = 0xffffffff,
961 .pvr_value = 0x80020100,
962 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500963 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000964 .cpu_user_features = COMMON_USER |
965 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000966 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700967 .icache_bsize = 32,
968 .dcache_bsize = 32,
969 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000970 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600971 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600972 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000973 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100974 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100975 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700976 },
977 { /* 7447/7457 Rev 1.1 */
978 .pvr_mask = 0xffffffff,
979 .pvr_value = 0x80020101,
980 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500981 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000982 .cpu_user_features = COMMON_USER |
983 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000984 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700985 .icache_bsize = 32,
986 .dcache_bsize = 32,
987 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000988 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600989 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600990 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000991 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100992 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100993 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700994 },
995 { /* 7447/7457 Rev 1.2 and later */
996 .pvr_mask = 0xffff0000,
997 .pvr_value = 0x80020000,
998 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500999 .cpu_features = CPU_FTRS_7447,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001000 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001001 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001002 .icache_bsize = 32,
1003 .dcache_bsize = 32,
1004 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001005 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001006 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001007 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001008 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001009 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001010 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001011 },
1012 { /* 7447A */
1013 .pvr_mask = 0xffff0000,
1014 .pvr_value = 0x80030000,
1015 .cpu_name = "7447A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001016 .cpu_features = CPU_FTRS_7447A,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001017 .cpu_user_features = COMMON_USER |
1018 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001019 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001020 .icache_bsize = 32,
1021 .dcache_bsize = 32,
1022 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001023 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001024 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001025 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001026 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001027 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001028 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001029 },
Kumar Galabbde6302005-09-03 15:55:55 -07001030 { /* 7448 */
1031 .pvr_mask = 0xffff0000,
1032 .pvr_value = 0x80040000,
1033 .cpu_name = "7448",
James.Yang3d372542007-05-02 16:34:43 -05001034 .cpu_features = CPU_FTRS_7448,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001035 .cpu_user_features = COMMON_USER |
1036 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001037 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Kumar Galabbde6302005-09-03 15:55:55 -07001038 .icache_bsize = 32,
1039 .dcache_bsize = 32,
1040 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001041 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001042 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001043 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001044 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001045 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001046 .platform = "ppc7450",
Kumar Galabbde6302005-09-03 15:55:55 -07001047 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001048 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
1049 .pvr_mask = 0x7fff0000,
1050 .pvr_value = 0x00810000,
1051 .cpu_name = "82xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001052 .cpu_features = CPU_FTRS_82XX,
Stephen Rothwell49209602005-10-12 15:55:09 +10001053 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001054 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001055 .icache_bsize = 32,
1056 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001057 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001058 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001059 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001060 },
1061 { /* All G2_LE (603e core, plus some) have the same pvr */
1062 .pvr_mask = 0x7fff0000,
1063 .pvr_value = 0x00820000,
1064 .cpu_name = "G2_LE",
Kumar Gala10b35d92005-09-23 14:08:58 -05001065 .cpu_features = CPU_FTRS_G2_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +10001066 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001067 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001068 .icache_bsize = 32,
1069 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001070 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001071 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001072 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001073 },
Kim Phillips6c4a2502006-10-02 20:10:24 -05001074 { /* e300c1 (a 603e core, plus some) on 83xx */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001075 .pvr_mask = 0x7fff0000,
1076 .pvr_value = 0x00830000,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001077 .cpu_name = "e300c1",
Kumar Gala10b35d92005-09-23 14:08:58 -05001078 .cpu_features = CPU_FTRS_E300,
Stephen Rothwell49209602005-10-12 15:55:09 +10001079 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001080 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001081 .icache_bsize = 32,
1082 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001083 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001084 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001085 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001086 },
Kim Phillips6c4a2502006-10-02 20:10:24 -05001087 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
1088 .pvr_mask = 0x7fff0000,
1089 .pvr_value = 0x00840000,
1090 .cpu_name = "e300c2",
Kim Phillipsaa42c692006-12-08 02:43:30 -06001091 .cpu_features = CPU_FTRS_E300C2,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001092 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Kumar Gala2319f122009-03-19 03:55:41 +00001093 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1094 MMU_FTR_NEED_DTLB_SW_LRU,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001095 .icache_bsize = 32,
1096 .dcache_bsize = 32,
1097 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001098 .machine_check = machine_check_generic,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001099 .platform = "ppc603",
1100 },
Li Yanga58d5242007-10-19 19:38:42 +08001101 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
Scott Wood57933f82006-12-01 12:57:05 -06001102 .pvr_mask = 0x7fff0000,
1103 .pvr_value = 0x00850000,
1104 .cpu_name = "e300c3",
1105 .cpu_features = CPU_FTRS_E300,
1106 .cpu_user_features = COMMON_USER,
Kumar Gala2319f122009-03-19 03:55:41 +00001107 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1108 MMU_FTR_NEED_DTLB_SW_LRU,
Scott Wood57933f82006-12-01 12:57:05 -06001109 .icache_bsize = 32,
1110 .dcache_bsize = 32,
1111 .cpu_setup = __setup_cpu_603,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001112 .num_pmcs = 4,
1113 .oprofile_cpu_type = "ppc/e300",
1114 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Scott Wood57933f82006-12-01 12:57:05 -06001115 .platform = "ppc603",
1116 },
Li Yanga58d5242007-10-19 19:38:42 +08001117 { /* e300c4 (e300c1, plus one IU) */
1118 .pvr_mask = 0x7fff0000,
1119 .pvr_value = 0x00860000,
1120 .cpu_name = "e300c4",
1121 .cpu_features = CPU_FTRS_E300,
1122 .cpu_user_features = COMMON_USER,
Kumar Gala2319f122009-03-19 03:55:41 +00001123 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1124 MMU_FTR_NEED_DTLB_SW_LRU,
Li Yanga58d5242007-10-19 19:38:42 +08001125 .icache_bsize = 32,
1126 .dcache_bsize = 32,
1127 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001128 .machine_check = machine_check_generic,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001129 .num_pmcs = 4,
1130 .oprofile_cpu_type = "ppc/e300",
1131 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Li Yanga58d5242007-10-19 19:38:42 +08001132 .platform = "ppc603",
1133 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001134 { /* default match, we assume split I/D cache & TB (non-601)... */
1135 .pvr_mask = 0x00000000,
1136 .pvr_value = 0x00000000,
1137 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -05001138 .cpu_features = CPU_FTRS_CLASSIC32,
Stephen Rothwell49209602005-10-12 15:55:09 +10001139 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001140 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001141 .icache_bsize = 32,
1142 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001143 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001144 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001145 },
1146#endif /* CLASSIC_PPC */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001147#ifdef CONFIG_8xx
1148 { /* 8xx */
1149 .pvr_mask = 0xffff0000,
1150 .pvr_value = 0x00500000,
1151 .cpu_name = "8xx",
1152 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1153 * if the 8xx code is there.... */
Kumar Gala10b35d92005-09-23 14:08:58 -05001154 .cpu_features = CPU_FTRS_8XX,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001155 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001156 .mmu_features = MMU_FTR_TYPE_8xx,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001157 .icache_bsize = 16,
1158 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001159 .platform = "ppc823",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001160 },
1161#endif /* CONFIG_8xx */
1162#ifdef CONFIG_40x
1163 { /* 403GC */
1164 .pvr_mask = 0xffffff00,
1165 .pvr_value = 0x00200200,
1166 .cpu_name = "403GC",
Kumar Gala10b35d92005-09-23 14:08:58 -05001167 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001168 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001169 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001170 .icache_bsize = 16,
1171 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001172 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001173 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001174 },
1175 { /* 403GCX */
1176 .pvr_mask = 0xffffff00,
1177 .pvr_value = 0x00201400,
1178 .cpu_name = "403GCX",
Kumar Gala10b35d92005-09-23 14:08:58 -05001179 .cpu_features = CPU_FTRS_40X,
Paul Mackerras98599012005-10-22 16:51:34 +10001180 .cpu_user_features = PPC_FEATURE_32 |
1181 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001182 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001183 .icache_bsize = 16,
1184 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001185 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001186 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001187 },
1188 { /* 403G ?? */
1189 .pvr_mask = 0xffff0000,
1190 .pvr_value = 0x00200000,
1191 .cpu_name = "403G ??",
Kumar Gala10b35d92005-09-23 14:08:58 -05001192 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001193 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001194 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001195 .icache_bsize = 16,
1196 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001197 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001198 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001199 },
1200 { /* 405GP */
1201 .pvr_mask = 0xffff0000,
1202 .pvr_value = 0x40110000,
1203 .cpu_name = "405GP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001204 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001205 .cpu_user_features = PPC_FEATURE_32 |
1206 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001207 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001208 .icache_bsize = 32,
1209 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001210 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001211 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001212 },
1213 { /* STB 03xxx */
1214 .pvr_mask = 0xffff0000,
1215 .pvr_value = 0x40130000,
1216 .cpu_name = "STB03xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001217 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001218 .cpu_user_features = PPC_FEATURE_32 |
1219 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001220 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001221 .icache_bsize = 32,
1222 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001223 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001224 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001225 },
1226 { /* STB 04xxx */
1227 .pvr_mask = 0xffff0000,
1228 .pvr_value = 0x41810000,
1229 .cpu_name = "STB04xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001230 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001231 .cpu_user_features = PPC_FEATURE_32 |
1232 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001233 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001234 .icache_bsize = 32,
1235 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001236 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001237 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001238 },
1239 { /* NP405L */
1240 .pvr_mask = 0xffff0000,
1241 .pvr_value = 0x41610000,
1242 .cpu_name = "NP405L",
Kumar Gala10b35d92005-09-23 14:08:58 -05001243 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001244 .cpu_user_features = PPC_FEATURE_32 |
1245 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001246 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001247 .icache_bsize = 32,
1248 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001249 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001250 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001251 },
1252 { /* NP4GS3 */
1253 .pvr_mask = 0xffff0000,
1254 .pvr_value = 0x40B10000,
1255 .cpu_name = "NP4GS3",
Kumar Gala10b35d92005-09-23 14:08:58 -05001256 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001257 .cpu_user_features = PPC_FEATURE_32 |
1258 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001259 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001260 .icache_bsize = 32,
1261 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001262 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001263 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001264 },
1265 { /* NP405H */
1266 .pvr_mask = 0xffff0000,
1267 .pvr_value = 0x41410000,
1268 .cpu_name = "NP405H",
Kumar Gala10b35d92005-09-23 14:08:58 -05001269 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001270 .cpu_user_features = PPC_FEATURE_32 |
1271 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001272 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001273 .icache_bsize = 32,
1274 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001275 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001276 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001277 },
1278 { /* 405GPr */
1279 .pvr_mask = 0xffff0000,
1280 .pvr_value = 0x50910000,
1281 .cpu_name = "405GPr",
Kumar Gala10b35d92005-09-23 14:08:58 -05001282 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001283 .cpu_user_features = PPC_FEATURE_32 |
1284 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001285 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001286 .icache_bsize = 32,
1287 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001288 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001289 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001290 },
1291 { /* STBx25xx */
1292 .pvr_mask = 0xffff0000,
1293 .pvr_value = 0x51510000,
1294 .cpu_name = "STBx25xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001295 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001296 .cpu_user_features = PPC_FEATURE_32 |
1297 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001298 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001299 .icache_bsize = 32,
1300 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001301 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001302 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001303 },
1304 { /* 405LP */
1305 .pvr_mask = 0xffff0000,
1306 .pvr_value = 0x41F10000,
1307 .cpu_name = "405LP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001308 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001309 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001310 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001311 .icache_bsize = 32,
1312 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001313 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001314 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001315 },
1316 { /* Xilinx Virtex-II Pro */
Grant C. Likely72646c72006-01-19 01:13:20 -07001317 .pvr_mask = 0xfffff000,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001318 .pvr_value = 0x20010000,
1319 .cpu_name = "Virtex-II Pro",
Kumar Gala10b35d92005-09-23 14:08:58 -05001320 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001321 .cpu_user_features = PPC_FEATURE_32 |
1322 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001323 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001324 .icache_bsize = 32,
1325 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001326 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001327 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001328 },
Grant C. Likely72646c72006-01-19 01:13:20 -07001329 { /* Xilinx Virtex-4 FX */
1330 .pvr_mask = 0xfffff000,
1331 .pvr_value = 0x20011000,
1332 .cpu_name = "Virtex-4 FX",
1333 .cpu_features = CPU_FTRS_40X,
1334 .cpu_user_features = PPC_FEATURE_32 |
1335 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001336 .mmu_features = MMU_FTR_TYPE_40x,
Grant C. Likely72646c72006-01-19 01:13:20 -07001337 .icache_bsize = 32,
1338 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001339 .machine_check = machine_check_4xx,
Peter Bergner838fdb42006-09-14 14:18:38 -05001340 .platform = "ppc405",
Grant C. Likely72646c72006-01-19 01:13:20 -07001341 },
Eugene Suroveginad95d602005-06-07 13:22:09 -07001342 { /* 405EP */
1343 .pvr_mask = 0xffff0000,
1344 .pvr_value = 0x51210000,
1345 .cpu_name = "405EP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001346 .cpu_features = CPU_FTRS_40X,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001347 .cpu_user_features = PPC_FEATURE_32 |
1348 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001349 .mmu_features = MMU_FTR_TYPE_40x,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001350 .icache_bsize = 32,
1351 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001352 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001353 .platform = "ppc405",
Eugene Suroveginad95d602005-06-07 13:22:09 -07001354 },
Stefan Roese5d8476c2007-10-11 22:08:14 +10001355 { /* 405EX */
Stefan Roeseb676d842008-01-15 18:09:15 +11001356 .pvr_mask = 0xffff0004,
1357 .pvr_value = 0x12910004,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001358 .cpu_name = "405EX",
1359 .cpu_features = CPU_FTRS_40X,
1360 .cpu_user_features = PPC_FEATURE_32 |
1361 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001362 .mmu_features = MMU_FTR_TYPE_40x,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001363 .icache_bsize = 32,
1364 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001365 .machine_check = machine_check_4xx,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001366 .platform = "ppc405",
1367 },
Stefan Roeseb676d842008-01-15 18:09:15 +11001368 { /* 405EXr */
1369 .pvr_mask = 0xffff0004,
1370 .pvr_value = 0x12910000,
1371 .cpu_name = "405EXr",
1372 .cpu_features = CPU_FTRS_40X,
1373 .cpu_user_features = PPC_FEATURE_32 |
1374 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001375 .mmu_features = MMU_FTR_TYPE_40x,
Stefan Roeseb676d842008-01-15 18:09:15 +11001376 .icache_bsize = 32,
1377 .dcache_bsize = 32,
1378 .machine_check = machine_check_4xx,
1379 .platform = "ppc405",
1380 },
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001381 {
1382 /* 405EZ */
1383 .pvr_mask = 0xffff0000,
1384 .pvr_value = 0x41510000,
1385 .cpu_name = "405EZ",
1386 .cpu_features = CPU_FTRS_40X,
1387 .cpu_user_features = PPC_FEATURE_32 |
1388 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001389 .mmu_features = MMU_FTR_TYPE_40x,
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001390 .icache_bsize = 32,
1391 .dcache_bsize = 32,
1392 .machine_check = machine_check_4xx,
1393 .platform = "ppc405",
1394 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001395 { /* default match */
1396 .pvr_mask = 0x00000000,
1397 .pvr_value = 0x00000000,
1398 .cpu_name = "(generic 40x PPC)",
1399 .cpu_features = CPU_FTRS_40X,
1400 .cpu_user_features = PPC_FEATURE_32 |
1401 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001402 .mmu_features = MMU_FTR_TYPE_40x,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001403 .icache_bsize = 32,
1404 .dcache_bsize = 32,
1405 .machine_check = machine_check_4xx,
1406 .platform = "ppc405",
1407 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001408
1409#endif /* CONFIG_40x */
1410#ifdef CONFIG_44x
Matt Porterc9cf73a2005-07-31 22:34:52 -07001411 {
1412 .pvr_mask = 0xf0000fff,
1413 .pvr_value = 0x40000850,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001414 .cpu_name = "440GR Rev. A",
1415 .cpu_features = CPU_FTRS_44X,
1416 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001417 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001418 .icache_bsize = 32,
1419 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001420 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001421 .platform = "ppc440",
1422 },
1423 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1424 .pvr_mask = 0xf0000fff,
1425 .pvr_value = 0x40000858,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001426 .cpu_name = "440EP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001427 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001428 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001429 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001430 .icache_bsize = 32,
1431 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001432 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001433 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001434 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001435 },
1436 {
1437 .pvr_mask = 0xf0000fff,
1438 .pvr_value = 0x400008d3,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001439 .cpu_name = "440GR Rev. B",
1440 .cpu_features = CPU_FTRS_44X,
1441 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001442 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001443 .icache_bsize = 32,
1444 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001445 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001446 .platform = "ppc440",
1447 },
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001448 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1449 .pvr_mask = 0xf0000ff7,
1450 .pvr_value = 0x400008d4,
1451 .cpu_name = "440EP Rev. C",
1452 .cpu_features = CPU_FTRS_44X,
1453 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001454 .mmu_features = MMU_FTR_TYPE_44x,
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001455 .icache_bsize = 32,
1456 .dcache_bsize = 32,
1457 .cpu_setup = __setup_cpu_440ep,
1458 .machine_check = machine_check_4xx,
1459 .platform = "ppc440",
1460 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001461 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1462 .pvr_mask = 0xf0000fff,
1463 .pvr_value = 0x400008db,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001464 .cpu_name = "440EP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001465 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001466 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001467 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001468 .icache_bsize = 32,
1469 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001470 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001471 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001472 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001473 },
Valentine Barshak15fc9932007-08-29 17:40:30 +04001474 { /* 440GRX */
1475 .pvr_mask = 0xf0000ffb,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001476 .pvr_value = 0x200008D0,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001477 .cpu_name = "440GRX",
1478 .cpu_features = CPU_FTRS_44X,
1479 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001480 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001481 .icache_bsize = 32,
1482 .dcache_bsize = 32,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001483 .cpu_setup = __setup_cpu_440grx,
Valentine Barshakb2be3b12007-12-22 03:22:23 +11001484 .machine_check = machine_check_440A,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001485 .platform = "ppc440",
Valentine Barshak15fc9932007-08-29 17:40:30 +04001486 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001487 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1488 .pvr_mask = 0xf0000ffb,
1489 .pvr_value = 0x200008D8,
1490 .cpu_name = "440EPX",
1491 .cpu_features = CPU_FTRS_44X,
1492 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001493 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001494 .icache_bsize = 32,
1495 .dcache_bsize = 32,
1496 .cpu_setup = __setup_cpu_440epx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001497 .machine_check = machine_check_440A,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001498 .platform = "ppc440",
1499 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001500 { /* 440GP Rev. B */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001501 .pvr_mask = 0xf0000fff,
1502 .pvr_value = 0x40000440,
1503 .cpu_name = "440GP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001504 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001505 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001506 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001507 .icache_bsize = 32,
1508 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001509 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001510 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001511 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001512 { /* 440GP Rev. C */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001513 .pvr_mask = 0xf0000fff,
1514 .pvr_value = 0x40000481,
1515 .cpu_name = "440GP Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001516 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001517 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001518 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001519 .icache_bsize = 32,
1520 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001521 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001522 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001523 },
1524 { /* 440GX Rev. A */
1525 .pvr_mask = 0xf0000fff,
1526 .pvr_value = 0x50000850,
1527 .cpu_name = "440GX Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001528 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001529 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001530 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001531 .icache_bsize = 32,
1532 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001533 .cpu_setup = __setup_cpu_440gx,
1534 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001535 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001536 },
1537 { /* 440GX Rev. B */
1538 .pvr_mask = 0xf0000fff,
1539 .pvr_value = 0x50000851,
1540 .cpu_name = "440GX Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001541 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001542 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001543 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001544 .icache_bsize = 32,
1545 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001546 .cpu_setup = __setup_cpu_440gx,
1547 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001548 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001549 },
1550 { /* 440GX Rev. C */
1551 .pvr_mask = 0xf0000fff,
1552 .pvr_value = 0x50000892,
1553 .cpu_name = "440GX Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001554 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001555 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001556 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001557 .icache_bsize = 32,
1558 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001559 .cpu_setup = __setup_cpu_440gx,
1560 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001561 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001562 },
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001563 { /* 440GX Rev. F */
1564 .pvr_mask = 0xf0000fff,
1565 .pvr_value = 0x50000894,
1566 .cpu_name = "440GX Rev. F",
Kumar Gala10b35d92005-09-23 14:08:58 -05001567 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001568 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001569 .mmu_features = MMU_FTR_TYPE_44x,
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001570 .icache_bsize = 32,
1571 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001572 .cpu_setup = __setup_cpu_440gx,
1573 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001574 .platform = "ppc440",
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001575 },
Matt Porter656de7e2005-09-03 15:55:42 -07001576 { /* 440SP Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001577 .pvr_mask = 0xfff00fff,
1578 .pvr_value = 0x53200891,
Matt Porter656de7e2005-09-03 15:55:42 -07001579 .cpu_name = "440SP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001580 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001581 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001582 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porter656de7e2005-09-03 15:55:42 -07001583 .icache_bsize = 32,
1584 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001585 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001586 .platform = "ppc440",
Matt Porter656de7e2005-09-03 15:55:42 -07001587 },
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001588 { /* 440SPe Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001589 .pvr_mask = 0xfff00fff,
1590 .pvr_value = 0x53400890,
1591 .cpu_name = "440SPe Rev. A",
1592 .cpu_features = CPU_FTRS_44X,
1593 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001594 .mmu_features = MMU_FTR_TYPE_44x,
Roland Dreier333e6152007-06-16 05:36:32 +10001595 .icache_bsize = 32,
1596 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001597 .cpu_setup = __setup_cpu_440spe,
1598 .machine_check = machine_check_440A,
Roland Dreier333e6152007-06-16 05:36:32 +10001599 .platform = "ppc440",
1600 },
1601 { /* 440SPe Rev. B */
1602 .pvr_mask = 0xfff00fff,
1603 .pvr_value = 0x53400891,
1604 .cpu_name = "440SPe Rev. B",
Kumar Galaa147c582006-12-08 02:34:38 -06001605 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001606 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001607 .mmu_features = MMU_FTR_TYPE_44x,
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001608 .icache_bsize = 32,
1609 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001610 .cpu_setup = __setup_cpu_440spe,
1611 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001612 .platform = "ppc440",
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001613 },
John Linn23e72372008-07-01 09:42:07 -07001614 { /* 440 in Xilinx Virtex-5 FXT */
1615 .pvr_mask = 0xfffffff0,
1616 .pvr_value = 0x7ff21910,
1617 .cpu_name = "440 in Virtex-5 FXT",
1618 .cpu_features = CPU_FTRS_44X,
1619 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001620 .mmu_features = MMU_FTR_TYPE_44x,
John Linn23e72372008-07-01 09:42:07 -07001621 .icache_bsize = 32,
1622 .dcache_bsize = 32,
Grant Likely640d17d2008-12-04 05:39:55 +00001623 .cpu_setup = __setup_cpu_440x5,
1624 .machine_check = machine_check_440A,
John Linn23e72372008-07-01 09:42:07 -07001625 .platform = "ppc440",
1626 },
Stefan Roese464076a2008-02-24 08:07:41 +11001627 { /* 460EX */
1628 .pvr_mask = 0xffff0002,
1629 .pvr_value = 0x13020002,
1630 .cpu_name = "460EX",
Benjamin Herrenschmidt6d2170b2008-12-18 19:13:22 +00001631 .cpu_features = CPU_FTRS_440x6,
Stefan Roese464076a2008-02-24 08:07:41 +11001632 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001633 .mmu_features = MMU_FTR_TYPE_44x,
Stefan Roese464076a2008-02-24 08:07:41 +11001634 .icache_bsize = 32,
1635 .dcache_bsize = 32,
1636 .cpu_setup = __setup_cpu_460ex,
1637 .machine_check = machine_check_440A,
1638 .platform = "ppc440",
1639 },
1640 { /* 460GT */
1641 .pvr_mask = 0xffff0002,
1642 .pvr_value = 0x13020000,
1643 .cpu_name = "460GT",
Benjamin Herrenschmidt6d2170b2008-12-18 19:13:22 +00001644 .cpu_features = CPU_FTRS_440x6,
Josh Boyer939e6222008-06-11 07:52:40 -04001645 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001646 .mmu_features = MMU_FTR_TYPE_44x,
Stefan Roese464076a2008-02-24 08:07:41 +11001647 .icache_bsize = 32,
1648 .dcache_bsize = 32,
Josh Boyer939e6222008-06-11 07:52:40 -04001649 .cpu_setup = __setup_cpu_460gt,
Stefan Roese464076a2008-02-24 08:07:41 +11001650 .machine_check = machine_check_440A,
1651 .platform = "ppc440",
1652 },
Madhulika Madishetty6c712092009-02-05 13:31:36 +00001653 { /* 460SX */
1654 .pvr_mask = 0xffffff00,
1655 .pvr_value = 0x13541800,
1656 .cpu_name = "460SX",
1657 .cpu_features = CPU_FTRS_44X,
1658 .cpu_user_features = COMMON_USER_BOOKE,
1659 .mmu_features = MMU_FTR_TYPE_44x,
1660 .icache_bsize = 32,
1661 .dcache_bsize = 32,
1662 .cpu_setup = __setup_cpu_460sx,
1663 .machine_check = machine_check_440A,
1664 .platform = "ppc440",
1665 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001666 { /* default match */
1667 .pvr_mask = 0x00000000,
1668 .pvr_value = 0x00000000,
1669 .cpu_name = "(generic 44x PPC)",
1670 .cpu_features = CPU_FTRS_44X,
1671 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001672 .mmu_features = MMU_FTR_TYPE_44x,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001673 .icache_bsize = 32,
1674 .dcache_bsize = 32,
1675 .machine_check = machine_check_4xx,
1676 .platform = "ppc440",
1677 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001678#endif /* CONFIG_44x */
Josh Boyere3e414b2007-12-24 08:44:47 -06001679#ifdef CONFIG_E200
Stephen Rothwell49209602005-10-12 15:55:09 +10001680 { /* e200z5 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001681 .pvr_mask = 0xfff00000,
1682 .pvr_value = 0x81000000,
1683 .cpu_name = "e200z5",
1684 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001685 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001686 .cpu_user_features = COMMON_USER_BOOKE |
1687 PPC_FEATURE_HAS_EFP_SINGLE |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001688 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001689 .mmu_features = MMU_FTR_TYPE_FSL_E,
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001690 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001691 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001692 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001693 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001694 { /* e200z6 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001695 .pvr_mask = 0xfff00000,
1696 .pvr_value = 0x81100000,
1697 .cpu_name = "e200z6",
1698 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001699 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001700 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001701 PPC_FEATURE_HAS_SPE_COMP |
1702 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001703 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001704 .mmu_features = MMU_FTR_TYPE_FSL_E,
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001705 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001706 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001707 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001708 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001709 { /* default match */
1710 .pvr_mask = 0x00000000,
1711 .pvr_value = 0x00000000,
1712 .cpu_name = "(generic E200 PPC)",
1713 .cpu_features = CPU_FTRS_E200,
1714 .cpu_user_features = COMMON_USER_BOOKE |
1715 PPC_FEATURE_HAS_EFP_SINGLE |
1716 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001717 .mmu_features = MMU_FTR_TYPE_FSL_E,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001718 .dcache_bsize = 32,
Kumar Gala105c31d2009-01-08 08:31:20 -06001719 .cpu_setup = __setup_cpu_e200,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001720 .machine_check = machine_check_e200,
1721 .platform = "ppc5554",
Paul Mackerras516c8be2008-05-12 14:20:35 +10001722 }
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001723#endif /* CONFIG_E200 */
1724#ifdef CONFIG_E500
Stephen Rothwell49209602005-10-12 15:55:09 +10001725 { /* e500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001726 .pvr_mask = 0xffff0000,
1727 .pvr_value = 0x80200000,
1728 .cpu_name = "e500",
Kumar Gala10b35d92005-09-23 14:08:58 -05001729 .cpu_features = CPU_FTRS_E500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001730 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001731 PPC_FEATURE_HAS_SPE_COMP |
1732 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001733 .mmu_features = MMU_FTR_TYPE_FSL_E,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001734 .icache_bsize = 32,
1735 .dcache_bsize = 32,
1736 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001737 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001738 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06001739 .cpu_setup = __setup_cpu_e500v1,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001740 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001741 .platform = "ppc8540",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001742 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001743 { /* e500v2 */
Kumar Gala5b37b702005-06-21 17:15:18 -07001744 .pvr_mask = 0xffff0000,
1745 .pvr_value = 0x80210000,
1746 .cpu_name = "e500v2",
Kumar Gala10b35d92005-09-23 14:08:58 -05001747 .cpu_features = CPU_FTRS_E500_2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001748 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001749 PPC_FEATURE_HAS_SPE_COMP |
1750 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1751 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001752 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS,
Kumar Gala5b37b702005-06-21 17:15:18 -07001753 .icache_bsize = 32,
1754 .dcache_bsize = 32,
1755 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001756 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001757 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06001758 .cpu_setup = __setup_cpu_e500v2,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001759 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001760 .platform = "ppc8548",
Kumar Gala5b37b702005-06-21 17:15:18 -07001761 },
Kumar Gala3dfa8772008-06-16 09:41:32 -05001762 { /* e500mc */
1763 .pvr_mask = 0xffff0000,
1764 .pvr_value = 0x80230000,
1765 .cpu_name = "e500mc",
Kumar Gala3dfa8772008-06-16 09:41:32 -05001766 .cpu_features = CPU_FTRS_E500MC,
1767 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Kumar Galac3071952009-02-10 22:26:06 -06001768 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
Kumar Gala323d23a2009-04-23 08:51:22 -05001769 MMU_FTR_USE_TLBILX,
Kumar Gala3dfa8772008-06-16 09:41:32 -05001770 .icache_bsize = 64,
1771 .dcache_bsize = 64,
1772 .num_pmcs = 4,
1773 .oprofile_cpu_type = "ppc/e500", /* xxx - galak, e500mc? */
1774 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06001775 .cpu_setup = __setup_cpu_e500mc,
Kumar Gala3dfa8772008-06-16 09:41:32 -05001776 .machine_check = machine_check_e500,
1777 .platform = "ppce500mc",
1778 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001779 { /* default match */
1780 .pvr_mask = 0x00000000,
1781 .pvr_value = 0x00000000,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001782 .cpu_name = "(generic E500 PPC)",
1783 .cpu_features = CPU_FTRS_E500,
1784 .cpu_user_features = COMMON_USER_BOOKE |
1785 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,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001790 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001791 .platform = "powerpc",
Paul Mackerras516c8be2008-05-12 14:20:35 +10001792 }
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001793#endif /* CONFIG_E500 */
Stephen Rothwell49209602005-10-12 15:55:09 +10001794#endif /* CONFIG_PPC32 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001795};
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001796
Paul Mackerras87a72f92007-10-04 14:18:01 +10001797static struct cpu_spec the_cpu_spec;
1798
Michael Ellerman666435b2009-02-22 16:25:43 +00001799static void __init setup_cpu_spec(unsigned long offset, struct cpu_spec *s)
1800{
1801 struct cpu_spec *t = &the_cpu_spec;
Michael Ellerman2657dd42009-02-22 16:25:45 +00001802 struct cpu_spec old;
1803
Michael Ellerman666435b2009-02-22 16:25:43 +00001804 t = PTRRELOC(t);
Michael Ellerman2657dd42009-02-22 16:25:45 +00001805 old = *t;
1806
1807 /* Copy everything, then do fixups */
1808 *t = *s;
Michael Ellerman666435b2009-02-22 16:25:43 +00001809
1810 /*
1811 * If we are overriding a previous value derived from the real
1812 * PVR with a new value obtained using a logical PVR value,
1813 * don't modify the performance monitor fields.
1814 */
Michael Ellerman2657dd42009-02-22 16:25:45 +00001815 if (old.num_pmcs && !s->num_pmcs) {
1816 t->num_pmcs = old.num_pmcs;
1817 t->pmc_type = old.pmc_type;
1818 t->oprofile_type = old.oprofile_type;
1819 t->oprofile_mmcra_sihv = old.oprofile_mmcra_sihv;
1820 t->oprofile_mmcra_sipr = old.oprofile_mmcra_sipr;
1821 t->oprofile_mmcra_clear = old.oprofile_mmcra_clear;
1822
Michael Ellerman666435b2009-02-22 16:25:43 +00001823 /*
1824 * If we have passed through this logic once before and
1825 * have pulled the default case because the real PVR was
1826 * not found inside cpu_specs[], then we are possibly
1827 * running in compatibility mode. In that case, let the
1828 * oprofiler know which set of compatibility counters to
1829 * pull from by making sure the oprofile_cpu_type string
1830 * is set to that of compatibility mode. If the
1831 * oprofile_cpu_type already has a value, then we are
1832 * possibly overriding a real PVR with a logical one,
1833 * and, in that case, keep the current value for
1834 * oprofile_cpu_type.
1835 */
Michael Ellerman2657dd42009-02-22 16:25:45 +00001836 if (old.oprofile_cpu_type == NULL)
Michael Ellerman666435b2009-02-22 16:25:43 +00001837 t->oprofile_cpu_type = s->oprofile_cpu_type;
Michael Ellerman2657dd42009-02-22 16:25:45 +00001838 }
Michael Ellerman666435b2009-02-22 16:25:43 +00001839
1840 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
1841
1842 /*
1843 * Set the base platform string once; assumes
1844 * we're called with real pvr first.
1845 */
1846 if (*PTRRELOC(&powerpc_base_platform) == NULL)
1847 *PTRRELOC(&powerpc_base_platform) = t->platform;
1848
1849#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
1850 /* ppc64 and booke expect identify_cpu to also call setup_cpu for
1851 * that processor. I will consolidate that at a later time, for now,
1852 * just use #ifdef. We also don't need to PTRRELOC the function
1853 * pointer on ppc64 and booke as we are running at 0 in real mode
1854 * on ppc64 and reloc_offset is always 0 on booke.
1855 */
1856 if (s->cpu_setup) {
1857 s->cpu_setup(offset, s);
1858 }
1859#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
1860}
1861
Paul Mackerras87a72f92007-10-04 14:18:01 +10001862struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001863{
1864 struct cpu_spec *s = cpu_specs;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001865 int i;
1866
1867 s = PTRRELOC(s);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001868
Michael Ellerman666435b2009-02-22 16:25:43 +00001869 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) {
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001870 if ((pvr & s->pvr_mask) == s->pvr_value) {
Michael Ellerman666435b2009-02-22 16:25:43 +00001871 setup_cpu_spec(offset, s);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001872 return s;
1873 }
Michael Ellerman666435b2009-02-22 16:25:43 +00001874 }
1875
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001876 BUG();
Michael Ellerman666435b2009-02-22 16:25:43 +00001877
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001878 return NULL;
1879}