From 9c2587bca54a306ea7d17f7e92b1008af759960c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Lesimple?= Date: Sun, 30 Jul 2023 11:55:12 +0200 Subject: [PATCH] enh: when CPUID can't be read, built it by ourselves --- spectre-meltdown-checker.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spectre-meltdown-checker.sh b/spectre-meltdown-checker.sh index 237808b..9ca3ab0 100755 --- a/spectre-meltdown-checker.sh +++ b/spectre-meltdown-checker.sh @@ -1866,7 +1866,9 @@ parse_cpu_details() if read_cpuid 0x1 0x0 $EAX 0 0xFFFFFFFF; then cpu_cpuid="$read_cpuid_value" else - cpu_cpuid=0 + # try to build it by ourselves + _debug "parse_cpu_details: build the CPUID by ourselves" + cpu_cpuid=$(fms2cpuid "$cpu_family" "$cpu_model" "$cpu_stepping") fi # under BSD, linprocfs often doesn't export ucode information, so fetch it ourselves the good old way