Re: [PATCH v1 2/2] soc: aspeed: add host-side PCIe BMC device driver
From: Andrew Lunn
Date: Tue Jun 02 2026 - 11:53:37 EST
> +static int aspeed_pci_bmc_device_setup_vuart(struct pci_dev *pdev)
> +{
> + struct aspeed_pci_bmc_dev *pci_bmc_dev = pci_get_drvdata(pdev);
> + struct device *dev = &pdev->dev;
> + u16 vuart_ioport;
> + int ret, i;
> +
> + for (i = 0; i < VUART_MAX_PARMS; i++) {
> + /* Assign the line to non-exist device */
> + pci_bmc_dev->uart_line[i] = -ENOENT;
> + vuart_ioport = 0x3F8 - (i * 0x100);
> + pci_bmc_dev->uart[i].port.flags =
> + UPF_SKIP_TEST | UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ;
> + pci_bmc_dev->uart[i].port.uartclk = 115200 * 16;
> + pci_bmc_dev->uart[i].port.irq = pci_irq_vector(
> + pdev, pci_bmc_dev->msi_idx_table[VUART0_MSI + i]);
> + pci_bmc_dev->uart[i].port.dev = dev;
> + pci_bmc_dev->uart[i].port.iotype = UPIO_MEM32;
> + pci_bmc_dev->uart[i].port.iobase = 0;
How virtual is this? Is this directly accessing the hardware via
shared memory? Or is there software on the BMC which traps these
reads/writes and responds?
But first we need to decide if this is the correct architecture. The
alternative is rpmsg or virtio. There is already tty/rpmsg_tty.c. A
gpio driver over rpmsg is on the way. I2C has been discussed. There
are plenty of virtio drivers, console, i2c, spi, gpio. virtio has
higher performance, but also requires more memory. rpmsg is more
suited to slower devices where memory is tight.
Either of these seem like a better way to expose resources of the BMC
to the host.
Andrew