Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39305 )
Change subject: cbfs: Port cbfs_load() and cbfs_map() to new API ......................................................................
Patch Set 5:
(2 comments)
https://review.coreboot.org/c/coreboot/+/39305/4/src/commonlib/bsd/include/c... File src/commonlib/bsd/include/commonlib/bsd/cbfs_private.h:
https://review.coreboot.org/c/coreboot/+/39305/4/src/commonlib/bsd/include/c... PS4, Line 116: (still big-endian)
I don't understand why we're exposing serialized implementation details to callers in both the input […]
This is just finding an attribute, it doesn't know anything about that specific attributes contents, so it wouldn't know what to byteswap. (Again I prefer to not apply byte order swapping within the structures that represent the layout on flash, to avoid confusion. This is supposed to be a low-level helper function that's only used by other CBFS code, so I wouldn't call it "exposing".)
https://review.coreboot.org/c/coreboot/+/39305/4/src/commonlib/bsd/include/c... PS4, Line 117: void *cbfs_find_attr(union cbfs_mdata *mdata, uint32_t attr_tag);
Why are these pointers not pointing to const objects?
Done