2 * arch/ppc64/kernel/cputable.c
4 * Copyright (C) 2001 Ben. Herrenschmidt (benh@kernel.crashing.org)
6 * Modifications for ppc64:
7 * Copyright (C) 2003 Dave Engebretsen <engebret@us.ibm.com>
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version
12 * 2 of the License, or (at your option) any later version.
15 #include <linux/config.h>
16 #include <linux/string.h>
17 #include <linux/sched.h>
18 #include <linux/threads.h>
19 #include <linux/init.h>
20 #include <linux/module.h>
22 #include <asm/oprofile_impl.h>
23 #include <asm/cputable.h>
25 struct cpu_spec* cur_cpu_spec = NULL;
26 EXPORT_SYMBOL(cur_cpu_spec);
29 * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's
30 * the responsibility of the appropriate CPU save/restore functions to
31 * eventually copy these settings over. Those save/restore aren't yet
32 * part of the cputable though. That has to be fixed for both ppc32
35 extern void __setup_cpu_power3(unsigned long offset, struct cpu_spec* spec);
36 extern void __setup_cpu_power4(unsigned long offset, struct cpu_spec* spec);
37 extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
38 extern void __setup_cpu_be(unsigned long offset, struct cpu_spec* spec);
40 struct cpu_spec cpu_specs[] = {
42 .pvr_mask = 0xffff0000,
43 .pvr_value = 0x00400000,
44 .cpu_name = "POWER3 (630)",
45 .cpu_features = CPU_FTRS_POWER3,
46 .cpu_user_features = COMMON_USER_PPC64,
50 .cpu_setup = __setup_cpu_power3,
51 #ifdef CONFIG_OPROFILE
52 .oprofile_cpu_type = "ppc64/power3",
53 .oprofile_model = &op_model_rs64,
57 .pvr_mask = 0xffff0000,
58 .pvr_value = 0x00410000,
59 .cpu_name = "POWER3 (630+)",
60 .cpu_features = CPU_FTRS_POWER3,
61 .cpu_user_features = COMMON_USER_PPC64,
65 .cpu_setup = __setup_cpu_power3,
66 #ifdef CONFIG_OPROFILE
67 .oprofile_cpu_type = "ppc64/power3",
68 .oprofile_model = &op_model_rs64,
72 .pvr_mask = 0xffff0000,
73 .pvr_value = 0x00330000,
74 .cpu_name = "RS64-II (northstar)",
75 .cpu_features = CPU_FTRS_RS64,
76 .cpu_user_features = COMMON_USER_PPC64,
80 .cpu_setup = __setup_cpu_power3,
81 #ifdef CONFIG_OPROFILE
82 .oprofile_cpu_type = "ppc64/rs64",
83 .oprofile_model = &op_model_rs64,
87 .pvr_mask = 0xffff0000,
88 .pvr_value = 0x00340000,
89 .cpu_name = "RS64-III (pulsar)",
90 .cpu_features = CPU_FTRS_RS64,
91 .cpu_user_features = COMMON_USER_PPC64,
95 .cpu_setup = __setup_cpu_power3,
96 #ifdef CONFIG_OPROFILE
97 .oprofile_cpu_type = "ppc64/rs64",
98 .oprofile_model = &op_model_rs64,
102 .pvr_mask = 0xffff0000,
103 .pvr_value = 0x00360000,
104 .cpu_name = "RS64-III (icestar)",
105 .cpu_features = CPU_FTRS_RS64,
106 .cpu_user_features = COMMON_USER_PPC64,
110 .cpu_setup = __setup_cpu_power3,
111 #ifdef CONFIG_OPROFILE
112 .oprofile_cpu_type = "ppc64/rs64",
113 .oprofile_model = &op_model_rs64,
117 .pvr_mask = 0xffff0000,
118 .pvr_value = 0x00370000,
119 .cpu_name = "RS64-IV (sstar)",
120 .cpu_features = CPU_FTRS_RS64,
121 .cpu_user_features = COMMON_USER_PPC64,
125 .cpu_setup = __setup_cpu_power3,
126 #ifdef CONFIG_OPROFILE
127 .oprofile_cpu_type = "ppc64/rs64",
128 .oprofile_model = &op_model_rs64,
132 .pvr_mask = 0xffff0000,
133 .pvr_value = 0x00350000,
134 .cpu_name = "POWER4 (gp)",
135 .cpu_features = CPU_FTRS_POWER4,
136 .cpu_user_features = COMMON_USER_PPC64,
140 .cpu_setup = __setup_cpu_power4,
141 #ifdef CONFIG_OPROFILE
142 .oprofile_cpu_type = "ppc64/power4",
143 .oprofile_model = &op_model_rs64,
147 .pvr_mask = 0xffff0000,
148 .pvr_value = 0x00380000,
149 .cpu_name = "POWER4+ (gq)",
150 .cpu_features = CPU_FTRS_POWER4,
151 .cpu_user_features = COMMON_USER_PPC64,
155 .cpu_setup = __setup_cpu_power4,
156 #ifdef CONFIG_OPROFILE
157 .oprofile_cpu_type = "ppc64/power4",
158 .oprofile_model = &op_model_power4,
162 .pvr_mask = 0xffff0000,
163 .pvr_value = 0x00390000,
164 .cpu_name = "PPC970",
165 .cpu_features = CPU_FTRS_PPC970,
166 .cpu_user_features = COMMON_USER_PPC64 |
167 PPC_FEATURE_HAS_ALTIVEC_COMP,
171 .cpu_setup = __setup_cpu_ppc970,
172 #ifdef CONFIG_OPROFILE
173 .oprofile_cpu_type = "ppc64/970",
174 .oprofile_model = &op_model_power4,
178 .pvr_mask = 0xffff0000,
179 .pvr_value = 0x003c0000,
180 .cpu_name = "PPC970FX",
181 .cpu_features = CPU_FTRS_PPC970,
182 .cpu_user_features = COMMON_USER_PPC64 |
183 PPC_FEATURE_HAS_ALTIVEC_COMP,
187 .cpu_setup = __setup_cpu_ppc970,
188 #ifdef CONFIG_OPROFILE
189 .oprofile_cpu_type = "ppc64/970",
190 .oprofile_model = &op_model_power4,
194 .pvr_mask = 0xffff0000,
195 .pvr_value = 0x00440000,
196 .cpu_name = "PPC970MP",
197 .cpu_features = CPU_FTRS_PPC970,
198 .cpu_user_features = COMMON_USER_PPC64 |
199 PPC_FEATURE_HAS_ALTIVEC_COMP,
202 .cpu_setup = __setup_cpu_ppc970,
203 #ifdef CONFIG_OPROFILE
204 .oprofile_cpu_type = "ppc64/970",
205 .oprofile_model = &op_model_power4,
209 .pvr_mask = 0xffff0000,
210 .pvr_value = 0x003a0000,
211 .cpu_name = "POWER5 (gr)",
212 .cpu_features = CPU_FTRS_POWER5,
213 .cpu_user_features = COMMON_USER_PPC64,
217 .cpu_setup = __setup_cpu_power4,
218 #ifdef CONFIG_OPROFILE
219 .oprofile_cpu_type = "ppc64/power5",
220 .oprofile_model = &op_model_power4,
224 .pvr_mask = 0xffff0000,
225 .pvr_value = 0x003b0000,
226 .cpu_name = "POWER5 (gs)",
227 .cpu_features = CPU_FTRS_POWER5,
228 .cpu_user_features = COMMON_USER_PPC64,
232 .cpu_setup = __setup_cpu_power4,
233 #ifdef CONFIG_OPROFILE
234 .oprofile_cpu_type = "ppc64/power5",
235 .oprofile_model = &op_model_power4,
239 .pvr_mask = 0xffff0000,
240 .pvr_value = 0x00700000,
241 .cpu_name = "Cell Broadband Engine",
242 .cpu_features = CPU_FTRS_CELL,
243 .cpu_user_features = COMMON_USER_PPC64 |
244 PPC_FEATURE_HAS_ALTIVEC_COMP,
247 .cpu_setup = __setup_cpu_be,
249 { /* default match */
250 .pvr_mask = 0x00000000,
251 .pvr_value = 0x00000000,
252 .cpu_name = "POWER4 (compatible)",
253 .cpu_features = CPU_FTRS_COMPATIBLE,
254 .cpu_user_features = COMMON_USER_PPC64,
258 .cpu_setup = __setup_cpu_power4,