Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33107 )
Change subject: [RFC]lib/coreboot_tables: Introduce BOOT_MEDIA_PARAMS2 ......................................................................
Patch Set 3:
(2 comments)
https://review.coreboot.org/#/c/33107/2/src/commonlib/include/commonlib/regi... File src/commonlib/include/commonlib/region.h:
https://review.coreboot.org/#/c/33107/2/src/commonlib/include/commonlib/regi... PS2, Line 39: region device It's just a region -- not a region device. Ditto for the wording one line up as well.
https://review.coreboot.org/#/c/33107/2/src/lib/coreboot_table.c File src/lib/coreboot_table.c:
https://review.coreboot.org/#/c/33107/2/src/lib/coreboot_table.c@298 PS2, Line 298: rdev_mmio_addr I see what you are trying to do here, but I think it really confuses the point of the region/region device api.
Also, with your current implementation you will not get a mmap_mmio_address for anything except the translation device platforms. Is that intentional? It doesn't seem very helpful.
I think it's best to add an API to boot_device.h that provides the information you need. It would work for both non-users and users of xlate device since the default x86 one (src/arch/x86/mmap_boot.c) could implement it as well as the special ones (src/soc/intel/apollolake/mmap_boot.c).
What do you think?