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