mirror of
https://github.com/anrieff/libcpuid
synced 2025-10-13 11:10:39 +00:00
Merge 141243f from http://github.com/eloaders/libcpuid
This adds support for x2apic detection. This is not a direct merge, since - the feature is spelled as 'x2apic' instead of 'x2APIC', for consistency with other flags; - tests are added - the id of the feature is moved to the end of the cpu_feature_t enum, for binary compatibility.
This commit is contained in:
parent
0f90f77910
commit
45651ef7bc
3 changed files with 5 additions and 2 deletions
|
@ -172,6 +172,7 @@ static void load_features_common(struct cpu_raw_data_t* raw, struct cpu_id_t* da
|
|||
{ 9, CPU_FEATURE_SSSE3 },
|
||||
{ 13, CPU_FEATURE_CX16 },
|
||||
{ 19, CPU_FEATURE_SSE4_1 },
|
||||
{ 21, CPU_FEATURE_X2APIC },
|
||||
{ 23, CPU_FEATURE_POPCNT },
|
||||
{ 29, CPU_FEATURE_F16C },
|
||||
};
|
||||
|
@ -505,6 +506,7 @@ const char* cpu_feature_str(cpu_feature_t feature)
|
|||
{ CPU_FEATURE_SSE4_2, "sse4_2" },
|
||||
{ CPU_FEATURE_SYSCALL, "syscall" },
|
||||
{ CPU_FEATURE_XD, "xd" },
|
||||
{ CPU_FEATURE_X2APIC , "x2apic"},
|
||||
{ CPU_FEATURE_MOVBE, "movbe" },
|
||||
{ CPU_FEATURE_POPCNT, "popcnt" },
|
||||
{ CPU_FEATURE_AES, "aes" },
|
||||
|
|
|
@ -349,6 +349,7 @@ typedef enum {
|
|||
CPU_FEATURE_TBM, /*!< Trailing bit manipulation instruction support */
|
||||
CPU_FEATURE_F16C, /*!< 16-bit FP convert instruction support */
|
||||
CPU_FEATURE_RDRAND, /*!< RdRand instruction */
|
||||
CPU_FEATURE_X2APIC, /*!< x2APIC, APIC_BASE.EXTD, MSRs 0000_0800h...0000_0BFFh 64-bit ICR (+030h but not +031h), no DFR (+00Eh), SELF_IPI (+040h) also see standard level 0000_000Bh */
|
||||
/* termination: */
|
||||
NUM_CPU_FEATURES,
|
||||
} cpu_feature_t;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue