summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/intel/fsp2_0/hand_off_block.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/drivers/intel/fsp2_0/hand_off_block.c b/src/drivers/intel/fsp2_0/hand_off_block.c
index 4a8e73a83c..2d7e209ec3 100644
--- a/src/drivers/intel/fsp2_0/hand_off_block.c
+++ b/src/drivers/intel/fsp2_0/hand_off_block.c
@@ -105,10 +105,14 @@ static void *fsp_hob_list_ptr CAR_GLOBAL;
static void save_hob_list(int is_recovery)
{
uint32_t *cbmem_loc;
+ const void *hob_list;
cbmem_loc = cbmem_add(CBMEM_ID_FSP_RUNTIME, sizeof(*cbmem_loc));
if (cbmem_loc == NULL)
die("Error: Could not add cbmem area for hob list.\n");
- *cbmem_loc = (uintptr_t)fsp_get_hob_list();
+ hob_list = fsp_get_hob_list();
+ if (!hob_list)
+ die("Error: Could not locate hob list pointer.\n");
+ *cbmem_loc = (uintptr_t)hob_list;
}
ROMSTAGE_CBMEM_INIT_HOOK(save_hob_list);
@@ -167,6 +171,9 @@ int fsp_find_range_hob(struct range_entry *re, const uint8_t guid[16])
const struct hob_resource *fsp_mem;
const void *hob_list = fsp_get_hob_list();
+ if (!hob_list)
+ return -1;
+
range_entry_init(re, 0, 0, 0);
fsp_mem = find_resource_hob_by_guid(hob_list, guid);