|
Pyrogenesis
13997
|
Namespaces | |
| AMD | |
| CPUID2 | |
| CPUID4 | |
Classes | |
| struct | Cache |
| class | StringStripper |
| functor to remove substrings from the CPU identifier string More... | |
| class | ScopedSetPriority |
| struct | CpuidRegs |
| registers used/returned by cpuid More... | |
Enumerations | |
| enum | IdxCache { L1D = 1, L2D, L3D, L4D, L1I, L2I, L3I, L4I, TLB } |
| enum | Vendors { VENDOR_UNKNOWN, VENDOR_INTEL, VENDOR_AMD } |
| CPU vendor. More... | |
| enum | Models { MODEL_NEHALEM_EP = 0x1A, MODEL_NEHALEM_EP_2 = 0x1E, MODEL_I7_I5 = 0x1F, MODEL_CLARKDALE = 0x25, MODEL_WESTMERE_EP = 0x2C, MODEL_NEHALEM_EX = 0x2E, MODEL_WESTMERE_EX = 0x2F, MODEL_SANDY_BRIDGE = 0x2A, MODEL_SANDY_BRIDGE_2 = 0x2D } |
| enum | Caps { CAP_SSE3 = 0+0, CAP_EST = 0+7, CAP_SSSE3 = 0+9, CAP_SSE41 = 0+19, CAP_SSE42 = 0+20, CAP_FPU = 32+0, CAP_TSC = 32+4, CAP_MSR = 32+5, CAP_CMOV = 32+15, CAP_TM_SCC = 32+22, CAP_MMX = 32+23, CAP_SSE = 32+25, CAP_SSE2 = 32+26, CAP_HT = 32+28, CAP_AMD_CMP_LEGACY = 64+1, CAP_AMD_MP = 96+19, CAP_AMD_MMX_EXT = 96+22, CAP_AMD_3DNOW_PRO = 96+30, CAP_AMD_3DNOW = 96+31 } |
| bit indices of CPU capability flags (128 bits). More... | |
Functions | |
| static void | AddCache (const x86_x64::Cache &cache) |
| static void | AddTLB (const x86_x64::Cache &tlb) |
| static Status | DetectCacheAndTLB () |
| const x86_x64::Cache * | Caches (size_t idxCache) |
| static void | Invoke_cpuid (CpuidRegs *regs) |
| static Status | InitCpuid () |
| bool | cpuid (CpuidRegs *regs) |
| invoke CPUID instruction. More... | |
| static Status | InitCaps () |
| bool | Cap (Caps cap) |
| void | GetCapBits (u32 *d0, u32 *d1, u32 *d2, u32 *d3) |
| static Status | InitVendor () |
| Vendors | Vendor () |
| static Status | InitSignature () |
| size_t | Model () |
| size_t | Family () |
| static Status | InitIdentifierString () |
| static const char * | IdentifierString () |
| u64 | rdtsc () |
| void | DebugBreak () |
| trigger a breakpoint inside this function when it is called. More... | |
| double | ClockFrequency () |
| measure the CPU clock frequency via rdtsc and timer_Time. More... | |
| LIB_API size_t | Generation () |
Variables | |
| static const size_t | maxTLBs = 2*2*4 |
| static size_t | numTLBs = 0 |
| static const size_t | numCaches = x86_x64::Cache::maxLevels * 2 + maxTLBs |
| static Cache | caches [numCaches] |
| static u32 | cpuid_maxFunction |
| static u32 | cpuid_maxExtendedFunction |
| static u32 | caps [4] |
| static ModuleInitState | capsInitState |
| static Vendors | vendor |
| static size_t | model |
| static size_t | family |
| static ModuleInitState | signatureInitState |
| static char | identifierString [48+1] |
| enum x86_x64::Caps |
bit indices of CPU capability flags (128 bits).
values are defined by IA-32 CPUID feature flags - do not change!
| enum x86_x64::IdxCache |
| enum x86_x64::Models |
| enum x86_x64::Vendors |
|
static |
|
static |
| LIB_API const Cache * x86_x64::Caches | ( | size_t | idxCache | ) |
| LIB_API bool x86_x64::Cap | ( | Caps | cap | ) |
Definition at line 142 of file x86_x64.cpp.
| LIB_API double x86_x64::ClockFrequency | ( | ) |
measure the CPU clock frequency via rdtsc and timer_Time.
(it follows that this must not be called from WHRT init.) this takes several milliseconds (i.e. much longer than os_cpu_ClockFrequency) but delivers accurate measurements.
Definition at line 429 of file x86_x64.cpp.
| LIB_API bool x86_x64::cpuid | ( | CpuidRegs * | regs | ) |
invoke CPUID instruction.
| regs | input/output registers. regs->eax must be set to the desired function. some functions (e.g. 4) require regs->ecx to be set as well. rationale: this interface (input/output structure vs. function parameters) avoids unnecessary copying/initialization if some inputs aren't needed and allows graceful expansion to functions that require further inputs. |
Definition at line 98 of file x86_x64.cpp.
| LIB_API void x86_x64::DebugBreak | ( | ) |
trigger a breakpoint inside this function when it is called.
Definition at line 385 of file x86_x64.cpp.
| LIB_API size_t x86_x64::Family | ( | ) |
Definition at line 238 of file x86_x64.cpp.
| LIB_API size_t x86_x64::Generation | ( | ) |
Definition at line 156 of file x86_x64.cpp.
|
static |
Definition at line 361 of file x86_x64.cpp.
|
static |
Definition at line 123 of file x86_x64.cpp.
|
static |
Definition at line 83 of file x86_x64.cpp.
|
static |
Definition at line 282 of file x86_x64.cpp.
|
static |
Definition at line 215 of file x86_x64.cpp.
|
static |
Definition at line 172 of file x86_x64.cpp.
|
static |
Definition at line 73 of file x86_x64.cpp.
| LIB_API size_t x86_x64::Model | ( | ) |
Definition at line 232 of file x86_x64.cpp.
| LIB_API u64 x86_x64::rdtsc | ( | ) |
notes:
Definition at line 373 of file x86_x64.cpp.
| LIB_API Vendors x86_x64::Vendor | ( | ) |
Definition at line 200 of file x86_x64.cpp.
|
static |
Definition at line 119 of file x86_x64.cpp.
|
static |
Definition at line 121 of file x86_x64.cpp.
|
static |
Definition at line 81 of file x86_x64.cpp.
|
static |
Definition at line 80 of file x86_x64.cpp.
|
static |
Definition at line 212 of file x86_x64.cpp.
|
static |
Definition at line 280 of file x86_x64.cpp.
|
static |
Definition at line 211 of file x86_x64.cpp.
|
static |
|
static |
Definition at line 213 of file x86_x64.cpp.
|
static |
Definition at line 170 of file x86_x64.cpp.
1.8.5