From patchwork Thu Dec 17 18:50:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corey Minyard X-Patchwork-Id: 58614 Delivered-To: patch@linaro.org Received: by 10.112.89.199 with SMTP id bq7csp567776lbb; Thu, 17 Dec 2015 11:23:38 -0800 (PST) X-Received: by 10.140.141.210 with SMTP id 201mr24222494qhn.74.1450380216982; Thu, 17 Dec 2015 11:23:36 -0800 (PST) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 88si12620857qgb.56.2015.12.17.11.23.36 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 17 Dec 2015 11:23:36 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Received: from localhost ([::1]:56486 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9e9I-0000f3-87 for patch@linaro.org; Thu, 17 Dec 2015 14:23:36 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44153) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9ddf-0007Q6-Mj for qemu-devel@nongnu.org; Thu, 17 Dec 2015 13:50:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a9ddd-0007Ls-4U for qemu-devel@nongnu.org; Thu, 17 Dec 2015 13:50:55 -0500 Received: from vms173019pub.verizon.net ([206.46.173.19]:60690) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9ddd-0007Kg-0o for qemu-devel@nongnu.org; Thu, 17 Dec 2015 13:50:53 -0500 Received: from serve.minyard.net ([173.57.176.17]) by vms173019.mailsrvcs.net (Oracle Communications Messaging Server 7.0.5.32.0 64bit (built Jul 16 2014)) with ESMTPA id <0NZI007WVN05ID81@vms173019.mailsrvcs.net> for qemu-devel@nongnu.org; Thu, 17 Dec 2015 12:50:30 -0600 (CST) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=EdU1O6SC c=1 sm=1 tr=0 a=bXmWQgKa9n63w7XTPFb8JQ==:117 a=N54-gffFAAAA:8 a=HL3alpDKAAAA:8 a=oR5dmqMzAAAA:8 a=wUQvQvOEmiQA:10 a=fk1lIlRQAAAA:8 a=936-aVdCsg_R6N9-uZYA:9 a=G0ZCuigSrU84Dkf2:21 a=FWjxSp199s6ajRLj:21 Received: from t430.minyard.net (t430m.minyard.net [192.168.27.3]) by serve.minyard.net (Postfix) with ESMTPA id 1A513A425; Thu, 17 Dec 2015 12:50:30 -0600 (CST) Received: by t430.minyard.net (Postfix, from userid 1000) id 11BE6300FEB; Thu, 17 Dec 2015 12:50:27 -0600 (CST) From: minyard@acm.org To: qemu-devel@nongnu.org, Paolo Bonzini , "Michael S. Tsirkin" , Igor Mammedov Date: Thu, 17 Dec 2015 12:50:13 -0600 Message-id: <1450378219-25799-11-git-send-email-minyard@acm.org> X-Mailer: git-send-email 2.5.0 In-reply-to: <1450378219-25799-1-git-send-email-minyard@acm.org> References: <1450378219-25799-1-git-send-email-minyard@acm.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.46.173.19 X-Mailman-Approved-At: Thu, 17 Dec 2015 14:22:14 -0500 Cc: Corey Minyard Subject: [Qemu-devel] [PATCH v5 10/16] ipmi: Add firmware registration to the ISA interface X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Corey Minyard Signed-off-by: Corey Minyard --- hw/ipmi/isa_ipmi_bt.c | 15 +++++++++++++++ hw/ipmi/isa_ipmi_kcs.c | 15 +++++++++++++++ 2 files changed, 30 insertions(+) -- 2.5.0 diff --git a/hw/ipmi/isa_ipmi_bt.c b/hw/ipmi/isa_ipmi_bt.c index 03eb9cc..21fa4a7 100644 --- a/hw/ipmi/isa_ipmi_bt.c +++ b/hw/ipmi/isa_ipmi_bt.c @@ -407,6 +407,7 @@ typedef struct ISAIPMIBTDevice { ISADevice dev; int32 isairq; IPMIBT bt; + IPMIFwInfo fwinfo; } ISAIPMIBTDevice; static void isa_ipmi_bt_realize(DeviceState *dev, Error **errp) @@ -435,6 +436,20 @@ static void isa_ipmi_bt_realize(DeviceState *dev, Error **errp) qdev_set_legacy_instance_id(dev, iib->bt.io_base, iib->bt.io_length); isa_register_ioport(isadev, &iib->bt.io, iib->bt.io_base); + + iib->fwinfo.interface_name = "bt"; + iib->fwinfo.interface_type = IPMI_SMBIOS_BT; + iib->fwinfo.ipmi_spec_major_revision = 2; + iib->fwinfo.ipmi_spec_minor_revision = 0; + iib->fwinfo.base_address = iib->bt.io_base; + iib->fwinfo.register_length = iib->bt.io_length; + iib->fwinfo.register_spacing = 1; + iib->fwinfo.memspace = IPMI_MEMSPACE_IO; + iib->fwinfo.irq_type = IPMI_LEVEL_IRQ; + iib->fwinfo.interrupt_number = iib->isairq; + iib->fwinfo.acpi_parent = "\\_SB.PCI0.ISA"; + iib->fwinfo.i2c_slave_address = iib->bt.bmc->slave_addr; + ipmi_add_fwinfo(&iib->fwinfo, errp); } static const VMStateDescription vmstate_ISAIPMIBTDevice = { diff --git a/hw/ipmi/isa_ipmi_kcs.c b/hw/ipmi/isa_ipmi_kcs.c index b588711..c662aee 100644 --- a/hw/ipmi/isa_ipmi_kcs.c +++ b/hw/ipmi/isa_ipmi_kcs.c @@ -370,6 +370,7 @@ typedef struct ISAIPMIKCSDevice { ISADevice dev; int32 isairq; IPMIKCS kcs; + IPMIFwInfo fwinfo; } ISAIPMIKCSDevice; static void ipmi_isa_realize(DeviceState *dev, Error **errp) @@ -398,6 +399,20 @@ static void ipmi_isa_realize(DeviceState *dev, Error **errp) qdev_set_legacy_instance_id(dev, iik->kcs.io_base, iik->kcs.io_length); isa_register_ioport(isadev, &iik->kcs.io, iik->kcs.io_base); + + iik->fwinfo.interface_name = "kcs"; + iik->fwinfo.interface_type = IPMI_SMBIOS_KCS; + iik->fwinfo.ipmi_spec_major_revision = 2; + iik->fwinfo.ipmi_spec_minor_revision = 0; + iik->fwinfo.base_address = iik->kcs.io_base; + iik->fwinfo.i2c_slave_address = iik->kcs.bmc->slave_addr; + iik->fwinfo.register_length = iik->kcs.io_length; + iik->fwinfo.register_spacing = 1; + iik->fwinfo.memspace = IPMI_MEMSPACE_IO; + iik->fwinfo.irq_type = IPMI_LEVEL_IRQ; + iik->fwinfo.interrupt_number = iik->isairq; + iik->fwinfo.acpi_parent = "\\_SB.PCI0.ISA"; + ipmi_add_fwinfo(&iik->fwinfo, errp); } const VMStateDescription vmstate_ISAIPMIKCSDevice = {