blob: 9fdf1b8027b58a3206bb545df8ad61d83fa49807 [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);
Kumar Gala400d2212005-09-27 15:13:12 -050050extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
51extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
52extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
53extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
54extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
55extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
56extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
57extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell49209602005-10-12 15:55:09 +100058#endif /* CONFIG_PPC32 */
Olof Johanssonf39b7a52006-08-11 00:07:08 -050059#ifdef CONFIG_PPC64
Kumar Gala400d2212005-09-27 15:13:12 -050060extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
Olof Johansson5b43d202006-10-04 23:41:41 -050061extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
Olof Johansson11999192007-02-04 16:36:51 -060062extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell40d244d2007-02-12 22:10:48 +110063extern void __restore_cpu_pa6t(void);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050064extern void __restore_cpu_ppc970(void);
Michael Neulinge952e6c2008-06-18 10:47:26 +100065extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec);
66extern void __restore_cpu_power7(void);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050067#endif /* CONFIG_PPC64 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070068
Linus Torvalds1da177e2005-04-16 15:20:36 -070069/* This table only contains "desktop" CPUs, it need to be filled with embedded
70 * ones as well...
71 */
Stephen Rothwell49209602005-10-12 15:55:09 +100072#define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
73 PPC_FEATURE_HAS_MMU)
74#define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +110075#define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +110076#define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
77 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
78#define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
79 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
Anton Blanchard03054d52006-04-29 09:51:06 +100080#define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
Paul Mackerrasfab5db92006-06-07 16:14:40 +100081 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
Nathan Lynch0f473312008-07-10 01:06:57 +100082 PPC_FEATURE_TRUE_LE | \
83 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Michael Neulinge952e6c2008-06-18 10:47:26 +100084#define COMMON_USER_POWER7 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
85 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
Nathan Lynch0f473312008-07-10 01:06:57 +100086 PPC_FEATURE_TRUE_LE | \
87 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -050088#define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
89 PPC_FEATURE_TRUE_LE | \
90 PPC_FEATURE_HAS_ALTIVEC_COMP)
Paul Mackerras80f15dc2006-01-14 10:11:39 +110091#define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
92 PPC_FEATURE_BOOKE)
Linus Torvalds1da177e2005-04-16 15:20:36 -070093
Paul Mackerras87a72f92007-10-04 14:18:01 +100094static struct cpu_spec __initdata cpu_specs[] = {
Stephen Rothwell49209602005-10-12 15:55:09 +100095#ifdef CONFIG_PPC64
96 { /* Power3 */
97 .pvr_mask = 0xffff0000,
98 .pvr_value = 0x00400000,
99 .cpu_name = "POWER3 (630)",
100 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000101 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000102 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000103 .icache_bsize = 128,
104 .dcache_bsize = 128,
105 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600106 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000107 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000108 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100109 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100110 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +1000111 },
112 { /* Power3+ */
113 .pvr_mask = 0xffff0000,
114 .pvr_value = 0x00410000,
115 .cpu_name = "POWER3 (630+)",
116 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000117 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000118 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000119 .icache_bsize = 128,
120 .dcache_bsize = 128,
121 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600122 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000123 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000124 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100125 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100126 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +1000127 },
128 { /* Northstar */
129 .pvr_mask = 0xffff0000,
130 .pvr_value = 0x00330000,
131 .cpu_name = "RS64-II (northstar)",
132 .cpu_features = CPU_FTRS_RS64,
133 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000134 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000135 .icache_bsize = 128,
136 .dcache_bsize = 128,
137 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600138 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000139 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000140 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100141 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100142 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000143 },
144 { /* Pulsar */
145 .pvr_mask = 0xffff0000,
146 .pvr_value = 0x00340000,
147 .cpu_name = "RS64-III (pulsar)",
148 .cpu_features = CPU_FTRS_RS64,
149 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000150 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000151 .icache_bsize = 128,
152 .dcache_bsize = 128,
153 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600154 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000155 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000156 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100157 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100158 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000159 },
160 { /* I-star */
161 .pvr_mask = 0xffff0000,
162 .pvr_value = 0x00360000,
163 .cpu_name = "RS64-III (icestar)",
164 .cpu_features = CPU_FTRS_RS64,
165 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000166 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000167 .icache_bsize = 128,
168 .dcache_bsize = 128,
169 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600170 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000171 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000172 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100173 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100174 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000175 },
176 { /* S-star */
177 .pvr_mask = 0xffff0000,
178 .pvr_value = 0x00370000,
179 .cpu_name = "RS64-IV (sstar)",
180 .cpu_features = CPU_FTRS_RS64,
181 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000182 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000183 .icache_bsize = 128,
184 .dcache_bsize = 128,
185 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600186 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000187 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000188 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100189 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100190 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000191 },
192 { /* Power4 */
193 .pvr_mask = 0xffff0000,
194 .pvr_value = 0x00350000,
195 .cpu_name = "POWER4 (gp)",
196 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100197 .cpu_user_features = COMMON_USER_POWER4,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000198 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000199 .icache_bsize = 128,
200 .dcache_bsize = 128,
201 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600202 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000203 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000204 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100205 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100206 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000207 },
208 { /* Power4+ */
209 .pvr_mask = 0xffff0000,
210 .pvr_value = 0x00380000,
211 .cpu_name = "POWER4+ (gq)",
212 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100213 .cpu_user_features = COMMON_USER_POWER4,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000214 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000215 .icache_bsize = 128,
216 .dcache_bsize = 128,
217 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600218 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000219 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000220 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100221 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100222 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000223 },
224 { /* PPC970 */
225 .pvr_mask = 0xffff0000,
226 .pvr_value = 0x00390000,
227 .cpu_name = "PPC970",
228 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100229 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000230 PPC_FEATURE_HAS_ALTIVEC_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000231 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000232 .icache_bsize = 128,
233 .dcache_bsize = 128,
234 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600235 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000236 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500237 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000238 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000239 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100240 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100241 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000242 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000243 { /* PPC970FX */
244 .pvr_mask = 0xffff0000,
245 .pvr_value = 0x003c0000,
246 .cpu_name = "PPC970FX",
Stephen Rothwell49209602005-10-12 15:55:09 +1000247 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100248 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000249 PPC_FEATURE_HAS_ALTIVEC_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000250 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000251 .icache_bsize = 128,
252 .dcache_bsize = 128,
253 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600254 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000255 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500256 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000257 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000258 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100259 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100260 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000261 },
Olof Johansson3546e812007-02-26 00:35:14 -0600262 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
263 .pvr_mask = 0xffffffff,
264 .pvr_value = 0x00440100,
265 .cpu_name = "PPC970MP",
266 .cpu_features = CPU_FTRS_PPC970,
267 .cpu_user_features = COMMON_USER_POWER4 |
268 PPC_FEATURE_HAS_ALTIVEC_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000269 .mmu_features = MMU_FTR_HPTE_TABLE,
Olof Johansson3546e812007-02-26 00:35:14 -0600270 .icache_bsize = 128,
271 .dcache_bsize = 128,
272 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000273 .pmc_type = PPC_PMC_IBM,
Olof Johansson3546e812007-02-26 00:35:14 -0600274 .cpu_setup = __setup_cpu_ppc970,
275 .cpu_restore = __restore_cpu_ppc970,
276 .oprofile_cpu_type = "ppc64/970MP",
277 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100278 .machine_check = machine_check_generic,
Olof Johansson3546e812007-02-26 00:35:14 -0600279 .platform = "ppc970",
280 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000281 { /* PPC970MP */
282 .pvr_mask = 0xffff0000,
283 .pvr_value = 0x00440000,
284 .cpu_name = "PPC970MP",
285 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100286 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000287 PPC_FEATURE_HAS_ALTIVEC_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000288 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000289 .icache_bsize = 128,
290 .dcache_bsize = 128,
Anton Blanchard87af41b2006-05-05 05:44:26 +1000291 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000292 .pmc_type = PPC_PMC_IBM,
Olof Johansson5b43d202006-10-04 23:41:41 -0500293 .cpu_setup = __setup_cpu_ppc970MP,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500294 .cpu_restore = __restore_cpu_ppc970,
Mike Wolffecb3522006-11-21 14:41:54 -0600295 .oprofile_cpu_type = "ppc64/970MP",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000296 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100297 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100298 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000299 },
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500300 { /* PPC970GX */
301 .pvr_mask = 0xffff0000,
302 .pvr_value = 0x00450000,
303 .cpu_name = "PPC970GX",
304 .cpu_features = CPU_FTRS_PPC970,
305 .cpu_user_features = COMMON_USER_POWER4 |
306 PPC_FEATURE_HAS_ALTIVEC_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000307 .mmu_features = MMU_FTR_HPTE_TABLE,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500308 .icache_bsize = 128,
309 .dcache_bsize = 128,
310 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600311 .pmc_type = PPC_PMC_IBM,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500312 .cpu_setup = __setup_cpu_ppc970,
313 .oprofile_cpu_type = "ppc64/970",
314 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100315 .machine_check = machine_check_generic,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500316 .platform = "ppc970",
317 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100318 { /* Power5 GR */
Stephen Rothwell49209602005-10-12 15:55:09 +1000319 .pvr_mask = 0xffff0000,
320 .pvr_value = 0x003a0000,
321 .cpu_name = "POWER5 (gr)",
322 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100323 .cpu_user_features = COMMON_USER_POWER5,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000324 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000325 .icache_bsize = 128,
326 .dcache_bsize = 128,
327 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600328 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000329 .oprofile_cpu_type = "ppc64/power5",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000330 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000331 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
332 * and above but only works on POWER5 and above
333 */
334 .oprofile_mmcra_sihv = MMCRA_SIHV,
335 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100336 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100337 .platform = "power5",
Stephen Rothwell49209602005-10-12 15:55:09 +1000338 },
Mike Wolf31a12ce2007-07-10 13:13:47 -0500339 { /* Power5++ */
340 .pvr_mask = 0xffffff00,
341 .pvr_value = 0x003b0300,
342 .cpu_name = "POWER5+ (gs)",
343 .cpu_features = CPU_FTRS_POWER5,
344 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000345 .mmu_features = MMU_FTR_HPTE_TABLE,
Mike Wolf31a12ce2007-07-10 13:13:47 -0500346 .icache_bsize = 128,
347 .dcache_bsize = 128,
348 .num_pmcs = 6,
349 .oprofile_cpu_type = "ppc64/power5++",
350 .oprofile_type = PPC_OPROFILE_POWER4,
351 .oprofile_mmcra_sihv = MMCRA_SIHV,
352 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100353 .machine_check = machine_check_generic,
Mike Wolf31a12ce2007-07-10 13:13:47 -0500354 .platform = "power5+",
355 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100356 { /* Power5 GS */
Stephen Rothwell49209602005-10-12 15:55:09 +1000357 .pvr_mask = 0xffff0000,
358 .pvr_value = 0x003b0000,
Anton Blanchard834608f2006-01-09 15:42:30 +1100359 .cpu_name = "POWER5+ (gs)",
Stephen Rothwell49209602005-10-12 15:55:09 +1000360 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100361 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000362 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000363 .icache_bsize = 128,
364 .dcache_bsize = 128,
365 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600366 .pmc_type = PPC_PMC_IBM,
Anton Blanchard834608f2006-01-09 15:42:30 +1100367 .oprofile_cpu_type = "ppc64/power5+",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000368 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000369 .oprofile_mmcra_sihv = MMCRA_SIHV,
370 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100371 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100372 .platform = "power5+",
Stephen Rothwell49209602005-10-12 15:55:09 +1000373 },
Paul Mackerras974a76f2006-11-10 20:38:53 +1100374 { /* POWER6 in P5+ mode; 2.04-compliant processor */
375 .pvr_mask = 0xffffffff,
376 .pvr_value = 0x0f000001,
377 .cpu_name = "POWER5+",
378 .cpu_features = CPU_FTRS_POWER5,
379 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000380 .mmu_features = MMU_FTR_HPTE_TABLE,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100381 .icache_bsize = 128,
382 .dcache_bsize = 128,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100383 .machine_check = machine_check_generic,
Torez Smith79e25ba2008-07-18 06:42:07 +1000384 .oprofile_cpu_type = "ppc64/compat-power5+",
Paul Mackerras974a76f2006-11-10 20:38:53 +1100385 .platform = "power5+",
386 },
Anton Blanchard03054d52006-04-29 09:51:06 +1000387 { /* Power6 */
388 .pvr_mask = 0xffff0000,
389 .pvr_value = 0x003e0000,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100390 .cpu_name = "POWER6 (raw)",
391 .cpu_features = CPU_FTRS_POWER6,
392 .cpu_user_features = COMMON_USER_POWER6 |
393 PPC_FEATURE_POWER6_EXT,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000394 .mmu_features = MMU_FTR_HPTE_TABLE,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100395 .icache_bsize = 128,
396 .dcache_bsize = 128,
397 .num_pmcs = 6,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000398 .pmc_type = PPC_PMC_IBM,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100399 .oprofile_cpu_type = "ppc64/power6",
400 .oprofile_type = PPC_OPROFILE_POWER4,
401 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
402 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
403 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
404 POWER6_MMCRA_OTHER,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100405 .machine_check = machine_check_generic,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100406 .platform = "power6x",
407 },
408 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
409 .pvr_mask = 0xffffffff,
410 .pvr_value = 0x0f000002,
411 .cpu_name = "POWER6 (architected)",
Anton Blanchard03054d52006-04-29 09:51:06 +1000412 .cpu_features = CPU_FTRS_POWER6,
413 .cpu_user_features = COMMON_USER_POWER6,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000414 .mmu_features = MMU_FTR_HPTE_TABLE,
Anton Blanchard03054d52006-04-29 09:51:06 +1000415 .icache_bsize = 128,
416 .dcache_bsize = 128,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100417 .machine_check = machine_check_generic,
Torez Smith79e25ba2008-07-18 06:42:07 +1000418 .oprofile_cpu_type = "ppc64/compat-power6",
Anton Blanchard03054d52006-04-29 09:51:06 +1000419 .platform = "power6",
420 },
Joel Schopp635f5a62008-06-19 06:18:21 +1000421 { /* 2.06-compliant processor, i.e. Power7 "architected" mode */
422 .pvr_mask = 0xffffffff,
423 .pvr_value = 0x0f000003,
424 .cpu_name = "POWER7 (architected)",
425 .cpu_features = CPU_FTRS_POWER7,
426 .cpu_user_features = COMMON_USER_POWER7,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000427 .mmu_features = MMU_FTR_HPTE_TABLE,
Joel Schopp635f5a62008-06-19 06:18:21 +1000428 .icache_bsize = 128,
429 .dcache_bsize = 128,
430 .machine_check = machine_check_generic,
Torez Smith79e25ba2008-07-18 06:42:07 +1000431 .oprofile_cpu_type = "ppc64/compat-power7",
Joel Schopp635f5a62008-06-19 06:18:21 +1000432 .platform = "power7",
433 },
Michael Neulinge952e6c2008-06-18 10:47:26 +1000434 { /* Power7 */
435 .pvr_mask = 0xffff0000,
436 .pvr_value = 0x003f0000,
Joel Schopp635f5a62008-06-19 06:18:21 +1000437 .cpu_name = "POWER7 (raw)",
Michael Neulinge952e6c2008-06-18 10:47:26 +1000438 .cpu_features = CPU_FTRS_POWER7,
439 .cpu_user_features = COMMON_USER_POWER7,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000440 .mmu_features = MMU_FTR_HPTE_TABLE,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000441 .icache_bsize = 128,
442 .dcache_bsize = 128,
443 .num_pmcs = 6,
444 .pmc_type = PPC_PMC_IBM,
445 .cpu_setup = __setup_cpu_power7,
446 .cpu_restore = __restore_cpu_power7,
447 .oprofile_cpu_type = "ppc64/power7",
448 .oprofile_type = PPC_OPROFILE_POWER4,
449 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
450 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
451 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
452 POWER6_MMCRA_OTHER,
453 .platform = "power7",
454 },
Arnd Bergmannc902be72006-01-04 19:55:53 +0000455 { /* Cell Broadband Engine */
Stephen Rothwell49209602005-10-12 15:55:09 +1000456 .pvr_mask = 0xffff0000,
457 .pvr_value = 0x00700000,
458 .cpu_name = "Cell Broadband Engine",
459 .cpu_features = CPU_FTRS_CELL,
460 .cpu_user_features = COMMON_USER_PPC64 |
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +1100461 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
462 PPC_FEATURE_SMT,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000463 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000464 .icache_bsize = 128,
465 .dcache_bsize = 128,
Maynard Johnson18f21902006-11-20 18:45:16 +0100466 .num_pmcs = 4,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600467 .pmc_type = PPC_PMC_IBM,
Maynard Johnson18f21902006-11-20 18:45:16 +0100468 .oprofile_cpu_type = "ppc64/cell-be",
469 .oprofile_type = PPC_OPROFILE_CELL,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100470 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100471 .platform = "ppc-cell-be",
Stephen Rothwell49209602005-10-12 15:55:09 +1000472 },
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500473 { /* PA Semi PA6T */
474 .pvr_mask = 0x7fff0000,
475 .pvr_value = 0x00900000,
476 .cpu_name = "PA6T",
477 .cpu_features = CPU_FTRS_PA6T,
478 .cpu_user_features = COMMON_USER_PA6T,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000479 .mmu_features = MMU_FTR_HPTE_TABLE,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500480 .icache_bsize = 64,
481 .dcache_bsize = 64,
482 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600483 .pmc_type = PPC_PMC_PA6T,
Olof Johansson11999192007-02-04 16:36:51 -0600484 .cpu_setup = __setup_cpu_pa6t,
485 .cpu_restore = __restore_cpu_pa6t,
Olof Johansson25fc5302007-04-18 16:38:21 +1000486 .oprofile_cpu_type = "ppc64/pa6t",
487 .oprofile_type = PPC_OPROFILE_PA6T,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100488 .machine_check = machine_check_generic,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500489 .platform = "pa6t",
490 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000491 { /* default match */
492 .pvr_mask = 0x00000000,
493 .pvr_value = 0x00000000,
494 .cpu_name = "POWER4 (compatible)",
495 .cpu_features = CPU_FTRS_COMPATIBLE,
496 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000497 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000498 .icache_bsize = 128,
499 .dcache_bsize = 128,
500 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600501 .pmc_type = PPC_PMC_IBM,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100502 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100503 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000504 }
505#endif /* CONFIG_PPC64 */
506#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -0700507#if CLASSIC_PPC
Stephen Rothwell49209602005-10-12 15:55:09 +1000508 { /* 601 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700509 .pvr_mask = 0xffff0000,
510 .pvr_value = 0x00010000,
511 .cpu_name = "601",
Kumar Gala10b35d92005-09-23 14:08:58 -0500512 .cpu_features = CPU_FTRS_PPC601,
Stephen Rothwell49209602005-10-12 15:55:09 +1000513 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
Paul Mackerras98599012005-10-22 16:51:34 +1000514 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000515 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700516 .icache_bsize = 32,
517 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100518 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100519 .platform = "ppc601",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700520 },
521 { /* 603 */
522 .pvr_mask = 0xffff0000,
523 .pvr_value = 0x00030000,
524 .cpu_name = "603",
Kumar Gala10b35d92005-09-23 14:08:58 -0500525 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000526 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000527 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700528 .icache_bsize = 32,
529 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100530 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100531 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100532 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700533 },
534 { /* 603e */
535 .pvr_mask = 0xffff0000,
536 .pvr_value = 0x00060000,
537 .cpu_name = "603e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500538 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000539 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000540 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700541 .icache_bsize = 32,
542 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100543 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100544 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100545 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700546 },
547 { /* 603ev */
548 .pvr_mask = 0xffff0000,
549 .pvr_value = 0x00070000,
550 .cpu_name = "603ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500551 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000552 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000553 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700554 .icache_bsize = 32,
555 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100556 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100557 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100558 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700559 },
560 { /* 604 */
561 .pvr_mask = 0xffff0000,
562 .pvr_value = 0x00040000,
563 .cpu_name = "604",
Kumar Gala10b35d92005-09-23 14:08:58 -0500564 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000565 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000566 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700567 .icache_bsize = 32,
568 .dcache_bsize = 32,
569 .num_pmcs = 2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100570 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100571 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100572 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700573 },
574 { /* 604e */
575 .pvr_mask = 0xfffff000,
576 .pvr_value = 0x00090000,
577 .cpu_name = "604e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500578 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000579 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000580 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700581 .icache_bsize = 32,
582 .dcache_bsize = 32,
583 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100584 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100585 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100586 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700587 },
588 { /* 604r */
589 .pvr_mask = 0xffff0000,
590 .pvr_value = 0x00090000,
591 .cpu_name = "604r",
Kumar Gala10b35d92005-09-23 14:08:58 -0500592 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000593 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000594 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700595 .icache_bsize = 32,
596 .dcache_bsize = 32,
597 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100598 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100599 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100600 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700601 },
602 { /* 604ev */
603 .pvr_mask = 0xffff0000,
604 .pvr_value = 0x000a0000,
605 .cpu_name = "604ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500606 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000607 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000608 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700609 .icache_bsize = 32,
610 .dcache_bsize = 32,
611 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100612 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100613 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100614 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700615 },
616 { /* 740/750 (0x4202, don't support TAU ?) */
617 .pvr_mask = 0xffffffff,
618 .pvr_value = 0x00084202,
619 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500620 .cpu_features = CPU_FTRS_740_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000621 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000622 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700623 .icache_bsize = 32,
624 .dcache_bsize = 32,
625 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100626 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100627 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100628 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700629 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700630 { /* 750CX (80100 and 8010x?) */
631 .pvr_mask = 0xfffffff0,
632 .pvr_value = 0x00080100,
633 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500634 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000635 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000636 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700637 .icache_bsize = 32,
638 .dcache_bsize = 32,
639 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100640 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100641 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100642 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700643 },
644 { /* 750CX (82201 and 82202) */
645 .pvr_mask = 0xfffffff0,
646 .pvr_value = 0x00082200,
647 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500648 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000649 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000650 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700651 .icache_bsize = 32,
652 .dcache_bsize = 32,
653 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000654 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100655 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100656 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100657 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700658 },
659 { /* 750CXe (82214) */
660 .pvr_mask = 0xfffffff0,
661 .pvr_value = 0x00082210,
662 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500663 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000664 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000665 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700666 .icache_bsize = 32,
667 .dcache_bsize = 32,
668 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000669 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100670 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100671 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100672 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700673 },
Arthur Othieno7c316252005-09-03 15:55:52 -0700674 { /* 750CXe "Gekko" (83214) */
675 .pvr_mask = 0xffffffff,
676 .pvr_value = 0x00083214,
677 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500678 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000679 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000680 .mmu_features = MMU_FTR_HPTE_TABLE,
Arthur Othieno7c316252005-09-03 15:55:52 -0700681 .icache_bsize = 32,
682 .dcache_bsize = 32,
683 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000684 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100685 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100686 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100687 .platform = "ppc750",
Arthur Othieno7c316252005-09-03 15:55:52 -0700688 },
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500689 { /* 750CL */
690 .pvr_mask = 0xfffff0f0,
691 .pvr_value = 0x00087010,
692 .cpu_name = "750CL",
Josh Boyera14c4502007-04-13 04:33:25 +1000693 .cpu_features = CPU_FTRS_750CL,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500694 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000695 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500696 .icache_bsize = 32,
697 .dcache_bsize = 32,
698 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000699 .pmc_type = PPC_PMC_IBM,
Josh Boyera14c4502007-04-13 04:33:25 +1000700 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100701 .machine_check = machine_check_generic,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500702 .platform = "ppc750",
703 },
Arthur Othienoac1ff042005-09-03 15:55:51 -0700704 { /* 745/755 */
705 .pvr_mask = 0xfffff000,
706 .pvr_value = 0x00083000,
707 .cpu_name = "745/755",
Kumar Gala10b35d92005-09-23 14:08:58 -0500708 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000709 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000710 .mmu_features = MMU_FTR_HPTE_TABLE,
Arthur Othienoac1ff042005-09-03 15:55:51 -0700711 .icache_bsize = 32,
712 .dcache_bsize = 32,
713 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000714 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100715 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100716 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100717 .platform = "ppc750",
Arthur Othienoac1ff042005-09-03 15:55:51 -0700718 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700719 { /* 750FX rev 1.x */
720 .pvr_mask = 0xffffff00,
721 .pvr_value = 0x70000100,
722 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500723 .cpu_features = CPU_FTRS_750FX1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000724 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000725 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700726 .icache_bsize = 32,
727 .dcache_bsize = 32,
728 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000729 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100730 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100731 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100732 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700733 },
734 { /* 750FX rev 2.0 must disable HID0[DPM] */
735 .pvr_mask = 0xffffffff,
736 .pvr_value = 0x70000200,
737 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500738 .cpu_features = CPU_FTRS_750FX2,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000739 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000740 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700741 .icache_bsize = 32,
742 .dcache_bsize = 32,
743 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000744 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100745 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100746 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100747 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700748 },
749 { /* 750FX (All revs except 2.0) */
750 .pvr_mask = 0xffff0000,
751 .pvr_value = 0x70000000,
752 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500753 .cpu_features = CPU_FTRS_750FX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000754 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000755 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700756 .icache_bsize = 32,
757 .dcache_bsize = 32,
758 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000759 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100760 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100761 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100762 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700763 },
764 { /* 750GX */
765 .pvr_mask = 0xffff0000,
766 .pvr_value = 0x70020000,
767 .cpu_name = "750GX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500768 .cpu_features = CPU_FTRS_750GX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000769 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000770 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700771 .icache_bsize = 32,
772 .dcache_bsize = 32,
773 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000774 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100775 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100776 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100777 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700778 },
779 { /* 740/750 (L2CR bit need fixup for 740) */
780 .pvr_mask = 0xffff0000,
781 .pvr_value = 0x00080000,
782 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500783 .cpu_features = CPU_FTRS_740,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000784 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000785 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700786 .icache_bsize = 32,
787 .dcache_bsize = 32,
788 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000789 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100790 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100791 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100792 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700793 },
794 { /* 7400 rev 1.1 ? (no TAU) */
795 .pvr_mask = 0xffffffff,
796 .pvr_value = 0x000c1101,
797 .cpu_name = "7400 (1.1)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500798 .cpu_features = CPU_FTRS_7400_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000799 .cpu_user_features = COMMON_USER |
800 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000801 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700802 .icache_bsize = 32,
803 .dcache_bsize = 32,
804 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000805 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100806 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100807 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100808 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700809 },
810 { /* 7400 */
811 .pvr_mask = 0xffff0000,
812 .pvr_value = 0x000c0000,
813 .cpu_name = "7400",
Kumar Gala10b35d92005-09-23 14:08:58 -0500814 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000815 .cpu_user_features = COMMON_USER |
816 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000817 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700818 .icache_bsize = 32,
819 .dcache_bsize = 32,
820 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000821 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100822 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100823 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100824 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700825 },
826 { /* 7410 */
827 .pvr_mask = 0xffff0000,
828 .pvr_value = 0x800c0000,
829 .cpu_name = "7410",
Kumar Gala10b35d92005-09-23 14:08:58 -0500830 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000831 .cpu_user_features = COMMON_USER |
832 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000833 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700834 .icache_bsize = 32,
835 .dcache_bsize = 32,
836 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000837 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100838 .cpu_setup = __setup_cpu_7410,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100839 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100840 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700841 },
842 { /* 7450 2.0 - no doze/nap */
843 .pvr_mask = 0xffffffff,
844 .pvr_value = 0x80000200,
845 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500846 .cpu_features = CPU_FTRS_7450_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000847 .cpu_user_features = COMMON_USER |
848 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000849 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700850 .icache_bsize = 32,
851 .dcache_bsize = 32,
852 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000853 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600854 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600855 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000856 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100857 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100858 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700859 },
860 { /* 7450 2.1 */
861 .pvr_mask = 0xffffffff,
862 .pvr_value = 0x80000201,
863 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500864 .cpu_features = CPU_FTRS_7450_21,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000865 .cpu_user_features = COMMON_USER |
866 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000867 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700868 .icache_bsize = 32,
869 .dcache_bsize = 32,
870 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000871 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600872 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600873 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000874 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100875 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100876 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700877 },
878 { /* 7450 2.3 and newer */
879 .pvr_mask = 0xffff0000,
880 .pvr_value = 0x80000000,
881 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500882 .cpu_features = CPU_FTRS_7450_23,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000883 .cpu_user_features = COMMON_USER |
884 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000885 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700886 .icache_bsize = 32,
887 .dcache_bsize = 32,
888 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000889 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600890 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600891 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000892 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100893 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100894 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700895 },
896 { /* 7455 rev 1.x */
897 .pvr_mask = 0xffffff00,
898 .pvr_value = 0x80010100,
899 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500900 .cpu_features = CPU_FTRS_7455_1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000901 .cpu_user_features = COMMON_USER |
902 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000903 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700904 .icache_bsize = 32,
905 .dcache_bsize = 32,
906 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000907 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600908 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600909 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000910 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100911 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100912 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700913 },
914 { /* 7455 rev 2.0 */
915 .pvr_mask = 0xffffffff,
916 .pvr_value = 0x80010200,
917 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500918 .cpu_features = CPU_FTRS_7455_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000919 .cpu_user_features = COMMON_USER |
920 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000921 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700922 .icache_bsize = 32,
923 .dcache_bsize = 32,
924 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000925 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600926 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600927 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000928 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100929 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100930 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700931 },
932 { /* 7455 others */
933 .pvr_mask = 0xffff0000,
934 .pvr_value = 0x80010000,
935 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500936 .cpu_features = CPU_FTRS_7455,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000937 .cpu_user_features = COMMON_USER |
938 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000939 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700940 .icache_bsize = 32,
941 .dcache_bsize = 32,
942 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000943 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600944 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600945 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000946 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100947 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100948 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700949 },
950 { /* 7447/7457 Rev 1.0 */
951 .pvr_mask = 0xffffffff,
952 .pvr_value = 0x80020100,
953 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500954 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000955 .cpu_user_features = COMMON_USER |
956 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000957 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700958 .icache_bsize = 32,
959 .dcache_bsize = 32,
960 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000961 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600962 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600963 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000964 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100965 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100966 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700967 },
968 { /* 7447/7457 Rev 1.1 */
969 .pvr_mask = 0xffffffff,
970 .pvr_value = 0x80020101,
971 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500972 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000973 .cpu_user_features = COMMON_USER |
974 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000975 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700976 .icache_bsize = 32,
977 .dcache_bsize = 32,
978 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000979 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600980 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600981 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000982 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100983 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100984 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700985 },
986 { /* 7447/7457 Rev 1.2 and later */
987 .pvr_mask = 0xffff0000,
988 .pvr_value = 0x80020000,
989 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500990 .cpu_features = CPU_FTRS_7447,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000991 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000992 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700993 .icache_bsize = 32,
994 .dcache_bsize = 32,
995 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000996 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600997 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600998 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000999 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001000 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001001 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001002 },
1003 { /* 7447A */
1004 .pvr_mask = 0xffff0000,
1005 .pvr_value = 0x80030000,
1006 .cpu_name = "7447A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001007 .cpu_features = CPU_FTRS_7447A,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001008 .cpu_user_features = COMMON_USER |
1009 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001010 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001011 .icache_bsize = 32,
1012 .dcache_bsize = 32,
1013 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001014 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001015 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001016 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001017 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001018 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001019 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001020 },
Kumar Galabbde6302005-09-03 15:55:55 -07001021 { /* 7448 */
1022 .pvr_mask = 0xffff0000,
1023 .pvr_value = 0x80040000,
1024 .cpu_name = "7448",
James.Yang3d372542007-05-02 16:34:43 -05001025 .cpu_features = CPU_FTRS_7448,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001026 .cpu_user_features = COMMON_USER |
1027 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001028 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Kumar Galabbde6302005-09-03 15:55:55 -07001029 .icache_bsize = 32,
1030 .dcache_bsize = 32,
1031 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001032 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001033 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001034 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001035 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001036 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001037 .platform = "ppc7450",
Kumar Galabbde6302005-09-03 15:55:55 -07001038 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001039 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
1040 .pvr_mask = 0x7fff0000,
1041 .pvr_value = 0x00810000,
1042 .cpu_name = "82xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001043 .cpu_features = CPU_FTRS_82XX,
Stephen Rothwell49209602005-10-12 15:55:09 +10001044 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001045 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001046 .icache_bsize = 32,
1047 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001048 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001049 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001050 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001051 },
1052 { /* All G2_LE (603e core, plus some) have the same pvr */
1053 .pvr_mask = 0x7fff0000,
1054 .pvr_value = 0x00820000,
1055 .cpu_name = "G2_LE",
Kumar Gala10b35d92005-09-23 14:08:58 -05001056 .cpu_features = CPU_FTRS_G2_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +10001057 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001058 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001059 .icache_bsize = 32,
1060 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001061 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001062 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001063 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001064 },
Kim Phillips6c4a2502006-10-02 20:10:24 -05001065 { /* e300c1 (a 603e core, plus some) on 83xx */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001066 .pvr_mask = 0x7fff0000,
1067 .pvr_value = 0x00830000,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001068 .cpu_name = "e300c1",
Kumar Gala10b35d92005-09-23 14:08:58 -05001069 .cpu_features = CPU_FTRS_E300,
Stephen Rothwell49209602005-10-12 15:55:09 +10001070 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001071 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001072 .icache_bsize = 32,
1073 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001074 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001075 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001076 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001077 },
Kim Phillips6c4a2502006-10-02 20:10:24 -05001078 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
1079 .pvr_mask = 0x7fff0000,
1080 .pvr_value = 0x00840000,
1081 .cpu_name = "e300c2",
Kim Phillipsaa42c692006-12-08 02:43:30 -06001082 .cpu_features = CPU_FTRS_E300C2,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001083 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001084 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001085 .icache_bsize = 32,
1086 .dcache_bsize = 32,
1087 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001088 .machine_check = machine_check_generic,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001089 .platform = "ppc603",
1090 },
Li Yanga58d5242007-10-19 19:38:42 +08001091 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
Scott Wood57933f82006-12-01 12:57:05 -06001092 .pvr_mask = 0x7fff0000,
1093 .pvr_value = 0x00850000,
1094 .cpu_name = "e300c3",
1095 .cpu_features = CPU_FTRS_E300,
1096 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001097 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Scott Wood57933f82006-12-01 12:57:05 -06001098 .icache_bsize = 32,
1099 .dcache_bsize = 32,
1100 .cpu_setup = __setup_cpu_603,
Andy Fleming1347a2c2008-02-04 18:28:07 -06001101 .num_pmcs = 4,
1102 .oprofile_cpu_type = "ppc/e300",
1103 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Scott Wood57933f82006-12-01 12:57:05 -06001104 .platform = "ppc603",
1105 },
Li Yanga58d5242007-10-19 19:38:42 +08001106 { /* e300c4 (e300c1, plus one IU) */
1107 .pvr_mask = 0x7fff0000,
1108 .pvr_value = 0x00860000,
1109 .cpu_name = "e300c4",
1110 .cpu_features = CPU_FTRS_E300,
1111 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001112 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Li Yanga58d5242007-10-19 19:38:42 +08001113 .icache_bsize = 32,
1114 .dcache_bsize = 32,
1115 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001116 .machine_check = machine_check_generic,
Andy Fleming1347a2c2008-02-04 18:28:07 -06001117 .num_pmcs = 4,
1118 .oprofile_cpu_type = "ppc/e300",
1119 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Li Yanga58d5242007-10-19 19:38:42 +08001120 .platform = "ppc603",
1121 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001122 { /* default match, we assume split I/D cache & TB (non-601)... */
1123 .pvr_mask = 0x00000000,
1124 .pvr_value = 0x00000000,
1125 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -05001126 .cpu_features = CPU_FTRS_CLASSIC32,
Stephen Rothwell49209602005-10-12 15:55:09 +10001127 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001128 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001129 .icache_bsize = 32,
1130 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001131 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001132 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001133 },
1134#endif /* CLASSIC_PPC */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001135#ifdef CONFIG_8xx
1136 { /* 8xx */
1137 .pvr_mask = 0xffff0000,
1138 .pvr_value = 0x00500000,
1139 .cpu_name = "8xx",
1140 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1141 * if the 8xx code is there.... */
Kumar Gala10b35d92005-09-23 14:08:58 -05001142 .cpu_features = CPU_FTRS_8XX,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001143 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001144 .mmu_features = MMU_FTR_TYPE_8xx,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001145 .icache_bsize = 16,
1146 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001147 .platform = "ppc823",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001148 },
1149#endif /* CONFIG_8xx */
1150#ifdef CONFIG_40x
1151 { /* 403GC */
1152 .pvr_mask = 0xffffff00,
1153 .pvr_value = 0x00200200,
1154 .cpu_name = "403GC",
Kumar Gala10b35d92005-09-23 14:08:58 -05001155 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001156 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001157 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001158 .icache_bsize = 16,
1159 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001160 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001161 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001162 },
1163 { /* 403GCX */
1164 .pvr_mask = 0xffffff00,
1165 .pvr_value = 0x00201400,
1166 .cpu_name = "403GCX",
Kumar Gala10b35d92005-09-23 14:08:58 -05001167 .cpu_features = CPU_FTRS_40X,
Paul Mackerras98599012005-10-22 16:51:34 +10001168 .cpu_user_features = PPC_FEATURE_32 |
1169 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001170 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001171 .icache_bsize = 16,
1172 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001173 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001174 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001175 },
1176 { /* 403G ?? */
1177 .pvr_mask = 0xffff0000,
1178 .pvr_value = 0x00200000,
1179 .cpu_name = "403G ??",
Kumar Gala10b35d92005-09-23 14:08:58 -05001180 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001181 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
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 { /* 405GP */
1189 .pvr_mask = 0xffff0000,
1190 .pvr_value = 0x40110000,
1191 .cpu_name = "405GP",
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 |
1194 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001195 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001196 .icache_bsize = 32,
1197 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001198 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001199 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001200 },
1201 { /* STB 03xxx */
1202 .pvr_mask = 0xffff0000,
1203 .pvr_value = 0x40130000,
1204 .cpu_name = "STB03xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001205 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001206 .cpu_user_features = PPC_FEATURE_32 |
1207 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001208 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001209 .icache_bsize = 32,
1210 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001211 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001212 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001213 },
1214 { /* STB 04xxx */
1215 .pvr_mask = 0xffff0000,
1216 .pvr_value = 0x41810000,
1217 .cpu_name = "STB04xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001218 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001219 .cpu_user_features = PPC_FEATURE_32 |
1220 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001221 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001222 .icache_bsize = 32,
1223 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001224 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001225 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001226 },
1227 { /* NP405L */
1228 .pvr_mask = 0xffff0000,
1229 .pvr_value = 0x41610000,
1230 .cpu_name = "NP405L",
Kumar Gala10b35d92005-09-23 14:08:58 -05001231 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001232 .cpu_user_features = PPC_FEATURE_32 |
1233 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001234 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001235 .icache_bsize = 32,
1236 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001237 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001238 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001239 },
1240 { /* NP4GS3 */
1241 .pvr_mask = 0xffff0000,
1242 .pvr_value = 0x40B10000,
1243 .cpu_name = "NP4GS3",
Kumar Gala10b35d92005-09-23 14:08:58 -05001244 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001245 .cpu_user_features = PPC_FEATURE_32 |
1246 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001247 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001248 .icache_bsize = 32,
1249 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001250 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001251 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001252 },
1253 { /* NP405H */
1254 .pvr_mask = 0xffff0000,
1255 .pvr_value = 0x41410000,
1256 .cpu_name = "NP405H",
Kumar Gala10b35d92005-09-23 14:08:58 -05001257 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001258 .cpu_user_features = PPC_FEATURE_32 |
1259 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001260 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001261 .icache_bsize = 32,
1262 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001263 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001264 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001265 },
1266 { /* 405GPr */
1267 .pvr_mask = 0xffff0000,
1268 .pvr_value = 0x50910000,
1269 .cpu_name = "405GPr",
Kumar Gala10b35d92005-09-23 14:08:58 -05001270 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001271 .cpu_user_features = PPC_FEATURE_32 |
1272 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001273 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001274 .icache_bsize = 32,
1275 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001276 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001277 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001278 },
1279 { /* STBx25xx */
1280 .pvr_mask = 0xffff0000,
1281 .pvr_value = 0x51510000,
1282 .cpu_name = "STBx25xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001283 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001284 .cpu_user_features = PPC_FEATURE_32 |
1285 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001286 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001287 .icache_bsize = 32,
1288 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001289 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001290 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001291 },
1292 { /* 405LP */
1293 .pvr_mask = 0xffff0000,
1294 .pvr_value = 0x41F10000,
1295 .cpu_name = "405LP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001296 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001297 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
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 { /* Xilinx Virtex-II Pro */
Grant C. Likely72646c72006-01-19 01:13:20 -07001305 .pvr_mask = 0xfffff000,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001306 .pvr_value = 0x20010000,
1307 .cpu_name = "Virtex-II Pro",
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 |
1310 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001311 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001312 .icache_bsize = 32,
1313 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001314 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001315 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001316 },
Grant C. Likely72646c72006-01-19 01:13:20 -07001317 { /* Xilinx Virtex-4 FX */
1318 .pvr_mask = 0xfffff000,
1319 .pvr_value = 0x20011000,
1320 .cpu_name = "Virtex-4 FX",
1321 .cpu_features = CPU_FTRS_40X,
1322 .cpu_user_features = PPC_FEATURE_32 |
1323 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001324 .mmu_features = MMU_FTR_TYPE_40x,
Grant C. Likely72646c72006-01-19 01:13:20 -07001325 .icache_bsize = 32,
1326 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001327 .machine_check = machine_check_4xx,
Peter Bergner838fdb42006-09-14 14:18:38 -05001328 .platform = "ppc405",
Grant C. Likely72646c72006-01-19 01:13:20 -07001329 },
Eugene Suroveginad95d602005-06-07 13:22:09 -07001330 { /* 405EP */
1331 .pvr_mask = 0xffff0000,
1332 .pvr_value = 0x51210000,
1333 .cpu_name = "405EP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001334 .cpu_features = CPU_FTRS_40X,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001335 .cpu_user_features = PPC_FEATURE_32 |
1336 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001337 .mmu_features = MMU_FTR_TYPE_40x,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001338 .icache_bsize = 32,
1339 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001340 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001341 .platform = "ppc405",
Eugene Suroveginad95d602005-06-07 13:22:09 -07001342 },
Stefan Roese5d8476c2007-10-11 22:08:14 +10001343 { /* 405EX */
Stefan Roeseb676d842008-01-15 18:09:15 +11001344 .pvr_mask = 0xffff0004,
1345 .pvr_value = 0x12910004,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001346 .cpu_name = "405EX",
1347 .cpu_features = CPU_FTRS_40X,
1348 .cpu_user_features = PPC_FEATURE_32 |
1349 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001350 .mmu_features = MMU_FTR_TYPE_40x,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001351 .icache_bsize = 32,
1352 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001353 .machine_check = machine_check_4xx,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001354 .platform = "ppc405",
1355 },
Stefan Roeseb676d842008-01-15 18:09:15 +11001356 { /* 405EXr */
1357 .pvr_mask = 0xffff0004,
1358 .pvr_value = 0x12910000,
1359 .cpu_name = "405EXr",
1360 .cpu_features = CPU_FTRS_40X,
1361 .cpu_user_features = PPC_FEATURE_32 |
1362 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001363 .mmu_features = MMU_FTR_TYPE_40x,
Stefan Roeseb676d842008-01-15 18:09:15 +11001364 .icache_bsize = 32,
1365 .dcache_bsize = 32,
1366 .machine_check = machine_check_4xx,
1367 .platform = "ppc405",
1368 },
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001369 {
1370 /* 405EZ */
1371 .pvr_mask = 0xffff0000,
1372 .pvr_value = 0x41510000,
1373 .cpu_name = "405EZ",
1374 .cpu_features = CPU_FTRS_40X,
1375 .cpu_user_features = PPC_FEATURE_32 |
1376 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001377 .mmu_features = MMU_FTR_TYPE_40x,
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001378 .icache_bsize = 32,
1379 .dcache_bsize = 32,
1380 .machine_check = machine_check_4xx,
1381 .platform = "ppc405",
1382 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001383 { /* default match */
1384 .pvr_mask = 0x00000000,
1385 .pvr_value = 0x00000000,
1386 .cpu_name = "(generic 40x PPC)",
1387 .cpu_features = CPU_FTRS_40X,
1388 .cpu_user_features = PPC_FEATURE_32 |
1389 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001390 .mmu_features = MMU_FTR_TYPE_40x,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001391 .icache_bsize = 32,
1392 .dcache_bsize = 32,
1393 .machine_check = machine_check_4xx,
1394 .platform = "ppc405",
1395 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001396
1397#endif /* CONFIG_40x */
1398#ifdef CONFIG_44x
Matt Porterc9cf73a2005-07-31 22:34:52 -07001399 {
1400 .pvr_mask = 0xf0000fff,
1401 .pvr_value = 0x40000850,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001402 .cpu_name = "440GR Rev. A",
1403 .cpu_features = CPU_FTRS_44X,
1404 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001405 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001406 .icache_bsize = 32,
1407 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001408 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001409 .platform = "ppc440",
1410 },
1411 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1412 .pvr_mask = 0xf0000fff,
1413 .pvr_value = 0x40000858,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001414 .cpu_name = "440EP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001415 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001416 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001417 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001418 .icache_bsize = 32,
1419 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001420 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001421 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001422 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001423 },
1424 {
1425 .pvr_mask = 0xf0000fff,
1426 .pvr_value = 0x400008d3,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001427 .cpu_name = "440GR Rev. B",
1428 .cpu_features = CPU_FTRS_44X,
1429 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001430 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001431 .icache_bsize = 32,
1432 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001433 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001434 .platform = "ppc440",
1435 },
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001436 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1437 .pvr_mask = 0xf0000ff7,
1438 .pvr_value = 0x400008d4,
1439 .cpu_name = "440EP Rev. C",
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,
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001443 .icache_bsize = 32,
1444 .dcache_bsize = 32,
1445 .cpu_setup = __setup_cpu_440ep,
1446 .machine_check = machine_check_4xx,
1447 .platform = "ppc440",
1448 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001449 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1450 .pvr_mask = 0xf0000fff,
1451 .pvr_value = 0x400008db,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001452 .cpu_name = "440EP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001453 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001454 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001455 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001456 .icache_bsize = 32,
1457 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001458 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001459 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001460 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001461 },
Valentine Barshak15fc9932007-08-29 17:40:30 +04001462 { /* 440GRX */
1463 .pvr_mask = 0xf0000ffb,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001464 .pvr_value = 0x200008D0,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001465 .cpu_name = "440GRX",
1466 .cpu_features = CPU_FTRS_44X,
1467 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001468 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001469 .icache_bsize = 32,
1470 .dcache_bsize = 32,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001471 .cpu_setup = __setup_cpu_440grx,
Valentine Barshakb2be3b12007-12-22 03:22:23 +11001472 .machine_check = machine_check_440A,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001473 .platform = "ppc440",
Valentine Barshak15fc9932007-08-29 17:40:30 +04001474 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001475 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1476 .pvr_mask = 0xf0000ffb,
1477 .pvr_value = 0x200008D8,
1478 .cpu_name = "440EPX",
1479 .cpu_features = CPU_FTRS_44X,
1480 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001481 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001482 .icache_bsize = 32,
1483 .dcache_bsize = 32,
1484 .cpu_setup = __setup_cpu_440epx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001485 .machine_check = machine_check_440A,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001486 .platform = "ppc440",
1487 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001488 { /* 440GP Rev. B */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001489 .pvr_mask = 0xf0000fff,
1490 .pvr_value = 0x40000440,
1491 .cpu_name = "440GP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001492 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001493 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001494 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001495 .icache_bsize = 32,
1496 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001497 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001498 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001499 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001500 { /* 440GP Rev. C */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001501 .pvr_mask = 0xf0000fff,
1502 .pvr_value = 0x40000481,
1503 .cpu_name = "440GP Rev. C",
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 },
1512 { /* 440GX Rev. A */
1513 .pvr_mask = 0xf0000fff,
1514 .pvr_value = 0x50000850,
1515 .cpu_name = "440GX Rev. A",
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 .cpu_setup = __setup_cpu_440gx,
1522 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001523 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001524 },
1525 { /* 440GX Rev. B */
1526 .pvr_mask = 0xf0000fff,
1527 .pvr_value = 0x50000851,
1528 .cpu_name = "440GX Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001529 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001530 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001531 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001532 .icache_bsize = 32,
1533 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001534 .cpu_setup = __setup_cpu_440gx,
1535 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001536 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001537 },
1538 { /* 440GX Rev. C */
1539 .pvr_mask = 0xf0000fff,
1540 .pvr_value = 0x50000892,
1541 .cpu_name = "440GX Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001542 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001543 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001544 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001545 .icache_bsize = 32,
1546 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001547 .cpu_setup = __setup_cpu_440gx,
1548 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001549 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001550 },
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001551 { /* 440GX Rev. F */
1552 .pvr_mask = 0xf0000fff,
1553 .pvr_value = 0x50000894,
1554 .cpu_name = "440GX Rev. F",
Kumar Gala10b35d92005-09-23 14:08:58 -05001555 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001556 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001557 .mmu_features = MMU_FTR_TYPE_44x,
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001558 .icache_bsize = 32,
1559 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001560 .cpu_setup = __setup_cpu_440gx,
1561 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001562 .platform = "ppc440",
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001563 },
Matt Porter656de7e2005-09-03 15:55:42 -07001564 { /* 440SP Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001565 .pvr_mask = 0xfff00fff,
1566 .pvr_value = 0x53200891,
Matt Porter656de7e2005-09-03 15:55:42 -07001567 .cpu_name = "440SP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001568 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001569 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001570 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porter656de7e2005-09-03 15:55:42 -07001571 .icache_bsize = 32,
1572 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001573 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001574 .platform = "ppc440",
Matt Porter656de7e2005-09-03 15:55:42 -07001575 },
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001576 { /* 440SPe Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001577 .pvr_mask = 0xfff00fff,
1578 .pvr_value = 0x53400890,
1579 .cpu_name = "440SPe Rev. A",
1580 .cpu_features = CPU_FTRS_44X,
1581 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001582 .mmu_features = MMU_FTR_TYPE_44x,
Roland Dreier333e6152007-06-16 05:36:32 +10001583 .icache_bsize = 32,
1584 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001585 .cpu_setup = __setup_cpu_440spe,
1586 .machine_check = machine_check_440A,
Roland Dreier333e6152007-06-16 05:36:32 +10001587 .platform = "ppc440",
1588 },
1589 { /* 440SPe Rev. B */
1590 .pvr_mask = 0xfff00fff,
1591 .pvr_value = 0x53400891,
1592 .cpu_name = "440SPe Rev. B",
Kumar Galaa147c582006-12-08 02:34:38 -06001593 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001594 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001595 .mmu_features = MMU_FTR_TYPE_44x,
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001596 .icache_bsize = 32,
1597 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001598 .cpu_setup = __setup_cpu_440spe,
1599 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001600 .platform = "ppc440",
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001601 },
John Linn23e72372008-07-01 09:42:07 -07001602 { /* 440 in Xilinx Virtex-5 FXT */
1603 .pvr_mask = 0xfffffff0,
1604 .pvr_value = 0x7ff21910,
1605 .cpu_name = "440 in Virtex-5 FXT",
1606 .cpu_features = CPU_FTRS_44X,
1607 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001608 .mmu_features = MMU_FTR_TYPE_44x,
John Linn23e72372008-07-01 09:42:07 -07001609 .icache_bsize = 32,
1610 .dcache_bsize = 32,
Grant Likely640d17d2008-12-04 05:39:55 +00001611 .cpu_setup = __setup_cpu_440x5,
1612 .machine_check = machine_check_440A,
John Linn23e72372008-07-01 09:42:07 -07001613 .platform = "ppc440",
1614 },
Stefan Roese464076a2008-02-24 08:07:41 +11001615 { /* 460EX */
1616 .pvr_mask = 0xffff0002,
1617 .pvr_value = 0x13020002,
1618 .cpu_name = "460EX",
Benjamin Herrenschmidt6d2170b2008-12-18 19:13:22 +00001619 .cpu_features = CPU_FTRS_440x6,
Stefan Roese464076a2008-02-24 08:07:41 +11001620 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001621 .mmu_features = MMU_FTR_TYPE_44x,
Stefan Roese464076a2008-02-24 08:07:41 +11001622 .icache_bsize = 32,
1623 .dcache_bsize = 32,
1624 .cpu_setup = __setup_cpu_460ex,
1625 .machine_check = machine_check_440A,
1626 .platform = "ppc440",
1627 },
1628 { /* 460GT */
1629 .pvr_mask = 0xffff0002,
1630 .pvr_value = 0x13020000,
1631 .cpu_name = "460GT",
Benjamin Herrenschmidt6d2170b2008-12-18 19:13:22 +00001632 .cpu_features = CPU_FTRS_440x6,
Josh Boyer939e6222008-06-11 07:52:40 -04001633 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001634 .mmu_features = MMU_FTR_TYPE_44x,
Stefan Roese464076a2008-02-24 08:07:41 +11001635 .icache_bsize = 32,
1636 .dcache_bsize = 32,
Josh Boyer939e6222008-06-11 07:52:40 -04001637 .cpu_setup = __setup_cpu_460gt,
Stefan Roese464076a2008-02-24 08:07:41 +11001638 .machine_check = machine_check_440A,
1639 .platform = "ppc440",
1640 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001641 { /* default match */
1642 .pvr_mask = 0x00000000,
1643 .pvr_value = 0x00000000,
1644 .cpu_name = "(generic 44x PPC)",
1645 .cpu_features = CPU_FTRS_44X,
1646 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001647 .mmu_features = MMU_FTR_TYPE_44x,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001648 .icache_bsize = 32,
1649 .dcache_bsize = 32,
1650 .machine_check = machine_check_4xx,
1651 .platform = "ppc440",
1652 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001653#endif /* CONFIG_44x */
Josh Boyere3e414b2007-12-24 08:44:47 -06001654#ifdef CONFIG_E200
Stephen Rothwell49209602005-10-12 15:55:09 +10001655 { /* e200z5 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001656 .pvr_mask = 0xfff00000,
1657 .pvr_value = 0x81000000,
1658 .cpu_name = "e200z5",
1659 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001660 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001661 .cpu_user_features = COMMON_USER_BOOKE |
1662 PPC_FEATURE_HAS_EFP_SINGLE |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001663 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001664 .mmu_features = MMU_FTR_TYPE_FSL_E,
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001665 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001666 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001667 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001668 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001669 { /* e200z6 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001670 .pvr_mask = 0xfff00000,
1671 .pvr_value = 0x81100000,
1672 .cpu_name = "e200z6",
1673 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001674 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001675 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001676 PPC_FEATURE_HAS_SPE_COMP |
1677 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001678 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001679 .mmu_features = MMU_FTR_TYPE_FSL_E,
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001680 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001681 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001682 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001683 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001684 { /* default match */
1685 .pvr_mask = 0x00000000,
1686 .pvr_value = 0x00000000,
1687 .cpu_name = "(generic E200 PPC)",
1688 .cpu_features = CPU_FTRS_E200,
1689 .cpu_user_features = COMMON_USER_BOOKE |
1690 PPC_FEATURE_HAS_EFP_SINGLE |
1691 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001692 .mmu_features = MMU_FTR_TYPE_FSL_E,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001693 .dcache_bsize = 32,
Kumar Gala105c31d2009-01-08 08:31:20 -06001694 .cpu_setup = __setup_cpu_e200,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001695 .machine_check = machine_check_e200,
1696 .platform = "ppc5554",
Paul Mackerras516c8be2008-05-12 14:20:35 +10001697 }
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001698#endif /* CONFIG_E200 */
1699#ifdef CONFIG_E500
Stephen Rothwell49209602005-10-12 15:55:09 +10001700 { /* e500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001701 .pvr_mask = 0xffff0000,
1702 .pvr_value = 0x80200000,
1703 .cpu_name = "e500",
Kumar Gala10b35d92005-09-23 14:08:58 -05001704 .cpu_features = CPU_FTRS_E500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001705 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001706 PPC_FEATURE_HAS_SPE_COMP |
1707 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001708 .mmu_features = MMU_FTR_TYPE_FSL_E,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001709 .icache_bsize = 32,
1710 .dcache_bsize = 32,
1711 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001712 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001713 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06001714 .cpu_setup = __setup_cpu_e500v1,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001715 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001716 .platform = "ppc8540",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001717 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001718 { /* e500v2 */
Kumar Gala5b37b702005-06-21 17:15:18 -07001719 .pvr_mask = 0xffff0000,
1720 .pvr_value = 0x80210000,
1721 .cpu_name = "e500v2",
Kumar Gala10b35d92005-09-23 14:08:58 -05001722 .cpu_features = CPU_FTRS_E500_2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001723 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001724 PPC_FEATURE_HAS_SPE_COMP |
1725 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1726 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001727 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS,
Kumar Gala5b37b702005-06-21 17:15:18 -07001728 .icache_bsize = 32,
1729 .dcache_bsize = 32,
1730 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001731 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001732 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06001733 .cpu_setup = __setup_cpu_e500v2,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001734 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001735 .platform = "ppc8548",
Kumar Gala5b37b702005-06-21 17:15:18 -07001736 },
Kumar Gala3dfa8772008-06-16 09:41:32 -05001737 { /* e500mc */
1738 .pvr_mask = 0xffff0000,
1739 .pvr_value = 0x80230000,
1740 .cpu_name = "e500mc",
Kumar Gala3dfa8772008-06-16 09:41:32 -05001741 .cpu_features = CPU_FTRS_E500MC,
1742 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001743 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS,
Kumar Gala3dfa8772008-06-16 09:41:32 -05001744 .icache_bsize = 64,
1745 .dcache_bsize = 64,
1746 .num_pmcs = 4,
1747 .oprofile_cpu_type = "ppc/e500", /* xxx - galak, e500mc? */
1748 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06001749 .cpu_setup = __setup_cpu_e500mc,
Kumar Gala3dfa8772008-06-16 09:41:32 -05001750 .machine_check = machine_check_e500,
1751 .platform = "ppce500mc",
1752 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001753 { /* default match */
1754 .pvr_mask = 0x00000000,
1755 .pvr_value = 0x00000000,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001756 .cpu_name = "(generic E500 PPC)",
1757 .cpu_features = CPU_FTRS_E500,
1758 .cpu_user_features = COMMON_USER_BOOKE |
1759 PPC_FEATURE_HAS_SPE_COMP |
1760 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001761 .mmu_features = MMU_FTR_TYPE_FSL_E,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001762 .icache_bsize = 32,
1763 .dcache_bsize = 32,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001764 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001765 .platform = "powerpc",
Paul Mackerras516c8be2008-05-12 14:20:35 +10001766 }
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001767#endif /* CONFIG_E500 */
Stephen Rothwell49209602005-10-12 15:55:09 +10001768#endif /* CONFIG_PPC32 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001769};
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001770
Paul Mackerras87a72f92007-10-04 14:18:01 +10001771static struct cpu_spec the_cpu_spec;
1772
1773struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001774{
1775 struct cpu_spec *s = cpu_specs;
Paul Mackerras87a72f92007-10-04 14:18:01 +10001776 struct cpu_spec *t = &the_cpu_spec;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001777 int i;
1778
1779 s = PTRRELOC(s);
Paul Mackerras87a72f92007-10-04 14:18:01 +10001780 t = PTRRELOC(t);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001781
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001782 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
1783 if ((pvr & s->pvr_mask) == s->pvr_value) {
Paul Mackerras87a72f92007-10-04 14:18:01 +10001784 /*
1785 * If we are overriding a previous value derived
1786 * from the real PVR with a new value obtained
1787 * using a logical PVR value, don't modify the
1788 * performance monitor fields.
1789 */
1790 if (t->num_pmcs && !s->num_pmcs) {
1791 t->cpu_name = s->cpu_name;
1792 t->cpu_features = s->cpu_features;
1793 t->cpu_user_features = s->cpu_user_features;
1794 t->icache_bsize = s->icache_bsize;
1795 t->dcache_bsize = s->dcache_bsize;
1796 t->cpu_setup = s->cpu_setup;
1797 t->cpu_restore = s->cpu_restore;
1798 t->platform = s->platform;
Torez Smith79e25ba2008-07-18 06:42:07 +10001799 /*
1800 * If we have passed through this logic once
1801 * before and have pulled the default case
1802 * because the real PVR was not found inside
1803 * cpu_specs[], then we are possibly running in
1804 * compatibility mode. In that case, let the
1805 * oprofiler know which set of compatibility
1806 * counters to pull from by making sure the
1807 * oprofile_cpu_type string is set to that of
1808 * compatibility mode. If the oprofile_cpu_type
1809 * already has a value, then we are possibly
1810 * overriding a real PVR with a logical one, and,
1811 * in that case, keep the current value for
1812 * oprofile_cpu_type.
1813 */
1814 if (t->oprofile_cpu_type == NULL)
1815 t->oprofile_cpu_type = s->oprofile_cpu_type;
Paul Mackerras87a72f92007-10-04 14:18:01 +10001816 } else
1817 *t = *s;
1818 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
Nathan Lynch9115d132008-07-16 09:58:51 +10001819
1820 /*
1821 * Set the base platform string once; assumes
1822 * we're called with real pvr first.
1823 */
Nathan Lynchfc532f82008-07-25 17:50:30 -05001824 if (*PTRRELOC(&powerpc_base_platform) == NULL)
1825 *PTRRELOC(&powerpc_base_platform) = t->platform;
Nathan Lynch9115d132008-07-16 09:58:51 +10001826
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001827#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
Stefan Roese464076a2008-02-24 08:07:41 +11001828 /* ppc64 and booke expect identify_cpu to also call
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001829 * setup_cpu for that processor. I will consolidate
1830 * that at a later time, for now, just use #ifdef.
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001831 * we also don't need to PTRRELOC the function pointer
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001832 * on ppc64 and booke as we are running at 0 in real
1833 * mode on ppc64 and reloc_offset is always 0 on booke.
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001834 */
1835 if (s->cpu_setup) {
1836 s->cpu_setup(offset, s);
1837 }
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001838#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001839 return s;
1840 }
1841 BUG();
1842 return NULL;
1843}