]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Simplify microcode lookup for for AMD CPUs 314/head
authorDaniel Molkentin <dmolkentin@suse.com>
Thu, 14 Dec 2017 11:24:53 +0000 (12:24 +0100)
committerDaniel Molkentin <dmolkentin@suse.com>
Thu, 14 Dec 2017 11:25:50 +0000 (12:25 +0100)
Suggested by Tom Lendacky <thomas.lendacky@amd.com>

dracut-functions.sh

index 642dcf0955318dcf863bcd254d5ca5fa36e34d98..e99c4533eb773f99311f1583087e63de3bf09377 100755 (executable)
@@ -662,13 +662,8 @@ get_ucode_file ()
     local stepping=`grep -E "stepping" /proc/cpuinfo | head -1 | sed s/.*:\ //`
 
     if [[ "$(get_cpu_vendor)" == "AMD" ]]; then
-        # If family greater than or equal to 0x17
-        if [[ $family -ge 23 ]]; then
-            printf "microcode_amd_fam17h.bin"
-        elif [[ $family -eq 22 ]]; then
-            printf "microcode_amd_fam16h.bin"
-        elif [[ $family -eq 21 ]]; then
-            printf "microcode_amd_fam15h.bin"
+        if [[ $family -ge 21 ]]; then
+            printf "microcode_amd_fam%xh.bin" $family
         else
             printf "microcode_amd.bin"
         fi