Skip to content

Commit 340dbf9

Browse files
authored
Merge pull request #43 from intel/11402_release
Changes for 11402 release for Linux
2 parents d2c8f54 + 622fcd9 commit 340dbf9

File tree

420 files changed

+15279
-6621
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

420 files changed

+15279
-6621
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
modules.order
1515
.tmp_versions
1616
**/Linux/build
17+
**/Linux/ipf*
18+
**/Linux/sample*
19+
**/Linux/unit*
1720
!**/Linux/Makefile
1821
.*.cmd
1922
.cproject

Common/Ver.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@
2020

2121
#define VER_MAJOR 1
2222
#define VER_MINOR 0
23-
#define VER_HOTFIX 11363
24-
#define VER_BUILD 34997
23+
#define VER_HOTFIX 11402
24+
#define VER_BUILD 38024

Common/esif_ccb.h

+10-4
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,16 @@
8989
#include <x86intrin.h>
9090
#define ESIF_SERIAL_FENCE() _mm_lfence()
9191

92+
/* Sleep Interface */
93+
#define esif_ccb_sleep(sec) sleep(sec)
94+
95+
#include <time.h>
96+
static inline void esif_ccb_sleep_msec(unsigned msec)
97+
{
98+
struct timespec tv = { (time_t)(msec / 1000), (long)((msec % 1000) * 1000000l) };
99+
(void)nanosleep(&tv, NULL);
100+
}
101+
92102

93103
/* Add Linux Base Types */
94104
typedef unsigned char u8;
@@ -128,10 +138,6 @@ typedef u64 esif_context_t; /* opaque ESIF 64-bit context (may be a pointer) */
128138

129139
#define UNREFERENCED_PARAMETER(x) (void)(x) /* Avoid Unused Variable Klocwork errors */
130140

131-
/* Sleep Interface */
132-
#define esif_ccb_sleep(sec) sleep(sec)
133-
#define esif_ccb_sleep_msec(msec) usleep(msec * 1000)
134-
135141
/* Deduce Platform based on predefined compiler flags */
136142
#ifdef __x86_64__
137143
#define ESIF_ATTR_64BIT

Common/esif_ccb_cpuid.h

+2
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
* Various CPU Family models
8787
*/
8888
// TBD: Merge the list from the windows file here eventually.
89+
#define CPUID_FAMILY_MODEL_STEP_MASK 0x0FFF0FFF // 27:20-xFam, 19:16-xMod, 11:8-Fam, 7:4-Mod, 3:0-Step
8990
#define CPUID_FAMILY_MODEL_MASK 0x0FFF0FF0 // 27:20-xFam, 19:16-xMod, 11:8-Fam, 7:4-Mod
9091
#define CPUID_FAMILY_MODEL_SNB 0x000206A0 // Sandy Bridge
9192
#define CPUID_FAMILY_MODEL_IVB 0x000306A0 // Ivy Bridge
@@ -115,6 +116,7 @@
115116
#define CPUID_FAMILY_MODEL_RPL_P 0x000B06A0 // Raptor Lake P
116117
#define CPUID_FAMILY_MODEL_ADL_N 0x000B06E0 // Alder Lake N
117118
#define CPUID_FAMILY_MODEL_ADL_P 0x000906A0 // Alder Lake P
119+
#define CPUID_FAMILY_MODEL_PTL 0x000C06C0 // Panther Lake U/P/H
118120
#pragma pack(push, 1)
119121

