blob: 080bf51e0104de18ad6af9495c9bb9feba30e365 [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>
Paul Gortmaker4b16f8e2011-07-22 18:24:23 -040017#include <linux/export.h>
Kevin Hao4db73272016-07-23 14:42:41 +053018#include <linux/jump_label.h>
Kumar Gala400d2212005-09-27 15:13:12 -050019
20#include <asm/oprofile_impl.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070021#include <asm/cputable.h>
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +100022#include <asm/prom.h> /* for PTRRELOC on ARCH=ppc */
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +000023#include <asm/mmu.h>
David Howellsae3a1972012-03-28 18:30:02 +010024#include <asm/setup.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070025
Nicholas Piggin5a61ef72017-05-09 13:16:52 +100026static struct cpu_spec the_cpu_spec __read_mostly;
27
28struct cpu_spec* cur_cpu_spec __read_mostly = NULL;
Stephen Rothwell49209602005-10-12 15:55:09 +100029EXPORT_SYMBOL(cur_cpu_spec);
Linus Torvalds1da177e2005-04-16 15:20:36 -070030
Nathan Lynch9115d132008-07-16 09:58:51 +100031/* The platform string corresponding to the real PVR */
32const char *powerpc_base_platform;
33
Stephen Rothwell49209602005-10-12 15:55:09 +100034/* NOTE:
35 * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's
36 * the responsibility of the appropriate CPU save/restore functions to
37 * eventually copy these settings over. Those save/restore aren't yet
38 * part of the cputable though. That has to be fixed for both ppc32
39 * and ppc64
40 */
Geoff Levandb26f1002006-05-19 14:24:18 +100041#ifdef CONFIG_PPC32
Kumar Gala105c31d2009-01-08 08:31:20 -060042extern void __setup_cpu_e200(unsigned long offset, struct cpu_spec* spec);
43extern void __setup_cpu_e500v1(unsigned long offset, struct cpu_spec* spec);
44extern void __setup_cpu_e500v2(unsigned long offset, struct cpu_spec* spec);
45extern void __setup_cpu_e500mc(unsigned long offset, struct cpu_spec* spec);
Valentine Barshak81127532007-09-22 00:46:57 +100046extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
47extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110048extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
Valentine Barshak340ffd22007-09-22 00:50:09 +100049extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110050extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
Grant Likely640d17d2008-12-04 05:39:55 +000051extern void __setup_cpu_440x5(unsigned long offset, struct cpu_spec* spec);
Stefan Roese464076a2008-02-24 08:07:41 +110052extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec);
Josh Boyer939e6222008-06-11 07:52:40 -040053extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec);
Madhulika Madishetty6c712092009-02-05 13:31:36 +000054extern void __setup_cpu_460sx(unsigned long offset, struct cpu_spec *spec);
Tirumala Marri6edc3232010-09-13 13:26:11 +000055extern void __setup_cpu_apm821xx(unsigned long offset, struct cpu_spec *spec);
Kumar Gala400d2212005-09-27 15:13:12 -050056extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
57extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
58extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
59extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
60extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
61extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
62extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
63extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell49209602005-10-12 15:55:09 +100064#endif /* CONFIG_PPC32 */
Olof Johanssonf39b7a52006-08-11 00:07:08 -050065#ifdef CONFIG_PPC64
Kumar Gala400d2212005-09-27 15:13:12 -050066extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
Olof Johansson5b43d202006-10-04 23:41:41 -050067extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
Olof Johansson11999192007-02-04 16:36:51 -060068extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell40d244d2007-02-12 22:10:48 +110069extern void __restore_cpu_pa6t(void);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050070extern void __restore_cpu_ppc970(void);
Michael Neulinge952e6c2008-06-18 10:47:26 +100071extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec);
72extern void __restore_cpu_power7(void);
Michael Neulingaec937b2012-10-30 19:34:14 +000073extern void __setup_cpu_power8(unsigned long offset, struct cpu_spec* spec);
74extern void __restore_cpu_power8(void);
Michael Neulingc3ab3002016-02-19 11:16:24 +110075extern void __setup_cpu_power9(unsigned long offset, struct cpu_spec* spec);
76extern void __restore_cpu_power9(void);
Mahesh Salgaonkar45706bb2014-12-19 08:41:05 +053077extern void __flush_tlb_power7(unsigned int action);
78extern void __flush_tlb_power8(unsigned int action);
Michael Neulingc3ab3002016-02-19 11:16:24 +110079extern void __flush_tlb_power9(unsigned int action);
Mahesh Salgaonkare22a2272013-10-30 20:05:11 +053080extern long __machine_check_early_realmode_p7(struct pt_regs *regs);
Mahesh Salgaonkarae744f32013-10-30 20:05:26 +053081extern long __machine_check_early_realmode_p8(struct pt_regs *regs);
Nicholas Piggin7b9f71f92017-02-28 12:00:48 +100082extern long __machine_check_early_realmode_p9(struct pt_regs *regs);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050083#endif /* CONFIG_PPC64 */
Kumar Gala4490c062010-10-08 08:32:11 -050084#if defined(CONFIG_E500)
85extern void __setup_cpu_e5500(unsigned long offset, struct cpu_spec* spec);
Kumar Galacd66cc22012-09-07 15:57:17 -050086extern void __setup_cpu_e6500(unsigned long offset, struct cpu_spec* spec);
Kumar Gala4490c062010-10-08 08:32:11 -050087extern void __restore_cpu_e5500(void);
Kumar Galacd66cc22012-09-07 15:57:17 -050088extern void __restore_cpu_e6500(void);
Kumar Gala4490c062010-10-08 08:32:11 -050089#endif /* CONFIG_E500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070090
Linus Torvalds1da177e2005-04-16 15:20:36 -070091/* This table only contains "desktop" CPUs, it need to be filled with embedded
92 * ones as well...
93 */
Stephen Rothwell49209602005-10-12 15:55:09 +100094#define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
95 PPC_FEATURE_HAS_MMU)
96#define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +110097#define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
Benjamin Herrenschmidtaa5cb0212006-03-01 15:07:07 +110098#define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
99 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
100#define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
101 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
Anton Blanchard03054d52006-04-29 09:51:06 +1000102#define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000103 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
Nathan Lynch0f473312008-07-10 01:06:57 +1000104 PPC_FEATURE_TRUE_LE | \
105 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Michael Neulinge952e6c2008-06-18 10:47:26 +1000106#define COMMON_USER_POWER7 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
107 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
Nathan Lynch0f473312008-07-10 01:06:57 +1000108 PPC_FEATURE_TRUE_LE | \
109 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Nishanth Aravamudan4a1ae4f2013-05-03 14:48:38 +0000110#define COMMON_USER2_POWER7 (PPC_FEATURE2_DSCR)
Michael Neuling71e18492012-10-30 19:34:15 +0000111#define COMMON_USER_POWER8 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
112 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
113 PPC_FEATURE_TRUE_LE | \
114 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Nishanth Aravamudan748645b2013-05-03 14:49:59 +0000115#define COMMON_USER2_POWER8 (PPC_FEATURE2_ARCH_2_07 | \
Sam bobroffb4b56f92015-06-12 11:06:32 +1000116 PPC_FEATURE2_HTM_COMP | \
117 PPC_FEATURE2_HTM_NOSC_COMP | \
118 PPC_FEATURE2_DSCR | \
Benjamin Herrenschmidtdd58a092014-06-10 15:04:40 +1000119 PPC_FEATURE2_ISEL | PPC_FEATURE2_TAR | \
120 PPC_FEATURE2_VEC_CRYPTO)
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500121#define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
122 PPC_FEATURE_TRUE_LE | \
123 PPC_FEATURE_HAS_ALTIVEC_COMP)
Michael Neulingc3ab3002016-02-19 11:16:24 +1100124#define COMMON_USER_POWER9 COMMON_USER_POWER8
125#define COMMON_USER2_POWER9 (COMMON_USER2_POWER8 | \
126 PPC_FEATURE2_ARCH_3_00 | \
Nicholas Piggina4700a22017-05-20 14:29:49 +1000127 PPC_FEATURE2_HAS_IEEE128 | \
128 PPC_FEATURE2_DARN )
Michael Neulingc3ab3002016-02-19 11:16:24 +1100129
Kumar Galaf45c4482009-08-18 19:08:30 +0000130#ifdef CONFIG_PPC_BOOK3E_64
131#define COMMON_USER_BOOKE (COMMON_USER_PPC64 | PPC_FEATURE_BOOKE)
132#else
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100133#define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
134 PPC_FEATURE_BOOKE)
Kumar Galaf45c4482009-08-18 19:08:30 +0000135#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -0700136
Paul Mackerras87a72f92007-10-04 14:18:01 +1000137static struct cpu_spec __initdata cpu_specs[] = {
Benjamin Herrenschmidt2d27cfd2009-07-23 23:15:59 +0000138#ifdef CONFIG_PPC_BOOK3S_64
Stephen Rothwell49209602005-10-12 15:55:09 +1000139 { /* Power4 */
140 .pvr_mask = 0xffff0000,
141 .pvr_value = 0x00350000,
142 .cpu_name = "POWER4 (gp)",
143 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100144 .cpu_user_features = COMMON_USER_POWER4,
Aneesh Kumar K.Vaccfad72016-07-13 15:05:24 +0530145 .mmu_features = MMU_FTRS_POWER4 | MMU_FTR_TLBIE_CROP_VA,
Stephen Rothwell49209602005-10-12 15:55:09 +1000146 .icache_bsize = 128,
147 .dcache_bsize = 128,
148 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600149 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000150 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000151 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100152 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000153 },
154 { /* Power4+ */
155 .pvr_mask = 0xffff0000,
156 .pvr_value = 0x00380000,
157 .cpu_name = "POWER4+ (gq)",
158 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100159 .cpu_user_features = COMMON_USER_POWER4,
Aneesh Kumar K.Vaccfad72016-07-13 15:05:24 +0530160 .mmu_features = MMU_FTRS_POWER4 | MMU_FTR_TLBIE_CROP_VA,
Stephen Rothwell49209602005-10-12 15:55:09 +1000161 .icache_bsize = 128,
162 .dcache_bsize = 128,
163 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600164 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000165 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000166 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100167 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000168 },
169 { /* PPC970 */
170 .pvr_mask = 0xffff0000,
171 .pvr_value = 0x00390000,
172 .cpu_name = "PPC970",
173 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100174 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000175 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000176 .mmu_features = MMU_FTRS_PPC970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000177 .icache_bsize = 128,
178 .dcache_bsize = 128,
179 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600180 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000181 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500182 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000183 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000184 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100185 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000186 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000187 { /* PPC970FX */
188 .pvr_mask = 0xffff0000,
189 .pvr_value = 0x003c0000,
190 .cpu_name = "PPC970FX",
Stephen Rothwell49209602005-10-12 15:55:09 +1000191 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100192 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000193 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000194 .mmu_features = MMU_FTRS_PPC970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000195 .icache_bsize = 128,
196 .dcache_bsize = 128,
197 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600198 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000199 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500200 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000201 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000202 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100203 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000204 },
Olof Johansson3546e812007-02-26 00:35:14 -0600205 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
206 .pvr_mask = 0xffffffff,
207 .pvr_value = 0x00440100,
208 .cpu_name = "PPC970MP",
209 .cpu_features = CPU_FTRS_PPC970,
210 .cpu_user_features = COMMON_USER_POWER4 |
211 PPC_FEATURE_HAS_ALTIVEC_COMP,
Benjamin Herrenschmidtd63ac5f2013-03-13 09:55:02 +1100212 .mmu_features = MMU_FTRS_PPC970,
Olof Johansson3546e812007-02-26 00:35:14 -0600213 .icache_bsize = 128,
214 .dcache_bsize = 128,
215 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000216 .pmc_type = PPC_PMC_IBM,
Olof Johansson3546e812007-02-26 00:35:14 -0600217 .cpu_setup = __setup_cpu_ppc970,
218 .cpu_restore = __restore_cpu_ppc970,
219 .oprofile_cpu_type = "ppc64/970MP",
220 .oprofile_type = PPC_OPROFILE_POWER4,
221 .platform = "ppc970",
222 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000223 { /* PPC970MP */
224 .pvr_mask = 0xffff0000,
225 .pvr_value = 0x00440000,
226 .cpu_name = "PPC970MP",
227 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100228 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000229 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000230 .mmu_features = MMU_FTRS_PPC970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000231 .icache_bsize = 128,
232 .dcache_bsize = 128,
Anton Blanchard87af41b2006-05-05 05:44:26 +1000233 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000234 .pmc_type = PPC_PMC_IBM,
Olof Johansson5b43d202006-10-04 23:41:41 -0500235 .cpu_setup = __setup_cpu_ppc970MP,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500236 .cpu_restore = __restore_cpu_ppc970,
Mike Wolffecb3522006-11-21 14:41:54 -0600237 .oprofile_cpu_type = "ppc64/970MP",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000238 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100239 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000240 },
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500241 { /* PPC970GX */
242 .pvr_mask = 0xffff0000,
243 .pvr_value = 0x00450000,
244 .cpu_name = "PPC970GX",
245 .cpu_features = CPU_FTRS_PPC970,
246 .cpu_user_features = COMMON_USER_POWER4 |
247 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000248 .mmu_features = MMU_FTRS_PPC970,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500249 .icache_bsize = 128,
250 .dcache_bsize = 128,
251 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600252 .pmc_type = PPC_PMC_IBM,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500253 .cpu_setup = __setup_cpu_ppc970,
254 .oprofile_cpu_type = "ppc64/970",
255 .oprofile_type = PPC_OPROFILE_POWER4,
256 .platform = "ppc970",
257 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100258 { /* Power5 GR */
Stephen Rothwell49209602005-10-12 15:55:09 +1000259 .pvr_mask = 0xffff0000,
260 .pvr_value = 0x003a0000,
261 .cpu_name = "POWER5 (gr)",
262 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100263 .cpu_user_features = COMMON_USER_POWER5,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000264 .mmu_features = MMU_FTRS_POWER5,
Stephen Rothwell49209602005-10-12 15:55:09 +1000265 .icache_bsize = 128,
266 .dcache_bsize = 128,
267 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600268 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000269 .oprofile_cpu_type = "ppc64/power5",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000270 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000271 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
272 * and above but only works on POWER5 and above
273 */
274 .oprofile_mmcra_sihv = MMCRA_SIHV,
275 .oprofile_mmcra_sipr = MMCRA_SIPR,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100276 .platform = "power5",
Stephen Rothwell49209602005-10-12 15:55:09 +1000277 },
Mike Wolf31a12ce2007-07-10 13:13:47 -0500278 { /* Power5++ */
279 .pvr_mask = 0xffffff00,
280 .pvr_value = 0x003b0300,
281 .cpu_name = "POWER5+ (gs)",
282 .cpu_features = CPU_FTRS_POWER5,
283 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000284 .mmu_features = MMU_FTRS_POWER5,
Mike Wolf31a12ce2007-07-10 13:13:47 -0500285 .icache_bsize = 128,
286 .dcache_bsize = 128,
287 .num_pmcs = 6,
288 .oprofile_cpu_type = "ppc64/power5++",
289 .oprofile_type = PPC_OPROFILE_POWER4,
290 .oprofile_mmcra_sihv = MMCRA_SIHV,
291 .oprofile_mmcra_sipr = MMCRA_SIPR,
292 .platform = "power5+",
293 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100294 { /* Power5 GS */
Stephen Rothwell49209602005-10-12 15:55:09 +1000295 .pvr_mask = 0xffff0000,
296 .pvr_value = 0x003b0000,
Anton Blanchard834608f2006-01-09 15:42:30 +1100297 .cpu_name = "POWER5+ (gs)",
Stephen Rothwell49209602005-10-12 15:55:09 +1000298 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100299 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000300 .mmu_features = MMU_FTRS_POWER5,
Stephen Rothwell49209602005-10-12 15:55:09 +1000301 .icache_bsize = 128,
302 .dcache_bsize = 128,
303 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600304 .pmc_type = PPC_PMC_IBM,
Anton Blanchard834608f2006-01-09 15:42:30 +1100305 .oprofile_cpu_type = "ppc64/power5+",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000306 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000307 .oprofile_mmcra_sihv = MMCRA_SIHV,
308 .oprofile_mmcra_sipr = MMCRA_SIPR,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100309 .platform = "power5+",
Stephen Rothwell49209602005-10-12 15:55:09 +1000310 },
Paul Mackerras974a76f2006-11-10 20:38:53 +1100311 { /* POWER6 in P5+ mode; 2.04-compliant processor */
312 .pvr_mask = 0xffffffff,
313 .pvr_value = 0x0f000001,
314 .cpu_name = "POWER5+",
315 .cpu_features = CPU_FTRS_POWER5,
316 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000317 .mmu_features = MMU_FTRS_POWER5,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100318 .icache_bsize = 128,
319 .dcache_bsize = 128,
Michael Wolf79af6c42009-04-27 06:17:54 +0000320 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
321 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100322 .platform = "power5+",
323 },
Anton Blanchard03054d52006-04-29 09:51:06 +1000324 { /* Power6 */
325 .pvr_mask = 0xffff0000,
326 .pvr_value = 0x003e0000,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100327 .cpu_name = "POWER6 (raw)",
328 .cpu_features = CPU_FTRS_POWER6,
329 .cpu_user_features = COMMON_USER_POWER6 |
330 PPC_FEATURE_POWER6_EXT,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000331 .mmu_features = MMU_FTRS_POWER6,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100332 .icache_bsize = 128,
333 .dcache_bsize = 128,
334 .num_pmcs = 6,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000335 .pmc_type = PPC_PMC_IBM,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100336 .oprofile_cpu_type = "ppc64/power6",
337 .oprofile_type = PPC_OPROFILE_POWER4,
338 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
339 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
340 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
341 POWER6_MMCRA_OTHER,
342 .platform = "power6x",
343 },
344 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
345 .pvr_mask = 0xffffffff,
346 .pvr_value = 0x0f000002,
347 .cpu_name = "POWER6 (architected)",
Anton Blanchard03054d52006-04-29 09:51:06 +1000348 .cpu_features = CPU_FTRS_POWER6,
349 .cpu_user_features = COMMON_USER_POWER6,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000350 .mmu_features = MMU_FTRS_POWER6,
Anton Blanchard03054d52006-04-29 09:51:06 +1000351 .icache_bsize = 128,
352 .dcache_bsize = 128,
Michael Wolf79af6c42009-04-27 06:17:54 +0000353 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
354 .oprofile_type = PPC_OPROFILE_POWER4,
Anton Blanchard03054d52006-04-29 09:51:06 +1000355 .platform = "power6",
356 },
Joel Schopp635f5a62008-06-19 06:18:21 +1000357 { /* 2.06-compliant processor, i.e. Power7 "architected" mode */
358 .pvr_mask = 0xffffffff,
359 .pvr_value = 0x0f000003,
360 .cpu_name = "POWER7 (architected)",
361 .cpu_features = CPU_FTRS_POWER7,
362 .cpu_user_features = COMMON_USER_POWER7,
Nishanth Aravamudan4a1ae4f2013-05-03 14:48:38 +0000363 .cpu_user_features2 = COMMON_USER2_POWER7,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000364 .mmu_features = MMU_FTRS_POWER7,
Joel Schopp635f5a62008-06-19 06:18:21 +1000365 .icache_bsize = 128,
366 .dcache_bsize = 128,
Michael Wolf79af6c42009-04-27 06:17:54 +0000367 .oprofile_type = PPC_OPROFILE_POWER4,
368 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
Benjamin Herrenschmidt24cc67d2011-01-20 18:50:55 +1100369 .cpu_setup = __setup_cpu_power7,
370 .cpu_restore = __restore_cpu_power7,
Mahesh Salgaonkar04407052013-10-30 20:04:56 +0530371 .flush_tlb = __flush_tlb_power7,
Mahesh Salgaonkare22a2272013-10-30 20:05:11 +0530372 .machine_check_early = __machine_check_early_realmode_p7,
Joel Schopp635f5a62008-06-19 06:18:21 +1000373 .platform = "power7",
374 },
Michael Neulingc674e702012-11-08 20:26:42 +0000375 { /* 2.07-compliant processor, i.e. Power8 "architected" mode */
376 .pvr_mask = 0xffffffff,
377 .pvr_value = 0x0f000004,
378 .cpu_name = "POWER8 (architected)",
379 .cpu_features = CPU_FTRS_POWER8,
380 .cpu_user_features = COMMON_USER_POWER8,
Nishanth Aravamudan748645b2013-05-03 14:49:59 +0000381 .cpu_user_features2 = COMMON_USER2_POWER8,
Michael Neulingc674e702012-11-08 20:26:42 +0000382 .mmu_features = MMU_FTRS_POWER8,
383 .icache_bsize = 128,
384 .dcache_bsize = 128,
Michael Neuling6a60f9e2013-06-04 19:38:54 +0000385 .oprofile_type = PPC_OPROFILE_INVALID,
386 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
Michael Neulingc674e702012-11-08 20:26:42 +0000387 .cpu_setup = __setup_cpu_power8,
388 .cpu_restore = __restore_cpu_power8,
Mahesh Salgaonkar04407052013-10-30 20:04:56 +0530389 .flush_tlb = __flush_tlb_power8,
Mahesh Salgaonkarae744f32013-10-30 20:05:26 +0530390 .machine_check_early = __machine_check_early_realmode_p8,
Michael Neulingc674e702012-11-08 20:26:42 +0000391 .platform = "power8",
392 },
Russell Currey6ae3f8a2017-02-17 13:01:35 +1100393 { /* 3.00-compliant processor, i.e. Power9 "architected" mode */
394 .pvr_mask = 0xffffffff,
395 .pvr_value = 0x0f000005,
396 .cpu_name = "POWER9 (architected)",
397 .cpu_features = CPU_FTRS_POWER9,
398 .cpu_user_features = COMMON_USER_POWER9,
399 .cpu_user_features2 = COMMON_USER2_POWER9,
400 .mmu_features = MMU_FTRS_POWER9,
401 .icache_bsize = 128,
402 .dcache_bsize = 128,
403 .oprofile_type = PPC_OPROFILE_INVALID,
404 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
405 .cpu_setup = __setup_cpu_power9,
406 .cpu_restore = __restore_cpu_power9,
407 .flush_tlb = __flush_tlb_power9,
408 .platform = "power9",
409 },
Michael Neulinge952e6c2008-06-18 10:47:26 +1000410 { /* Power7 */
411 .pvr_mask = 0xffff0000,
412 .pvr_value = 0x003f0000,
Joel Schopp635f5a62008-06-19 06:18:21 +1000413 .cpu_name = "POWER7 (raw)",
Michael Neulinge952e6c2008-06-18 10:47:26 +1000414 .cpu_features = CPU_FTRS_POWER7,
415 .cpu_user_features = COMMON_USER_POWER7,
Nishanth Aravamudan4a1ae4f2013-05-03 14:48:38 +0000416 .cpu_user_features2 = COMMON_USER2_POWER7,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000417 .mmu_features = MMU_FTRS_POWER7,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000418 .icache_bsize = 128,
419 .dcache_bsize = 128,
420 .num_pmcs = 6,
421 .pmc_type = PPC_PMC_IBM,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000422 .oprofile_cpu_type = "ppc64/power7",
423 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt24cc67d2011-01-20 18:50:55 +1100424 .cpu_setup = __setup_cpu_power7,
425 .cpu_restore = __restore_cpu_power7,
Mahesh Salgaonkar04407052013-10-30 20:04:56 +0530426 .flush_tlb = __flush_tlb_power7,
Mahesh Salgaonkare22a2272013-10-30 20:05:11 +0530427 .machine_check_early = __machine_check_early_realmode_p7,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000428 .platform = "power7",
429 },
Michael Neuling6f08cb32010-11-17 18:52:44 +0000430 { /* Power7+ */
431 .pvr_mask = 0xffff0000,
432 .pvr_value = 0x004A0000,
433 .cpu_name = "POWER7+ (raw)",
434 .cpu_features = CPU_FTRS_POWER7,
435 .cpu_user_features = COMMON_USER_POWER7,
Will Schmidtbadec112013-05-20 05:04:18 +0000436 .cpu_user_features2 = COMMON_USER2_POWER7,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000437 .mmu_features = MMU_FTRS_POWER7,
Michael Neuling6f08cb32010-11-17 18:52:44 +0000438 .icache_bsize = 128,
439 .dcache_bsize = 128,
440 .num_pmcs = 6,
441 .pmc_type = PPC_PMC_IBM,
442 .oprofile_cpu_type = "ppc64/power7",
443 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt24cc67d2011-01-20 18:50:55 +1100444 .cpu_setup = __setup_cpu_power7,
445 .cpu_restore = __restore_cpu_power7,
Mahesh Salgaonkar04407052013-10-30 20:04:56 +0530446 .flush_tlb = __flush_tlb_power7,
Mahesh Salgaonkare22a2272013-10-30 20:05:11 +0530447 .machine_check_early = __machine_check_early_realmode_p7,
Michael Neuling6f08cb32010-11-17 18:52:44 +0000448 .platform = "power7+",
449 },
Michael Neuling33959f82013-07-18 11:31:51 +1000450 { /* Power8E */
Michael Neuling71e18492012-10-30 19:34:15 +0000451 .pvr_mask = 0xffff0000,
452 .pvr_value = 0x004b0000,
Michael Neuling33959f82013-07-18 11:31:51 +1000453 .cpu_name = "POWER8E (raw)",
Michael Ellerman68f2f0d2014-03-14 16:00:28 +1100454 .cpu_features = CPU_FTRS_POWER8E,
Michael Neuling33959f82013-07-18 11:31:51 +1000455 .cpu_user_features = COMMON_USER_POWER8,
456 .cpu_user_features2 = COMMON_USER2_POWER8,
457 .mmu_features = MMU_FTRS_POWER8,
458 .icache_bsize = 128,
459 .dcache_bsize = 128,
460 .num_pmcs = 6,
461 .pmc_type = PPC_PMC_IBM,
462 .oprofile_cpu_type = "ppc64/power8",
463 .oprofile_type = PPC_OPROFILE_INVALID,
464 .cpu_setup = __setup_cpu_power8,
465 .cpu_restore = __restore_cpu_power8,
Mahesh Salgaonkar04407052013-10-30 20:04:56 +0530466 .flush_tlb = __flush_tlb_power8,
Mahesh Salgaonkarae744f32013-10-30 20:05:26 +0530467 .machine_check_early = __machine_check_early_realmode_p8,
Michael Neuling33959f82013-07-18 11:31:51 +1000468 .platform = "power8",
469 },
Benjamin Herrenschmidtddee09c2015-03-19 14:12:06 +1100470 { /* Power8NVL */
471 .pvr_mask = 0xffff0000,
472 .pvr_value = 0x004c0000,
473 .cpu_name = "POWER8NVL (raw)",
474 .cpu_features = CPU_FTRS_POWER8,
475 .cpu_user_features = COMMON_USER_POWER8,
476 .cpu_user_features2 = COMMON_USER2_POWER8,
477 .mmu_features = MMU_FTRS_POWER8,
478 .icache_bsize = 128,
479 .dcache_bsize = 128,
480 .num_pmcs = 6,
481 .pmc_type = PPC_PMC_IBM,
482 .oprofile_cpu_type = "ppc64/power8",
483 .oprofile_type = PPC_OPROFILE_INVALID,
484 .cpu_setup = __setup_cpu_power8,
485 .cpu_restore = __restore_cpu_power8,
486 .flush_tlb = __flush_tlb_power8,
487 .machine_check_early = __machine_check_early_realmode_p8,
488 .platform = "power8",
489 },
Joel Stanleybd6ba352014-07-18 11:41:37 +0930490 { /* Power8 DD1: Does not support doorbell IPIs */
491 .pvr_mask = 0xffffff00,
492 .pvr_value = 0x004d0100,
493 .cpu_name = "POWER8 (raw)",
494 .cpu_features = CPU_FTRS_POWER8_DD1,
495 .cpu_user_features = COMMON_USER_POWER8,
496 .cpu_user_features2 = COMMON_USER2_POWER8,
497 .mmu_features = MMU_FTRS_POWER8,
498 .icache_bsize = 128,
499 .dcache_bsize = 128,
500 .num_pmcs = 6,
501 .pmc_type = PPC_PMC_IBM,
502 .oprofile_cpu_type = "ppc64/power8",
503 .oprofile_type = PPC_OPROFILE_INVALID,
504 .cpu_setup = __setup_cpu_power8,
505 .cpu_restore = __restore_cpu_power8,
506 .flush_tlb = __flush_tlb_power8,
507 .machine_check_early = __machine_check_early_realmode_p8,
508 .platform = "power8",
509 },
Michael Neuling33959f82013-07-18 11:31:51 +1000510 { /* Power8 */
511 .pvr_mask = 0xffff0000,
512 .pvr_value = 0x004d0000,
Michael Neuling71e18492012-10-30 19:34:15 +0000513 .cpu_name = "POWER8 (raw)",
514 .cpu_features = CPU_FTRS_POWER8,
515 .cpu_user_features = COMMON_USER_POWER8,
Nishanth Aravamudan748645b2013-05-03 14:49:59 +0000516 .cpu_user_features2 = COMMON_USER2_POWER8,
Michael Neuling71e18492012-10-30 19:34:15 +0000517 .mmu_features = MMU_FTRS_POWER8,
518 .icache_bsize = 128,
519 .dcache_bsize = 128,
520 .num_pmcs = 6,
521 .pmc_type = PPC_PMC_IBM,
Michael Neuling6a60f9e2013-06-04 19:38:54 +0000522 .oprofile_cpu_type = "ppc64/power8",
523 .oprofile_type = PPC_OPROFILE_INVALID,
Michael Neuling71e18492012-10-30 19:34:15 +0000524 .cpu_setup = __setup_cpu_power8,
525 .cpu_restore = __restore_cpu_power8,
Mahesh Salgaonkar04407052013-10-30 20:04:56 +0530526 .flush_tlb = __flush_tlb_power8,
Mahesh Salgaonkarae744f32013-10-30 20:05:26 +0530527 .machine_check_early = __machine_check_early_realmode_p8,
Michael Neuling71e18492012-10-30 19:34:15 +0000528 .platform = "power8",
529 },
Aneesh Kumar K.V7dccfbc2016-08-24 15:03:36 +0530530 { /* Power9 DD1*/
531 .pvr_mask = 0xffffff00,
532 .pvr_value = 0x004e0100,
533 .cpu_name = "POWER9 (raw)",
534 .cpu_features = CPU_FTRS_POWER9_DD1,
535 .cpu_user_features = COMMON_USER_POWER9,
536 .cpu_user_features2 = COMMON_USER2_POWER9,
537 .mmu_features = MMU_FTRS_POWER9,
538 .icache_bsize = 128,
539 .dcache_bsize = 128,
540 .num_pmcs = 6,
541 .pmc_type = PPC_PMC_IBM,
542 .oprofile_cpu_type = "ppc64/power9",
543 .oprofile_type = PPC_OPROFILE_INVALID,
544 .cpu_setup = __setup_cpu_power9,
545 .cpu_restore = __restore_cpu_power9,
546 .flush_tlb = __flush_tlb_power9,
Nicholas Piggin7b9f71f92017-02-28 12:00:48 +1000547 .machine_check_early = __machine_check_early_realmode_p9,
Aneesh Kumar K.V7dccfbc2016-08-24 15:03:36 +0530548 .platform = "power9",
549 },
Michael Neulingc3ab3002016-02-19 11:16:24 +1100550 { /* Power9 */
551 .pvr_mask = 0xffff0000,
552 .pvr_value = 0x004e0000,
553 .cpu_name = "POWER9 (raw)",
554 .cpu_features = CPU_FTRS_POWER9,
555 .cpu_user_features = COMMON_USER_POWER9,
556 .cpu_user_features2 = COMMON_USER2_POWER9,
557 .mmu_features = MMU_FTRS_POWER9,
558 .icache_bsize = 128,
559 .dcache_bsize = 128,
560 .num_pmcs = 6,
561 .pmc_type = PPC_PMC_IBM,
562 .oprofile_cpu_type = "ppc64/power9",
563 .oprofile_type = PPC_OPROFILE_INVALID,
564 .cpu_setup = __setup_cpu_power9,
565 .cpu_restore = __restore_cpu_power9,
566 .flush_tlb = __flush_tlb_power9,
Nicholas Piggin7b9f71f92017-02-28 12:00:48 +1000567 .machine_check_early = __machine_check_early_realmode_p9,
Michael Neulingc3ab3002016-02-19 11:16:24 +1100568 .platform = "power9",
569 },
Arnd Bergmannc902be72006-01-04 19:55:53 +0000570 { /* Cell Broadband Engine */
Stephen Rothwell49209602005-10-12 15:55:09 +1000571 .pvr_mask = 0xffff0000,
572 .pvr_value = 0x00700000,
573 .cpu_name = "Cell Broadband Engine",
574 .cpu_features = CPU_FTRS_CELL,
575 .cpu_user_features = COMMON_USER_PPC64 |
Benjamin Herrenschmidtaa5cb0212006-03-01 15:07:07 +1100576 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
577 PPC_FEATURE_SMT,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000578 .mmu_features = MMU_FTRS_CELL,
Stephen Rothwell49209602005-10-12 15:55:09 +1000579 .icache_bsize = 128,
580 .dcache_bsize = 128,
Maynard Johnson18f21902006-11-20 18:45:16 +0100581 .num_pmcs = 4,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600582 .pmc_type = PPC_PMC_IBM,
Maynard Johnson18f21902006-11-20 18:45:16 +0100583 .oprofile_cpu_type = "ppc64/cell-be",
584 .oprofile_type = PPC_OPROFILE_CELL,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100585 .platform = "ppc-cell-be",
Stephen Rothwell49209602005-10-12 15:55:09 +1000586 },
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500587 { /* PA Semi PA6T */
588 .pvr_mask = 0x7fff0000,
589 .pvr_value = 0x00900000,
590 .cpu_name = "PA6T",
591 .cpu_features = CPU_FTRS_PA6T,
592 .cpu_user_features = COMMON_USER_PA6T,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000593 .mmu_features = MMU_FTRS_PA6T,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500594 .icache_bsize = 64,
595 .dcache_bsize = 64,
596 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600597 .pmc_type = PPC_PMC_PA6T,
Olof Johansson11999192007-02-04 16:36:51 -0600598 .cpu_setup = __setup_cpu_pa6t,
599 .cpu_restore = __restore_cpu_pa6t,
Olof Johansson25fc5302007-04-18 16:38:21 +1000600 .oprofile_cpu_type = "ppc64/pa6t",
601 .oprofile_type = PPC_OPROFILE_PA6T,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500602 .platform = "pa6t",
603 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000604 { /* default match */
605 .pvr_mask = 0x00000000,
606 .pvr_value = 0x00000000,
607 .cpu_name = "POWER4 (compatible)",
608 .cpu_features = CPU_FTRS_COMPATIBLE,
609 .cpu_user_features = COMMON_USER_PPC64,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000610 .mmu_features = MMU_FTRS_DEFAULT_HPTE_ARCH_V2,
Stephen Rothwell49209602005-10-12 15:55:09 +1000611 .icache_bsize = 128,
612 .dcache_bsize = 128,
613 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600614 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100615 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000616 }
Benjamin Herrenschmidt2d27cfd2009-07-23 23:15:59 +0000617#endif /* CONFIG_PPC_BOOK3S_64 */
Benjamin Herrenschmidt2d27cfd2009-07-23 23:15:59 +0000618
Stephen Rothwell49209602005-10-12 15:55:09 +1000619#ifdef CONFIG_PPC32
Michael Ellerman1e07a0a2014-07-10 12:29:26 +1000620#ifdef CONFIG_PPC_BOOK3S_32
Stephen Rothwell49209602005-10-12 15:55:09 +1000621 { /* 601 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700622 .pvr_mask = 0xffff0000,
623 .pvr_value = 0x00010000,
624 .cpu_name = "601",
Kumar Gala10b35d92005-09-23 14:08:58 -0500625 .cpu_features = CPU_FTRS_PPC601,
Stephen Rothwell49209602005-10-12 15:55:09 +1000626 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
Paul Mackerras98599012005-10-22 16:51:34 +1000627 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000628 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700629 .icache_bsize = 32,
630 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100631 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100632 .platform = "ppc601",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700633 },
634 { /* 603 */
635 .pvr_mask = 0xffff0000,
636 .pvr_value = 0x00030000,
637 .cpu_name = "603",
Kumar Gala10b35d92005-09-23 14:08:58 -0500638 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000639 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000640 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700641 .icache_bsize = 32,
642 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100643 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100644 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100645 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700646 },
647 { /* 603e */
648 .pvr_mask = 0xffff0000,
649 .pvr_value = 0x00060000,
650 .cpu_name = "603e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500651 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000652 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000653 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700654 .icache_bsize = 32,
655 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100656 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100657 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100658 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700659 },
660 { /* 603ev */
661 .pvr_mask = 0xffff0000,
662 .pvr_value = 0x00070000,
663 .cpu_name = "603ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500664 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000665 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000666 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700667 .icache_bsize = 32,
668 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100669 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100670 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100671 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700672 },
673 { /* 604 */
674 .pvr_mask = 0xffff0000,
675 .pvr_value = 0x00040000,
676 .cpu_name = "604",
Kumar Gala10b35d92005-09-23 14:08:58 -0500677 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000678 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000679 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700680 .icache_bsize = 32,
681 .dcache_bsize = 32,
682 .num_pmcs = 2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100683 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100684 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100685 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700686 },
687 { /* 604e */
688 .pvr_mask = 0xfffff000,
689 .pvr_value = 0x00090000,
690 .cpu_name = "604e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500691 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000692 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000693 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700694 .icache_bsize = 32,
695 .dcache_bsize = 32,
696 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100697 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100698 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100699 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700700 },
701 { /* 604r */
702 .pvr_mask = 0xffff0000,
703 .pvr_value = 0x00090000,
704 .cpu_name = "604r",
Kumar Gala10b35d92005-09-23 14:08:58 -0500705 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000706 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000707 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700708 .icache_bsize = 32,
709 .dcache_bsize = 32,
710 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100711 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100712 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100713 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700714 },
715 { /* 604ev */
716 .pvr_mask = 0xffff0000,
717 .pvr_value = 0x000a0000,
718 .cpu_name = "604ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500719 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000720 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000721 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700722 .icache_bsize = 32,
723 .dcache_bsize = 32,
724 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100725 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100726 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100727 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700728 },
729 { /* 740/750 (0x4202, don't support TAU ?) */
730 .pvr_mask = 0xffffffff,
731 .pvr_value = 0x00084202,
732 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500733 .cpu_features = CPU_FTRS_740_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000734 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000735 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700736 .icache_bsize = 32,
737 .dcache_bsize = 32,
738 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100739 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100740 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100741 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700742 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700743 { /* 750CX (80100 and 8010x?) */
744 .pvr_mask = 0xfffffff0,
745 .pvr_value = 0x00080100,
746 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500747 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000748 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000749 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700750 .icache_bsize = 32,
751 .dcache_bsize = 32,
752 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100753 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100754 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100755 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700756 },
757 { /* 750CX (82201 and 82202) */
758 .pvr_mask = 0xfffffff0,
759 .pvr_value = 0x00082200,
760 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500761 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000762 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000763 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700764 .icache_bsize = 32,
765 .dcache_bsize = 32,
766 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000767 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100768 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100769 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100770 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700771 },
772 { /* 750CXe (82214) */
773 .pvr_mask = 0xfffffff0,
774 .pvr_value = 0x00082210,
775 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500776 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000777 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000778 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700779 .icache_bsize = 32,
780 .dcache_bsize = 32,
781 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000782 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100783 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100784 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100785 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700786 },
Arthur Othieno7c316252005-09-03 15:55:52 -0700787 { /* 750CXe "Gekko" (83214) */
788 .pvr_mask = 0xffffffff,
789 .pvr_value = 0x00083214,
790 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500791 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000792 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000793 .mmu_features = MMU_FTR_HPTE_TABLE,
Arthur Othieno7c316252005-09-03 15:55:52 -0700794 .icache_bsize = 32,
795 .dcache_bsize = 32,
796 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000797 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100798 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100799 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100800 .platform = "ppc750",
Arthur Othieno7c316252005-09-03 15:55:52 -0700801 },
Albert Herranz45158dc2009-12-12 06:31:46 +0000802 { /* 750CL (and "Broadway") */
803 .pvr_mask = 0xfffff0e0,
804 .pvr_value = 0x00087000,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500805 .cpu_name = "750CL",
Josh Boyera14c4502007-04-13 04:33:25 +1000806 .cpu_features = CPU_FTRS_750CL,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500807 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000808 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500809 .icache_bsize = 32,
810 .dcache_bsize = 32,
811 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000812 .pmc_type = PPC_PMC_IBM,
Josh Boyera14c4502007-04-13 04:33:25 +1000813 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100814 .machine_check = machine_check_generic,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500815 .platform = "ppc750",
Dragos Tatulea04f56534772009-09-16 11:58:15 +0300816 .oprofile_cpu_type = "ppc/750",
817 .oprofile_type = PPC_OPROFILE_G4,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500818 },
Arthur Othienoac1ff042005-09-03 15:55:51 -0700819 { /* 745/755 */
820 .pvr_mask = 0xfffff000,
821 .pvr_value = 0x00083000,
822 .cpu_name = "745/755",
Kumar Gala10b35d92005-09-23 14:08:58 -0500823 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000824 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000825 .mmu_features = MMU_FTR_HPTE_TABLE,
Arthur Othienoac1ff042005-09-03 15:55:51 -0700826 .icache_bsize = 32,
827 .dcache_bsize = 32,
828 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000829 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100830 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100831 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100832 .platform = "ppc750",
Arthur Othienoac1ff042005-09-03 15:55:51 -0700833 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700834 { /* 750FX rev 1.x */
835 .pvr_mask = 0xffffff00,
836 .pvr_value = 0x70000100,
837 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500838 .cpu_features = CPU_FTRS_750FX1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000839 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000840 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700841 .icache_bsize = 32,
842 .dcache_bsize = 32,
843 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000844 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100845 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100846 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100847 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000848 .oprofile_cpu_type = "ppc/750",
849 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700850 },
851 { /* 750FX rev 2.0 must disable HID0[DPM] */
852 .pvr_mask = 0xffffffff,
853 .pvr_value = 0x70000200,
854 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500855 .cpu_features = CPU_FTRS_750FX2,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000856 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000857 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700858 .icache_bsize = 32,
859 .dcache_bsize = 32,
860 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000861 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100862 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100863 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100864 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000865 .oprofile_cpu_type = "ppc/750",
866 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700867 },
868 { /* 750FX (All revs except 2.0) */
869 .pvr_mask = 0xffff0000,
870 .pvr_value = 0x70000000,
871 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500872 .cpu_features = CPU_FTRS_750FX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000873 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000874 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700875 .icache_bsize = 32,
876 .dcache_bsize = 32,
877 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000878 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100879 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100880 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100881 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000882 .oprofile_cpu_type = "ppc/750",
883 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700884 },
885 { /* 750GX */
886 .pvr_mask = 0xffff0000,
887 .pvr_value = 0x70020000,
888 .cpu_name = "750GX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500889 .cpu_features = CPU_FTRS_750GX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000890 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000891 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700892 .icache_bsize = 32,
893 .dcache_bsize = 32,
894 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000895 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100896 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100897 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100898 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000899 .oprofile_cpu_type = "ppc/750",
900 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700901 },
902 { /* 740/750 (L2CR bit need fixup for 740) */
903 .pvr_mask = 0xffff0000,
904 .pvr_value = 0x00080000,
905 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500906 .cpu_features = CPU_FTRS_740,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000907 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000908 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700909 .icache_bsize = 32,
910 .dcache_bsize = 32,
911 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000912 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100913 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100914 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100915 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700916 },
917 { /* 7400 rev 1.1 ? (no TAU) */
918 .pvr_mask = 0xffffffff,
919 .pvr_value = 0x000c1101,
920 .cpu_name = "7400 (1.1)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500921 .cpu_features = CPU_FTRS_7400_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000922 .cpu_user_features = COMMON_USER |
923 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000924 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700925 .icache_bsize = 32,
926 .dcache_bsize = 32,
927 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000928 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100929 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100930 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100931 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700932 },
933 { /* 7400 */
934 .pvr_mask = 0xffff0000,
935 .pvr_value = 0x000c0000,
936 .cpu_name = "7400",
Kumar Gala10b35d92005-09-23 14:08:58 -0500937 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000938 .cpu_user_features = COMMON_USER |
939 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000940 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700941 .icache_bsize = 32,
942 .dcache_bsize = 32,
943 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000944 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100945 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100946 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100947 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700948 },
949 { /* 7410 */
950 .pvr_mask = 0xffff0000,
951 .pvr_value = 0x800c0000,
952 .cpu_name = "7410",
Kumar Gala10b35d92005-09-23 14:08:58 -0500953 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000954 .cpu_user_features = COMMON_USER |
955 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000956 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700957 .icache_bsize = 32,
958 .dcache_bsize = 32,
959 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000960 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100961 .cpu_setup = __setup_cpu_7410,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100962 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100963 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700964 },
965 { /* 7450 2.0 - no doze/nap */
966 .pvr_mask = 0xffffffff,
967 .pvr_value = 0x80000200,
968 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500969 .cpu_features = CPU_FTRS_7450_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000970 .cpu_user_features = COMMON_USER |
971 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000972 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700973 .icache_bsize = 32,
974 .dcache_bsize = 32,
975 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000976 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600977 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600978 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000979 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100980 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100981 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700982 },
983 { /* 7450 2.1 */
984 .pvr_mask = 0xffffffff,
985 .pvr_value = 0x80000201,
986 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500987 .cpu_features = CPU_FTRS_7450_21,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000988 .cpu_user_features = COMMON_USER |
989 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000990 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700991 .icache_bsize = 32,
992 .dcache_bsize = 32,
993 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000994 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600995 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600996 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000997 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100998 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100999 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001000 },
1001 { /* 7450 2.3 and newer */
1002 .pvr_mask = 0xffff0000,
1003 .pvr_value = 0x80000000,
1004 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -05001005 .cpu_features = CPU_FTRS_7450_23,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001006 .cpu_user_features = COMMON_USER |
1007 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001008 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001009 .icache_bsize = 32,
1010 .dcache_bsize = 32,
1011 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001012 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001013 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001014 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001015 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001016 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001017 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001018 },
1019 { /* 7455 rev 1.x */
1020 .pvr_mask = 0xffffff00,
1021 .pvr_value = 0x80010100,
1022 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -05001023 .cpu_features = CPU_FTRS_7455_1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001024 .cpu_user_features = COMMON_USER |
1025 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001026 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001027 .icache_bsize = 32,
1028 .dcache_bsize = 32,
1029 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001030 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001031 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001032 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001033 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001034 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001035 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001036 },
1037 { /* 7455 rev 2.0 */
1038 .pvr_mask = 0xffffffff,
1039 .pvr_value = 0x80010200,
1040 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -05001041 .cpu_features = CPU_FTRS_7455_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001042 .cpu_user_features = COMMON_USER |
1043 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001044 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001045 .icache_bsize = 32,
1046 .dcache_bsize = 32,
1047 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001048 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001049 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001050 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001051 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001052 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001053 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001054 },
1055 { /* 7455 others */
1056 .pvr_mask = 0xffff0000,
1057 .pvr_value = 0x80010000,
1058 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -05001059 .cpu_features = CPU_FTRS_7455,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001060 .cpu_user_features = COMMON_USER |
1061 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001062 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001063 .icache_bsize = 32,
1064 .dcache_bsize = 32,
1065 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001066 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001067 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001068 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001069 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001070 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001071 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001072 },
1073 { /* 7447/7457 Rev 1.0 */
1074 .pvr_mask = 0xffffffff,
1075 .pvr_value = 0x80020100,
1076 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -05001077 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001078 .cpu_user_features = COMMON_USER |
1079 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001080 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001081 .icache_bsize = 32,
1082 .dcache_bsize = 32,
1083 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001084 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001085 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001086 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001087 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001088 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001089 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001090 },
1091 { /* 7447/7457 Rev 1.1 */
1092 .pvr_mask = 0xffffffff,
1093 .pvr_value = 0x80020101,
1094 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -05001095 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001096 .cpu_user_features = COMMON_USER |
1097 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001098 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001099 .icache_bsize = 32,
1100 .dcache_bsize = 32,
1101 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001102 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001103 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001104 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001105 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001106 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001107 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001108 },
1109 { /* 7447/7457 Rev 1.2 and later */
1110 .pvr_mask = 0xffff0000,
1111 .pvr_value = 0x80020000,
1112 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -05001113 .cpu_features = CPU_FTRS_7447,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001114 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001115 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001116 .icache_bsize = 32,
1117 .dcache_bsize = 32,
1118 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001119 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001120 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001121 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001122 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001123 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001124 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001125 },
1126 { /* 7447A */
1127 .pvr_mask = 0xffff0000,
1128 .pvr_value = 0x80030000,
1129 .cpu_name = "7447A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001130 .cpu_features = CPU_FTRS_7447A,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001131 .cpu_user_features = COMMON_USER |
1132 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001133 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001134 .icache_bsize = 32,
1135 .dcache_bsize = 32,
1136 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001137 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001138 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001139 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001140 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001141 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001142 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001143 },
Kumar Galabbde6302005-09-03 15:55:55 -07001144 { /* 7448 */
1145 .pvr_mask = 0xffff0000,
1146 .pvr_value = 0x80040000,
1147 .cpu_name = "7448",
James.Yang3d372542007-05-02 16:34:43 -05001148 .cpu_features = CPU_FTRS_7448,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001149 .cpu_user_features = COMMON_USER |
1150 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001151 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Kumar Galabbde6302005-09-03 15:55:55 -07001152 .icache_bsize = 32,
1153 .dcache_bsize = 32,
1154 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001155 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001156 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001157 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001158 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001159 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001160 .platform = "ppc7450",
Kumar Galabbde6302005-09-03 15:55:55 -07001161 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001162 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
1163 .pvr_mask = 0x7fff0000,
1164 .pvr_value = 0x00810000,
1165 .cpu_name = "82xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001166 .cpu_features = CPU_FTRS_82XX,
Stephen Rothwell49209602005-10-12 15:55:09 +10001167 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001168 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001169 .icache_bsize = 32,
1170 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001171 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001172 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001173 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001174 },
1175 { /* All G2_LE (603e core, plus some) have the same pvr */
1176 .pvr_mask = 0x7fff0000,
1177 .pvr_value = 0x00820000,
1178 .cpu_name = "G2_LE",
Kumar Gala10b35d92005-09-23 14:08:58 -05001179 .cpu_features = CPU_FTRS_G2_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +10001180 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001181 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001182 .icache_bsize = 32,
1183 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001184 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001185 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001186 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001187 },
Kim Phillips6c4a2502006-10-02 20:10:24 -05001188 { /* e300c1 (a 603e core, plus some) on 83xx */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001189 .pvr_mask = 0x7fff0000,
1190 .pvr_value = 0x00830000,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001191 .cpu_name = "e300c1",
Kumar Gala10b35d92005-09-23 14:08:58 -05001192 .cpu_features = CPU_FTRS_E300,
Stephen Rothwell49209602005-10-12 15:55:09 +10001193 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001194 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001195 .icache_bsize = 32,
1196 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001197 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001198 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001199 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001200 },
Kim Phillips6c4a2502006-10-02 20:10:24 -05001201 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
1202 .pvr_mask = 0x7fff0000,
1203 .pvr_value = 0x00840000,
1204 .cpu_name = "e300c2",
Kim Phillipsaa42c692006-12-08 02:43:30 -06001205 .cpu_features = CPU_FTRS_E300C2,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001206 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Kumar Gala2319f122009-03-19 03:55:41 +00001207 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1208 MMU_FTR_NEED_DTLB_SW_LRU,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001209 .icache_bsize = 32,
1210 .dcache_bsize = 32,
1211 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001212 .machine_check = machine_check_generic,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001213 .platform = "ppc603",
1214 },
Li Yanga58d5242007-10-19 19:38:42 +08001215 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
Scott Wood57933f82006-12-01 12:57:05 -06001216 .pvr_mask = 0x7fff0000,
1217 .pvr_value = 0x00850000,
1218 .cpu_name = "e300c3",
1219 .cpu_features = CPU_FTRS_E300,
1220 .cpu_user_features = COMMON_USER,
Kumar Gala2319f122009-03-19 03:55:41 +00001221 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1222 MMU_FTR_NEED_DTLB_SW_LRU,
Scott Wood57933f82006-12-01 12:57:05 -06001223 .icache_bsize = 32,
1224 .dcache_bsize = 32,
1225 .cpu_setup = __setup_cpu_603,
Esben Haabendal974ff4e2015-01-06 12:26:59 +01001226 .machine_check = machine_check_generic,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001227 .num_pmcs = 4,
1228 .oprofile_cpu_type = "ppc/e300",
1229 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Scott Wood57933f82006-12-01 12:57:05 -06001230 .platform = "ppc603",
1231 },
Li Yanga58d5242007-10-19 19:38:42 +08001232 { /* e300c4 (e300c1, plus one IU) */
1233 .pvr_mask = 0x7fff0000,
1234 .pvr_value = 0x00860000,
1235 .cpu_name = "e300c4",
1236 .cpu_features = CPU_FTRS_E300,
1237 .cpu_user_features = COMMON_USER,
Kumar Gala2319f122009-03-19 03:55:41 +00001238 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1239 MMU_FTR_NEED_DTLB_SW_LRU,
Li Yanga58d5242007-10-19 19:38:42 +08001240 .icache_bsize = 32,
1241 .dcache_bsize = 32,
1242 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001243 .machine_check = machine_check_generic,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001244 .num_pmcs = 4,
1245 .oprofile_cpu_type = "ppc/e300",
1246 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Li Yanga58d5242007-10-19 19:38:42 +08001247 .platform = "ppc603",
1248 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001249 { /* default match, we assume split I/D cache & TB (non-601)... */
1250 .pvr_mask = 0x00000000,
1251 .pvr_value = 0x00000000,
1252 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -05001253 .cpu_features = CPU_FTRS_CLASSIC32,
Stephen Rothwell49209602005-10-12 15:55:09 +10001254 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001255 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001256 .icache_bsize = 32,
1257 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001258 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001259 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001260 },
Michael Ellerman1e07a0a2014-07-10 12:29:26 +10001261#endif /* CONFIG_PPC_BOOK3S_32 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001262#ifdef CONFIG_8xx
1263 { /* 8xx */
1264 .pvr_mask = 0xffff0000,
1265 .pvr_value = 0x00500000,
1266 .cpu_name = "8xx",
1267 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1268 * if the 8xx code is there.... */
Kumar Gala10b35d92005-09-23 14:08:58 -05001269 .cpu_features = CPU_FTRS_8XX,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001270 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001271 .mmu_features = MMU_FTR_TYPE_8xx,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001272 .icache_bsize = 16,
1273 .dcache_bsize = 16,
Christophe Leroye627f8d2016-09-16 10:23:11 +02001274 .machine_check = machine_check_8xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001275 .platform = "ppc823",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001276 },
1277#endif /* CONFIG_8xx */
1278#ifdef CONFIG_40x
1279 { /* 403GC */
1280 .pvr_mask = 0xffffff00,
1281 .pvr_value = 0x00200200,
1282 .cpu_name = "403GC",
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 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001285 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001286 .icache_bsize = 16,
1287 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001288 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001289 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001290 },
1291 { /* 403GCX */
1292 .pvr_mask = 0xffffff00,
1293 .pvr_value = 0x00201400,
1294 .cpu_name = "403GCX",
Kumar Gala10b35d92005-09-23 14:08:58 -05001295 .cpu_features = CPU_FTRS_40X,
Paul Mackerras98599012005-10-22 16:51:34 +10001296 .cpu_user_features = PPC_FEATURE_32 |
1297 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001298 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001299 .icache_bsize = 16,
1300 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001301 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001302 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001303 },
1304 { /* 403G ?? */
1305 .pvr_mask = 0xffff0000,
1306 .pvr_value = 0x00200000,
1307 .cpu_name = "403G ??",
Kumar Gala10b35d92005-09-23 14:08:58 -05001308 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001309 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001310 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001311 .icache_bsize = 16,
1312 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001313 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001314 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001315 },
1316 { /* 405GP */
1317 .pvr_mask = 0xffff0000,
1318 .pvr_value = 0x40110000,
1319 .cpu_name = "405GP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001320 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001321 .cpu_user_features = PPC_FEATURE_32 |
1322 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001323 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001324 .icache_bsize = 32,
1325 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001326 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001327 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001328 },
1329 { /* STB 03xxx */
1330 .pvr_mask = 0xffff0000,
1331 .pvr_value = 0x40130000,
1332 .cpu_name = "STB03xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001333 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001334 .cpu_user_features = PPC_FEATURE_32 |
1335 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001336 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001337 .icache_bsize = 32,
1338 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001339 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001340 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001341 },
1342 { /* STB 04xxx */
1343 .pvr_mask = 0xffff0000,
1344 .pvr_value = 0x41810000,
1345 .cpu_name = "STB04xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001346 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001347 .cpu_user_features = PPC_FEATURE_32 |
1348 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001349 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001350 .icache_bsize = 32,
1351 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001352 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001353 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001354 },
1355 { /* NP405L */
1356 .pvr_mask = 0xffff0000,
1357 .pvr_value = 0x41610000,
1358 .cpu_name = "NP405L",
Kumar Gala10b35d92005-09-23 14:08:58 -05001359 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001360 .cpu_user_features = PPC_FEATURE_32 |
1361 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001362 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001363 .icache_bsize = 32,
1364 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001365 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001366 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001367 },
1368 { /* NP4GS3 */
1369 .pvr_mask = 0xffff0000,
1370 .pvr_value = 0x40B10000,
1371 .cpu_name = "NP4GS3",
Kumar Gala10b35d92005-09-23 14:08:58 -05001372 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001373 .cpu_user_features = PPC_FEATURE_32 |
1374 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001375 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001376 .icache_bsize = 32,
1377 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001378 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001379 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001380 },
1381 { /* NP405H */
1382 .pvr_mask = 0xffff0000,
1383 .pvr_value = 0x41410000,
1384 .cpu_name = "NP405H",
Kumar Gala10b35d92005-09-23 14:08:58 -05001385 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001386 .cpu_user_features = PPC_FEATURE_32 |
1387 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001388 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001389 .icache_bsize = 32,
1390 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001391 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001392 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001393 },
1394 { /* 405GPr */
1395 .pvr_mask = 0xffff0000,
1396 .pvr_value = 0x50910000,
1397 .cpu_name = "405GPr",
Kumar Gala10b35d92005-09-23 14:08:58 -05001398 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001399 .cpu_user_features = PPC_FEATURE_32 |
1400 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001401 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001402 .icache_bsize = 32,
1403 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001404 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001405 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001406 },
1407 { /* STBx25xx */
1408 .pvr_mask = 0xffff0000,
1409 .pvr_value = 0x51510000,
1410 .cpu_name = "STBx25xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001411 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001412 .cpu_user_features = PPC_FEATURE_32 |
1413 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001414 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001415 .icache_bsize = 32,
1416 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001417 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001418 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001419 },
1420 { /* 405LP */
1421 .pvr_mask = 0xffff0000,
1422 .pvr_value = 0x41F10000,
1423 .cpu_name = "405LP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001424 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001425 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001426 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001427 .icache_bsize = 32,
1428 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001429 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001430 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001431 },
1432 { /* Xilinx Virtex-II Pro */
Grant C. Likely72646c72006-01-19 01:13:20 -07001433 .pvr_mask = 0xfffff000,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001434 .pvr_value = 0x20010000,
1435 .cpu_name = "Virtex-II Pro",
Kumar Gala10b35d92005-09-23 14:08:58 -05001436 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001437 .cpu_user_features = PPC_FEATURE_32 |
1438 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001439 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001440 .icache_bsize = 32,
1441 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001442 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001443 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001444 },
Grant C. Likely72646c72006-01-19 01:13:20 -07001445 { /* Xilinx Virtex-4 FX */
1446 .pvr_mask = 0xfffff000,
1447 .pvr_value = 0x20011000,
1448 .cpu_name = "Virtex-4 FX",
1449 .cpu_features = CPU_FTRS_40X,
1450 .cpu_user_features = PPC_FEATURE_32 |
1451 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001452 .mmu_features = MMU_FTR_TYPE_40x,
Grant C. Likely72646c72006-01-19 01:13:20 -07001453 .icache_bsize = 32,
1454 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001455 .machine_check = machine_check_4xx,
Peter Bergner838fdb42006-09-14 14:18:38 -05001456 .platform = "ppc405",
Grant C. Likely72646c72006-01-19 01:13:20 -07001457 },
Eugene Suroveginad95d602005-06-07 13:22:09 -07001458 { /* 405EP */
1459 .pvr_mask = 0xffff0000,
1460 .pvr_value = 0x51210000,
1461 .cpu_name = "405EP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001462 .cpu_features = CPU_FTRS_40X,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001463 .cpu_user_features = PPC_FEATURE_32 |
1464 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001465 .mmu_features = MMU_FTR_TYPE_40x,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001466 .icache_bsize = 32,
1467 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001468 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001469 .platform = "ppc405",
Eugene Suroveginad95d602005-06-07 13:22:09 -07001470 },
Lee Nipperff349102010-07-09 01:17:16 +00001471 { /* 405EX Rev. A/B with Security */
1472 .pvr_mask = 0xffff000f,
1473 .pvr_value = 0x12910007,
1474 .cpu_name = "405EX Rev. A/B",
Stefan Roese5d8476c2007-10-11 22:08:14 +10001475 .cpu_features = CPU_FTRS_40X,
1476 .cpu_user_features = PPC_FEATURE_32 |
1477 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001478 .mmu_features = MMU_FTR_TYPE_40x,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001479 .icache_bsize = 32,
1480 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001481 .machine_check = machine_check_4xx,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001482 .platform = "ppc405",
1483 },
Lee Nipperff349102010-07-09 01:17:16 +00001484 { /* 405EX Rev. C without Security */
1485 .pvr_mask = 0xffff000f,
1486 .pvr_value = 0x1291000d,
1487 .cpu_name = "405EX Rev. C",
1488 .cpu_features = CPU_FTRS_40X,
1489 .cpu_user_features = PPC_FEATURE_32 |
1490 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1491 .mmu_features = MMU_FTR_TYPE_40x,
1492 .icache_bsize = 32,
1493 .dcache_bsize = 32,
1494 .machine_check = machine_check_4xx,
1495 .platform = "ppc405",
1496 },
1497 { /* 405EX Rev. C with Security */
1498 .pvr_mask = 0xffff000f,
1499 .pvr_value = 0x1291000f,
1500 .cpu_name = "405EX Rev. C",
1501 .cpu_features = CPU_FTRS_40X,
1502 .cpu_user_features = PPC_FEATURE_32 |
1503 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1504 .mmu_features = MMU_FTR_TYPE_40x,
1505 .icache_bsize = 32,
1506 .dcache_bsize = 32,
1507 .machine_check = machine_check_4xx,
1508 .platform = "ppc405",
1509 },
1510 { /* 405EX Rev. D without Security */
1511 .pvr_mask = 0xffff000f,
1512 .pvr_value = 0x12910003,
1513 .cpu_name = "405EX Rev. D",
1514 .cpu_features = CPU_FTRS_40X,
1515 .cpu_user_features = PPC_FEATURE_32 |
1516 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1517 .mmu_features = MMU_FTR_TYPE_40x,
1518 .icache_bsize = 32,
1519 .dcache_bsize = 32,
1520 .machine_check = machine_check_4xx,
1521 .platform = "ppc405",
1522 },
1523 { /* 405EX Rev. D with Security */
1524 .pvr_mask = 0xffff000f,
1525 .pvr_value = 0x12910005,
1526 .cpu_name = "405EX Rev. D",
1527 .cpu_features = CPU_FTRS_40X,
1528 .cpu_user_features = PPC_FEATURE_32 |
1529 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1530 .mmu_features = MMU_FTR_TYPE_40x,
1531 .icache_bsize = 32,
1532 .dcache_bsize = 32,
1533 .machine_check = machine_check_4xx,
1534 .platform = "ppc405",
1535 },
1536 { /* 405EXr Rev. A/B without Security */
1537 .pvr_mask = 0xffff000f,
1538 .pvr_value = 0x12910001,
1539 .cpu_name = "405EXr Rev. A/B",
1540 .cpu_features = CPU_FTRS_40X,
1541 .cpu_user_features = PPC_FEATURE_32 |
1542 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1543 .mmu_features = MMU_FTR_TYPE_40x,
1544 .icache_bsize = 32,
1545 .dcache_bsize = 32,
1546 .machine_check = machine_check_4xx,
1547 .platform = "ppc405",
1548 },
1549 { /* 405EXr Rev. C without Security */
1550 .pvr_mask = 0xffff000f,
1551 .pvr_value = 0x12910009,
1552 .cpu_name = "405EXr Rev. C",
1553 .cpu_features = CPU_FTRS_40X,
1554 .cpu_user_features = PPC_FEATURE_32 |
1555 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1556 .mmu_features = MMU_FTR_TYPE_40x,
1557 .icache_bsize = 32,
1558 .dcache_bsize = 32,
1559 .machine_check = machine_check_4xx,
1560 .platform = "ppc405",
1561 },
1562 { /* 405EXr Rev. C with Security */
1563 .pvr_mask = 0xffff000f,
1564 .pvr_value = 0x1291000b,
1565 .cpu_name = "405EXr Rev. C",
1566 .cpu_features = CPU_FTRS_40X,
1567 .cpu_user_features = PPC_FEATURE_32 |
1568 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1569 .mmu_features = MMU_FTR_TYPE_40x,
1570 .icache_bsize = 32,
1571 .dcache_bsize = 32,
1572 .machine_check = machine_check_4xx,
1573 .platform = "ppc405",
1574 },
1575 { /* 405EXr Rev. D without Security */
1576 .pvr_mask = 0xffff000f,
Stefan Roeseb676d842008-01-15 18:09:15 +11001577 .pvr_value = 0x12910000,
Lee Nipperff349102010-07-09 01:17:16 +00001578 .cpu_name = "405EXr Rev. D",
1579 .cpu_features = CPU_FTRS_40X,
1580 .cpu_user_features = PPC_FEATURE_32 |
1581 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1582 .mmu_features = MMU_FTR_TYPE_40x,
1583 .icache_bsize = 32,
1584 .dcache_bsize = 32,
1585 .machine_check = machine_check_4xx,
1586 .platform = "ppc405",
1587 },
1588 { /* 405EXr Rev. D with Security */
1589 .pvr_mask = 0xffff000f,
1590 .pvr_value = 0x12910002,
1591 .cpu_name = "405EXr Rev. D",
Stefan Roeseb676d842008-01-15 18:09:15 +11001592 .cpu_features = CPU_FTRS_40X,
1593 .cpu_user_features = PPC_FEATURE_32 |
1594 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001595 .mmu_features = MMU_FTR_TYPE_40x,
Stefan Roeseb676d842008-01-15 18:09:15 +11001596 .icache_bsize = 32,
1597 .dcache_bsize = 32,
1598 .machine_check = machine_check_4xx,
1599 .platform = "ppc405",
1600 },
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001601 {
1602 /* 405EZ */
1603 .pvr_mask = 0xffff0000,
1604 .pvr_value = 0x41510000,
1605 .cpu_name = "405EZ",
1606 .cpu_features = CPU_FTRS_40X,
1607 .cpu_user_features = PPC_FEATURE_32 |
1608 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001609 .mmu_features = MMU_FTR_TYPE_40x,
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001610 .icache_bsize = 32,
1611 .dcache_bsize = 32,
1612 .machine_check = machine_check_4xx,
1613 .platform = "ppc405",
1614 },
Tanmay Inamdard5b9ee72011-11-28 21:01:41 +00001615 { /* APM8018X */
1616 .pvr_mask = 0xffff0000,
1617 .pvr_value = 0x7ff11432,
1618 .cpu_name = "APM8018X",
1619 .cpu_features = CPU_FTRS_40X,
1620 .cpu_user_features = PPC_FEATURE_32 |
1621 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1622 .mmu_features = MMU_FTR_TYPE_40x,
1623 .icache_bsize = 32,
1624 .dcache_bsize = 32,
1625 .machine_check = machine_check_4xx,
1626 .platform = "ppc405",
1627 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001628 { /* default match */
1629 .pvr_mask = 0x00000000,
1630 .pvr_value = 0x00000000,
1631 .cpu_name = "(generic 40x PPC)",
1632 .cpu_features = CPU_FTRS_40X,
1633 .cpu_user_features = PPC_FEATURE_32 |
1634 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001635 .mmu_features = MMU_FTR_TYPE_40x,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001636 .icache_bsize = 32,
1637 .dcache_bsize = 32,
1638 .machine_check = machine_check_4xx,
1639 .platform = "ppc405",
1640 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001641
1642#endif /* CONFIG_40x */
1643#ifdef CONFIG_44x
Matt Porterc9cf73a2005-07-31 22:34:52 -07001644 {
1645 .pvr_mask = 0xf0000fff,
1646 .pvr_value = 0x40000850,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001647 .cpu_name = "440GR Rev. A",
1648 .cpu_features = CPU_FTRS_44X,
1649 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001650 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001651 .icache_bsize = 32,
1652 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001653 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001654 .platform = "ppc440",
1655 },
1656 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1657 .pvr_mask = 0xf0000fff,
1658 .pvr_value = 0x40000858,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001659 .cpu_name = "440EP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001660 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001661 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001662 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001663 .icache_bsize = 32,
1664 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001665 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001666 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001667 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001668 },
1669 {
1670 .pvr_mask = 0xf0000fff,
1671 .pvr_value = 0x400008d3,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001672 .cpu_name = "440GR Rev. B",
1673 .cpu_features = CPU_FTRS_44X,
1674 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001675 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001676 .icache_bsize = 32,
1677 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001678 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001679 .platform = "ppc440",
1680 },
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001681 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1682 .pvr_mask = 0xf0000ff7,
1683 .pvr_value = 0x400008d4,
1684 .cpu_name = "440EP Rev. C",
1685 .cpu_features = CPU_FTRS_44X,
1686 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001687 .mmu_features = MMU_FTR_TYPE_44x,
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001688 .icache_bsize = 32,
1689 .dcache_bsize = 32,
1690 .cpu_setup = __setup_cpu_440ep,
1691 .machine_check = machine_check_4xx,
1692 .platform = "ppc440",
1693 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001694 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1695 .pvr_mask = 0xf0000fff,
1696 .pvr_value = 0x400008db,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001697 .cpu_name = "440EP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001698 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001699 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001700 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001701 .icache_bsize = 32,
1702 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001703 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001704 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001705 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001706 },
Valentine Barshak15fc9932007-08-29 17:40:30 +04001707 { /* 440GRX */
1708 .pvr_mask = 0xf0000ffb,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001709 .pvr_value = 0x200008D0,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001710 .cpu_name = "440GRX",
1711 .cpu_features = CPU_FTRS_44X,
1712 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001713 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001714 .icache_bsize = 32,
1715 .dcache_bsize = 32,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001716 .cpu_setup = __setup_cpu_440grx,
Valentine Barshakb2be3b12007-12-22 03:22:23 +11001717 .machine_check = machine_check_440A,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001718 .platform = "ppc440",
Valentine Barshak15fc9932007-08-29 17:40:30 +04001719 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001720 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1721 .pvr_mask = 0xf0000ffb,
1722 .pvr_value = 0x200008D8,
1723 .cpu_name = "440EPX",
1724 .cpu_features = CPU_FTRS_44X,
1725 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001726 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001727 .icache_bsize = 32,
1728 .dcache_bsize = 32,
1729 .cpu_setup = __setup_cpu_440epx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001730 .machine_check = machine_check_440A,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001731 .platform = "ppc440",
1732 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001733 { /* 440GP Rev. B */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001734 .pvr_mask = 0xf0000fff,
1735 .pvr_value = 0x40000440,
1736 .cpu_name = "440GP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001737 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001738 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001739 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001740 .icache_bsize = 32,
1741 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001742 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001743 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001744 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001745 { /* 440GP Rev. C */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001746 .pvr_mask = 0xf0000fff,
1747 .pvr_value = 0x40000481,
1748 .cpu_name = "440GP Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001749 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001750 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001751 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001752 .icache_bsize = 32,
1753 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001754 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001755 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001756 },
1757 { /* 440GX Rev. A */
1758 .pvr_mask = 0xf0000fff,
1759 .pvr_value = 0x50000850,
1760 .cpu_name = "440GX Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001761 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001762 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001763 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001764 .icache_bsize = 32,
1765 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001766 .cpu_setup = __setup_cpu_440gx,
1767 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001768 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001769 },
1770 { /* 440GX Rev. B */
1771 .pvr_mask = 0xf0000fff,
1772 .pvr_value = 0x50000851,
1773 .cpu_name = "440GX Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001774 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001775 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001776 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001777 .icache_bsize = 32,
1778 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001779 .cpu_setup = __setup_cpu_440gx,
1780 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001781 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001782 },
1783 { /* 440GX Rev. C */
1784 .pvr_mask = 0xf0000fff,
1785 .pvr_value = 0x50000892,
1786 .cpu_name = "440GX Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001787 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001788 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001789 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001790 .icache_bsize = 32,
1791 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001792 .cpu_setup = __setup_cpu_440gx,
1793 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001794 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001795 },
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001796 { /* 440GX Rev. F */
1797 .pvr_mask = 0xf0000fff,
1798 .pvr_value = 0x50000894,
1799 .cpu_name = "440GX Rev. F",
Kumar Gala10b35d92005-09-23 14:08:58 -05001800 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001801 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001802 .mmu_features = MMU_FTR_TYPE_44x,
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001803 .icache_bsize = 32,
1804 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001805 .cpu_setup = __setup_cpu_440gx,
1806 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001807 .platform = "ppc440",
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001808 },
Matt Porter656de7e2005-09-03 15:55:42 -07001809 { /* 440SP Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001810 .pvr_mask = 0xfff00fff,
1811 .pvr_value = 0x53200891,
Matt Porter656de7e2005-09-03 15:55:42 -07001812 .cpu_name = "440SP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001813 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001814 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001815 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porter656de7e2005-09-03 15:55:42 -07001816 .icache_bsize = 32,
1817 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001818 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001819 .platform = "ppc440",
Matt Porter656de7e2005-09-03 15:55:42 -07001820 },
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001821 { /* 440SPe Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001822 .pvr_mask = 0xfff00fff,
1823 .pvr_value = 0x53400890,
1824 .cpu_name = "440SPe Rev. A",
1825 .cpu_features = CPU_FTRS_44X,
1826 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001827 .mmu_features = MMU_FTR_TYPE_44x,
Roland Dreier333e6152007-06-16 05:36:32 +10001828 .icache_bsize = 32,
1829 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001830 .cpu_setup = __setup_cpu_440spe,
1831 .machine_check = machine_check_440A,
Roland Dreier333e6152007-06-16 05:36:32 +10001832 .platform = "ppc440",
1833 },
1834 { /* 440SPe Rev. B */
1835 .pvr_mask = 0xfff00fff,
1836 .pvr_value = 0x53400891,
1837 .cpu_name = "440SPe Rev. B",
Kumar Galaa147c582006-12-08 02:34:38 -06001838 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001839 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001840 .mmu_features = MMU_FTR_TYPE_44x,
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001841 .icache_bsize = 32,
1842 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001843 .cpu_setup = __setup_cpu_440spe,
1844 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001845 .platform = "ppc440",
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001846 },
John Linn23e72372008-07-01 09:42:07 -07001847 { /* 440 in Xilinx Virtex-5 FXT */
1848 .pvr_mask = 0xfffffff0,
1849 .pvr_value = 0x7ff21910,
1850 .cpu_name = "440 in Virtex-5 FXT",
1851 .cpu_features = CPU_FTRS_44X,
1852 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001853 .mmu_features = MMU_FTR_TYPE_44x,
John Linn23e72372008-07-01 09:42:07 -07001854 .icache_bsize = 32,
1855 .dcache_bsize = 32,
Grant Likely640d17d2008-12-04 05:39:55 +00001856 .cpu_setup = __setup_cpu_440x5,
1857 .machine_check = machine_check_440A,
John Linn23e72372008-07-01 09:42:07 -07001858 .platform = "ppc440",
1859 },
Stefan Roese464076a2008-02-24 08:07:41 +11001860 { /* 460EX */
Stefan Roese20d70342009-07-29 07:04:46 +00001861 .pvr_mask = 0xffff0006,
Stefan Roese464076a2008-02-24 08:07:41 +11001862 .pvr_value = 0x13020002,
1863 .cpu_name = "460EX",
Benjamin Herrenschmidt6d2170b2008-12-18 19:13:22 +00001864 .cpu_features = CPU_FTRS_440x6,
Stefan Roese464076a2008-02-24 08:07:41 +11001865 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001866 .mmu_features = MMU_FTR_TYPE_44x,
Stefan Roese464076a2008-02-24 08:07:41 +11001867 .icache_bsize = 32,
1868 .dcache_bsize = 32,
1869 .cpu_setup = __setup_cpu_460ex,
1870 .machine_check = machine_check_440A,
1871 .platform = "ppc440",
1872 },
Stefan Roese20d70342009-07-29 07:04:46 +00001873 { /* 460EX Rev B */
1874 .pvr_mask = 0xffff0007,
1875 .pvr_value = 0x13020004,
1876 .cpu_name = "460EX Rev. B",
1877 .cpu_features = CPU_FTRS_440x6,
1878 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1879 .mmu_features = MMU_FTR_TYPE_44x,
1880 .icache_bsize = 32,
1881 .dcache_bsize = 32,
1882 .cpu_setup = __setup_cpu_460ex,
1883 .machine_check = machine_check_440A,
1884 .platform = "ppc440",
1885 },
Stefan Roese464076a2008-02-24 08:07:41 +11001886 { /* 460GT */
Stefan Roese20d70342009-07-29 07:04:46 +00001887 .pvr_mask = 0xffff0006,
Stefan Roese464076a2008-02-24 08:07:41 +11001888 .pvr_value = 0x13020000,
1889 .cpu_name = "460GT",
Benjamin Herrenschmidt6d2170b2008-12-18 19:13:22 +00001890 .cpu_features = CPU_FTRS_440x6,
Josh Boyer939e6222008-06-11 07:52:40 -04001891 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001892 .mmu_features = MMU_FTR_TYPE_44x,
Stefan Roese464076a2008-02-24 08:07:41 +11001893 .icache_bsize = 32,
1894 .dcache_bsize = 32,
Josh Boyer939e6222008-06-11 07:52:40 -04001895 .cpu_setup = __setup_cpu_460gt,
Stefan Roese464076a2008-02-24 08:07:41 +11001896 .machine_check = machine_check_440A,
1897 .platform = "ppc440",
1898 },
Stefan Roese20d70342009-07-29 07:04:46 +00001899 { /* 460GT Rev B */
1900 .pvr_mask = 0xffff0007,
1901 .pvr_value = 0x13020005,
1902 .cpu_name = "460GT Rev. B",
1903 .cpu_features = CPU_FTRS_440x6,
1904 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1905 .mmu_features = MMU_FTR_TYPE_44x,
1906 .icache_bsize = 32,
1907 .dcache_bsize = 32,
1908 .cpu_setup = __setup_cpu_460gt,
1909 .machine_check = machine_check_440A,
1910 .platform = "ppc440",
1911 },
Madhulika Madishetty6c712092009-02-05 13:31:36 +00001912 { /* 460SX */
1913 .pvr_mask = 0xffffff00,
1914 .pvr_value = 0x13541800,
1915 .cpu_name = "460SX",
1916 .cpu_features = CPU_FTRS_44X,
1917 .cpu_user_features = COMMON_USER_BOOKE,
1918 .mmu_features = MMU_FTR_TYPE_44x,
1919 .icache_bsize = 32,
1920 .dcache_bsize = 32,
1921 .cpu_setup = __setup_cpu_460sx,
1922 .machine_check = machine_check_440A,
1923 .platform = "ppc440",
1924 },
Tirumala Marri6edc3232010-09-13 13:26:11 +00001925 { /* 464 in APM821xx */
Vinh Nguyen Huu Tuong7c801162011-12-20 02:43:34 +00001926 .pvr_mask = 0xfffffff0,
Tirumala Marri6edc3232010-09-13 13:26:11 +00001927 .pvr_value = 0x12C41C80,
1928 .cpu_name = "APM821XX",
1929 .cpu_features = CPU_FTRS_44X,
1930 .cpu_user_features = COMMON_USER_BOOKE |
1931 PPC_FEATURE_HAS_FPU,
1932 .mmu_features = MMU_FTR_TYPE_44x,
1933 .icache_bsize = 32,
1934 .dcache_bsize = 32,
1935 .cpu_setup = __setup_cpu_apm821xx,
1936 .machine_check = machine_check_440A,
1937 .platform = "ppc440",
1938 },
Michael Ellerman13fef7f2017-08-08 16:39:17 +10001939#ifdef CONFIG_PPC_47x
Dave Kleikampc48d0db2011-01-26 06:17:58 +00001940 { /* 476 DD2 core */
1941 .pvr_mask = 0xffffffff,
1942 .pvr_value = 0x11a52080,
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001943 .cpu_name = "476",
Dave Kleikampc48d0db2011-01-26 06:17:58 +00001944 .cpu_features = CPU_FTRS_47X | CPU_FTR_476_DD2,
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001945 .cpu_user_features = COMMON_USER_BOOKE |
1946 PPC_FEATURE_HAS_FPU,
1947 .mmu_features = MMU_FTR_TYPE_47x |
1948 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1949 .icache_bsize = 32,
1950 .dcache_bsize = 128,
Dave Kleikampfc5e7092010-03-05 03:43:18 +00001951 .machine_check = machine_check_47x,
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001952 .platform = "ppc470",
1953 },
Tony Breedsdf777bd2011-11-30 21:39:23 +00001954 { /* 476fpe */
1955 .pvr_mask = 0xffff0000,
1956 .pvr_value = 0x7ff50000,
1957 .cpu_name = "476fpe",
1958 .cpu_features = CPU_FTRS_47X | CPU_FTR_476_DD2,
1959 .cpu_user_features = COMMON_USER_BOOKE |
1960 PPC_FEATURE_HAS_FPU,
1961 .mmu_features = MMU_FTR_TYPE_47x |
1962 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1963 .icache_bsize = 32,
1964 .dcache_bsize = 128,
1965 .machine_check = machine_check_47x,
1966 .platform = "ppc470",
1967 },
Torez Smithb4e8c8d2010-03-05 10:45:54 +00001968 { /* 476 iss */
1969 .pvr_mask = 0xffff0000,
1970 .pvr_value = 0x00050000,
1971 .cpu_name = "476",
1972 .cpu_features = CPU_FTRS_47X,
1973 .cpu_user_features = COMMON_USER_BOOKE |
1974 PPC_FEATURE_HAS_FPU,
Torez Smithb4e8c8d2010-03-05 10:45:54 +00001975 .mmu_features = MMU_FTR_TYPE_47x |
1976 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1977 .icache_bsize = 32,
1978 .dcache_bsize = 128,
1979 .machine_check = machine_check_47x,
1980 .platform = "ppc470",
1981 },
Dave Kleikampc48d0db2011-01-26 06:17:58 +00001982 { /* 476 others */
1983 .pvr_mask = 0xffff0000,
1984 .pvr_value = 0x11a50000,
1985 .cpu_name = "476",
1986 .cpu_features = CPU_FTRS_47X,
1987 .cpu_user_features = COMMON_USER_BOOKE |
1988 PPC_FEATURE_HAS_FPU,
1989 .mmu_features = MMU_FTR_TYPE_47x |
1990 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1991 .icache_bsize = 32,
1992 .dcache_bsize = 128,
1993 .machine_check = machine_check_47x,
1994 .platform = "ppc470",
1995 },
Michael Ellerman13fef7f2017-08-08 16:39:17 +10001996#endif /* CONFIG_PPC_47x */
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001997 { /* default match */
1998 .pvr_mask = 0x00000000,
1999 .pvr_value = 0x00000000,
2000 .cpu_name = "(generic 44x PPC)",
2001 .cpu_features = CPU_FTRS_44X,
2002 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00002003 .mmu_features = MMU_FTR_TYPE_44x,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002004 .icache_bsize = 32,
2005 .dcache_bsize = 32,
2006 .machine_check = machine_check_4xx,
2007 .platform = "ppc440",
2008 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07002009#endif /* CONFIG_44x */
Josh Boyere3e414b2007-12-24 08:44:47 -06002010#ifdef CONFIG_E200
Stephen Rothwell49209602005-10-12 15:55:09 +10002011 { /* e200z5 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07002012 .pvr_mask = 0xfff00000,
2013 .pvr_value = 0x81000000,
2014 .cpu_name = "e200z5",
2015 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05002016 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002017 .cpu_user_features = COMMON_USER_BOOKE |
2018 PPC_FEATURE_HAS_EFP_SINGLE |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07002019 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00002020 .mmu_features = MMU_FTR_TYPE_FSL_E,
Kumar Gala33d9e9b2005-06-25 14:54:37 -07002021 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11002022 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002023 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07002024 },
Stephen Rothwell49209602005-10-12 15:55:09 +10002025 { /* e200z6 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07002026 .pvr_mask = 0xfff00000,
2027 .pvr_value = 0x81100000,
2028 .cpu_name = "e200z6",
2029 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05002030 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002031 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05002032 PPC_FEATURE_HAS_SPE_COMP |
2033 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07002034 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00002035 .mmu_features = MMU_FTR_TYPE_FSL_E,
Kumar Gala33d9e9b2005-06-25 14:54:37 -07002036 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11002037 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002038 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07002039 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002040 { /* default match */
2041 .pvr_mask = 0x00000000,
2042 .pvr_value = 0x00000000,
2043 .cpu_name = "(generic E200 PPC)",
2044 .cpu_features = CPU_FTRS_E200,
2045 .cpu_user_features = COMMON_USER_BOOKE |
2046 PPC_FEATURE_HAS_EFP_SINGLE |
2047 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00002048 .mmu_features = MMU_FTR_TYPE_FSL_E,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002049 .dcache_bsize = 32,
Kumar Gala105c31d2009-01-08 08:31:20 -06002050 .cpu_setup = __setup_cpu_e200,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002051 .machine_check = machine_check_e200,
2052 .platform = "ppc5554",
Paul Mackerras516c8be2008-05-12 14:20:35 +10002053 }
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002054#endif /* CONFIG_E200 */
Kumar Gala4490c062010-10-08 08:32:11 -05002055#endif /* CONFIG_PPC32 */
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002056#ifdef CONFIG_E500
Kumar Gala4490c062010-10-08 08:32:11 -05002057#ifdef CONFIG_PPC32
Mihai Caraman3477e712014-08-20 16:09:03 +03002058#ifndef CONFIG_PPC_E500MC
Stephen Rothwell49209602005-10-12 15:55:09 +10002059 { /* e500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002060 .pvr_mask = 0xffff0000,
2061 .pvr_value = 0x80200000,
2062 .cpu_name = "e500",
Kumar Gala10b35d92005-09-23 14:08:58 -05002063 .cpu_features = CPU_FTRS_E500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002064 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05002065 PPC_FEATURE_HAS_SPE_COMP |
2066 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Nishanth Aravamudan6c1bf482013-05-04 16:01:17 +00002067 .cpu_user_features2 = PPC_FEATURE2_ISEL,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00002068 .mmu_features = MMU_FTR_TYPE_FSL_E,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002069 .icache_bsize = 32,
2070 .dcache_bsize = 32,
2071 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06002072 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06002073 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06002074 .cpu_setup = __setup_cpu_e500v1,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11002075 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002076 .platform = "ppc8540",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002077 },
Stephen Rothwell49209602005-10-12 15:55:09 +10002078 { /* e500v2 */
Kumar Gala5b37b702005-06-21 17:15:18 -07002079 .pvr_mask = 0xffff0000,
2080 .pvr_value = 0x80210000,
2081 .cpu_name = "e500v2",
Kumar Gala10b35d92005-09-23 14:08:58 -05002082 .cpu_features = CPU_FTRS_E500_2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002083 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05002084 PPC_FEATURE_HAS_SPE_COMP |
2085 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
2086 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
Nishanth Aravamudan6c1bf482013-05-04 16:01:17 +00002087 .cpu_user_features2 = PPC_FEATURE2_ISEL,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00002088 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS,
Kumar Gala5b37b702005-06-21 17:15:18 -07002089 .icache_bsize = 32,
2090 .dcache_bsize = 32,
2091 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06002092 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06002093 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06002094 .cpu_setup = __setup_cpu_e500v2,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11002095 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002096 .platform = "ppc8548",
chenhui zhaoe7affb12015-11-20 17:13:58 +08002097 .cpu_down_flush = cpu_down_flush_e500v2,
Kumar Gala5b37b702005-06-21 17:15:18 -07002098 },
Mihai Caraman3477e712014-08-20 16:09:03 +03002099#else
Kumar Gala3dfa8772008-06-16 09:41:32 -05002100 { /* e500mc */
2101 .pvr_mask = 0xffff0000,
2102 .pvr_value = 0x80230000,
2103 .cpu_name = "e500mc",
Kumar Gala3dfa8772008-06-16 09:41:32 -05002104 .cpu_features = CPU_FTRS_E500MC,
2105 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Nishanth Aravamudan6c1bf482013-05-04 16:01:17 +00002106 .cpu_user_features2 = PPC_FEATURE2_ISEL,
Kumar Galac3071952009-02-10 22:26:06 -06002107 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
Kumar Gala323d23a2009-04-23 08:51:22 -05002108 MMU_FTR_USE_TLBILX,
Kumar Gala3dfa8772008-06-16 09:41:32 -05002109 .icache_bsize = 64,
2110 .dcache_bsize = 64,
2111 .num_pmcs = 4,
Scott Wooda11106542010-02-25 18:09:45 -06002112 .oprofile_cpu_type = "ppc/e500mc",
Kumar Gala3dfa8772008-06-16 09:41:32 -05002113 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06002114 .cpu_setup = __setup_cpu_e500mc,
Scott Woodfe04b112010-04-08 00:38:22 -05002115 .machine_check = machine_check_e500mc,
Kumar Gala3dfa8772008-06-16 09:41:32 -05002116 .platform = "ppce500mc",
chenhui zhaoe7affb12015-11-20 17:13:58 +08002117 .cpu_down_flush = cpu_down_flush_e500mc,
Kumar Gala3dfa8772008-06-16 09:41:32 -05002118 },
Mihai Caraman3477e712014-08-20 16:09:03 +03002119#endif /* CONFIG_PPC_E500MC */
Kumar Gala4490c062010-10-08 08:32:11 -05002120#endif /* CONFIG_PPC32 */
Mihai Caraman3477e712014-08-20 16:09:03 +03002121#ifdef CONFIG_PPC_E500MC
Kumar Gala4490c062010-10-08 08:32:11 -05002122 { /* e5500 */
2123 .pvr_mask = 0xffff0000,
2124 .pvr_value = 0x80240000,
2125 .cpu_name = "e5500",
Kumar Gala11ed0db2011-04-06 00:11:06 -05002126 .cpu_features = CPU_FTRS_E5500,
Kumar Galafb9be232011-06-02 11:26:13 -05002127 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Nishanth Aravamudan6c1bf482013-05-04 16:01:17 +00002128 .cpu_user_features2 = PPC_FEATURE2_ISEL,
Kumar Gala4490c062010-10-08 08:32:11 -05002129 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
2130 MMU_FTR_USE_TLBILX,
2131 .icache_bsize = 64,
2132 .dcache_bsize = 64,
2133 .num_pmcs = 4,
2134 .oprofile_cpu_type = "ppc/e500mc",
2135 .oprofile_type = PPC_OPROFILE_FSL_EMB,
2136 .cpu_setup = __setup_cpu_e5500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05302137#ifndef CONFIG_PPC32
Kumar Gala4490c062010-10-08 08:32:11 -05002138 .cpu_restore = __restore_cpu_e5500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05302139#endif
Kumar Gala4490c062010-10-08 08:32:11 -05002140 .machine_check = machine_check_e500mc,
2141 .platform = "ppce5500",
chenhui zhaoe7affb12015-11-20 17:13:58 +08002142 .cpu_down_flush = cpu_down_flush_e5500,
Kumar Gala4490c062010-10-08 08:32:11 -05002143 },
Kumar Gala10241842011-11-06 11:51:07 -06002144 { /* e6500 */
2145 .pvr_mask = 0xffff0000,
2146 .pvr_value = 0x80400000,
2147 .cpu_name = "e6500",
2148 .cpu_features = CPU_FTRS_E6500,
Kumar Galacd66cc22012-09-07 15:57:17 -05002149 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU |
2150 PPC_FEATURE_HAS_ALTIVEC_COMP,
Nishanth Aravamudan6c1bf482013-05-04 16:01:17 +00002151 .cpu_user_features2 = PPC_FEATURE2_ISEL,
Kumar Gala10241842011-11-06 11:51:07 -06002152 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
2153 MMU_FTR_USE_TLBILX,
2154 .icache_bsize = 64,
2155 .dcache_bsize = 64,
Lijun Pan5815c432013-06-05 15:22:09 -05002156 .num_pmcs = 6,
Kumar Gala10241842011-11-06 11:51:07 -06002157 .oprofile_cpu_type = "ppc/e6500",
2158 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Galacd66cc22012-09-07 15:57:17 -05002159 .cpu_setup = __setup_cpu_e6500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05302160#ifndef CONFIG_PPC32
Kumar Galacd66cc22012-09-07 15:57:17 -05002161 .cpu_restore = __restore_cpu_e6500,
Varun Sethi2c71b0c2012-07-09 18:28:21 +05302162#endif
Kumar Gala10241842011-11-06 11:51:07 -06002163 .machine_check = machine_check_e500mc,
2164 .platform = "ppce6500",
chenhui zhaoe7affb12015-11-20 17:13:58 +08002165 .cpu_down_flush = cpu_down_flush_e6500,
Kumar Gala10241842011-11-06 11:51:07 -06002166 },
Mihai Caraman3477e712014-08-20 16:09:03 +03002167#endif /* CONFIG_PPC_E500MC */
Kumar Gala4490c062010-10-08 08:32:11 -05002168#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -07002169 { /* default match */
2170 .pvr_mask = 0x00000000,
2171 .pvr_value = 0x00000000,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002172 .cpu_name = "(generic E500 PPC)",
2173 .cpu_features = CPU_FTRS_E500,
2174 .cpu_user_features = COMMON_USER_BOOKE |
2175 PPC_FEATURE_HAS_SPE_COMP |
2176 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00002177 .mmu_features = MMU_FTR_TYPE_FSL_E,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002178 .icache_bsize = 32,
2179 .dcache_bsize = 32,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002180 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002181 .platform = "powerpc",
Paul Mackerras516c8be2008-05-12 14:20:35 +10002182 }
Stephen Rothwell49209602005-10-12 15:55:09 +10002183#endif /* CONFIG_PPC32 */
Kumar Gala4490c062010-10-08 08:32:11 -05002184#endif /* CONFIG_E500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002185};
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002186
Nicholas Piggin5a61ef72017-05-09 13:16:52 +10002187void __init set_cur_cpu_spec(struct cpu_spec *s)
2188{
2189 struct cpu_spec *t = &the_cpu_spec;
2190
2191 t = PTRRELOC(t);
2192 *t = *s;
2193
2194 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
2195}
Paul Mackerras87a72f92007-10-04 14:18:01 +10002196
Scott Wood26ee9762011-07-25 11:04:36 +00002197static struct cpu_spec * __init setup_cpu_spec(unsigned long offset,
2198 struct cpu_spec *s)
Michael Ellerman666435b2009-02-22 16:25:43 +00002199{
2200 struct cpu_spec *t = &the_cpu_spec;
Michael Ellerman2657dd42009-02-22 16:25:45 +00002201 struct cpu_spec old;
2202
Michael Ellerman666435b2009-02-22 16:25:43 +00002203 t = PTRRELOC(t);
Michael Ellerman2657dd42009-02-22 16:25:45 +00002204 old = *t;
2205
2206 /* Copy everything, then do fixups */
2207 *t = *s;
Michael Ellerman666435b2009-02-22 16:25:43 +00002208
2209 /*
2210 * If we are overriding a previous value derived from the real
2211 * PVR with a new value obtained using a logical PVR value,
2212 * don't modify the performance monitor fields.
2213 */
Michael Ellerman2657dd42009-02-22 16:25:45 +00002214 if (old.num_pmcs && !s->num_pmcs) {
2215 t->num_pmcs = old.num_pmcs;
2216 t->pmc_type = old.pmc_type;
2217 t->oprofile_type = old.oprofile_type;
2218 t->oprofile_mmcra_sihv = old.oprofile_mmcra_sihv;
2219 t->oprofile_mmcra_sipr = old.oprofile_mmcra_sipr;
2220 t->oprofile_mmcra_clear = old.oprofile_mmcra_clear;
2221
Michael Ellerman666435b2009-02-22 16:25:43 +00002222 /*
2223 * If we have passed through this logic once before and
2224 * have pulled the default case because the real PVR was
2225 * not found inside cpu_specs[], then we are possibly
2226 * running in compatibility mode. In that case, let the
2227 * oprofiler know which set of compatibility counters to
2228 * pull from by making sure the oprofile_cpu_type string
2229 * is set to that of compatibility mode. If the
2230 * oprofile_cpu_type already has a value, then we are
2231 * possibly overriding a real PVR with a logical one,
2232 * and, in that case, keep the current value for
2233 * oprofile_cpu_type.
2234 */
Benjamin Herrenschmidtb173f032009-05-14 18:34:06 +00002235 if (old.oprofile_cpu_type != NULL) {
Benjamin Herrenschmidt0203d6e2009-04-29 19:39:38 +00002236 t->oprofile_cpu_type = old.oprofile_cpu_type;
2237 t->oprofile_type = old.oprofile_type;
Michael Wolf79af6c42009-04-27 06:17:54 +00002238 }
Michael Ellerman2657dd42009-02-22 16:25:45 +00002239 }
Michael Ellerman666435b2009-02-22 16:25:43 +00002240
2241 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
2242
2243 /*
2244 * Set the base platform string once; assumes
2245 * we're called with real pvr first.
2246 */
2247 if (*PTRRELOC(&powerpc_base_platform) == NULL)
2248 *PTRRELOC(&powerpc_base_platform) = t->platform;
2249
2250#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
2251 /* ppc64 and booke expect identify_cpu to also call setup_cpu for
2252 * that processor. I will consolidate that at a later time, for now,
2253 * just use #ifdef. We also don't need to PTRRELOC the function
2254 * pointer on ppc64 and booke as we are running at 0 in real mode
2255 * on ppc64 and reloc_offset is always 0 on booke.
2256 */
Benjamin Herrenschmidtaf9eef32011-01-20 20:36:03 +00002257 if (t->cpu_setup) {
2258 t->cpu_setup(offset, t);
Michael Ellerman666435b2009-02-22 16:25:43 +00002259 }
2260#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
Scott Wood26ee9762011-07-25 11:04:36 +00002261
2262 return t;
Michael Ellerman666435b2009-02-22 16:25:43 +00002263}
2264
Paul Mackerras87a72f92007-10-04 14:18:01 +10002265struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002266{
2267 struct cpu_spec *s = cpu_specs;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002268 int i;
2269
2270 s = PTRRELOC(s);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002271
Michael Ellerman666435b2009-02-22 16:25:43 +00002272 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) {
Scott Wood26ee9762011-07-25 11:04:36 +00002273 if ((pvr & s->pvr_mask) == s->pvr_value)
2274 return setup_cpu_spec(offset, s);
Michael Ellerman666435b2009-02-22 16:25:43 +00002275 }
2276
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002277 BUG();
Michael Ellerman666435b2009-02-22 16:25:43 +00002278
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002279 return NULL;
2280}
Kevin Hao4db73272016-07-23 14:42:41 +05302281
Nicholas Piggin5a61ef72017-05-09 13:16:52 +10002282/*
2283 * Used by cpufeatures to get the name for CPUs with a PVR table.
2284 * If they don't hae a PVR table, cpufeatures gets the name from
2285 * cpu device-tree node.
2286 */
2287void __init identify_cpu_name(unsigned int pvr)
2288{
2289 struct cpu_spec *s = cpu_specs;
2290 struct cpu_spec *t = &the_cpu_spec;
2291 int i;
2292
2293 s = PTRRELOC(s);
2294 t = PTRRELOC(t);
2295
2296 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) {
2297 if ((pvr & s->pvr_mask) == s->pvr_value) {
2298 t->cpu_name = s->cpu_name;
2299 return;
2300 }
2301 }
2302}
2303
2304
Kevin Hao4db73272016-07-23 14:42:41 +05302305#ifdef CONFIG_JUMP_LABEL_FEATURE_CHECKS
2306struct static_key_true cpu_feature_keys[NUM_CPU_FTR_KEYS] = {
2307 [0 ... NUM_CPU_FTR_KEYS - 1] = STATIC_KEY_TRUE_INIT
2308};
2309EXPORT_SYMBOL_GPL(cpu_feature_keys);
2310
2311void __init cpu_feature_keys_init(void)
2312{
2313 int i;
2314
2315 for (i = 0; i < NUM_CPU_FTR_KEYS; i++) {
2316 unsigned long f = 1ul << i;
2317
2318 if (!(cur_cpu_spec->cpu_features & f))
2319 static_branch_disable(&cpu_feature_keys[i]);
2320 }
2321}
Kevin Haoc12e6f22016-07-23 14:42:42 +05302322
2323struct static_key_true mmu_feature_keys[NUM_MMU_FTR_KEYS] = {
2324 [0 ... NUM_MMU_FTR_KEYS - 1] = STATIC_KEY_TRUE_INIT
2325};
2326EXPORT_SYMBOL_GPL(mmu_feature_keys);
2327
2328void __init mmu_feature_keys_init(void)
2329{
2330 int i;
2331
2332 for (i = 0; i < NUM_MMU_FTR_KEYS; i++) {
2333 unsigned long f = 1ul << i;
2334
2335 if (!(cur_cpu_spec->mmu_features & f))
2336 static_branch_disable(&mmu_feature_keys[i]);
2337 }
2338}
Kevin Hao4db73272016-07-23 14:42:41 +05302339#endif