Skip to content

Commit

Permalink
Release 9.0.11100.29358
Browse files Browse the repository at this point in the history
  • Loading branch information
susheel1795 committed Sep 23, 2022
1 parent 53f964e commit 47ea57f
Show file tree
Hide file tree
Showing 300 changed files with 5,005 additions and 6,469 deletions.
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ public
*.tmp_proj
*.aps
*.vssettings
*.tlog
*.recipe
*.log
*.idb
*.pdb
.vs
x64
Win32
Expand Down Expand Up @@ -76,4 +81,5 @@ ppm_compiler
/ESIF/Products/ESIF_UI/Sources/solution/esif_ui_solution/bin/esif_ui_solution.dll
/ESIF/Products/IPF_UI/Sources/solution/ipf_ui_solution/bin
/ESIF/Products/IPF_UI/index.html
/IPF/Linux
/IPF/Linux
/DPTF/Windows/Solution/.klocwork/
4 changes: 2 additions & 2 deletions Common/Ver.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@

#define VER_MAJOR 1
#define VER_MINOR 0
#define VER_HOTFIX 11001
#define VER_BUILD 28546
#define VER_HOTFIX 11100
#define VER_BUILD 29358
131 changes: 0 additions & 131 deletions Common/esif_ccb.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,33 +53,13 @@

#pragma once

#if !defined(ESIF_ATTR_KERNEL) && !defined(ESIF_ATTR_USER)
/* User Mode Build */
#define ESIF_ATTR_USER
#endif

#if defined(_WIN32)
#if !defined(ESIF_ATTR_OS_WINDOWS)
/* Windows OS */
#define ESIF_ATTR_OS_WINDOWS
#endif
#else
#if !defined(ESIF_ATTR_OS_LINUX) && !defined(ESIF_ATTR_OS_CHROME) && !defined(ESIF_ATTR_OS_ANDROID)
/* Linux Derived OS */
#define ESIF_ATTR_OS_LINUX
#endif
#endif

#ifdef ESIF_ATTR_OS_CHROME
/* Linux Derived OS */
#define ESIF_ATTR_OS_LINUX
#define ESIF_ATTR_OS "Chrome" /* OS Is Chromium */
#endif
#ifdef ESIF_ATTR_OS_ANDROID
/* Linux Derived OS */
#define ESIF_ATTR_OS_LINUX
#define ESIF_ATTR_OS "Android" /* OS Is Android */
#endif
#if defined(ESIF_ATTR_OS_LINUX) && !defined(_GNU_SOURCE)
/* -std=gnu99 support */
#define _GNU_SOURCE
Expand All @@ -90,110 +70,13 @@
#endif

/* OS Agnostic */
#ifdef ESIF_ATTR_USER
#include <stdio.h>
#include <stdlib.h>
#else
#include <stddef.h>
#endif

#ifdef ESIF_ATTR_OS_WINDOWS

/* Windows OS */
#pragma strict_gs_check(on)

#ifdef ESIF_ATTR_USER
#define _WINSOCKAPI_ /* Override for Winsock */
#include <windows.h>

/* Avoids Serialization Warnings*/
#define ESIF_SERIAL_FENCE() _mm_lfence()

#else
#include <ntddk.h>
#define INVALID_HANDLE_VALUE ((HANDLE)(LONG_PTR)-1) /* Invalid ESIF Handle */
#endif

/* Add Linux Base Types for Windows */
typedef unsigned char u8; /* A BYTE */
typedef unsigned short u16; /* A WORD */
typedef unsigned int u32; /* A DWORD */
typedef unsigned long long u64; /* A QWORD */

typedef char *esif_string; /* NULL-teriminated ANSI string */
typedef HANDLE esif_os_handle_t;/* opaque OS Handle (not a pointer) */
typedef u64 esif_handle_t; /* opaque ESIF 64-bit handle (may NOT be a pointer) */
typedef u64 esif_context_t; /* opaque ESIF 64-bit context (may be a pointer) */

#define ESIF_ATTR_OS "Windows" /* OS Is Windows */
#define ESIF_INLINE __inline /* Inline Function Directive */
#define ESIF_FUNC __FUNCTION__ /* Current Function Name */
#define ESIF_CALLCONV __cdecl /* SDK Calling Convention */
#define ESIF_PATH_SEP "\\" /* Path Separator String */
#define ESIF_EXPORT __declspec(dllexport) /* Used for Exported Symbols */
#define ESIF_INVALID_HANDLE ((esif_handle_t)(-1)) /* Invalid ESIF Handle */

#define ESIF_HANDLE_DEFAULT ((esif_handle_t)(0)) /* Reserved ESIF handle */
#define ESIF_HANDLE_PRIMARY_PARTICIPANT ((esif_handle_t)(1)) /* Reserved ESIF primary participant handle */
#define ESIF_HANDLE_MATCH_ANY_EVENT ((esif_handle_t)(-2)) /* Reserved ESIF handle */

