mirror of
https://github.com/anrieff/libcpuid
synced 2024-12-16 16:35:45 +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 },
|
{ 9, CPU_FEATURE_SSSE3 },
|
||||||
{ 13, CPU_FEATURE_CX16 },
|
{ 13, CPU_FEATURE_CX16 },
|
||||||
{ 19, CPU_FEATURE_SSE4_1 },
|
{ 19, CPU_FEATURE_SSE4_1 },
|
||||||
|
{ 21, CPU_FEATURE_X2APIC },
|
||||||
{ 23, CPU_FEATURE_POPCNT },
|
{ 23, CPU_FEATURE_POPCNT },
|
||||||
{ 29, CPU_FEATURE_F16C },
|
{ 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_SSE4_2, "sse4_2" },
|
||||||
{ CPU_FEATURE_SYSCALL, "syscall" },
|
{ CPU_FEATURE_SYSCALL, "syscall" },
|
||||||
{ CPU_FEATURE_XD, "xd" },
|
{ CPU_FEATURE_XD, "xd" },
|
||||||
|
{ CPU_FEATURE_X2APIC , "x2apic"},
|
||||||
{ CPU_FEATURE_MOVBE, "movbe" },
|
{ CPU_FEATURE_MOVBE, "movbe" },
|
||||||
{ CPU_FEATURE_POPCNT, "popcnt" },
|
{ CPU_FEATURE_POPCNT, "popcnt" },
|
||||||
{ CPU_FEATURE_AES, "aes" },
|
{ CPU_FEATURE_AES, "aes" },
|
||||||
|
|
|
@ -349,6 +349,7 @@ typedef enum {
|
||||||
CPU_FEATURE_TBM, /*!< Trailing bit manipulation instruction support */
|
CPU_FEATURE_TBM, /*!< Trailing bit manipulation instruction support */
|
||||||
CPU_FEATURE_F16C, /*!< 16-bit FP convert instruction support */
|
CPU_FEATURE_F16C, /*!< 16-bit FP convert instruction support */
|
||||||
CPU_FEATURE_RDRAND, /*!< RdRand instruction */
|
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: */
|
/* termination: */
|
||||||
NUM_CPU_FEATURES,
|
NUM_CPU_FEATURES,
|
||||||
} cpu_feature_t;
|
} cpu_feature_t;
|
||||||
|
|
|
@ -5410,7 +5410,7 @@ intel_fn11[3]=00000000 00000000 00000003 00000000
|
||||||
64
|
64
|
||||||
128 (non-authoritative)
|
128 (non-authoritative)
|
||||||
Xeon (Sandy Bridge)
|
Xeon (Sandy Bridge)
|
||||||
fpu vme de pse tsc msr pae mce cx8 apic mtrr sep pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pni pclmul dts64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 xd popcnt aes xsave osxsave avx lm lahf_lm
|
fpu vme de pse tsc msr pae mce cx8 apic mtrr sep pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pni pclmul dts64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 xd popcnt aes xsave osxsave avx lm lahf_lm x2apic
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
basic_cpuid[0]=0000000d 756e6547 6c65746e 49656e69
|
basic_cpuid[0]=0000000d 756e6547 6c65746e 49656e69
|
||||||
basic_cpuid[1]=000206d7 00200800 1fbee3bf bfebfbff
|
basic_cpuid[1]=000206d7 00200800 1fbee3bf bfebfbff
|
||||||
|
@ -5504,7 +5504,7 @@ intel_fn11[3]=00000000 00000000 00000003 00000000
|
||||||
64
|
64
|
||||||
128 (non-authoritative)
|
128 (non-authoritative)
|
||||||
Sandy Bridge-E (Core i7)
|
Sandy Bridge-E (Core i7)
|
||||||
fpu vme de pse tsc msr pae mce cx8 apic mtrr sep pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pni pclmul dts64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 popcnt aes xsave osxsave avx lm lahf_lm
|
fpu vme de pse tsc msr pae mce cx8 apic mtrr sep pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pni pclmul dts64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 popcnt aes xsave osxsave avx lm lahf_lm x2apic
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
basic_cpuid[0]=0000000d 756e6547 6c65746e 49656e69
|
basic_cpuid[0]=0000000d 756e6547 6c65746e 49656e69
|
||||||
basic_cpuid[1]=000306a9 00100800 7f9ae3bf bfebfbff
|
basic_cpuid[1]=000306a9 00100800 7f9ae3bf bfebfbff
|
||||||
|
|
Loading…
Reference in a new issue