[PATCH 025/112] efi: payload: restrict 8250 UART at I/O port 0x3f8 registration to x86
Ahmad Fatoum
a.fatoum at pengutronix.de
Wed Jan 3 10:11:45 PST 2024
The 8250 is available on other platforms, but being located at I/O port
0x3f8 is mostly a x86 PC thing, so restrict registering that console to
x86.
This will become required when we start building EFI payload binaries
for architectures besides x86.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
efi/payload/init.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/efi/payload/init.c b/efi/payload/init.c
index b0612276654e..8a9080115ffd 100644
--- a/efi/payload/init.c
+++ b/efi/payload/init.c
@@ -215,8 +215,9 @@ static int efi_console_init(void)
add_generic_device("efi-stdio", DEVICE_ID_SINGLE, NULL, 0 , 0, 0, NULL);
- add_ns16550_device(0, 0x3f8, 0x10, IORESOURCE_IO | IORESOURCE_MEM_8BIT,
- &ns16550_plat);
+ if (IS_ENABLED(CONFIG_X86))
+ add_ns16550_device(0, 0x3f8, 0x10, IORESOURCE_IO | IORESOURCE_MEM_8BIT,
+ &ns16550_plat);
return 0;
}
--
2.39.2
More information about the barebox
mailing list