From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 765DD32142B for ; Sun, 11 Oct 2026 16:18:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791735521; cv=none; b=PfCP0f1up94fRuapaJEAzjOUo75gRu/x5W2cXXip3xxMnYEgtJNr+qTuX+iIMj0bY9l9CbINLfIXqfP9bTE0vUPNRES+ysZ7QCGkpmzOM3X2ZKUR8kBx4pAYQZa7ND0ckE0x6dq37mx1W9UFiD6nZsAp10u7/qbGRvwF8GBAzF0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791735521; c=relaxed/simple; bh=hva/tp2Acvt6W18JV2TcLHNPDVP7d9Gml2g9nvQ33+8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=m9rFR3VR/AdaBCF5JtE/V7d7dSA26amsyUeOFNqqRoegKMyP6P/upaNpclCSXwFoP0iazBLbqsyeMW58MrZ+ev3OnGEYx/H9Lb/nOwbMY6Pp0zWHfmzwKHRQQ6rO0zZIsD32gLSQ1odS6JDXtVQyLAI42X3aA5w0lRaNGu5EkPw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=9elements.com; spf=pass smtp.mailfrom=9elements.com; dkim=pass (2048-bit key) header.d=9elements.com header.i=@9elements.com header.b=WhByQg/2; arc=none smtp.client-ip=209.85.128.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=9elements.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=9elements.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=9elements.com header.i=@9elements.com header.b="WhByQg/2" Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-4a16c399641so11837525e9.2 for ; Sun, 11 Oct 2026 09:18:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=9elements.com; s=google; t=1791735517; x=1792340317; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=cLevDBr/a6xSK2+ESklMCOJC1LXr8ChWRGeELvbz+GI=; b=WhByQg/2SRcNZpapndxLKrK0V9VERwrjQ4zJF7n60mzMsMNlKnpdfXTHxaGF5cYZut YTheVuNqt5f7vZvmwuts5NA3O4QGv+KxuqplIkKH/kzPsZtnZ8fVv3FgLcEGHZXkTa5Q 8CkuJvvKKk4L1CZN/uC1NEJlUZjY8kswxXSjApXirJL+H5ErNUyLMVIMGiy1qTHd1rA0 zKwnyepclOZngDHO+Lt6ukiLHpfS5SkzckOlGxgdDs9G/t3H9OvlijG8fSsnQ4//FvTk xzGWWN3SAMh7G/DJo/lGrY/6HnPh8FYDhVUAk2fI423ZChRgRkY/mjNBKYqWJo7ilT0E Fg2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1791735517; x=1792340317; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=cLevDBr/a6xSK2+ESklMCOJC1LXr8ChWRGeELvbz+GI=; b=EUkrKhRATd3xgCfc4PxPg41BtKkGdUhdUHtGPcvhLQ4fStBlo8pGeqImK2E0/D5K05 MZyKgoAUe/18LmyTw4bwlwRVvolB1ztRjL6Vt3WdQLRUHqo9cOhY6KhMR+hOx8koK+Rg ewIG7mn2is/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c18 with SMTP id 5b1f17b1804b1-4a18e49242fmr134428835e9.19.1791735517494; Sun, 11 Oct 2026 09:18:37 -0700 (PDT) Received: from ?IPV6:2001:9e8:2cc:2101:aa59:e08:7cab:1f61? ([2001:9e8:2cc:2101:aa59:e08:7cab:1f61]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a18c1e33d2sm302192575e9.0.2026.10.11.09.18.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 11 Oct 2026 09:18:37 -0700 (PDT) Message-ID: Date: Sun, 11 Oct 2026 18:18:35 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] serial: 8250_pci: Add support for ASPEED BMC VUARTs over PCIe To: Phil Rosenthal , Andy Shevchenko Cc: Greg Kroah-Hartman , Jiri Slaby , Corey Minyard , "openipmi-developer@lists.sourceforge.net" , Andy Shevchenko , Joel Stanley , Andrew Jeffery , Ryan Chen , "linux-aspeed@lists.ozlabs.org" , Ninad Palsule , Andrew Lunn , "linux-kernel@vger.kernel.org" , "linux-serial@vger.kernel.org" , =?UTF-8?Q?Gr=C3=A9goire_Layet?= References: <20261008-aspeed-vuart-v1-1-d2be17c99cd7@phil.gs> <60996F21-A12C-4FCC-9D5E-9D188A4ADBEA@phil.gs> <2F1931BE-F0F0-4F21-BED4-67080A40AEA9@phil.gs> Content-Language: en-US From: Tan Siewert In-Reply-To: <2F1931BE-F0F0-4F21-BED4-67080A40AEA9@phil.gs> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 wrote: >> >> On Fri, Oct 9, 2026 at 4:45 PM Phil Rosenthal wrote: >>>> On Oct 9, 2026, at 4:57 AM, Andy Shevchenko 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