processor
| GetCoreInfo() | GetCPUInfo() | GetCPUTopology() |
GetCoreInfo()
Synopsis
BOOL GetCoreInfo(
ULONG coreNo,
struct TagItem * tagList );
BOOL GetCoreInfoTags(
ULONG coreNo,
TAG tag, ... );
Function
Provides information about the given logical processor. Data is returned for each tag passed; see resources/processor.h for the per-core tags and GetCPUInfo() for their individual meanings.
Inputs
coreNo - logical processor to describe, 0 based. Valid values
are 0 .. GCIT_NumberOfProcessors - 1, and match the
pte_LogicalID fields of the GetCPUTopology() table.
tagList - array of tags to fill in.
Tags
GCIT_PackageID, GCIT_ClusterID, GCIT_CoreID, GCIT_ThreadID,
GCIT_PhysicalID - (ULONG *) The position of this logical
processor in the system topology, and its
hardware ID (APIC ID / MPIDR / hart id).
All per-core tags accepted by GetCPUInfo() are also accepted
here.
Result
FALSE if coreNo does not name a present logical processor - the tags are then left untouched - TRUE otherwise.
See also
GetCPUInfo()
Synopsis
void GetCPUInfo(
struct TagItem * tagList );
void GetCPUInfoTags(
TAG tag, ... );
Function
Provides information about selected processor in the system
Inputs
Function takes an array of tags. Data is returned for each tag. See specific tag description. There is a control tag CGIT_SelectedProcessor.
Tags
GCIT_SelectedProcessor - (ULONG) When this tag is set correctly, information
about choosen processor is provided. If this
tag is missing or this tag has invalid value,
information about first processor is returned.
New code should use GetCoreInfo() instead of
this tag.
GCIT_NumberOfProcessors - (ULONG *) Provides the number of logical
processors present in the system.
GCIT_NumberOfPackages - (ULONG *) Provides the number of physical
processor packages present in the system.
GCIT_NumberOfClusters - (ULONG *) Provides the number of core clusters
present in the system.
GCIT_NumberOfCores - (ULONG *) Provides the number of physical cores
present in the system.
GCIT_ThreadsPerCore - (ULONG *) Provides the maximum number of SMT
threads per physical core.
GCIT_PackageID, GCIT_ClusterID, GCIT_CoreID, GCIT_ThreadID,
GCIT_PhysicalID - (ULONG *) The position of the selected processor
in the system topology, and its hardware ID.
See GetCoreInfo().
GCIT_ISAString - (CONST_STRPTR *) Provides a textual description of
the instruction set architecture of the
selected processor. The string is considered
read-only.
GCIT_ModelString - (CONST_STRPTR *) Provides the name of the model of the
processor. The string is considered read-only.
GCIT_Family - (ULONG *) Provides designation of processor family using
one of the CPUFAMILY_XXX values.
GCIT_VectorUnit - (ULONG *) Provides designation of available vectory
unit using one of the VECTORTYPE_XXX values.
GCIT_Architecture - (ULONG *) Provides designation of processor
architecture using one of the PROCESSORARCH_XXX
values.
GCIT_Endianness - (ULONG *) Provides designation of current processor
endianness using one of the ENDIANNESS_XXX values.
GCIT_ProcessorSpeed - (UQUAD *) Provides the current CPU speed in Hz
GCIT_FrontsideSpeed - (UQUAD *) Provides the current FSB speed in Hz
GCIT_ProcessorLoad - (ULONG *) Provides the current CPU load (0-0xffffffff)
Cache sizes - (ULONG *) Following tags are used to retrieve size of
specified caches.
GCIT_L1CacheSize
GCIT_L1DataCacheSize
GCIT_L1InstructionCacheSize
GCIT_L2CacheSize
GCIT_L3CacheSize
Size is returned in kB.
GCIT_CacheLineSize - (ULONG *) Provides the size of cache line in bytes.
In case these sizes differ per cache level, the
smallest size if provided.
Features - (BOOL *) Following tags are used to check availability of
certain features. The result is always a boolean.
GCIT_SupportsFPU
GCIT_SupportsAltiVec
GCIT_SupportsVMX
GCIT_SupportsMMX
GCIT_SupportsMMXEXT
GCIT_Supports3DNOW
GCIT_Supports3DNOWEXT
GCIT_SupportsSSE
GCIT_SupportsSSE2
GCIT_SupportsSSE3
GCIT_SupportsSSSE3
GCIT_SupportsSSE41
GCIT_SupportsSSE42
GCIT_SupportsSSE4A
GCIT_SupportsVME
GCIT_SupportsPSE
GCIT_SupportsPAE
GCIT_SupportsCX8
GCIT_SupportsAPIC
GCIT_SupportsCMOV
GCIT_SupportsPSE36
GCIT_SupportsCLFSH
GCIT_SupportsACPI
GCIT_SupportsFXSR
GCIT_SupportsHTT
GCIT_SupportsCX16
GCIT_SupportsVirtualization
GCIT_SupportsNoExecutionBit
GCIT_Supports64BitMode
GCIT_SupportsMSR
Result
None
See also
GetCPUTopology()
Synopsis
const struct ProcessorTopology * GetCPUTopology();
Function
Returns a description of how the system's logical processors are arranged into cores, clusters and packages.
Inputs
None
Result
Pointer to a read-only struct ProcessorTopology owned by the resource, valid for the lifetime of the system, or NULL if no topology information could be gathered. pt_Entries holds one struct ProcessorTopologyEntry per logical processor; pte_LogicalID of an entry may be used as the core number for GetCoreInfo() and GCIT_SelectedProcessor.
Notes
On hardware where a topology level does not exist the respective count is 1 and the IDs are 0.


