Attention is currently required from: Alper Nebi Yasak, Arthur Heymans, Julius Werner, ron minnich.

Alper Nebi Yasak uploaded patch set #4 to this change.

View Change

The following approvals got outdated and were removed: Code-Review+1 by Arthur Heymans, Verified+1 by build bot (Jenkins)

arch/io.h: Add stubs for x86 I/O port functions to other arches

The QEMU Bochs display driver and the QEMU Firmware Configuration
interface code (in the qemu-i440fx mainboard dir) were written for x86.
These devices are available in QEMU VMs of other architectures as well,
so we want to port them to be independent from x86.

The Bochs display driver already has an interesting pattern of using a
resource struct to choose whether to use I/O port instructions or MMIO.
We could simply continue with the MMIO code path on non-x86 arches, but
the x86-specific instructions cause a compile error on the other branch
since the I/O port access functions aren't declared.

We could cover every port function call with #if CONFIG(ARCH_X86), but
that gets very cluttery. And often it is possible to access I/O ports
over MMIO through a translator, so these could be implemented later.

For now, add unimplemented prototypes for these functions for all other
architectures where they are missing, so that we can compile code that
refer to them in unreachable code paths. If the function calls can't be
eliminated at build-time, the build will fail with linker errors.

Change-Id: If7d9177283e8c692088ba8e30d6dfe52623c8cb9
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
---
A src/arch/arm/include/armv4/arch/io.h
A src/arch/arm/include/armv7/arch/io.h
A src/arch/arm64/include/armv8/arch/io.h
A src/arch/riscv/include/arch/io.h
4 files changed, 132 insertions(+), 0 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/80372/4

To view, visit change 80372. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: If7d9177283e8c692088ba8e30d6dfe52623c8cb9
Gerrit-Change-Number: 80372
Gerrit-PatchSet: 4
Gerrit-Owner: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur@aheymans.xyz>
Gerrit-Reviewer: Julius Werner <jwerner@chromium.org>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Philipp Hug <philipp@hug.cx>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-Reviewer: ron minnich <rminnich@gmail.com>
Gerrit-Attention: Julius Werner <jwerner@chromium.org>
Gerrit-Attention: Arthur Heymans <arthur@aheymans.xyz>
Gerrit-Attention: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Gerrit-Attention: ron minnich <rminnich@gmail.com>
Gerrit-MessageType: newpatchset