File 0545-Add-early-microcode-support-for-AMD-family-16h.patch of Package dracut.13287

From 8bbdf5f5300fcb234a36fc83b8218b0f5be21b31 Mon Sep 17 00:00:00 2001
From: jonathan-teh <30538043+jonathan-teh@users.noreply.github.com>
Date: Sat, 29 Jul 2017 00:19:19 +0100
Subject: [PATCH 1/2] Add early microcode support for AMD family 16h

---
 dracut-functions.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/dracut-functions.sh b/dracut-functions.sh
index ebe05a21..93a56f03 100755
--- a/dracut-functions.sh
+++ b/dracut-functions.sh
@@ -656,8 +656,10 @@ get_ucode_file ()
     local stepping=`grep -E "stepping" /proc/cpuinfo | head -1 | sed s/.*:\ //`
 
     if [[ "$(get_cpu_vendor)" == "AMD" ]]; then
-        # If family greater or equal than 0x15
-        if [[ $family -ge 21 ]]; then
+        # If family greater than or equal to 0x16
+        if [[ $family -ge 22 ]]; then
+            printf "microcode_amd_fam16h.bin"
+        elif [[ $family -eq 21 ]]; then
             printf "microcode_amd_fam15h.bin"
         else
             printf "microcode_amd.bin"
-- 
2.13.6

openSUSE Build Service is sponsored by