diff options
author | Stéphane Lesimple <speed47_github@speed47.net> | 2018-02-02 11:12:10 +0100 |
---|---|---|
committer | Stéphane Lesimple <speed47_github@speed47.net> | 2018-02-02 11:12:10 +0100 |
commit | 1834dd6201072ef150bc07ca043419da59afabc2 (patch) | |
tree | 3a7e9a8693e58ed8c88fecc733ce1a101af206ea /spectre-meltdown-checker.sh | |
parent | 3d765bc703731c843f3d03b9856bf5eae19497b5 (diff) | |
download | spectre-meltdown-checker-1834dd6201072ef150bc07ca043419da59afabc2.tar.lz spectre-meltdown-checker-1834dd6201072ef150bc07ca043419da59afabc2.tar.xz spectre-meltdown-checker-1834dd6201072ef150bc07ca043419da59afabc2.zip |
feat: add skylake era cpu detection routine
Diffstat (limited to 'spectre-meltdown-checker.sh')
-rwxr-xr-x | spectre-meltdown-checker.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/spectre-meltdown-checker.sh b/spectre-meltdown-checker.sh index d2b55eb..354afec 100755 --- a/spectre-meltdown-checker.sh +++ b/spectre-meltdown-checker.sh @@ -819,6 +819,32 @@ is_ucode_blacklisted() return 1 } +is_skylake_cpu() +{ + # is this a skylake cpu? + # return 0 if yes, 1 otherwise + #if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL && + # boot_cpu_data.x86 == 6) { + # switch (boot_cpu_data.x86_model) { + # case INTEL_FAM6_SKYLAKE_MOBILE: + # case INTEL_FAM6_SKYLAKE_DESKTOP: + # case INTEL_FAM6_SKYLAKE_X: + # case INTEL_FAM6_KABYLAKE_MOBILE: + # case INTEL_FAM6_KABYLAKE_DESKTOP: + # return true; + parse_cpu_details + [ "$cpu_vendor" = GenuineIntel ] || return 1 + [ "$cpu_family" = 6 ] || return 1 + if [ "$cpu_model" = $INTEL_FAM6_SKYLAKE_MOBILE ] || \ + [ "$cpu_model" = $INTEL_FAM6_SKYLAKE_DESKTOP ] || \ + [ "$cpu_model" = $INTEL_FAM6_SKYLAKE_X ] || \ + [ "$cpu_model" = $INTEL_FAM6_KABYLAKE_MOBILE ] || \ + [ "$cpu_model" = $INTEL_FAM6_KABYLAKE_DESKTOP ]; then + return 0 + fi + return 1 +} + # check for mode selection inconsistency if [ "$opt_live_explicit" = 1 ]; then if [ -n "$opt_kernel" ] || [ -n "$opt_config" ] || [ -n "$opt_map" ]; then |