diff options
Diffstat (limited to 'src/drivers/intel/fsp2_0/include/fsp/util.h')
-rw-r--r-- | src/drivers/intel/fsp2_0/include/fsp/util.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/drivers/intel/fsp2_0/include/fsp/util.h b/src/drivers/intel/fsp2_0/include/fsp/util.h index ed2a2ae81d..f531e36bee 100644 --- a/src/drivers/intel/fsp2_0/include/fsp/util.h +++ b/src/drivers/intel/fsp2_0/include/fsp/util.h @@ -9,6 +9,7 @@ #include <fsp/api.h> #include <fsp/info_header.h> #include <memrange.h> +#include <program_loading.h> #include <types.h> struct hob_header { @@ -79,6 +80,21 @@ void fsp_find_bootloader_tolum(struct range_entry *re); enum cb_err fsp_validate_component(struct fsp_header *hdr, const struct region_device *rdev); +struct fsp_load_descriptor { + /* fsp_prog object will have region_device initialized to final + * load location in memory. */ + struct prog fsp_prog; + /* Fill in destination location given final load size. Return 0 on + * success, < 0 on error. */ + int (*get_destination)(const struct fsp_load_descriptor *fspld, + void **dest, size_t final_load_size, + const struct region_device *source); +}; + +/* Load the FSP component described by fsp_load_descriptor from cbfs. The FSP + * header object will be validated and filled in on successful load. */ +enum cb_err fsp_load_component(struct fsp_load_descriptor *fspld, struct fsp_header *hdr); + /* Get igd framebuffer bar from SoC */ uintptr_t fsp_soc_get_igd_bar(void); |