intel/fsp2_0: Move TS_BEFORE_INITRAM

Exclude FSP-M loading from the timestamps used for
RAM detection and training process.

Change-Id: I859b292f2347c6f0e3e41555ad4fb8d95a139007
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/35371
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
diff --git a/src/drivers/intel/fsp2_0/memory_init.c b/src/drivers/intel/fsp2_0/memory_init.c
index 1386d2c..5765fb7 100644
--- a/src/drivers/intel/fsp2_0/memory_init.c
+++ b/src/drivers/intel/fsp2_0/memory_init.c
@@ -392,8 +392,6 @@
 	struct memranges memmap;
 	struct range_entry freeranges[2];
 
-	timestamp_add_now(TS_BEFORE_INITRAM);
-
 	if (CONFIG(ELOG_BOOT_COUNT) && !s3wake)
 		boot_count_increment();
 
@@ -421,6 +419,8 @@
 	/* Signal that FSP component has been loaded. */
 	prog_segment_loaded(hdr.image_base, hdr.image_size, SEG_FINAL);
 
+	timestamp_add_now(TS_BEFORE_INITRAM);
+
 	do_fsp_memory_init(&hdr, s3wake, &memmap);
 
 	timestamp_add_now(TS_AFTER_INITRAM);