#define ESIF_WS_LIBRARY_NAME "ipf_ws" /* Legacy Library/App Name for deprecated in-process web server*/

#define esif_ccb_isfullpath(fname) (fname[0] == '\\' || (isalpha(fname[0]) && fname[1] == ':'))

#ifdef __cplusplus
#define ESIF_ELEMENT(x) /* C99 Designated Initializers unsupported in C++ */
#else
#define ESIF_ELEMENT(x) x = /* Support C99 Designated Initializers */
#endif

/* Avoids "conditional constant is an expression" warnings for do...while(0) loops */
#define ESIF_CONSTEXPR(expr) __pragma(warning(push)) __pragma(warning(disable:4127)) (expr) __pragma(warning(pop))

/* Sleep Interface */
#define esif_ccb_sleep(sec) Sleep(sec * 1000)
#define esif_ccb_sleep_msec(msec) Sleep(msec)

/* Deduce Platform based on predefined compiler flags */
#ifdef _WIN64
#define ESIF_ATTR_64BIT
#endif

/* Deduce Debug Build for Windows. Non-Windows can define this in Makefile */
#ifdef _DEBUG
#define ESIF_ATTR_DEBUG
#endif

#ifdef ESIF_ATTR_DEBUG
#ifdef ESIF_ATTR_USER
#define ESIF_ASSERT(x) \
do { \
if ESIF_CONSTEXPR(!(x)) \
DebugBreak(); \
} while ESIF_CONSTEXPR(0)

#else /* !ESIF_ATTR_USER */
#define ESIF_ASSERT(x) ASSERT(x)
#endif /* !ESIF_ATTR_USER */
#else /* !ESIF_ATTR_DEBUG */
#define ESIF_ASSERT(x) (0)
#endif /* !ESIF_ATTR_DEBUG */


#ifdef ESIF_ATTR_USER
/* Byte Ordering Utilities (Winsock2.h) */
#define esif_ccb_htons(val) htons(val)
#define esif_ccb_htonl(val) htonl(val)
#define esif_ccb_htonll(val) htonll(val)
#endif

#endif /* WINDOWS */

#ifdef ESIF_ATTR_OS_LINUX

/* All Linux Derived OS */

#ifdef ESIF_ATTR_USER
#include <unistd.h> /* POSIX API */

/* Common Windows Symbols */
Expand All @@ -206,7 +89,6 @@ typedef u64 esif_context_t; /* opaque ESIF 64-bit context (may be a pointer) */
#include <x86intrin.h>
#define ESIF_SERIAL_FENCE() _mm_lfence()

#endif

/* Add Linux Base Types */
typedef unsigned char u8;
Expand Down Expand Up @@ -238,18 +120,8 @@ typedef u64 esif_handle_t; /* opaque ESIF 64-bit handle (may not be a pointer) *
typedef u64 esif_context_t; /* opaque ESIF 64-bit context (may be a pointer) */

#ifdef ESIF_ATTR_DEBUG
# ifdef ESIF_ATTR_USER
# include <assert.h>
# define ESIF_ASSERT(x) assert(x)
# else
# define ESIF_ASSERT(x) \
do { \
if (x) \
break; \
printk(KERN_EMERG "!ESIF_ASSERT! [%s@%s#%d]: %s\n", ESIF_FUNC, __FILE__, __LINE__, #x); \
BUG(); \
} while (0)
# endif
#else
# define ESIF_ASSERT(x)
#endif
Expand All @@ -274,7 +146,6 @@ typedef u64 esif_context_t; /* opaque ESIF 64-bit context (may be a pointer) */
/* Used for constant expressions, such as do...while(0) loops */
#define ESIF_CONSTEXPR(expr) (expr)

#ifdef ESIF_ATTR_USER
/* Byte Ordering Utilities */
#include <arpa/inet.h> /* htonl */
#define esif_ccb_htons(val) htons(val)
Expand All @@ -286,9 +157,7 @@ static ESIF_INLINE u64 esif_ccb_htonll(u64 value)
u32 lo = htonl((u32)value);
return (((u64)lo) << 32) | hi;
}
#endif

#endif /* LINUX */

/*
* OS Agnostic
Expand Down
16 changes: 2 additions & 14 deletions Common/esif_ccb_atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,27 +53,16 @@

#pragma once

#include "esif_ccb.h"

/*
* C/C++ OS-Agnostic Universal Implementation of atomic integer operations.
* Interface is based on native Linux atomic_t kernel type (atomic.h)
* Note: atomic_t is 32 or 64 bit, depending on OS/Platform so treat as opaque
*/

#if defined(ESIF_ATTR_KERNEL)

