-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathesif_sdk_logging_data.h
310 lines (271 loc) · 9.57 KB
/
esif_sdk_logging_data.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
/*******************************************************************************
** This file is provided under a dual BSD/GPLv2 license. When using or
** redistributing this file, you may do so under either license.
**
** GPL LICENSE SUMMARY
**
** Copyright (c) 2013-2023 Intel Corporation All Rights Reserved
**
** This program is free software; you can redistribute it and/or modify it under
** the terms of version 2 of the GNU General Public License as published by the
** Free Software Foundation.
**
** This program is distributed in the hope that it will be useful, but WITHOUT
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
** FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
** details.
**
** You should have received a copy of the GNU General Public License along with
** this program; if not, write to the Free Software Foundation, Inc.,
** 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
** The full GNU General Public License is included in this distribution in the
** file called LICENSE.GPL.
**
** BSD LICENSE
**
** Copyright (c) 2013-2023 Intel Corporation All Rights Reserved
**
** Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are met:
**
** * Redistributions of source code must retain the above copyright notice, this
** list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright notice,
** this list of conditions and the following disclaimer in the documentation
** and/or other materials provided with the distribution.
** * Neither the name of Intel Corporation nor the names of its contributors may
** be used to endorse or promote products derived from this software without
** specific prior written permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
** SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
** INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
** CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
** ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
** POSSIBILITY OF SUCH DAMAGE.
**
*******************************************************************************/
#pragma once
#include "esif_sdk_data.h"
#include "esif_sdk_data_misc.h"
#pragma pack(push, 1)
/* Policy Data */
typedef struct _t_EsifPolicyLogData_s {
UInt32 policyIndex;
UInt8 loaded;
char policyName[MAX_PATH];
char policyFileName[MAX_PATH];
esif_guid_t policyGuid;
} EsifPolicyLogData, *EsifPolicyLogDataPtr;
/* Active Control Data */
typedef struct _t_EsifActiveControlCapability {
UInt32 controlId;
UInt32 speed;
UInt32 lowerLimit;
UInt32 upperLimit;
} EsifActiveControlCapability, *EsifActiveControlCapabilityPtr;
/* Core Control Data */
typedef struct _t_EsifCoreControl {
UInt32 activeLogicalProcessors;
UInt32 minimumActiveCores;
UInt32 maximumActiveCores;
} EsifCoreControl, *EsifCoreControlPtr;
/* Display Control Data */
typedef struct _t_EsifDisplayControl {
UInt32 currentDPTFLimit;
UInt32 lowerLimit;
UInt32 upperLimit;
} EsifDisplayControl, *EsifDisplayControlPtr;
/* Domain Priority Data */
typedef struct _t_EsifDomainPriority {
UInt32 priority;
} EsifDomainPriority, *EsifDomainPriorityPtr;
/* Energy Control Data */
typedef struct _t_EsifEnergyControl {
UInt32 energyCounter;
UInt32 instantaneousPower;
} EsifEnergyControl, *EsifEnergyControlPtr;
/* Performance Control Data */
typedef struct _t_EsifPerformanceControl {
UInt32 pStateLimit;
UInt32 lowerLimit;
UInt32 upperLimit;
} EsifPerformanceControl, *EsifPerformanceControlPtr;
#define MAX_POWER_CONTROL_TYPE 4
typedef struct _t_EsifPowerData {
UInt32 powerType;
UInt32 isEnabled;
UInt32 powerLimit;
UInt32 lowerLimit;
UInt32 upperLimit;
UInt32 stepsize;
UInt32 minTimeWindow;
UInt32 maxTimeWindow;
UInt32 minDutyCycle;
UInt32 maxDutyCycle;
} EsifPowerData;
typedef struct _t_EsifSocPowerFloorData {
UInt32 socPowerFloorState;
UInt32 isSupported;
} EsifSocPowerFloorData;
/* Power Control Data */
typedef struct _t_EsifPowerControl {
EsifPowerData powerDataSet[MAX_POWER_CONTROL_TYPE];
EsifSocPowerFloorData socPowerFloorData;
} EsifPowerControl, *EsifPowerControlPtr;
typedef struct _t_EsifPowerFilterData {
UInt32 currentPowerSentToFilter;
UInt32 powerCalculatedByFilter;
} EsifPowerFilterData;
/* Power Status Data */
typedef struct _t_EsifPowerStatus {
EsifPowerFilterData powerFilterData;
UInt32 currentPower;
} EsifPowerStatus, *EsifPowerStatusPtr;
/* Temperature Status Data */
typedef struct _t_EsifTemperatureStatus {
UInt32 temperature;
} EsifTemperatureStatus, *EsifTemperatureStatusPtr;
/* Utilization Status Data */
typedef struct _t_EsifUtilizationStatus {
UInt32 utilization;
} EsifUtilizationStatus, *EsifUtilizationStatusPtr;
/* Peak Power Control Data */
typedef struct _t_EsifPeakPowerControl {
UInt32 acPeakPower;
UInt32 dcPeakPower;
} EsifPeakPowerControl, *EsifPeakPowerControlPtr;
/* Processor Control Data */
typedef struct _t_EsifProcessorControlStatus {
UInt32 tccOffset;
UInt32 uvth;
} EsifProcessorControlStatus, *EsifProcessorControlStatusPtr;
/* Platform Power Status Data */
typedef struct _t_EsifPlatformPowerStatus {
UInt32 platformRestOfPower;
UInt32 adapterPowerRating;
UInt32 platformPowerSource;
UInt32 acNominalVoltage;
UInt32 acOperationalCurrent;
UInt32 ac1msOverload;
UInt32 ac2msOverload;
UInt32 ac10msOverload;
} EsifPlatformPowerStatus, *EsifPlatformPowerStatusPtr;
/* Battery Status Data */
typedef struct _t_EsifBatteryStatus {
UInt32 maxBatteryPower;
UInt32 steadyStateBatteryPower;
UInt32 chargerType;
UInt32 highFrequencyImpedance;
UInt32 maxPeakCurrent;
UInt32 noLoadVoltage;
UInt32 batteryPercentage;
} EsifBatteryStatus, *EsifBatteryStatusPtr;
/* Temperature Control Data */
typedef struct _t_EsifTemperatureThresholdControl {
UInt32 aux0;
UInt32 aux1;
UInt32 hysteresis;
} EsifTemperatureThresholdControl, *EsifTemperatureThresholdControlPtr;
#define MAX_FREQUENCY_CHANNEL_NUM 5
typedef struct _t_EsifFrequencyData {
UInt32 centerFrequency;
UInt32 leftFrequencySpread;
UInt32 rightFrequencySpread;
} EsifFrequencyData;
/* Rfprofile Status Data */
typedef struct _t_EsifRfProfileStatus {
EsifFrequencyData rfProfileFrequencyData[MAX_FREQUENCY_CHANNEL_NUM];
} EsifRfProfileStatus, *EsifRfProfileStatusPtr;
/* Rfprofile Control Data */
typedef struct _t_EsifRfProfileControl {
UInt32 rfProfileMinFrequency;
UInt32 rfProfileCenterFrequency;
UInt32 rfProfileMaxFrequency;
UInt32 rfProfileSSC;
} EsifRfProfileControl, *EsifRfProfileControlPtr;
/* Psys Control Data */
typedef struct _t_EsifPSysControlData {
UInt32 powerLimitType;
UInt32 powerLimit;
UInt32 PowerLimitTimeWindow;
UInt32 PowerLimitDutyCycle;
} EsifPSysControlData, *EsifPSysControlDataPtr;
#define MAX_PSYS_CONTROL_TYPE 3
/* Psys Control */
typedef struct _t_EsifPSysControl {
EsifPSysControlData powerDataSet[MAX_PSYS_CONTROL_TYPE];
} EsifPSysControl, *EsifPSysControlPtr;
#define MAX_PORT_NUMBER 8
/* Platform Power Control Data */
typedef struct _t_EsifPlatformPowerControl {
UInt32 portDataSet[MAX_PORT_NUMBER];
} EsifPlatformPowerControl, *EsifPlatformPowerControlPtr;
typedef struct _t_EsifManagerStatusData {
UInt32 osPowerSource;
UInt32 batteryPercent;
UInt32 dockMode;
UInt32 gameMode;
UInt32 lidState;
UInt32 powerSlider;
UInt32 userInteraction;
UInt32 userPresence;
UInt32 screenState;
UInt32 deviceOrientation;
UInt32 inMotion;
UInt32 systemCoolingMode;
UInt32 platformType;
UInt32 displayOrientation;
esif_guid_t powerSchemePersonality;
UInt32 mixedRealityMode;
UInt32 platformUserPresence;
UInt32 foregroundBackgroundRatio;
UInt32 collaboration;
EsifPpmParamValues ppmParamValues;
} EsifManagerStatusData, * EsifManagerStatusDataPtr;
/* Workload Classification Data */
typedef struct _t_EsifWorkloadClassification {
UInt32 socWorkload;
UInt32 socWorkloadSource;
} EsifWorkloadClassification, * EsifWorkloadClassificationPtr;
/* Dynamic EPP Data */
typedef struct _t_EsifDynamicEppControl {
UInt32 eppHint;
UInt32 eppValue;
} EsifDynamicEppControl, * EsifDynamicEppControlPtr;
typedef union _t_EsifCapability {
EsifActiveControlCapability activeControl;
EsifCoreControl coreControl;
EsifDisplayControl displayControl;
EsifDomainPriority domainPriority;
EsifEnergyControl energyControl;
EsifPerformanceControl performanceControl;
EsifPowerControl powerControl;
EsifPowerStatus powerStatus;
EsifTemperatureStatus temperatureStatus;
EsifUtilizationStatus utilizationStatus;
EsifPeakPowerControl peakPowerControl;
EsifProcessorControlStatus processorControlStatus;
EsifPlatformPowerStatus platformPowerStatus;
EsifTemperatureThresholdControl temperatureThresholdControl;
EsifRfProfileStatus rfProfileStatus;
EsifRfProfileControl rfProfileControl;
EsifPSysControl psysControl;
EsifPlatformPowerControl platformPowerControl;
EsifBatteryStatus batteryStatus;
EsifManagerStatusData managerStatus;
EsifWorkloadClassification workloadClassification;
EsifDynamicEppControl dynamicEppControl;
} EsifCapability, *EsifCapabilityPtr;
/* Capability Data */
typedef struct _t_EsifCapabilityData {
UInt32 type;
UInt32 size;
EsifCapability data;
} EsifCapabilityData, *EsifCapabilityDataPtr;
#pragma pack(pop)