]> git.proxmox.com Git - mirror_edk2.git/blame - Vlv2DeviceRefCodePkg/AcpiTablesPCAT/IgdOGBDA.ASL
Vlv2DeviceRefCodePkg&Vlv2TbltDevicePkg:Convert Mix to DOS.
[mirror_edk2.git] / Vlv2DeviceRefCodePkg / AcpiTablesPCAT / IgdOGBDA.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 IgdOGBDA.ASL\r
18\r
19Abstract:\r
20\r
21 IGD OpRegion/Software SCI Reference Code for the Baytrail Family.\r
22 This file contains Get BIOS Data Area funciton support for\r
23 the Integrated Graphics Device (IGD) OpRegion/Software SCI mechanism.\r
24\r
25--*/\r
26\r
27\r
28Method (GBDA, 0, Serialized)\r
29{\r
30\r
31 // Supported calls: Sub-function 0\r
32\r
33 If (LEqual(GESF, 0))\r
34 {\r
35 //<TODO> Update implementation specific supported calls. Reference\r
36 // code is set to Intel's validated implementation.\r
37\r
38 Store(0x0000279, PARM)\r
39\r
40 Store(Zero, GESF) // Clear the exit parameter\r
41 Return(SUCC) // Success\r
42 }\r
43\r
44 // Requested callbacks: Sub-function 1\r
45\r
46 If (LEqual(GESF, 1))\r
47 {\r
48\r
49 //<TODO> Update implementation specific system BIOS requested call\r
50 // back functions. Call back functions are where the driver calls the\r
51 // system BIOS at function indicated event.\r
52\r
53 Store(0x00000240, PARM)\r
54\r
55 Store(Zero, GESF) // Clear the exit parameter\r
56 Return(SUCC) // Success\r
57 }\r
58\r
59 // Get Boot display Preferences: Sub-function 4\r
60\r
61 If (LEqual(GESF, 4))\r
62 {\r
63\r
64 //<TODO> Update the implementation specific Get Boot Display\r
65 // Preferences function.\r
66\r
67 And(PARM, 0xEFFF0000, PARM) // PARM[30:16] = Boot device ports\r
68 And(PARM, ShiftLeft(DeRefOf(Index(DBTB, IBTT)), 16), PARM)\r
69 Or(IBTT, PARM, PARM) // PARM[7:0] = Boot device type\r
70\r
71 Store(Zero, GESF) // Clear the exit parameter\r
72 Return(SUCC) // Success\r
73 }\r
74\r
75 // Panel details: Sub-function 5\r
76\r
77 If (LEqual(GESF, 5))\r
78 {\r
79\r
80 //<TODO> Update the implementation specific Get Panel Details\r
81 // function.\r
82\r
83 Store(IPSC, PARM) // Report the scaling setting\r
84 Or(PARM, ShiftLeft(IPAT, 8), PARM)\r
85 Add(PARM, 0x100, PARM) // Adjust panel type, 0 = VBT default\r
86 Or(PARM, ShiftLeft(LIDS, 16), PARM) // Report the lid state\r
87 Add(PARM, 0x10000, PARM) // Adjust the lid state, 0 = Unknown\r
88 Or(PARM, ShiftLeft(IBLC, 18), PARM) // Report the BLC setting\r
89 Or(PARM, ShiftLeft(IBIA, 20), PARM) // Report the BIA setting\r
90 Store(Zero, GESF)\r
91 Return(SUCC)\r
92 }\r
93\r
94 // TV-standard/Video-connector: Sub-function 6\r
95\r
96 If (LEqual(GESF, 6))\r
97 {\r
98\r
99 //<TODO> Update the implementation specific Get\r
100 // TV-standard/Video-connectorPanel function.\r
101\r
102 Store(ITVF, PARM)\r
103 Or(PARM, ShiftLeft(ITVM, 4), PARM)\r
104 Store(Zero, GESF)\r
105 Return(SUCC)\r
106 }\r
107\r
108 // Internal graphics: Sub-function 7\r
109\r
110 If (LEqual(GESF, 7))\r
111 {\r
112 Store(GIVD, PARM) // PARM[0] - VGA mode(1=VGA)\r
113 Xor(PARM, 1, PARM) // Invert the VGA mode polarity\r
114 Or(PARM, ShiftLeft(GMFN, 1), PARM) // PARM[1] - # IGD PCI functions-1\r
115 // PARM[3:2] - Reserved\r
116 // PARM[4] - IGD D3 support(0=cold)\r
117 // PARM[10:5] - Reserved\r
118 Or(PARM, ShiftLeft(3, 11), PARM) // PARM[12:11] - DVMT mode(11b = 5.0)\r
119\r
120 //\r
121 // Report DVMT 5.0 Total Graphics memory size.\r
122 //\r
123 Or(PARM, ShiftLeft(IDMS, 17), PARM) // Bits 20:17 are for Gfx total memory size\r
124\r
125 // If the "Set Internal Graphics" call is supported, the modified\r
126 // settings flag must be programmed per the specification. This means\r
127 // that the flag must be set to indicate that system BIOS requests\r
128 // these settings. Once "Set Internal Graphics" is called, the\r
129 // modified settings flag must be cleared on all subsequent calls to\r
130 // this function.\r
131\r
132 // Report the graphics frequency based on DISPLAY_CLOCK_FREQUENCY_ENCODING [MMADR+0x20C8]\r
133\r
134 Or(ShiftLeft(Derefof(Index(CDCT, \_SB.PCI0.GFX0.MCHK.DCFE)), 21),PARM, PARM)\r
135\r
136 Store(1, GESF) // Set the modified settings flag\r
137 Return(SUCC)\r
138 }\r
139\r
140 // Spread spectrum clocks: Sub-function 10\r
141\r
142 If (LEqual(GESF, 10))\r
143 {\r
144\r
145 Store(0, PARM) // Assume SSC is disabled\r
146\r
147 If(ISSC)\r
148 {\r
149 Or(PARM, 3, PARM) // If SSC enabled, return SSC1+Enabled\r
150 }\r
151\r
152 Store(0, GESF) // Set the modified settings flag\r
153 Return(SUCC) // Success\r
154 }\r
155\r
156\r
157 // A call to a reserved "Get BIOS data" function was received.\r
158\r
159 Store(Zero, GESF) // Clear the exit parameter\r
160 Return(CRIT) // Reserved, "Critical failure"\r
161}\r