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 6:
(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();
It does help some. […]
rdev_root() is currently not exported, it's an implementation detail of the region device API. I could change that and use it here but that would still only solve this case, not the one in CB:39304, so I would still like to establish that boot_device_ro() can always be relied upon to be the root device for all CBFS files anyway.
My long term goal is to get rid of this function anyway and replace it by direct use of cbfs_boot_lookup() everywhere. Can I just leave the code like this for now and eventually I'll delete it anyway?