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 | aa5cb02 | 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 | }, |
Anton Blanchard | 03054d5 | 2006-04-29 09:51:06 +1000 | [diff] [blame] | 280 | { /* Power6 */ |
| 281 | .pvr_mask = 0xffff0000, |
| 282 | .pvr_value = 0x003e0000, |
| 283 | .cpu_name = "POWER6", |
| 284 | .cpu_features = CPU_FTRS_POWER6, |
| 285 | .cpu_user_features = COMMON_USER_POWER6, |
| 286 | .icache_bsize = 128, |
| 287 | .dcache_bsize = 128, |
Anton Blanchard | 99f4861 | 2006-10-13 12:13:12 +1000 | [diff] [blame] | 288 | .num_pmcs = 6, |
Anton Blanchard | 03054d5 | 2006-04-29 09:51:06 +1000 | [diff] [blame] | 289 | .oprofile_cpu_type = "ppc64/power6", |
| 290 | .oprofile_type = PPC_OPROFILE_POWER4, |
Michael Neuling | e78dbc8 | 2006-06-08 14:42:34 +1000 | [diff] [blame] | 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, |
Anton Blanchard | 03054d5 | 2006-04-29 09:51:06 +1000 | [diff] [blame] | 295 | .platform = "power6", |
| 296 | }, |
Arnd Bergmann | c902be7 | 2006-01-04 19:55:53 +0000 | [diff] [blame] | 297 | { /* Cell Broadband Engine */ |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 298 | .pvr_mask = 0xffff0000, |
| 299 | .pvr_value = 0x00700000, |
| 300 | .cpu_name = "Cell Broadband Engine", |
| 301 | .cpu_features = CPU_FTRS_CELL, |
| 302 | .cpu_user_features = COMMON_USER_PPC64 | |
Benjamin Herrenschmidt | aa5cb02 | 2006-03-01 15:07:07 +1100 | [diff] [blame] | 303 | PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP | |
| 304 | PPC_FEATURE_SMT, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 305 | .icache_bsize = 128, |
| 306 | .dcache_bsize = 128, |
Maynard Johnson | 18f2190 | 2006-11-20 18:45:16 +0100 | [diff] [blame^] | 307 | .num_pmcs = 4, |
| 308 | .oprofile_cpu_type = "ppc64/cell-be", |
| 309 | .oprofile_type = PPC_OPROFILE_CELL, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 310 | .platform = "ppc-cell-be", |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 311 | }, |
Olof Johansson | b3ebd1d | 2006-09-06 14:35:57 -0500 | [diff] [blame] | 312 | { /* PA Semi PA6T */ |
| 313 | .pvr_mask = 0x7fff0000, |
| 314 | .pvr_value = 0x00900000, |
| 315 | .cpu_name = "PA6T", |
| 316 | .cpu_features = CPU_FTRS_PA6T, |
| 317 | .cpu_user_features = COMMON_USER_PA6T, |
| 318 | .icache_bsize = 64, |
| 319 | .dcache_bsize = 64, |
| 320 | .num_pmcs = 6, |
| 321 | .platform = "pa6t", |
| 322 | }, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 323 | { /* default match */ |
| 324 | .pvr_mask = 0x00000000, |
| 325 | .pvr_value = 0x00000000, |
| 326 | .cpu_name = "POWER4 (compatible)", |
| 327 | .cpu_features = CPU_FTRS_COMPATIBLE, |
| 328 | .cpu_user_features = COMMON_USER_PPC64, |
| 329 | .icache_bsize = 128, |
| 330 | .dcache_bsize = 128, |
| 331 | .num_pmcs = 6, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 332 | .platform = "power4", |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 333 | } |
| 334 | #endif /* CONFIG_PPC64 */ |
| 335 | #ifdef CONFIG_PPC32 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 336 | #if CLASSIC_PPC |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 337 | { /* 601 */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 338 | .pvr_mask = 0xffff0000, |
| 339 | .pvr_value = 0x00010000, |
| 340 | .cpu_name = "601", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 341 | .cpu_features = CPU_FTRS_PPC601, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 342 | .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR | |
Paul Mackerras | 9859901 | 2005-10-22 16:51:34 +1000 | [diff] [blame] | 343 | PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 344 | .icache_bsize = 32, |
| 345 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 346 | .platform = "ppc601", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 347 | }, |
| 348 | { /* 603 */ |
| 349 | .pvr_mask = 0xffff0000, |
| 350 | .pvr_value = 0x00030000, |
| 351 | .cpu_name = "603", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 352 | .cpu_features = CPU_FTRS_603, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 353 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 354 | .icache_bsize = 32, |
| 355 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 356 | .cpu_setup = __setup_cpu_603, |
| 357 | .platform = "ppc603", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 358 | }, |
| 359 | { /* 603e */ |
| 360 | .pvr_mask = 0xffff0000, |
| 361 | .pvr_value = 0x00060000, |
| 362 | .cpu_name = "603e", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 363 | .cpu_features = CPU_FTRS_603, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 364 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 365 | .icache_bsize = 32, |
| 366 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 367 | .cpu_setup = __setup_cpu_603, |
| 368 | .platform = "ppc603", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 369 | }, |
| 370 | { /* 603ev */ |
| 371 | .pvr_mask = 0xffff0000, |
| 372 | .pvr_value = 0x00070000, |
| 373 | .cpu_name = "603ev", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 374 | .cpu_features = CPU_FTRS_603, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 375 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 376 | .icache_bsize = 32, |
| 377 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 378 | .cpu_setup = __setup_cpu_603, |
| 379 | .platform = "ppc603", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 380 | }, |
| 381 | { /* 604 */ |
| 382 | .pvr_mask = 0xffff0000, |
| 383 | .pvr_value = 0x00040000, |
| 384 | .cpu_name = "604", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 385 | .cpu_features = CPU_FTRS_604, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 386 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 387 | .icache_bsize = 32, |
| 388 | .dcache_bsize = 32, |
| 389 | .num_pmcs = 2, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 390 | .cpu_setup = __setup_cpu_604, |
| 391 | .platform = "ppc604", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 392 | }, |
| 393 | { /* 604e */ |
| 394 | .pvr_mask = 0xfffff000, |
| 395 | .pvr_value = 0x00090000, |
| 396 | .cpu_name = "604e", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 397 | .cpu_features = CPU_FTRS_604, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 398 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 399 | .icache_bsize = 32, |
| 400 | .dcache_bsize = 32, |
| 401 | .num_pmcs = 4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 402 | .cpu_setup = __setup_cpu_604, |
| 403 | .platform = "ppc604", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 404 | }, |
| 405 | { /* 604r */ |
| 406 | .pvr_mask = 0xffff0000, |
| 407 | .pvr_value = 0x00090000, |
| 408 | .cpu_name = "604r", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 409 | .cpu_features = CPU_FTRS_604, |
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, |
| 413 | .num_pmcs = 4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 414 | .cpu_setup = __setup_cpu_604, |
| 415 | .platform = "ppc604", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 416 | }, |
| 417 | { /* 604ev */ |
| 418 | .pvr_mask = 0xffff0000, |
| 419 | .pvr_value = 0x000a0000, |
| 420 | .cpu_name = "604ev", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 421 | .cpu_features = CPU_FTRS_604, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 422 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 423 | .icache_bsize = 32, |
| 424 | .dcache_bsize = 32, |
| 425 | .num_pmcs = 4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 426 | .cpu_setup = __setup_cpu_604, |
| 427 | .platform = "ppc604", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 428 | }, |
| 429 | { /* 740/750 (0x4202, don't support TAU ?) */ |
| 430 | .pvr_mask = 0xffffffff, |
| 431 | .pvr_value = 0x00084202, |
| 432 | .cpu_name = "740/750", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 433 | .cpu_features = CPU_FTRS_740_NOTAU, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 434 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 435 | .icache_bsize = 32, |
| 436 | .dcache_bsize = 32, |
| 437 | .num_pmcs = 4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 438 | .cpu_setup = __setup_cpu_750, |
| 439 | .platform = "ppc750", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 440 | }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 441 | { /* 750CX (80100 and 8010x?) */ |
| 442 | .pvr_mask = 0xfffffff0, |
| 443 | .pvr_value = 0x00080100, |
| 444 | .cpu_name = "750CX", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 445 | .cpu_features = CPU_FTRS_750, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 446 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 447 | .icache_bsize = 32, |
| 448 | .dcache_bsize = 32, |
| 449 | .num_pmcs = 4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 450 | .cpu_setup = __setup_cpu_750cx, |
| 451 | .platform = "ppc750", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 452 | }, |
| 453 | { /* 750CX (82201 and 82202) */ |
| 454 | .pvr_mask = 0xfffffff0, |
| 455 | .pvr_value = 0x00082200, |
| 456 | .cpu_name = "750CX", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 457 | .cpu_features = CPU_FTRS_750, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 458 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 459 | .icache_bsize = 32, |
| 460 | .dcache_bsize = 32, |
| 461 | .num_pmcs = 4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 462 | .cpu_setup = __setup_cpu_750cx, |
| 463 | .platform = "ppc750", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 464 | }, |
| 465 | { /* 750CXe (82214) */ |
| 466 | .pvr_mask = 0xfffffff0, |
| 467 | .pvr_value = 0x00082210, |
| 468 | .cpu_name = "750CXe", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 469 | .cpu_features = CPU_FTRS_750, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 470 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 471 | .icache_bsize = 32, |
| 472 | .dcache_bsize = 32, |
| 473 | .num_pmcs = 4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 474 | .cpu_setup = __setup_cpu_750cx, |
| 475 | .platform = "ppc750", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 476 | }, |
Arthur Othieno | 7c31625 | 2005-09-03 15:55:52 -0700 | [diff] [blame] | 477 | { /* 750CXe "Gekko" (83214) */ |
| 478 | .pvr_mask = 0xffffffff, |
| 479 | .pvr_value = 0x00083214, |
| 480 | .cpu_name = "750CXe", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 481 | .cpu_features = CPU_FTRS_750, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 482 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
Arthur Othieno | 7c31625 | 2005-09-03 15:55:52 -0700 | [diff] [blame] | 483 | .icache_bsize = 32, |
| 484 | .dcache_bsize = 32, |
| 485 | .num_pmcs = 4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 486 | .cpu_setup = __setup_cpu_750cx, |
| 487 | .platform = "ppc750", |
Arthur Othieno | 7c31625 | 2005-09-03 15:55:52 -0700 | [diff] [blame] | 488 | }, |
Arthur Othieno | ac1ff04 | 2005-09-03 15:55:51 -0700 | [diff] [blame] | 489 | { /* 745/755 */ |
| 490 | .pvr_mask = 0xfffff000, |
| 491 | .pvr_value = 0x00083000, |
| 492 | .cpu_name = "745/755", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 493 | .cpu_features = CPU_FTRS_750, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 494 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
Arthur Othieno | ac1ff04 | 2005-09-03 15:55:51 -0700 | [diff] [blame] | 495 | .icache_bsize = 32, |
| 496 | .dcache_bsize = 32, |
| 497 | .num_pmcs = 4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 498 | .cpu_setup = __setup_cpu_750, |
| 499 | .platform = "ppc750", |
Arthur Othieno | ac1ff04 | 2005-09-03 15:55:51 -0700 | [diff] [blame] | 500 | }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 501 | { /* 750FX rev 1.x */ |
| 502 | .pvr_mask = 0xffffff00, |
| 503 | .pvr_value = 0x70000100, |
| 504 | .cpu_name = "750FX", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 505 | .cpu_features = CPU_FTRS_750FX1, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 506 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 507 | .icache_bsize = 32, |
| 508 | .dcache_bsize = 32, |
| 509 | .num_pmcs = 4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 510 | .cpu_setup = __setup_cpu_750, |
| 511 | .platform = "ppc750", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 512 | }, |
| 513 | { /* 750FX rev 2.0 must disable HID0[DPM] */ |
| 514 | .pvr_mask = 0xffffffff, |
| 515 | .pvr_value = 0x70000200, |
| 516 | .cpu_name = "750FX", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 517 | .cpu_features = CPU_FTRS_750FX2, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 518 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 519 | .icache_bsize = 32, |
| 520 | .dcache_bsize = 32, |
| 521 | .num_pmcs = 4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 522 | .cpu_setup = __setup_cpu_750, |
| 523 | .platform = "ppc750", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 524 | }, |
| 525 | { /* 750FX (All revs except 2.0) */ |
| 526 | .pvr_mask = 0xffff0000, |
| 527 | .pvr_value = 0x70000000, |
| 528 | .cpu_name = "750FX", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 529 | .cpu_features = CPU_FTRS_750FX, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 530 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 531 | .icache_bsize = 32, |
| 532 | .dcache_bsize = 32, |
| 533 | .num_pmcs = 4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 534 | .cpu_setup = __setup_cpu_750fx, |
| 535 | .platform = "ppc750", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 536 | }, |
| 537 | { /* 750GX */ |
| 538 | .pvr_mask = 0xffff0000, |
| 539 | .pvr_value = 0x70020000, |
| 540 | .cpu_name = "750GX", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 541 | .cpu_features = CPU_FTRS_750GX, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 542 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 543 | .icache_bsize = 32, |
| 544 | .dcache_bsize = 32, |
| 545 | .num_pmcs = 4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 546 | .cpu_setup = __setup_cpu_750fx, |
| 547 | .platform = "ppc750", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 548 | }, |
| 549 | { /* 740/750 (L2CR bit need fixup for 740) */ |
| 550 | .pvr_mask = 0xffff0000, |
| 551 | .pvr_value = 0x00080000, |
| 552 | .cpu_name = "740/750", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 553 | .cpu_features = CPU_FTRS_740, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 554 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 555 | .icache_bsize = 32, |
| 556 | .dcache_bsize = 32, |
| 557 | .num_pmcs = 4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 558 | .cpu_setup = __setup_cpu_750, |
| 559 | .platform = "ppc750", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 560 | }, |
| 561 | { /* 7400 rev 1.1 ? (no TAU) */ |
| 562 | .pvr_mask = 0xffffffff, |
| 563 | .pvr_value = 0x000c1101, |
| 564 | .cpu_name = "7400 (1.1)", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 565 | .cpu_features = CPU_FTRS_7400_NOTAU, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 566 | .cpu_user_features = COMMON_USER | |
| 567 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 568 | .icache_bsize = 32, |
| 569 | .dcache_bsize = 32, |
| 570 | .num_pmcs = 4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 571 | .cpu_setup = __setup_cpu_7400, |
| 572 | .platform = "ppc7400", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 573 | }, |
| 574 | { /* 7400 */ |
| 575 | .pvr_mask = 0xffff0000, |
| 576 | .pvr_value = 0x000c0000, |
| 577 | .cpu_name = "7400", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 578 | .cpu_features = CPU_FTRS_7400, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 579 | .cpu_user_features = COMMON_USER | |
| 580 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 581 | .icache_bsize = 32, |
| 582 | .dcache_bsize = 32, |
| 583 | .num_pmcs = 4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 584 | .cpu_setup = __setup_cpu_7400, |
| 585 | .platform = "ppc7400", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 586 | }, |
| 587 | { /* 7410 */ |
| 588 | .pvr_mask = 0xffff0000, |
| 589 | .pvr_value = 0x800c0000, |
| 590 | .cpu_name = "7410", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 591 | .cpu_features = CPU_FTRS_7400, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 592 | .cpu_user_features = COMMON_USER | |
| 593 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -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_7410, |
| 598 | .platform = "ppc7400", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 599 | }, |
| 600 | { /* 7450 2.0 - no doze/nap */ |
| 601 | .pvr_mask = 0xffffffff, |
| 602 | .pvr_value = 0x80000200, |
| 603 | .cpu_name = "7450", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 604 | .cpu_features = CPU_FTRS_7450_20, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 605 | .cpu_user_features = COMMON_USER | |
| 606 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 607 | .icache_bsize = 32, |
| 608 | .dcache_bsize = 32, |
| 609 | .num_pmcs = 6, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 610 | .cpu_setup = __setup_cpu_745x, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 611 | .oprofile_cpu_type = "ppc/7450", |
Andy Whitcroft | 7a45fb1 | 2006-01-13 12:35:49 +0000 | [diff] [blame] | 612 | .oprofile_type = PPC_OPROFILE_G4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 613 | .platform = "ppc7450", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 614 | }, |
| 615 | { /* 7450 2.1 */ |
| 616 | .pvr_mask = 0xffffffff, |
| 617 | .pvr_value = 0x80000201, |
| 618 | .cpu_name = "7450", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 619 | .cpu_features = CPU_FTRS_7450_21, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 620 | .cpu_user_features = COMMON_USER | |
| 621 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 622 | .icache_bsize = 32, |
| 623 | .dcache_bsize = 32, |
| 624 | .num_pmcs = 6, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 625 | .cpu_setup = __setup_cpu_745x, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 626 | .oprofile_cpu_type = "ppc/7450", |
Andy Whitcroft | 7a45fb1 | 2006-01-13 12:35:49 +0000 | [diff] [blame] | 627 | .oprofile_type = PPC_OPROFILE_G4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 628 | .platform = "ppc7450", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 629 | }, |
| 630 | { /* 7450 2.3 and newer */ |
| 631 | .pvr_mask = 0xffff0000, |
| 632 | .pvr_value = 0x80000000, |
| 633 | .cpu_name = "7450", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 634 | .cpu_features = CPU_FTRS_7450_23, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 635 | .cpu_user_features = COMMON_USER | |
| 636 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 637 | .icache_bsize = 32, |
| 638 | .dcache_bsize = 32, |
| 639 | .num_pmcs = 6, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 640 | .cpu_setup = __setup_cpu_745x, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 641 | .oprofile_cpu_type = "ppc/7450", |
Andy Whitcroft | 7a45fb1 | 2006-01-13 12:35:49 +0000 | [diff] [blame] | 642 | .oprofile_type = PPC_OPROFILE_G4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 643 | .platform = "ppc7450", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 644 | }, |
| 645 | { /* 7455 rev 1.x */ |
| 646 | .pvr_mask = 0xffffff00, |
| 647 | .pvr_value = 0x80010100, |
| 648 | .cpu_name = "7455", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 649 | .cpu_features = CPU_FTRS_7455_1, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 650 | .cpu_user_features = COMMON_USER | |
| 651 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 652 | .icache_bsize = 32, |
| 653 | .dcache_bsize = 32, |
| 654 | .num_pmcs = 6, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 655 | .cpu_setup = __setup_cpu_745x, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 656 | .oprofile_cpu_type = "ppc/7450", |
Andy Whitcroft | 7a45fb1 | 2006-01-13 12:35:49 +0000 | [diff] [blame] | 657 | .oprofile_type = PPC_OPROFILE_G4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 658 | .platform = "ppc7450", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 659 | }, |
| 660 | { /* 7455 rev 2.0 */ |
| 661 | .pvr_mask = 0xffffffff, |
| 662 | .pvr_value = 0x80010200, |
| 663 | .cpu_name = "7455", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 664 | .cpu_features = CPU_FTRS_7455_20, |
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 = 6, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 670 | .cpu_setup = __setup_cpu_745x, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 671 | .oprofile_cpu_type = "ppc/7450", |
Andy Whitcroft | 7a45fb1 | 2006-01-13 12:35:49 +0000 | [diff] [blame] | 672 | .oprofile_type = PPC_OPROFILE_G4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 673 | .platform = "ppc7450", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 674 | }, |
| 675 | { /* 7455 others */ |
| 676 | .pvr_mask = 0xffff0000, |
| 677 | .pvr_value = 0x80010000, |
| 678 | .cpu_name = "7455", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 679 | .cpu_features = CPU_FTRS_7455, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 680 | .cpu_user_features = COMMON_USER | |
| 681 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 682 | .icache_bsize = 32, |
| 683 | .dcache_bsize = 32, |
| 684 | .num_pmcs = 6, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 685 | .cpu_setup = __setup_cpu_745x, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 686 | .oprofile_cpu_type = "ppc/7450", |
Andy Whitcroft | 7a45fb1 | 2006-01-13 12:35:49 +0000 | [diff] [blame] | 687 | .oprofile_type = PPC_OPROFILE_G4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 688 | .platform = "ppc7450", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 689 | }, |
| 690 | { /* 7447/7457 Rev 1.0 */ |
| 691 | .pvr_mask = 0xffffffff, |
| 692 | .pvr_value = 0x80020100, |
| 693 | .cpu_name = "7447/7457", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 694 | .cpu_features = CPU_FTRS_7447_10, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 695 | .cpu_user_features = COMMON_USER | |
| 696 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 697 | .icache_bsize = 32, |
| 698 | .dcache_bsize = 32, |
| 699 | .num_pmcs = 6, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 700 | .cpu_setup = __setup_cpu_745x, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 701 | .oprofile_cpu_type = "ppc/7450", |
Andy Whitcroft | 7a45fb1 | 2006-01-13 12:35:49 +0000 | [diff] [blame] | 702 | .oprofile_type = PPC_OPROFILE_G4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 703 | .platform = "ppc7450", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 704 | }, |
| 705 | { /* 7447/7457 Rev 1.1 */ |
| 706 | .pvr_mask = 0xffffffff, |
| 707 | .pvr_value = 0x80020101, |
| 708 | .cpu_name = "7447/7457", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 709 | .cpu_features = CPU_FTRS_7447_10, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 710 | .cpu_user_features = COMMON_USER | |
| 711 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 712 | .icache_bsize = 32, |
| 713 | .dcache_bsize = 32, |
| 714 | .num_pmcs = 6, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 715 | .cpu_setup = __setup_cpu_745x, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 716 | .oprofile_cpu_type = "ppc/7450", |
Andy Whitcroft | 7a45fb1 | 2006-01-13 12:35:49 +0000 | [diff] [blame] | 717 | .oprofile_type = PPC_OPROFILE_G4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 718 | .platform = "ppc7450", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 719 | }, |
| 720 | { /* 7447/7457 Rev 1.2 and later */ |
| 721 | .pvr_mask = 0xffff0000, |
| 722 | .pvr_value = 0x80020000, |
| 723 | .cpu_name = "7447/7457", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 724 | .cpu_features = CPU_FTRS_7447, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 725 | .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] | 726 | .icache_bsize = 32, |
| 727 | .dcache_bsize = 32, |
| 728 | .num_pmcs = 6, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 729 | .cpu_setup = __setup_cpu_745x, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 730 | .oprofile_cpu_type = "ppc/7450", |
Andy Whitcroft | 7a45fb1 | 2006-01-13 12:35:49 +0000 | [diff] [blame] | 731 | .oprofile_type = PPC_OPROFILE_G4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 732 | .platform = "ppc7450", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 733 | }, |
| 734 | { /* 7447A */ |
| 735 | .pvr_mask = 0xffff0000, |
| 736 | .pvr_value = 0x80030000, |
| 737 | .cpu_name = "7447A", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 738 | .cpu_features = CPU_FTRS_7447A, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 739 | .cpu_user_features = COMMON_USER | |
| 740 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 741 | .icache_bsize = 32, |
| 742 | .dcache_bsize = 32, |
| 743 | .num_pmcs = 6, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 744 | .cpu_setup = __setup_cpu_745x, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 745 | .oprofile_cpu_type = "ppc/7450", |
Andy Whitcroft | 7a45fb1 | 2006-01-13 12:35:49 +0000 | [diff] [blame] | 746 | .oprofile_type = PPC_OPROFILE_G4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 747 | .platform = "ppc7450", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 748 | }, |
Kumar Gala | bbde630 | 2005-09-03 15:55:55 -0700 | [diff] [blame] | 749 | { /* 7448 */ |
| 750 | .pvr_mask = 0xffff0000, |
| 751 | .pvr_value = 0x80040000, |
| 752 | .cpu_name = "7448", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 753 | .cpu_features = CPU_FTRS_7447A, |
Paul Mackerras | fab5db9 | 2006-06-07 16:14:40 +1000 | [diff] [blame] | 754 | .cpu_user_features = COMMON_USER | |
| 755 | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, |
Kumar Gala | bbde630 | 2005-09-03 15:55:55 -0700 | [diff] [blame] | 756 | .icache_bsize = 32, |
| 757 | .dcache_bsize = 32, |
| 758 | .num_pmcs = 6, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 759 | .cpu_setup = __setup_cpu_745x, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 760 | .oprofile_cpu_type = "ppc/7450", |
Andy Whitcroft | 7a45fb1 | 2006-01-13 12:35:49 +0000 | [diff] [blame] | 761 | .oprofile_type = PPC_OPROFILE_G4, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 762 | .platform = "ppc7450", |
Kumar Gala | bbde630 | 2005-09-03 15:55:55 -0700 | [diff] [blame] | 763 | }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 764 | { /* 82xx (8240, 8245, 8260 are all 603e cores) */ |
| 765 | .pvr_mask = 0x7fff0000, |
| 766 | .pvr_value = 0x00810000, |
| 767 | .cpu_name = "82xx", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 768 | .cpu_features = CPU_FTRS_82XX, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 769 | .cpu_user_features = COMMON_USER, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 770 | .icache_bsize = 32, |
| 771 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 772 | .cpu_setup = __setup_cpu_603, |
| 773 | .platform = "ppc603", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 774 | }, |
| 775 | { /* All G2_LE (603e core, plus some) have the same pvr */ |
| 776 | .pvr_mask = 0x7fff0000, |
| 777 | .pvr_value = 0x00820000, |
| 778 | .cpu_name = "G2_LE", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 779 | .cpu_features = CPU_FTRS_G2_LE, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 780 | .cpu_user_features = COMMON_USER, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 781 | .icache_bsize = 32, |
| 782 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 783 | .cpu_setup = __setup_cpu_603, |
| 784 | .platform = "ppc603", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 785 | }, |
Kim Phillips | 6c4a250 | 2006-10-02 20:10:24 -0500 | [diff] [blame] | 786 | { /* e300c1 (a 603e core, plus some) on 83xx */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 787 | .pvr_mask = 0x7fff0000, |
| 788 | .pvr_value = 0x00830000, |
Kim Phillips | 6c4a250 | 2006-10-02 20:10:24 -0500 | [diff] [blame] | 789 | .cpu_name = "e300c1", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 790 | .cpu_features = CPU_FTRS_E300, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 791 | .cpu_user_features = COMMON_USER, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 792 | .icache_bsize = 32, |
| 793 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 794 | .cpu_setup = __setup_cpu_603, |
| 795 | .platform = "ppc603", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 796 | }, |
Kim Phillips | 6c4a250 | 2006-10-02 20:10:24 -0500 | [diff] [blame] | 797 | { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */ |
| 798 | .pvr_mask = 0x7fff0000, |
| 799 | .pvr_value = 0x00840000, |
| 800 | .cpu_name = "e300c2", |
| 801 | .cpu_features = CPU_FTRS_E300, |
| 802 | .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, |
| 803 | .icache_bsize = 32, |
| 804 | .dcache_bsize = 32, |
| 805 | .cpu_setup = __setup_cpu_603, |
| 806 | .platform = "ppc603", |
| 807 | }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 808 | { /* default match, we assume split I/D cache & TB (non-601)... */ |
| 809 | .pvr_mask = 0x00000000, |
| 810 | .pvr_value = 0x00000000, |
| 811 | .cpu_name = "(generic PPC)", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 812 | .cpu_features = CPU_FTRS_CLASSIC32, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 813 | .cpu_user_features = COMMON_USER, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 814 | .icache_bsize = 32, |
| 815 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 816 | .platform = "ppc603", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 817 | }, |
| 818 | #endif /* CLASSIC_PPC */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 819 | #ifdef CONFIG_8xx |
| 820 | { /* 8xx */ |
| 821 | .pvr_mask = 0xffff0000, |
| 822 | .pvr_value = 0x00500000, |
| 823 | .cpu_name = "8xx", |
| 824 | /* CPU_FTR_MAYBE_CAN_DOZE is possible, |
| 825 | * if the 8xx code is there.... */ |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 826 | .cpu_features = CPU_FTRS_8XX, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 827 | .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, |
| 828 | .icache_bsize = 16, |
| 829 | .dcache_bsize = 16, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 830 | .platform = "ppc823", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 831 | }, |
| 832 | #endif /* CONFIG_8xx */ |
| 833 | #ifdef CONFIG_40x |
| 834 | { /* 403GC */ |
| 835 | .pvr_mask = 0xffffff00, |
| 836 | .pvr_value = 0x00200200, |
| 837 | .cpu_name = "403GC", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 838 | .cpu_features = CPU_FTRS_40X, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 839 | .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, |
| 840 | .icache_bsize = 16, |
| 841 | .dcache_bsize = 16, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 842 | .platform = "ppc403", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 843 | }, |
| 844 | { /* 403GCX */ |
| 845 | .pvr_mask = 0xffffff00, |
| 846 | .pvr_value = 0x00201400, |
| 847 | .cpu_name = "403GCX", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 848 | .cpu_features = CPU_FTRS_40X, |
Paul Mackerras | 9859901 | 2005-10-22 16:51:34 +1000 | [diff] [blame] | 849 | .cpu_user_features = PPC_FEATURE_32 | |
| 850 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 851 | .icache_bsize = 16, |
| 852 | .dcache_bsize = 16, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 853 | .platform = "ppc403", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 854 | }, |
| 855 | { /* 403G ?? */ |
| 856 | .pvr_mask = 0xffff0000, |
| 857 | .pvr_value = 0x00200000, |
| 858 | .cpu_name = "403G ??", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 859 | .cpu_features = CPU_FTRS_40X, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 860 | .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, |
| 861 | .icache_bsize = 16, |
| 862 | .dcache_bsize = 16, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 863 | .platform = "ppc403", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 864 | }, |
| 865 | { /* 405GP */ |
| 866 | .pvr_mask = 0xffff0000, |
| 867 | .pvr_value = 0x40110000, |
| 868 | .cpu_name = "405GP", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 869 | .cpu_features = CPU_FTRS_40X, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 870 | .cpu_user_features = PPC_FEATURE_32 | |
| 871 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, |
| 872 | .icache_bsize = 32, |
| 873 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 874 | .platform = "ppc405", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 875 | }, |
| 876 | { /* STB 03xxx */ |
| 877 | .pvr_mask = 0xffff0000, |
| 878 | .pvr_value = 0x40130000, |
| 879 | .cpu_name = "STB03xxx", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 880 | .cpu_features = CPU_FTRS_40X, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 881 | .cpu_user_features = PPC_FEATURE_32 | |
| 882 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, |
| 883 | .icache_bsize = 32, |
| 884 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 885 | .platform = "ppc405", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 886 | }, |
| 887 | { /* STB 04xxx */ |
| 888 | .pvr_mask = 0xffff0000, |
| 889 | .pvr_value = 0x41810000, |
| 890 | .cpu_name = "STB04xxx", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 891 | .cpu_features = CPU_FTRS_40X, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 892 | .cpu_user_features = PPC_FEATURE_32 | |
| 893 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, |
| 894 | .icache_bsize = 32, |
| 895 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 896 | .platform = "ppc405", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 897 | }, |
| 898 | { /* NP405L */ |
| 899 | .pvr_mask = 0xffff0000, |
| 900 | .pvr_value = 0x41610000, |
| 901 | .cpu_name = "NP405L", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 902 | .cpu_features = CPU_FTRS_40X, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 903 | .cpu_user_features = PPC_FEATURE_32 | |
| 904 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, |
| 905 | .icache_bsize = 32, |
| 906 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 907 | .platform = "ppc405", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 908 | }, |
| 909 | { /* NP4GS3 */ |
| 910 | .pvr_mask = 0xffff0000, |
| 911 | .pvr_value = 0x40B10000, |
| 912 | .cpu_name = "NP4GS3", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 913 | .cpu_features = CPU_FTRS_40X, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 914 | .cpu_user_features = PPC_FEATURE_32 | |
| 915 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, |
| 916 | .icache_bsize = 32, |
| 917 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 918 | .platform = "ppc405", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 919 | }, |
| 920 | { /* NP405H */ |
| 921 | .pvr_mask = 0xffff0000, |
| 922 | .pvr_value = 0x41410000, |
| 923 | .cpu_name = "NP405H", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 924 | .cpu_features = CPU_FTRS_40X, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 925 | .cpu_user_features = PPC_FEATURE_32 | |
| 926 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, |
| 927 | .icache_bsize = 32, |
| 928 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 929 | .platform = "ppc405", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 930 | }, |
| 931 | { /* 405GPr */ |
| 932 | .pvr_mask = 0xffff0000, |
| 933 | .pvr_value = 0x50910000, |
| 934 | .cpu_name = "405GPr", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 935 | .cpu_features = CPU_FTRS_40X, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 936 | .cpu_user_features = PPC_FEATURE_32 | |
| 937 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, |
| 938 | .icache_bsize = 32, |
| 939 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 940 | .platform = "ppc405", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 941 | }, |
| 942 | { /* STBx25xx */ |
| 943 | .pvr_mask = 0xffff0000, |
| 944 | .pvr_value = 0x51510000, |
| 945 | .cpu_name = "STBx25xx", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 946 | .cpu_features = CPU_FTRS_40X, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 947 | .cpu_user_features = PPC_FEATURE_32 | |
| 948 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, |
| 949 | .icache_bsize = 32, |
| 950 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 951 | .platform = "ppc405", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 952 | }, |
| 953 | { /* 405LP */ |
| 954 | .pvr_mask = 0xffff0000, |
| 955 | .pvr_value = 0x41F10000, |
| 956 | .cpu_name = "405LP", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 957 | .cpu_features = CPU_FTRS_40X, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 958 | .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, |
| 959 | .icache_bsize = 32, |
| 960 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 961 | .platform = "ppc405", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 962 | }, |
| 963 | { /* Xilinx Virtex-II Pro */ |
Grant C. Likely | 72646c7 | 2006-01-19 01:13:20 -0700 | [diff] [blame] | 964 | .pvr_mask = 0xfffff000, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 965 | .pvr_value = 0x20010000, |
| 966 | .cpu_name = "Virtex-II Pro", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 967 | .cpu_features = CPU_FTRS_40X, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 968 | .cpu_user_features = PPC_FEATURE_32 | |
| 969 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, |
| 970 | .icache_bsize = 32, |
| 971 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 972 | .platform = "ppc405", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 973 | }, |
Grant C. Likely | 72646c7 | 2006-01-19 01:13:20 -0700 | [diff] [blame] | 974 | { /* Xilinx Virtex-4 FX */ |
| 975 | .pvr_mask = 0xfffff000, |
| 976 | .pvr_value = 0x20011000, |
| 977 | .cpu_name = "Virtex-4 FX", |
| 978 | .cpu_features = CPU_FTRS_40X, |
| 979 | .cpu_user_features = PPC_FEATURE_32 | |
| 980 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, |
| 981 | .icache_bsize = 32, |
| 982 | .dcache_bsize = 32, |
Peter Bergner | 838fdb4 | 2006-09-14 14:18:38 -0500 | [diff] [blame] | 983 | .platform = "ppc405", |
Grant C. Likely | 72646c7 | 2006-01-19 01:13:20 -0700 | [diff] [blame] | 984 | }, |
Eugene Surovegin | ad95d60 | 2005-06-07 13:22:09 -0700 | [diff] [blame] | 985 | { /* 405EP */ |
| 986 | .pvr_mask = 0xffff0000, |
| 987 | .pvr_value = 0x51210000, |
| 988 | .cpu_name = "405EP", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 989 | .cpu_features = CPU_FTRS_40X, |
Eugene Surovegin | ad95d60 | 2005-06-07 13:22:09 -0700 | [diff] [blame] | 990 | .cpu_user_features = PPC_FEATURE_32 | |
| 991 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, |
| 992 | .icache_bsize = 32, |
| 993 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 994 | .platform = "ppc405", |
Eugene Surovegin | ad95d60 | 2005-06-07 13:22:09 -0700 | [diff] [blame] | 995 | }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 996 | |
| 997 | #endif /* CONFIG_40x */ |
| 998 | #ifdef CONFIG_44x |
Matt Porter | c9cf73a | 2005-07-31 22:34:52 -0700 | [diff] [blame] | 999 | { |
| 1000 | .pvr_mask = 0xf0000fff, |
| 1001 | .pvr_value = 0x40000850, |
| 1002 | .cpu_name = "440EP Rev. A", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 1003 | .cpu_features = CPU_FTRS_44X, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1004 | .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU, |
Matt Porter | c9cf73a | 2005-07-31 22:34:52 -0700 | [diff] [blame] | 1005 | .icache_bsize = 32, |
| 1006 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1007 | .platform = "ppc440", |
Matt Porter | c9cf73a | 2005-07-31 22:34:52 -0700 | [diff] [blame] | 1008 | }, |
| 1009 | { |
| 1010 | .pvr_mask = 0xf0000fff, |
| 1011 | .pvr_value = 0x400008d3, |
| 1012 | .cpu_name = "440EP Rev. B", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 1013 | .cpu_features = CPU_FTRS_44X, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1014 | .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU, |
Matt Porter | c9cf73a | 2005-07-31 22:34:52 -0700 | [diff] [blame] | 1015 | .icache_bsize = 32, |
| 1016 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1017 | .platform = "ppc440", |
Matt Porter | c9cf73a | 2005-07-31 22:34:52 -0700 | [diff] [blame] | 1018 | }, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 1019 | { /* 440GP Rev. B */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1020 | .pvr_mask = 0xf0000fff, |
| 1021 | .pvr_value = 0x40000440, |
| 1022 | .cpu_name = "440GP Rev. B", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 1023 | .cpu_features = CPU_FTRS_44X, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1024 | .cpu_user_features = COMMON_USER_BOOKE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1025 | .icache_bsize = 32, |
| 1026 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1027 | .platform = "ppc440gp", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1028 | }, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 1029 | { /* 440GP Rev. C */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1030 | .pvr_mask = 0xf0000fff, |
| 1031 | .pvr_value = 0x40000481, |
| 1032 | .cpu_name = "440GP Rev. C", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 1033 | .cpu_features = CPU_FTRS_44X, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1034 | .cpu_user_features = COMMON_USER_BOOKE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1035 | .icache_bsize = 32, |
| 1036 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1037 | .platform = "ppc440gp", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1038 | }, |
| 1039 | { /* 440GX Rev. A */ |
| 1040 | .pvr_mask = 0xf0000fff, |
| 1041 | .pvr_value = 0x50000850, |
| 1042 | .cpu_name = "440GX Rev. A", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 1043 | .cpu_features = CPU_FTRS_44X, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1044 | .cpu_user_features = COMMON_USER_BOOKE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1045 | .icache_bsize = 32, |
| 1046 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1047 | .platform = "ppc440", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1048 | }, |
| 1049 | { /* 440GX Rev. B */ |
| 1050 | .pvr_mask = 0xf0000fff, |
| 1051 | .pvr_value = 0x50000851, |
| 1052 | .cpu_name = "440GX Rev. B", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 1053 | .cpu_features = CPU_FTRS_44X, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1054 | .cpu_user_features = COMMON_USER_BOOKE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1055 | .icache_bsize = 32, |
| 1056 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1057 | .platform = "ppc440", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1058 | }, |
| 1059 | { /* 440GX Rev. C */ |
| 1060 | .pvr_mask = 0xf0000fff, |
| 1061 | .pvr_value = 0x50000892, |
| 1062 | .cpu_name = "440GX Rev. C", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 1063 | .cpu_features = CPU_FTRS_44X, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1064 | .cpu_user_features = COMMON_USER_BOOKE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1065 | .icache_bsize = 32, |
| 1066 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1067 | .platform = "ppc440", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1068 | }, |
Eugene Surovegin | 9149fb3 | 2005-09-03 15:55:40 -0700 | [diff] [blame] | 1069 | { /* 440GX Rev. F */ |
| 1070 | .pvr_mask = 0xf0000fff, |
| 1071 | .pvr_value = 0x50000894, |
| 1072 | .cpu_name = "440GX Rev. F", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 1073 | .cpu_features = CPU_FTRS_44X, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1074 | .cpu_user_features = COMMON_USER_BOOKE, |
Eugene Surovegin | 9149fb3 | 2005-09-03 15:55:40 -0700 | [diff] [blame] | 1075 | .icache_bsize = 32, |
| 1076 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1077 | .platform = "ppc440", |
Eugene Surovegin | 9149fb3 | 2005-09-03 15:55:40 -0700 | [diff] [blame] | 1078 | }, |
Matt Porter | 656de7e | 2005-09-03 15:55:42 -0700 | [diff] [blame] | 1079 | { /* 440SP Rev. A */ |
| 1080 | .pvr_mask = 0xff000fff, |
| 1081 | .pvr_value = 0x53000891, |
| 1082 | .cpu_name = "440SP Rev. A", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 1083 | .cpu_features = CPU_FTRS_44X, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1084 | .cpu_user_features = COMMON_USER_BOOKE, |
Matt Porter | 656de7e | 2005-09-03 15:55:42 -0700 | [diff] [blame] | 1085 | .icache_bsize = 32, |
| 1086 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1087 | .platform = "ppc440", |
Matt Porter | 656de7e | 2005-09-03 15:55:42 -0700 | [diff] [blame] | 1088 | }, |
Roland Dreier | b0f7b8b | 2005-11-07 00:58:13 -0800 | [diff] [blame] | 1089 | { /* 440SPe Rev. A */ |
| 1090 | .pvr_mask = 0xff000fff, |
| 1091 | .pvr_value = 0x53000890, |
| 1092 | .cpu_name = "440SPe Rev. A", |
| 1093 | .cpu_features = CPU_FTR_SPLIT_ID_CACHE | |
| 1094 | CPU_FTR_USE_TB, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1095 | .cpu_user_features = COMMON_USER_BOOKE, |
Roland Dreier | b0f7b8b | 2005-11-07 00:58:13 -0800 | [diff] [blame] | 1096 | .icache_bsize = 32, |
| 1097 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1098 | .platform = "ppc440", |
Roland Dreier | b0f7b8b | 2005-11-07 00:58:13 -0800 | [diff] [blame] | 1099 | }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1100 | #endif /* CONFIG_44x */ |
Kumar Gala | 33d9e9b | 2005-06-25 14:54:37 -0700 | [diff] [blame] | 1101 | #ifdef CONFIG_FSL_BOOKE |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 1102 | { /* e200z5 */ |
Kumar Gala | 33d9e9b | 2005-06-25 14:54:37 -0700 | [diff] [blame] | 1103 | .pvr_mask = 0xfff00000, |
| 1104 | .pvr_value = 0x81000000, |
| 1105 | .cpu_name = "e200z5", |
| 1106 | /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */ |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 1107 | .cpu_features = CPU_FTRS_E200, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1108 | .cpu_user_features = COMMON_USER_BOOKE | |
| 1109 | PPC_FEATURE_HAS_EFP_SINGLE | |
Kumar Gala | 33d9e9b | 2005-06-25 14:54:37 -0700 | [diff] [blame] | 1110 | PPC_FEATURE_UNIFIED_CACHE, |
| 1111 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1112 | .platform = "ppc5554", |
Kumar Gala | 33d9e9b | 2005-06-25 14:54:37 -0700 | [diff] [blame] | 1113 | }, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 1114 | { /* e200z6 */ |
Kumar Gala | 33d9e9b | 2005-06-25 14:54:37 -0700 | [diff] [blame] | 1115 | .pvr_mask = 0xfff00000, |
| 1116 | .pvr_value = 0x81100000, |
| 1117 | .cpu_name = "e200z6", |
| 1118 | /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */ |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 1119 | .cpu_features = CPU_FTRS_E200, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1120 | .cpu_user_features = COMMON_USER_BOOKE | |
| 1121 | PPC_FEATURE_SPE_COMP | |
Kumar Gala | 33d9e9b | 2005-06-25 14:54:37 -0700 | [diff] [blame] | 1122 | PPC_FEATURE_HAS_EFP_SINGLE | |
| 1123 | PPC_FEATURE_UNIFIED_CACHE, |
| 1124 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1125 | .platform = "ppc5554", |
Kumar Gala | 33d9e9b | 2005-06-25 14:54:37 -0700 | [diff] [blame] | 1126 | }, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 1127 | { /* e500 */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1128 | .pvr_mask = 0xffff0000, |
| 1129 | .pvr_value = 0x80200000, |
| 1130 | .cpu_name = "e500", |
| 1131 | /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */ |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 1132 | .cpu_features = CPU_FTRS_E500, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1133 | .cpu_user_features = COMMON_USER_BOOKE | |
| 1134 | PPC_FEATURE_SPE_COMP | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1135 | PPC_FEATURE_HAS_EFP_SINGLE, |
| 1136 | .icache_bsize = 32, |
| 1137 | .dcache_bsize = 32, |
| 1138 | .num_pmcs = 4, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 1139 | .oprofile_cpu_type = "ppc/e500", |
Andy Whitcroft | 7a45fb1 | 2006-01-13 12:35:49 +0000 | [diff] [blame] | 1140 | .oprofile_type = PPC_OPROFILE_BOOKE, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1141 | .platform = "ppc8540", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1142 | }, |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 1143 | { /* e500v2 */ |
Kumar Gala | 5b37b70 | 2005-06-21 17:15:18 -0700 | [diff] [blame] | 1144 | .pvr_mask = 0xffff0000, |
| 1145 | .pvr_value = 0x80210000, |
| 1146 | .cpu_name = "e500v2", |
| 1147 | /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */ |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 1148 | .cpu_features = CPU_FTRS_E500_2, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1149 | .cpu_user_features = COMMON_USER_BOOKE | |
| 1150 | PPC_FEATURE_SPE_COMP | |
| 1151 | PPC_FEATURE_HAS_EFP_SINGLE | |
| 1152 | PPC_FEATURE_HAS_EFP_DOUBLE, |
Kumar Gala | 5b37b70 | 2005-06-21 17:15:18 -0700 | [diff] [blame] | 1153 | .icache_bsize = 32, |
| 1154 | .dcache_bsize = 32, |
| 1155 | .num_pmcs = 4, |
Andy Fleming | 555d97a | 2005-12-15 20:02:04 -0600 | [diff] [blame] | 1156 | .oprofile_cpu_type = "ppc/e500", |
Andy Whitcroft | 7a45fb1 | 2006-01-13 12:35:49 +0000 | [diff] [blame] | 1157 | .oprofile_type = PPC_OPROFILE_BOOKE, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1158 | .platform = "ppc8548", |
Kumar Gala | 5b37b70 | 2005-06-21 17:15:18 -0700 | [diff] [blame] | 1159 | }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1160 | #endif |
| 1161 | #if !CLASSIC_PPC |
| 1162 | { /* default match */ |
| 1163 | .pvr_mask = 0x00000000, |
| 1164 | .pvr_value = 0x00000000, |
| 1165 | .cpu_name = "(generic PPC)", |
Kumar Gala | 10b35d9 | 2005-09-23 14:08:58 -0500 | [diff] [blame] | 1166 | .cpu_features = CPU_FTRS_GENERIC_32, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1167 | .cpu_user_features = PPC_FEATURE_32, |
| 1168 | .icache_bsize = 32, |
| 1169 | .dcache_bsize = 32, |
Paul Mackerras | 80f15dc | 2006-01-14 10:11:39 +1100 | [diff] [blame] | 1170 | .platform = "powerpc", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1171 | } |
| 1172 | #endif /* !CLASSIC_PPC */ |
Stephen Rothwell | 4920960 | 2005-10-12 15:55:09 +1000 | [diff] [blame] | 1173 | #endif /* CONFIG_PPC32 */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1174 | }; |
Benjamin Herrenschmidt | 42c4aaa | 2006-10-24 16:42:40 +1000 | [diff] [blame] | 1175 | |
| 1176 | struct cpu_spec *identify_cpu(unsigned long offset) |
| 1177 | { |
| 1178 | struct cpu_spec *s = cpu_specs; |
| 1179 | struct cpu_spec **cur = &cur_cpu_spec; |
| 1180 | unsigned int pvr = mfspr(SPRN_PVR); |
| 1181 | int i; |
| 1182 | |
| 1183 | s = PTRRELOC(s); |
| 1184 | cur = PTRRELOC(cur); |
| 1185 | |
| 1186 | if (*cur != NULL) |
| 1187 | return PTRRELOC(*cur); |
| 1188 | |
| 1189 | for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) |
| 1190 | if ((pvr & s->pvr_mask) == s->pvr_value) { |
| 1191 | *cur = cpu_specs + i; |
| 1192 | #ifdef CONFIG_PPC64 |
| 1193 | /* ppc64 expects identify_cpu to also call setup_cpu |
| 1194 | * for that processor. I will consolidate that at a |
| 1195 | * later time, for now, just use our friend #ifdef. |
| 1196 | * we also don't need to PTRRELOC the function pointer |
| 1197 | * on ppc64 as we are running at 0 in real mode. |
| 1198 | */ |
| 1199 | if (s->cpu_setup) { |
| 1200 | s->cpu_setup(offset, s); |
| 1201 | } |
| 1202 | #endif /* CONFIG_PPC64 */ |
| 1203 | return s; |
| 1204 | } |
| 1205 | BUG(); |
| 1206 | return NULL; |
| 1207 | } |
| 1208 | |
Benjamin Herrenschmidt | 0909c8c | 2006-10-20 11:47:18 +1000 | [diff] [blame] | 1209 | 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] | 1210 | { |
| 1211 | struct fixup_entry { |
| 1212 | unsigned long mask; |
| 1213 | unsigned long value; |
Benjamin Herrenschmidt | 0909c8c | 2006-10-20 11:47:18 +1000 | [diff] [blame] | 1214 | long start_off; |
| 1215 | long end_off; |
Benjamin Herrenschmidt | 42c4aaa | 2006-10-24 16:42:40 +1000 | [diff] [blame] | 1216 | } *fcur, *fend; |
| 1217 | |
| 1218 | fcur = fixup_start; |
| 1219 | fend = fixup_end; |
| 1220 | |
| 1221 | for (; fcur < fend; fcur++) { |
| 1222 | unsigned int *pstart, *pend, *p; |
| 1223 | |
| 1224 | if ((value & fcur->mask) == fcur->value) |
| 1225 | continue; |
| 1226 | |
| 1227 | /* These PTRRELOCs will disappear once the new scheme for |
| 1228 | * modules and vdso is implemented |
| 1229 | */ |
Benjamin Herrenschmidt | 0909c8c | 2006-10-20 11:47:18 +1000 | [diff] [blame] | 1230 | pstart = ((unsigned int *)fcur) + (fcur->start_off / 4); |
| 1231 | pend = ((unsigned int *)fcur) + (fcur->end_off / 4); |
Benjamin Herrenschmidt | 42c4aaa | 2006-10-24 16:42:40 +1000 | [diff] [blame] | 1232 | |
| 1233 | for (p = pstart; p < pend; p++) { |
| 1234 | *p = 0x60000000u; |
| 1235 | asm volatile ("dcbst 0, %0" : : "r" (p)); |
| 1236 | } |
| 1237 | asm volatile ("sync" : : : "memory"); |
| 1238 | for (p = pstart; p < pend; p++) |
| 1239 | asm volatile ("icbi 0,%0" : : "r" (p)); |
| 1240 | asm volatile ("sync; isync" : : : "memory"); |
| 1241 | } |
| 1242 | } |