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

36 commits

Author SHA1 Message Date
The Tumultuous Unicorn Of Darkness
c5885699f0
Add initial support for ARM CPUs
Close #200
2024-06-28 20:41:00 +02:00
The Tumultuous Unicorn Of Darkness
a578c8d993
Release version 0.6.5 2024-04-28 12:23:59 +02:00
The Tumultuous Unicorn Of Darkness
f9b833d122
Release version 0.6.4 2023-10-08 17:12:01 +02:00
The Tumultuous Unicorn Of Darkness
764607faa0
Cleanup in configure.ac
Commited by mistake in 09071d20f3
2023-09-23 17:29:50 +02:00
John Ericson
09071d20f3
Fix build for NetBSD (and presumably DragonFly BSD)
These both use POSIX threads. I got a link error when cross-compiling
using Nixpkgs (Linux -> NetBSD) that went away once I passed `-pthread`.

The autoconf is crafted to have the same conditional as the C code itself.
2023-09-23 16:55:21 +02:00
The Tumultuous Unicorn Of Darkness
20b177bb1d
Release version 0.6.3 2023-04-02 11:50:02 +02:00
The Tumultuous Unicorn Of Darkness
3d1ed275c9
Release version 0.6.2 2022-11-11 19:33:06 +01:00
Xorg
e5b5f2e019
Release version 0.6.1 2022-10-23 16:51:00 +02:00
Xorg
3bf569faf5 Release version 0.6.0 2022-09-27 20:46:59 +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
Zhu Zihao
2e61160983
Don't link with msrdriver.c on non-Windows platform. (#159)
This simplify the procedure of sanitizing unneeded blob in source.
2022-01-14 10:35:10 +02:00
Alyssa Ross
1acaf9980b
Use popcount64 from libc when available (#152)
* Use popcount64 from libc when available

Without this, we get a compiler error on NetBSD because the one in
libc has a slightly different prototype.

libcpuid_util.c:78:12: error: conflicting types for 'popcount64'
   78 | static int popcount64(uint64_t mask)
      |            ^~~~~~~~~~
In file included from /nix/store/155rj8nqh3xd80vpa8hl35p3hk7pacys-include-netbsd-8.0/include/string.h:98,
                 from libcpuid_util.c:30:
/nix/store/155rj8nqh3xd80vpa8hl35p3hk7pacys-include-netbsd-8.0/include/strings.h:61:14: note: previous declaration of 'popcount64' was here
   61 | unsigned int popcount64(__uint64_t) __constfunc;
      |              ^~~~~~~~~~

* Return unsigned int from popcount64

Matches NetBSD libc, where popcount64 originates.
2021-07-16 01:55:36 +03:00
Xorg
179fbcb713
Release version 0.5.1 (#151) 2021-03-21 12:41:56 +02:00
Xorg
2343193401
Release version 0.5.0 (#146)
* Set version to 0.5.0

* Update debian/control to the new version (incompatible with 0.4.x)

* Rename .install files to match SO version

Co-authored-by: Veselin Georgiev <anrieff@gmail.com>
2020-05-25 23:33:26 +03:00
Veselin Georgiev
a6123e8139 Fixed issue #105: New Release version
The version is 0.4.1 (instead of suggested 0.5.0) since it
introduces no backwards-incompatible changes.

Only version is actually changed, no code modifications.
2019-02-05 22:43:52 +02:00
Veselin Georgiev
2f1031543c Fix issue #101: Package should not use obsolete m4 macros 2017-10-23 16:59:57 +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
dbf9991553 Merge pull request #48 from X0rg/master
MSRs rework and man-pages
2016-06-05 14:39:57 +01:00
Veselin Georgiev
7320ee9f29 Change configure.ac AGE (as per the comments in issue #46).
The new library generated under linux is libcpuid.so.13.0.0, which
makes it clear it's binary incompatible with the old version
(libcpuid.so.11.1.2).
2016-06-05 13:57:06 +03:00
Xorg
8fda5a74f1 Generate and install man-pages if Doxygen is installed 2016-06-05 12:09:59 +02:00
Xorg
e631e62ce6 Silent rules in configure.ac
Less useless output to easily see warnings
2016-06-04 20:36:58 +02:00
Veselin Georgiev
c31b5c0ae8 Add up to 8 entries for CPUID leaf 04; push version to 0.3.0.
This is a backwards-incompatible binary change, which increases
sizeof(cpu_raw_data_t). Specifically, the cpu_raw_data_t::intel_fn4
array is increased from 4 to 8 elements, because on recent Hasells
(Crystalwell) there is a Level 4 cache, which should be encoded in
CPUID eax=4 ecx=4. However, we were only storing levels for eax=4
for ecx <= 3. Thus the raw data didn't have the relevant info.

There will be further changes to this, specifically to store
and print the level 4 cache in cpuid_tool.
2016-06-03 04:35:01 +03:00
Veselin Georgiev
db65e9a6b0 Fix a few Doxygen warnings and errors. Beautify docs a bit.
Also rename Doxyfile to Doxyfile.in, add it in configure and replace
version and pathspec in it with macros.
2016-05-22 23:20:16 +03:00
Veselin Georgiev
8c7b2fef63 Bump the version to 0.2.2 (and briefly describe changes since 2012). 2015-11-04 01:31:22 +02:00
Veselin Georgiev
cc1cce5ec8 Fixed issue #5: warnings while running auto-reconf --install
Automake >= 1.12 seems to require AM_PROG_AR to be happy with our
configure.ac. However, this macro is not defined on < 1.12, thus
the ifdef.
Confirmed that the project bootstraps without warnings on both
Fedora 14 and Ubuntu 13.10.
2014-08-18 18:17:24 +03:00
Veselin Georgiev
2914256486 Update ChangeLog; bump the version to 0.2.1 everywhere.
Previously, 0.2.1 was mentioned in libcpuid.h, but this was not,
actually, in effect; it wasn't mentioned in autoconf and Visual Studio
project files. Also, cpuid_lib_version() still returned "0.2.0".
2014-06-25 14:15:53 +03:00
Veselin Georgiev
c5b459c5b2 Fix issue #2: There is no configure binary and get some statements while building it.
There's no reason to keep a configure binary in source control. I added the
necessary steps to create it in the README.
2014-06-25 13:48:32 +03: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
c3d236ec86 Bumped the version to 0.1.4
git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@94 3b4be424-7ac5-41d7-8526-f4ddcb85d872
2011-01-14 05:28:31 +00:00
Veselin Georgiev
75934f2538 An erorrneous commit was reverted
git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@85 3b4be424-7ac5-41d7-8526-f4ddcb85d872
2010-04-20 10:18:53 +00:00
Veselin Georgiev
23b5b71856 Another minor fix
git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@84 3b4be424-7ac5-41d7-8526-f4ddcb85d872
2010-04-20 10:17:21 +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
59cf96984d Fixed recognition of Core i7. It was required to obtain the extended CPU topology information from CPUID leaf 0xb, so 4 more ints are added to cpu_raw_data_t. This, in turn, breaks binary compatibility with version 0.1.0, so version is increased to 0.1.1 as well. The new CPUID serialization is backward- and forward-compatible with version 0.1.0, provided that the CPU doesn't have leaf 0xb. In some sense it might be viewed incompatible as well. Also added the guilty test case to the test stash
git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@57 3b4be424-7ac5-41d7-8526-f4ddcb85d872
2009-07-06 18:33:56 +00:00
Veselin Georgiev
b20d0254de Added the unit tests to the tarball distribution
git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@51 3b4be424-7ac5-41d7-8526-f4ddcb85d872
2009-01-13 18:33:28 +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
Veselin Georgiev
bb045e7178 Moving the repository one level deeper
git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@3 3b4be424-7ac5-41d7-8526-f4ddcb85d872
2008-11-06 18:17:20 +00:00