Commit 3db597fe authored by Tom Lendacky's avatar Tom Lendacky Committed by Greg Kroah-Hartman

x86/microcode/AMD: Add support for fam17h microcode loading

commit f4e9b7af upstream.

The size for the Microcode Patch Block (MPB) for an AMD family 17h
processor is 3200 bytes.  Add a #define for fam17h so that it does
not default to 2048 bytes and fail a microcode load/update.
Signed-off-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Reviewed-by: default avatarBorislav Petkov <bp@alien8.de>
Link: https://lkml.kernel.org/r/20171130224640.15391.40247.stgit@tlendack-t1.amdoffice.netSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
Cc: Alice Ferrazzi <alicef@gentoo.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0a99730a
...@@ -580,6 +580,7 @@ static unsigned int verify_patch_size(u8 family, u32 patch_size, ...@@ -580,6 +580,7 @@ static unsigned int verify_patch_size(u8 family, u32 patch_size,
#define F14H_MPB_MAX_SIZE 1824 #define F14H_MPB_MAX_SIZE 1824
#define F15H_MPB_MAX_SIZE 4096 #define F15H_MPB_MAX_SIZE 4096
#define F16H_MPB_MAX_SIZE 3458 #define F16H_MPB_MAX_SIZE 3458
#define F17H_MPB_MAX_SIZE 3200
switch (family) { switch (family) {
case 0x14: case 0x14:
...@@ -591,6 +592,9 @@ static unsigned int verify_patch_size(u8 family, u32 patch_size, ...@@ -591,6 +592,9 @@ static unsigned int verify_patch_size(u8 family, u32 patch_size,
case 0x16: case 0x16:
max_size = F16H_MPB_MAX_SIZE; max_size = F16H_MPB_MAX_SIZE;
break; break;
case 0x17:
max_size = F17H_MPB_MAX_SIZE;
break;
default: default:
max_size = F1XH_MPB_MAX_SIZE; max_size = F1XH_MPB_MAX_SIZE;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment