Joel Kitching has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32262 )
Change subject: vboot: refactor OPROM code ......................................................................
Patch Set 6:
(1 comment)
https://review.coreboot.org/#/c/32262/4/src/security/vboot/misc.h File src/security/vboot/misc.h:
https://review.coreboot.org/#/c/32262/4/src/security/vboot/misc.h@40 PS4, Line 40: uint32_t buffer_size;
Shit, did I submit this already? I shouldn't try to get stuff done while having to jump off the bus. […]
Well you still managed to correct yourself extremely quickly =)
Not sure if it's worth optimizing for wasting N<16 bytes, since we may want to add more members to this structure in the future.
But you're quite right that buffer_offset fits easily enough in u16. I can change it. (Although in theory we don't even need buffer_offset at all -- workbuf location ALIGN_UP(xyz) can be calculated easily enough...)
While we're on the topic -- do you have any thoughts on `struct region` in commonlib/region.h? Is there a good reason for it using size_t, or would there be any harm in modifying that code to use u16 or u32? Then we can get rid of selected_region altogether and just use the vanilla struct.