Skip to content

Hardware Infos

Finalspace edited this page May 29, 2026 · 1 revision

This category contains functions for retrieving hardware information such as memory usage, CPU info, etc. More...

Data Structures

Type Name
struct fplARMCPUCapabilities
Container storing the capabilities of an ARM CPU. More...
struct fplCPUCapabilities
Container storing the capabilities of a CPU. More...
union fplCPUIDLeaf
Container representing the 4-registers for a CPU-Leaf (EAX, EBX, ECX, EDX). More...
struct fplX86CPUCapabilities
Container storing the capabilities of an x86 CPU. More...

Enumerations

Type Name
enum fplCPUArchType {
fplCPUArchType_Unknown , fplCPUArchType_x86 , fplCPUArchType_x86_64 , fplCPUArchType_x64 ,
fplCPUArchType_Arm32 , fplCPUArchType_Arm64 , fplCPUArchType_First , fplCPUArchType_Last
}
An enumeration of architecture types. More...
enum fplCPUCapabilitiesType {
fplCPUCapabilitiesType_Unknown , fplCPUCapabilitiesType_X86 , fplCPUCapabilitiesType_ARM , fplCPUCapabilitiesType_First ,
fplCPUCapabilitiesType_Last
}
An enumeration of CPU types. More...

Functions

Type Name
fpl_platform_api fplCPUArchType fplCPUGetArchitecture (void)
Gets the processor architecture type.
fpl_common_api const char * fplCPUGetArchName (const fplCPUArchType type)
Gets the string representation of the given architecture type.
fpl_common_api bool fplCPUGetCapabilities (fplCPUCapabilities *outCaps)
Gets the capabilities of the processor.
fpl_platform_api size_t fplCPUGetCoreCount (void)
Retrieves the total number of processor cores.
fpl_common_api size_t fplCPUGetName (char *destBuffer, const size_t maxDestBufferLen)
Retrieves the name of the processor.
fpl_common_api bool fplCPUID (const uint32_t functionId, fplCPUIDLeaf *outLeaf)
Queries the x86 CPUID leaf register (EAX, EBX, ECX, EDX) for the given function id.
fpl_common_api uint64_t fplCPURDTSC (void)
Reads the current time stamp counter (RDTSC).
fpl_common_api uint64_t fplCPUXCR0 (void)
Gets the x86 extended control register for index zero.
fpl_common_api const char * fplGetCPUCapabilitiesTypeName (const fplCPUCapabilitiesType type)
Gets the name of the specified fplCPUCapabilitiesType.

Detailed Description

This category contains functions for retrieving hardware information such as memory usage, CPU info, etc.

Enumeration Type Documentation

fplCPUArchType

enum fplCPUArchType

An enumeration of architecture types.

Name Description
fplCPUArchType_Unknown Unknown architecture.
fplCPUArchType_x86 X86 architecture.
fplCPUArchType_x86_64 X86 with 64-bit architecture.
fplCPUArchType_x64 X64 only architecture.
fplCPUArchType_Arm32 ARM32 architecture.
fplCPUArchType_Arm64 ARM64 architecture.
fplCPUArchType_First First fplCPUArchType.
fplCPUArchType_Last Last fplCPUArchType.

Definition at line 5547 of file final_platform_layer.h.

fplCPUCapabilitiesType

enum fplCPUCapabilitiesType

An enumeration of CPU types.

Name Description
fplCPUCapabilitiesType_Unknown Unknown type.
fplCPUCapabilitiesType_X86 x86 type.
fplCPUCapabilitiesType_ARM ARM type.
fplCPUCapabilitiesType_First First fplCPUCapabilitiesType.
fplCPUCapabilitiesType_Last Last fplCPUCapabilitiesType.

Definition at line 5571 of file final_platform_layer.h.

Function Documentation

fplCPUGetArchitecture()

fpl_platform_api fplCPUArchType fplCPUGetArchitecture ( void )

Gets the processor architecture type.

Returns: Returns the processor architecture enumeration value

fplCPUArchType .

See also: Get CPU architecture

fplCPUGetArchName()

fpl_common_api const char * fplCPUGetArchName ( const fplCPUArchType type)

Gets the string representation of the given architecture type.

Parameters

Direction Parameter Description
[in] type The enumeration value fplCPUArchType.

Returns: Returns a string for the given architecture type.

See also: Get CPU architecture

fplCPUGetCapabilities()

fpl_common_api bool fplCPUGetCapabilities ( fplCPUCapabilities * outCaps)

Gets the capabilities of the processor.

Parameters

Direction Parameter Description
[out] outCaps Reference to the target structure fplCPUCapabilities.

Returns: Returns true when the capabilities could be retrieved, false otherwise.

See also: Query CPU Capabilities

fplCPUGetCoreCount()

fpl_platform_api size_t fplCPUGetCoreCount ( void )

Retrieves the total number of processor cores.

Returns: Returns the total number of processor cores.

See also: Get number of CPU-Cores

fplCPUGetName()

fpl_common_api size_t fplCPUGetName ( char * destBuffer, const size_t maxDestBufferLen )

Retrieves the name of the processor.

Parameters

Direction Parameter Description
[out] destBuffer Reference to the destination character buffer.
[in] maxDestBufferLen The max length of the destination character buffer.

Returns: Returns the number of required/written characters, excluding the null-terminator.

See also: Get the CPU Name

fplCPUID()

fpl_common_api bool fplCPUID ( const uint32_t functionId, fplCPUIDLeaf * outLeaf )

Queries the x86 CPUID leaf register (EAX, EBX, ECX, EDX) for the given function id.

Parameters

Direction Parameter Description
[in] functionId The CPUID function id.
[out] outLeaf Reference to the target structure fplCPUIDLeaf.

Returns: Returns true when CPUID is supported and the leaf was successfully updated, false otherwise.

Warning: This function works on X86 architectures only.

fplCPURDTSC()

fpl_common_api uint64_t fplCPURDTSC ( void )

Reads the current time stamp counter (RDTSC).

Returns: Returns the number of cycles since the system start or zero for non-x86 architectures.

Warning: This function works on X86 architectures only.

fplCPUXCR0()

fpl_common_api uint64_t fplCPUXCR0 ( void )

Gets the x86 extended control register for index zero.

Returns: Returns the extended control register on x86 or zero for non-x86 architectures.

Warning: This function works on X86 architectures only!

fplGetCPUCapabilitiesTypeName()

fpl_common_api const char * fplGetCPUCapabilitiesTypeName ( const fplCPUCapabilitiesType type)

Gets the name of the specified fplCPUCapabilitiesType.

Parameters

Direction Parameter Description
[in] type The fplCPUCapabilitiesType.

Returns: Returns the found name or

fpl_null (const char*).

Final Platform Layer

Pages

Topics

Data Structures

Clone this wiki locally