1
0
Fork 0
mirror of https://github.com/anrieff/libcpuid synced 2024-11-10 22:59:13 +00:00
Commit graph

54 commits

Author SHA1 Message Date
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
SpaceIm
6aaa3ad92d
fix installation of BUNDLE if iOS (#154) 2021-07-16 01:47:17 +03:00
Xorg
7179a7b103
CMake: fix Unix install and format 2020-05-21 18:43:34 +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
kreuzerkrieg
12de298ff7 Add CMake 2020-02-06 10:32:25 +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
51aac9f852 Update .am files about the vc9->vc10 file change. 2016-07-10 04:27:35 +03:00
Veselin Georgiev
bb9f03f2ba Replace VC9 project files with improved ones for VC10.
The new project files are for Microsoft Visual Studio 2010.

The configurations now support building both 32- and 64-bit targets,
and the "Release DLL" target is supported much like in the vc71 project.

The output layout is as follows:

32-bit, Debug static library goes to libcpuid/x32/Debug
32-bit, Release static library goes to libcpuid/x32/Release
32-bit, DLL (only release) goes to libcpuid/x32/ReleaseDLL. It includes
the .dll and the export library .lib as well.
64-bit DLL goes to libcpuid/x64/ReleaseDLL.

and so forth.
2016-07-10 02:51:23 +02: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
23c629295a Add *.sln, *.vcproj files to automake for "make dist" to work.
The .am files contained obsolete data (to include libcpuid.sln/libcpuid.vcproj
in a dist). These files are now in libcpuid_vc71.* and libcpuid_vc9.* flavours,
thus this change. "make dist" now works.
2014-06-25 13:54:41 +03:00
Veselin Georgiev
b65ac8c8e6 Changed code generation to Multithreaded DLL
git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@106 3b4be424-7ac5-41d7-8526-f4ddcb85d872
2012-08-26 20:29:44 +00:00
Veselin Georgiev
767c09c57b Ported to Microsoft Visual C 6.0
It requires MSVC 6.0 with SP5 and Processor Pack 5 installed (for SSE instruction support).

git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@105 3b4be424-7ac5-41d7-8526-f4ddcb85d872
2012-08-25 23:14:59 +00: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
8f1f12828d Added project files for Visual Studio 2003 (VC 71), added an option to build libcpuid as a DLL.
git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@59 3b4be424-7ac5-41d7-8526-f4ddcb85d872
2009-08-19 21:43:56 +00:00
Veselin Georgiev
c4861cdd35 Renamed VC project files so that project for versions lower than Visual C++ 2008 can be made.
git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@58 3b4be424-7ac5-41d7-8526-f4ddcb85d872
2009-08-19 21:14:39 +00:00
Veselin Georgiev
677c04ee67 Added Makefile for Win64
git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@54 3b4be424-7ac5-41d7-8526-f4ddcb85d872
2009-01-27 01:43:13 +00:00
Veselin Georgiev
1fe4c2150d Adding Visual studio project files; adding the 'make test' target
git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@50 3b4be424-7ac5-41d7-8526-f4ddcb85d872
2009-01-10 18:18:13 +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
931dc5bb9a Removed Runtime DLL dependency (Changed Runtime from "Multithreaded (Debug) DLL" -> "Multithreaded (Debug)")
git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@27 3b4be424-7ac5-41d7-8526-f4ddcb85d872
2008-11-20 18:36:41 +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