3 Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved
5 SPDX-License-Identifier: BSD-2-Clause-Patent
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.
22 Method (GBDA, 0, Serialized)
25 // Supported calls: Sub-function 0
29 //<TODO> Update implementation specific supported calls. Reference
30 // code is set to Intel's validated implementation.
32 Store(0x0000279, PARM)
34 Store(Zero, GESF) // Clear the exit parameter
35 Return(SUCC) // Success
38 // Requested callbacks: Sub-function 1
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.
47 Store(0x00000240, PARM)
49 Store(Zero, GESF) // Clear the exit parameter
50 Return(SUCC) // Success
53 // Get Boot display Preferences: Sub-function 4
58 //<TODO> Update the implementation specific Get Boot Display
59 // Preferences function.
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
65 Store(Zero, GESF) // Clear the exit parameter
66 Return(SUCC) // Success
69 // Panel details: Sub-function 5
74 //<TODO> Update the implementation specific Get Panel Details
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
88 // TV-standard/Video-connector: Sub-function 6
93 //<TODO> Update the implementation specific Get
94 // TV-standard/Video-connectorPanel function.
97 Or(PARM, ShiftLeft(ITVM, 4), PARM)
102 // Internal graphics: Sub-function 7
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)
115 // Report DVMT 5.0 Total Graphics memory size.
117 Or(PARM, ShiftLeft(IDMS, 17), PARM) // Bits 20:17 are for Gfx total memory size
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
126 // Report the graphics frequency based on DISPLAY_CLOCK_FREQUENCY_ENCODING [MMADR+0x20C8]
128 Or(ShiftLeft(Derefof(Index(CDCT, \_SB.PCI0.GFX0.MCHK.DCFE)), 21),PARM, PARM)
130 Store(1, GESF) // Set the modified settings flag
134 // Spread spectrum clocks: Sub-function 10
136 If (LEqual(GESF, 10))
139 Store(0, PARM) // Assume SSC is disabled
143 Or(PARM, 3, PARM) // If SSC enabled, return SSC1+Enabled
146 Store(0, GESF) // Set the modified settings flag
147 Return(SUCC) // Success
151 // A call to a reserved "Get BIOS data" function was received.
153 Store(Zero, GESF) // Clear the exit parameter
154 Return(CRIT) // Reserved, "Critical failure"