summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/microcode_intel.h
diff options
context:
space:
mode:
authorJithu Joseph <jithu.joseph@intel.com>2022-11-17 14:50:39 -0800
committerBorislav Petkov <bp@suse.de>2022-11-19 11:12:06 +0100
commitaa63e0fda85edf9a8431fc31a2b2d4f3f40592f9 (patch)
tree653a143bac8d23abf683a81e3883e5543ddf48e4 /arch/x86/include/asm/microcode_intel.h
parent8382fee3bb86526bde1bfb1a06834f056140e0dd (diff)
platform/x86/intel/ifs: Use generic microcode headers and functions
Existing implementation (broken) of IFS used a header format (for IFS test images) which was very similar to microcode format, but didn’t accommodate extended signatures. This meant same IFS test image had to be duplicated for different steppings and the validation code in the driver was only looking at the primary header parameters. Going forward, IFS test image headers have been tweaked to become fully compatible with the microcode format. Newer IFS test image headers will use header version 2 in order to distinguish it from microcode images and older IFS test images. In light of the above, reuse struct microcode_header_intel directly in the IFS driver and reuse microcode functions for validation and sanity checking. [ bp: Massage commit message. ] Signed-off-by: Jithu Joseph <jithu.joseph@intel.com> Signed-off-by: Borislav Petkov <bp@suse.de> Reviewed-by: Tony Luck <tony.luck@intel.com> Reviewed-by: Sohil Mehta <sohil.mehta@intel.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20221117225039.30166-1-jithu.joseph@intel.com
Diffstat (limited to 'arch/x86/include/asm/microcode_intel.h')
-rw-r--r--arch/x86/include/asm/microcode_intel.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/include/asm/microcode_intel.h b/arch/x86/include/asm/microcode_intel.h
index 6af1e703cb2e..f1fa979e05bf 100644
--- a/arch/x86/include/asm/microcode_intel.h
+++ b/arch/x86/include/asm/microcode_intel.h
@@ -43,6 +43,7 @@ struct extended_sigtable {
#define EXT_HEADER_SIZE (sizeof(struct extended_sigtable))
#define EXT_SIGNATURE_SIZE (sizeof(struct extended_signature))
#define MC_HEADER_TYPE_MICROCODE 1
+#define MC_HEADER_TYPE_IFS 2
#define get_totalsize(mc) \
(((struct microcode_intel *)mc)->hdr.datasize ? \