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>
24 struct cpu_spec* cur_cpu_spec = NULL;
25 EXPORT_SYMBOL(cur_cpu_spec);
28 * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's
29 * the responsibility of the appropriate CPU save/restore functions to
30 * eventually copy these settings over. Those save/restore aren't yet
31 * part of the cputable though. That has to be fixed for both ppc32
34 extern void __setup_cpu_power3(unsigned long offset, struct cpu_spec* spec);
35 extern void __setup_cpu_power4(unsigned long offset, struct cpu_spec* spec);
36 extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
37 extern void __setup_cpu_be(unsigned long offset, struct cpu_spec* spec);
40 /* We only set the altivec features if the kernel was compiled with altivec
44 #define CPU_FTR_ALTIVEC_COMP CPU_FTR_ALTIVEC
45 #define PPC_FEATURE_HAS_ALTIVEC_COMP PPC_FEATURE_HAS_ALTIVEC
47 #define CPU_FTR_ALTIVEC_COMP 0
48 #define PPC_FEATURE_HAS_ALTIVEC_COMP 0
51 struct cpu_spec cpu_specs[] = {
53 0xffff0000, 0x00400000, "POWER3 (630)",
54 CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE |
55 CPU_FTR_IABR | CPU_FTR_PMC8,
62 0xffff0000, 0x00410000, "POWER3 (630+)",
63 CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE |
64 CPU_FTR_IABR | CPU_FTR_PMC8,
71 0xffff0000, 0x00330000, "RS64-II (northstar)",
72 CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE |
73 CPU_FTR_IABR | CPU_FTR_PMC8 | CPU_FTR_MMCRA,
80 0xffff0000, 0x00340000, "RS64-III (pulsar)",
81 CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE |
82 CPU_FTR_IABR | CPU_FTR_PMC8 | CPU_FTR_MMCRA,
89 0xffff0000, 0x00360000, "RS64-III (icestar)",
90 CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE |
91 CPU_FTR_IABR | CPU_FTR_PMC8 | CPU_FTR_MMCRA,
98 0xffff0000, 0x00370000, "RS64-IV (sstar)",
99 CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE |
100 CPU_FTR_IABR | CPU_FTR_PMC8 | CPU_FTR_MMCRA,
107 0xffff0000, 0x00350000, "POWER4 (gp)",
108 CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE |
109 CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_PMC8 | CPU_FTR_MMCRA,
116 0xffff0000, 0x00380000, "POWER4+ (gq)",
117 CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE |
118 CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_PMC8 | CPU_FTR_MMCRA,
125 0xffff0000, 0x00390000, "PPC970",
126 CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE |
127 CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_ALTIVEC_COMP |
128 CPU_FTR_CAN_NAP | CPU_FTR_PMC8 | CPU_FTR_MMCRA,
129 COMMON_USER_PPC64 | PPC_FEATURE_HAS_ALTIVEC_COMP,
135 0xffff0000, 0x003c0000, "PPC970FX",
136 CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE |
137 CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_ALTIVEC_COMP |
138 CPU_FTR_CAN_NAP | CPU_FTR_PMC8 | CPU_FTR_MMCRA,
139 COMMON_USER_PPC64 | PPC_FEATURE_HAS_ALTIVEC_COMP,
145 0xffff0000, 0x003a0000, "POWER5 (gr)",
146 CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE |
147 CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_MMCRA | CPU_FTR_SMT |
148 CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE |
156 0xffff0000, 0x003b0000, "POWER5 (gs)",
157 CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE |
158 CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_MMCRA | CPU_FTR_SMT |
159 CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE |
167 0xffff0000, 0x00700000, "Broadband Engine",
168 CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE |
169 CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_ALTIVEC_COMP |
171 COMMON_USER_PPC64 | PPC_FEATURE_HAS_ALTIVEC_COMP,
176 { /* default match */
177 0x00000000, 0x00000000, "POWER4 (compatible)",
178 CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE |
179 CPU_FTR_PPCAS_ARCH_V2,
187 firmware_feature_t firmware_features_table[FIRMWARE_MAX_FEATURES] = {
188 {FW_FEATURE_PFT, "hcall-pft"},
189 {FW_FEATURE_TCE, "hcall-tce"},
190 {FW_FEATURE_SPRG0, "hcall-sprg0"},
191 {FW_FEATURE_DABR, "hcall-dabr"},
192 {FW_FEATURE_COPY, "hcall-copy"},
193 {FW_FEATURE_ASR, "hcall-asr"},
194 {FW_FEATURE_DEBUG, "hcall-debug"},
195 {FW_FEATURE_PERF, "hcall-perf"},
196 {FW_FEATURE_DUMP, "hcall-dump"},
197 {FW_FEATURE_INTERRUPT, "hcall-interrupt"},
198 {FW_FEATURE_MIGRATE, "hcall-migrate"},
199 {FW_FEATURE_PERFMON, "hcall-perfmon"},
200 {FW_FEATURE_CRQ, "hcall-crq"},
201 {FW_FEATURE_VIO, "hcall-vio"},
202 {FW_FEATURE_RDMA, "hcall-rdma"},
203 {FW_FEATURE_LLAN, "hcall-lLAN"},
204 {FW_FEATURE_BULK, "hcall-bulk"},
205 {FW_FEATURE_XDABR, "hcall-xdabr"},
206 {FW_FEATURE_MULTITCE, "hcall-multi-tce"},
207 {FW_FEATURE_SPLPAR, "hcall-splpar"},