public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] x86/microcode/AMD: Add a patch revision number union
@ 2024-03-21 12:05 Borislav Petkov
  2024-03-21 12:05 ` [PATCH 2/2] x86/CPU/AMD: Improve the erratum 1386 workaround Borislav Petkov
  2024-03-21 19:24 ` [PATCH 1/2] x86/microcode/AMD: Add a patch revision number union Ingo Molnar
  0 siblings, 2 replies; 9+ messages in thread
From: Borislav Petkov @ 2024-03-21 12:05 UTC (permalink / raw)
  To: X86 ML; +Cc: LKML, John Allen

From: "Borislav Petkov (AMD)" <bp@alien8.de>

Add a structure which will be used to split the Zen generation of
microcode revision numbers into its corresponding elements. This will be
used to match microcode patches a lot easier and obviate the need for
a equivalence table.

Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Cc: John Allen <john.allen@amd.com>
---
 arch/x86/include/asm/microcode.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/x86/include/asm/microcode.h b/arch/x86/include/asm/microcode.h
index 695e569159c1..c1de0a6aefbc 100644
--- a/arch/x86/include/asm/microcode.h
+++ b/arch/x86/include/asm/microcode.h
@@ -47,6 +47,18 @@ struct microcode_intel {
 	unsigned int			bits[];
 };
 
+union zen_patch_rev {
+	struct {
+		__u32 rev	: 8,
+		      stepping	: 4,
+		      model	: 4,
+		      __resv    : 4,
+		      ext_model	: 4,
+		      ext_fam	: 8;
+	};
+	__u32 ucode_rev;
+};
+
 #define DEFAULT_UCODE_DATASIZE		(2000)
 #define MC_HEADER_SIZE			(sizeof(struct microcode_header_intel))
 #define MC_HEADER_TYPE_MICROCODE	1
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-03-25 13:23 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-21 12:05 [PATCH 1/2] x86/microcode/AMD: Add a patch revision number union Borislav Petkov
2024-03-21 12:05 ` [PATCH 2/2] x86/CPU/AMD: Improve the erratum 1386 workaround Borislav Petkov
2024-03-21 15:21   ` Maciej S. Szmigiero
2024-03-24 20:05     ` [PATCH -v2] " Borislav Petkov
2024-03-25 12:45       ` Maciej S. Szmigiero
2024-03-25 13:01         ` Borislav Petkov
2024-03-25 13:23       ` [tip: x86/cpu] " tip-bot2 for Borislav Petkov (AMD)
2024-03-21 19:26   ` [PATCH 2/2] " Ingo Molnar
2024-03-21 19:24 ` [PATCH 1/2] x86/microcode/AMD: Add a patch revision number union Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox