Debian Codegraph @

src/soc/intel/braswell/acpi/dptf/cpu.asl

raw
1 /* SPDX-License-Identifier: GPL-2.0-only */
2
3 #ifndef DPTF_CPU_PASSIVE
4 #define DPTF_CPU_PASSIVE 80
5 #endif
6
7 #ifndef DPTF_CPU_CRITICAL
8 #define DPTF_CPU_CRITICAL 90
9 #endif
10
11 #ifndef DPTF_CPU_ACTIVE_AC0
12 #define DPTF_CPU_ACTIVE_AC0 90
13 #endif
14
15 #ifndef DPTF_CPU_ACTIVE_AC1
16 #define DPTF_CPU_ACTIVE_AC1 80
17 #endif
18
19 #ifndef DPTF_CPU_ACTIVE_AC2
20 #define DPTF_CPU_ACTIVE_AC2 70
21 #endif
22
23 #ifndef DPTF_CPU_ACTIVE_AC3
24 #define DPTF_CPU_ACTIVE_AC3 60
25 #endif
26
27 #ifndef DPTF_CPU_ACTIVE_AC4
28 #define DPTF_CPU_ACTIVE_AC4 50
29 #endif
30
31 External (\_SB.CP00._TSS, MethodObj)
32 External (\_SB.CP00._TPC, MethodObj)
33 External (\_SB.CP00._PTC, PkgObj)
34 External (\_SB.CP00._TSD, PkgObj)
35 External (\_SB.CP00._PSS, MethodObj)
36
37 Device (B0DB)
38 {
39 Name (_ADR, 0x000B0000) /* Bus 0, Device B, Function 0 */
40
41 Method (_STA)
42 {
43 If (\DPTE == 1) {
44 Return (0xF)
45 } Else {
46 Return (0x0)
47 }
48 }
49
50 /*
51 * Processor Throttling Controls
52 */
53
54 Method (_TSS)
55 {
56 If (CondRefOf (\_SB.CP00._TSS)) {
57 Return (\_SB.CP00._TSS)
58 } Else {
59 Return (Package ()
60 {
61 Package () { 0, 0, 0, 0, 0 }
62 })
63 }
64 }
65
66 Method (_TPC)
67 {
68 If (CondRefOf (\_SB.CP00._TPC)) {
69 Return (\_SB.CP00._TPC)
70 } Else {
71 Return (0)
72 }
73 }
74
75 Method (_PTC)
76 {
77 If (CondRefOf (\_SB.CP00._PTC)) {
78 Return (\_SB.CP00._PTC)
79 } Else {
80 Return (Package ()
81 {
82 Buffer () { 0 },
83 Buffer () { 0 }
84 })
85 }
86 }
87
88 Method (_TSD)
89 {
90 If (CondRefOf (\_SB.CP00._TSD)) {
91 Return (\_SB.CP00._TSD)
92 } Else {
93 Return (Package ()
94 {
95 Package () { 5, 0, 0, 0, 0 }
96 })
97 }
98 }
99
100 Method (_TDL)
101 {
102 If (CondRefOf (\_SB.CP00._TSS)) {
103 Local0 = SizeOf (\_SB.CP00._TSS ())
104 Local0--
105 Return (Local0)
106 } Else {
107 Return (0)
108 }
109 }
110
111 /*
112 * Processor Performance Control
113 */
114
115 Method (_PPC)
116 {
117 Return (0)
118 }
119
120 Method (SPPC, 1)
121 {
122 \PPCM = Arg0
123
124 /* Notify OS to re-read _PPC limit on each CPU */
125 \PPCN ()
126 }
127
128 Method (_PSS)
129 {
130 If (CondRefOf (\_SB.CP00._PSS)) {
131 Return (\_SB.CP00._PSS)
132 } Else {
133 Return (Package ()
134 {
135 Package () { 0, 0, 0, 0, 0, 0 }
136 })
137 }
138 }
139
140 Method (_PDL)
141 {
142 /* Check for mainboard specific _PDL override */
143 If (CondRefOf (\_SB.MPDL)) {
144 Return (\_SB.MPDL)
145 } ElseIf (CondRefOf (\_SB.CP00._PSS)) {
146 Local0 = SizeOf (\_SB.CP00._PSS ())
147 Local0--
148 Return (Local0)
149 } Else {
150 Return (0)
151 }
152 }
153
154 /* Return PPCC table defined by mainboard */
155 Method (PPCC)
156 {
157 Return (\_SB.MPPC)
158 }
159
160 Method (_CRT)
161 {
162 Return (\_SB.DPTF.CTOK(DPTF_CPU_CRITICAL))
163 }
164
165 Method (_PSV)
166 {
167 Return (\_SB.DPTF.CTOK(DPTF_CPU_PASSIVE))
168 }
169
170 Method (_AC0)
171 {
172 Return (\_SB.DPTF.CTOK(DPTF_CPU_ACTIVE_AC0))
173 }
174
175 Method (_AC1)
176 {
177 Return (\_SB.DPTF.CTOK(DPTF_CPU_ACTIVE_AC1))
178 }
179
180 Method (_AC2)
181 {
182 Return (\_SB.DPTF.CTOK(DPTF_CPU_ACTIVE_AC2))
183 }
184
185 Method (_AC3)
186 {
187 Return (\_SB.DPTF.CTOK(DPTF_CPU_ACTIVE_AC3))
188 }
189
190 Method (_AC4)
191 {
192 Return (\_SB.DPTF.CTOK(DPTF_CPU_ACTIVE_AC4))
193 }
194 }