From: Borislav Petkov <bp@alien8.de>
To: X86 ML <x86@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>, John Allen <john.allen@amd.com>
Subject: [PATCH 1/2] x86/microcode/AMD: Add a patch revision number union
Date: Thu, 21 Mar 2024 13:05:47 +0100 [thread overview]
Message-ID: <20240321120548.22687-1-bp@alien8.de> (raw)
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
next reply other threads:[~2024-03-21 12:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-21 12:05 Borislav Petkov [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240321120548.22687-1-bp@alien8.de \
--to=bp@alien8.de \
--cc=john.allen@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.