diff options
author | Martin Roth <gaumless@gmail.com> | 2015-01-11 14:11:55 -0700 |
---|---|---|
committer | Martin Roth <gaumless@gmail.com> | 2015-01-29 04:33:53 +0100 |
commit | 5fc32bf5e6d26646f0e646cc70ccf48b7417ec43 (patch) | |
tree | dc1d7cc53d17d676a05a3750a4f2aa70ca61f5cb /src/drivers/intel/fsp/fsp_util.c | |
parent | 80572851195243640f7531dd7f064e8b3f62a40d (diff) |
drivers/intel/fsp: Add find_saved_temp_mem()
Add a function to retrieve the location of the CAR temporary memory
that was saved by the FSP into the HOB structure.
Change-Id: I2635de5207cd699740721d333a7706425b837651
Signed-off-by: Martin Roth <gaumless@gmail.com>
Reviewed-on: http://review.coreboot.org/8194
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/drivers/intel/fsp/fsp_util.c')
-rw-r--r-- | src/drivers/intel/fsp/fsp_util.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/drivers/intel/fsp/fsp_util.c b/src/drivers/intel/fsp/fsp_util.c index d0ed9cfd6a..0844b37bb7 100644 --- a/src/drivers/intel/fsp/fsp_util.c +++ b/src/drivers/intel/fsp/fsp_util.c @@ -177,6 +177,24 @@ volatile u8 * find_fsp () return (fsp_ptr); } +/** finds the saved temporary memory information in the FSP HOB list + * + * @param hob_list_ptr pointer to the start of the hob list + * @return pointer to saved CAR MEM or NULL if not found. + */ +void * find_saved_temp_mem(void *hob_list_ptr) +{ + EFI_GUID temp_hob_guid = FSP_BOOTLOADER_TEMPORARY_MEMORY_HOB_GUID; + EFI_HOB_GUID_TYPE *saved_mem_hob = + (EFI_HOB_GUID_TYPE *) find_hob_by_guid( + hob_list_ptr, &temp_hob_guid); + + if (saved_mem_hob == NULL) + return NULL; + + return (void *) ((char *) saved_mem_hob + sizeof(EFI_HOB_GUID_TYPE)); +} + #ifndef __PRE_RAM__ /* Only parse HOB data in ramstage */ void print_fsp_info(void) { |