120122
typedef struct esif_ccb_cpuid_s {

Common/esif_ccb_rc.h

+4
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ typedef enum esif_rc {
7272
ESIF_I_AGAIN, /* Come Back And Try Again Later */
7373
ESIF_I_MSR_AFFINITY, /* Not All MSR Affinities Operational/Supported */
7474
ESIF_I_INIT_PAUSED, /* Init paused - for later completion */
75+
ESIF_I_NO_LEGACY_SUPPORT, /* Primitive is not supported in current DSP */
7576

7677
/*
7778
**********************************************************************
@@ -91,6 +92,7 @@ typedef enum esif_rc {
9192
ESIF_E_MAXIMUM_CAPACITY_REACHED,/* Unable to insert object due to lack of entries */
9293
ESIF_E_DISABLED, /* Optional support disabled by configuration */
9394
ESIF_E_NOT_INITIALIZED, /* Required support has not been initialized */
95+
ESIF_E_UNSUPPORTED_CLIENT_SDK, /* Client SDK not compatible with core/IPC */
9496

9597

9698
/* ACPI */
@@ -255,6 +257,7 @@ static ESIF_INLINE char *esif_error_str(esif_error_t type)
255257
ESIF_CASE_ENUM(ESIF_I_AGAIN);
256258
ESIF_CASE_ENUM(ESIF_I_MSR_AFFINITY);
257259
ESIF_CASE_ENUM(ESIF_I_INIT_PAUSED);
260+
ESIF_CASE_ENUM(ESIF_I_NO_LEGACY_SUPPORT);
258261

259262
ESIF_CASE_ENUM(ESIF_E_NOT_IMPLEMENTED);
260263
ESIF_CASE_ENUM(ESIF_E_NO_LOWER_FRAMEWORK);
@@ -268,6 +271,7 @@ static ESIF_INLINE char *esif_error_str(esif_error_t type)
268271
ESIF_CASE_ENUM(ESIF_E_MAXIMUM_CAPACITY_REACHED);
269272
ESIF_CASE_ENUM(ESIF_E_DISABLED);
270273
ESIF_CASE_ENUM(ESIF_E_NOT_INITIALIZED);
274+
ESIF_CASE_ENUM(ESIF_E_UNSUPPORTED_CLIENT_SDK);
271275

272276
ESIF_CASE_ENUM(ESIF_E_NO_ACPI_SUPPORT);
273277
ESIF_CASE_ENUM(ESIF_E_NO_ACPII_SUPPORT);

Common/esif_ccb_sem.h

+1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ static ESIF_INLINE void esif_ccb_event_init(esif_ccb_event_t *event_ptr)
7777
esif_ccb_sem_init(&event_ptr->sem_obj);
7878
event_ptr->waiters = 0;
7979
event_ptr->signaled = ESIF_FALSE;
80+
event_ptr->sig_count = 0;
8081
}
8182

8283

Common/esif_ccb_socket_lin_user.h

+10-2
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,21 @@ static void ESIF_INLINE esif_ccb_socket_seterror(int err)
6161
// Call close only from the thread servicing the socket
6262
static int ESIF_INLINE esif_ccb_socket_close(esif_ccb_socket_t socket)
6363
{
64-
return close(socket);
64+
int err = SOCKET_ERROR;
65+
if (socket != INVALID_SOCKET) {
66+
err = close(socket);
67+
}
68+
return err;
6569
}
6670

6771
// Call shutdown from another thread to signal a waiting select() to exit
6872
static int ESIF_INLINE esif_ccb_socket_shutdown(esif_ccb_socket_t socket, int how)
6973
{
70-
return shutdown(socket, how);
74+
int err = SOCKET_ERROR;
75+
if (socket != INVALID_SOCKET) {
76+
err = shutdown(socket, how);
77+
}
78+
return err;
7179
}
7280

7381
#define esif_ccb_socket_ioctl(socket, cmd, argp) do { if (argp) UNREFERENCED_PARAMETER(*argp); } while (0)

Common/esif_ccb_timer_lin_user.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ static ESIF_INLINE enum esif_rc esif_ccb_timer_obj_enable_timer(
7575
)
7676
{
7777
enum esif_rc rc = ESIF_OK;
78-
struct sigevent se;
79-
struct itimerspec its;
78+
struct sigevent se = { 0 };
79+
struct itimerspec its = { 0 };
8080
u64 freq_nanosecs = timeout * 1000 * 1000; /* convert msec to nsec */
8181
struct esif_tmrm_cb_obj *cb_object_ptr = NULL;
8282

Common/esif_sdk.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
#define ESIF_ACPI_NAME_LEN 5 /* Maximum ACPI Device Name Length */
7272
#define ESIF_IPADDR_LEN 20 /* Maximum IP Address Length */
7373
#define ESIF_VERSION_LEN 20 /* Maximum Version String Length */
74+
#define ESIF_MAX_PATH 260 /* Maximum Filename Length */
7475

7576
/* Opaque Types */
7677
typedef u32 esif_flags_t; /* FLAGS */
@@ -92,9 +93,10 @@ typedef u8 esif_ver_t; /* Version */
9293
#define ESIF_INSTANCE_INVALID 255
9394

9495
/* Shared Parameters */
95-
#define ESIF_MAX_CLIENTS 16 /* Maximum IPF Clients */
96+
#define ESIF_MAX_CLIENTS 32 /* Maximum IPF Clients */
9697
#define ESIF_MAX_PLUGINS 4 /* Additional In-Process ESIF Apps (IPFSRV, DPTF, IPFTSC, Plus 1) */
9798
#define ESIF_MAX_APPS (ESIF_MAX_CLIENTS + ESIF_MAX_PLUGINS) /* Maximum ESIF Apps (IPF Clients + IPF_UF Plugins) */
99+
#define ESIF_MAX_IPC_SESSIONS 4 /* Maximum IPC Sessions per Client Process */
98100

99101
/* Primitive Instance */
100102
#define ESIF_INSTANCE_NO_PERSIST 254

Common/esif_sdk_action_type.h

+10-1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ typedef enum esif_action_type {
6363
ESIF_ACTION_ACPI = 4,
6464
ESIF_ACTION_ACPIDECIC = 55,
6565
ESIF_ACTION_ACPILPAT = 40,
66+
ESIF_ACTION_AUDIO = 86,
6667
ESIF_ACTION_BATTERY = 75,
6768
ESIF_ACTION_CAPI = 83,
6869
ESIF_ACTION_CODE = 38,
@@ -78,6 +79,8 @@ typedef enum esif_action_type {
7879
ESIF_ACTION_IDGFX = 78,
7980
ESIF_ACTION_IOC = 74,
8081
ESIF_ACTION_IOSF = 34,
82+
ESIF_ACTION_IPA = 88,
83+
ESIF_ACTION_IPU = 87,
8184
ESIF_ACTION_JAVA = 62,
8285
ESIF_ACTION_KACACHE = 85,
8386
ESIF_ACTION_KDELEGATE = 52,
@@ -111,14 +114,15 @@ typedef enum esif_action_type {
111114
} esif_action_type_t;
112115

113116
/* Max Enum Value for Iteration purposes */
114-
#define MAX_ESIF_ACTION_ENUM_VALUE ESIF_ACTION_KACACHE
117+
#define MAX_ESIF_ACTION_ENUM_VALUE ESIF_ACTION_IPA
115118

116119
static ESIF_INLINE esif_string esif_action_type_str(esif_action_type_t type)
117120
{
118121
switch (type) {
119122
ESIF_CASE_ENUM(ESIF_ACTION_ACPI);
120123
ESIF_CASE_ENUM(ESIF_ACTION_ACPIDECIC);
121124
ESIF_CASE_ENUM(ESIF_ACTION_ACPILPAT);
125+
ESIF_CASE_ENUM(ESIF_ACTION_AUDIO);
122126
ESIF_CASE_ENUM(ESIF_ACTION_BATTERY);
123127
ESIF_CASE_ENUM(ESIF_ACTION_CAPI);
124128
ESIF_CASE_ENUM(ESIF_ACTION_CODE);
@@ -134,6 +138,8 @@ static ESIF_INLINE esif_string esif_action_type_str(esif_action_type_t type)
134138
ESIF_CASE_ENUM(ESIF_ACTION_IDGFX);
135139
ESIF_CASE_ENUM(ESIF_ACTION_IOC);
136140
ESIF_CASE_ENUM(ESIF_ACTION_IOSF);
141+
ESIF_CASE_ENUM(ESIF_ACTION_IPA);
142+
ESIF_CASE_ENUM(ESIF_ACTION_IPU);
137143
ESIF_CASE_ENUM(ESIF_ACTION_JAVA);
138144
ESIF_CASE_ENUM(ESIF_ACTION_KACACHE);
139145
ESIF_CASE_ENUM(ESIF_ACTION_KDELEGATE);
@@ -180,6 +186,7 @@ static ESIF_INLINE esif_action_type_t esif_action_type_str2enum(esif_string name
180186
ESIF_MAP_ENUM(ESIF_ACTION_ACPI),
181187
ESIF_MAP_ENUM(ESIF_ACTION_ACPIDECIC),
182188
ESIF_MAP_ENUM(ESIF_ACTION_ACPILPAT),
189+
ESIF_MAP_ENUM(ESIF_ACTION_AUDIO),
183190
ESIF_MAP_ENUM(ESIF_ACTION_BATTERY),
184191
ESIF_MAP_ENUM(ESIF_ACTION_CAPI),
185192
ESIF_MAP_ENUM(ESIF_ACTION_CODE),
@@ -195,6 +202,8 @@ static ESIF_INLINE esif_action_type_t esif_action_type_str2enum(esif_string name
195202
ESIF_MAP_ENUM(ESIF_ACTION_IDGFX),
196203
ESIF_MAP_ENUM(ESIF_ACTION_IOC),
197204
ESIF_MAP_ENUM(ESIF_ACTION_IOSF),
205+
ESIF_MAP_ENUM(ESIF_ACTION_IPA),
206+
ESIF_MAP_ENUM(ESIF_ACTION_IPU),
198207
ESIF_MAP_ENUM(ESIF_ACTION_JAVA),
199208
ESIF_MAP_ENUM(ESIF_ACTION_KACACHE),
200209
ESIF_MAP_ENUM(ESIF_ACTION_KDELEGATE),

Common/esif_sdk_data_misc.h

+78
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,16 @@ struct ocmb_request {
169169
/* Array of ocmb_affinity_data structure follow here. See ocmb_affinity_data */
170170
};
171171

172+
/* Process Notification Event Data */
173+
#define PROCESS_NOTIFICATION_REVISION 1
174+
struct esif_data_process_notification
175+
{
176+
u32 revision;
177+
esif_handle_t process_id;
178+
esif_handle_t parent_process_id;
179+
char image_path[ESIF_MAX_PATH];
180+
};
181+
172182
#pragma pack(pop)
173183

174184
#define OFFSET_OF(type, member) ((u32)(size_t)&(((type*)0)->member))
@@ -263,4 +273,72 @@ struct esif_data_rfprofile
263273
};
264274

265275
#define SOCWC_NUMBER_WORKLOAD_CLASSIFICATIONS 5
276+
#define RF_PROFILE_STRUCT_VERSION 1
277+
278+
#pragma pack(push, 1)
279+
typedef struct RfProfile_s
280+
{
281+
UInt32 version;
282+
UInt32 is5G; // Boolean - is5G, modem only
283+
UInt32 channelPriority; // UInt32 - 0: primary, 1: secondary, ...
284+
UInt64 centerFrequency; // UInt64 - centerFrequency in Hz
285+
UInt32 frequencySpread; // UInt32 - frequencySpread in Hz
286+
UInt32 connectStatus; // UInt32 - 0: disconnected, 1: connected
287+
UInt32 channelNumber; // UInt32 - channelNumber
288+
UInt32 band; // UInt32 - band
289+
UInt32 rssi; // UInt32 - rssi
290+
}RfProfile, * RfProfilePtr;
291+
#pragma pack(pop)
292+
293+
#define MAX_ACTIVE_RF_CHANNELS 5
294+
295+
#pragma pack(push, 1)
296+
typedef struct ActiveRfChannels_s
297+
{
298+
UInt8 numberOfChannels;
299+
RfProfile rfChannels[MAX_ACTIVE_RF_CHANNELS];
300+
} ActiveRfChannels, * ActiveRfChannelsPtr;
301+
#pragma pack(pop)
302+
303+
#define RAPL_ENERGY_INFO_REVISION 1
304+
305+
#pragma pack(push,1)
306+
typedef struct RaplEnergyInfo_s
307+
{
308+
UInt32 revision;
309+
UInt64 timestamp;
310+
UInt32 energyCounter;
311+
} RaplEnergyInfo;
312+
#pragma pack(pop)
313+
314+
#define AFFINITY_CMD_VERSION 1
315+
316+
typedef struct AffinityCommand_s {
317+
UInt32 version; // must be AFFINITY_CMD_VERSION
318+
UInt32 affinity_mask;
319+
char process_name[MAX_PATH];
320+
} AffinityCommand;
321+
322+
#define APPLICATION_OPTIMIZATION_APPCOMPAT_GUID {0x99, 0x5c, 0xc3, 0x75, 0xc3, 0x09, 0x4b, 0xaa, 0xa9, 0x9d, 0xe9, 0x70, 0xd0, 0x89, 0x3a, 0x9c}
323+
#define APP_COMPAT_CREATE_CMD_VERSION 1
324+
325+
typedef struct AppCompatEntry_s
326+
{
327+
UInt32 processor_count;
328+
char process_name[MAX_PATH];
329+
} AppCompatEntry;
330+
331+
typedef struct AppCompatCreateCommand_s {
332+
UInt32 version; // must be APP_COMPAT_CREATE_CMD_VERSION
333+
esif_guid_t app_compat_guid;
334+
UInt32 num_process;
335+
// num_process * AppCompatEntry structures follow here.
336+
} AppCompatCreateCommand;
337+
338+
#define APP_COMPAT_DELETE_CMD_VERSION 1
339+
340+
typedef struct AppCompatDeleteCommand_s {
341+
UInt32 version; // must be APP_COMPAT_DELETE_CMD_VERSION
342+
esif_guid_t app_compat_guid;
343+
} AppCompatDeleteCommand;
266344

0 commit comments

Comments
 (0)