]> git.proxmox.com Git - mirror_edk2.git/blob - Vlv2TbltDevicePkg/Include/Guid/SensorInfoVariable.h
Upload BSD-licensed Vlv2TbltDevicePkg and Vlv2DeviceRefCodePkg to
[mirror_edk2.git] / Vlv2TbltDevicePkg / Include / Guid / SensorInfoVariable.h
1 /*++
2
3 Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
4
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.
9
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.
12
13
14
15
16 Module Name:
17
18 SensorInfoVariable.h
19
20 Abstract:
21
22 GUID used for Sensor Info variable.
23
24 --*/
25
26
27 //
28 // Module: SensorInfoVariable.h
29 //
30 // Description: Provides structure and literal definitions for the
31 // Sensor Information Variable. The BIOS will provide
32 // this variable to runtime applications via the EFI
33 // GetVariable function.
34 //
35 // Notes: 1. When defining and initializing the variable within the
36 // BIOS, the module will define the structure using the
37 // typedef macros in a block. For an ATX board using a
38 // single Heceta 6P, which has 4 temperature sensors, 6
39 // voltage sensors, 4 fan speed sensors and 3 fan speed
40 // controllers, this block would be declared as follows:
41 //
42 // TYPEDEF_TEMP_SENSOR_SECTION(4);
43 // TYPEDEF_VOLT_SENSOR_SECTION(6);
44 // TYPEDEF_FAN_SENSOR_SECTION(4);
45 // TYPEDEF_FAN_CONTROLLER_SENSOR(3);
46 // TYPEDEF_SENSOR_INFO_VAR;
47 //
48 // 2. When crafting code to access the variable, the module
49 // will also need to invoke the typedef macros in a
50 // block but, since it cannot declare a structure for the
51 // overall variable (because array lengths will vary), it
52 // cannot use TYPEDEF_SENSOR_INFO_VAR. The block will
53 // typically be used as follows:
54 //
55 // TYPEDEF_TEMP_SENSOR_SECTION(1);
56 // TYPEDEF_VOLT_SENSOR_SECTION(1);
57 // TYPEDEF_FAN_SENSOR_SECTION(1);
58 // TYPEDEF_FAN_CONTROLLER_SENSOR(1);
59 //
60 // The structure buffer should instead be declared as a
61 // BYTE array. Pointers to the various sections can then
62 // be built using the XXXX_SECTION_LEN macros...
63 //
64
65
66 #ifndef _SENSOR_INFO_VAR_GUID_H_
67 #define _SENSOR_INFO_VAR_GUID_H_
68
69 #define SENSOR_INFO_VAR_GUID \
70 { \
71 0xE59E7B4D, 0x06DC, 0x44AB, 0xB3, 0x6D, 0x5E, 0xD7, 0x78, 0x9C, 0x53, 0x0A \
72 }
73
74 extern EFI_GUID gEfiSensorInfoVarGuid;
75 extern CHAR16 gEfiSensorInfoVarName[];
76 extern CHAR16 gEfiSensorInfoVarNameWithPassword[];
77
78 #define SENSOR_INFO_VAR_NAME L"SensorInfoVar"
79 #define SENSOR_INFO_VAR_NAME_WITH_PASSWORD SENSOR_INFO_VAR_NAME L"S4k?A^7!"
80
81 //
82 // Sensor/Controller usage definitions
83 //
84
85 #define UNKNOWN_OTHER 0
86
87 //
88 // Temperature Sensors
89 //
90 #define CPU_CORE_TEMPERATURE 1
91 #define CPU_DIE_TEMPERATURE 2
92 #define ICH_TEMPERATURE 3
93 #define MCH_TEMPERATURE 4
94 #define VR_TEMPERATURE 5
95 #define MEMORY_TEMPERATURE 6
96 #define MOTHERBOARD_AMBIENT_TEMPERATURE 7
97 #define SYSTEM_AMBIENT_AIR_TEMPERATURE 8
98 #define CPU_INLET_AIR_TEMPERATURE 9
99 #define SYSTEM_INLET_AIR_TEMPERATURE 10
100 #define SYSTEM_OUTLET_AIR_TEMPERATURE 11
101 #define PSU_HOTSPOT_TEMPERATURE 12
102 #define PSU_INLET_AIR_TEMPERATURE 13
103 #define PSU_OUTLET_AIR_TEMPERATURE 14
104 #define DRIVE_TEMPERATURE 15
105 #define GPU_TEMPERATURE 16
106 #define IOH_TEMPERATURE 17
107
108 #define LAST_TEMPERATURE 17
109
110 //
111 // Voltage Sensors
112 //
113 #define PLUS_12_VOLTS 1
114 #define NEG_12_VOLTS 2
115 #define PLUS_5_VOLTS 3
116 #define PLUS_5_VOLT_BACKUP 4
117 #define NEG_5_VOLTS 5
118 #define PLUS_3P3_VOLTS 6
119 #define PLUS_2P5_VOLTS 7
120 #define PLUS_1P5_VOLTS 8
121 #define CPU_1_VCCP_VOLTAGE 9
122 #define CPU_2_VCCP_VOLTAGE 10
123 #define CPU_3_VCCP_VOLTAGE 11
124 #define CPU_4_VCCP_VOLTAGE 12
125 #define PSU_INPUT_VOLTAGE 13
126 #define MCH_VCC_VOLTAGE 14
127 #define PLUS_3P3_VOLT_STANDBY 15
128 #define CPU_VTT_VOLTAGE 16
129 #define PLUS_1P8_VOLTS 17
130
131 #define LAST_VOLTAGE 17
132
133 //
134 // Fan Speed Sensors and Controllers.
135 //
136 #define CPU_COOLING_FAN 1
137 #define SYSTEM_COOLING_FAN 2
138 #define MCH_COOLING_FAN 3
139 #define VR_COOLING_FAN 4
140 #define CHASSIS_COOLING_FAN 5
141 #define CHASSIS_INLET_FAN 6
142 #define CHASSIS_OUTLET_FAN 7
143 #define PSU_COOLING_FAN 8
144 #define PSU_INLET_FAN 9
145 #define PSU_OUTLET_FAN 10
146 #define DRIVE_COOLING_FAN 11
147 #define GPU_COOLING_FAN 12
148 #define AUX_COOLING_FAN 13
149 #define IOH_COOLING_FAN 14
150
151 #define LAST_FAN 14
152
153 //
154 // Fan Type Definitions
155 //
156 #define FAN_TYPE_UNKNOWN 0
157 #define FAN_3WIRE_PULSE 1
158 #define FAN_3WIRE_VOLTAGE 2
159 #define FAN_4WIRE 3
160
161 #pragma pack(1)
162
163 //
164 // TEMP_SENSOR_INFO - Structure providing info for a temperature sensor.
165 //
166 typedef struct _TEMP_SENSOR_INFO
167 {
168 UINT8 byDevice; // Device index
169 UINT8 byIndex; // Physical sensor index
170 UINT8 byUsage; // Usage indicator
171 UINT8 bRelative; // Relative vs. Absolute readings
172
173 } TEMP_SENSOR_INFO, *P_TEMP_SENSOR_INFO;
174
175 //
176 // TYPEDEF_TEMP_SENSOR_SECTION - Macro that can be used to typedef the
177 // TEMP_SENSOR_SECTION structure, which provides information about all
178 // temperature sensors.
179 //
180 #define TYPEDEF_TEMP_SENSOR_SECTION(count) \
181 typedef struct _TEMP_SENSOR_SECTION \
182 { \
183 UINT8 byCount; \
184 TEMP_SENSOR_INFO stSensor[count]; \
185 \
186 } TEMP_SENSOR_SECTION, *P_TEMP_SENSOR_SECTION
187
188 //
189 // VOLT_SENSOR_INFO - Structure providing info for a voltage sensor.
190 //
191 typedef struct _VOLT_SENSOR_INFO
192 {
193 UINT8 byDevice; // Device index
194 UINT8 byIndex; // Physical sensor index
195 UINT8 byUsage; // Usage indicator
196
197 } VOLT_SENSOR_INFO, *P_VOLT_SENSOR_INFO;
198
199 //
200 // TYPEDEF_VOLT_SENSOR_SECTION - Macro that can be used to typedef the
201 // VOLT_SENSOR_SECTION structure, which provides information about all
202 // voltage sensors.
203 //
204 #define TYPEDEF_VOLT_SENSOR_SECTION(count) \
205 typedef struct _VOLT_SENSOR_SECTION \
206 { \
207 UINT8 byCount; \
208 VOLT_SENSOR_INFO stSensor[count]; \
209 \
210 } VOLT_SENSOR_SECTION, *P_VOLT_SENSOR_SECTION
211
212 //
213 // FAN_SENSOR_INFO - Structure providing info for a fan speed sensor.
214 //
215 typedef struct _FAN_SENSOR_INFO
216 {
217 UINT8 byDevice; // Device index
218 UINT8 byIndex; // Physical sensor index
219 UINT8 byUsage; // Usage indicator
220 UINT8 byType; // Fan type
221 UINT8 byController; // Associated Fan Controller
222
223 } FAN_SENSOR_INFO, *P_FAN_SENSOR_INFO;
224
225 //
226 // TYPEDEF_FAN_SENSOR_SECTION - Macro that can be used to typedef the
227 // FAN_SENSOR_SECTION structure, which provides information about all fan
228 // speed sensors.
229 //
230 #define TYPEDEF_FAN_SENSOR_SECTION(count) \
231 typedef struct _FAN_SENSOR_SECTION \
232 { \
233 UINT8 byCount; \
234 FAN_SENSOR_INFO stSensor[count]; \
235 \
236 } FAN_SENSOR_SECTION, *P_FAN_SENSOR_SECTION
237
238 //
239 // FAN_CONTROLLER_INFO - Structure providing info for a fan speed controller.
240 //
241 #define MAX_ASSOC_FANS 4
242 #define ASSOC_UNUSED 0xFF
243
244 typedef struct _FAN_CONTROLLER_INFO
245 {
246 UINT8 byDevice; // Device index
247 UINT8 byIndex; // Physical Controller Index
248 UINT8 byUsage; // Usage Indicator
249 UINT8 byFan[MAX_ASSOC_FANS]; // Associated Fan Sensors
250
251 } FAN_CONTROLLER_INFO, *P_FAN_CONTROLLER_INFO;
252
253 //
254 // TYPEDEF_FAN_CONTROLLER_SECTION - Macro that can be used to typedef the
255 // FAN_CONTROLLER_SECTION structure, which provides information about all
256 // fan speed controllers.
257 //
258 #define TYPEDEF_FAN_CONTROLLER_SECTION(count) \
259 typedef struct _FAN_CONTROLLER_SECTION \
260 { \
261 UINT8 byCount; \
262 FAN_CONTROLLER_INFO stController[count]; \
263 \
264 } FAN_CONTROLLER_SECTION, *P_FAN_CONTROLLER_SECTION
265
266 //
267 // TYPEDEF_SENSOR_INFO_VAR - Macro that can be used to typedef the
268 // SENSOR_INFO_VAR structure, which provides information about all sensors
269 // and fan speed controllers. The other TYPEDEF macros must be invoked
270 // before using this one...
271 //
272 #define TYPEDEF_SENSOR_INFO_VAR \
273 typedef struct _SENSOR_INFO_VAR \
274 { \
275 TEMP_SENSOR_SECTION stTemps; \
276 VOLT_SENSOR_SECTION stVolts; \
277 FAN_SENSOR_SECTION stFans; \
278 FAN_CONTROLLER_SECTION stCtrls; \
279 \
280 } SENSOR_INFO_VAR, *P_SENSOR_INFO_VAR
281
282 #pragma pack()
283
284 #endif