Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39327 )
Change subject: cbfs: Move more stuff into cbfs_boot_lookup() ......................................................................
Patch Set 8:
(1 comment)
https://review.coreboot.org/c/coreboot/+/39327/3/src/lib/cbfs.c File src/lib/cbfs.c:
https://review.coreboot.org/c/coreboot/+/39327/3/src/lib/cbfs.c@62 PS3, Line 62: const struct region_device *bootdev = boot_device_ro();
I did want to hear about how we ensure the mdata is always from the metadata cache. That will be important that we get correct. Right now, that's obviously not the case.
Right, this function basically doesn't fully use the mcache because I'm trying to get rid of it anyway and didn't spend too much time one it.
Actually, I could also just put a whole union cbfs_mdata into struct cbfsf and then point the rdev at the struct itself, that would both match the existing API and work around your concerns. Not sure why I didn't think of that before. Code updated, let me know what you think.