Skip to content

Commit 9c2587b

Browse files
committed
enh: when CPUID can't be read, built it by ourselves
1 parent 2a5ddc8 commit 9c2587b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

spectre-meltdown-checker.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1866,7 +1866,9 @@ parse_cpu_details()
18661866
if read_cpuid 0x1 0x0 $EAX 0 0xFFFFFFFF; then
18671867
cpu_cpuid="$read_cpuid_value"
18681868
else
1869-
cpu_cpuid=0
1869+
# try to build it by ourselves
1870+
_debug "parse_cpu_details: build the CPUID by ourselves"
1871+
cpu_cpuid=$(fms2cpuid "$cpu_family" "$cpu_model" "$cpu_stepping")
18701872
fi
18711873

18721874
# under BSD, linprocfs often doesn't export ucode information, so fetch it ourselves the good old way

0 commit comments

Comments
 (0)