diff options
author | Felix Held <felix-coreboot@felixheld.de> | 2023-09-23 03:44:02 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-09-26 14:11:34 +0000 |
commit | 1eea841b29643b2a6b1d08ec81a6ae9a71ef3166 (patch) | |
tree | 8c908567121fc461f707bf761a70cb221a774979 /src/arch/x86 | |
parent | 2c49a22c0851dda040f121847095543e4e440bac (diff) |
arch/x86/smbios: fix extended CPUID level check logic
Before the cpuid(0x80000001) read in smbios_write_type4, it was
previously checked in a slightly convoluted way if the result from
cpu_cpuid_extended_level was larger than 0x80000001, but the check
should be if it is larger or equal to 0x80000001.
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Iabcfdb2b8b90d80baf8f4c4d2fd79f1f44866dc7
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78107
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/arch/x86')
-rw-r--r-- | src/arch/x86/smbios.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c index 6f0d35e1a3..a2038b6dea 100644 --- a/src/arch/x86/smbios.c +++ b/src/arch/x86/smbios.c @@ -182,7 +182,7 @@ int smbios_write_type4(unsigned long *current, int handle) if ((res.edx) & BIT(28)) characteristics |= BIT(4); /* BIT4: Hardware Thread */ - if (((cpu_cpuid_extended_level() - 0x80000000) + 1) > 2) { + if (cpu_cpuid_extended_level() >= 0x80000001) { res = cpuid(0x80000001); if ((res.edx) & BIT(20)) |