From: Tan Siewert <tan.siewert@9elements.com>
To: Phil Rosenthal <phil@phil.gs>,
Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Jiri Slaby" <jirislaby@kernel.org>,
"Corey Minyard" <corey@minyard.net>,
"openipmi-developer@lists.sourceforge.net"
<openipmi-developer@lists.sourceforge.net>,
"Andy Shevchenko" <andy@kernel.org>,
"Joel Stanley" <joel@jms.id.au>,
"Andrew Jeffery" <andrew@codeconstruct.com.au>,
"Ryan Chen" <ryan_chen@aspeedtech.com>,
"linux-aspeed@lists.ozlabs.org" <linux-aspeed@lists.ozlabs.org>,
"Ninad Palsule" <ninad@linux.ibm.com>,
"Andrew Lunn" <andrew@lunn.ch>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
"Grégoire Layet" <git@gregoirelayet.com>
Subject: Re: [PATCH] serial: 8250_pci: Add support for ASPEED BMC VUARTs over PCIe
Date: Sun, 11 Oct 2026 18:18:35 +0200 [thread overview]
Message-ID: <e2e3d98b-9a89-4845-aa7d-0e23a1d95f70@9elements.com> (raw)
In-Reply-To: <2F1931BE-F0F0-4F21-BED4-67080A40AEA9@phil.gs>
On 10/10/26 12:47 PM, Phil Rosenthal wrote:
> On Sat, Oct 10, 2026, Andy Shevchenko wrote:
>> I will look into this deeper when I return from the LPC 2026 trip, but
>> what you are doing sounds really wrong.
*snip*
> One correction to v1: it said interrupts don't work on this device.
> They do. The board just uses a different MSI vector than the one I
> tried, and which vector it is depends on the BMC firmware.
Disclaimer: It's been a while since I worked on this driver, so please
take my words with a grain of salt.
Correct, the BMC firmware sets its SIRQ statically. As far as we have
seen on devices that use VUART over PCIe, they used the vendor
recommended interrupts which are 0 and 1 (vectors 16 and 17 on the host
side).
> In a separate driver I can find the vector at probe time and fall back
> to polling if there isn't one. That makes the console about 7 times faster
> than polling (about 15 KB/s instead of 2 KB/s), and the CPU no longer has to
> poll the port. I couldn't do that cleanly as a quirk in 8250_pci.c, but
> it would work the same in a driver for the whole device.
>
> Grégoire Layet (Cc'd) has a series for the same device [1]
> It adds an MFD driver, drivers/mfd/aspeed-pci-core.c, that registers the
> serial ports as a child device. But it only binds when the BMC runs a modified
> OpenBMC, which changes the device's class code and puts the serial port
> interrupts on fixed MSI vectors.
@Grégoire do you remember why `8250_aspeed_vuart` sets the PCIe class
code to `0xff000000`?
The reason for having an MFD driver instead of a separate 8250 serial
driver is simple: We want to have the ability to support multiple
devices like KCS over PCIe or Mailbox too, which uses the same BARs.
There was a discussion about this already in previous versions of the
series that Grégoire has proposed (I think it was v2) [0].
> With stock firmware, like on this board, it doesn't bind at all.
> So there are two ways forward:
>
> 1. A separate 8250 driver for stock firmware, as I proposed.
>
> 2. Extend Grégoire's driver so it also handles stock firmware: match the
> KCS class code as well, and find the MSI vector at probe time instead
> of assuming it. I'd work that out with Grégoire and send it on top of
> his series, together with the ipmi_si change. KCS would stay with
> ipmi_si's ACPI path either way.
If you found a way to find the correct MSI vectors at probe time (with
other features like KCS or Mailbox enabled), please propose it so.
AFAICR we've looked into this and haven't found a suitable solution for it.
[0]
https://lore.kernel.org/all/cover.1780929570.git.gregoire.layet@9elements.com/
Cheers,
Tan
>
> I'm happy with either. Please let me know which you'd prefer, and I'll
> wait for that before sending anything new.
>
> [1] https://lore.kernel.org/r/20260818-aspeed-driver-v6-v6-0-fd7cc0b338ea@9elements.com
>
> Thanks,
> Phil
>
>
>> On Oct 10, 2026, at 4:10 AM, Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
>>
>> On Fri, Oct 9, 2026 at 4:45 PM Phil Rosenthal <phil@phil.gs> wrote:
>>>> On Oct 9, 2026, at 4:57 AM, Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
>>>>
>>>> There is already a driver for this 8250_aspeed_vuart.c. Please, do not
>>>> add new quirks to 8250_pci.c.
>>>
>>> Thanks for the review.
>>>
>>> As far as I can tell, 8250_aspeed_vuart.c drives the other end of the
>>> VUART. It is an OF platform driver (aspeed,ast2400-vuart and
>>> aspeed,ast2500-vuart) for Linux running on the BMC itself: it depends on
>>> ARCH_ASPEED, has no PCI ID table, and programs the BMC-side GCRA/GCRB
>>> registers (VUART enable, host SIRQ routing), which the host cannot
>>> reach.
>>>
>>> This patch is for the host side. There the VUART appears as 16550
>>> registers in BAR1 of the BMC's PCIe function (1a03:2402), and nothing
>>> binds that function today,
>>
>> In the comments to the patch you told that ipmi_si matches it.
>>
>>> so SOL goes quiet once Linux starts. I don't
>>> see a way to reuse 8250_aspeed_vuart.c for it, but please correct me if
>>> I'm missing something.
>>>
>>> Understood about 8250_pci.c. Would a separate driver be acceptable,
>>> e.g. drivers/tty/serial/8250/8250_aspeed_pci.c using 8250_pcilib, along
>>> the lines of 8250_pericom.c? It would do the same as this patch: find
>>> the VUARTs the BMC has enabled in BAR1 and register them as polled
>>> ports. If that works for you, I'll send it as v2.
>>
>> What has Pericom to do with all this?
>>
>> ...
>>
>> I will look into this deeper when I return from the LPC 2026 trip, but
>> what you are doing sounds really wrong.
>>
>> --
>> With Best Regards,
>> Andy Shevchenko
>
--
Tan Siewert
(they/she)
9elements GmbH, Kortumstraße 19-21, 44787 Bochum, Germany
Email: tan.siewert@9elements.com
Phone: +49 234 68 94 188
Sitz der Gesellschaft: Bochum
Handelsregister: Amtsgericht Bochum, HRB 17519
Geschäftsführung: Sebastian Deutsch, Eray Basar
Datenschutzhinweise nach Art. 13 DSGVO
next prev parent reply other threads:[~2026-10-11 16:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-08 13:27 [PATCH] serial: 8250_pci: Add support for ASPEED BMC VUARTs over PCIe Phil Rosenthal via B4 Relay
2026-10-08 13:38 ` sashiko-bot
2026-10-08 17:38 ` Phil Rosenthal
2026-10-09 8:57 ` Andy Shevchenko
2026-10-09 13:45 ` Phil Rosenthal
2026-10-10 8:10 ` Andy Shevchenko
2026-10-10 10:47 ` Phil Rosenthal
2026-10-11 16:18 ` Tan Siewert [this message]
2026-10-11 17:00 ` Phil Rosenthal
2026-10-12 19:57 ` git
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=e2e3d98b-9a89-4845-aa7d-0e23a1d95f70@9elements.com \
--to=tan.siewert@9elements.com \
--cc=andrew@codeconstruct.com.au \
--cc=andrew@lunn.ch \
--cc=andy.shevchenko@gmail.com \
--cc=andy@kernel.org \
--cc=corey@minyard.net \
--cc=git@gregoirelayet.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=joel@jms.id.au \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=ninad@linux.ibm.com \
--cc=openipmi-developer@lists.sourceforge.net \
--cc=phil@phil.gs \
--cc=ryan_chen@aspeedtech.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox