summaryrefslogtreecommitdiff
path: root/src/drivers/intel/fsp2_0
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@google.com>2020-06-05 19:17:00 -0700
committerPatrick Georgi <pgeorgi@google.com>2020-06-10 18:45:47 +0000
commitdbce8ba05afa6febbcb5932a03e97e1d4cd982d9 (patch)
tree7fe69c8cc392eb733b77ca5f7acf24662da7f500 /src/drivers/intel/fsp2_0
parent46399b5f8d776202239f609278f20b13b026d88e (diff)
drivers/intel/fsp2_0: Allow SoC/mainboard to update NvsBufferPtr
This change moves the check for NvsBufferPtr in S3 resume case to happen just before FSP-M is called. This allows SoC/mainboard code to set NvsBufferPtr if it doesn't use the default MRC cache driver. BUG=b:155990176 Change-Id: Ia272573ad7117a0cb851f0bfe6a4c7989bc64cde Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/42109 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Raul Rangel <rrangel@chromium.org>
Diffstat (limited to 'src/drivers/intel/fsp2_0')
-rw-r--r--src/drivers/intel/fsp2_0/memory_init.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/drivers/intel/fsp2_0/memory_init.c b/src/drivers/intel/fsp2_0/memory_init.c
index d90b181e78..7f5d389592 100644
--- a/src/drivers/intel/fsp2_0/memory_init.c
+++ b/src/drivers/intel/fsp2_0/memory_init.c
@@ -196,15 +196,6 @@ static enum cb_err fsp_fill_common_arch_params(FSPM_ARCH_UPD *arch_upd,
/* Configure bootmode */
if (s3wake) {
- /*
- * For S3 resume case, if valid mrc cache data is not found or
- * RECOVERY_MRC_CACHE hash verification fails, the S3 data
- * pointer would be null and S3 resume fails with fsp-m
- * returning error. Invoking a reset here saves time.
- */
- if (!arch_upd->NvsBufferPtr)
- /* FIXME: A "system" reset is likely enough: */
- full_reset();
arch_upd->BootMode = FSP_BOOT_ON_S3_RESUME;
} else {
if (arch_upd->NvsBufferPtr)
@@ -296,6 +287,16 @@ static void do_fsp_memory_init(const struct fspm_context *context, bool s3wake)
/* Give SoC and mainboard a chance to update the UPD */
platform_fsp_memory_init_params_cb(&fspm_upd, fsp_version);
+ /*
+ * For S3 resume case, if valid mrc cache data is not found or
+ * RECOVERY_MRC_CACHE hash verification fails, the S3 data
+ * pointer would be null and S3 resume fails with fsp-m
+ * returning error. Invoking a reset here saves time.
+ */
+ if (s3wake && !arch_upd->NvsBufferPtr)
+ /* FIXME: A "system" reset is likely enough: */
+ full_reset();
+
if (CONFIG(MMA))
setup_mma(&fspm_upd.FspmConfig);