platform/x86/intel/ifs: Read IFS firmware image
authorJithu Joseph <jithu.joseph@intel.com>
Fri, 6 May 2022 22:54:03 +0000 (15:54 -0700)
committerHans de Goede <hdegoede@redhat.com>
Thu, 12 May 2022 13:35:29 +0000 (15:35 +0200)
commitfb57fc785ed3b71a3e8188d4914471bd1360bc53
tree82b1e0127ecf65a261cb8aed17af07af08d255f3
parent67896ef13c4db88082a914e96d958044cd3392e8
platform/x86/intel/ifs: Read IFS firmware image

Driver probe routine allocates structure to communicate status
and parameters between functions in the driver. Also call
load_ifs_binary() to load the scan image file.

There is a separate scan image file for each processor family,
model, stepping combination. This is read from the static path:

  /lib/firmware/intel/ifs/{ff-mm-ss}.scan

Step 1 in loading is to generate the correct path and use
request_firmware_direct() to load into memory.

Subsequent patches will use the IFS MSR interfaces to copy
the image to BIOS reserved memory and validate the SHA256
checksums.

Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
Co-developed-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20220506225410.1652287-6-tony.luck@intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/intel/ifs/Makefile
drivers/platform/x86/intel/ifs/core.c
drivers/platform/x86/intel/ifs/ifs.h [new file with mode: 0644]
drivers/platform/x86/intel/ifs/load.c [new file with mode: 0644]