]>
Commit | Line | Data |
---|---|---|
3cbfba02 DW |
1 | \r |
2 | /*++\r | |
3 | \r | |
4 | Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved\r | |
5 | \r | |
6 | This program and the accompanying materials are licensed and made available under\r | |
7 | the terms and conditions of the BSD License that accompanies this distribution.\r | |
8 | The full text of the license may be found at\r | |
9 | http://opensource.org/licenses/bsd-license.php.\r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
13 | \r | |
14 | \r | |
15 | Module Name:\r | |
16 | \r | |
17 | IgdOpRegion.h\r | |
18 | \r | |
19 | Abstract:\r | |
20 | \r | |
21 | This file is part of the IGD OpRegion Implementation. The IGD OpRegion is\r | |
22 | an interface between system BIOS, ASL code, and Graphics drivers.\r | |
23 | \r | |
24 | Supporting Specifiction: IGD OpRegion/Software SCI SPEC\r | |
25 | \r | |
26 | Note: Data structures defined in this protocol are packed not naturally\r | |
27 | aligned.\r | |
28 | \r | |
29 | GUID forms:\r | |
30 | {CDC5DDDF-E79D-41ec-A9B0-6565490DB9D3}\r | |
31 | (0xcdc5dddf, 0xe79d, 0x41ec, 0xa9, 0xb0, 0x65, 0x65, 0x49, 0xd, 0xb9, 0xd3);\r | |
32 | \r | |
33 | Acronyms:\r | |
34 | NVS: ACPI Non Volatile Storage\r | |
35 | OpRegion: ACPI Operational Region\r | |
36 | VBT: Video BIOS Table (OEM customizable data)\r | |
37 | \r | |
38 | --*/\r | |
39 | \r | |
40 | #ifndef _IGD_OPREGION_PROTOCOL_H_\r | |
41 | #define _IGD_OPREGION_PROTOCOL_H_\r | |
42 | \r | |
43 | //\r | |
44 | // OpRegion / Software SCI protocol GUID\r | |
45 | //\r | |
46 | #define IGD_OPREGION_PROTOCOL_GUID \\r | |
47 | { \\r | |
48 | 0xcdc5dddf, 0xe79d, 0x41ec, 0xa9, 0xb0, 0x65, 0x65, 0x49, 0xd, 0xb9, 0xd3 \\r | |
49 | }\r | |
50 | \r | |
51 | //\r | |
52 | // Extern the GUID for protocol users.\r | |
53 | //\r | |
54 | extern EFI_GUID gIgdOpRegionProtocolGuid;\r | |
55 | \r | |
56 | //\r | |
57 | // Forward reference for pure ANSI compatability\r | |
58 | //\r | |
59 | typedef struct _IGD_OPREGION_PROTOCOL IGD_OPREGION_PROTOCOL;\r | |
60 | \r | |
61 | //\r | |
62 | // Protocol data definitions\r | |
63 | //\r | |
64 | \r | |
65 | //\r | |
66 | // OpRegion structures:\r | |
67 | // Sub-structures define the different parts of the OpRegion followed by the\r | |
68 | // main structure representing the entire OpRegion.\r | |
69 | //\r | |
70 | // Note: These structures are packed to 1 byte offsets because the exact\r | |
71 | // data location is requred by the supporting design specification due to\r | |
72 | // the fact that the data is used by ASL and Graphics driver code compiled\r | |
73 | // separatly.\r | |
74 | //\r | |
75 | \r | |
76 | //\r | |
77 | // OpRegion header (mailbox 0) structure and #defines.\r | |
78 | //\r | |
79 | #pragma pack (1)\r | |
80 | typedef struct {\r | |
81 | CHAR8 SIGN[0x10]; // 0 OpRegion signature\r | |
82 | UINT32 SIZE; // 0x10 OpRegion size\r | |
83 | UINT32 OVER; // 0x14 OpRegion structure version\r | |
84 | UINT8 SVER[0x20]; // 0x18 System BIOS build version\r | |
85 | UINT8 VVER[0x10]; // 0x38 Video BIOS build version\r | |
86 | UINT8 GVER[0x10]; // 0x48 Graphic driver build version\r | |
87 | UINT32 MBOX; // 0x58 Mailboxes supported\r | |
88 | UINT32 DMOD; // 0x5C Driver Model\r | |
89 | UINT32 PCON; // 0x60 Platform Configuration Info\r | |
90 | CHAR8 GOPV[0x20]; // 0X64 GOP build version\r | |
91 | UINT8 RSV[0x7C]; // Reserved\r | |
92 | } OPREGION_HEADER;\r | |
93 | #pragma pack ()\r | |
94 | \r | |
95 | //\r | |
96 | // OpRegion mailbox 1 (public ACPI Methods).\r | |
97 | //\r | |
98 | #pragma pack (1)\r | |
99 | typedef struct {\r | |
100 | UINT32 DRDY; // 0 Driver readiness\r | |
101 | UINT32 CSTS; // 4 Status\r | |
102 | UINT32 CEVT; // 8 Current event\r | |
103 | UINT8 RM11[0x14]; // 12 Reserved\r | |
104 | UINT32 DIDL; // 32 Supported display devices list\r | |
105 | UINT32 DDL2; // 8 Devices.\r | |
106 | UINT32 DDL3;\r | |
107 | UINT32 DDL4;\r | |
108 | UINT32 DDL5;\r | |
109 | UINT32 DDL6;\r | |
110 | UINT32 DDL7;\r | |
111 | UINT32 DDL8;\r | |
112 | UINT32 CPDL; // 64 Currently present display devices list\r | |
113 | UINT32 CPL2; // 8 Devices.\r | |
114 | UINT32 CPL3;\r | |
115 | UINT32 CPL4;\r | |
116 | UINT32 CPL5;\r | |
117 | UINT32 CPL6;\r | |
118 | UINT32 CPL7;\r | |
119 | UINT32 CPL8;\r | |
120 | UINT32 CADL; // 96 Currently active display devices list\r | |
121 | UINT32 CAL2; // 8 Devices.\r | |
122 | UINT32 CAL3;\r | |
123 | UINT32 CAL4;\r | |
124 | UINT32 CAL5;\r | |
125 | UINT32 CAL6;\r | |
126 | UINT32 CAL7;\r | |
127 | UINT32 CAL8;\r | |
128 | UINT32 NADL; // 128 Next active device list\r | |
129 | UINT32 NDL2; // 8 Devices.\r | |
130 | UINT32 NDL3;\r | |
131 | UINT32 NDL4;\r | |
132 | UINT32 NDL5;\r | |
133 | UINT32 NDL6;\r | |
134 | UINT32 NDL7;\r | |
135 | UINT32 NDL8;\r | |
136 | UINT32 ASLP; // 160 ASL sleep timeout\r | |
137 | UINT32 TIDX; // 164 Toggle table index\r | |
138 | UINT32 CHPD; // 168 Current hot plug enable indicator\r | |
139 | UINT32 CLID; // 172 Current lid state indicator\r | |
140 | UINT32 CDCK; // 176 Current docking state indicator\r | |
141 | UINT32 SXSW; // 180 Display Switch notification on Sx State resume\r | |
142 | UINT32 EVTS; // 184 Events supported by ASL\r | |
143 | UINT32 CNOT; // 188 Current OS Notification\r | |
144 | UINT32 NRDY; // 192 Reasons for DRDY = 0\r | |
145 | UINT8 RM12[0x3C]; // 196 Reserved\r | |
146 | } OPREGION_MBOX1;\r | |
147 | #pragma pack ()\r | |
148 | \r | |
149 | //\r | |
150 | // OpRegion mailbox 2 (Software SCI Interface).\r | |
151 | //\r | |
152 | #pragma pack (1)\r | |
153 | typedef struct {\r | |
154 | UINT32 SCIC; // 0 Software SCI function number parameters\r | |
155 | UINT32 PARM; // 4 Software SCI additional parameters\r | |
156 | UINT32 DSLP; // 8 Driver sleep timeout\r | |
157 | UINT8 RM21[0xF4]; // 12 Reserved\r | |
158 | } OPREGION_MBOX2;\r | |
159 | #pragma pack ()\r | |
160 | \r | |
161 | //\r | |
162 | // OpRegion mailbox 3 (Power Conservation).\r | |
163 | //\r | |
164 | #pragma pack (1)\r | |
165 | typedef struct {\r | |
166 | UINT32 ARDY; // 0 Driver readiness\r | |
167 | UINT32 ASLC; // 4 ASLE interrupt command / status\r | |
168 | UINT32 TCHE; // 8 Technology enabled indicator\r | |
169 | UINT32 ALSI; // 12 Current ALS illuminance reading\r | |
170 | UINT32 BCLP; // 16 Backlight britness to set\r | |
171 | UINT32 PFIT; // 20 Panel fitting Current State or Request\r | |
172 | UINT32 CBLV; // 24 Brightness Current State\r | |
173 | UINT16 BCLM[0x14]; // 28 Backlight Brightness Level Duty Cycle Mapping Table\r | |
174 | UINT32 CPFM; // 68 Panel Fitting Current Mode\r | |
175 | UINT32 EPFM; // 72 Enabled Panel Fitting Mode\r | |
176 | UINT8 PLUT[0x4A]; // 76 Panel Look Up Table\r | |
177 | UINT32 PFMB; // 150 PWM Frequency and Minimum Brightness\r | |
178 | UINT32 CCDV; // 154 Color Correction Default Values\r | |
179 | UINT32 PCFT; // 158 Power Conservation Features\r | |
180 | UINT8 RM31[0x5E]; // 162 Reserved\r | |
181 | } OPREGION_MBOX3;\r | |
182 | #pragma pack ()\r | |
183 | \r | |
184 | //\r | |
185 | // OpRegion mailbox 4 (VBT).\r | |
186 | //\r | |
187 | #pragma pack (1)\r | |
188 | typedef struct {\r | |
189 | UINT8 GVD1[0x1800]; // 6K Reserved\r | |
190 | } OPREGION_VBT;\r | |
191 | #pragma pack ()\r | |
192 | \r | |
193 | #pragma pack (1)\r | |
194 | typedef struct {\r | |
195 | UINT8 EDIDOVRD[0x400]; // 6K Edid overriding data\r | |
196 | } OPREGION_MBOX5;\r | |
197 | #pragma pack ()\r | |
198 | //\r | |
199 | // Entire OpRegion\r | |
200 | //\r | |
201 | #pragma pack (1)\r | |
202 | typedef struct {\r | |
203 | OPREGION_HEADER Header; // OpRegion header\r | |
204 | OPREGION_MBOX1 MBox1; // Mailbox 1: Public ACPI Methods\r | |
205 | OPREGION_MBOX2 MBox2; // Mailbox 2: Software SCI Inteface\r | |
206 | OPREGION_MBOX3 MBox3; // Mailbox 3: Power Conservation\r | |
207 | OPREGION_VBT VBT; // VBT: Video BIOS Table (OEM customizable data)\r | |
208 | OPREGION_MBOX5 MBox5;\r | |
209 | } IGD_OPREGION_STRUC;\r | |
210 | #pragma pack ()\r | |
211 | \r | |
212 | //\r | |
213 | // Protocol data structure definition\r | |
214 | //\r | |
215 | struct _IGD_OPREGION_PROTOCOL {\r | |
216 | IGD_OPREGION_STRUC *OpRegion;\r | |
217 | };\r | |
218 | \r | |
219 | #endif\r |