]> git.ipfire.org Git - thirdparty/glibc.git/commit
x86: Check the lower byte of EAX of CPUID leaf 2 [BZ #30643]
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 28 Aug 2023 19:08:14 +0000 (12:08 -0700)
committerSunil K Pandey <skpgkp2@gmail.com>
Sat, 11 Jan 2025 23:28:59 +0000 (15:28 -0800)
commite13bf07e4edc2323627cdf0d05a1fdf28e7fdd45
treed3bdcf77117dfe718ed02e2c525223084d82df32
parent2b78e079d896bd3654e8dfb8fdb277a0c5074e92
x86: Check the lower byte of EAX of CPUID leaf 2 [BZ #30643]

The old Intel software developer manual specified that the low byte of
EAX of CPUID leaf 2 returned 1 which indicated the number of rounds of
CPUDID leaf 2 was needed to retrieve the complete cache information. The
newer Intel manual has been changed to that it should always return 1
and be ignored.  If the lower byte isn't 1, CPUID leaf 2 can't be used.
In this case, we ignore CPUID leaf 2 and use CPUID leaf 4 instead.  If
CPUID leaf 4 doesn't contain the cache information, cache information
isn't available at all.  This addresses BZ #30643.

(cherry picked from commit 1493622f4f9048ffede3fbedb64695efa49d662a)
sysdeps/x86/dl-cacheinfo.h