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>
This commit is contained in:
Felix Held 2023-09-23 03:44:02 +02:00
parent 2c49a22c08
commit 1eea841b29
1 changed files with 1 additions and 1 deletions

View File

@ -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))