Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31887 )
Change subject: vboot: make vboot workbuf available to payload ......................................................................
Patch Set 8:
(4 comments)
LGTM to me after you fix the compiler error.
https://review.coreboot.org/#/c/31887/1/src/lib/coreboot_table.c File src/lib/coreboot_table.c:
https://review.coreboot.org/#/c/31887/1/src/lib/coreboot_table.c@46 PS1, Line 46: #if CONFIG(VBOOT)
Seems like there's a whole bunch of conditional includes above this one... […]
Yes, a lot of this code is quite old and we wouldn't write it like that anymore today.
https://review.coreboot.org/#/c/31887/5/src/lib/coreboot_table.c File src/lib/coreboot_table.c:
https://review.coreboot.org/#/c/31887/5/src/lib/coreboot_table.c@212 PS5, Line 212: #if CONFIG(VBOOT)
I don't think that strategy quite works here. […]
No, I think you misunderstand. I meant remove the guard from these functions as they are and then stub out vboot_get_handoff_info() and vboot_get_working_data() in their respective headers. That way these functions will get called but return immediately if !CONFIG_VBOOT (and since they're static the compiler can eliminate them entirely).
Although on second thought, since you already guard the only place that calls these functions, they're gonna get eliminated anyway. So you don't even need to stub anything out. Just removing the guard should already work.
https://review.coreboot.org/#/c/31887/8/src/lib/coreboot_table.c File src/lib/coreboot_table.c:
https://review.coreboot.org/#/c/31887/8/src/lib/coreboot_table.c@234 PS8, Line 234: if (wd == NULL) nit: this can't really return NULL anyway.
https://review.coreboot.org/#/c/31887/8/src/lib/coreboot_table.c@553 PS8, Line 553: lb_vboot_handoff(head); Okay, sorry, now you have to move this into the block below after all to get around the unused function error. ;) I didn't think that far.