3 Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved
5 This program and the accompanying materials are licensed and made available under
6 the terms and conditions of the BSD License that accompanies this distribution.
7 The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php.
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
21 IGD OpRegion/Software SCI Reference Code for the Baytrail Family.
22 This file contains Get BIOS Data Area funciton support for
23 the Integrated Graphics Device (IGD) OpRegion/Software SCI mechanism.
28 Method (GBDA, 0, Serialized)
31 // Supported calls: Sub-function 0
35 //<TODO> Update implementation specific supported calls. Reference
36 // code is set to Intel's validated implementation.
38 Store(0x0000279, PARM)
40 Store(Zero, GESF) // Clear the exit parameter
41 Return(SUCC) // Success
44 // Requested callbacks: Sub-function 1
49 //<TODO> Update implementation specific system BIOS requested call
50 // back functions. Call back functions are where the driver calls the
51 // system BIOS at function indicated event.
53 Store(0x00000240, PARM)
55 Store(Zero, GESF) // Clear the exit parameter
56 Return(SUCC) // Success
59 // Get Boot display Preferences: Sub-function 4
64 //<TODO> Update the implementation specific Get Boot Display
65 // Preferences function.
67 And(PARM, 0xEFFF0000, PARM) // PARM[30:16] = Boot device ports
68 And(PARM, ShiftLeft(DeRefOf(Index(DBTB, IBTT)), 16), PARM)
69 Or(IBTT, PARM, PARM) // PARM[7:0] = Boot device type
71 Store(Zero, GESF) // Clear the exit parameter
72 Return(SUCC) // Success
75 // Panel details: Sub-function 5
80 //<TODO> Update the implementation specific Get Panel Details
83 Store(IPSC, PARM) // Report the scaling setting
84 Or(PARM, ShiftLeft(IPAT, 8), PARM)
85 Add(PARM, 0x100, PARM) // Adjust panel type, 0 = VBT default
86 Or(PARM, ShiftLeft(LIDS, 16), PARM) // Report the lid state
87 Add(PARM, 0x10000, PARM) // Adjust the lid state, 0 = Unknown
88 Or(PARM, ShiftLeft(IBLC, 18), PARM) // Report the BLC setting
89 Or(PARM, ShiftLeft(IBIA, 20), PARM) // Report the BIA setting
94 // TV-standard/Video-connector: Sub-function 6
99 //<TODO> Update the implementation specific Get
100 // TV-standard/Video-connectorPanel function.
103 Or(PARM, ShiftLeft(ITVM, 4), PARM)
108 // Internal graphics: Sub-function 7
112 Store(GIVD, PARM) // PARM[0] - VGA mode(1=VGA)
113 Xor(PARM, 1, PARM) // Invert the VGA mode polarity
114 Or(PARM, ShiftLeft(GMFN, 1), PARM) // PARM[1] - # IGD PCI functions-1
115 // PARM[3:2] - Reserved
116 // PARM[4] - IGD D3 support(0=cold)
117 // PARM[10:5] - Reserved
118 Or(PARM, ShiftLeft(3, 11), PARM) // PARM[12:11] - DVMT mode(11b = 5.0)
121 // Report DVMT 5.0 Total Graphics memory size.
123 Or(PARM, ShiftLeft(IDMS, 17), PARM) // Bits 20:17 are for Gfx total memory size
125 // If the "Set Internal Graphics" call is supported, the modified
126 // settings flag must be programmed per the specification. This means
127 // that the flag must be set to indicate that system BIOS requests
128 // these settings. Once "Set Internal Graphics" is called, the
129 // modified settings flag must be cleared on all subsequent calls to
132 // Report the graphics frequency based on DISPLAY_CLOCK_FREQUENCY_ENCODING [MMADR+0x20C8]
134 Or(ShiftLeft(Derefof(Index(CDCT, \_SB.PCI0.GFX0.MCHK.DCFE)), 21),PARM, PARM)
136 Store(1, GESF) // Set the modified settings flag
140 // Spread spectrum clocks: Sub-function 10
142 If (LEqual(GESF, 10))
145 Store(0, PARM) // Assume SSC is disabled
149 Or(PARM, 3, PARM) // If SSC enabled, return SSC1+Enabled
152 Store(0, GESF) // Set the modified settings flag
153 Return(SUCC) // Success
157 // A call to a reserved "Get BIOS data" function was received.
159 Store(Zero, GESF) // Clear the exit parameter
160 Return(CRIT) // Reserved, "Critical failure"