From f31ab7a4976760b63e1ca01fa9490893a0a712bc Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Mon, 19 Jun 2023 12:07:29 +0000 Subject: {commonlib/drivers}: Have option to store MRC version inside CBMEM This patch introduces CBMEM ID to store the MRC version (similar to existing implementation that stores the FSP-M version inside CBMEM ID) inside cbmem so the version information is available across the different coreboot stages. For example: * romstage: Use the CBMEM ID version information to check if the MRC cache is valid and need to erase the MRC cache * ramstage: Use the CBMEM ID to store the MRC cache into the non-volatile space. BUG=b:261689642 TEST=Able to build and boot google/rex and dump the MRC version as below. cbmem --list CBMEM table of contents: NAME ID START LENGTH ... 21. MRC VERSION 5f43524d 75ffeb60 00000004 ... localhost ~ # cbmem -r 5f43524d | hexdump 00000000 01 12 07 00 Signed-off-by: Subrata Banik Change-Id: I91f735239b33c6f8ba41c076048903e4b213c6a2 Reviewed-on: https://review.coreboot.org/c/coreboot/+/75921 Reviewed-by: Ronak Kanabar Reviewed-by: Tarun Tuli Reviewed-by: Kapil Porwal Tested-by: build bot (Jenkins) --- src/commonlib/bsd/include/commonlib/bsd/cbmem_id.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/commonlib/bsd') diff --git a/src/commonlib/bsd/include/commonlib/bsd/cbmem_id.h b/src/commonlib/bsd/include/commonlib/bsd/cbmem_id.h index 5080812da4..8e6e6cdc2f 100644 --- a/src/commonlib/bsd/include/commonlib/bsd/cbmem_id.h +++ b/src/commonlib/bsd/include/commonlib/bsd/cbmem_id.h @@ -27,6 +27,7 @@ #define CBMEM_ID_FSP_RESERVED_MEMORY 0x46535052 #define CBMEM_ID_FSP_RUNTIME 0x52505346 #define CBMEM_ID_FSPM_VERSION 0x56505346 +#define CBMEM_ID_MRC_VERSION 0x5f43524d #define CBMEM_ID_GDT 0x4c474454 #define CBMEM_ID_HOB_POINTER 0x484f4221 #define CBMEM_ID_IGD_OPREGION 0x4f444749 @@ -112,6 +113,7 @@ { CBMEM_ID_FSP_RESERVED_MEMORY, "FSP MEMORY " }, \ { CBMEM_ID_FSP_RUNTIME, "FSP RUNTIME" }, \ { CBMEM_ID_FSPM_VERSION, "FSPM VERSION" }, \ + { CBMEM_ID_MRC_VERSION, "MRC VERSION" }, \ { CBMEM_ID_GDT, "GDT " }, \ { CBMEM_ID_HOB_POINTER, "HOB " }, \ { CBMEM_ID_IGD_OPREGION, "IGD OPREGION" }, \ -- cgit v1.2.3