From 79274e01a3722a559f46c3ae284e7057b54cbecb Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Mon, 19 Jun 2023 11:32:19 +0000 Subject: driver/intel/fsp2_0: Add support to store MRC cache using MRC version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch uses the "generic" variable name as "version" while storing the MRC cache data instead referring to the FSP-M version or MRC version. Hence, updated all the instances of `fsp_version/fspm_version` with `version`. Also introduces the new option to the MRC cache version that allows SoC users to store the MRC cache version based on the supported EDK2 version. Intel FSP built with EDK2 version 202302 onwards has support to retrieve the MRC version by directly parsing the binary. Additionally, added the helper function `fsp_mrc_version()` and correspondingĀ header file to read the MRC version from the FSP binary. BUG=b:261689642 TEST=Able to build and boot google/rex and google/omnigul. Signed-off-by: Subrata Banik Change-Id: Ia8af53aed674ad4a3b426264706264df91d9c6b0 Reviewed-on: https://review.coreboot.org/c/coreboot/+/75920 Reviewed-by: Tarun Tuli Tested-by: build bot (Jenkins) Reviewed-by: Ronak Kanabar Reviewed-by: Nico Huber Reviewed-by: Kapil Porwal --- src/drivers/mrc_cache/Kconfig | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/drivers/mrc_cache') diff --git a/src/drivers/mrc_cache/Kconfig b/src/drivers/mrc_cache/Kconfig index 616e5f5e09..403c501964 100644 --- a/src/drivers/mrc_cache/Kconfig +++ b/src/drivers/mrc_cache/Kconfig @@ -52,4 +52,16 @@ config MRC_SAVE_HASH_IN_TPM Store a hash of the MRC_CACHE training data in a TPM NVRAM space to ensure that it cannot be tampered with. +config MRC_CACHE_USING_MRC_VERSION + bool + default y if UDK_VERSION >= UDK_202302_VERSION + default n + help + Use the MRC version info from FSP extended header to store the MRC cache data. + This method relies on the FSP_PRODUCER_DATA_TABLES belongs to the + `FspProducerDataHeader.h`file to get the MRC version. + + Intel FSP built with EDK2 version 202302 onwards has support to retrieve the + MRC version by directly parsing the binary. + endif # CACHE_MRC_SETTINGS -- cgit v1.2.3