Attention is currently required from: Jakub Czapiga, Simon Glass, Simon Glass, Subrata Banik.
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/73150?usp=email )
Change subject: libpayload/libcbfs: Support file type in unverified_area APIs ......................................................................
Patch Set 5:
(1 comment)
File payloads/libpayload/include/cbfs.h:
https://review.coreboot.org/c/coreboot/+/73150/comment/d5fd7f76_ef69e6d3 : PS4, Line 27: static inline void *cbfs_unverified_area_type_map(const char *area, const char *name,
OK, so just drop all the code in payloads/ ? […]
Yes, please drop everything in payloads/.
You can just add unit tests for the coreboot version in the toplevel tests/ directory.
A lot of stuff is duplicated between coreboot and libpayload for historical and licensing reasons. We've been trying to cut back a bit on it in recent years but there's definitely more way to go. In the case of CBFS APIs a bunch of things are actually different between the versions (e.g. backend for boot device access, FMAP APIs, lack of direct mapping), there are probably still some more things that could be unified but it's not like the whole file is a straight copy.