Attention is currently required from: Alper Nebi Yasak, Nico Huber, Philipp Hug, ron minnich.
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/80372?usp=email )
Change subject: arch/io.h: Add stubs for x86 I/O port functions to other arches ......................................................................
Patch Set 3:
(1 comment)
File src/arch/arm/include/armv7/arch/io.h:
https://review.coreboot.org/c/coreboot/+/80372/comment/8f3fd526_fc1790d0 : PS3, Line 17: printk(BIOS_ERR, "arch/io.h: %s() not implemented\n", __func__);
Good point. This might even be a case for dead_code()? Or no implementation […]
Well, the way the QEMU drivers are written right now that wouldn't work, since due to the way the decision is made from a flag set in `struct resource` the compiler won't be able to eliminate it.
But we could replace all the open-coded `res->flags & RESOURCE_IO` checks with a static inline helper function `resource_is_io(res)` which would just always return false for non-x86. Then we could define all the I/O accesors as macros that just evaluate to `dead_code()` in Arm headers. That's probably the best option.