Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36300 )
Change subject: vboot: use vboot persistent context ......................................................................
Patch Set 9:
(2 comments)
https://review.coreboot.org/c/coreboot/+/36300/9/src/security/vboot/common.c File src/security/vboot/common.c:
https://review.coreboot.org/c/coreboot/+/36300/9/src/security/vboot/common.c... PS9, Line 52: struct vboot_working_data *wd; nit:
You can use a local variable vboot_ctx_ptr: struct vb2_context **vboot_ctx_ptr = car_get_var_ptr(&vboot_ctx);
and then you can avoid having to call car_get_var()/car_get_var_ptr() multiple times in this function. Just easier to read :).
https://review.coreboot.org/c/coreboot/+/36300/9/src/security/vboot/common.c... PS9, Line 140: wd_cbmem->buffer_size = 0;
nit: add comment why?
... and a TODO to remove buffer_size from vboot_working_data eventually? I think we can also get rid of the logic in lb_vboot_workbuf() and use add_cbmem_pointers() for CBMEM_ID_VBOOT_WORKBUF directly.