Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751978AbdHHDxI (ORCPT ); Mon, 7 Aug 2017 23:53:08 -0400 Received: from mail-pg0-f48.google.com ([74.125.83.48]:34673 "EHLO mail-pg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751891AbdHHDxH (ORCPT ); Mon, 7 Aug 2017 23:53:07 -0400 From: Brendan Higgins To: minyard@acm.org, benjaminfair@google.com, clg@kaod.org, joel@jms.id.au, andrew@aj.id.au Cc: openipmi-developer@lists.sourceforge.net, openbmc@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [RFC v1 0/4] ipmi_bmc: framework for IPMI on BMCs Date: Mon, 7 Aug 2017 20:52:57 -0700 Message-Id: <20170808035301.1980-1-brendanhiggins@google.com> X-Mailer: git-send-email 2.14.0.rc1.383.gd1ce394fe2-goog Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1608 Lines: 29 This introduces a framework for implementing the BMC side of the IPMI protocol, roughly mirroring the host side OpenIPMI framework; it attempts to abstract away hardware interfaces, such as Block Transfer interface hardware implementations from IPMI command handlers. It does this by implementing the traditional driver model of a bus with devices; however, in this case a struct ipmi_bmc_bus represents a hardware interface, where a struct ipmi_bmc_device represents a handler. A handler filters messages by registering a function which returns whether a given message matches the handler; it also has the concept of a default handler which is forwarded all messages which are not matched by some other interface. In this patchset, we introduce an example of a default handler: a misc device file interface which implements the same interface as the the device file interface used by the Aspeed BT driver. Currently, OpenBMC handles all IPMI message routing and handling in userland; the existing drivers simply provide a file interface for the hardware on the device. In this patchset, we propose a common file interface to be shared by all IPMI hardware interfaces, but also a framework for implementing handlers at the kernel level, similar to how the existing OpenIPMI framework supports both kernel users, as well as misc device file interface. This patchset depends on the "ipmi: bt-i2c: added IPMI Block Transfer over I2C" patchset, which can be found here: https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1461960.html However, I can fix this if desired. Tested on the AST2500 EVB.