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>
This commit is contained in:
		@@ -17,6 +17,7 @@
 | 
				
			|||||||
#include <fsp/util.h>
 | 
					#include <fsp/util.h>
 | 
				
			||||||
#include <lib.h>
 | 
					#include <lib.h>
 | 
				
			||||||
#include <memrange.h>
 | 
					#include <memrange.h>
 | 
				
			||||||
 | 
					#include <program_loading.h>
 | 
				
			||||||
#include <string.h>
 | 
					#include <string.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static bool looks_like_fsp_header(const uint8_t *raw_hdr)
 | 
					static bool looks_like_fsp_header(const uint8_t *raw_hdr)
 | 
				
			||||||
@@ -130,5 +131,8 @@ enum cb_err fsp_load_binary(struct fsp_header *hdr,
 | 
				
			|||||||
	if (rdev_readat(&file_data, (void *)hdr->image_base, 0, hdr->image_size) < 0)
 | 
						if (rdev_readat(&file_data, (void *)hdr->image_base, 0, hdr->image_size) < 0)
 | 
				
			||||||
		return CB_ERR;
 | 
							return CB_ERR;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* Signal that FSP component has been loaded. */
 | 
				
			||||||
 | 
						arch_segment_loaded(hdr->image_base, hdr->image_size, SEG_FINAL);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return CB_SUCCESS;
 | 
						return CB_SUCCESS;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user