]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Vlv2DeviceRefCodePkg/ValleyView2Soc/NorthCluster/Include/Protocol/IgdOpRegion.h
Upload BSD-licensed Vlv2TbltDevicePkg and Vlv2DeviceRefCodePkg to
[mirror_edk2.git] / Vlv2DeviceRefCodePkg / ValleyView2Soc / NorthCluster / Include / Protocol / IgdOpRegion.h
diff --git a/Vlv2DeviceRefCodePkg/ValleyView2Soc/NorthCluster/Include/Protocol/IgdOpRegion.h b/Vlv2DeviceRefCodePkg/ValleyView2Soc/NorthCluster/Include/Protocol/IgdOpRegion.h
new file mode 100644 (file)
index 0000000..8aa7c7b
--- /dev/null
@@ -0,0 +1,219 @@
+\r
+/*++\r
+\r
+Copyright (c)  1999  - 2014, Intel Corporation. All rights reserved\r
+\r
+  This program and the accompanying materials are licensed and made available under\r
+  the terms and conditions of the BSD License that accompanies this distribution.\r
+  The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.php.\r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+\r
+Module Name:\r
+\r
+  IgdOpRegion.h\r
+\r
+Abstract:\r
+\r
+  This file is part of the IGD OpRegion Implementation.  The IGD OpRegion is\r
+  an interface between system BIOS, ASL code, and Graphics drivers.\r
+\r
+  Supporting Specifiction: IGD OpRegion/Software SCI SPEC\r
+\r
+  Note:  Data structures defined in this protocol are packed not naturally\r
+    aligned.\r
+\r
+  GUID forms:\r
+    {CDC5DDDF-E79D-41ec-A9B0-6565490DB9D3}\r
+    (0xcdc5dddf, 0xe79d, 0x41ec, 0xa9, 0xb0, 0x65, 0x65, 0x49, 0xd, 0xb9, 0xd3);\r
+\r
+  Acronyms:\r
+    NVS:        ACPI Non Volatile Storage\r
+    OpRegion:   ACPI Operational Region\r
+    VBT:        Video BIOS Table (OEM customizable data)\r
+\r
+--*/\r
+\r
+#ifndef _IGD_OPREGION_PROTOCOL_H_\r
+#define _IGD_OPREGION_PROTOCOL_H_\r
+\r
+//\r
+// OpRegion / Software SCI protocol GUID\r
+//\r
+#define IGD_OPREGION_PROTOCOL_GUID \\r
+  { \\r
+    0xcdc5dddf, 0xe79d, 0x41ec, 0xa9, 0xb0, 0x65, 0x65, 0x49, 0xd, 0xb9, 0xd3 \\r
+  }\r
+\r
+//\r
+// Extern the GUID for protocol users.\r
+//\r
+extern EFI_GUID gIgdOpRegionProtocolGuid;\r
+\r
+//\r
+// Forward reference for pure ANSI compatability\r
+//\r
+typedef struct _IGD_OPREGION_PROTOCOL IGD_OPREGION_PROTOCOL;\r
+\r
+//\r
+// Protocol data definitions\r
+//\r
+\r
+//\r
+// OpRegion structures:\r
+// Sub-structures define the different parts of the OpRegion followed by the\r
+// main structure representing the entire OpRegion.\r
+//\r
+// Note: These structures are packed to 1 byte offsets because the exact\r
+// data location is requred by the supporting design specification due to\r
+// the fact that the data is used by ASL and Graphics driver code compiled\r
+// separatly.\r
+//\r
+\r
+//\r
+// OpRegion header (mailbox 0) structure and #defines.\r
+//\r
+#pragma pack (1)\r
+typedef struct {\r
+  CHAR8   SIGN[0x10]; // 0      OpRegion signature\r
+  UINT32  SIZE;       // 0x10   OpRegion size\r
+  UINT32  OVER;       // 0x14   OpRegion structure version\r
+  UINT8   SVER[0x20]; // 0x18   System BIOS build version\r
+  UINT8   VVER[0x10]; // 0x38   Video BIOS build version\r
+  UINT8   GVER[0x10]; // 0x48   Graphic driver build version\r
+  UINT32  MBOX;       // 0x58   Mailboxes supported\r
+  UINT32  DMOD;       // 0x5C   Driver Model\r
+  UINT32  PCON;       // 0x60   Platform Configuration Info\r
+  CHAR8   GOPV[0x20]; // 0X64   GOP build version\r
+  UINT8   RSV[0x7C];  //        Reserved\r
+} OPREGION_HEADER;\r
+#pragma pack ()\r
+\r
+//\r
+// OpRegion mailbox 1 (public ACPI Methods).\r
+//\r
+#pragma pack (1)\r
+typedef struct {\r
+  UINT32  DRDY;     // 0    Driver readiness\r
+  UINT32  CSTS;     // 4    Status\r
+  UINT32  CEVT;     // 8    Current event\r
+  UINT8   RM11[0x14]; // 12   Reserved\r
+  UINT32  DIDL;       // 32   Supported display devices list\r
+  UINT32  DDL2;       //  8 Devices.\r
+  UINT32  DDL3;\r
+  UINT32  DDL4;\r
+  UINT32  DDL5;\r
+  UINT32  DDL6;\r
+  UINT32  DDL7;\r
+  UINT32  DDL8;\r
+  UINT32  CPDL;       // 64   Currently present display devices list\r
+  UINT32  CPL2;       //  8 Devices.\r
+  UINT32  CPL3;\r
+  UINT32  CPL4;\r
+  UINT32  CPL5;\r
+  UINT32  CPL6;\r
+  UINT32  CPL7;\r
+  UINT32  CPL8;\r
+  UINT32  CADL;       // 96   Currently active display devices list\r
+  UINT32  CAL2;       //  8 Devices.\r
+  UINT32  CAL3;\r
+  UINT32  CAL4;\r
+  UINT32  CAL5;\r
+  UINT32  CAL6;\r
+  UINT32  CAL7;\r
+  UINT32  CAL8;\r
+  UINT32  NADL;       // 128  Next active device list\r
+  UINT32  NDL2;       //   8 Devices.\r
+  UINT32  NDL3;\r
+  UINT32  NDL4;\r
+  UINT32  NDL5;\r
+  UINT32  NDL6;\r
+  UINT32  NDL7;\r
+  UINT32  NDL8;\r
+  UINT32  ASLP;     // 160  ASL sleep timeout\r
+  UINT32  TIDX;     // 164  Toggle table index\r
+  UINT32  CHPD;     // 168  Current hot plug enable indicator\r
+  UINT32  CLID;     // 172  Current lid state indicator\r
+  UINT32  CDCK;     // 176  Current docking state indicator\r
+  UINT32  SXSW;     // 180  Display Switch notification on Sx State resume\r
+  UINT32  EVTS;     // 184  Events supported by ASL\r
+  UINT32  CNOT;     // 188  Current OS Notification\r
+  UINT32  NRDY;     // 192  Reasons for DRDY = 0\r
+  UINT8   RM12[0x3C]; // 196  Reserved\r
+} OPREGION_MBOX1;\r
+#pragma pack ()\r
+\r
+//\r
+// OpRegion mailbox 2 (Software SCI Interface).\r
+//\r
+#pragma pack (1)\r
+typedef struct {\r
+  UINT32  SCIC;       // 0    Software SCI function number parameters\r
+  UINT32  PARM;       // 4    Software SCI additional parameters\r
+  UINT32  DSLP;       // 8    Driver sleep timeout\r
+  UINT8   RM21[0xF4]; // 12   Reserved\r
+} OPREGION_MBOX2;\r
+#pragma pack ()\r
+\r
+//\r
+// OpRegion mailbox 3 (Power Conservation).\r
+//\r
+#pragma pack (1)\r
+typedef struct {\r
+  UINT32  ARDY;       // 0    Driver readiness\r
+  UINT32  ASLC;       // 4    ASLE interrupt command / status\r
+  UINT32  TCHE;       // 8    Technology enabled indicator\r
+  UINT32  ALSI;       // 12   Current ALS illuminance reading\r
+  UINT32  BCLP;       // 16   Backlight britness to set\r
+  UINT32  PFIT;       // 20   Panel fitting Current State or Request\r
+  UINT32  CBLV;       // 24   Brightness Current State\r
+  UINT16  BCLM[0x14]; // 28   Backlight Brightness Level Duty Cycle Mapping Table\r
+  UINT32  CPFM;       // 68   Panel Fitting Current Mode\r
+  UINT32  EPFM;       // 72   Enabled Panel Fitting Mode\r
+  UINT8   PLUT[0x4A]; // 76   Panel Look Up Table\r
+  UINT32  PFMB;       // 150  PWM Frequency and Minimum Brightness\r
+  UINT32  CCDV;       // 154  Color Correction Default Values\r
+  UINT32  PCFT;       // 158  Power Conservation Features\r
+  UINT8   RM31[0x5E]; // 162  Reserved\r
+} OPREGION_MBOX3;\r
+#pragma pack ()\r
+\r
+//\r
+// OpRegion mailbox 4 (VBT).\r
+//\r
+#pragma pack (1)\r
+typedef struct {\r
+  UINT8 GVD1[0x1800]; // 6K Reserved\r
+} OPREGION_VBT;\r
+#pragma pack ()\r
+\r
+#pragma pack (1)\r
+typedef struct {\r
+  UINT8 EDIDOVRD[0x400]; // 6K Edid overriding data\r
+} OPREGION_MBOX5;\r
+#pragma pack ()\r
+//\r
+// Entire OpRegion\r
+//\r
+#pragma pack (1)\r
+typedef struct {\r
+  OPREGION_HEADER  Header; // OpRegion header\r
+  OPREGION_MBOX1   MBox1;  // Mailbox 1: Public ACPI Methods\r
+  OPREGION_MBOX2   MBox2;  // Mailbox 2: Software SCI Inteface\r
+  OPREGION_MBOX3   MBox3;  // Mailbox 3: Power Conservation\r
+  OPREGION_VBT        VBT;    // VBT: Video BIOS Table (OEM customizable data)\r
+  OPREGION_MBOX5   MBox5;\r
+} IGD_OPREGION_STRUC;\r
+#pragma pack ()\r
+\r
+//\r
+// Protocol data structure definition\r
+//\r
+struct _IGD_OPREGION_PROTOCOL {\r
+  IGD_OPREGION_STRUC    *OpRegion;\r
+};\r
+\r
+#endif\r