Tim Wawrzynczak has submitted this change. ( https://review.coreboot.org/c/coreboot/+/57306 )
Change subject: arch/x86: Check unsupported CPU type while writing to SMBIOS table 7 ......................................................................
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 --- M src/arch/x86/smbios.c 1 file changed, 2 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Swift Geek (Sebastian Grzywna): Looks good to me, but someone else must approve Angel Pons: Looks good to me, approved Tim Wawrzynczak: Looks good to me, approved
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c index 0af149e..71b6a22 100644 --- a/src/arch/x86/smbios.c +++ b/src/arch/x86/smbios.c @@ -765,7 +765,8 @@ 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; }