From: Benjamin Leggett <benjamin@edera.io>
To: xen-devel@lists.xenproject.org
Cc: "Benjamin Leggett" <benjamin@edera.io>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Anthony PERARD" <anthony.perard@vates.tech>,
"Michal Orzel" <michal.orzel@amd.com>,
"Jan Beulich" <jbeulich@suse.com>,
"Julien Grall" <julien@xen.org>,
"Roger Pau Monné" <roger@xenproject.org>,
"Stefano Stabellini" <sstabellini@kernel.org>
Subject: [PATCH] ns16550: add the Amazon EC2 PCI serial device
Date: Wed, 23 Sep 2026 11:39:33 -0400 [thread overview]
Message-ID: <20260923153933.2024896-1-benjamin@edera.io> (raw)
In-Reply-To: <20260922184316.324817-1-benjamin@edera.io>
Amazon EC2 bare metal instances have no UART at the legacy I/O port
0x3f8. Their only serial port is a 16550-compatible PCI device (vendor
0x1d0f, device 0x8250) with its registers in the MMIO space of BAR 0.
pci_uart_config() uses the default parameters for a device that is not
in uart_config[], and those only accept an I/O BAR, so "com1=...,pci"
cannot find this device. Add it, with the same layout that Linux uses
(commit 3bfd1300abfe ("serial: 8250_pci: Add Amazon PCI serial device
ID")): one port at the start of BAR 0, 1-byte registers, and the
default 1.8432MHz clock.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Benjamin Leggett <benjamin@edera.io>
---
xen/drivers/char/ns16550.c | 14 ++++++++++++++
xen/include/xen/pci_ids.h | 2 ++
2 files changed, 16 insertions(+)
diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c
index 120ac09d23..593d208483 100644
--- a/xen/drivers/char/ns16550.c
+++ b/xen/drivers/char/ns16550.c
@@ -98,6 +98,7 @@ struct ns16550_config {
param_intel_lpss,
param_wch_ch382,
param_asix,
+ param_amazon,
} param;
};
@@ -909,6 +910,13 @@ static const struct ns16550_config_param __initconst uart_param[] = {
.bar0 = true,
.max_ports = 1,
},
+ [param_amazon] = {
+ .reg_width = 1,
+ .lsr_mask = UART_LSR_THRE,
+ .bar0 = true,
+ .mmio = true,
+ .max_ports = 1,
+ },
};
static const struct ns16550_config __initconst uart_config[] =
@@ -1255,6 +1263,12 @@ static const struct ns16550_config __initconst uart_config[] =
.dev_id = 0x9910,
.param = param_asix
},
+ /* Amazon EC2 bare metal UART */
+ {
+ .vendor_id = PCI_VENDOR_ID_AMAZON,
+ .dev_id = 0x8250,
+ .param = param_amazon
+ },
};
static int __init
diff --git a/xen/include/xen/pci_ids.h b/xen/include/xen/pci_ids.h
index fd424ef55d..a17c88dcf7 100644
--- a/xen/include/xen/pci_ids.h
+++ b/xen/include/xen/pci_ids.h
@@ -17,6 +17,8 @@
#define PCI_VENDOR_ID_WCHIC 0x1c00
+#define PCI_VENDOR_ID_AMAZON 0x1d0f
+
#define PCI_VENDOR_ID_INTEL 0x8086
#endif /* XEN_PCI_IDS_H */
--
2.55.0
next prev parent reply other threads:[~2026-09-23 15:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-22 18:43 [PATCH] ns16550: find the console UART on PCI when there is no legacy one Benjamin Leggett
2026-09-23 6:11 ` Jan Beulich
2026-09-23 15:38 ` Benjamin Leggett
2026-09-23 15:39 ` Benjamin Leggett [this message]
2026-09-24 8:26 ` [PATCH] ns16550: add the Amazon EC2 PCI serial device Jan Beulich
2026-10-09 20:24 ` [PATCH] ns16550: add "auto" to scan PCI only when the default base has no UART Benjamin Leggett
2026-10-12 12:30 ` Jan Beulich
[not found] ` <87bj8xs54e.fsf@edera.io>
2026-10-14 6:21 ` Jan Beulich
2026-10-13 20:49 ` Benjamin Leggett
2026-10-14 6:46 ` Jan Beulich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260923153933.2024896-1-benjamin@edera.io \
--to=benjamin@edera.io \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=roger@xenproject.org \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.