1 /* cpu.c: Dinky routines to look for the kind of Sparc cpu
4 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
7 #include <linux/kernel.h>
8 #include <linux/init.h>
10 #include <linux/threads.h>
11 #include <asm/oplib.h>
16 #include <asm/cpudata.h>
18 DEFINE_PER_CPU(cpuinfo_sparc
, __cpu_data
) = { 0 };
23 char* cpu_name
; /* should be enough I hope... */
32 /* In order to get the fpu type correct, you need to take the IDPROM's
33 * machine type value into consideration too. I will fix this.
35 <<<<<<< HEAD
:arch
/sparc
/kernel
/cpu
.c
36 struct cpu_fp_info linux_sparc_fpu
[] = {
38 static struct cpu_fp_info linux_sparc_fpu
[] = {
39 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a
:arch
/sparc
/kernel
/cpu
.c
40 { 0, 0, "Fujitsu MB86910 or Weitek WTL1164/5"},
41 { 0, 1, "Fujitsu MB86911 or Weitek WTL1164/5 or LSI L64831"},
42 { 0, 2, "LSI Logic L64802 or Texas Instruments ACT8847"},
43 /* SparcStation SLC, SparcStation1 */
44 { 0, 3, "Weitek WTL3170/2"},
46 { 0, 4, "Lsi Logic/Meiko L64804 or compatible"},
50 { 1, 0, "ROSS HyperSparc combined IU/FPU"},
51 { 1, 1, "Lsi Logic L64814"},
52 { 1, 2, "Texas Instruments TMS390-C602A"},
53 { 1, 3, "Cypress CY7C602 FPU"},
58 { 2, 0, "BIT B5010 or B5110/20 or B5210"},
66 /* SuperSparc 50 module */
67 { 4, 0, "SuperSparc on-chip FPU"},
69 { 4, 4, "TI MicroSparc on chip FPU"},
70 { 5, 0, "Matsushita MN10501"},
78 { 9, 3, "Fujitsu or Weitek on-chip FPU"},
81 #define NSPARCFPU ARRAY_SIZE(linux_sparc_fpu)
83 <<<<<<< HEAD
:arch
/sparc
/kernel
/cpu
.c
84 struct cpu_iu_info linux_sparc_chips
[] = {
86 static struct cpu_iu_info linux_sparc_chips
[] = {
87 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a
:arch
/sparc
/kernel
/cpu
.c
88 /* Sun4/100, 4/200, SLC */
89 { 0, 0, "Fujitsu MB86900/1A or LSI L64831 SparcKIT-40"},
90 /* borned STP1012PGA */
91 { 0, 4, "Fujitsu MB86904"},
92 { 0, 5, "Fujitsu TurboSparc MB86907"},
93 /* SparcStation2, SparcServer 490 & 690 */
94 { 1, 0, "LSI Logic Corporation - L64811"},
96 { 1, 1, "Cypress/ROSS CY7C601"},
97 /* Embedded controller */
98 { 1, 3, "Cypress/ROSS CY7C611"},
99 /* Ross Technologies HyperSparc */
100 { 1, 0xf, "ROSS HyperSparc RT620"},
101 { 1, 0xe, "ROSS HyperSparc RT625 or RT626"},
102 /* ECL Implementation, CRAY S-MP Supercomputer... AIEEE! */
103 /* Someone please write the code to support this beast! ;) */
104 { 2, 0, "Bipolar Integrated Technology - B5010"},
105 { 3, 0, "LSI Logic Corporation - unknown-type"},
106 { 4, 0, "Texas Instruments, Inc. - SuperSparc-(II)"},
107 /* SparcClassic -- borned STP1010TAB-50*/
108 { 4, 1, "Texas Instruments, Inc. - MicroSparc"},
109 { 4, 2, "Texas Instruments, Inc. - MicroSparc II"},
110 { 4, 3, "Texas Instruments, Inc. - SuperSparc 51"},
111 { 4, 4, "Texas Instruments, Inc. - SuperSparc 61"},
112 { 4, 5, "Texas Instruments, Inc. - unknown"},
113 { 5, 0, "Matsushita - MN10501"},
114 { 6, 0, "Philips Corporation - unknown"},
115 { 7, 0, "Harvest VLSI Design Center, Inc. - unknown"},
116 /* Gallium arsenide 200MHz, BOOOOGOOOOMIPS!!! */
117 { 8, 0, "Systems and Processes Engineering Corporation (SPEC)"},
118 { 9, 0, "Fujitsu or Weitek Power-UP"},
119 { 9, 1, "Fujitsu or Weitek Power-UP"},
120 { 9, 2, "Fujitsu or Weitek Power-UP"},
121 { 9, 3, "Fujitsu or Weitek Power-UP"},
122 { 0xa, 0, "UNKNOWN CPU-VENDOR/TYPE"},
123 { 0xb, 0, "UNKNOWN CPU-VENDOR/TYPE"},
124 { 0xc, 0, "UNKNOWN CPU-VENDOR/TYPE"},
125 { 0xd, 0, "UNKNOWN CPU-VENDOR/TYPE"},
126 { 0xe, 0, "UNKNOWN CPU-VENDOR/TYPE"},
127 { 0xf, 0, "UNKNOWN CPU-VENDOR/TYPE"},
130 #define NSPARCCHIPS ARRAY_SIZE(linux_sparc_chips)
132 char *sparc_cpu_type
;
133 char *sparc_fpu_type
;
135 unsigned int fsr_storage
;
137 void __init
cpu_probe(void)
139 int psr_impl
, psr_vers
, fpu_vers
;
142 psr_impl
= ((get_psr()>>28)&0xf);
143 psr_vers
= ((get_psr()>>24)&0xf);
146 put_psr(psr
| PSR_EF
);
147 fpu_vers
= ((get_fsr()>>17)&0x7);
150 for(i
= 0; i
<NSPARCCHIPS
; i
++) {
151 if(linux_sparc_chips
[i
].psr_impl
== psr_impl
)
152 if(linux_sparc_chips
[i
].psr_vers
== psr_vers
) {
153 sparc_cpu_type
= linux_sparc_chips
[i
].cpu_name
;
159 printk("DEBUG: psr.impl = 0x%x psr.vers = 0x%x\n", psr_impl
,
162 for(i
= 0; i
<NSPARCFPU
; i
++) {
163 if(linux_sparc_fpu
[i
].psr_impl
== psr_impl
)
164 if(linux_sparc_fpu
[i
].fp_vers
== fpu_vers
) {
165 sparc_fpu_type
= linux_sparc_fpu
[i
].fp_name
;
171 printk("DEBUG: psr.impl = 0x%x fsr.vers = 0x%x\n", psr_impl
,
173 sparc_fpu_type
= linux_sparc_fpu
[31].fp_name
;