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