drivers/intel/fsp1_1: Fix code not working with strict-aliasing rules

Change-Id: Ifc95a093cf86c834d63825bf76312ed21ec68215
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62995
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Frans Hendriks <fhendriks@eltan.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
This commit is contained in:
Patrick Rudolph
2022-03-22 12:17:48 +01:00
committed by Felix Held
parent d7803c89b6
commit ac49aaf0f9

View File

@@ -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");
}