1
0
Fork 0
mirror of https://github.com/anrieff/libcpuid synced 2024-11-20 23:01:51 +00:00
Commit graph

42 commits

Author SHA1 Message Date
The Tumultuous Unicorn Of Darkness
c6723aa914
Improve cpuid_tool behavior when cpu_types array is empty
It happens when cpuid_get_all_raw_data() cannot use set_cpu_affinity()
2024-07-27 13:33:55 +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
Xorg
dc406c4de1
Do not print the same message twice when reading a raw CPUID dump 2022-09-23 18:44:11 +02:00
Xorg
6b742be8cb Add cache instances field in cpu_id_t and system_id_t 2022-09-22 17:49:38 +02:00
Xorg
ff5aafb5f4 Detect Virtual Machine
Fix #90
2022-09-18 10:26:02 +02:00
Xorg
2b8023f733
Support for hybrid CPU (#166)
* Set CMAKE_C_FLAGS_DEBUG to display warnings during build

CI workflows are reporting warnings. Adding more C flags here help to avoid that.

* Add new types

* Add set_cpu_affinity function

* Add cpu_identify_all function

* Add cpu_request_core_type function

* Add cpuid_get_all_raw_data, cpuid_serialize_all_raw_data and cpuid_deserialize_all_raw_data functions

* Detect hybrid architecture for Intel CPUs

* Update cpuid_tool to detect all CPU logical cores

* Rename tests subdirectories for Intel Core

* Update all tests

Since e4309a6c4bc3ad875711a1599cba01a205b3103e, new fields are reported by cpuid_tool

* Add Intel Alder Lake

Fix #157

* Remove convert_instlatx64.c

This tool is not useful anymore because the cpuid_deserialize_raw_data_internal() function can natively parse them since 5667e1401c

* Fix affinity_mask computation

* Define _GNU_SOURCE in configure.ac

Forgotten in 4f80964db5

* Use dynamic raw array in cpu_raw_data_array_t

* Add cpu_affinity_mask_t type

* Improve set_cpu_affinity function

- Print a warning if logical CPU number is not supported on operating system
- Return a boolean value in case of success instead of an integer

* Improve cpu_identify_all and cpu_request_core_type functions

* Use dynamic array for cpu_types in system_id_t

This commit also adds cleanups, fixes and consistency

* Tests: update Ryzen 5 Matisse with all CPU cores

* Add affinity_mask_str_r function and address other comments

- Fixed cpuid_grow_raw_data_array and cpu_raw_data_array_t.logical_cpu_t with the correct type
- Added a note about hard limit of cpu_raw_data_array_t
- Fixed a typo in cpuid_deserialize_raw_data_internal

* Fix build on Windows
2022-09-15 18:37:08 +02:00
Xorg
25d0614811
Add L1 Instruction Cache information
Some CPUs does not have the same associativity for L1D and L1I, as reported in X0rg/CPU-X#119
It adds l1_instruction_assoc and l1_instruction_cacheline in cpu_id_t
To avoid confusing, also adds l1_data_assoc and l1_data_cacheline
l1_assoc and l1_cacheline are leave untouched for backward compatibility
2020-05-10 11:49:02 +02:00
Xorg
0b05f45e03
Remove all trailling spaces
It is annoying with some text editors
2020-05-09 17:34:07 +02:00
Mike Gabriel
47418f1e71 Some typo fixes in human readable text. 2019-10-01 13:04:01 +02:00
Xorg
660cde12c7 cpuid_tool: fix multipliers format since 6ae7e344be 2017-03-04 19:04:17 +01:00
Xorg
6ae7e344be cpuid_tool: fix output with --rdmsr option 2017-03-04 14:34:38 +01:00
Xorg
9b038c94c4 Add a msr_serialize_raw_data() function 2017-02-09 20:55:28 +01:00
Veselin Georgiev
4c776cb465 cpuid_tool: proper indentation for printing EPC sections. 2016-10-04 00:37:10 +03:00
Veselin Georgiev
722a12bad2 cpuid_tool: document the `--sgx' option, and make it special.
Other, non-special options like `--cache' output strictly one line.
--sgx is not like that, because how much data it will print depends
on the machine it is being run.
2016-10-04 00:04:56 +03:00
Veselin Georgiev
f10e8c79ee Fix an error with printing SGX values, and a few warnings. 2016-10-03 22:34:22 +03:00
Veselin Georgiev
4cf8cfa862 Related to issue #67: Information about the availability of SGX
Initial commit adding support for detection of SGX. Not tested yet.
Increment version number due to binary incompatibility of the
sizes of cpu_raw_data_t and cpu_id_t.
2016-10-03 13:07:22 +03:00
Veselin Georgiev
a7a31743a2 Fix issue #66: Manpage for cpuid_tool
The man-page is generated with Doxygen, similar to the lib docs.
2016-09-20 15:36:40 +03:00
Veselin Georgiev
3f51d3ca25 Add detection of L4 cache. 2016-06-09 15:42:57 +03:00
Veselin Georgiev
3b713ff7a2 Update cpuid_tool to print the new supported MSR info. 2015-10-16 03:07:55 +03:00
Veselin Georgiev
325904f498 Export the new API function, cpuid_get_total_cpus, in win32 DLLs.
To test it, the --total-cpus option to cpuid_tool calls this function
directly. Confirmed to work now on Windows.
2014-09-27 18:14:06 +03:00
Veselin Georgiev
fead3f21e3 Use -sse-size instead of --sse_size, to be consistent
git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@97 3b4be424-7ac5-41d7-8526-f4ddcb85d872
2011-10-11 16:59:26 +00:00
Veselin Georgiev
3623c5639d Added SSE unit size detection, based on the AMD extended leaf 1a, bit 0. Added a field in cpu_id_t to specify SSE unit size. Also added a hints array, similar to the flags array, which will hold various detection-specific hints. The only currently present hint is about the way the SSE unit size is inferred - whether it is based on the old CPU family/model guesswork (which fails for the AMD Brazos-based cores). Also, added the features XOP, FMA4, TBM and F16C. Changed the library version due to breaking binary compatibility.
git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@96 3b4be424-7ac5-41d7-8526-f4ddcb85d872
2011-10-11 16:38:41 +00:00
Veselin Georgiev
44c313126b Added cpu_clock_by_ic() function to measure cpu clock using instruction counting. Still not translated to MSVC, and isn't tested on CPUs other than Core i7 (but there it works beatifully). Bumped version to 0.1.3.
git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@77 3b4be424-7ac5-41d7-8526-f4ddcb85d872
2010-04-20 09:01:07 +00:00
Veselin Georgiev
b0092bd84e Added support for reading the max multiplier
git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@74 3b4be424-7ac5-41d7-8526-f4ddcb85d872
2009-10-02 09:14:45 +00:00
Veselin Georgiev
e4920d79b0 Added cpu_msrinfo() function and implemented a few test info entries
git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@71 3b4be424-7ac5-41d7-8526-f4ddcb85d872
2009-09-30 17:20:52 +00:00
Veselin Georgiev
e96082c67f Added support for reading MSRs through dedicated driver on Win32
git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@69 3b4be424-7ac5-41d7-8526-f4ddcb85d872
2009-09-30 11:25:14 +00:00
Veselin Georgiev
9f61c6c8e9 Documented the cpu listing functions better, tidy up cpuid_tool help
git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@46 3b4be424-7ac5-41d7-8526-f4ddcb85d872
2008-12-29 16:11:52 +00:00
Veselin Georgiev
5ae4a8dd8e Added known-cpu-list function. Rearranged Intel CPU list to be better chronologically ordered
git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@45 3b4be424-7ac5-41d7-8526-f4ddcb85d872
2008-12-27 15:46:03 +00:00
Veselin Georgiev
a1395632fa Fixed many bugreports. Correct recognition for some Core2 Xeons, some ConroeLs, Sempron Codenames, some A64 and A64X2 codenames.
git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@36 3b4be424-7ac5-41d7-8526-f4ddcb85d872
2008-12-08 16:52:01 +00:00
Veselin Georgiev
2fb7b0522b cpuid_tool: Added --clock-os key to enable queries to cpu_clock_by_os()
rdtsc.c: Ported CPU clocking code to Win32, debugged Registry stuff

git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@30 3b4be424-7ac5-41d7-8526-f4ddcb85d872
2008-11-21 19:05:18 +00:00
Veselin Georgiev
9cf8005f3a Removed C++ style comments; added CPU clock measuring code
git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@29 3b4be424-7ac5-41d7-8526-f4ddcb85d872
2008-11-21 18:48:11 +00:00
Veselin Georgiev
7774c94046 libcpuid: better support for Core 2 processors: Wolfdale, Penryn, Merom - more robust detection code
cpuid_tool: the --load flag didn't have any effect with queries; fixed
tests: added a trivial testing framework, added 7 tests

git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@28 3b4be424-7ac5-41d7-8526-f4ddcb85d872
2008-11-21 16:45:46 +00:00
Veselin Georgiev
4dfb11f699 Ported to Win32 (MSVC 2005), added MSVC solution and project files. Seems to work :)
git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@26 3b4be424-7ac5-41d7-8526-f4ddcb85d872
2008-11-20 18:26:46 +00:00
Veselin Georgiev
1ce98d95e8 Family/Model/Stepping data is reported as hex, too
git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@23 3b4be424-7ac5-41d7-8526-f4ddcb85d872
2008-11-20 16:14:59 +00:00
Veselin Georgiev
6a5dff539e Fixed a small bug, which occurred when only --clock option was given to cpuid_tool.
git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@21 3b4be424-7ac5-41d7-8526-f4ddcb85d872
2008-11-19 17:29:10 +00:00
Veselin Georgiev
c5c0539372 * Support for stdin/stdout for (de)serializing cpu_raw_data_t;
* set_warn_function renamed to cpuid_set_warn_function;
* Updated Doxygen documentation: added manpage output, generic mainpage intro, default module named correctly;
* Updated doxy libcpuid.h documentation, fixed some bugs;
* Warnings are now printed to stderr by default, not stdout;
* Some constants in AMD code did not reflected their meaning well, fixed;
* The cpuid_tool utility thoroughly redesigned; now a multiple-function program, perhaps close to the finalized state.

git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@19 3b4be424-7ac5-41d7-8526-f4ddcb85d872
2008-11-19 16:27:31 +00:00
Veselin Georgiev
5343f544c1 Fixed a copy-paste bug
git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@12 3b4be424-7ac5-41d7-8526-f4ddcb85d872
2008-11-18 13:15:25 +00:00
Veselin Georgiev
381a9b07d8 Intel detection is complete, needs debug and research of newest processors
git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@8 3b4be424-7ac5-41d7-8526-f4ddcb85d872
2008-11-14 15:06:01 +00:00
Veselin Georgiev
18620f1981 Added lots of documentation and implemented part of the detection. Added a script to check for CPU feature naming consistency
git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@7 3b4be424-7ac5-41d7-8526-f4ddcb85d872
2008-11-12 18:26:49 +00:00
Veselin Georgiev
ce0bb2b2f0 Output beautification
git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@6 3b4be424-7ac5-41d7-8526-f4ddcb85d872
2008-11-10 16:10:45 +00:00
Veselin Georgiev
2d453e612c Initial detection working
git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@5 3b4be424-7ac5-41d7-8526-f4ddcb85d872
2008-11-10 16:04:29 +00:00