aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/intel/fsp1_1/hob.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/intel/fsp1_1/hob.c')
-rw-r--r--src/drivers/intel/fsp1_1/hob.c22
1 files changed, 5 insertions, 17 deletions
diff --git a/src/drivers/intel/fsp1_1/hob.c b/src/drivers/intel/fsp1_1/hob.c
index 9a09cfd81a..076dd5f768 100644
--- a/src/drivers/intel/fsp1_1/hob.c
+++ b/src/drivers/intel/fsp1_1/hob.c
@@ -257,21 +257,19 @@ static const char *get_hob_type_string(void *hob_ptr)
*/
void print_hob_type_structure(u16 hob_type, void *hob_list_ptr)
{
- u32 *current_hob;
- u32 *next_hob = 0;
- u8 last_hob = 0;
+ void *current_hob;
u32 current_type;
const char *current_type_str;
- current_hob = hob_list_ptr;
-
/*
* Print out HOBs of our desired type until
* the end of the HOB list
*/
printk(BIOS_DEBUG, "\n=== FSP HOB Data Structure ===\n");
printk(BIOS_DEBUG, "%p: hob_list_ptr\n", hob_list_ptr);
- do {
+ for (current_hob = hob_list_ptr; !END_OF_HOB_LIST(current_hob);
+ current_hob = GET_NEXT_HOB(current_hob)) {
+
EFI_HOB_GENERIC_HEADER *current_header_ptr =
(EFI_HOB_GENERIC_HEADER *)current_hob;
@@ -292,16 +290,6 @@ void print_hob_type_structure(u16 hob_type, void *hob_list_ptr)
break;
}
}
-
- /* Check for end of HOB list */
- last_hob = END_OF_HOB_LIST(current_hob);
- if (!last_hob) {
- /* Get next HOB pointer */
- next_hob = GET_NEXT_HOB(current_hob);
-
- /* Start on next HOB */
- current_hob = next_hob;
- }
- } while (!last_hob);
+ }
printk(BIOS_DEBUG, "=== End of FSP HOB Data Structure ===\n\n");
}