diff options
author | Subrata Banik <subrata.banik@intel.com> | 2021-09-01 12:40:47 +0530 |
---|---|---|
committer | Tim Wawrzynczak <twawrzynczak@chromium.org> | 2021-09-03 19:14:31 +0000 |
commit | 6efc4aa4affd81b6c1cc54c99e8be0fb70051890 (patch) | |
tree | 7c770d34bb97d011d235931fe7ee00d692a52c14 | |
parent | 72f1e62bbbdd0ed5f45765e3c6cd5ef45a18e028 (diff) |
arch/x86: Check unsupported CPU type while writing to SMBIOS table 7
Don't attempt to fill the SMBIOS table if the CPU doesn't support
deterministic cache CPUID.
TEST=Able to fix the hang issue seen on ASRock E350M1 with commit hash
e2b5fee.
Change-Id: Id65dc963e235f7080370a32cf69bcc4bee94d28f
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57306
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Swift Geek (Sebastian Grzywna) <swiftgeek@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rw-r--r-- | src/arch/x86/smbios.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c index 0af149e6aa..71b6a22e4c 100644 --- a/src/arch/x86/smbios.c +++ b/src/arch/x86/smbios.c @@ -765,7 +765,8 @@ static int smbios_write_type7_cache_parameters(unsigned long *current, if (!cpu_have_cpuid()) return len; - if (cpu_check_deterministic_cache_cpuid_supported() == CPUID_TYPE_INVALID) { + enum cpu_type dcache_cpuid = cpu_check_deterministic_cache_cpuid_supported(); + if (dcache_cpuid == CPUID_TYPE_INVALID || dcache_cpuid == CPUID_COMMAND_UNSUPPORTED) { printk(BIOS_DEBUG, "SMBIOS: Unknown CPU\n"); return len; } |