openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Zev Weiss <zweiss@equinix.com>
To: Andrew Jeffery <andrew@aj.id.au>
Cc: "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"chiawei_wang@aspeedtech.com" <chiawei_wang@aspeedtech.com>,
	"ryan_chen@aspeedtech.com" <ryan_chen@aspeedtech.com>,
	"tmaimon77@gmail.com" <tmaimon77@gmail.com>,
	"minyard@acm.org" <minyard@acm.org>,
	"avifishman70@gmail.com" <avifishman70@gmail.com>,
	"venture@google.com" <venture@google.com>,
	"openbmc@lists.ozlabs.org" <openbmc@lists.ozlabs.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"tali.perry1@gmail.com" <tali.perry1@gmail.com>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"openipmi-developer@lists.sourceforge.net"
	<openipmi-developer@lists.sourceforge.net>,
	"lee.jones@linaro.org" <lee.jones@linaro.org>,
	"linus.walleij@linaro.org" <linus.walleij@linaro.org>,
	"linux-aspeed@lists.ozlabs.org" <linux-aspeed@lists.ozlabs.org>,
	"benjaminfair@google.com" <benjaminfair@google.com>
Subject: Re: [PATCH v2 00/21] ipmi: Allow raw access to KCS devices
Date: Thu, 1 Apr 2021 07:24:05 +0000	[thread overview]
Message-ID: <YGV1FIKVX/4hxt1U@packtop> (raw)
In-Reply-To: <20210319061952.145040-1-andrew@aj.id.au>

On Fri, Mar 19, 2021 at 01:19:30AM CDT, Andrew Jeffery wrote:
>Hello,
>
>This series is a bit of a mix of things, but its primary purpose is to
>expose BMC KCS IPMI devices to userspace in a way that enables userspace
>to talk to host firmware using protocols that are not IPMI.
>
>v1 can be found here:
>
>https://lore.kernel.org/openbmc/20210219142523.3464540-1-andrew@aj.id.au/
>
>Changes in v2 include:
>
>* A rebase onto v5.12-rc2
>* Incorporation of off-list feedback on SerIRQ configuration from
>  Chiawei
>* Further validation on hardware for ASPEED KCS devices 2, 3 and 4
>* Lifting the existing single-open constraint of the IPMI chardev
>* Fixes addressing Rob's feedback on the conversion of the ASPEED KCS
>  binding to dt-schema
>* Fixes addressing Rob's feedback on the new aspeed,lpc-interrupts
>  property definition for the ASPEED KCS binding
>
>A new chardev device is added whose implementation exposes the Input
>Data Register (IDR), Output Data Register (ODR) and Status Register
>(STR) via read() and write(), and implements poll() for event
>monitoring.
>
>The existing /dev/ipmi-kcs* chardev interface exposes the KCS devices in
>a way which encoded the IPMI protocol in its behaviour. However, as
>LPC[0] KCS devices give us bi-directional interrupts between the host
>and a BMC with both a data and status byte, they are useful for purposes
>beyond IPMI.
>
>As a concrete example, libmctp[1] implements a vendor-defined MCTP[2]
>binding using a combination of LPC Firmware cycles for bulk data
>transfer and a KCS device via LPC IO cycles for out-of-band protocol
>control messages[3]. This gives a throughput improvement over the
>standard KCS binding[4] while continuing to exploit the ease of setup of
>the LPC bus for early boot firmware on the host processor.
>
>The series takes a bit of a winding path to achieve its aim:
>
>1. It begins with patches 1-5 put together by Chia-Wei, which I've
>rebased on v5.12-rc2. These fix the ASPEED LPC bindings and other
>non-KCS LPC-related ASPEED device drivers in a way that enables the
>SerIRQ patches at the end of the series. With Joel's review I'm hoping
>these 5 can go through the aspeed tree, and that the rest can go through
>the IPMI tree.
>
>2. Next, patches 6-13 fairly heavily refactor the KCS support in the
>IPMI part of the tree, re-architecting things such that it's possible to
>support multiple chardev implementations sitting on top of the ASPEED
>and Nuvoton device drivers. However, the KCS code didn't really have
>great separation of concerns as it stood, so even if we disregard the
>multiple-chardev support I think the cleanups are worthwhile.
>
>3. Patch 14 adds some interrupt management capabilities to the KCS
>device drivers in preparation for patch 16, which introduces the new
>"raw" KCS device interface. I'm not stoked about the device name/path,
>so if people are looking to bikeshed something then feel free to lay
>into that.
>
>4. The remaining patches switch the ASPEED KCS devicetree binding to
>dt-schema, add a new interrupt property to describe the SerIRQ behaviour
>of the device and finally clean up Serial IRQ support in the ASPEED KCS
>driver.
>
>Rob: The dt-binding patches still come before the relevant driver
>changes, I tried to keep the two close together in the series, hence the
>bindings changes not being patches 1 and 2.
>
>I've exercised the series under qemu with the rainier-bmc machine plus
>additional patches for KCS support[5]. I've also substituted this series in
>place of a hacky out-of-tree driver that we've been using for the
>libmctp stack and successfully booted the host processor under our
>internal full-platform simulation tools for a Rainier system.
>
>Note that this work touches the Nuvoton driver as well as ASPEED's, but
>I don't have the capability to test those changes or the IPMI chardev
>path. Tested-by tags would be much appreciated if you can exercise one
>or both.
>
>Please review!
>
>Andrew
>

After rebasing the series onto the OpenBMC dev-5.10 kernel (with only a
tiny conflict for the addition of the ast2600 entry in
ast_kcs_bmc_match) and enabling CONFIG_IPMI_KCS_BMC_CDEV_IPMI, my
e3c246d4i system booted healthily and handled some basic ipmitool
operations as expected.

Tested-by: Zev Weiss <zweiss@equinix.com>


Zev


  reply	other threads:[~2021-04-01  7:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-19  6:19 [PATCH v2 00/21] ipmi: Allow raw access to KCS devices Andrew Jeffery
2021-04-01  7:24 ` Zev Weiss [this message]
2021-04-08  0:57 ` Andrew Jeffery
2021-04-08 12:14   ` Corey Minyard
2021-04-08 23:46     ` Andrew Jeffery
2021-04-09  4:07       ` Joel Stanley
2021-04-09  5:39         ` Andrew Jeffery
2021-04-09  8:13         ` Arnd Bergmann

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=YGV1FIKVX/4hxt1U@packtop \
    --to=zweiss@equinix.com \
    --cc=andrew@aj.id.au \
    --cc=avifishman70@gmail.com \
    --cc=benjaminfair@google.com \
    --cc=chiawei_wang@aspeedtech.com \
    --cc=devicetree@vger.kernel.org \
    --cc=lee.jones@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-aspeed@lists.ozlabs.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minyard@acm.org \
    --cc=openbmc@lists.ozlabs.org \
    --cc=openipmi-developer@lists.sourceforge.net \
    --cc=robh+dt@kernel.org \
    --cc=ryan_chen@aspeedtech.com \
    --cc=tali.perry1@gmail.com \
    --cc=tmaimon77@gmail.com \
    --cc=venture@google.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;
as well as URLs for NNTP newsgroup(s).