Debian Codegraph @

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

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