Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | * Copyright (C) 2001 Ben. Herrenschmidt (benh@kernel.crashing.org) |
| 3 | * |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 4 | * Modifications for ppc64: |
| 5 | * Copyright (C) 2003 Dave Engebretsen <engebret@us.ibm.com> |
| 6 | * |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 7 | * 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 Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 13 | #include <linux/string.h> |
| 14 | #include <linux/sched.h> |
| 15 | #include <linux/threads.h> |
| 16 | #include <linux/init.h> |
Kumar Gala | 400d221 | 2005-09-27 15:13:12 -0500 | [diff] [blame] | 17 | #include <linux/module.h> |
| 18 | |
| 19 | #include <asm/oprofile_impl.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 20 | #include <asm/cputable.h> |
Benjamin Herrenschmidt | 42c4aaa | 2006-10-24 16:42:40 +1000 | [diff] [blame] | 21 | #include <asm/prom.h> /* for PTRRELOC on ARCH=ppc */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 22 | |
Kumar Gala | 400d221 | 2005-09-27 15:13:12 -0500 | [diff] [blame] | 23 | struct cpu_spec* cur_cpu_spec = NULL; |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 24 | EXPORT_SYMBOL(cur_cpu_spec); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 25 | |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 26 | /* NOTE: |
| 27 | * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's |
| 28 | * the responsibility of the appropriate CPU save/restore functions to |
| 29 | * eventually copy these settings over. Those save/restore aren't yet |
| 30 | * part of the cputable though. That has to be fixed for both ppc32 |
| 31 | * and ppc64 |
| 32 | */ |
Geoff Levand | b26f100 | 2006-05-19 14:24:18 +1000 | [diff] [blame] | 33 | #ifdef CONFIG_PPC32 |
Valentine Barshak | 8112753 | 2007-09-22 00:46:57 +1000 | [diff] [blame] | 34 | extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec); |
| 35 | extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec); |
Valentine Barshak | 340ffd2 | 2007-09-22 00:50:09 +1000 | [diff] [blame^] | 36 | extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec); |
Kumar Gala | 400d221 | 2005-09-27 15:13:12 -0500 | [diff] [blame] | 37 | extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec); |
| 38 | extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec); |
| 39 | extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec); |
| 40 | extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec); |
| 41 | extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec); |
| 42 | extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec); |
| 43 | extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec); |
| 44 | extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec); |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 45 | #endif /* CONFIG_PPC32 */ |
Olof Johansson | f39b7a5 | 2006-08-11 00:07:08 -0500 | [diff] [blame] | 46 | #ifdef CONFIG_PPC64 |
Kumar Gala | 400d221 | 2005-09-27 15:13:12 -0500 | [diff] [blame] | 47 | extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec); |
Olof Johansson | 5b43d20 | 2006-10-04 23:41:41 -0500 | [diff] [blame] | 48 | extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec); |
Olof Johansson | 1199919 | 2007-02-04 16:36:51 -0600 | [diff] [blame] | 49 | extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec); |
Stephen Rothwell | 40d244d | 2007-02-12 22:10:48 +1100 | [diff] [blame] | 50 | extern void __restore_cpu_pa6t(void); |
Olof Johansson | f39b7a5 | 2006-08-11 00:07:08 -0500 | [diff] [blame] | 51 | extern void __restore_cpu_ppc970(void); |
| 52 | #endif /* CONFIG_PPC64 */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 53 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 54 | /* This table only contains "desktop" CPUs, it need to be filled with embedded |
| 55 | * ones as well... |
| 56 | */ |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 57 | #define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \ |
| 58 | PPC_FEATURE_HAS_MMU) |
| 59 | #define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64) |
Paul Mackerras | a7ddc5e | 2005-11-10 14:29:18 +1100 | [diff] [blame] | 60 | #define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4) |
Benjamin Herrenschmidt | aa5cb02 | 2006-03-01 15:07:07 +1100 | [diff] [blame] | 61 | #define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\ |
| 62 | PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP) |
| 63 | #define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\ |
| 64 | PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP) |
Anton Blanchard | 03054d5 | 2006-04-29 09:51:06 +1000 | [diff] [blame] | 65 | #define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\ |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 66 | PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \ |
| 67 | PPC_FEATURE_TRUE_LE) |
Olof Johansson | b3ebd1d | 2006-09-06 14:35:57 -0500 | [diff] [blame] | 68 | #define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\ |
| 69 | PPC_FEATURE_TRUE_LE | \ |
| 70 | PPC_FEATURE_HAS_ALTIVEC_COMP) |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 71 | #define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \ |
| 72 | PPC_FEATURE_BOOKE) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 73 | |
Benjamin Herrenschmidt | 42c4aaa | 2006-10-24 16:42:40 +1000 | [diff] [blame] | 74 | static struct cpu_spec cpu_specs[] = { |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 75 | #ifdef CONFIG_PPC64 |
| 76 | { /* Power3 */ |
| 77 | .pvr_mask = 0xffff0000, |
| 78 | .pvr_value = 0x00400000, |
| 79 | .cpu_name = "POWER3 (630)", |
| 80 | .cpu_features = CPU_FTRS_POWER3, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 81 | .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 82 | .icache_bsize = 128, |
| 83 | .dcache_bsize = 128, |
| 84 | .num_pmcs = 8, |
Olof Johansson | 1bd2e5a | 2007-01-28 21:23:54 -0600 | [diff] [blame] | 85 | .pmc_type = PPC_PMC_IBM, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 86 | .oprofile_cpu_type = "ppc64/power3", |
Andy Whitcroft | 7a45fb1 | 2006-01-13 12:35:49 +0000 | [diff] [blame] | 87 | .oprofile_type = PPC_OPROFILE_RS64, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 88 | .platform = "power3", |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 89 | }, |
| 90 | { /* Power3+ */ |
| 91 | .pvr_mask = 0xffff0000, |
| 92 | .pvr_value = 0x00410000, |
| 93 | .cpu_name = "POWER3 (630+)", |
| 94 | .cpu_features = CPU_FTRS_POWER3, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 95 | .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 96 | .icache_bsize = 128, |
| 97 | .dcache_bsize = 128, |
| 98 | .num_pmcs = 8, |
Olof Johansson | 1bd2e5a | 2007-01-28 21:23:54 -0600 | [diff] [blame] | 99 | .pmc_type = PPC_PMC_IBM, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 100 | .oprofile_cpu_type = "ppc64/power3", |
Andy Whitcroft | 7a45fb1 | 2006-01-13 12:35:49 +0000 | [diff] [blame] | 101 | .oprofile_type = PPC_OPROFILE_RS64, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 102 | .platform = "power3", |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 103 | }, |
| 104 | { /* Northstar */ |
| 105 | .pvr_mask = 0xffff0000, |
| 106 | .pvr_value = 0x00330000, |
| 107 | .cpu_name = "RS64-II (northstar)", |
| 108 | .cpu_features = CPU_FTRS_RS64, |
| 109 | .cpu_user_features = COMMON_USER_PPC64, |
| 110 | .icache_bsize = 128, |
| 111 | .dcache_bsize = 128, |
| 112 | .num_pmcs = 8, |
Olof Johansson | 1bd2e5a | 2007-01-28 21:23:54 -0600 | [diff] [blame] | 113 | .pmc_type = PPC_PMC_IBM, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 114 | .oprofile_cpu_type = "ppc64/rs64", |
Andy Whitcroft | 7a45fb1 | 2006-01-13 12:35:49 +0000 | [diff] [blame] | 115 | .oprofile_type = PPC_OPROFILE_RS64, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 116 | .platform = "rs64", |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 117 | }, |
| 118 | { /* Pulsar */ |
| 119 | .pvr_mask = 0xffff0000, |
| 120 | .pvr_value = 0x00340000, |
| 121 | .cpu_name = "RS64-III (pulsar)", |
| 122 | .cpu_features = CPU_FTRS_RS64, |
| 123 | .cpu_user_features = COMMON_USER_PPC64, |
| 124 | .icache_bsize = 128, |
| 125 | .dcache_bsize = 128, |
| 126 | .num_pmcs = 8, |
Olof Johansson | 1bd2e5a | 2007-01-28 21:23:54 -0600 | [diff] [blame] | 127 | .pmc_type = PPC_PMC_IBM, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 128 | .oprofile_cpu_type = "ppc64/rs64", |
Andy Whitcroft | 7a45fb1 | 2006-01-13 12:35:49 +0000 | [diff] [blame] | 129 | .oprofile_type = PPC_OPROFILE_RS64, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 130 | .platform = "rs64", |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 131 | }, |
| 132 | { /* I-star */ |
| 133 | .pvr_mask = 0xffff0000, |
| 134 | .pvr_value = 0x00360000, |
| 135 | .cpu_name = "RS64-III (icestar)", |
| 136 | .cpu_features = CPU_FTRS_RS64, |
| 137 | .cpu_user_features = COMMON_USER_PPC64, |
| 138 | .icache_bsize = 128, |
| 139 | .dcache_bsize = 128, |
| 140 | .num_pmcs = 8, |
Olof Johansson | 1bd2e5a | 2007-01-28 21:23:54 -0600 | [diff] [blame] | 141 | .pmc_type = PPC_PMC_IBM, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 142 | .oprofile_cpu_type = "ppc64/rs64", |
Andy Whitcroft | 7a45fb1 | 2006-01-13 12:35:49 +0000 | [diff] [blame] | 143 | .oprofile_type = PPC_OPROFILE_RS64, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 144 | .platform = "rs64", |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 145 | }, |
| 146 | { /* S-star */ |
| 147 | .pvr_mask = 0xffff0000, |
| 148 | .pvr_value = 0x00370000, |
| 149 | .cpu_name = "RS64-IV (sstar)", |
| 150 | .cpu_features = CPU_FTRS_RS64, |
| 151 | .cpu_user_features = COMMON_USER_PPC64, |
| 152 | .icache_bsize = 128, |
| 153 | .dcache_bsize = 128, |
| 154 | .num_pmcs = 8, |
Olof Johansson | 1bd2e5a | 2007-01-28 21:23:54 -0600 | [diff] [blame] | 155 | .pmc_type = PPC_PMC_IBM, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 156 | .oprofile_cpu_type = "ppc64/rs64", |
Andy Whitcroft | 7a45fb1 | 2006-01-13 12:35:49 +0000 | [diff] [blame] | 157 | .oprofile_type = PPC_OPROFILE_RS64, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 158 | .platform = "rs64", |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 159 | }, |
| 160 | { /* Power4 */ |
| 161 | .pvr_mask = 0xffff0000, |
| 162 | .pvr_value = 0x00350000, |
| 163 | .cpu_name = "POWER4 (gp)", |
| 164 | .cpu_features = CPU_FTRS_POWER4, |
Paul Mackerras | a7ddc5e | 2005-11-10 14:29:18 +1100 | [diff] [blame] | 165 | .cpu_user_features = COMMON_USER_POWER4, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 166 | .icache_bsize = 128, |
| 167 | .dcache_bsize = 128, |
| 168 | .num_pmcs = 8, |
Olof Johansson | 1bd2e5a | 2007-01-28 21:23:54 -0600 | [diff] [blame] | 169 | .pmc_type = PPC_PMC_IBM, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 170 | .oprofile_cpu_type = "ppc64/power4", |
Andy Whitcroft | 7a45fb1 | 2006-01-13 12:35:49 +0000 | [diff] [blame] | 171 | .oprofile_type = PPC_OPROFILE_POWER4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 172 | .platform = "power4", |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 173 | }, |
| 174 | { /* Power4+ */ |
| 175 | .pvr_mask = 0xffff0000, |
| 176 | .pvr_value = 0x00380000, |
| 177 | .cpu_name = "POWER4+ (gq)", |
| 178 | .cpu_features = CPU_FTRS_POWER4, |
Paul Mackerras | a7ddc5e | 2005-11-10 14:29:18 +1100 | [diff] [blame] | 179 | .cpu_user_features = COMMON_USER_POWER4, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 180 | .icache_bsize = 128, |
| 181 | .dcache_bsize = 128, |
| 182 | .num_pmcs = 8, |
Olof Johansson | 1bd2e5a | 2007-01-28 21:23:54 -0600 | [diff] [blame] | 183 | .pmc_type = PPC_PMC_IBM, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 184 | .oprofile_cpu_type = "ppc64/power4", |
Andy Whitcroft | 7a45fb1 | 2006-01-13 12:35:49 +0000 | [diff] [blame] | 185 | .oprofile_type = PPC_OPROFILE_POWER4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 186 | .platform = "power4", |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 187 | }, |
| 188 | { /* PPC970 */ |
| 189 | .pvr_mask = 0xffff0000, |
| 190 | .pvr_value = 0x00390000, |
| 191 | .cpu_name = "PPC970", |
| 192 | .cpu_features = CPU_FTRS_PPC970, |
Paul Mackerras | a7ddc5e | 2005-11-10 14:29:18 +1100 | [diff] [blame] | 193 | .cpu_user_features = COMMON_USER_POWER4 | |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 194 | PPC_FEATURE_HAS_ALTIVEC_COMP, |
| 195 | .icache_bsize = 128, |
| 196 | .dcache_bsize = 128, |
| 197 | .num_pmcs = 8, |
Olof Johansson | 1bd2e5a | 2007-01-28 21:23:54 -0600 | [diff] [blame] | 198 | .pmc_type = PPC_PMC_IBM, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 199 | .cpu_setup = __setup_cpu_ppc970, |
Olof Johansson | f39b7a5 | 2006-08-11 00:07:08 -0500 | [diff] [blame] | 200 | .cpu_restore = __restore_cpu_ppc970, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 201 | .oprofile_cpu_type = "ppc64/970", |
Andy Whitcroft | 7a45fb1 | 2006-01-13 12:35:49 +0000 | [diff] [blame] | 202 | .oprofile_type = PPC_OPROFILE_POWER4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 203 | .platform = "ppc970", |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 204 | }, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 205 | { /* PPC970FX */ |
| 206 | .pvr_mask = 0xffff0000, |
| 207 | .pvr_value = 0x003c0000, |
| 208 | .cpu_name = "PPC970FX", |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 209 | .cpu_features = CPU_FTRS_PPC970, |
Paul Mackerras | a7ddc5e | 2005-11-10 14:29:18 +1100 | [diff] [blame] | 210 | .cpu_user_features = COMMON_USER_POWER4 | |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 211 | PPC_FEATURE_HAS_ALTIVEC_COMP, |
| 212 | .icache_bsize = 128, |
| 213 | .dcache_bsize = 128, |
| 214 | .num_pmcs = 8, |
Olof Johansson | 1bd2e5a | 2007-01-28 21:23:54 -0600 | [diff] [blame] | 215 | .pmc_type = PPC_PMC_IBM, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 216 | .cpu_setup = __setup_cpu_ppc970, |
Olof Johansson | f39b7a5 | 2006-08-11 00:07:08 -0500 | [diff] [blame] | 217 | .cpu_restore = __restore_cpu_ppc970, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 218 | .oprofile_cpu_type = "ppc64/970", |
Andy Whitcroft | 7a45fb1 | 2006-01-13 12:35:49 +0000 | [diff] [blame] | 219 | .oprofile_type = PPC_OPROFILE_POWER4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 220 | .platform = "ppc970", |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 221 | }, |
Olof Johansson | 3546e81 | 2007-02-26 00:35:14 -0600 | [diff] [blame] | 222 | { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */ |
| 223 | .pvr_mask = 0xffffffff, |
| 224 | .pvr_value = 0x00440100, |
| 225 | .cpu_name = "PPC970MP", |
| 226 | .cpu_features = CPU_FTRS_PPC970, |
| 227 | .cpu_user_features = COMMON_USER_POWER4 | |
| 228 | PPC_FEATURE_HAS_ALTIVEC_COMP, |
| 229 | .icache_bsize = 128, |
| 230 | .dcache_bsize = 128, |
| 231 | .num_pmcs = 8, |
Anton Blanchard | 2fae498 | 2007-05-19 15:22:41 +1000 | [diff] [blame] | 232 | .pmc_type = PPC_PMC_IBM, |
Olof Johansson | 3546e81 | 2007-02-26 00:35:14 -0600 | [diff] [blame] | 233 | .cpu_setup = __setup_cpu_ppc970, |
| 234 | .cpu_restore = __restore_cpu_ppc970, |
| 235 | .oprofile_cpu_type = "ppc64/970MP", |
| 236 | .oprofile_type = PPC_OPROFILE_POWER4, |
| 237 | .platform = "ppc970", |
| 238 | }, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 239 | { /* PPC970MP */ |
| 240 | .pvr_mask = 0xffff0000, |
| 241 | .pvr_value = 0x00440000, |
| 242 | .cpu_name = "PPC970MP", |
| 243 | .cpu_features = CPU_FTRS_PPC970, |
Paul Mackerras | a7ddc5e | 2005-11-10 14:29:18 +1100 | [diff] [blame] | 244 | .cpu_user_features = COMMON_USER_POWER4 | |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 245 | PPC_FEATURE_HAS_ALTIVEC_COMP, |
| 246 | .icache_bsize = 128, |
| 247 | .dcache_bsize = 128, |
Anton Blanchard | 87af41b | 2006-05-05 05:44:26 +1000 | [diff] [blame] | 248 | .num_pmcs = 8, |
Anton Blanchard | 2fae498 | 2007-05-19 15:22:41 +1000 | [diff] [blame] | 249 | .pmc_type = PPC_PMC_IBM, |
Olof Johansson | 5b43d20 | 2006-10-04 23:41:41 -0500 | [diff] [blame] | 250 | .cpu_setup = __setup_cpu_ppc970MP, |
Olof Johansson | f39b7a5 | 2006-08-11 00:07:08 -0500 | [diff] [blame] | 251 | .cpu_restore = __restore_cpu_ppc970, |
Mike Wolf | fecb352 | 2006-11-21 14:41:54 -0600 | [diff] [blame] | 252 | .oprofile_cpu_type = "ppc64/970MP", |
Andy Whitcroft | 7a45fb1 | 2006-01-13 12:35:49 +0000 | [diff] [blame] | 253 | .oprofile_type = PPC_OPROFILE_POWER4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 254 | .platform = "ppc970", |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 255 | }, |
Jake Moilanen | 362ff7b | 2006-10-18 10:47:22 -0500 | [diff] [blame] | 256 | { /* PPC970GX */ |
| 257 | .pvr_mask = 0xffff0000, |
| 258 | .pvr_value = 0x00450000, |
| 259 | .cpu_name = "PPC970GX", |
| 260 | .cpu_features = CPU_FTRS_PPC970, |
| 261 | .cpu_user_features = COMMON_USER_POWER4 | |
| 262 | PPC_FEATURE_HAS_ALTIVEC_COMP, |
| 263 | .icache_bsize = 128, |
| 264 | .dcache_bsize = 128, |
| 265 | .num_pmcs = 8, |
Olof Johansson | 1bd2e5a | 2007-01-28 21:23:54 -0600 | [diff] [blame] | 266 | .pmc_type = PPC_PMC_IBM, |
Jake Moilanen | 362ff7b | 2006-10-18 10:47:22 -0500 | [diff] [blame] | 267 | .cpu_setup = __setup_cpu_ppc970, |
| 268 | .oprofile_cpu_type = "ppc64/970", |
| 269 | .oprofile_type = PPC_OPROFILE_POWER4, |
| 270 | .platform = "ppc970", |
| 271 | }, |
Benjamin Herrenschmidt | 3c726f8 | 2005-11-07 11:06:55 +1100 | [diff] [blame] | 272 | { /* Power5 GR */ |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 273 | .pvr_mask = 0xffff0000, |
| 274 | .pvr_value = 0x003a0000, |
| 275 | .cpu_name = "POWER5 (gr)", |
| 276 | .cpu_features = CPU_FTRS_POWER5, |
Paul Mackerras | a7ddc5e | 2005-11-10 14:29:18 +1100 | [diff] [blame] | 277 | .cpu_user_features = COMMON_USER_POWER5, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 278 | .icache_bsize = 128, |
| 279 | .dcache_bsize = 128, |
| 280 | .num_pmcs = 6, |
Olof Johansson | 1bd2e5a | 2007-01-28 21:23:54 -0600 | [diff] [blame] | 281 | .pmc_type = PPC_PMC_IBM, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 282 | .oprofile_cpu_type = "ppc64/power5", |
Andy Whitcroft | 7a45fb1 | 2006-01-13 12:35:49 +0000 | [diff] [blame] | 283 | .oprofile_type = PPC_OPROFILE_POWER4, |
Michael Neuling | e78dbc8 | 2006-06-08 14:42:34 +1000 | [diff] [blame] | 284 | /* SIHV / SIPR bits are implemented on POWER4+ (GQ) |
| 285 | * and above but only works on POWER5 and above |
| 286 | */ |
| 287 | .oprofile_mmcra_sihv = MMCRA_SIHV, |
| 288 | .oprofile_mmcra_sipr = MMCRA_SIPR, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 289 | .platform = "power5", |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 290 | }, |
Mike Wolf | 31a12ce | 2007-07-10 13:13:47 -0500 | [diff] [blame] | 291 | { /* Power5++ */ |
| 292 | .pvr_mask = 0xffffff00, |
| 293 | .pvr_value = 0x003b0300, |
| 294 | .cpu_name = "POWER5+ (gs)", |
| 295 | .cpu_features = CPU_FTRS_POWER5, |
| 296 | .cpu_user_features = COMMON_USER_POWER5_PLUS, |
| 297 | .icache_bsize = 128, |
| 298 | .dcache_bsize = 128, |
| 299 | .num_pmcs = 6, |
| 300 | .oprofile_cpu_type = "ppc64/power5++", |
| 301 | .oprofile_type = PPC_OPROFILE_POWER4, |
| 302 | .oprofile_mmcra_sihv = MMCRA_SIHV, |
| 303 | .oprofile_mmcra_sipr = MMCRA_SIPR, |
| 304 | .platform = "power5+", |
| 305 | }, |
Benjamin Herrenschmidt | 3c726f8 | 2005-11-07 11:06:55 +1100 | [diff] [blame] | 306 | { /* Power5 GS */ |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 307 | .pvr_mask = 0xffff0000, |
| 308 | .pvr_value = 0x003b0000, |
Anton Blanchard | 834608f | 2006-01-09 15:42:30 +1100 | [diff] [blame] | 309 | .cpu_name = "POWER5+ (gs)", |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 310 | .cpu_features = CPU_FTRS_POWER5, |
Paul Mackerras | a7ddc5e | 2005-11-10 14:29:18 +1100 | [diff] [blame] | 311 | .cpu_user_features = COMMON_USER_POWER5_PLUS, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 312 | .icache_bsize = 128, |
| 313 | .dcache_bsize = 128, |
| 314 | .num_pmcs = 6, |
Olof Johansson | 1bd2e5a | 2007-01-28 21:23:54 -0600 | [diff] [blame] | 315 | .pmc_type = PPC_PMC_IBM, |
Anton Blanchard | 834608f | 2006-01-09 15:42:30 +1100 | [diff] [blame] | 316 | .oprofile_cpu_type = "ppc64/power5+", |
Andy Whitcroft | 7a45fb1 | 2006-01-13 12:35:49 +0000 | [diff] [blame] | 317 | .oprofile_type = PPC_OPROFILE_POWER4, |
Michael Neuling | e78dbc8 | 2006-06-08 14:42:34 +1000 | [diff] [blame] | 318 | .oprofile_mmcra_sihv = MMCRA_SIHV, |
| 319 | .oprofile_mmcra_sipr = MMCRA_SIPR, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 320 | .platform = "power5+", |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 321 | }, |
Paul Mackerras | 974a76f | 2006-11-10 20:38:53 +1100 | [diff] [blame] | 322 | { /* POWER6 in P5+ mode; 2.04-compliant processor */ |
| 323 | .pvr_mask = 0xffffffff, |
| 324 | .pvr_value = 0x0f000001, |
| 325 | .cpu_name = "POWER5+", |
| 326 | .cpu_features = CPU_FTRS_POWER5, |
| 327 | .cpu_user_features = COMMON_USER_POWER5_PLUS, |
| 328 | .icache_bsize = 128, |
| 329 | .dcache_bsize = 128, |
| 330 | .num_pmcs = 6, |
Anton Blanchard | 2fae498 | 2007-05-19 15:22:41 +1000 | [diff] [blame] | 331 | .pmc_type = PPC_PMC_IBM, |
Paul Mackerras | 974a76f | 2006-11-10 20:38:53 +1100 | [diff] [blame] | 332 | .oprofile_cpu_type = "ppc64/power6", |
| 333 | .oprofile_type = PPC_OPROFILE_POWER4, |
| 334 | .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV, |
| 335 | .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR, |
| 336 | .oprofile_mmcra_clear = POWER6_MMCRA_THRM | |
| 337 | POWER6_MMCRA_OTHER, |
| 338 | .platform = "power5+", |
| 339 | }, |
Anton Blanchard | 03054d5 | 2006-04-29 09:51:06 +1000 | [diff] [blame] | 340 | { /* Power6 */ |
| 341 | .pvr_mask = 0xffff0000, |
| 342 | .pvr_value = 0x003e0000, |
Paul Mackerras | 974a76f | 2006-11-10 20:38:53 +1100 | [diff] [blame] | 343 | .cpu_name = "POWER6 (raw)", |
| 344 | .cpu_features = CPU_FTRS_POWER6, |
| 345 | .cpu_user_features = COMMON_USER_POWER6 | |
| 346 | PPC_FEATURE_POWER6_EXT, |
| 347 | .icache_bsize = 128, |
| 348 | .dcache_bsize = 128, |
| 349 | .num_pmcs = 6, |
Anton Blanchard | 2fae498 | 2007-05-19 15:22:41 +1000 | [diff] [blame] | 350 | .pmc_type = PPC_PMC_IBM, |
Paul Mackerras | 974a76f | 2006-11-10 20:38:53 +1100 | [diff] [blame] | 351 | .oprofile_cpu_type = "ppc64/power6", |
| 352 | .oprofile_type = PPC_OPROFILE_POWER4, |
| 353 | .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV, |
| 354 | .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR, |
| 355 | .oprofile_mmcra_clear = POWER6_MMCRA_THRM | |
| 356 | POWER6_MMCRA_OTHER, |
| 357 | .platform = "power6x", |
| 358 | }, |
| 359 | { /* 2.05-compliant processor, i.e. Power6 "architected" mode */ |
| 360 | .pvr_mask = 0xffffffff, |
| 361 | .pvr_value = 0x0f000002, |
| 362 | .cpu_name = "POWER6 (architected)", |
Anton Blanchard | 03054d5 | 2006-04-29 09:51:06 +1000 | [diff] [blame] | 363 | .cpu_features = CPU_FTRS_POWER6, |
| 364 | .cpu_user_features = COMMON_USER_POWER6, |
| 365 | .icache_bsize = 128, |
| 366 | .dcache_bsize = 128, |
Anton Blanchard | 99f4861 | 2006-10-13 12:13:12 +1000 | [diff] [blame] | 367 | .num_pmcs = 6, |
Olof Johansson | 1bd2e5a | 2007-01-28 21:23:54 -0600 | [diff] [blame] | 368 | .pmc_type = PPC_PMC_IBM, |
Anton Blanchard | 03054d5 | 2006-04-29 09:51:06 +1000 | [diff] [blame] | 369 | .oprofile_cpu_type = "ppc64/power6", |
| 370 | .oprofile_type = PPC_OPROFILE_POWER4, |
Michael Neuling | e78dbc8 | 2006-06-08 14:42:34 +1000 | [diff] [blame] | 371 | .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV, |
| 372 | .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR, |
| 373 | .oprofile_mmcra_clear = POWER6_MMCRA_THRM | |
| 374 | POWER6_MMCRA_OTHER, |
Anton Blanchard | 03054d5 | 2006-04-29 09:51:06 +1000 | [diff] [blame] | 375 | .platform = "power6", |
| 376 | }, |
Arnd Bergmann | c902be7 | 2006-01-04 19:55:53 +0000 | [diff] [blame] | 377 | { /* Cell Broadband Engine */ |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 378 | .pvr_mask = 0xffff0000, |
| 379 | .pvr_value = 0x00700000, |
| 380 | .cpu_name = "Cell Broadband Engine", |
| 381 | .cpu_features = CPU_FTRS_CELL, |
| 382 | .cpu_user_features = COMMON_USER_PPC64 | |
Benjamin Herrenschmidt | aa5cb02 | 2006-03-01 15:07:07 +1100 | [diff] [blame] | 383 | PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP | |
| 384 | PPC_FEATURE_SMT, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 385 | .icache_bsize = 128, |
| 386 | .dcache_bsize = 128, |
Maynard Johnson | 18f2190 | 2006-11-20 18:45:16 +0100 | [diff] [blame] | 387 | .num_pmcs = 4, |
Olof Johansson | 1bd2e5a | 2007-01-28 21:23:54 -0600 | [diff] [blame] | 388 | .pmc_type = PPC_PMC_IBM, |
Maynard Johnson | 18f2190 | 2006-11-20 18:45:16 +0100 | [diff] [blame] | 389 | .oprofile_cpu_type = "ppc64/cell-be", |
| 390 | .oprofile_type = PPC_OPROFILE_CELL, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 391 | .platform = "ppc-cell-be", |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 392 | }, |
Olof Johansson | b3ebd1d | 2006-09-06 14:35:57 -0500 | [diff] [blame] | 393 | { /* PA Semi PA6T */ |
| 394 | .pvr_mask = 0x7fff0000, |
| 395 | .pvr_value = 0x00900000, |
| 396 | .cpu_name = "PA6T", |
| 397 | .cpu_features = CPU_FTRS_PA6T, |
| 398 | .cpu_user_features = COMMON_USER_PA6T, |
| 399 | .icache_bsize = 64, |
| 400 | .dcache_bsize = 64, |
| 401 | .num_pmcs = 6, |
Olof Johansson | 1bd2e5a | 2007-01-28 21:23:54 -0600 | [diff] [blame] | 402 | .pmc_type = PPC_PMC_PA6T, |
Olof Johansson | 1199919 | 2007-02-04 16:36:51 -0600 | [diff] [blame] | 403 | .cpu_setup = __setup_cpu_pa6t, |
| 404 | .cpu_restore = __restore_cpu_pa6t, |
Olof Johansson | 25fc530 | 2007-04-18 16:38:21 +1000 | [diff] [blame] | 405 | .oprofile_cpu_type = "ppc64/pa6t", |
| 406 | .oprofile_type = PPC_OPROFILE_PA6T, |
Olof Johansson | b3ebd1d | 2006-09-06 14:35:57 -0500 | [diff] [blame] | 407 | .platform = "pa6t", |
| 408 | }, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 409 | { /* default match */ |
| 410 | .pvr_mask = 0x00000000, |
| 411 | .pvr_value = 0x00000000, |
| 412 | .cpu_name = "POWER4 (compatible)", |
| 413 | .cpu_features = CPU_FTRS_COMPATIBLE, |
| 414 | .cpu_user_features = COMMON_USER_PPC64, |
| 415 | .icache_bsize = 128, |
| 416 | .dcache_bsize = 128, |
| 417 | .num_pmcs = 6, |
Olof Johansson | 1bd2e5a | 2007-01-28 21:23:54 -0600 | [diff] [blame] | 418 | .pmc_type = PPC_PMC_IBM, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 419 | .platform = "power4", |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 420 | } |
| 421 | #endif /* CONFIG_PPC64 */ |
| 422 | #ifdef CONFIG_PPC32 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 423 | #if CLASSIC_PPC |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 424 | { /* 601 */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 425 | .pvr_mask = 0xffff0000, |
| 426 | .pvr_value = 0x00010000, |
| 427 | .cpu_name = "601", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 428 | .cpu_features = CPU_FTRS_PPC601, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 429 | .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR | |
Paul Mackerras | 9859901 | 2005-10-22 16:51:34 +1000 | [diff] [blame] | 430 | PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 431 | .icache_bsize = 32, |
| 432 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 433 | .platform = "ppc601", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 434 | }, |
| 435 | { /* 603 */ |
| 436 | .pvr_mask = 0xffff0000, |
| 437 | .pvr_value = 0x00030000, |
| 438 | .cpu_name = "603", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 439 | .cpu_features = CPU_FTRS_603, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 440 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 441 | .icache_bsize = 32, |
| 442 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 443 | .cpu_setup = __setup_cpu_603, |
| 444 | .platform = "ppc603", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 445 | }, |
| 446 | { /* 603e */ |
| 447 | .pvr_mask = 0xffff0000, |
| 448 | .pvr_value = 0x00060000, |
| 449 | .cpu_name = "603e", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 450 | .cpu_features = CPU_FTRS_603, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 451 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 452 | .icache_bsize = 32, |
| 453 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 454 | .cpu_setup = __setup_cpu_603, |
| 455 | .platform = "ppc603", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 456 | }, |
| 457 | { /* 603ev */ |
| 458 | .pvr_mask = 0xffff0000, |
| 459 | .pvr_value = 0x00070000, |
| 460 | .cpu_name = "603ev", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 461 | .cpu_features = CPU_FTRS_603, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 462 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 463 | .icache_bsize = 32, |
| 464 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 465 | .cpu_setup = __setup_cpu_603, |
| 466 | .platform = "ppc603", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 467 | }, |
| 468 | { /* 604 */ |
| 469 | .pvr_mask = 0xffff0000, |
| 470 | .pvr_value = 0x00040000, |
| 471 | .cpu_name = "604", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 472 | .cpu_features = CPU_FTRS_604, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 473 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 474 | .icache_bsize = 32, |
| 475 | .dcache_bsize = 32, |
| 476 | .num_pmcs = 2, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 477 | .cpu_setup = __setup_cpu_604, |
| 478 | .platform = "ppc604", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 479 | }, |
| 480 | { /* 604e */ |
| 481 | .pvr_mask = 0xfffff000, |
| 482 | .pvr_value = 0x00090000, |
| 483 | .cpu_name = "604e", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 484 | .cpu_features = CPU_FTRS_604, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 485 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 486 | .icache_bsize = 32, |
| 487 | .dcache_bsize = 32, |
| 488 | .num_pmcs = 4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 489 | .cpu_setup = __setup_cpu_604, |
| 490 | .platform = "ppc604", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 491 | }, |
| 492 | { /* 604r */ |
| 493 | .pvr_mask = 0xffff0000, |
| 494 | .pvr_value = 0x00090000, |
| 495 | .cpu_name = "604r", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 496 | .cpu_features = CPU_FTRS_604, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 497 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 498 | .icache_bsize = 32, |
| 499 | .dcache_bsize = 32, |
| 500 | .num_pmcs = 4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 501 | .cpu_setup = __setup_cpu_604, |
| 502 | .platform = "ppc604", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 503 | }, |
| 504 | { /* 604ev */ |
| 505 | .pvr_mask = 0xffff0000, |
| 506 | .pvr_value = 0x000a0000, |
| 507 | .cpu_name = "604ev", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 508 | .cpu_features = CPU_FTRS_604, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 509 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 510 | .icache_bsize = 32, |
| 511 | .dcache_bsize = 32, |
| 512 | .num_pmcs = 4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 513 | .cpu_setup = __setup_cpu_604, |
| 514 | .platform = "ppc604", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 515 | }, |
| 516 | { /* 740/750 (0x4202, don't support TAU ?) */ |
| 517 | .pvr_mask = 0xffffffff, |
| 518 | .pvr_value = 0x00084202, |
| 519 | .cpu_name = "740/750", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 520 | .cpu_features = CPU_FTRS_740_NOTAU, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 521 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 522 | .icache_bsize = 32, |
| 523 | .dcache_bsize = 32, |
| 524 | .num_pmcs = 4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 525 | .cpu_setup = __setup_cpu_750, |
| 526 | .platform = "ppc750", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 527 | }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 528 | { /* 750CX (80100 and 8010x?) */ |
| 529 | .pvr_mask = 0xfffffff0, |
| 530 | .pvr_value = 0x00080100, |
| 531 | .cpu_name = "750CX", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 532 | .cpu_features = CPU_FTRS_750, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 533 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 534 | .icache_bsize = 32, |
| 535 | .dcache_bsize = 32, |
| 536 | .num_pmcs = 4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 537 | .cpu_setup = __setup_cpu_750cx, |
| 538 | .platform = "ppc750", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 539 | }, |
| 540 | { /* 750CX (82201 and 82202) */ |
| 541 | .pvr_mask = 0xfffffff0, |
| 542 | .pvr_value = 0x00082200, |
| 543 | .cpu_name = "750CX", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 544 | .cpu_features = CPU_FTRS_750, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 545 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 546 | .icache_bsize = 32, |
| 547 | .dcache_bsize = 32, |
| 548 | .num_pmcs = 4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 549 | .cpu_setup = __setup_cpu_750cx, |
| 550 | .platform = "ppc750", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 551 | }, |
| 552 | { /* 750CXe (82214) */ |
| 553 | .pvr_mask = 0xfffffff0, |
| 554 | .pvr_value = 0x00082210, |
| 555 | .cpu_name = "750CXe", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 556 | .cpu_features = CPU_FTRS_750, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 557 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 558 | .icache_bsize = 32, |
| 559 | .dcache_bsize = 32, |
| 560 | .num_pmcs = 4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 561 | .cpu_setup = __setup_cpu_750cx, |
| 562 | .platform = "ppc750", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 563 | }, |
Arthur Othieno | 7c31625 | 2005-09-03 15:55:52 -0700 | [diff] [blame] | 564 | { /* 750CXe "Gekko" (83214) */ |
| 565 | .pvr_mask = 0xffffffff, |
| 566 | .pvr_value = 0x00083214, |
| 567 | .cpu_name = "750CXe", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 568 | .cpu_features = CPU_FTRS_750, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 569 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
Arthur Othieno | 7c31625 | 2005-09-03 15:55:52 -0700 | [diff] [blame] | 570 | .icache_bsize = 32, |
| 571 | .dcache_bsize = 32, |
| 572 | .num_pmcs = 4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 573 | .cpu_setup = __setup_cpu_750cx, |
| 574 | .platform = "ppc750", |
Arthur Othieno | 7c31625 | 2005-09-03 15:55:52 -0700 | [diff] [blame] | 575 | }, |
Jake Moilanen | cfbff8a | 2006-10-03 14:29:34 -0500 | [diff] [blame] | 576 | { /* 750CL */ |
| 577 | .pvr_mask = 0xfffff0f0, |
| 578 | .pvr_value = 0x00087010, |
| 579 | .cpu_name = "750CL", |
Josh Boyer | a14c450 | 2007-04-13 04:33:25 +1000 | [diff] [blame] | 580 | .cpu_features = CPU_FTRS_750CL, |
Jake Moilanen | cfbff8a | 2006-10-03 14:29:34 -0500 | [diff] [blame] | 581 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
| 582 | .icache_bsize = 32, |
| 583 | .dcache_bsize = 32, |
| 584 | .num_pmcs = 4, |
Josh Boyer | a14c450 | 2007-04-13 04:33:25 +1000 | [diff] [blame] | 585 | .cpu_setup = __setup_cpu_750, |
Jake Moilanen | cfbff8a | 2006-10-03 14:29:34 -0500 | [diff] [blame] | 586 | .platform = "ppc750", |
| 587 | }, |
Arthur Othieno | ac1ff04 | 2005-09-03 15:55:51 -0700 | [diff] [blame] | 588 | { /* 745/755 */ |
| 589 | .pvr_mask = 0xfffff000, |
| 590 | .pvr_value = 0x00083000, |
| 591 | .cpu_name = "745/755", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 592 | .cpu_features = CPU_FTRS_750, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 593 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
Arthur Othieno | ac1ff04 | 2005-09-03 15:55:51 -0700 | [diff] [blame] | 594 | .icache_bsize = 32, |
| 595 | .dcache_bsize = 32, |
| 596 | .num_pmcs = 4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 597 | .cpu_setup = __setup_cpu_750, |
| 598 | .platform = "ppc750", |
Arthur Othieno | ac1ff04 | 2005-09-03 15:55:51 -0700 | [diff] [blame] | 599 | }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 600 | { /* 750FX rev 1.x */ |
| 601 | .pvr_mask = 0xffffff00, |
| 602 | .pvr_value = 0x70000100, |
| 603 | .cpu_name = "750FX", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 604 | .cpu_features = CPU_FTRS_750FX1, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 605 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 606 | .icache_bsize = 32, |
| 607 | .dcache_bsize = 32, |
| 608 | .num_pmcs = 4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 609 | .cpu_setup = __setup_cpu_750, |
| 610 | .platform = "ppc750", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 611 | }, |
| 612 | { /* 750FX rev 2.0 must disable HID0[DPM] */ |
| 613 | .pvr_mask = 0xffffffff, |
| 614 | .pvr_value = 0x70000200, |
| 615 | .cpu_name = "750FX", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 616 | .cpu_features = CPU_FTRS_750FX2, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 617 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 618 | .icache_bsize = 32, |
| 619 | .dcache_bsize = 32, |
| 620 | .num_pmcs = 4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 621 | .cpu_setup = __setup_cpu_750, |
| 622 | .platform = "ppc750", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 623 | }, |
| 624 | { /* 750FX (All revs except 2.0) */ |
| 625 | .pvr_mask = 0xffff0000, |
| 626 | .pvr_value = 0x70000000, |
| 627 | .cpu_name = "750FX", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 628 | .cpu_features = CPU_FTRS_750FX, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 629 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 630 | .icache_bsize = 32, |
| 631 | .dcache_bsize = 32, |
| 632 | .num_pmcs = 4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 633 | .cpu_setup = __setup_cpu_750fx, |
| 634 | .platform = "ppc750", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 635 | }, |
| 636 | { /* 750GX */ |
| 637 | .pvr_mask = 0xffff0000, |
| 638 | .pvr_value = 0x70020000, |
| 639 | .cpu_name = "750GX", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 640 | .cpu_features = CPU_FTRS_750GX, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 641 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 642 | .icache_bsize = 32, |
| 643 | .dcache_bsize = 32, |
| 644 | .num_pmcs = 4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 645 | .cpu_setup = __setup_cpu_750fx, |
| 646 | .platform = "ppc750", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 647 | }, |
| 648 | { /* 740/750 (L2CR bit need fixup for 740) */ |
| 649 | .pvr_mask = 0xffff0000, |
| 650 | .pvr_value = 0x00080000, |
| 651 | .cpu_name = "740/750", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 652 | .cpu_features = CPU_FTRS_740, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 653 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 654 | .icache_bsize = 32, |
| 655 | .dcache_bsize = 32, |
| 656 | .num_pmcs = 4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 657 | .cpu_setup = __setup_cpu_750, |
| 658 | .platform = "ppc750", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 659 | }, |
| 660 | { /* 7400 rev 1.1 ? (no TAU) */ |
| 661 | .pvr_mask = 0xffffffff, |
| 662 | .pvr_value = 0x000c1101, |
| 663 | .cpu_name = "7400 (1.1)", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 664 | .cpu_features = CPU_FTRS_7400_NOTAU, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 665 | .cpu_user_features = COMMON_USER | |
| 666 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 667 | .icache_bsize = 32, |
| 668 | .dcache_bsize = 32, |
| 669 | .num_pmcs = 4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 670 | .cpu_setup = __setup_cpu_7400, |
| 671 | .platform = "ppc7400", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 672 | }, |
| 673 | { /* 7400 */ |
| 674 | .pvr_mask = 0xffff0000, |
| 675 | .pvr_value = 0x000c0000, |
| 676 | .cpu_name = "7400", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 677 | .cpu_features = CPU_FTRS_7400, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 678 | .cpu_user_features = COMMON_USER | |
| 679 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 680 | .icache_bsize = 32, |
| 681 | .dcache_bsize = 32, |
| 682 | .num_pmcs = 4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 683 | .cpu_setup = __setup_cpu_7400, |
| 684 | .platform = "ppc7400", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 685 | }, |
| 686 | { /* 7410 */ |
| 687 | .pvr_mask = 0xffff0000, |
| 688 | .pvr_value = 0x800c0000, |
| 689 | .cpu_name = "7410", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 690 | .cpu_features = CPU_FTRS_7400, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 691 | .cpu_user_features = COMMON_USER | |
| 692 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 693 | .icache_bsize = 32, |
| 694 | .dcache_bsize = 32, |
| 695 | .num_pmcs = 4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 696 | .cpu_setup = __setup_cpu_7410, |
| 697 | .platform = "ppc7400", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 698 | }, |
| 699 | { /* 7450 2.0 - no doze/nap */ |
| 700 | .pvr_mask = 0xffffffff, |
| 701 | .pvr_value = 0x80000200, |
| 702 | .cpu_name = "7450", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 703 | .cpu_features = CPU_FTRS_7450_20, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 704 | .cpu_user_features = COMMON_USER | |
| 705 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 706 | .icache_bsize = 32, |
| 707 | .dcache_bsize = 32, |
| 708 | .num_pmcs = 6, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 709 | .cpu_setup = __setup_cpu_745x, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 710 | .oprofile_cpu_type = "ppc/7450", |
Andy Whitcroft | 7a45fb1 | 2006-01-13 12:35:49 +0000 | [diff] [blame] | 711 | .oprofile_type = PPC_OPROFILE_G4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 712 | .platform = "ppc7450", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 713 | }, |
| 714 | { /* 7450 2.1 */ |
| 715 | .pvr_mask = 0xffffffff, |
| 716 | .pvr_value = 0x80000201, |
| 717 | .cpu_name = "7450", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 718 | .cpu_features = CPU_FTRS_7450_21, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 719 | .cpu_user_features = COMMON_USER | |
| 720 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 721 | .icache_bsize = 32, |
| 722 | .dcache_bsize = 32, |
| 723 | .num_pmcs = 6, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 724 | .cpu_setup = __setup_cpu_745x, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 725 | .oprofile_cpu_type = "ppc/7450", |
Andy Whitcroft | 7a45fb1 | 2006-01-13 12:35:49 +0000 | [diff] [blame] | 726 | .oprofile_type = PPC_OPROFILE_G4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 727 | .platform = "ppc7450", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 728 | }, |
| 729 | { /* 7450 2.3 and newer */ |
| 730 | .pvr_mask = 0xffff0000, |
| 731 | .pvr_value = 0x80000000, |
| 732 | .cpu_name = "7450", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 733 | .cpu_features = CPU_FTRS_7450_23, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 734 | .cpu_user_features = COMMON_USER | |
| 735 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 736 | .icache_bsize = 32, |
| 737 | .dcache_bsize = 32, |
| 738 | .num_pmcs = 6, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 739 | .cpu_setup = __setup_cpu_745x, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 740 | .oprofile_cpu_type = "ppc/7450", |
Andy Whitcroft | 7a45fb1 | 2006-01-13 12:35:49 +0000 | [diff] [blame] | 741 | .oprofile_type = PPC_OPROFILE_G4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 742 | .platform = "ppc7450", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 743 | }, |
| 744 | { /* 7455 rev 1.x */ |
| 745 | .pvr_mask = 0xffffff00, |
| 746 | .pvr_value = 0x80010100, |
| 747 | .cpu_name = "7455", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 748 | .cpu_features = CPU_FTRS_7455_1, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 749 | .cpu_user_features = COMMON_USER | |
| 750 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 751 | .icache_bsize = 32, |
| 752 | .dcache_bsize = 32, |
| 753 | .num_pmcs = 6, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 754 | .cpu_setup = __setup_cpu_745x, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 755 | .oprofile_cpu_type = "ppc/7450", |
Andy Whitcroft | 7a45fb1 | 2006-01-13 12:35:49 +0000 | [diff] [blame] | 756 | .oprofile_type = PPC_OPROFILE_G4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 757 | .platform = "ppc7450", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 758 | }, |
| 759 | { /* 7455 rev 2.0 */ |
| 760 | .pvr_mask = 0xffffffff, |
| 761 | .pvr_value = 0x80010200, |
| 762 | .cpu_name = "7455", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 763 | .cpu_features = CPU_FTRS_7455_20, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 764 | .cpu_user_features = COMMON_USER | |
| 765 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 766 | .icache_bsize = 32, |
| 767 | .dcache_bsize = 32, |
| 768 | .num_pmcs = 6, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 769 | .cpu_setup = __setup_cpu_745x, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 770 | .oprofile_cpu_type = "ppc/7450", |
Andy Whitcroft | 7a45fb1 | 2006-01-13 12:35:49 +0000 | [diff] [blame] | 771 | .oprofile_type = PPC_OPROFILE_G4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 772 | .platform = "ppc7450", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 773 | }, |
| 774 | { /* 7455 others */ |
| 775 | .pvr_mask = 0xffff0000, |
| 776 | .pvr_value = 0x80010000, |
| 777 | .cpu_name = "7455", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 778 | .cpu_features = CPU_FTRS_7455, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 779 | .cpu_user_features = COMMON_USER | |
| 780 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 781 | .icache_bsize = 32, |
| 782 | .dcache_bsize = 32, |
| 783 | .num_pmcs = 6, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 784 | .cpu_setup = __setup_cpu_745x, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 785 | .oprofile_cpu_type = "ppc/7450", |
Andy Whitcroft | 7a45fb1 | 2006-01-13 12:35:49 +0000 | [diff] [blame] | 786 | .oprofile_type = PPC_OPROFILE_G4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 787 | .platform = "ppc7450", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 788 | }, |
| 789 | { /* 7447/7457 Rev 1.0 */ |
| 790 | .pvr_mask = 0xffffffff, |
| 791 | .pvr_value = 0x80020100, |
| 792 | .cpu_name = "7447/7457", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 793 | .cpu_features = CPU_FTRS_7447_10, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 794 | .cpu_user_features = COMMON_USER | |
| 795 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 796 | .icache_bsize = 32, |
| 797 | .dcache_bsize = 32, |
| 798 | .num_pmcs = 6, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 799 | .cpu_setup = __setup_cpu_745x, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 800 | .oprofile_cpu_type = "ppc/7450", |
Andy Whitcroft | 7a45fb1 | 2006-01-13 12:35:49 +0000 | [diff] [blame] | 801 | .oprofile_type = PPC_OPROFILE_G4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 802 | .platform = "ppc7450", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 803 | }, |
| 804 | { /* 7447/7457 Rev 1.1 */ |
| 805 | .pvr_mask = 0xffffffff, |
| 806 | .pvr_value = 0x80020101, |
| 807 | .cpu_name = "7447/7457", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 808 | .cpu_features = CPU_FTRS_7447_10, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 809 | .cpu_user_features = COMMON_USER | |
| 810 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 811 | .icache_bsize = 32, |
| 812 | .dcache_bsize = 32, |
| 813 | .num_pmcs = 6, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 814 | .cpu_setup = __setup_cpu_745x, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 815 | .oprofile_cpu_type = "ppc/7450", |
Andy Whitcroft | 7a45fb1 | 2006-01-13 12:35:49 +0000 | [diff] [blame] | 816 | .oprofile_type = PPC_OPROFILE_G4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 817 | .platform = "ppc7450", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 818 | }, |
| 819 | { /* 7447/7457 Rev 1.2 and later */ |
| 820 | .pvr_mask = 0xffff0000, |
| 821 | .pvr_value = 0x80020000, |
| 822 | .cpu_name = "7447/7457", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 823 | .cpu_features = CPU_FTRS_7447, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 824 | .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 825 | .icache_bsize = 32, |
| 826 | .dcache_bsize = 32, |
| 827 | .num_pmcs = 6, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 828 | .cpu_setup = __setup_cpu_745x, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 829 | .oprofile_cpu_type = "ppc/7450", |
Andy Whitcroft | 7a45fb1 | 2006-01-13 12:35:49 +0000 | [diff] [blame] | 830 | .oprofile_type = PPC_OPROFILE_G4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 831 | .platform = "ppc7450", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 832 | }, |
| 833 | { /* 7447A */ |
| 834 | .pvr_mask = 0xffff0000, |
| 835 | .pvr_value = 0x80030000, |
| 836 | .cpu_name = "7447A", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 837 | .cpu_features = CPU_FTRS_7447A, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 838 | .cpu_user_features = COMMON_USER | |
| 839 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 840 | .icache_bsize = 32, |
| 841 | .dcache_bsize = 32, |
| 842 | .num_pmcs = 6, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 843 | .cpu_setup = __setup_cpu_745x, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 844 | .oprofile_cpu_type = "ppc/7450", |
Andy Whitcroft | 7a45fb1 | 2006-01-13 12:35:49 +0000 | [diff] [blame] | 845 | .oprofile_type = PPC_OPROFILE_G4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 846 | .platform = "ppc7450", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 847 | }, |
Kumar Gala | bbde630 | 2005-09-03 15:55:55 -0700 | [diff] [blame] | 848 | { /* 7448 */ |
| 849 | .pvr_mask = 0xffff0000, |
| 850 | .pvr_value = 0x80040000, |
| 851 | .cpu_name = "7448", |
James.Yang | 3d37254 | 2007-05-02 16:34:43 -0500 | [diff] [blame] | 852 | .cpu_features = CPU_FTRS_7448, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 853 | .cpu_user_features = COMMON_USER | |
| 854 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, |
Kumar Gala | bbde630 | 2005-09-03 15:55:55 -0700 | [diff] [blame] | 855 | .icache_bsize = 32, |
| 856 | .dcache_bsize = 32, |
| 857 | .num_pmcs = 6, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 858 | .cpu_setup = __setup_cpu_745x, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 859 | .oprofile_cpu_type = "ppc/7450", |
Andy Whitcroft | 7a45fb1 | 2006-01-13 12:35:49 +0000 | [diff] [blame] | 860 | .oprofile_type = PPC_OPROFILE_G4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 861 | .platform = "ppc7450", |
Kumar Gala | bbde630 | 2005-09-03 15:55:55 -0700 | [diff] [blame] | 862 | }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 863 | { /* 82xx (8240, 8245, 8260 are all 603e cores) */ |
| 864 | .pvr_mask = 0x7fff0000, |
| 865 | .pvr_value = 0x00810000, |
| 866 | .cpu_name = "82xx", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 867 | .cpu_features = CPU_FTRS_82XX, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 868 | .cpu_user_features = COMMON_USER, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 869 | .icache_bsize = 32, |
| 870 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 871 | .cpu_setup = __setup_cpu_603, |
| 872 | .platform = "ppc603", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 873 | }, |
| 874 | { /* All G2_LE (603e core, plus some) have the same pvr */ |
| 875 | .pvr_mask = 0x7fff0000, |
| 876 | .pvr_value = 0x00820000, |
| 877 | .cpu_name = "G2_LE", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 878 | .cpu_features = CPU_FTRS_G2_LE, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 879 | .cpu_user_features = COMMON_USER, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 880 | .icache_bsize = 32, |
| 881 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 882 | .cpu_setup = __setup_cpu_603, |
| 883 | .platform = "ppc603", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 884 | }, |
Kim Phillips | 6c4a250 | 2006-10-02 20:10:24 -0500 | [diff] [blame] | 885 | { /* e300c1 (a 603e core, plus some) on 83xx */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 886 | .pvr_mask = 0x7fff0000, |
| 887 | .pvr_value = 0x00830000, |
Kim Phillips | 6c4a250 | 2006-10-02 20:10:24 -0500 | [diff] [blame] | 888 | .cpu_name = "e300c1", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 889 | .cpu_features = CPU_FTRS_E300, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 890 | .cpu_user_features = COMMON_USER, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 891 | .icache_bsize = 32, |
| 892 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 893 | .cpu_setup = __setup_cpu_603, |
| 894 | .platform = "ppc603", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 895 | }, |
Kim Phillips | 6c4a250 | 2006-10-02 20:10:24 -0500 | [diff] [blame] | 896 | { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */ |
| 897 | .pvr_mask = 0x7fff0000, |
| 898 | .pvr_value = 0x00840000, |
| 899 | .cpu_name = "e300c2", |
Kim Phillips | aa42c69 | 2006-12-08 02:43:30 -0600 | [diff] [blame] | 900 | .cpu_features = CPU_FTRS_E300C2, |
Kim Phillips | 6c4a250 | 2006-10-02 20:10:24 -0500 | [diff] [blame] | 901 | .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, |
| 902 | .icache_bsize = 32, |
| 903 | .dcache_bsize = 32, |
| 904 | .cpu_setup = __setup_cpu_603, |
| 905 | .platform = "ppc603", |
| 906 | }, |
Scott Wood | 57933f8 | 2006-12-01 12:57:05 -0600 | [diff] [blame] | 907 | { /* e300c3 on 83xx */ |
| 908 | .pvr_mask = 0x7fff0000, |
| 909 | .pvr_value = 0x00850000, |
| 910 | .cpu_name = "e300c3", |
| 911 | .cpu_features = CPU_FTRS_E300, |
| 912 | .cpu_user_features = COMMON_USER, |
| 913 | .icache_bsize = 32, |
| 914 | .dcache_bsize = 32, |
| 915 | .cpu_setup = __setup_cpu_603, |
| 916 | .platform = "ppc603", |
| 917 | }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 918 | { /* default match, we assume split I/D cache & TB (non-601)... */ |
| 919 | .pvr_mask = 0x00000000, |
| 920 | .pvr_value = 0x00000000, |
| 921 | .cpu_name = "(generic PPC)", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 922 | .cpu_features = CPU_FTRS_CLASSIC32, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 923 | .cpu_user_features = COMMON_USER, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 924 | .icache_bsize = 32, |
| 925 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 926 | .platform = "ppc603", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 927 | }, |
| 928 | #endif /* CLASSIC_PPC */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 929 | #ifdef CONFIG_8xx |
| 930 | { /* 8xx */ |
| 931 | .pvr_mask = 0xffff0000, |
| 932 | .pvr_value = 0x00500000, |
| 933 | .cpu_name = "8xx", |
| 934 | /* CPU_FTR_MAYBE_CAN_DOZE is possible, |
| 935 | * if the 8xx code is there.... */ |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 936 | .cpu_features = CPU_FTRS_8XX, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 937 | .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, |
| 938 | .icache_bsize = 16, |
| 939 | .dcache_bsize = 16, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 940 | .platform = "ppc823", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 941 | }, |
| 942 | #endif /* CONFIG_8xx */ |
| 943 | #ifdef CONFIG_40x |
| 944 | { /* 403GC */ |
| 945 | .pvr_mask = 0xffffff00, |
| 946 | .pvr_value = 0x00200200, |
| 947 | .cpu_name = "403GC", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 948 | .cpu_features = CPU_FTRS_40X, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 949 | .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, |
| 950 | .icache_bsize = 16, |
| 951 | .dcache_bsize = 16, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 952 | .platform = "ppc403", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 953 | }, |
| 954 | { /* 403GCX */ |
| 955 | .pvr_mask = 0xffffff00, |
| 956 | .pvr_value = 0x00201400, |
| 957 | .cpu_name = "403GCX", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 958 | .cpu_features = CPU_FTRS_40X, |
Paul Mackerras | 9859901 | 2005-10-22 16:51:34 +1000 | [diff] [blame] | 959 | .cpu_user_features = PPC_FEATURE_32 | |
| 960 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 961 | .icache_bsize = 16, |
| 962 | .dcache_bsize = 16, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 963 | .platform = "ppc403", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 964 | }, |
| 965 | { /* 403G ?? */ |
| 966 | .pvr_mask = 0xffff0000, |
| 967 | .pvr_value = 0x00200000, |
| 968 | .cpu_name = "403G ??", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 969 | .cpu_features = CPU_FTRS_40X, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 970 | .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, |
| 971 | .icache_bsize = 16, |
| 972 | .dcache_bsize = 16, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 973 | .platform = "ppc403", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 974 | }, |
| 975 | { /* 405GP */ |
| 976 | .pvr_mask = 0xffff0000, |
| 977 | .pvr_value = 0x40110000, |
| 978 | .cpu_name = "405GP", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 979 | .cpu_features = CPU_FTRS_40X, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 980 | .cpu_user_features = PPC_FEATURE_32 | |
| 981 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, |
| 982 | .icache_bsize = 32, |
| 983 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 984 | .platform = "ppc405", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 985 | }, |
| 986 | { /* STB 03xxx */ |
| 987 | .pvr_mask = 0xffff0000, |
| 988 | .pvr_value = 0x40130000, |
| 989 | .cpu_name = "STB03xxx", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 990 | .cpu_features = CPU_FTRS_40X, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 991 | .cpu_user_features = PPC_FEATURE_32 | |
| 992 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, |
| 993 | .icache_bsize = 32, |
| 994 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 995 | .platform = "ppc405", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 996 | }, |
| 997 | { /* STB 04xxx */ |
| 998 | .pvr_mask = 0xffff0000, |
| 999 | .pvr_value = 0x41810000, |
| 1000 | .cpu_name = "STB04xxx", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 1001 | .cpu_features = CPU_FTRS_40X, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1002 | .cpu_user_features = PPC_FEATURE_32 | |
| 1003 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, |
| 1004 | .icache_bsize = 32, |
| 1005 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1006 | .platform = "ppc405", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1007 | }, |
| 1008 | { /* NP405L */ |
| 1009 | .pvr_mask = 0xffff0000, |
| 1010 | .pvr_value = 0x41610000, |
| 1011 | .cpu_name = "NP405L", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 1012 | .cpu_features = CPU_FTRS_40X, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1013 | .cpu_user_features = PPC_FEATURE_32 | |
| 1014 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, |
| 1015 | .icache_bsize = 32, |
| 1016 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1017 | .platform = "ppc405", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1018 | }, |
| 1019 | { /* NP4GS3 */ |
| 1020 | .pvr_mask = 0xffff0000, |
| 1021 | .pvr_value = 0x40B10000, |
| 1022 | .cpu_name = "NP4GS3", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 1023 | .cpu_features = CPU_FTRS_40X, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1024 | .cpu_user_features = PPC_FEATURE_32 | |
| 1025 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, |
| 1026 | .icache_bsize = 32, |
| 1027 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1028 | .platform = "ppc405", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1029 | }, |
| 1030 | { /* NP405H */ |
| 1031 | .pvr_mask = 0xffff0000, |
| 1032 | .pvr_value = 0x41410000, |
| 1033 | .cpu_name = "NP405H", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 1034 | .cpu_features = CPU_FTRS_40X, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1035 | .cpu_user_features = PPC_FEATURE_32 | |
| 1036 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, |
| 1037 | .icache_bsize = 32, |
| 1038 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1039 | .platform = "ppc405", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1040 | }, |
| 1041 | { /* 405GPr */ |
| 1042 | .pvr_mask = 0xffff0000, |
| 1043 | .pvr_value = 0x50910000, |
| 1044 | .cpu_name = "405GPr", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 1045 | .cpu_features = CPU_FTRS_40X, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1046 | .cpu_user_features = PPC_FEATURE_32 | |
| 1047 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, |
| 1048 | .icache_bsize = 32, |
| 1049 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1050 | .platform = "ppc405", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1051 | }, |
| 1052 | { /* STBx25xx */ |
| 1053 | .pvr_mask = 0xffff0000, |
| 1054 | .pvr_value = 0x51510000, |
| 1055 | .cpu_name = "STBx25xx", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 1056 | .cpu_features = CPU_FTRS_40X, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1057 | .cpu_user_features = PPC_FEATURE_32 | |
| 1058 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, |
| 1059 | .icache_bsize = 32, |
| 1060 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1061 | .platform = "ppc405", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1062 | }, |
| 1063 | { /* 405LP */ |
| 1064 | .pvr_mask = 0xffff0000, |
| 1065 | .pvr_value = 0x41F10000, |
| 1066 | .cpu_name = "405LP", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 1067 | .cpu_features = CPU_FTRS_40X, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1068 | .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, |
| 1069 | .icache_bsize = 32, |
| 1070 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1071 | .platform = "ppc405", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1072 | }, |
| 1073 | { /* Xilinx Virtex-II Pro */ |
Grant C. Likely | 72646c7 | 2006-01-19 01:13:20 -0700 | [diff] [blame] | 1074 | .pvr_mask = 0xfffff000, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1075 | .pvr_value = 0x20010000, |
| 1076 | .cpu_name = "Virtex-II Pro", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 1077 | .cpu_features = CPU_FTRS_40X, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1078 | .cpu_user_features = PPC_FEATURE_32 | |
| 1079 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, |
| 1080 | .icache_bsize = 32, |
| 1081 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1082 | .platform = "ppc405", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1083 | }, |
Grant C. Likely | 72646c7 | 2006-01-19 01:13:20 -0700 | [diff] [blame] | 1084 | { /* Xilinx Virtex-4 FX */ |
| 1085 | .pvr_mask = 0xfffff000, |
| 1086 | .pvr_value = 0x20011000, |
| 1087 | .cpu_name = "Virtex-4 FX", |
| 1088 | .cpu_features = CPU_FTRS_40X, |
| 1089 | .cpu_user_features = PPC_FEATURE_32 | |
| 1090 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, |
| 1091 | .icache_bsize = 32, |
| 1092 | .dcache_bsize = 32, |
Peter Bergner | 838fdb4 | 2006-09-14 14:18:38 -0500 | [diff] [blame] | 1093 | .platform = "ppc405", |
Grant C. Likely | 72646c7 | 2006-01-19 01:13:20 -0700 | [diff] [blame] | 1094 | }, |
Eugene Surovegin | ad95d60 | 2005-06-07 13:22:09 -0700 | [diff] [blame] | 1095 | { /* 405EP */ |
| 1096 | .pvr_mask = 0xffff0000, |
| 1097 | .pvr_value = 0x51210000, |
| 1098 | .cpu_name = "405EP", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 1099 | .cpu_features = CPU_FTRS_40X, |
Eugene Surovegin | ad95d60 | 2005-06-07 13:22:09 -0700 | [diff] [blame] | 1100 | .cpu_user_features = PPC_FEATURE_32 | |
| 1101 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, |
| 1102 | .icache_bsize = 32, |
| 1103 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1104 | .platform = "ppc405", |
Eugene Surovegin | ad95d60 | 2005-06-07 13:22:09 -0700 | [diff] [blame] | 1105 | }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1106 | |
| 1107 | #endif /* CONFIG_40x */ |
| 1108 | #ifdef CONFIG_44x |
Matt Porter | c9cf73a | 2005-07-31 22:34:52 -0700 | [diff] [blame] | 1109 | { |
| 1110 | .pvr_mask = 0xf0000fff, |
| 1111 | .pvr_value = 0x40000850, |
| 1112 | .cpu_name = "440EP Rev. A", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 1113 | .cpu_features = CPU_FTRS_44X, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1114 | .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU, |
Matt Porter | c9cf73a | 2005-07-31 22:34:52 -0700 | [diff] [blame] | 1115 | .icache_bsize = 32, |
| 1116 | .dcache_bsize = 32, |
Valentine Barshak | 8112753 | 2007-09-22 00:46:57 +1000 | [diff] [blame] | 1117 | .cpu_setup = __setup_cpu_440ep, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1118 | .platform = "ppc440", |
Matt Porter | c9cf73a | 2005-07-31 22:34:52 -0700 | [diff] [blame] | 1119 | }, |
| 1120 | { |
| 1121 | .pvr_mask = 0xf0000fff, |
| 1122 | .pvr_value = 0x400008d3, |
| 1123 | .cpu_name = "440EP Rev. B", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 1124 | .cpu_features = CPU_FTRS_44X, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1125 | .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU, |
Matt Porter | c9cf73a | 2005-07-31 22:34:52 -0700 | [diff] [blame] | 1126 | .icache_bsize = 32, |
| 1127 | .dcache_bsize = 32, |
Valentine Barshak | 8112753 | 2007-09-22 00:46:57 +1000 | [diff] [blame] | 1128 | .cpu_setup = __setup_cpu_440ep, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1129 | .platform = "ppc440", |
Matt Porter | c9cf73a | 2005-07-31 22:34:52 -0700 | [diff] [blame] | 1130 | }, |
Valentine Barshak | 15fc993 | 2007-08-29 17:40:30 +0400 | [diff] [blame] | 1131 | { /* 440EPX */ |
| 1132 | .pvr_mask = 0xf0000ffb, |
| 1133 | .pvr_value = 0x200008D0, |
| 1134 | .cpu_name = "440EPX", |
| 1135 | .cpu_features = CPU_FTRS_44X, |
| 1136 | .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU, |
| 1137 | .icache_bsize = 32, |
| 1138 | .dcache_bsize = 32, |
Valentine Barshak | 8112753 | 2007-09-22 00:46:57 +1000 | [diff] [blame] | 1139 | .cpu_setup = __setup_cpu_440epx, |
| 1140 | .platform = "ppc440", |
Valentine Barshak | 15fc993 | 2007-08-29 17:40:30 +0400 | [diff] [blame] | 1141 | }, |
| 1142 | { /* 440GRX */ |
| 1143 | .pvr_mask = 0xf0000ffb, |
| 1144 | .pvr_value = 0x200008D8, |
| 1145 | .cpu_name = "440GRX", |
| 1146 | .cpu_features = CPU_FTRS_44X, |
| 1147 | .cpu_user_features = COMMON_USER_BOOKE, |
| 1148 | .icache_bsize = 32, |
| 1149 | .dcache_bsize = 32, |
Valentine Barshak | 340ffd2 | 2007-09-22 00:50:09 +1000 | [diff] [blame^] | 1150 | .cpu_setup = __setup_cpu_440grx, |
| 1151 | .platform = "ppc440", |
Valentine Barshak | 15fc993 | 2007-08-29 17:40:30 +0400 | [diff] [blame] | 1152 | }, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 1153 | { /* 440GP Rev. B */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1154 | .pvr_mask = 0xf0000fff, |
| 1155 | .pvr_value = 0x40000440, |
| 1156 | .cpu_name = "440GP Rev. B", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 1157 | .cpu_features = CPU_FTRS_44X, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1158 | .cpu_user_features = COMMON_USER_BOOKE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1159 | .icache_bsize = 32, |
| 1160 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1161 | .platform = "ppc440gp", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1162 | }, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 1163 | { /* 440GP Rev. C */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1164 | .pvr_mask = 0xf0000fff, |
| 1165 | .pvr_value = 0x40000481, |
| 1166 | .cpu_name = "440GP Rev. C", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 1167 | .cpu_features = CPU_FTRS_44X, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1168 | .cpu_user_features = COMMON_USER_BOOKE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1169 | .icache_bsize = 32, |
| 1170 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1171 | .platform = "ppc440gp", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1172 | }, |
| 1173 | { /* 440GX Rev. A */ |
| 1174 | .pvr_mask = 0xf0000fff, |
| 1175 | .pvr_value = 0x50000850, |
| 1176 | .cpu_name = "440GX Rev. A", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 1177 | .cpu_features = CPU_FTRS_44X, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1178 | .cpu_user_features = COMMON_USER_BOOKE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1179 | .icache_bsize = 32, |
| 1180 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1181 | .platform = "ppc440", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1182 | }, |
| 1183 | { /* 440GX Rev. B */ |
| 1184 | .pvr_mask = 0xf0000fff, |
| 1185 | .pvr_value = 0x50000851, |
| 1186 | .cpu_name = "440GX Rev. B", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 1187 | .cpu_features = CPU_FTRS_44X, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1188 | .cpu_user_features = COMMON_USER_BOOKE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1189 | .icache_bsize = 32, |
| 1190 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1191 | .platform = "ppc440", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1192 | }, |
| 1193 | { /* 440GX Rev. C */ |
| 1194 | .pvr_mask = 0xf0000fff, |
| 1195 | .pvr_value = 0x50000892, |
| 1196 | .cpu_name = "440GX Rev. C", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 1197 | .cpu_features = CPU_FTRS_44X, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1198 | .cpu_user_features = COMMON_USER_BOOKE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1199 | .icache_bsize = 32, |
| 1200 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1201 | .platform = "ppc440", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1202 | }, |
Eugene Surovegin | 9149fb3 | 2005-09-03 15:55:40 -0700 | [diff] [blame] | 1203 | { /* 440GX Rev. F */ |
| 1204 | .pvr_mask = 0xf0000fff, |
| 1205 | .pvr_value = 0x50000894, |
| 1206 | .cpu_name = "440GX Rev. F", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 1207 | .cpu_features = CPU_FTRS_44X, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1208 | .cpu_user_features = COMMON_USER_BOOKE, |
Eugene Surovegin | 9149fb3 | 2005-09-03 15:55:40 -0700 | [diff] [blame] | 1209 | .icache_bsize = 32, |
| 1210 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1211 | .platform = "ppc440", |
Eugene Surovegin | 9149fb3 | 2005-09-03 15:55:40 -0700 | [diff] [blame] | 1212 | }, |
Matt Porter | 656de7e | 2005-09-03 15:55:42 -0700 | [diff] [blame] | 1213 | { /* 440SP Rev. A */ |
Roland Dreier | 333e615 | 2007-06-16 05:36:32 +1000 | [diff] [blame] | 1214 | .pvr_mask = 0xfff00fff, |
| 1215 | .pvr_value = 0x53200891, |
Matt Porter | 656de7e | 2005-09-03 15:55:42 -0700 | [diff] [blame] | 1216 | .cpu_name = "440SP Rev. A", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 1217 | .cpu_features = CPU_FTRS_44X, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1218 | .cpu_user_features = COMMON_USER_BOOKE, |
Matt Porter | 656de7e | 2005-09-03 15:55:42 -0700 | [diff] [blame] | 1219 | .icache_bsize = 32, |
| 1220 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1221 | .platform = "ppc440", |
Matt Porter | 656de7e | 2005-09-03 15:55:42 -0700 | [diff] [blame] | 1222 | }, |
Roland Dreier | b0f7b8b | 2005-11-07 00:58:13 -0800 | [diff] [blame] | 1223 | { /* 440SPe Rev. A */ |
Roland Dreier | 333e615 | 2007-06-16 05:36:32 +1000 | [diff] [blame] | 1224 | .pvr_mask = 0xfff00fff, |
| 1225 | .pvr_value = 0x53400890, |
| 1226 | .cpu_name = "440SPe Rev. A", |
| 1227 | .cpu_features = CPU_FTRS_44X, |
| 1228 | .cpu_user_features = COMMON_USER_BOOKE, |
| 1229 | .icache_bsize = 32, |
| 1230 | .dcache_bsize = 32, |
| 1231 | .platform = "ppc440", |
| 1232 | }, |
| 1233 | { /* 440SPe Rev. B */ |
| 1234 | .pvr_mask = 0xfff00fff, |
| 1235 | .pvr_value = 0x53400891, |
| 1236 | .cpu_name = "440SPe Rev. B", |
Kumar Gala | a147c58 | 2006-12-08 02:34:38 -0600 | [diff] [blame] | 1237 | .cpu_features = CPU_FTRS_44X, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1238 | .cpu_user_features = COMMON_USER_BOOKE, |
Roland Dreier | b0f7b8b | 2005-11-07 00:58:13 -0800 | [diff] [blame] | 1239 | .icache_bsize = 32, |
| 1240 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1241 | .platform = "ppc440", |
Roland Dreier | b0f7b8b | 2005-11-07 00:58:13 -0800 | [diff] [blame] | 1242 | }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1243 | #endif /* CONFIG_44x */ |
Kumar Gala | 33d9e9b | 2005-06-25 14:54:37 -0700 | [diff] [blame] | 1244 | #ifdef CONFIG_FSL_BOOKE |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 1245 | { /* e200z5 */ |
Kumar Gala | 33d9e9b | 2005-06-25 14:54:37 -0700 | [diff] [blame] | 1246 | .pvr_mask = 0xfff00000, |
| 1247 | .pvr_value = 0x81000000, |
| 1248 | .cpu_name = "e200z5", |
| 1249 | /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */ |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 1250 | .cpu_features = CPU_FTRS_E200, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1251 | .cpu_user_features = COMMON_USER_BOOKE | |
| 1252 | PPC_FEATURE_HAS_EFP_SINGLE | |
Kumar Gala | 33d9e9b | 2005-06-25 14:54:37 -0700 | [diff] [blame] | 1253 | PPC_FEATURE_UNIFIED_CACHE, |
| 1254 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1255 | .platform = "ppc5554", |
Kumar Gala | 33d9e9b | 2005-06-25 14:54:37 -0700 | [diff] [blame] | 1256 | }, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 1257 | { /* e200z6 */ |
Kumar Gala | 33d9e9b | 2005-06-25 14:54:37 -0700 | [diff] [blame] | 1258 | .pvr_mask = 0xfff00000, |
| 1259 | .pvr_value = 0x81100000, |
| 1260 | .cpu_name = "e200z6", |
| 1261 | /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */ |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 1262 | .cpu_features = CPU_FTRS_E200, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1263 | .cpu_user_features = COMMON_USER_BOOKE | |
Kumar Gala | 5e14d21 | 2007-09-13 01:44:20 -0500 | [diff] [blame] | 1264 | PPC_FEATURE_HAS_SPE_COMP | |
| 1265 | PPC_FEATURE_HAS_EFP_SINGLE_COMP | |
Kumar Gala | 33d9e9b | 2005-06-25 14:54:37 -0700 | [diff] [blame] | 1266 | PPC_FEATURE_UNIFIED_CACHE, |
| 1267 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1268 | .platform = "ppc5554", |
Kumar Gala | 33d9e9b | 2005-06-25 14:54:37 -0700 | [diff] [blame] | 1269 | }, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 1270 | { /* e500 */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1271 | .pvr_mask = 0xffff0000, |
| 1272 | .pvr_value = 0x80200000, |
| 1273 | .cpu_name = "e500", |
| 1274 | /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */ |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 1275 | .cpu_features = CPU_FTRS_E500, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1276 | .cpu_user_features = COMMON_USER_BOOKE | |
Kumar Gala | 5e14d21 | 2007-09-13 01:44:20 -0500 | [diff] [blame] | 1277 | PPC_FEATURE_HAS_SPE_COMP | |
| 1278 | PPC_FEATURE_HAS_EFP_SINGLE_COMP, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1279 | .icache_bsize = 32, |
| 1280 | .dcache_bsize = 32, |
| 1281 | .num_pmcs = 4, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 1282 | .oprofile_cpu_type = "ppc/e500", |
Andy Whitcroft | 7a45fb1 | 2006-01-13 12:35:49 +0000 | [diff] [blame] | 1283 | .oprofile_type = PPC_OPROFILE_BOOKE, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1284 | .platform = "ppc8540", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1285 | }, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 1286 | { /* e500v2 */ |
Kumar Gala | 5b37b70 | 2005-06-21 17:15:18 -0700 | [diff] [blame] | 1287 | .pvr_mask = 0xffff0000, |
| 1288 | .pvr_value = 0x80210000, |
| 1289 | .cpu_name = "e500v2", |
| 1290 | /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */ |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 1291 | .cpu_features = CPU_FTRS_E500_2, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1292 | .cpu_user_features = COMMON_USER_BOOKE | |
Kumar Gala | 5e14d21 | 2007-09-13 01:44:20 -0500 | [diff] [blame] | 1293 | PPC_FEATURE_HAS_SPE_COMP | |
| 1294 | PPC_FEATURE_HAS_EFP_SINGLE_COMP | |
| 1295 | PPC_FEATURE_HAS_EFP_DOUBLE_COMP, |
Kumar Gala | 5b37b70 | 2005-06-21 17:15:18 -0700 | [diff] [blame] | 1296 | .icache_bsize = 32, |
| 1297 | .dcache_bsize = 32, |
| 1298 | .num_pmcs = 4, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 1299 | .oprofile_cpu_type = "ppc/e500", |
Andy Whitcroft | 7a45fb1 | 2006-01-13 12:35:49 +0000 | [diff] [blame] | 1300 | .oprofile_type = PPC_OPROFILE_BOOKE, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1301 | .platform = "ppc8548", |
Kumar Gala | 5b37b70 | 2005-06-21 17:15:18 -0700 | [diff] [blame] | 1302 | }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1303 | #endif |
| 1304 | #if !CLASSIC_PPC |
| 1305 | { /* default match */ |
| 1306 | .pvr_mask = 0x00000000, |
| 1307 | .pvr_value = 0x00000000, |
| 1308 | .cpu_name = "(generic PPC)", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 1309 | .cpu_features = CPU_FTRS_GENERIC_32, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1310 | .cpu_user_features = PPC_FEATURE_32, |
| 1311 | .icache_bsize = 32, |
| 1312 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1313 | .platform = "powerpc", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1314 | } |
| 1315 | #endif /* !CLASSIC_PPC */ |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 1316 | #endif /* CONFIG_PPC32 */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1317 | }; |
Benjamin Herrenschmidt | 42c4aaa | 2006-10-24 16:42:40 +1000 | [diff] [blame] | 1318 | |
Paul Mackerras | 974a76f | 2006-11-10 20:38:53 +1100 | [diff] [blame] | 1319 | struct cpu_spec *identify_cpu(unsigned long offset, unsigned int pvr) |
Benjamin Herrenschmidt | 42c4aaa | 2006-10-24 16:42:40 +1000 | [diff] [blame] | 1320 | { |
| 1321 | struct cpu_spec *s = cpu_specs; |
| 1322 | struct cpu_spec **cur = &cur_cpu_spec; |
Benjamin Herrenschmidt | 42c4aaa | 2006-10-24 16:42:40 +1000 | [diff] [blame] | 1323 | int i; |
| 1324 | |
| 1325 | s = PTRRELOC(s); |
| 1326 | cur = PTRRELOC(cur); |
| 1327 | |
Benjamin Herrenschmidt | 42c4aaa | 2006-10-24 16:42:40 +1000 | [diff] [blame] | 1328 | for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) |
| 1329 | if ((pvr & s->pvr_mask) == s->pvr_value) { |
| 1330 | *cur = cpu_specs + i; |
Valentine Barshak | 84e3ad5 | 2007-09-22 00:44:38 +1000 | [diff] [blame] | 1331 | #if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE) |
| 1332 | /* ppc64 and booke expect identify_cpu to also call |
| 1333 | * setup_cpu for that processor. I will consolidate |
| 1334 | * that at a later time, for now, just use #ifdef. |
Benjamin Herrenschmidt | 42c4aaa | 2006-10-24 16:42:40 +1000 | [diff] [blame] | 1335 | * we also don't need to PTRRELOC the function pointer |
Valentine Barshak | 84e3ad5 | 2007-09-22 00:44:38 +1000 | [diff] [blame] | 1336 | * on ppc64 and booke as we are running at 0 in real |
| 1337 | * mode on ppc64 and reloc_offset is always 0 on booke. |
Benjamin Herrenschmidt | 42c4aaa | 2006-10-24 16:42:40 +1000 | [diff] [blame] | 1338 | */ |
| 1339 | if (s->cpu_setup) { |
| 1340 | s->cpu_setup(offset, s); |
| 1341 | } |
Valentine Barshak | 84e3ad5 | 2007-09-22 00:44:38 +1000 | [diff] [blame] | 1342 | #endif /* CONFIG_PPC64 || CONFIG_BOOKE */ |
Benjamin Herrenschmidt | 42c4aaa | 2006-10-24 16:42:40 +1000 | [diff] [blame] | 1343 | return s; |
| 1344 | } |
| 1345 | BUG(); |
| 1346 | return NULL; |
| 1347 | } |
| 1348 | |
Benjamin Herrenschmidt | 0909c8c | 2006-10-20 11:47:18 +1000 | [diff] [blame] | 1349 | void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end) |
Benjamin Herrenschmidt | 42c4aaa | 2006-10-24 16:42:40 +1000 | [diff] [blame] | 1350 | { |
| 1351 | struct fixup_entry { |
| 1352 | unsigned long mask; |
| 1353 | unsigned long value; |
Benjamin Herrenschmidt | 0909c8c | 2006-10-20 11:47:18 +1000 | [diff] [blame] | 1354 | long start_off; |
| 1355 | long end_off; |
Benjamin Herrenschmidt | 42c4aaa | 2006-10-24 16:42:40 +1000 | [diff] [blame] | 1356 | } *fcur, *fend; |
| 1357 | |
| 1358 | fcur = fixup_start; |
| 1359 | fend = fixup_end; |
| 1360 | |
| 1361 | for (; fcur < fend; fcur++) { |
| 1362 | unsigned int *pstart, *pend, *p; |
| 1363 | |
| 1364 | if ((value & fcur->mask) == fcur->value) |
| 1365 | continue; |
| 1366 | |
| 1367 | /* These PTRRELOCs will disappear once the new scheme for |
| 1368 | * modules and vdso is implemented |
| 1369 | */ |
Benjamin Herrenschmidt | 0909c8c | 2006-10-20 11:47:18 +1000 | [diff] [blame] | 1370 | pstart = ((unsigned int *)fcur) + (fcur->start_off / 4); |
| 1371 | pend = ((unsigned int *)fcur) + (fcur->end_off / 4); |
Benjamin Herrenschmidt | 42c4aaa | 2006-10-24 16:42:40 +1000 | [diff] [blame] | 1372 | |
| 1373 | for (p = pstart; p < pend; p++) { |
| 1374 | *p = 0x60000000u; |
| 1375 | asm volatile ("dcbst 0, %0" : : "r" (p)); |
| 1376 | } |
| 1377 | asm volatile ("sync" : : : "memory"); |
| 1378 | for (p = pstart; p < pend; p++) |
| 1379 | asm volatile ("icbi 0,%0" : : "r" (p)); |
| 1380 | asm volatile ("sync; isync" : : : "memory"); |
| 1381 | } |
| 1382 | } |