![]() |
Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
|
Classes | |
| struct | CpuidRegs |
| registers used/returned by cpuid More... | |
| class | ScopedSetPriority |
| class | StringStripper |
| functor to remove substrings from the CPU identifier string More... | |
Enumerations | |
| 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 | 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... | |
| size_t | Generation () |
Variables | |
| static u32 | cpuid_maxFunction |
| static u32 | cpuid_maxExtendedFunction |
| static u32 | caps [4] |
| static ModuleInitState | capsInitState { 0 } |
| static Vendors | vendor |
| static size_t | m_Model |
| static size_t | m_Family |
| static ModuleInitState | signatureInitState { 0 } |
| 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::Models |
| enum x86_x64::Vendors |
| bool x86_x64::Cap | ( | Caps | cap | ) |
| 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.
| 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. |
| void x86_x64::DebugBreak | ( | ) |
trigger a breakpoint inside this function when it is called.
| size_t x86_x64::Family | ( | ) |
| size_t x86_x64::Generation | ( | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| size_t x86_x64::Model | ( | ) |
| u64 x86_x64::rdtsc | ( | ) |
notes:
| Vendors x86_x64::Vendor | ( | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |