Attention is currently required from: Tim Wawrzynczak, Nick Vaccaro. Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/57069 )
Change subject: coreboot tables: Add type-c port info to coreboot table ......................................................................
Patch Set 16:
(1 comment)
File src/lib/coreboot_table.c:
https://review.coreboot.org/c/coreboot/+/57069/comment/7f49d52a_8c80dfa9 PS16, Line 263: rec->size = sizeof(*rec);
but handrolling serialization is so painful and fraught with bugs...
I usually see the exact opposite ;) bugs because a compiler does something differently, bugs because we forgot to define __packed, all with the pain of hunting subtle bugs. (not to mention byte-ordering issues)
For me, it mostly depends on the ABI specification. When having a proper table with byte offsets at hand, I prefer to write (de)serialization code that is easy to review with the table. I haven't done this often, but it worked out very well in CB:31018. Easy to check against the spec and the internal structs can be exactly as the program needs them to be without ABI constraints.