drivers/intel/fsp2_0: signal that FSP components are loaded

In order for the platform code to handle situations where
special actions are required after a piece of code is loaded
use arch_segment_loaded() to signal to the platform code
that the component is fully loaded into memory.

Change-Id: I119cfc9913f15eb4968fe5bf6a56589e2c53f2d1
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/14211
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Andrey Petrov <andrey.petrov@intel.com>
diff --git a/src/drivers/intel/fsp2_0/util.c b/src/drivers/intel/fsp2_0/util.c
index a234a7c..c4fe8dc 100644
--- a/src/drivers/intel/fsp2_0/util.c
+++ b/src/drivers/intel/fsp2_0/util.c
@@ -17,6 +17,7 @@
 #include <fsp/util.h>
 #include <lib.h>
 #include <memrange.h>
+#include <program_loading.h>
 #include <string.h>
 
 static bool looks_like_fsp_header(const uint8_t *raw_hdr)
@@ -130,5 +131,8 @@
 	if (rdev_readat(&file_data, (void *)hdr->image_base, 0, hdr->image_size) < 0)
 		return CB_ERR;
 
+	/* Signal that FSP component has been loaded. */
+	arch_segment_loaded(hdr->image_base, hdr->image_size, SEG_FINAL);
+
 	return CB_SUCCESS;
 }