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