1
0
mirror of https://github.com/speed47/spectre-meltdown-checker synced 2024-11-07 06:33:38 +01:00

arm64: cavium: Add CPU Implementer Cavium (#216)

This patch adds 0x43 check for cavium implementor id in function
parse_cpu_details. Also adds that Cavium Soc is not vulnerable to variant 3/3a

Signed-off-by: Manish Jaggi <manish.jagg@cavium.com>
This commit is contained in:
manish jaggi 2018-07-22 22:36:19 +05:30 committed by Stéphane Lesimple
parent cf06636a3f
commit 30c4a1f6d2

View File

@ -323,6 +323,9 @@ is_cpu_vulnerable()
[ -z "$variant4" ] && variant4=immune [ -z "$variant4" ] && variant4=immune
_debug "is_cpu_vulnerable: cpu not affected by speculative store bypass so not vuln to variant4" _debug "is_cpu_vulnerable: cpu not affected by speculative store bypass so not vuln to variant4"
fi fi
elif [ "$cpu_vendor" = CAVIUM ]; then
variant3=immune
variant3a=immune
elif [ "$cpu_vendor" = ARM ]; then elif [ "$cpu_vendor" = ARM ]; then
# ARM # ARM
# reference: https://developer.arm.com/support/security-update # reference: https://developer.arm.com/support/security-update
@ -989,6 +992,9 @@ parse_cpu_details()
cpu_friendly_name="ARM" cpu_friendly_name="ARM"
[ -n "$cpu_arch" ] && cpu_friendly_name="$cpu_friendly_name v$cpu_arch" [ -n "$cpu_arch" ] && cpu_friendly_name="$cpu_friendly_name v$cpu_arch"
[ -n "$cpu_part" ] && cpu_friendly_name="$cpu_friendly_name model $cpu_part" [ -n "$cpu_part" ] && cpu_friendly_name="$cpu_friendly_name model $cpu_part"
elif grep -qi 'CPU implementer[[:space:]]*:[[:space:]]*0x43' "$procfs/cpuinfo"; then
cpu_vendor='CAVIUM'
fi fi
cpu_family=$( grep '^cpu family' "$procfs/cpuinfo" | awk '{print $4}' | grep -E '^[0-9]+$' | head -1) cpu_family=$( grep '^cpu family' "$procfs/cpuinfo" | awk '{print $4}' | grep -E '^[0-9]+$' | head -1)