#include "cpuinfo_x86.h"
#include <stdbool.h>
#include <string.h>
#include "internal/bit_utils.h"
#include "internal/cpuid_x86.h"
#include "define_tables.h"
Data Structures | |
struct | OsSupport |
Macros | |
#define | DEFINE_TABLE_FEATURES |
#define | DEFINE_TABLE_FEATURE_TYPE X86Features |
#define | DEFINE_TABLE_DONT_GENERATE_HWCAPS |
#define | MASK_XMM 0x2 |
#define | MASK_YMM 0x4 |
#define | MASK_MASKREG 0x20 |
#define | MASK_ZMM0_15 0x40 |
#define | MASK_ZMM16_31 0x80 |
#define | MASK_XTILECFG 0x20000 |
#define | MASK_XTILEDATA 0x40000 |
#define | CPUID(FAMILY, MODEL) ((((FAMILY)&0xFF) << 8) | ((MODEL)&0xFF)) |
Functions | |
static Leaf | CpuId (uint32_t leaf_id) |
static Leaf | SafeCpuIdEx (uint32_t max_cpuid_leaf, uint32_t leaf_id, int ecx) |
static Leaf | SafeCpuId (uint32_t max_cpuid_leaf, uint32_t leaf_id) |
static bool | HasMask (uint32_t value, uint32_t mask) |
static bool | HasXmmOsXSave (uint32_t xcr0_eax) |
static bool | HasYmmOsXSave (uint32_t xcr0_eax) |
static bool | HasZmmOsXSave (uint32_t xcr0_eax) |
static bool | HasTmmOsXSave (uint32_t xcr0_eax) |
static bool | HasSecondFMA (uint32_t model) |
static void | SetVendor (const Leaf leaf, char *const vendor) |
static int | IsVendor (const Leaf leaf, const char *const name) |
static CacheLevelInfo | GetCacheLevelInfo (const uint32_t reg) |
static void | GetByteArrayFromRegister (uint32_t result[4], const uint32_t reg) |
static void | ParseLeaf2 (const int max_cpuid_leaf, CacheInfo *info) |
static void | ParseLeaf4 (const int max_cpuid_leaf, CacheInfo *info) |
static OsSupport | CheckOsSupport (const uint32_t max_cpuid_leaf) |
static void | DetectSseViaOs (X86Features *features) |
static void | ParseCpuId (const uint32_t max_cpuid_leaf, const OsSupport os_support, X86Info *info) |
static void | ParseExtraAMDCpuId (X86Info *info, OsSupport os_support) |
X86Info | GetX86Info (void) |
CacheInfo | GetX86CacheInfo (void) |
X86Microarchitecture | GetX86Microarchitecture (const X86Info *info) |
static void | SetString (const uint32_t max_cpuid_ext_leaf, const uint32_t leaf_id, char *buffer) |
void | FillX86BrandString (char brand_string[49]) |
int | GetX86FeaturesEnumValue (const X86Features *features, X86FeaturesEnum value) |
const char * | GetX86FeaturesEnumName (X86FeaturesEnum value) |
const char * | GetX86MicroarchitectureName (X86Microarchitecture uarch) |
Variables | |
static const Leaf | kEmptyLeaf |
static const CacheLevelInfo | kEmptyCacheLevelInfo |
static const OsSupport | kEmptyOsSupport |
static const X86Info | kEmptyX86Info |
static const CacheInfo | kEmptyCacheInfo |
#define CPUID | ( | FAMILY, | |
MODEL | |||
) | ((((FAMILY)&0xFF) << 8) | ((MODEL)&0xFF)) |
#define DEFINE_TABLE_DONT_GENERATE_HWCAPS |
#define DEFINE_TABLE_FEATURE_TYPE X86Features |
#define DEFINE_TABLE_FEATURES |
#define MASK_MASKREG 0x20 |
#define MASK_XMM 0x2 |
#define MASK_XTILECFG 0x20000 |
#define MASK_XTILEDATA 0x40000 |
#define MASK_YMM 0x4 |
#define MASK_ZMM0_15 0x40 |
#define MASK_ZMM16_31 0x80 |
|
static |
|
static |
|
static |
void FillX86BrandString | ( | char | brand_string[49] | ) |
|
static |
|
static |
const char* GetX86FeaturesEnumName | ( | X86FeaturesEnum | value | ) |
int GetX86FeaturesEnumValue | ( | const X86Features * | features, |
X86FeaturesEnum | value | ||
) |
X86Microarchitecture GetX86Microarchitecture | ( | const X86Info * | info | ) |
const char* GetX86MicroarchitectureName | ( | X86Microarchitecture | uarch | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |