From a413e5e455136e6511fd9e5541ff4709d279f7a4 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Sun, 17 Jul 2016 23:06:03 -0500 Subject: drivers/intel/fsp2_0: separate component validation from loading The current FSP component loading mechanism doesn't handle all the requirements actually needed. Two things need to be added: 1. XIP support for MemoryInit component 2. Relocating SiliconInit component to not corrupt OS memory. In order to accommodate those requirements the validation and header initialization needs to be a separate function. Therefore, provide fsp_validate_component() to help achieve those requirements. BUG=chrome-os-partner:52679 Change-Id: I53525498b250033f3187c05db248e07b00cc934d Signed-off-by: Aaron Durbin Reviewed-on: https://review.coreboot.org/15740 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh --- src/drivers/intel/fsp2_0/include/fsp/util.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/drivers/intel/fsp2_0/include') diff --git a/src/drivers/intel/fsp2_0/include/fsp/util.h b/src/drivers/intel/fsp2_0/include/fsp/util.h index d546c11fac..0f4d33c427 100644 --- a/src/drivers/intel/fsp2_0/include/fsp/util.h +++ b/src/drivers/intel/fsp2_0/include/fsp/util.h @@ -14,6 +14,7 @@ #define _FSP2_0_UTIL_H_ #include +#include #include #include #include @@ -34,6 +35,10 @@ enum cb_err fsp_fill_lb_framebuffer(struct lb_framebuffer *framebuffer); void fsp_find_reserved_memory(struct range_entry *re, const void *hob_list); void fsp_print_memory_resource_hobs(const void *hob_list); +/* Fill in header and validate sanity of component within region device. */ +enum cb_err fsp_validate_component(struct fsp_header *hdr, + const struct region_device *rdev); + /* Load an FSP binary into CBFS, and fill the associated fsp_header struct */ enum cb_err fsp_load_binary(struct fsp_header *hdr, const char *name, struct range_entry *r); -- cgit v1.2.3