Attention is currently required from: Alper Nebi Yasak, Arthur Heymans, Nico Huber, 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 port I/O functions to other architectures ......................................................................
Patch Set 5:
(2 comments)
File src/arch/arm/include/armv7/arch/io.h:
https://review.coreboot.org/c/coreboot/+/80372/comment/8ca1309c_831c536c : PS3, Line 17: printk(BIOS_ERR, "arch/io.h: %s() not implemented\n", __func__);
Done for this patch, if I correctly understood the "no implementation" part. […]
I'm not really convinced of this "translator" approach tbh, I doesn't feel right. Arm CPUs do not have an IN or OUT instruction, pretending like there was one anyway feels like a hack. If the same kind of device can be accessed via MMIO or port I/O, then the driver needs to be written to allow for both (e.g. like we do for 8250 UART), not expect one architecture to emulate stuff that only exists for another.
File src/device/Kconfig:
https://review.coreboot.org/c/coreboot/+/80372/comment/2c946820_4a175460 : PS5, Line 532: CPU communicate with peripheral devices over PCI I/O space. Sorry but I don't think this makes sense. Port I/O is a concept completely specific to the x86 architecture, it doesn't make sense on Arm. Arm processors do not have a separate "I/O bus" coming out of the chip that they can address independently. If a device can be accessed over both port I/O or MMIO then the driver needs to be able to handle both cases, and the resource API already provides parts of an abstraction for that (looks like the bochs driver is already written for that). If the VGA driver doesn't allow that then it needs to be expanded (at least it looks like it has accessor wrappers for everything it does already so it hopefully shouldn't be too complicated to add).