Keapigetcpuinfo, Keapigetcpuperformance, 2 keapigetcpuinfo – Kontron KEAPI User Manual
Page 11: 3 keapigetcpuperformance

Software specification for Kontron EAPI
11
Parameters:
in/out
Parameter name
Description
in
boardHandle
Handle of the selected board
in
freqType
Type of frequency (minimal (CPU_FREQUENCY_MIN, 0),
maximal (CPU_FREQUENCY_MAX, 1), current
(CPU_FREQUENCY_CURRENT, 2))
out
frequency
Frequency of the CPU, in kHz
2.4.2 KEApiGetCpuInfo
KEAPI_CALLTYPE
KEAPI_UINT32
KEApiGetCpuInfo (
KEAPI_UINT32
boardHandle,
PCPU_INFO
pCpuInfo
);
Description:
Provides information about processors.
Parameters:
in/out
Parameter name
Description
in
boardHandle
Handle of the selected board
out
pCpuInfo
Returned
CPU_INFO
structure
Structure used:
typedef struct
Cpu_Info
{
KEAPI_CHAR
cpuName[MAX_STR]; // CPU name
KEAPI_INT32
cpuCount;
// Number of CPUs
KEAPI_INT32
cpuCoreCount;
// Number of cores of each CPU
KEAPI_INT32
cpuThreadCount;
// Number of CPU threads
KEAPI_FLOAT
cpuMaxCoreSpeed;
// Designed core speed in MHz
KEAPI_INT32
fsbSpeed;
// FSB speed in MHz
KEAPI_INT32
l1Cache;
// L1 cache size in kB
KEAPI_INT32
l2Cache;
// L2 cache size in kB
KEAPI_INT32
l3Cache;
// L3 cache size in kB
}
CPU_INFO
, *
PCPU_INFO
;
2.4.3 KEApiGetCpuPerformance
KEAPI_CALLTYPE
KEAPI_UINT32
KEApiGetCpuPerformance (
KEAPI_UINT32
boardHandle,
KEAPI_PINT8
pPerformanceType,
KEAPI_PINT8
pPerformancePercentage
);
Description:
Linux: Provides information about the current CPU performance mode
high performance: CPU_PERFORMANCE_HIGH, 0
power save mode: CPU_PERFORMANCE_POWER_SAVE, 1
on demand mode: CPU_PERFORMANCE_ON_DEMAND, 2
conservative mode: CPU_PERFORMANCE_CONSERVATIVE, 3.
Windows: Provides information about the current CPU performance in percentage