+++ /dev/null
-/*++\r
-\r
-Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved\r
-\r
- SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-\r
-\r
-Module Name:\r
-\r
- IgdOGBDA.ASL\r
-\r
-Abstract:\r
-\r
- IGD OpRegion/Software SCI Reference Code for the Baytrail Family.\r
- This file contains Get BIOS Data Area funciton support for\r
- the Integrated Graphics Device (IGD) OpRegion/Software SCI mechanism.\r
-\r
---*/\r
-\r
-\r
-Method (GBDA, 0, Serialized)\r
-{\r
-\r
- // Supported calls: Sub-function 0\r
-\r
- If (LEqual(GESF, 0))\r
- {\r
- //<TODO> Update implementation specific supported calls. Reference\r
- // code is set to Intel's validated implementation.\r
-\r
- Store(0x0000279, PARM)\r
-\r
- Store(Zero, GESF) // Clear the exit parameter\r
- Return(SUCC) // Success\r
- }\r
-\r
- // Requested callbacks: Sub-function 1\r
-\r
- If (LEqual(GESF, 1))\r
- {\r
-\r
- //<TODO> Update implementation specific system BIOS requested call\r
- // back functions. Call back functions are where the driver calls the\r
- // system BIOS at function indicated event.\r
-\r
- Store(0x00000240, PARM)\r
-\r
- Store(Zero, GESF) // Clear the exit parameter\r
- Return(SUCC) // Success\r
- }\r
-\r
- // Get Boot display Preferences: Sub-function 4\r
-\r
- If (LEqual(GESF, 4))\r
- {\r
-\r
- //<TODO> Update the implementation specific Get Boot Display\r
- // Preferences function.\r
-\r
- And(PARM, 0xEFFF0000, PARM) // PARM[30:16] = Boot device ports\r
- And(PARM, ShiftLeft(DeRefOf(Index(DBTB, IBTT)), 16), PARM)\r
- Or(IBTT, PARM, PARM) // PARM[7:0] = Boot device type\r
-\r
- Store(Zero, GESF) // Clear the exit parameter\r
- Return(SUCC) // Success\r
- }\r
-\r
- // Panel details: Sub-function 5\r
-\r
- If (LEqual(GESF, 5))\r
- {\r
-\r
- //<TODO> Update the implementation specific Get Panel Details\r
- // function.\r
-\r
- Store(IPSC, PARM) // Report the scaling setting\r
- Or(PARM, ShiftLeft(IPAT, 8), PARM)\r
- Add(PARM, 0x100, PARM) // Adjust panel type, 0 = VBT default\r
- Or(PARM, ShiftLeft(LIDS, 16), PARM) // Report the lid state\r
- Add(PARM, 0x10000, PARM) // Adjust the lid state, 0 = Unknown\r
- Or(PARM, ShiftLeft(IBLC, 18), PARM) // Report the BLC setting\r
- Or(PARM, ShiftLeft(IBIA, 20), PARM) // Report the BIA setting\r
- Store(Zero, GESF)\r
- Return(SUCC)\r
- }\r
-\r
- // TV-standard/Video-connector: Sub-function 6\r
-\r
- If (LEqual(GESF, 6))\r
- {\r
-\r
- //<TODO> Update the implementation specific Get\r
- // TV-standard/Video-connectorPanel function.\r
-\r
- Store(ITVF, PARM)\r
- Or(PARM, ShiftLeft(ITVM, 4), PARM)\r
- Store(Zero, GESF)\r
- Return(SUCC)\r
- }\r
-\r
- // Internal graphics: Sub-function 7\r
-\r
- If (LEqual(GESF, 7))\r
- {\r
- Store(GIVD, PARM) // PARM[0] - VGA mode(1=VGA)\r
- Xor(PARM, 1, PARM) // Invert the VGA mode polarity\r
- Or(PARM, ShiftLeft(GMFN, 1), PARM) // PARM[1] - # IGD PCI functions-1\r
- // PARM[3:2] - Reserved\r
- // PARM[4] - IGD D3 support(0=cold)\r
- // PARM[10:5] - Reserved\r
- Or(PARM, ShiftLeft(3, 11), PARM) // PARM[12:11] - DVMT mode(11b = 5.0)\r
-\r
- //\r
- // Report DVMT 5.0 Total Graphics memory size.\r
- //\r
- Or(PARM, ShiftLeft(IDMS, 17), PARM) // Bits 20:17 are for Gfx total memory size\r
-\r
- // If the "Set Internal Graphics" call is supported, the modified\r
- // settings flag must be programmed per the specification. This means\r
- // that the flag must be set to indicate that system BIOS requests\r
- // these settings. Once "Set Internal Graphics" is called, the\r
- // modified settings flag must be cleared on all subsequent calls to\r
- // this function.\r
-\r
- // Report the graphics frequency based on DISPLAY_CLOCK_FREQUENCY_ENCODING [MMADR+0x20C8]\r
-\r
- Or(ShiftLeft(Derefof(Index(CDCT, \_SB.PCI0.GFX0.MCHK.DCFE)), 21),PARM, PARM)\r
-\r
- Store(1, GESF) // Set the modified settings flag\r
- Return(SUCC)\r
- }\r
-\r
- // Spread spectrum clocks: Sub-function 10\r
-\r
- If (LEqual(GESF, 10))\r
- {\r
-\r
- Store(0, PARM) // Assume SSC is disabled\r
-\r
- If(ISSC)\r
- {\r
- Or(PARM, 3, PARM) // If SSC enabled, return SSC1+Enabled\r
- }\r
-\r
- Store(0, GESF) // Set the modified settings flag\r
- Return(SUCC) // Success\r
- }\r
-\r
-\r
- // A call to a reserved "Get BIOS data" function was received.\r
-\r
- Store(Zero, GESF) // Clear the exit parameter\r
- Return(CRIT) // Reserved, "Critical failure"\r
-}\r