aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@FreeBSD.org>2025-12-10 20:36:43 +0000
committerToomas Soome <tsoome@FreeBSD.org>2025-12-11 08:11:50 +0000
commite3fa0a22dd371727712764e3d07891b05980cd61 (patch)
tree087e99d6f8836dd0521a094ea597e82ae966434c
parenta86dc94b84d177da8f00d1c9420ef0860576e4c4 (diff)
bhyve: pci-uart needs to also set subclass and function
edk2 PciSioSerialDxe driver setup depends on subclass and function being set, adding them does make it possible to access pci-uart serial port from UEFI. Reviewed by: corvink Differential Revision: https://reviews.freebsd.org/D54167 Sponsored by: Edgecast Cloud LLC
-rw-r--r--usr.sbin/bhyve/pci_uart.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.sbin/bhyve/pci_uart.c b/usr.sbin/bhyve/pci_uart.c
index f0f05c731a18..abbc23c63fae 100644
--- a/usr.sbin/bhyve/pci_uart.c
+++ b/usr.sbin/bhyve/pci_uart.c
@@ -104,6 +104,8 @@ pci_uart_init(struct pci_devinst *pi, nvlist_t *nvl)
pci_set_cfgdata16(pi, PCIR_DEVICE, COM_DEV);
pci_set_cfgdata16(pi, PCIR_VENDOR, COM_VENDOR);
pci_set_cfgdata8(pi, PCIR_CLASS, PCIC_SIMPLECOMM);
+ pci_set_cfgdata8(pi, PCIR_SUBCLASS, PCIS_SIMPLECOMM_UART);
+ pci_set_cfgdata8(pi, PCIR_PROGIF, PCIP_SIMPLECOMM_UART_16550A);
sc = uart_ns16550_init(pci_uart_intr_assert, pci_uart_intr_deassert,
pi);