From ca74d7e65b9562e4d84079af3583524d9e82460f Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Wed, 30 Mar 2022 14:41:16 +0200 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/63204 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons --- src/drivers/intel/fsp1_1/hob.c | 4 ++-- src/drivers/intel/fsp1_1/include/fsp/util.h | 4 ++-- src/drivers/intel/fsp1_1/raminit.c | 10 +++++----- src/drivers/intel/fsp1_1/ramstage.c | 4 ++-- src/drivers/intel/fsp1_1/romstage.c | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) (limited to 'src/drivers/intel/fsp1_1') diff --git a/src/drivers/intel/fsp1_1/hob.c b/src/drivers/intel/fsp1_1/hob.c index bba32d125c..e7c5fb4393 100644 --- a/src/drivers/intel/fsp1_1/hob.c +++ b/src/drivers/intel/fsp1_1/hob.c @@ -45,7 +45,7 @@ static void *get_next_hob(uint16_t type, const void *hob_start) } /* 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 @@ void *get_next_guid_hob(const EFI_GUID *guid, const void *hob_start) /* * 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 0c9a1fad2f..2dec3f0fb2 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_early_init(FSP_INFO_HEADER *fsp_info); 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 @@ extern void *FspHobListPtr; #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 78700a9b0c..7da85d4a1c 100644 --- a/src/drivers/intel/fsp1_1/raminit.c +++ b/src/drivers/intel/fsp1_1/raminit.c @@ -120,7 +120,7 @@ void raminit(struct romstage_params *params) /* 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 @@ void raminit(struct romstage_params *params) 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 @@ void raminit(struct romstage_params *params) } /* 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 @@ void raminit(struct romstage_params *params) * 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 @@ void raminit(struct romstage_params *params) "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 d85ba7cfc5..2ffa67587d 100644 --- a/src/drivers/intel/fsp1_1/ramstage.c +++ b/src/drivers/intel/fsp1_1/ramstage.c @@ -38,7 +38,7 @@ static void display_hob_info(FSP_INFO_HEADER *fsp_info_header) * 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 @@ static void fsp_run_silicon_init(FSP_INFO_HEADER *fsp_info_header) 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 7fd1cf50c8..3f93f33c50 100644 --- a/src/drivers/intel/fsp1_1/romstage.c +++ b/src/drivers/intel/fsp1_1/romstage.c @@ -152,7 +152,7 @@ __weak void mainboard_save_dimm_info( /* 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 */ -- cgit v1.2.3