1
2
3
4
5
6
7
8
9
10
11#ifndef _ACH_ASM_SANDYBRIDGE_H
12#define _ACH_ASM_SANDYBRIDGE_H
13
14
15#define SANDYBRIDGE_MOBILE 0
16#define SANDYBRIDGE_DESKTOP 1
17#define SANDYBRIDGE_SERVER 2
18
19
20#define BASE_REV_SNB 0x00
21#define BASE_REV_IVB 0x50
22#define BASE_REV_MASK 0x50
23
24
25#define SNB_STEP_D0 (BASE_REV_SNB + 5)
26#define SNB_STEP_D1 (BASE_REV_SNB + 6)
27#define SNB_STEP_D2 (BASE_REV_SNB + 7)
28
29
30#define IVB_STEP_A0 (BASE_REV_IVB + 0)
31#define IVB_STEP_B0 (BASE_REV_IVB + 2)
32#define IVB_STEP_C0 (BASE_REV_IVB + 4)
33#define IVB_STEP_K0 (BASE_REV_IVB + 5)
34#define IVB_STEP_D0 (BASE_REV_IVB + 6)
35
36
37#define IED_SIZE 0x400000
38
39
40#define DEFAULT_DMIBAR 0xfed18000
41#define DEFAULT_EPBAR 0xfed19000
42#define DEFAULT_RCBABASE 0xfed1c000
43
44#define DEFAULT_PCIEXBAR CONFIG_PCIE_ECAM_BASE
45
46#define IOMMU_BASE1 0xfed90000ULL
47#define IOMMU_BASE2 0xfed91000ULL
48
49
50#define EPBAR 0x40
51#define MCHBAR 0x48
52#define PCIEXBAR 0x60
53#define DMIBAR 0x68
54#define X60BAR 0x60
55
56#define GGC 0x50
57
58#define DEVEN 0x54
59#define DEVEN_PEG60 (1 << 13)
60#define DEVEN_IGD (1 << 4)
61#define DEVEN_PEG10 (1 << 3)
62#define DEVEN_PEG11 (1 << 2)
63#define DEVEN_PEG12 (1 << 1)
64#define DEVEN_HOST (1 << 0)
65
66#define PAM0 0x80
67#define PAM1 0x81
68#define PAM2 0x82
69#define PAM3 0x83
70#define PAM4 0x84
71#define PAM5 0x85
72#define PAM6 0x86
73
74#define LAC 0x87
75#define SMRAM 0x88
76#define D_OPEN (1 << 6)
77#define D_CLS (1 << 5)
78#define D_LCK (1 << 4)
79#define G_SMRAME (1 << 3)
80#define C_BASE_SEG ((0 << 2) | (1 << 1) | (0 << 0))
81
82#define TOM 0xa0
83#define TOUUD 0xa8
84#define TSEG 0xb8
85#define TOLUD 0xbc
86
87#define SKPAD 0xdc
88
89
90#define BCTRL1 0x3e
91
92
93
94#define MSAC 0x62
95#define SWSCI 0xe8
96#define ASLS 0xfc
97
98
99
100
101#define SSKPD 0x5d14
102#define BIOS_RESET_CPL 0x5da8
103
104
105
106
107
108#define DMIBAR_REG(x) (DEFAULT_DMIBAR + x)
109
110
111
112
113
114
115
116int bridge_silicon_revision(struct udevice *dev);
117
118#endif
119