From patchwork Thu Nov 12 19:02:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corey Minyard X-Patchwork-Id: 56464 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp596984lbb; Thu, 12 Nov 2015 11:07:44 -0800 (PST) X-Received: by 10.13.225.10 with SMTP id k10mr16324584ywe.237.1447355264837; Thu, 12 Nov 2015 11:07:44 -0800 (PST) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id f4si10423285ywc.301.2015.11.12.11.07.44 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 12 Nov 2015 11:07:44 -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; dkim=fail header.i=@gmail.com Received: from localhost ([::1]:49241 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZwxDk-0001wk-Ae for patch@linaro.org; Thu, 12 Nov 2015 14:07:44 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58732) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zwx90-0001UX-25 for qemu-devel@nongnu.org; Thu, 12 Nov 2015 14:02:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zwx8y-000521-7w for qemu-devel@nongnu.org; Thu, 12 Nov 2015 14:02:49 -0500 Received: from mail-pa0-x22d.google.com ([2607:f8b0:400e:c03::22d]:32778) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zwx8y-00051h-38 for qemu-devel@nongnu.org; Thu, 12 Nov 2015 14:02:48 -0500 Received: by pabfh17 with SMTP id fh17so73197452pab.0 for ; Thu, 12 Nov 2015 11:02:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=FNJ2zu9pDJInwBR2aeXLA0XKXLUzeg9M2tkjVyROpA0=; b=bXq3kdYtSAVLkCqZZW5OvsoaL7Z0dXAh4lChPTaLu5BvvFQKEZvzpAHgJNmmyO3tbb 8usEO3yRcx6IKTqPE861AFqf+Pz1pOXuqKfP5/hSYm8pRIz17molUMrNxZW9kLPWIEAh GiReiDxbm62rQ1ZLJ0yrhBiUlKjskTNPBYWocp+W7rPc4/ezw8J8XzaMfdYqqNa0fKL+ Ed6k4H8FmOJ8F2+3ENOtVWWOU67+5KqT7L8+l26BM5tj+IoYwAPomEwgZnUGPgNPF7td GVe+UEUAH9JNUJR/clpEstyAVTXcVWtvCcBGm8qsvlGS06Svsvd/RQ2LRHYZzLRxzlfO y50Q== X-Received: by 10.67.13.107 with SMTP id ex11mr25579342pad.126.1447354967377; Thu, 12 Nov 2015 11:02:47 -0800 (PST) Received: from t430.minyard.home (pool-173-57-176-17.dllstx.fios.verizon.net. [173.57.176.17]) by smtp.gmail.com with ESMTPSA id y3sm16095859pbt.23.2015.11.12.11.02.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Nov 2015 11:02:45 -0800 (PST) Received: from t430.minyard.home (t430.minyard.home [127.0.0.1]) by t430.minyard.home (8.14.7/8.14.7) with ESMTP id tACJ2hd8019744; Thu, 12 Nov 2015 13:02:43 -0600 Received: (from cminyard@localhost) by t430.minyard.home (8.14.7/8.14.7/Submit) id tACJ2hjF019743; Thu, 12 Nov 2015 13:02:43 -0600 From: minyard@acm.org To: qemu-devel@nongnu.org, Paolo Bonzini , "Michael S. Tsirkin" , Igor Mammedov Date: Thu, 12 Nov 2015 13:02:27 -0600 Message-Id: <1447354953-18893-12-git-send-email-minyard@acm.org> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1447354953-18893-1-git-send-email-minyard@acm.org> References: <1447354953-18893-1-git-send-email-minyard@acm.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c03::22d Cc: Corey Minyard Subject: [Qemu-devel] [PATCH v4 11/17] 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(+) -- 1.8.3.1 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 = {