Skip to contentSkip to conversation

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

PATCH In review Tom Lendacky 4 participants 5 messages Nov 30, 2017 – Dec 10, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

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.

---
 arch/x86/kernel/cpu/microcode/amd.c |    4 ++++
 1 file changed, 4 insertions(+)
arch/x86/kernel/cpu/microcode/amd.c +4 -0
index c6daec4..330b846 100644
@@ -470,6 +470,7 @@ static unsigned int verify_patch_size(u8 family, u32 patch_size,
 #define F14H_MPB_MAX_SIZE 1824
 #define F15H_MPB_MAX_SIZE 4096
 #define F16H_MPB_MAX_SIZE 3458
+#define F17H_MPB_MAX_SIZE 3200
 
 	switch (family) {
 	case 0x14:
@@ -481,6 +482,9 @@ static unsigned int verify_patch_size(u8 family, u32 patch_size,
 	case 0x16:
 		max_size = F16H_MPB_MAX_SIZE;
 		break;
+	case 0x17:
+		max_size = F17H_MPB_MAX_SIZE;
+		break;
 	default:
 		max_size = F1XH_MPB_MAX_SIZE;
 		break;
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 23 lines · Tom Lendacky

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.

---
 arch/x86/kernel/cpu/microcode/amd.c |    4 ++++
 1 file changed, 4 insertions(+)
arch/x86/kernel/cpu/microcode/amd.c +1 -0
index c6daec4..330b846 100644
@@ -470,6 +470,7 @@ static unsigned int verify_patch_size(u8 family, u32 patch_size,
 #define F14H_MPB_MAX_SIZE 1824
 #define F15H_MPB_MAX_SIZE 4096
 #define F16H_MPB_MAX_SIZE 3458
+#define F17H_MPB_MAX_SIZE 3200
 
 	switch (family) {
 	case 0x14:

arch/x86/kernel/cpu/microcode/amd.c static unsigned int verify_patch_size(u8 family, u32 patch_size, · line 490

Quoted 9 lines
arch/x86/kernel/cpu/microcode/amd.c +3 -0
@@ -481,6 +482,9 @@ static unsigned int verify_patch_size(u8 family, u32 patch_size,
 	case 0x16:
 		max_size = F16H_MPB_MAX_SIZE;
 		break;
+	case 0x17:
+		max_size = F17H_MPB_MAX_SIZE;
+		break;
 	default:
 		max_size = F1XH_MPB_MAX_SIZE;
 		break;
Signature · 4 lines
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.
#2 lore raw
In reply to Tom Lendacky
x86/microcode/AMD: Add support for fam17h microcode loading
Commit-ID:  866a79a1c98c5004a410122b06f808152f2fe53c
Gitweb:     https://git.kernel.org/tip/866a79a1c98c5004a410122b06f808152f2fe53c
Author:     Tom Lendacky <[email protected]>
AuthorDate: Thu, 30 Nov 2017 16:46:40 -0600
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Mon, 4 Dec 2017 23:03:29 +0100

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

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.

---
 arch/x86/kernel/cpu/microcode/amd.c | 4 ++++
 1 file changed, 4 insertions(+)
arch/x86/kernel/cpu/microcode/amd.c +4 -0
index c6daec4..330b846 100644
@@ -470,6 +470,7 @@ static unsigned int verify_patch_size(u8 family, u32 patch_size,
 #define F14H_MPB_MAX_SIZE 1824
 #define F15H_MPB_MAX_SIZE 4096
 #define F16H_MPB_MAX_SIZE 3458
+#define F17H_MPB_MAX_SIZE 3200
 
 	switch (family) {
 	case 0x14:
@@ -481,6 +482,9 @@ static unsigned int verify_patch_size(u8 family, u32 patch_size,
 	case 0x16:
 		max_size = F16H_MPB_MAX_SIZE;
 		break;
+	case 0x17:
+		max_size = F17H_MPB_MAX_SIZE;
+		break;
 	default:
 		max_size = F1XH_MPB_MAX_SIZE;
 		break;
#3 lore raw
In reply to Tom Lendacky
x86/microcode/AMD: Add support for fam17h microcode loading
Commit-ID:  f4e9b7af0cd58dd039a0fb2cd67d57cea4889abf
Gitweb:     https://git.kernel.org/tip/f4e9b7af0cd58dd039a0fb2cd67d57cea4889abf
Author:     Tom Lendacky <[email protected]>
AuthorDate: Thu, 30 Nov 2017 16:46:40 -0600
Committer:  Ingo Molnar <[email protected]>
CommitDate: Wed, 6 Dec 2017 12:27:24 +0100

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

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.

---
 arch/x86/kernel/cpu/microcode/amd.c | 4 ++++
 1 file changed, 4 insertions(+)
arch/x86/kernel/cpu/microcode/amd.c +4 -0
index c6daec4..330b846 100644
@@ -470,6 +470,7 @@ static unsigned int verify_patch_size(u8 family, u32 patch_size,
 #define F14H_MPB_MAX_SIZE 1824
 #define F15H_MPB_MAX_SIZE 4096
 #define F16H_MPB_MAX_SIZE 3458
+#define F17H_MPB_MAX_SIZE 3200
 
 	switch (family) {
 	case 0x14:
@@ -481,6 +482,9 @@ static unsigned int verify_patch_size(u8 family, u32 patch_size,
 	case 0x16:
 		max_size = F16H_MPB_MAX_SIZE;
 		break;
+	case 0x17:
+		max_size = F17H_MPB_MAX_SIZE;
+		break;
 	default:
 		max_size = F1XH_MPB_MAX_SIZE;
 		break;
Tested-by on v1 1/1
#4 lore raw
In reply to Tom Lendacky
Quoted 6 lines · Tom Lendacky

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.

Signature · 1 line
Computer Architect | Sent from my Fedora powered laptop