x86: Fix for cache computation on AMD legacy cpus.
authorSajan Karumanchi <sajan.karumanchi@amd.com>
Tue, 1 Aug 2023 15:20:55 +0000 (15:20 +0000)
committerPrem Mallappa <Premachandra.Mallappa@amd.com>
Sun, 6 Aug 2023 13:40:42 +0000 (19:10 +0530)
commitdcad5c8578130dec7f35fd5b0885304b59f9f543
treee32eda50e4f5de3a0397734892518709adeb387c
parent53850f044f65dd11efdf67a2ab214d312295d85c
x86: Fix for cache computation on AMD legacy cpus.

Some legacy AMD CPUs and hypervisors have the _cpuid_ '0x8000_001D'
set to Zero, thus resulting in zeroed-out computed cache values.
This patch reintroduces the old way of cache computation as a
fail-safe option to handle these exceptions.
Fixed 'level4_cache_size' value through handle_amd().

Reviewed-by: Premachandra Mallappa <premachandra.mallappa@amd.com>
Tested-by: Florian Weimer <fweimer@redhat.com>
sysdeps/x86/dl-cacheinfo.h