From bc1dbb3cc3f5b19765213acfb2f7ef8c0a473e5f Mon Sep 17 00:00:00 2001 From: Michael Niewöhner Date: Thu, 24 Oct 2019 22:58:25 +0200 Subject: drivers/intel/fsp2_0: move die() calls to the functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since there are no calls where we wouldn't die(), move die() calls into the fsp_find_* functions. Change-Id: I750a225999688137421bbc560d9d1f5fdf68fd01 Signed-off-by: Michael Niewöhner Reviewed-on: https://review.coreboot.org/c/coreboot/+/36314 Tested-by: build bot (Jenkins) Reviewed-by: Michael Niewöhner Reviewed-by: Aaron Durbin Reviewed-by: Nico Huber --- src/drivers/intel/fsp2_0/hob_verify.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'src/drivers/intel/fsp2_0/hob_verify.c') diff --git a/src/drivers/intel/fsp2_0/hob_verify.c b/src/drivers/intel/fsp2_0/hob_verify.c index edf39412ca..e2937d7f7a 100644 --- a/src/drivers/intel/fsp2_0/hob_verify.c +++ b/src/drivers/intel/fsp2_0/hob_verify.c @@ -16,9 +16,10 @@ #include #include -int fsp_find_bootloader_tolum(struct range_entry *re) +void fsp_find_bootloader_tolum(struct range_entry *re) { - return fsp_find_range_hob(re, fsp_bootloader_tolum_guid); + if (fsp_find_range_hob(re, fsp_bootloader_tolum_guid)) + die("9.3: FSP_BOOTLOADER_TOLUM_HOB missing!\n"); } void fsp_verify_memory_init_hobs(void) @@ -26,9 +27,8 @@ void fsp_verify_memory_init_hobs(void) struct range_entry fsp_mem; struct range_entry tolum; - /* Lookup the FSP_BOOTLOADER_TOLUM_HOB */ - if (fsp_find_bootloader_tolum(&tolum)) - die("9.3: FSP_BOOTLOADER_TOLUM_HOB missing!\n"); + /* Verify the size of the TOLUM range */ + fsp_find_bootloader_tolum(&tolum); if (range_entry_size(&tolum) < cbmem_overhead_size()) { printk(BIOS_CRIT, "FSP_BOOTLOADER_TOLUM_SIZE: 0x%08llx < 0x%08zx\n", @@ -36,11 +36,8 @@ void fsp_verify_memory_init_hobs(void) die("FSP_BOOTLOADER_TOLUM_HOB too small!\n"); } - /* Locate the FSP reserved memory area */ - if (fsp_find_reserved_memory(&fsp_mem)) - die("9.1: FSP_RESERVED_MEMORY_RESOURCE_HOB missing!\n"); - /* Verify the bootloader tolum is above the FSP reserved area */ + fsp_find_reserved_memory(&fsp_mem); if (range_entry_end(&tolum) <= range_entry_base(&fsp_mem)) { printk(BIOS_CRIT, "TOLUM end: 0x%08llx != 0x%08llx: FSP rsvd base\n", -- cgit v1.2.3