This source file includes following definitions.
- get_cpuid
- get_modid
1
2
3
4
5
6
7
8 #ifndef _SPARC_MBUS_H
9 #define _SPARC_MBUS_H
10
11 #include <asm/ross.h>
12 #include <asm/viking.h>
13
14 enum mbus_module {
15 HyperSparc = 0,
16 Swift_ok = 4,
17 Swift_bad_c = 5,
18 Swift_lots_o_bugs = 6,
19 Tsunami = 7,
20 Viking_12 = 8,
21 Viking_2x = 9,
22 Viking_30 = 10,
23 Viking_35 = 11,
24 Viking_new = 12,
25 TurboSparc = 13,
26 SRMMU_INVAL_MOD = 14,
27 };
28
29 extern enum mbus_module srmmu_modtype;
30 extern unsigned int viking_rev, swift_rev, cypress_rev;
31
32
33 #define HWBUG_COPYBACK_BROKEN 0x00000001
34 #define HWBUG_ASIFLUSH_BROKEN 0x00000002
35 #define HWBUG_VACFLUSH_BITROT 0x00000004
36 #define HWBUG_KERN_ACCBROKEN 0x00000008
37 #define HWBUG_KERN_CBITBROKEN 0x00000010
38 #define HWBUG_MODIFIED_BITROT 0x00000020
39 #define HWBUG_PC_BADFAULT_ADDR 0x00000040
40 #define HWBUG_SUPERSCALAR_BAD 0x00000080
41 #define HWBUG_PACINIT_BITROT 0x00000100
42
43
44
45
46
47
48 #define MBUS_VIKING 0x4
49 #define MBUS_LSI 0x3
50 #define MBUS_ROSS 0x1
51 #define MBUS_FMI 0x0
52
53
54 #define ROSS_604_REV_CDE 0x0
55 #define ROSS_604_REV_F 0x1
56 #define ROSS_605 0xf
57 #define ROSS_605_REV_B 0xe
58
59
60 #define VIKING_REV_12 0x1
61 #define VIKING_REV_2 0x2
62 #define VIKING_REV_30 0x3
63 #define VIKING_REV_35 0x4
64
65
66 #define LSI_L64815 0x0
67
68
69 #define FMI_AURORA 0x4
70 #define FMI_TURBO 0x5
71
72
73
74
75
76
77
78
79 #define TBR_ID_SHIFT 20
80
81 static inline int get_cpuid(void)
82 {
83 register int retval;
84 __asm__ __volatile__("rd %%tbr, %0\n\t"
85 "srl %0, %1, %0\n\t" :
86 "=r" (retval) :
87 "i" (TBR_ID_SHIFT));
88 return (retval & 3);
89 }
90
91 static inline int get_modid(void)
92 {
93 return (get_cpuid() | 0x8);
94 }
95
96
97 #endif