Patrick Georgi merged this change.

View Change

Approvals: build bot (Jenkins): Verified Furquan Shaikh: Looks good to me, approved Subrata Banik: Looks good to me, approved
drivers/intel/fsp2_0: Fix fsp post-init validation

Part of this checks whether tolum_base and cbmem_top are the same - however,
cbmem_top hasn't been initialised at the point where this call occurs.
Change the ordering to fix that.

Signed-off-by: Matthew Garrett <mjg59@google.com>
Change-Id: Ib89e0513bdc35c3751a9d4c2a2789a2836046789
Reviewed-on: https://review.coreboot.org/c/coreboot/+/32530
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
---
M src/drivers/intel/fsp2_0/memory_init.c
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/drivers/intel/fsp2_0/memory_init.c b/src/drivers/intel/fsp2_0/memory_init.c
index 985ee3a..b3afb98 100644
--- a/src/drivers/intel/fsp2_0/memory_init.c
+++ b/src/drivers/intel/fsp2_0/memory_init.c
@@ -310,8 +310,6 @@
post_code(POST_FSP_MEMORY_EXIT);
timestamp_add_now(TS_FSP_MEMORY_INIT_END);

- fsp_debug_after_memory_init(status);
-
/* Handle any errors returned by FspMemoryInit */
fsp_handle_reset(status);
if (status != FSP_SUCCESS) {
@@ -320,6 +318,13 @@
}

do_fsp_post_memory_init(s3wake, fsp_version);
+
+ /*
+ * fsp_debug_after_memory_init() checks whether the end of the tolum
+ * region is the same as the top of cbmem, so must be called here
+ * after cbmem has been initialised in do_fsp_post_memory_init().
+ */
+ fsp_debug_after_memory_init(status);
}

/* Load the binary into the memory specified by the info header. */

To view, visit change 32530. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ib89e0513bdc35c3751a9d4c2a2789a2836046789
Gerrit-Change-Number: 32530
Gerrit-PatchSet: 9
Gerrit-Owner: Matthew Garrett <mjg59@google.com>
Gerrit-Reviewer: Furquan Shaikh <furquan@google.com>
Gerrit-Reviewer: Matthew Garrett <mjg59@google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com>
Gerrit-Reviewer: Patrick Rudolph <siro@das-labor.org>
Gerrit-Reviewer: Rizwan Qureshi <rizwan.qureshi@intel.com>
Gerrit-Reviewer: Subrata Banik <subrata.banik@intel.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Balaji Manigandan <balaji.manigandan@intel.com>
Gerrit-CC: Naresh Solanki <naresh.solanki@intel.com>
Gerrit-CC: Nathaniel L Desimone <nathaniel.l.desimone@intel.com>
Gerrit-CC: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-CC: Pratikkumar V Prajapati <pratikkumar.v.prajapati@intel.com>
Gerrit-MessageType: merged