Attention is currently required from: Nicholas Chin.
Julius Werner has posted comments on this change by Nicholas Chin. ( https://review.coreboot.org/c/coreboot/+/85905?usp=email )
Change subject: drivers/option: Add CBFS file based option backend ......................................................................
Patch Set 2:
(2 comments)
Patchset:
PS2: Hi Nicholas,
We think we may also be interested in having an options backend like this for some options we're planning to add. Will you have time to continue working on this patch soon? If not, would you mind if someone else took it over?
File src/drivers/option/cbfs_file_option.c:
https://review.coreboot.org/c/coreboot/+/85905/comment/ca53fa15_d278cb11?usp... : PS2, Line 11: unsigned int *p Actually, this is also a little dicey. `cbfstool add-int` creates a u64 in little-endian in CBFS. You're just interpreting that as a u32 here, and that happens to do the right thing for little endians (but only if the coreboot endianness also matches).
But it would be cleaner to do something like this here: ``` void *p = cbfs_ro_map(name, &size); uint64_t value = le64dec(p); /* include <endian.h> for this one */ ... return (unsigned int)value; ```