#if defined(ESIF_ATTR_OS_WINDOWS)
#include "esif_ccb_atomic_win_kern.h"
#elif defined(ESIF_ATTR_OS_LINUX)
#include "esif_ccb_atomic_lin_kern.h"
#endif

#elif defined(ESIF_ATTR_USER)

#if defined(ESIF_ATTR_OS_WINDOWS)
#include "esif_ccb_atomic_win_user.h"
#elif defined(ESIF_ATTR_OS_LINUX)
#include "esif_ccb_atomic_lin_user.h"
#endif

/* Disable User-Mode Atomic operations. Use at your own risk */
#if defined(ATOMIC_LIB_DISABLE)
Expand All @@ -86,4 +75,3 @@
# define atomic_sub(i, v) (*(v) -= (i))
#endif

#endif /* USER */
2 changes: 0 additions & 2 deletions Common/esif_ccb_atomic_lin_user.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

#pragma once

#if defined(ESIF_ATTR_OS_LINUX) && defined(ESIF_ATTR_USER)

/* Linux User: Use native x86/x64 type and __atomic builtin functions [gcc 4.7.0 or higher] */

Expand Down Expand Up @@ -69,4 +68,3 @@ typedef volatile atomic_basetype atomic_t;
#define atomic_sub(i, v) __atomic_fetch_sub(v, i, __ATOMIC_SEQ_CST)
#endif /* !DISABLE */

#endif /* LINUX USER */
14 changes: 2 additions & 12 deletions Common/esif_ccb_cpuid.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@

#pragma once

#include "esif_ccb.h"

/*
* C/C++ OS-Agnostic Universal Implementation of the cpuid intrinsic.
*/
Expand Down Expand Up @@ -123,17 +125,5 @@ typedef struct esif_ccb_cpuid_s {

#pragma pack(pop)

#if defined(ESIF_ATTR_KERNEL)
#if defined(ESIF_ATTR_OS_WINDOWS)
#include "esif_ccb_cpuid_win_kern.h"
#elif defined(ESIF_ATTR_OS_LINUX)
#include "esif_ccb_cpuid_lin_kern.h"
#endif
#elif defined(ESIF_ATTR_USER)
#if defined(ESIF_ATTR_OS_WINDOWS)
#include "esif_ccb_cpuid_win_user.h"
#elif defined(ESIF_ATTR_OS_LINUX)
#include "esif_ccb_cpuid_lin_user.h"
#endif

#endif /* USER */
2 changes: 0 additions & 2 deletions Common/esif_ccb_cpuid_lin_user.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

#pragma once

#if defined(ESIF_ATTR_OS_LINUX) && defined(ESIF_ATTR_USER)

#include <cpuid.h>

Expand All @@ -31,4 +30,3 @@ static ESIF_INLINE void esif_ccb_cpuid(esif_ccb_cpuid_t *cpuidPtr)
&cpuidPtr->edx);
}

#endif /* LINUX USER */
25 changes: 0 additions & 25 deletions Common/esif_ccb_env.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,9 @@

#pragma once

#if defined(ESIF_ATTR_USER)

#include "esif_ccb.h"

#if defined(ESIF_ATTR_OS_WINDOWS)

// Get Environment variable
static ESIF_INLINE char *esif_ccb_getenv(const char *name)
{
char *path = NULL;
size_t len = 0;

if (_dupenv_s(&path, &len, name) != 0)
path = NULL;
return path;
}

static ESIF_INLINE void esif_ccb_envfree(char *name)
{
if (name) {
free(name);
}
}


#elif defined(ESIF_ATTR_OS_LINUX)

#include <stdlib.h>

Expand All @@ -52,6 +29,4 @@ static ESIF_INLINE void esif_ccb_envfree(char *name)

#define esif_ccb_envfree(arg) ((void)(0))

#endif /* LINUX */

#endif /* USER */
8 changes: 1 addition & 7 deletions Common/esif_ccb_file.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,8 @@

#pragma once

#if defined(ESIF_ATTR_USER)

#include "esif_ccb.h"

#if defined(ESIF_ATTR_OS_WINDOWS)
#include "esif_ccb_file_win_user.h"
#elif defined(ESIF_ATTR_OS_LINUX)

#include "esif_ccb_file_lin_user.h"
#endif

#endif /* USER */
2 changes: 0 additions & 2 deletions Common/esif_ccb_file_lin_user.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

#pragma once

#if defined(ESIF_ATTR_OS_LINUX) && defined(ESIF_ATTR_USER)

#include <errno.h>
#include <unistd.h>
Expand Down Expand Up @@ -291,4 +290,3 @@ static ESIF_INLINE void esif_ccb_file_enum_close(esif_ccb_file_enum_t find_handl
esif_ccb_free(find_handle);
}

#endif /* LINUX USER */
Loading

0 comments on commit 47ea57f

Please sign in to comment.