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