Blame SOURCES/0523-Support-Microcode-Updates-for-AMD-CPU-Family-0x17.patch

18971c
From f93c34935fcf5cc70118766b3ae0150d44a5185c Mon Sep 17 00:00:00 2001
18971c
From: Daniel Molkentin <dmolkentin@suse.com>
18971c
Date: Tue, 12 Dec 2017 17:48:36 +0100
18971c
Subject: [PATCH] Support Microcode Updates for AMD CPU Family 0x17
18971c
18971c
Original-Patch-By: Tom Lendacky <thomas.lendacky@amd.com>
18971c
18971c
Cherry-picked from: 215fe583240ae886c2096d502a96e44798b84163
18971c
Resolves: #1476039
18971c
---
18971c
 dracut-functions.sh | 6 +++++-
18971c
 1 file changed, 5 insertions(+), 1 deletion(-)
18971c
18971c
diff --git a/dracut-functions.sh b/dracut-functions.sh
18971c
index 4051596b..ef52274f 100755
18971c
--- a/dracut-functions.sh
18971c
+++ b/dracut-functions.sh
18971c
@@ -1739,7 +1739,11 @@ get_ucode_file ()
18971c
 
18971c
     if [[ "$(get_cpu_vendor)" == "AMD" ]]; then
18971c
         # If family greater or equal than 0x15
18971c
-        if [[ $family -ge 21 ]]; then
18971c
+        if [[ $family -ge 23 ]]; then
18971c
+            printf "microcode_amd_fam17h.bin"
18971c
+        elif [[ $family -eq 22 ]]; then
18971c
+            printf "microcode_amd_fam16h.bin"
18971c
+        elif [[ $family -eq 21 ]]; then
18971c
             printf "microcode_amd_fam15h.bin"
18971c
         else
18971c
             printf "microcode_amd.bin"