From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45095) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8Waq-0002Ag-8y for qemu-devel@nongnu.org; Wed, 29 Jan 2014 09:58:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W8Waj-0004Ii-2I for qemu-devel@nongnu.org; Wed, 29 Jan 2014 09:58:20 -0500 Received: from cantor2.suse.de ([195.135.220.15]:35913 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8Wai-0004IF-NX for qemu-devel@nongnu.org; Wed, 29 Jan 2014 09:58:12 -0500 Message-ID: <52E916FF.7050309@suse.de> Date: Wed, 29 Jan 2014 15:58:07 +0100 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1384273995-16486-1-git-send-email-cminyard@mvista.com> <1384273995-16486-7-git-send-email-cminyard@mvista.com> In-Reply-To: <1384273995-16486-7-git-send-email-cminyard@mvista.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 06/16] ipmi: Add a PC ISA type structure List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Corey Minyard , qemu-devel@nongnu.org Cc: Bret Ketchum , Corey Minyard , "Michael S. Tsirkin" Am 12.11.2013 17:33, schrieb Corey Minyard: > This provides the base infrastructure to tie IPMI low-level > interfaces into a PC ISA bus. >=20 > Signed-off-by: Corey Minyard [...] > diff --git a/hw/ipmi/isa_ipmi.c b/hw/ipmi/isa_ipmi.c > new file mode 100644 > index 0000000..0242a41 > --- /dev/null > +++ b/hw/ipmi/isa_ipmi.c > @@ -0,0 +1,148 @@ > +/* > + * QEMU ISA IPMI emulation > + * > + * Copyright (c) 2012 Corey Minyard, MontaVista Software, LLC > + * > + * Permission is hereby granted, free of charge, to any person obtaini= ng a copy > + * of this software and associated documentation files (the "Software"= ), to deal > + * in the Software without restriction, including without limitation t= he rights > + * to use, copy, modify, merge, publish, distribute, sublicense, and/o= r sell > + * copies of the Software, and to permit persons to whom the Software = is > + * furnished to do so, subject to the following conditions: > + * > + * The above copyright notice and this permission notice shall be incl= uded in > + * all copies or substantial portions of the Software. > + * > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXP= RESS OR > + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABI= LITY, > + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT S= HALL > + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES O= R OTHER > + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARI= SING FROM, > + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALI= NGS IN > + * THE SOFTWARE. > + */ > +#include "hw/hw.h" > +#include "hw/isa/isa.h" > +#include "hw/i386/pc.h" > +#include "qemu/timer.h" > +#include "sysemu/char.h" > +#include "sysemu/sysemu.h" > +#include "ipmi.h" > + > +/* This is the type the user specifies on the -device command line */ > +#define TYPE_ISA_IPMI "isa-ipmi" > +#define ISA_IPMI(obj) OBJECT_CHECK(ISAIPMIDevice, (obj), \ > + TYPE_ISA_IPMI) > +typedef struct ISAIPMIDevice { > + ISADevice dev; > + char *interface; > + uint32_t iobase; > + uint32_t isairq; > + uint8_t slave_addr; > + CharDriverState *chr; > + IPMIInterface *intf; > +} ISAIPMIDevice; > + > +static void ipmi_isa_realizefn(DeviceState *dev, Error **errp) > +{ > + ISADevice *isadev =3D ISA_DEVICE(dev); > + ISAIPMIDevice *isa =3D ISA_IPMI(dev); > + char typename[20]; > + Object *intfobj; > + IPMIInterface *intf; > + Object *bmcobj; > + IPMIBmc *bmc; > + int rc; > + > + if (!isa->interface) { > + isa->interface =3D g_strdup("kcs"); > + } > + > + if (isa->chr) { > + bmcobj =3D object_new(TYPE_IPMI_BMC_EXTERN); > + } else { > + bmcobj =3D object_new(TYPE_IPMI_BMC_SIMULATOR); > + } [snip] This depends on types registered in patches 09 and 10. Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg