From 3581a68a98ff61c2066b6ce6cb5e1321b950ef20 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Sat, 23 Sep 2023 03:44:55 +0200 Subject: arch/x86/cpu_common: use cpuid_get_max_func Use cpuid_get_max_func instead of open-coding the same functionality in cpu_check_deterministic_cache_cpuid_supported. Signed-off-by: Felix Held Change-Id: I590f0c840bc62bbd0b5038c5827367d811e30d10 Reviewed-on: https://review.coreboot.org/c/coreboot/+/78108 Tested-by: build bot (Jenkins) Reviewed-by: Matt DeVillier --- src/arch/x86/cpu_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/arch/x86') diff --git a/src/arch/x86/cpu_common.c b/src/arch/x86/cpu_common.c index 9727d64528..60ffd36c6e 100644 --- a/src/arch/x86/cpu_common.c +++ b/src/arch/x86/cpu_common.c @@ -90,7 +90,7 @@ uint32_t cpu_get_feature_flags_edx(void) enum cpu_type cpu_check_deterministic_cache_cpuid_supported(void) { if (cpu_is_intel()) { - if (cpuid_eax(0) < 4) + if (cpuid_get_max_func() < 4) return CPUID_COMMAND_UNSUPPORTED; return CPUID_TYPE_INTEL; } else if (cpu_is_amd()) { -- cgit v1.2.3