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/cputable.h>
23 #include <asm/firmware.h>
25 struct cpu_spec* cur_cpu_spec = NULL;
26 EXPORT_SYMBOL(cur_cpu_spec);
27 unsigned long ppc64_firmware_features;
30 * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's
31 * the responsibility of the appropriate CPU save/restore functions to
32 * eventually copy these settings over. Those save/restore aren't yet
33 * part of the cputable though. That has to be fixed for both ppc32
36 extern void __setup_cpu_power3(unsigned long offset, struct cpu_spec* spec);
37 extern void __setup_cpu_power4(unsigned long offset, struct cpu_spec* spec);
38 extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
39 extern void __setup_cpu_be(unsigned long offset, struct cpu_spec* spec);
42 /* We only set the altivec features if the kernel was compiled with altivec
46 #define CPU_FTR_ALTIVEC_COMP CPU_FTR_ALTIVEC
47 #define PPC_FEATURE_HAS_ALTIVEC_COMP PPC_FEATURE_HAS_ALTIVEC
49 #define CPU_FTR_ALTIVEC_COMP 0
50 #define PPC_FEATURE_HAS_ALTIVEC_COMP 0
53 struct cpu_spec cpu_specs[] = {
55 .pvr_mask = 0xffff0000,
56 .pvr_value = 0x00400000,
57 .cpu_name = "POWER3 (630)",
58 .cpu_features = CPU_FTR_SPLIT_ID_CACHE |
59 CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE | CPU_FTR_IABR |
61 .cpu_user_features = COMMON_USER_PPC64,
64 .cpu_setup = __setup_cpu_power3,
67 .pvr_mask = 0xffff0000,
68 .pvr_value = 0x00410000,
69 .cpu_name = "POWER3 (630+)",
70 .cpu_features = CPU_FTR_SPLIT_ID_CACHE |
71 CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE | CPU_FTR_IABR |
73 .cpu_user_features = COMMON_USER_PPC64,
76 .cpu_setup = __setup_cpu_power3,
79 .pvr_mask = 0xffff0000,
80 .pvr_value = 0x00330000,
81 .cpu_name = "RS64-II (northstar)",
82 .cpu_features = CPU_FTR_SPLIT_ID_CACHE |
83 CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE | CPU_FTR_IABR |
84 CPU_FTR_PMC8 | CPU_FTR_MMCRA | CPU_FTR_CTRL,
85 .cpu_user_features = COMMON_USER_PPC64,
88 .cpu_setup = __setup_cpu_power3,
91 .pvr_mask = 0xffff0000,
92 .pvr_value = 0x00340000,
93 .cpu_name = "RS64-III (pulsar)",
94 .cpu_features = CPU_FTR_SPLIT_ID_CACHE |
95 CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE | CPU_FTR_IABR |
96 CPU_FTR_PMC8 | CPU_FTR_MMCRA | CPU_FTR_CTRL,
97 .cpu_user_features = COMMON_USER_PPC64,
100 .cpu_setup = __setup_cpu_power3,
103 .pvr_mask = 0xffff0000,
104 .pvr_value = 0x00360000,
105 .cpu_name = "RS64-III (icestar)",
106 .cpu_features = CPU_FTR_SPLIT_ID_CACHE |
107 CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE | CPU_FTR_IABR |
108 CPU_FTR_PMC8 | CPU_FTR_MMCRA | CPU_FTR_CTRL,
109 .cpu_user_features = COMMON_USER_PPC64,
112 .cpu_setup = __setup_cpu_power3,
115 .pvr_mask = 0xffff0000,
116 .pvr_value = 0x00370000,
117 .cpu_name = "RS64-IV (sstar)",
118 .cpu_features = CPU_FTR_SPLIT_ID_CACHE |
119 CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE | CPU_FTR_IABR |
120 CPU_FTR_PMC8 | CPU_FTR_MMCRA | CPU_FTR_CTRL,
121 .cpu_user_features = COMMON_USER_PPC64,
124 .cpu_setup = __setup_cpu_power3,
127 .pvr_mask = 0xffff0000,
128 .pvr_value = 0x00350000,
129 .cpu_name = "POWER4 (gp)",
130 .cpu_features = CPU_FTR_SPLIT_ID_CACHE |
131 CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE |
132 CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_PMC8 | CPU_FTR_MMCRA,
133 .cpu_user_features = COMMON_USER_PPC64,
136 .cpu_setup = __setup_cpu_power4,
139 .pvr_mask = 0xffff0000,
140 .pvr_value = 0x00380000,
141 .cpu_name = "POWER4+ (gq)",
142 .cpu_features = CPU_FTR_SPLIT_ID_CACHE |
143 CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE |
144 CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_PMC8 | CPU_FTR_MMCRA,
145 .cpu_user_features = COMMON_USER_PPC64,
148 .cpu_setup = __setup_cpu_power4,
151 .pvr_mask = 0xffff0000,
152 .pvr_value = 0x00390000,
153 .cpu_name = "PPC970",
154 .cpu_features = CPU_FTR_SPLIT_ID_CACHE |
155 CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE |
156 CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_ALTIVEC_COMP |
157 CPU_FTR_CAN_NAP | CPU_FTR_PMC8 | CPU_FTR_MMCRA,
158 .cpu_user_features = COMMON_USER_PPC64 |
159 PPC_FEATURE_HAS_ALTIVEC_COMP,
162 .cpu_setup = __setup_cpu_ppc970,
165 .pvr_mask = 0xffff0000,
166 .pvr_value = 0x003c0000,
167 .cpu_name = "PPC970FX",
168 .cpu_features = CPU_FTR_SPLIT_ID_CACHE |
169 CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE |
170 CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_ALTIVEC_COMP |
171 CPU_FTR_CAN_NAP | CPU_FTR_PMC8 | CPU_FTR_MMCRA,
172 .cpu_user_features = COMMON_USER_PPC64 |
173 PPC_FEATURE_HAS_ALTIVEC_COMP,
176 .cpu_setup = __setup_cpu_ppc970,
179 .pvr_mask = 0xffff0000,
180 .pvr_value = 0x00440000,
181 .cpu_name = "PPC970MP",
182 .cpu_features = CPU_FTR_SPLIT_ID_CACHE |
183 CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE |
184 CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_ALTIVEC_COMP |
185 CPU_FTR_CAN_NAP | CPU_FTR_PMC8 | CPU_FTR_MMCRA,
186 .cpu_user_features = COMMON_USER_PPC64 |
187 PPC_FEATURE_HAS_ALTIVEC_COMP,
190 .cpu_setup = __setup_cpu_ppc970,
193 .pvr_mask = 0xffff0000,
194 .pvr_value = 0x003a0000,
195 .cpu_name = "POWER5 (gr)",
196 .cpu_features = CPU_FTR_SPLIT_ID_CACHE |
197 CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE |
198 CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_MMCRA | CPU_FTR_SMT |
199 CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE |
201 .cpu_user_features = COMMON_USER_PPC64,
204 .cpu_setup = __setup_cpu_power4,
207 .pvr_mask = 0xffff0000,
208 .pvr_value = 0x003b0000,
209 .cpu_name = "POWER5 (gs)",
210 .cpu_features = CPU_FTR_SPLIT_ID_CACHE |
211 CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE |
212 CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_MMCRA | CPU_FTR_SMT |
213 CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE |
215 .cpu_user_features = COMMON_USER_PPC64,
218 .cpu_setup = __setup_cpu_power4,
221 .pvr_mask = 0xffff0000,
222 .pvr_value = 0x00700000,
223 .cpu_name = "Broadband Engine",
224 .cpu_features = CPU_FTR_SPLIT_ID_CACHE |
225 CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE |
226 CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_ALTIVEC_COMP |
228 .cpu_user_features = COMMON_USER_PPC64 |
229 PPC_FEATURE_HAS_ALTIVEC_COMP,
232 .cpu_setup = __setup_cpu_be,
234 { /* default match */
235 .pvr_mask = 0x00000000,
236 .pvr_value = 0x00000000,
237 .cpu_name = "POWER4 (compatible)",
238 .cpu_features = CPU_FTR_SPLIT_ID_CACHE |
239 CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE |
240 CPU_FTR_PPCAS_ARCH_V2,
241 .cpu_user_features = COMMON_USER_PPC64,
244 .cpu_setup = __setup_cpu_power4,
248 firmware_feature_t firmware_features_table[FIRMWARE_MAX_FEATURES] = {
249 {FW_FEATURE_PFT, "hcall-pft"},
250 {FW_FEATURE_TCE, "hcall-tce"},
251 {FW_FEATURE_SPRG0, "hcall-sprg0"},
252 {FW_FEATURE_DABR, "hcall-dabr"},
253 {FW_FEATURE_COPY, "hcall-copy"},
254 {FW_FEATURE_ASR, "hcall-asr"},
255 {FW_FEATURE_DEBUG, "hcall-debug"},
256 {FW_FEATURE_PERF, "hcall-perf"},
257 {FW_FEATURE_DUMP, "hcall-dump"},
258 {FW_FEATURE_INTERRUPT, "hcall-interrupt"},
259 {FW_FEATURE_MIGRATE, "hcall-migrate"},
260 {FW_FEATURE_PERFMON, "hcall-perfmon"},
261 {FW_FEATURE_CRQ, "hcall-crq"},
262 {FW_FEATURE_VIO, "hcall-vio"},
263 {FW_FEATURE_RDMA, "hcall-rdma"},
264 {FW_FEATURE_LLAN, "hcall-lLAN"},
265 {FW_FEATURE_BULK, "hcall-bulk"},
266 {FW_FEATURE_XDABR, "hcall-xdabr"},
267 {FW_FEATURE_MULTITCE, "hcall-multi-tce"},
268 {FW_FEATURE_SPLPAR, "hcall-splpar"},