2005-04-16 18:20:36 -04:00
|
|
|
/*
|
|
|
|
* arch/ppc64/kernel/cputable.c
|
|
|
|
*
|
|
|
|
* Copyright (C) 2001 Ben. Herrenschmidt (benh@kernel.crashing.org)
|
|
|
|
*
|
|
|
|
* Modifications for ppc64:
|
|
|
|
* Copyright (C) 2003 Dave Engebretsen <engebret@us.ibm.com>
|
2005-08-03 00:40:16 -04:00
|
|
|
*
|
2005-04-16 18:20:36 -04:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version
|
|
|
|
* 2 of the License, or (at your option) any later version.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/config.h>
|
|
|
|
#include <linux/string.h>
|
|
|
|
#include <linux/sched.h>
|
|
|
|
#include <linux/threads.h>
|
|
|
|
#include <linux/init.h>
|
|
|
|
#include <linux/module.h>
|
|
|
|
|
2005-09-06 00:57:52 -04:00
|
|
|
#include <asm/oprofile_impl.h>
|
2005-04-16 18:20:36 -04:00
|
|
|
#include <asm/cputable.h>
|
|
|
|
|
|
|
|
struct cpu_spec* cur_cpu_spec = NULL;
|
|
|
|
EXPORT_SYMBOL(cur_cpu_spec);
|
|
|
|
|
|
|
|
/* NOTE:
|
|
|
|
* Unlike ppc32, ppc64 will only call this once for the boot CPU, it's
|
|
|
|
* the responsibility of the appropriate CPU save/restore functions to
|
|
|
|
* eventually copy these settings over. Those save/restore aren't yet
|
|
|
|
* part of the cputable though. That has to be fixed for both ppc32
|
|
|
|
* and ppc64
|
|
|
|
*/
|
|
|
|
extern void __setup_cpu_power3(unsigned long offset, struct cpu_spec* spec);
|
|
|
|
extern void __setup_cpu_power4(unsigned long offset, struct cpu_spec* spec);
|
|
|
|
extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
|
2005-06-22 19:43:37 -04:00
|
|
|
extern void __setup_cpu_be(unsigned long offset, struct cpu_spec* spec);
|
2005-04-16 18:20:36 -04:00
|
|
|
|
|
|
|
struct cpu_spec cpu_specs[] = {
|
2005-07-07 20:56:11 -04:00
|
|
|
{ /* Power3 */
|
|
|
|
.pvr_mask = 0xffff0000,
|
|
|
|
.pvr_value = 0x00400000,
|
|
|
|
.cpu_name = "POWER3 (630)",
|
2005-09-23 15:08:58 -04:00
|
|
|
.cpu_features = CPU_FTRS_POWER3,
|
|
|
|
.cpu_user_features = COMMON_USER_PPC64,
|
2005-07-07 20:56:11 -04:00
|
|
|
.icache_bsize = 128,
|
|
|
|
.dcache_bsize = 128,
|
2005-09-06 00:47:49 -04:00
|
|
|
.num_pmcs = 8,
|
2005-07-07 20:56:11 -04:00
|
|
|
.cpu_setup = __setup_cpu_power3,
|
2005-09-06 00:59:16 -04:00
|
|
|
#ifdef CONFIG_OPROFILE
|
2005-09-06 00:53:57 -04:00
|
|
|
.oprofile_cpu_type = "ppc64/power3",
|
2005-09-06 00:57:52 -04:00
|
|
|
.oprofile_model = &op_model_rs64,
|
2005-09-06 00:59:16 -04:00
|
|
|
#endif
|
2005-07-07 20:56:11 -04:00
|
|
|
},
|
|
|
|
{ /* Power3+ */
|
|
|
|
.pvr_mask = 0xffff0000,
|
|
|
|
.pvr_value = 0x00410000,
|
|
|
|
.cpu_name = "POWER3 (630+)",
|
2005-09-23 15:08:58 -04:00
|
|
|
.cpu_features = CPU_FTRS_POWER3,
|
2005-07-07 20:56:11 -04:00
|
|
|
.cpu_user_features = COMMON_USER_PPC64,
|
|
|
|
.icache_bsize = 128,
|
|
|
|
.dcache_bsize = 128,
|
2005-09-06 00:47:49 -04:00
|
|
|
.num_pmcs = 8,
|
2005-07-07 20:56:11 -04:00
|
|
|
.cpu_setup = __setup_cpu_power3,
|
2005-09-06 00:59:16 -04:00
|
|
|
#ifdef CONFIG_OPROFILE
|
2005-09-06 00:53:57 -04:00
|
|
|
.oprofile_cpu_type = "ppc64/power3",
|
2005-09-06 00:57:52 -04:00
|
|
|
.oprofile_model = &op_model_rs64,
|
2005-09-06 00:59:16 -04:00
|
|
|
#endif
|
2005-07-07 20:56:11 -04:00
|
|
|
},
|
|
|
|
{ /* Northstar */
|
|
|
|
.pvr_mask = 0xffff0000,
|
|
|
|
.pvr_value = 0x00330000,
|
|
|
|
.cpu_name = "RS64-II (northstar)",
|
2005-09-23 15:08:58 -04:00
|
|
|
.cpu_features = CPU_FTRS_RS64,
|
2005-07-07 20:56:11 -04:00
|
|
|
.cpu_user_features = COMMON_USER_PPC64,
|
|
|
|
.icache_bsize = 128,
|
|
|
|
.dcache_bsize = 128,
|
2005-09-06 00:47:49 -04:00
|
|
|
.num_pmcs = 8,
|
2005-07-07 20:56:11 -04:00
|
|
|
.cpu_setup = __setup_cpu_power3,
|
2005-09-06 00:59:16 -04:00
|
|
|
#ifdef CONFIG_OPROFILE
|
2005-09-06 00:53:57 -04:00
|
|
|
.oprofile_cpu_type = "ppc64/rs64",
|
2005-09-06 00:57:52 -04:00
|
|
|
.oprofile_model = &op_model_rs64,
|
2005-09-06 00:59:16 -04:00
|
|
|
#endif
|
2005-07-07 20:56:11 -04:00
|
|
|
},
|
|
|
|
{ /* Pulsar */
|
|
|
|
.pvr_mask = 0xffff0000,
|
|
|
|
.pvr_value = 0x00340000,
|
|
|
|
.cpu_name = "RS64-III (pulsar)",
|
2005-09-23 15:08:58 -04:00
|
|
|
.cpu_features = CPU_FTRS_RS64,
|
2005-07-07 20:56:11 -04:00
|
|
|
.cpu_user_features = COMMON_USER_PPC64,
|
|
|
|
.icache_bsize = 128,
|
|
|
|
.dcache_bsize = 128,
|
2005-09-06 00:47:49 -04:00
|
|
|
.num_pmcs = 8,
|
2005-07-07 20:56:11 -04:00
|
|
|
.cpu_setup = __setup_cpu_power3,
|
2005-09-06 00:59:16 -04:00
|
|
|
#ifdef CONFIG_OPROFILE
|
2005-09-06 00:53:57 -04:00
|
|
|
.oprofile_cpu_type = "ppc64/rs64",
|
2005-09-06 00:57:52 -04:00
|
|
|
.oprofile_model = &op_model_rs64,
|
2005-09-06 00:59:16 -04:00
|
|
|
#endif
|
2005-07-07 20:56:11 -04:00
|
|
|
},
|
|
|
|
{ /* I-star */
|
|
|
|
.pvr_mask = 0xffff0000,
|
|
|
|
.pvr_value = 0x00360000,
|
|
|
|
.cpu_name = "RS64-III (icestar)",
|
2005-09-23 15:08:58 -04:00
|
|
|
.cpu_features = CPU_FTRS_RS64,
|
2005-07-07 20:56:11 -04:00
|
|
|
.cpu_user_features = COMMON_USER_PPC64,
|
|
|
|
.icache_bsize = 128,
|
|
|
|
.dcache_bsize = 128,
|
2005-09-06 00:47:49 -04:00
|
|
|
.num_pmcs = 8,
|
2005-07-07 20:56:11 -04:00
|
|
|
.cpu_setup = __setup_cpu_power3,
|
2005-09-06 00:59:16 -04:00
|
|
|
#ifdef CONFIG_OPROFILE
|
2005-09-06 00:53:57 -04:00
|
|
|
.oprofile_cpu_type = "ppc64/rs64",
|
2005-09-06 00:57:52 -04:00
|
|
|
.oprofile_model = &op_model_rs64,
|
2005-09-06 00:59:16 -04:00
|
|
|
#endif
|
2005-07-07 20:56:11 -04:00
|
|
|
},
|
|
|
|
{ /* S-star */
|
|
|
|
.pvr_mask = 0xffff0000,
|
|
|
|
.pvr_value = 0x00370000,
|
|
|
|
.cpu_name = "RS64-IV (sstar)",
|
2005-09-23 15:08:58 -04:00
|
|
|
.cpu_features = CPU_FTRS_RS64,
|
2005-07-07 20:56:11 -04:00
|
|
|
.cpu_user_features = COMMON_USER_PPC64,
|
|
|
|
.icache_bsize = 128,
|
|
|
|
.dcache_bsize = 128,
|
2005-09-06 00:47:49 -04:00
|
|
|
.num_pmcs = 8,
|
2005-07-07 20:56:11 -04:00
|
|
|
.cpu_setup = __setup_cpu_power3,
|
2005-09-06 00:59:16 -04:00
|
|
|
#ifdef CONFIG_OPROFILE
|
2005-09-06 00:53:57 -04:00
|
|
|
.oprofile_cpu_type = "ppc64/rs64",
|
2005-09-06 00:57:52 -04:00
|
|
|
.oprofile_model = &op_model_rs64,
|
2005-09-06 00:59:16 -04:00
|
|
|
#endif
|
2005-07-07 20:56:11 -04:00
|
|
|
},
|
|
|
|
{ /* Power4 */
|
|
|
|
.pvr_mask = 0xffff0000,
|
|
|
|
.pvr_value = 0x00350000,
|
|
|
|
.cpu_name = "POWER4 (gp)",
|
2005-09-23 15:08:58 -04:00
|
|
|
.cpu_features = CPU_FTRS_POWER4,
|
2005-07-07 20:56:11 -04:00
|
|
|
.cpu_user_features = COMMON_USER_PPC64,
|
|
|
|
.icache_bsize = 128,
|
|
|
|
.dcache_bsize = 128,
|
2005-09-06 00:47:49 -04:00
|
|
|
.num_pmcs = 8,
|
2005-07-07 20:56:11 -04:00
|
|
|
.cpu_setup = __setup_cpu_power4,
|
2005-09-06 00:59:16 -04:00
|
|
|
#ifdef CONFIG_OPROFILE
|
2005-09-06 00:53:57 -04:00
|
|
|
.oprofile_cpu_type = "ppc64/power4",
|
2005-09-06 00:57:52 -04:00
|
|
|
.oprofile_model = &op_model_rs64,
|
2005-09-06 00:59:16 -04:00
|
|
|
#endif
|
2005-07-07 20:56:11 -04:00
|
|
|
},
|
|
|
|
{ /* Power4+ */
|
|
|
|
.pvr_mask = 0xffff0000,
|
|
|
|
.pvr_value = 0x00380000,
|
|
|
|
.cpu_name = "POWER4+ (gq)",
|
2005-09-23 15:08:58 -04:00
|
|
|
.cpu_features = CPU_FTRS_POWER4,
|
2005-07-07 20:56:11 -04:00
|
|
|
.cpu_user_features = COMMON_USER_PPC64,
|
|
|
|
.icache_bsize = 128,
|
|
|
|
.dcache_bsize = 128,
|
2005-09-06 00:47:49 -04:00
|
|
|
.num_pmcs = 8,
|
2005-07-07 20:56:11 -04:00
|
|
|
.cpu_setup = __setup_cpu_power4,
|
2005-09-06 00:59:16 -04:00
|
|
|
#ifdef CONFIG_OPROFILE
|
2005-09-06 00:53:57 -04:00
|
|
|
.oprofile_cpu_type = "ppc64/power4",
|
2005-09-06 00:57:52 -04:00
|
|
|
.oprofile_model = &op_model_power4,
|
2005-09-06 00:59:16 -04:00
|
|
|
#endif
|
2005-07-07 20:56:11 -04:00
|
|
|
},
|
|
|
|
{ /* PPC970 */
|
|
|
|
.pvr_mask = 0xffff0000,
|
|
|
|
.pvr_value = 0x00390000,
|
|
|
|
.cpu_name = "PPC970",
|
2005-09-23 15:08:58 -04:00
|
|
|
.cpu_features = CPU_FTRS_PPC970,
|
2005-07-07 20:56:11 -04:00
|
|
|
.cpu_user_features = COMMON_USER_PPC64 |
|
|
|
|
PPC_FEATURE_HAS_ALTIVEC_COMP,
|
|
|
|
.icache_bsize = 128,
|
|
|
|
.dcache_bsize = 128,
|
2005-09-06 00:47:49 -04:00
|
|
|
.num_pmcs = 8,
|
2005-07-07 20:56:11 -04:00
|
|
|
.cpu_setup = __setup_cpu_ppc970,
|
2005-09-06 00:59:16 -04:00
|
|
|
#ifdef CONFIG_OPROFILE
|
2005-09-06 00:53:57 -04:00
|
|
|
.oprofile_cpu_type = "ppc64/970",
|
2005-09-06 00:57:52 -04:00
|
|
|
.oprofile_model = &op_model_power4,
|
2005-09-06 00:59:16 -04:00
|
|
|
#endif
|
2005-07-07 20:56:11 -04:00
|
|
|
},
|
|
|
|
{ /* PPC970FX */
|
|
|
|
.pvr_mask = 0xffff0000,
|
|
|
|
.pvr_value = 0x003c0000,
|
|
|
|
.cpu_name = "PPC970FX",
|
2005-09-23 15:08:58 -04:00
|
|
|
.cpu_features = CPU_FTRS_PPC970,
|
2005-07-07 20:56:11 -04:00
|
|
|
.cpu_user_features = COMMON_USER_PPC64 |
|
|
|
|
PPC_FEATURE_HAS_ALTIVEC_COMP,
|
|
|
|
.icache_bsize = 128,
|
|
|
|
.dcache_bsize = 128,
|
2005-09-06 00:47:49 -04:00
|
|
|
.num_pmcs = 8,
|
2005-07-07 20:56:11 -04:00
|
|
|
.cpu_setup = __setup_cpu_ppc970,
|
2005-09-06 00:59:16 -04:00
|
|
|
#ifdef CONFIG_OPROFILE
|
2005-09-06 00:53:57 -04:00
|
|
|
.oprofile_cpu_type = "ppc64/970",
|
2005-09-06 00:57:52 -04:00
|
|
|
.oprofile_model = &op_model_power4,
|
2005-09-06 00:59:16 -04:00
|
|
|
#endif
|
2005-07-07 20:56:11 -04:00
|
|
|
},
|
2005-07-13 04:11:44 -04:00
|
|
|
{ /* PPC970MP */
|
|
|
|
.pvr_mask = 0xffff0000,
|
|
|
|
.pvr_value = 0x00440000,
|
|
|
|
.cpu_name = "PPC970MP",
|
2005-09-23 15:08:58 -04:00
|
|
|
.cpu_features = CPU_FTRS_PPC970,
|
2005-07-13 04:11:44 -04:00
|
|
|
.cpu_user_features = COMMON_USER_PPC64 |
|
|
|
|
PPC_FEATURE_HAS_ALTIVEC_COMP,
|
|
|
|
.icache_bsize = 128,
|
|
|
|
.dcache_bsize = 128,
|
|
|
|
.cpu_setup = __setup_cpu_ppc970,
|
2005-09-06 00:59:16 -04:00
|
|
|
#ifdef CONFIG_OPROFILE
|
2005-09-06 00:53:57 -04:00
|
|
|
.oprofile_cpu_type = "ppc64/970",
|
2005-09-06 00:57:52 -04:00
|
|
|
.oprofile_model = &op_model_power4,
|
2005-09-06 00:59:16 -04:00
|
|
|
#endif
|
2005-07-13 04:11:44 -04:00
|
|
|
},
|
2005-07-07 20:56:11 -04:00
|
|
|
{ /* Power5 */
|
|
|
|
.pvr_mask = 0xffff0000,
|
|
|
|
.pvr_value = 0x003a0000,
|
|
|
|
.cpu_name = "POWER5 (gr)",
|
2005-09-23 15:08:58 -04:00
|
|
|
.cpu_features = CPU_FTRS_POWER5,
|
2005-07-07 20:56:11 -04:00
|
|
|
.cpu_user_features = COMMON_USER_PPC64,
|
|
|
|
.icache_bsize = 128,
|
|
|
|
.dcache_bsize = 128,
|
2005-09-06 00:47:49 -04:00
|
|
|
.num_pmcs = 6,
|
2005-07-07 20:56:11 -04:00
|
|
|
.cpu_setup = __setup_cpu_power4,
|
2005-09-06 00:59:16 -04:00
|
|
|
#ifdef CONFIG_OPROFILE
|
2005-09-06 00:53:57 -04:00
|
|
|
.oprofile_cpu_type = "ppc64/power5",
|
2005-09-06 00:57:52 -04:00
|
|
|
.oprofile_model = &op_model_power4,
|
2005-09-06 00:59:16 -04:00
|
|
|
#endif
|
2005-07-07 20:56:11 -04:00
|
|
|
},
|
|
|
|
{ /* Power5 */
|
|
|
|
.pvr_mask = 0xffff0000,
|
|
|
|
.pvr_value = 0x003b0000,
|
|
|
|
.cpu_name = "POWER5 (gs)",
|
2005-09-23 15:08:58 -04:00
|
|
|
.cpu_features = CPU_FTRS_POWER5,
|
2005-07-07 20:56:11 -04:00
|
|
|
.cpu_user_features = COMMON_USER_PPC64,
|
|
|
|
.icache_bsize = 128,
|
|
|
|
.dcache_bsize = 128,
|
2005-09-06 00:47:49 -04:00
|
|
|
.num_pmcs = 6,
|
2005-07-07 20:56:11 -04:00
|
|
|
.cpu_setup = __setup_cpu_power4,
|
2005-09-06 00:59:16 -04:00
|
|
|
#ifdef CONFIG_OPROFILE
|
2005-09-06 00:53:57 -04:00
|
|
|
.oprofile_cpu_type = "ppc64/power5",
|
2005-09-06 00:57:52 -04:00
|
|
|
.oprofile_model = &op_model_power4,
|
2005-09-06 00:59:16 -04:00
|
|
|
#endif
|
2005-07-07 20:56:11 -04:00
|
|
|
},
|
|
|
|
{ /* BE DD1.x */
|
|
|
|
.pvr_mask = 0xffff0000,
|
|
|
|
.pvr_value = 0x00700000,
|
2005-09-23 15:08:58 -04:00
|
|
|
.cpu_name = "Cell Broadband Engine",
|
|
|
|
.cpu_features = CPU_FTRS_CELL,
|
2005-07-07 20:56:11 -04:00
|
|
|
.cpu_user_features = COMMON_USER_PPC64 |
|
|
|
|
PPC_FEATURE_HAS_ALTIVEC_COMP,
|
|
|
|
.icache_bsize = 128,
|
|
|
|
.dcache_bsize = 128,
|
|
|
|
.cpu_setup = __setup_cpu_be,
|
|
|
|
},
|
|
|
|
{ /* default match */
|
|
|
|
.pvr_mask = 0x00000000,
|
|
|
|
.pvr_value = 0x00000000,
|
|
|
|
.cpu_name = "POWER4 (compatible)",
|
2005-09-23 15:08:58 -04:00
|
|
|
.cpu_features = CPU_FTRS_COMPATIBLE,
|
2005-07-07 20:56:11 -04:00
|
|
|
.cpu_user_features = COMMON_USER_PPC64,
|
|
|
|
.icache_bsize = 128,
|
|
|
|
.dcache_bsize = 128,
|
2005-09-06 00:47:49 -04:00
|
|
|
.num_pmcs = 6,
|
2005-07-07 20:56:11 -04:00
|
|
|
.cpu_setup = __setup_cpu_power4,
|
|
|
|
}
|
2005-04-16 18:20:36 -04:00
|
|
|
};
|