FrankXie
a7d5f29ace
[MSVC] Replace #warning with compatible directives for MSVC
2024-11-26 11:15:05 +01:00
The Tumultuous Unicorn Of Darkness
7770fffb6a
Fix build error on AArch64 when HWCAP_CPUID is not defined
...
Fix #205
2024-10-04 12:54:42 +02:00
The Tumultuous Unicorn Of Darkness
a0f07b8b26
Return ERR_NO_CPUID when cpuid kernel module cannot be used on AArch32 state
2024-08-30 15:15:22 +02:00
The Tumultuous Unicorn Of Darkness
3b8b7dfaf8
Detect x2APIC and AVX512 for AMD CPUs and update tests
...
AVX512 is supported since Zen 4, meaning all Zen 4 CPUs are x86-64-v4.
x2APIC and AVX512 are present in 'Processor Programming Reference (PPR) for AMD Family 19h Model 11h, Revision B1'.
2024-08-25 20:49:56 +02:00
Pavol Žáčik
6c87edab5a
Remove CPU_ prefix from x86 cpu_feature_level_t enum options
...
This makes the option names of cpu_feature_level_t consistent
and it also makes it easier to list options of the cpu_feature_t
enum just by their prefix (because it now doesn't collide with
the prefix of cpu_feature_level_t options).
2024-08-25 12:43:29 +02:00
The Tumultuous Unicorn Of Darkness
6b87429dc5
Rename error variable in cpu_request_core_type() for consistency
2024-08-04 15:13:45 +02:00
The Tumultuous Unicorn Of Darkness
673f4e45ff
Improve error handling in cpu_identify_all()
2024-08-04 15:13:45 +02:00
The Tumultuous Unicorn Of Darkness
afbc2e5a4a
Hide a warning
...
/home/runner/work/libcpuid/libcpuid/libcpuid/cpuid_main.c:450:44: warning: unused parameter 'logical_cpu' [-Wunused-parameter]
static bool set_cpu_affinity(logical_cpu_t logical_cpu)
2024-08-03 12:38:19 +02:00
The Tumultuous Unicorn Of Darkness
543c3ac17d
Fix scanf() format for 'logical_cpu' in cpuid_deserialize_raw_data_internal()
...
logical_cpu is an uint16_t, so SCNu16 is the correct format. It was providing strange values with SCNi16, like with the Intel® Xeon® Platinum 8280 dump.
2024-07-31 15:12:30 +02:00
The Tumultuous Unicorn Of Darkness
25c83f0d0b
Provide raw for logical CPU 0 in cpuid_get_raw_data_core() even if set_cpu_affinity() is not supported
...
On OpenBSD, set_cpu_affinity() is not supported, so cpuid_get_raw_data_core() always returns ERR_INVCNB.
This commit allows to provide raw data for at least one CPU core.
2024-07-27 17:45:05 +02:00
The Tumultuous Unicorn Of Darkness
00b7081035
Do not set 'with_affinity' in cpu_raw_data_array_t_constructor() when set_cpu_affinity() is not supported
2024-07-27 17:41:58 +02:00
The Tumultuous Unicorn Of Darkness
2133c22052
Improve set_cpu_affinity() on NetBSD
...
By default, running libcpuid as regular user on NetBSD shows nothing: set_cpu_affinity() fails quietly so cpu_identify_all() is not able to get raw data.
This commit display a warning when an unallowed user try to set CPU affinity.
2024-07-27 13:25:08 +02:00
The Tumultuous Unicorn Of Darkness
3c37492b93
Support get_total_cpus() on DragonFly BSD
...
Tested on DragonFly BSD 6: it works as expected.
2024-07-27 12:00:23 +02:00
The Tumultuous Unicorn Of Darkness
505c8b5fe6
Improve errors handling in cpuid_get_all_raw_data() and cpuid_get_raw_data_core()
...
Close #202
2024-07-26 11:57:11 +02:00
The Tumultuous Unicorn Of Darkness
4d6cc787fe
rdcpuid: handle errors
2024-07-10 20:18:03 +02:00
The Tumultuous Unicorn Of Darkness
7b6047c2ac
Extract both AArch32 and AArch64 registers on AArch64
2024-07-09 18:17:54 +02:00
The Tumultuous Unicorn Of Darkness
0f0b1e6060
Add rdcpuid interface for kernel drivers on ARM CPUs
2024-07-08 21:53:26 +02:00
The Tumultuous Unicorn Of Darkness
c5d9b387d1
Improve ARM core ID identification and add cpuid_get_raw_data_core()
2024-07-07 17:48:41 +02:00
The Tumultuous Unicorn Of Darkness
ea9ada7118
Add initial support for ARM CPUs running in AArch32 mode
...
Related to #96
Kernel modules to access AArch32 registers will be added in a separate commit.
2024-07-07 16:47:59 +02:00
The Tumultuous Unicorn Of Darkness
7b0e6ba085
Put back correct fprintf() format in cpuid_serialize_raw_data_internal()
...
%08 and %016 removed by mistake in 10bac35920
2024-07-03 19:36:56 +02:00
The Tumultuous Unicorn Of Darkness
1bc636e2cf
Print a warning for unsupported CPU architectures
...
The goal is to warn people trying to build libcpuid on PPC, MIPS, RISC-V and so on.
2024-07-01 15:11:21 +02:00
The Tumultuous Unicorn Of Darkness
10bac35920
Fix warnings about sscanf() and printf() formats
...
I do not have them on GCC (Linux x86_64), but it complains on macOS and Windows according to CI: https://github.com/anrieff/libcpuid/actions/runs/9731746775/job/26856558997
inttypes seems to be a better portable way to handle type like uint64_t.
2024-06-30 19:54:21 +02:00
The Tumultuous Unicorn Of Darkness
7456289072
Do not warn about deprecated declarations in cpu_ident_internal()
2024-06-30 13:51:50 +02:00
The Tumultuous Unicorn Of Darkness
c6a72849b8
Allow to build libcpuid without deprecated attributes
...
It helps to track internal usage of deprecated attributes.
2024-06-30 12:38:22 +02:00
The Tumultuous Unicorn Of Darkness
e78f12464b
Add support for AMD leaf 80000026h
2024-06-29 17:35:33 +02:00
The Tumultuous Unicorn Of Darkness
959edc34e7
Add cpu_feature_level_t enumerated values for x86 CPUs
...
I had to fix run_tests.py to update all test files properly.
Fix #177
2024-06-29 17:01:50 +02:00
The Tumultuous Unicorn Of Darkness
c5885699f0
Add initial support for ARM CPUs
...
Close #200
2024-06-28 20:41:00 +02:00
Pavol Žáčik
550efe1a32
Fix cpuid_get_hypervisor when NULL data is provided
...
The data should be loaded into the local variable
`mydata`, not into the NULL parameter.
2024-05-26 17:32:54 +02:00
The Tumultuous Unicorn Of Darkness
d9f2683aab
Add PURPOSE_LP_EFFICIENCY to cpu_purpose_t for Intel Meteor Lake
2024-04-14 17:19:12 +02:00
The Tumultuous Unicorn Of Darkness
0b47460256
Rewrite cpu_identify_all() function to support heterogeneous RAW dumps
...
For Meteor Lake CPUs, performance and efficiency cores are mixed (unlike previous CPU generations), so the approach needs to be revisited.
2024-04-14 17:19:12 +02:00
The Tumultuous Unicorn Of Darkness
19100f8af5
Fix warning in cpu_ident_apic_id()
...
cpuid_main.c: In function 'cpu_identify_all':
cpuid_main.c:940:81: warning: 'smt_mask' may be used uninitialized [-Wmaybe-uninitialized]
940 | uint32_t mask_smt_shift, core_plus_mask_width, package_mask, core_mask, smt_mask;
2023-10-09 18:56:59 +02:00
kylon
03695167d7
fix build warning
2023-07-16 11:35:49 +02:00
The Tumultuous Unicorn Of Darkness
d4461a9b5f
Add basic support for Centaur CPUs (VIA/Zhaoxin)
2023-07-01 16:01:26 +02:00
The Tumultuous Unicorn Of Darkness
7974741993
Fix floating point exception in cpu_identify_all() for unsupported CPU vendors
2023-06-03 20:11:29 +02:00
The Tumultuous Unicorn Of Darkness
5789a6e297
Support another variant of AIDA64 dumps in cpuid_deserialize_raw_data_internal()
...
It support lines like 'CPU#000 AffMask: 0x0000000000000001'
2023-05-08 16:35:11 +02:00
DimasKovas
e3e1c16190
Rename set_error -> cpuid_set_error and get_error -> cpuid_get_error ( #188 )
2023-04-01 02:00:54 +03:00
The Tumultuous Unicorn Of Darkness
995f7d12d9
Fix 'function declaration isn't a prototype' warning
2023-03-25 19:23:28 +01:00
The Tumultuous Unicorn Of Darkness
7542db9879
Initial support for AMD Phoenix APU with hybrid architecture
...
This work may not work: extended CPU Topology leaf is required.
2023-03-25 19:17:44 +01:00
Robert Kausch
37462ab492
Query CPU info at least once even if set_cpu_affinity() fails
2023-03-12 11:54:21 +01:00
Robert Kausch
54ed9a0a17
Restore previous thread CPU affinity before returning from cpuid_get_all_raw_data() ( #184 )
...
* Set thread instead of process CPU affinity in pre Windows 7 case
* Restore previous thread CPU affinity before returning from cpuid_get_all_raw_data()
2023-02-17 11:07:44 +02:00
Veselin Georgiev
d02c05428d
Fix issue #179 (Misprint, not enough zeros in the constant)
...
As suggested in the issue comment.
2023-01-02 13:18:01 +02:00
The Tumultuous Unicorn Of Darkness
3b0a1f7e5b
Fix infinite loop in set_cpu_affinity() on macOS
...
Fix #178
2023-01-01 14:20:44 +01:00
The Tumultuous Unicorn Of Darkness
d84493e6ca
Fix warnings in cpuid_main.c
...
D:\a\libcpuid\libcpuid\libcpuid\cpuid_main.c(1192,82): warning C4244: '=': conversion from 'double' to 'int32_t', possible loss of data [D:\a\libcpuid\libcpuid\libcpuid\libcpuid_vc10.vcxproj]
D:\a\libcpuid\libcpuid\libcpuid\cpuid_main.c(1283,23): warning C4018: '<': signed/unsigned mismatch [D:\a\libcpuid\libcpuid\libcpuid\libcpuid_vc10.vcxproj]
2022-11-11 17:49:21 +01:00
Xorg
e0dce2b0ef
DB: add Intel Tremont
...
Fix X0rg/CPU-X#253
2022-10-29 15:41:59 +02:00
Xorg
1ed9a89ab0
Fix segfault in cpu_identify_all() for mono-core CPUs
...
Fix X0rg/CPU-X#251
Fix #176
2022-10-25 22:23:14 +02:00
Xorg
e073118328
Avoid to print the same debug message twice in update_cache_instances()
2022-10-22 20:36:34 +02:00
Xorg
bbdab9e398
Print a warning if APIC ID is not supported
2022-10-22 20:35:56 +02:00
Xorg
737cc3d98e
Use APIC ID to count physical core when supported
...
Fix #175
2022-10-22 20:32:05 +02:00
Veselin Georgiev
1a3785d03f
This would likely fix #172 (cpuid_tool.exe v0.6.0 doesn't work on my PC)
2022-10-05 10:23:58 +03:00
Xorg
9334bce205
Fix cpuid_deserialize_raw_data_internal when raw starts with 'version'
2022-09-27 20:16:05 +02:00