1
0

0244-x86-microcode-AMD-Add-support-for-fam17h-microcode-l.patch 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
  2. From: Tom Lendacky <[email protected]>
  3. Date: Thu, 30 Nov 2017 16:46:40 -0600
  4. Subject: [PATCH] x86/microcode/AMD: Add support for fam17h microcode loading
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. commit f4e9b7af0cd58dd039a0fb2cd67d57cea4889abf upstream.
  9. The size for the Microcode Patch Block (MPB) for an AMD family 17h
  10. processor is 3200 bytes. Add a #define for fam17h so that it does
  11. not default to 2048 bytes and fail a microcode load/update.
  12. Signed-off-by: Tom Lendacky <[email protected]>
  13. Signed-off-by: Thomas Gleixner <[email protected]>
  14. Reviewed-by: Borislav Petkov <[email protected]>
  15. Link: https://lkml.kernel.org/r/[email protected]
  16. Signed-off-by: Ingo Molnar <[email protected]>
  17. Cc: Alice Ferrazzi <[email protected]>
  18. Signed-off-by: Greg Kroah-Hartman <[email protected]>
  19. Signed-off-by: Fabian Grünbichler <[email protected]>
  20. ---
  21. arch/x86/kernel/cpu/microcode/amd.c | 4 ++++
  22. 1 file changed, 4 insertions(+)
  23. diff --git a/arch/x86/kernel/cpu/microcode/amd.c b/arch/x86/kernel/cpu/microcode/amd.c
  24. index 21b185793c80..248cad00fee6 100644
  25. --- a/arch/x86/kernel/cpu/microcode/amd.c
  26. +++ b/arch/x86/kernel/cpu/microcode/amd.c
  27. @@ -467,6 +467,7 @@ static unsigned int verify_patch_size(u8 family, u32 patch_size,
  28. #define F14H_MPB_MAX_SIZE 1824
  29. #define F15H_MPB_MAX_SIZE 4096
  30. #define F16H_MPB_MAX_SIZE 3458
  31. +#define F17H_MPB_MAX_SIZE 3200
  32. switch (family) {
  33. case 0x14:
  34. @@ -478,6 +479,9 @@ static unsigned int verify_patch_size(u8 family, u32 patch_size,
  35. case 0x16:
  36. max_size = F16H_MPB_MAX_SIZE;
  37. break;
  38. + case 0x17:
  39. + max_size = F17H_MPB_MAX_SIZE;
  40. + break;
  41. default:
  42. max_size = F1XH_MPB_MAX_SIZE;
  43. break;
  44. --
  45. 2.14.2