Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Dec 2025 08:13:06 +0000
From:      Toomas Soome <tsoome@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: e3fa0a22dd37 - main - bhyve: pci-uart needs to also set subclass and function
Message-ID:  <693a7d12.2c04d.3cb4fed0@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help

The branch main has been updated by tsoome:

URL: https://cgit.FreeBSD.org/src/commit/?id=e3fa0a22dd371727712764e3d07891b05980cd61

commit e3fa0a22dd371727712764e3d07891b05980cd61
Author:     Toomas Soome <tsoome@FreeBSD.org>
AuthorDate: 2025-12-10 20:36:43 +0000
Commit:     Toomas Soome <tsoome@FreeBSD.org>
CommitDate: 2025-12-11 08:11:50 +0000

    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
---
 usr.sbin/bhyve/pci_uart.c | 2 ++
 1 file changed, 2 insertions(+)

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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?693a7d12.2c04d.3cb4fed0>