drivers/intel/fsp1_1: Rename hob finding functions
The hob finding functions are never looped over so there is no point
for the 'next' inside their name.
Change-Id: I18e452d313612ba14edda479d43f2797f6c84034
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63204
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
diff --git a/src/drivers/intel/fsp1_1/hob.c b/src/drivers/intel/fsp1_1/hob.c
index bba32d1..e7c5fb4 100644
--- a/src/drivers/intel/fsp1_1/hob.c
+++ b/src/drivers/intel/fsp1_1/hob.c
@@ -45,7 +45,7 @@
}
/* Returns the next instance of the matched GUID HOB from the starting HOB. */
-void *get_next_guid_hob(const EFI_GUID *guid, const void *hob_start)
+void *get_guid_hob(const EFI_GUID *guid, const void *hob_start)
{
EFI_PEI_HOB_POINTERS hob;
@@ -62,7 +62,7 @@
/*
* Returns the next instance of the matching resource HOB from the starting HOB.
*/
-void *get_next_resource_hob(const EFI_GUID *guid, const void *hob_start)
+void *get_resource_hob(const EFI_GUID *guid, const void *hob_start)
{
EFI_PEI_HOB_POINTERS hob;
diff --git a/src/drivers/intel/fsp1_1/include/fsp/util.h b/src/drivers/intel/fsp1_1/include/fsp/util.h
index 0c9a1fa..2dec3f0 100644
--- a/src/drivers/intel/fsp1_1/include/fsp/util.h
+++ b/src/drivers/intel/fsp1_1/include/fsp/util.h
@@ -24,7 +24,7 @@
void fsp_notify(u32 phase);
void print_hob_type_structure(u16 hob_type, void *hob_list_ptr);
void print_fsp_info(FSP_INFO_HEADER *fsp_header);
-void *get_next_resource_hob(const EFI_GUID *guid, const void *hob_start);
+void *get_resource_hob(const EFI_GUID *guid, const void *hob_start);
void fsp_display_upd_value(const char *name, uint32_t size, uint64_t old,
uint64_t new);
void report_fsp_output(void);
@@ -77,7 +77,7 @@
#endif
void *get_hob_list(void);
-void *get_next_guid_hob(const EFI_GUID *guid, const void *hob_start);
+void *get_guid_hob(const EFI_GUID *guid, const void *hob_start);
asmlinkage void chipset_teardown_car_main(void);
diff --git a/src/drivers/intel/fsp1_1/raminit.c b/src/drivers/intel/fsp1_1/raminit.c
index 78700a9..7da85d4 100644
--- a/src/drivers/intel/fsp1_1/raminit.c
+++ b/src/drivers/intel/fsp1_1/raminit.c
@@ -120,7 +120,7 @@
/* Locate the FSP reserved memory area */
fsp_reserved_bytes = 0;
- fsp_memory = get_next_resource_hob(&fsp_reserved_guid, hob_list_ptr);
+ fsp_memory = get_resource_hob(&fsp_reserved_guid, hob_list_ptr);
if (fsp_memory == NULL) {
fsp_verification_failure = 1;
printk(BIOS_ERR,
@@ -155,7 +155,7 @@
fsp_set_runtime(fsp_header, hob_list_ptr);
/* Lookup the FSP_BOOTLOADER_TOLUM_HOB */
- cbmem_root = get_next_resource_hob(&bootldr_tolum_guid, hob_list_ptr);
+ cbmem_root = get_resource_hob(&bootldr_tolum_guid, hob_list_ptr);
if (cbmem_root == NULL) {
fsp_verification_failure = 1;
printk(BIOS_ERR, "7.4: FSP_BOOTLOADER_TOLUM_HOB missing!\n");
@@ -164,7 +164,7 @@
}
/* Locate the FSP_SMBIOS_MEMORY_INFO HOB */
- memory_info_hob = get_next_guid_hob(&memory_info_hob_guid,
+ memory_info_hob = get_guid_hob(&memory_info_hob_guid,
hob_list_ptr);
if (memory_info_hob == NULL) {
printk(BIOS_ERR, "FSP_SMBIOS_MEMORY_INFO HOB missing!\n");
@@ -185,7 +185,7 @@
* 7.5: EFI_PEI_GRAPHICS_INFO_HOB produced by SiliconInit
* FSP_SMBIOS_MEMORY_INFO HOB verified above
*/
- hob_ptr.Raw = get_next_guid_hob(&mrc_guid, hob_list_ptr);
+ hob_ptr.Raw = get_guid_hob(&mrc_guid, hob_list_ptr);
if ((hob_ptr.Raw == NULL) && (params->saved_data == NULL)) {
printk(BIOS_ERR, "7.3: FSP_NON_VOLATILE_STORAGE_HOB missing!\n");
fsp_verification_failure = 1;
@@ -236,7 +236,7 @@
"ERROR - coreboot's requirements not met by FSP binary!\n");
/* Locate the memory configuration data to speed up the next reboot */
- mrc_hob = get_next_guid_hob(&mrc_guid, hob_list_ptr);
+ mrc_hob = get_guid_hob(&mrc_guid, hob_list_ptr);
if (mrc_hob == NULL) {
printk(BIOS_DEBUG,
"Memory Configuration Data Hob not present\n");
diff --git a/src/drivers/intel/fsp1_1/ramstage.c b/src/drivers/intel/fsp1_1/ramstage.c
index d85ba7c..2ffa675 100644
--- a/src/drivers/intel/fsp1_1/ramstage.c
+++ b/src/drivers/intel/fsp1_1/ramstage.c
@@ -38,7 +38,7 @@
* FSP_SMBIOS_MEMORY_INFO HOB verified by raminit
*/
if ((fsp_info_header->ImageAttribute & GRAPHICS_SUPPORT_BIT) &&
- !get_next_guid_hob(&graphics_info_guid, hob_list_ptr) &&
+ !get_guid_hob(&graphics_info_guid, hob_list_ptr) &&
CONFIG(DISPLAY_HOBS)) {
printk(BIOS_ERR, "7.5: EFI_PEI_GRAPHICS_INFO_HOB missing!\n");
printk(BIOS_ERR, "Missing one or more required FSP HOBs!\n");
@@ -117,7 +117,7 @@
u32 *vbt_hob;
void *hob_list_ptr = get_hob_list();
- vbt_hob = get_next_guid_hob(&vbt_guid, hob_list_ptr);
+ vbt_hob = get_guid_hob(&vbt_guid, hob_list_ptr);
if (vbt_hob == NULL) {
printk(BIOS_ERR, "FSP_ERR: Graphics Data HOB is not present\n");
} else {
diff --git a/src/drivers/intel/fsp1_1/romstage.c b/src/drivers/intel/fsp1_1/romstage.c
index 7fd1cf5..3f93f33 100644
--- a/src/drivers/intel/fsp1_1/romstage.c
+++ b/src/drivers/intel/fsp1_1/romstage.c
@@ -152,7 +152,7 @@
/* Locate the memory info HOB, presence validated by raminit */
hob_list_ptr = fsp_get_hob_list();
- hob_ptr = get_next_guid_hob(&memory_info_hob_guid, hob_list_ptr);
+ hob_ptr = get_guid_hob(&memory_info_hob_guid, hob_list_ptr);
memory_info_hob = (FSP_SMBIOS_MEMORY_INFO *)(hob_ptr + 1);
/* Display the data in the FSP_SMBIOS_MEMORY_INFO HOB */