From 9acae39bc22a53689cab9311e26b6ed248cedd58 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Thu, 21 Sep 2023 20:33:10 +0200 Subject: [PATCH] arch/x86/cpu_common: use cpu_cpuid_extended_level Use cpu_cpuid_extended_level instead of open-coding the same functionality in cpu_check_deterministic_cache_cpuid_supported. Signed-off-by: Felix Held Change-Id: I4ea22c3997769179311f3c8822e6d8cc15a8834c Reviewed-on: https://review.coreboot.org/c/coreboot/+/78057 Reviewed-by: Matt DeVillier Reviewed-by: Paul Menzel Tested-by: build bot (Jenkins) --- src/arch/x86/cpu_common.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/arch/x86/cpu_common.c b/src/arch/x86/cpu_common.c index af4e7b001d..102ccf0468 100644 --- a/src/arch/x86/cpu_common.c +++ b/src/arch/x86/cpu_common.c @@ -97,8 +97,7 @@ enum cpu_type cpu_check_deterministic_cache_cpuid_supported(void) return CPUID_COMMAND_UNSUPPORTED; return CPUID_TYPE_INTEL; } else if (cpu_is_amd()) { - res = cpuid(0x80000000); - if (res.eax < 0x80000001) + if (cpu_cpuid_extended_level() < 0x80000001) return CPUID_COMMAND_UNSUPPORTED; res = cpuid(0x80000001);