summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSubrata Banik <subratabanik@google.com>2023-02-28 07:01:26 +0000
committerLean Sheng Tan <sheng.tan@9elements.com>2023-03-13 14:13:42 +0000
commitdbfbfaf608c330515c1702bd4eba3b59727bc4df (patch)
treef85bdcdfa7ec3384b8b73b775ee99b9ad3fa09c0
parent725dd39f5b91fc9e51c919f3c80f7ca8000b0f4b (diff)
drivers/intel/fsp2_0: Have provision for caching TOM region
This patch enables early caching of TOM region to optimize the boot time if valid mrc cache is found (i.e. except the first boot after flashing/updating few AP firmware image). TEST=Able to build and boot google/rex to ChromeOS. Signed-off-by: Subrata Banik <subratabanik@google.com> Change-Id: Ia575ad0f99d5b0fd015e40b0862e8560700f6c83 Reviewed-on: https://review.coreboot.org/c/coreboot/+/73334 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Kapil Porwal <kapilporwal@google.com>
-rw-r--r--src/drivers/intel/fsp2_0/memory_init.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/drivers/intel/fsp2_0/memory_init.c b/src/drivers/intel/fsp2_0/memory_init.c
index dcb44f6a18..4f0dbf6148 100644
--- a/src/drivers/intel/fsp2_0/memory_init.c
+++ b/src/drivers/intel/fsp2_0/memory_init.c
@@ -24,6 +24,10 @@
#include <types.h>
#include <vb2_api.h>
+#if CONFIG(SOC_INTEL_COMMON_BASECODE_TOM)
+#include <intelbasecode/tom.h>
+#endif
+
static uint8_t temp_ram[CONFIG_FSP_TEMP_RAM_SIZE] __aligned(sizeof(uint64_t));
static void do_fsp_post_memory_init(bool s3wake, uint32_t fsp_version)
@@ -255,6 +259,12 @@ static void do_fsp_memory_init(const struct fspm_context *context, bool s3wake)
die_with_post_code(POST_INVALID_VENDOR_BINARY,
"FSPM_ARCH_UPD not found!\n");
+ /* Early caching of TOM region if valid mrc cache data is found */
+#if (CONFIG(SOC_INTEL_COMMON_BASECODE_TOM))
+ if (arch_upd->NvsBufferPtr)
+ early_tom_enable_cache_range();
+#endif
+
/* Give SoC and mainboard a chance to update the UPD */
platform_fsp_memory_init_params_cb(&fspm_upd, fsp_version);