]> git.proxmox.com Git - mirror_edk2.git/blame - Vlv2DeviceRefCodePkg/AcpiTablesPCAT/IgdOSBCB.ASL
FatBinPkg: Update EBC/IA32/X64/IPF binaries
[mirror_edk2.git] / Vlv2DeviceRefCodePkg / AcpiTablesPCAT / IgdOSBCB.ASL
CommitLineData
3cbfba02
DW
1/*++\r
2\r
3Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved\r
4\r
5 This program and the accompanying materials are licensed and made available under\r
6 the terms and conditions of the BSD License that accompanies this distribution.\r
7 The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php.\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13\r
14\r
15Module Name:\r
16\r
17 IgdOSBCB.ASL\r
18\r
19Abstract:\r
20\r
21 IGD OpRegion/Software SCI Reference Code for the Baytrail Family.\r
22 This file contains the system BIOS call back functionality for the\r
23 OpRegion/Software SCI mechanism.\r
24\r
25--*/\r
26\r
27\r
28Method (SBCB, 0, Serialized)\r
29{\r
30\r
31 // Supported Callbacks: Sub-function 0\r
32\r
33 If (LEqual(GESF, 0x0))\r
34 {\r
35\r
36 //<TODO> An OEM may support the driver->SBIOS status callbacks, but\r
37 // the supported callbacks value must be modified. The code that is\r
38 // executed upon reception of the callbacks must be also be updated\r
39 // to perform the desired functionality.\r
40\r
41 Store(0x00000000, PARM) // No callbacks supported\r
42\r
43 If(LEqual(PFLV,FMBL))\r
44 {\r
45 Store(0x000F87FD, PARM) // Mobile\r
46 }\r
47 If(LEqual(PFLV,FDTP))\r
48 {\r
49 Store(0x000F87BD, PARM) // Desktop\r
50 }\r
51\r
52 Store(Zero, GESF) // Clear the exit parameter\r
53 Return(SUCC) // "Success"\r
54 }\r
55\r
56 // BIOS POST Completion: Sub-function 1\r
57\r
58 If (LEqual(GESF, 1))\r
59 {\r
60 Store(Zero, GESF) // Clear the exit parameter\r
61 Store(Zero, PARM)\r
62 Return(SUCC) // Not supported, but no failure\r
63 }\r
64\r
65 // Pre-Hires Set Mode: Sub-function 3\r
66\r
67 If (LEqual(GESF, 3))\r
68 {\r
69 Store(Zero, GESF) // Clear the exit parameter\r
70 Store(Zero, PARM)\r
71 Return(SUCC) // Not supported, but no failure\r
72 }\r
73\r
74 // Post-Hires Set Mode: Sub-function 4\r
75\r
76 If (LEqual(GESF, 4))\r
77 {\r
78 Store(Zero, GESF) // Clear the exit parameter\r
79 Store(Zero, PARM)\r
80 Return(SUCC) // Not supported, but no failure\r
81 }\r
82\r
83 // Display Switch: Sub-function 5\r
84\r
85 If (LEqual(GESF, 5))\r
86 {\r
87 Store(Zero, GESF) // Clear the exit parameter\r
88 Store(Zero, PARM)\r
89 Return(SUCC) // Not supported, but no failure\r
90 }\r
91\r
92 // Set TV format: Sub-function 6\r
93\r
94 If (LEqual(GESF, 6))\r
95 {\r
96\r
97 //<TODO> If implemented, the input values must be saved into\r
98 // non-volatile storage for parsing during the next boot. The\r
99 // following Sample code is Intel validated implementation.\r
100\r
101 Store(And(PARM, 0x0F), ITVF)\r
102 Store(ShiftRight(And(PARM, 0xF0), 4), ITVM)\r
103 Store(Zero, GESF) // Clear the exit parameter\r
104 Store(Zero, PARM)\r
105 Return(SUCC)\r
106 }\r
107\r
108 // Adapter Power State: Sub-function 7\r
109\r
110 If (LEqual(GESF, 7))\r
111 {\r
112\r
113 // Upon notification from driver that the Adapter Power State = D0,\r
114 // check if previous lid event failed. If it did, retry the lid\r
115 // event here.\r
116 If(LEqual(PARM, 0))\r
117 {\r
118 Store(CLID, Local0)\r
119 If(And(0x80000000,Local0))\r
120 {\r
121 And(CLID, 0x0000000F, CLID)\r
122 GLID(CLID)\r
123 }\r
124 }\r
125 Store(Zero, GESF) // Clear the exit parameter\r
126 Store(Zero, PARM)\r
127 Return(SUCC) // Not supported, but no failure\r
128 }\r
129\r
130 // Display Power State: Sub-function 8\r
131\r
132 If (LEqual(GESF, 8))\r
133 {\r
134 Store(Zero, GESF) // Clear the exit parameter\r
135 Store(Zero, PARM)\r
136 Return(SUCC) // Not supported, but no failure\r
137 }\r
138\r
139 // Set Boot Display: Sub-function 9\r
140\r
141 If (LEqual(GESF, 9))\r
142 {\r
143\r
144 //<TODO> An OEM may elect to implement this method. In that case,\r
145 // the input values must be saved into non-volatile storage for\r
146 // parsing during the next boot. The following Sample code is Intel\r
147 // validated implementation.\r
148\r
149 And(PARM, 0xFF, IBTT) // Save the boot display to NVS\r
150 Store(Zero, GESF) // Clear the exit parameter\r
151 Store(Zero, PARM)\r
152 Return(SUCC) // Reserved, "Critical failure"\r
153 }\r
154\r
155 // Set Panel Details: Sub-function 10 (0Ah)\r
156\r
157 If (LEqual(GESF, 10))\r
158 {\r
159\r
160 //<TODO> An OEM may elect to implement this method. In that case,\r
161 // the input values must be saved into non-volatile storage for\r
162 // parsing during the next boot. The following Sample code is Intel\r
163 // validated implementation.\r
164\r
165 // Set the panel-related NVRAM variables based the input from the driver.\r
166\r
167 And(PARM, 0xFF, IPSC)\r
168\r
169 // Change panel type if a change is requested by the driver (Change if\r
170 // panel type input is non-zero). Zero=No change requested.\r
171\r
172 If(And(ShiftRight(PARM, 8), 0xFF))\r
173 {\r
174 And(ShiftRight(PARM, 8), 0xFF, IPAT)\r
175 Decrement(IPAT) // 0 = no change, so fit to CMOS map\r
176 }\r
177 And(ShiftRight(PARM, 18), 0x3, IBLC)\r
178 And(ShiftRight(PARM, 20), 0x7, IBIA)\r
179 Store(Zero, GESF) // Clear the exit parameter\r
180 Store(Zero, PARM)\r
181 Return(SUCC) // Success\r
182 }\r
183\r
184 // Set Internal Graphics: Sub-function 11 (0Bh)\r
185\r
186 If (LEqual(GESF, 11))\r
187 {\r
188\r
189 //<TODO> An OEM may elect to implement this method. In that case,\r
190 // the input values must be saved into non-volatile storage for\r
191 // parsing during the next boot. The following Sample code is Intel\r
192 // validated implementation.\r
193\r
194 And(ShiftRight(PARM, 1), 1, IF1E) // Program the function 1 option\r
195\r
196 // Fixed memory/DVMT memory\r
197\r
198 And(ShiftRight(PARM, 17), 0xF, IDMS) // Program DVMT/fixed memory size\r
199\r
200 Store(Zero, GESF) // Clear the exit parameter\r
201 Store(Zero, PARM)\r
202 Return(SUCC) // Success\r
203 }\r
204\r
205 // Post-Hires to DOS FS: Sub-function 16 (10h)\r
206\r
207 If (LEqual(GESF, 16))\r
208 {\r
209 Store(Zero, GESF) // Clear the exit parameter\r
210 Store(Zero, PARM)\r
211 Return(SUCC) // Not supported, but no failure\r
212 }\r
213\r
214 // APM Complete: Sub-function 17 (11h)\r
215\r
216 If (LEqual(GESF, 17))\r
217 {\r
218\r
219 Store(ShiftLeft(LIDS, 8), PARM) // Report the lid state\r
220 Add(PARM, 0x100, PARM) // Adjust the lid state, 0 = Unknown\r
221\r
222 Store(Zero, GESF) // Clear the exit parameter\r
223 Return(SUCC) // Not supported, but no failure\r
224 }\r
225\r
226 // Set Spread Spectrum Clocks: Sub-function 18 (12h)\r
227\r
228 If (LEqual(GESF, 18))\r
229 {\r
230\r
231 //<TODO> An OEM may elect to implement this method. In that case,\r
232 // the input values must be saved into non-volatile storage for\r
233 // parsing during the next boot. The following Sample code is Intel\r
234 // validated implementation.\r
235\r
236 If(And(PARM, 1))\r
237 {\r
238 If(LEqual(ShiftRight(PARM, 1), 1))\r
239 {\r
240 Store(1, ISSC) // Enable HW SSC, only for clock 1\r
241 }\r
242 Else\r
243 {\r
244 Store(Zero, GESF)\r
245 Return(CRIT) // Failure, as the SSC clock must be 1\r
246 }\r
247 }\r
248 Else\r
249 {\r
250 Store(0, ISSC) // Disable SSC\r
251 }\r
252 Store(Zero, GESF) // Clear the exit parameter\r
253 Store(Zero, PARM)\r
254 Return(SUCC) // Success\r
255 }\r
256\r
257 // Post VBE/PM Callback: Sub-function 19 (13h)\r
258\r
259 If (LEqual(GESF, 19))\r
260 {\r
261 Store(Zero, GESF) // Clear the exit parameter\r
262 Store(Zero, PARM)\r
263 Return(SUCC) // Not supported, but no failure\r
264 }\r
265\r
266 // Set PAVP Data: Sub-function 20 (14h)\r
267\r
268 If (LEqual(GESF, 20))\r
269 {\r
270 And(PARM, 0xF, PAVP) // Store PAVP info\r
271 Store(Zero, GESF) // Clear the exit parameter\r
272 Store(Zero, PARM)\r
273 Return(SUCC) // Success\r
274 }\r
275\r
276 // A call to a reserved "System BIOS callbacks" function was received\r
277\r
278 Store(Zero, GESF) // Clear the exit parameter\r
279 Return(SUCC) // Reserved, "Critical failure"\r
280}\r