summaryrefslogtreecommitdiffstats
path: root/src/arch
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2023-09-21 20:33:10 +0200
committerFelix Held <felix-coreboot@felixheld.de>2023-09-23 01:21:36 +0000
commit9acae39bc22a53689cab9311e26b6ed248cedd58 (patch)
treeaa5c0a77fdd12447befa2a05c9cbcbcd4f7635a2 /src/arch
parent97a48961e80632f8f53b3fcdd52920f832716775 (diff)
downloadcoreboot-9acae39bc22a53689cab9311e26b6ed248cedd58.tar.gz
coreboot-9acae39bc22a53689cab9311e26b6ed248cedd58.tar.bz2
coreboot-9acae39bc22a53689cab9311e26b6ed248cedd58.zip
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 <felix-coreboot@felixheld.de> Change-Id: I4ea22c3997769179311f3c8822e6d8cc15a8834c Reviewed-on: https://review.coreboot.org/c/coreboot/+/78057 Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com> Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/x86/cpu_common.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/arch/x86/cpu_common.c b/src/arch/x86/cpu_common.c
index af4e7b001d6d..102ccf046875 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);