Attention is currently required from: Tim Wawrzynczak, Paul Menzel, Andrey Petrov, Patrick Rudolph. Anil Kumar K has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/59638 )
Change subject: [WIP] drivers/intel/fsp2_0: Add support for FSP_NON_VOLATILE_STORAGE_HOB2 ......................................................................
Patch Set 17:
(2 comments)
File src/drivers/intel/fsp2_0/hand_off_block.c:
https://review.coreboot.org/c/coreboot/+/59638/comment/02ad926e_4559fc30 PS17, Line 326: }
BTW, this won't compile right now if you enable the Kconfig, because in this path, if hob_walker. […]
Ack
https://review.coreboot.org/c/coreboot/+/59638/comment/17c9cdb2_8ee57f27 PS17, Line 316: if (CONFIG(PLATFORM_USES_FSP2_3)) { : union { : const struct fsp_nvs_hob2_data_region_header *hob; : const void *hob_descr; : } hob_walker; : hob_walker.hob = (const struct fsp_nvs_hob2_data_region_header *) : fsp_find_extension_hob_by_guid(fsp_nv_storage_guid_2, size); : if (hob_walker.hob != NULL) { : *size = hob_walker.hob->nvs_data_length; : return hob_walker.hob_descr; : } : } else { : return fsp_find_extension_hob_by_guid(fsp_nv_storage_guid, size); : }
I might return early just to avoid an extra indent, e.g.: […]
Hi Tim. There could be potential cases of platforms adopting newer header revisions but still using the older HOBs.To take care of this the recomendation from FSP architecture doc is to search for HOB2 and if not found search for HOB1 . I updated my code by removing the else