drivers/intel/fsp2_0: move die() calls to the functions
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 <foss@mniewoehner.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/36314 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Michael Niewöhner Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
parent
40f893e9f3
commit
bc1dbb3cc3
|
@ -189,9 +189,10 @@ int fsp_find_range_hob(struct range_entry *re, const uint8_t guid[16])
|
|||
return 0;
|
||||
}
|
||||
|
||||
int fsp_find_reserved_memory(struct range_entry *re)
|
||||
void fsp_find_reserved_memory(struct range_entry *re)
|
||||
{
|
||||
return fsp_find_range_hob(re, fsp_reserved_memory_guid);
|
||||
if (fsp_find_range_hob(re, fsp_reserved_memory_guid))
|
||||
die("9.1: FSP_RESERVED_MEMORY_RESOURCE_HOB missing!\n");
|
||||
}
|
||||
|
||||
const void *fsp_find_extension_hob_by_guid(const uint8_t *guid, size_t *size)
|
||||
|
|
|
@ -16,9 +16,10 @@
|
|||
#include <console/console.h>
|
||||
#include <fsp/util.h>
|
||||
|
||||
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",
|
||||
|
|
|
@ -59,7 +59,6 @@ void fsp_print_resource_descriptor(const void *base);
|
|||
const char *fsp_get_hob_type_name(const struct hob_header *hob);
|
||||
const char *fsp_get_guid_name(const uint8_t *guid);
|
||||
void fsp_print_guid_extension_hob(const struct hob_header *hob);
|
||||
int fsp_find_bootloader_tolum(struct range_entry *re);
|
||||
|
||||
/*
|
||||
* Writes number_of_bytes data bytes from buffer to the console.
|
||||
|
|
|
@ -79,11 +79,13 @@ const void *fsp_find_nv_storage_data(size_t *size);
|
|||
enum cb_err fsp_fill_lb_framebuffer(struct lb_framebuffer *framebuffer);
|
||||
int fsp_find_range_hob(struct range_entry *re, const uint8_t guid[16]);
|
||||
void fsp_display_fvi_version_hob(void);
|
||||
int fsp_find_reserved_memory(struct range_entry *re);
|
||||
void fsp_find_reserved_memory(struct range_entry *re);
|
||||
const struct hob_resource *fsp_hob_header_to_resource(
|
||||
const struct hob_header *hob);
|
||||
const struct hob_header *fsp_next_hob(const struct hob_header *parent);
|
||||
bool fsp_guid_compare(const uint8_t guid1[16], const uint8_t guid2[16]);
|
||||
void fsp_find_bootloader_tolum(struct range_entry *re);
|
||||
|
||||
|
||||
/* Fill in header and validate sanity of component within region device. */
|
||||
enum cb_err fsp_validate_component(struct fsp_header *hdr,
|
||||
|
|
|
@ -74,8 +74,7 @@ static void do_fsp_post_memory_init(bool s3wake, uint32_t fsp_version)
|
|||
{
|
||||
struct range_entry fsp_mem;
|
||||
|
||||
if (fsp_find_reserved_memory(&fsp_mem))
|
||||
die("Failed to find FSP_RESERVED_MEMORY_RESOURCE_HOB!\n");
|
||||
fsp_find_reserved_memory(&fsp_mem);
|
||||
|
||||
/* initialize cbmem by adding FSP reserved memory first thing */
|
||||
if (!s3wake) {
|
||||
|
|
Loading…
Reference in New Issue