From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57313) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URcKq-0007xB-7F for qemu-devel@nongnu.org; Mon, 15 Apr 2013 01:52:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1URcKp-0004Gq-7H for qemu-devel@nongnu.org; Mon, 15 Apr 2013 01:52:12 -0400 Received: from smtp1-g21.free.fr ([2a01:e0c:1:1599::10]:60334) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URcKo-0004Fz-Kg for qemu-devel@nongnu.org; Mon, 15 Apr 2013 01:52:11 -0400 Message-ID: <516B9580.6060305@reactos.org> Date: Mon, 15 Apr 2013 07:52:00 +0200 From: =?ISO-8859-1?Q?Herv=E9_Poussineau?= MIME-Version: 1.0 References: <1365926760-5803-1-git-send-email-hpoussin@reactos.org> <1365926760-5803-4-git-send-email-hpoussin@reactos.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC v2 3/7] m48t59: register a QOM type for each nvram type we support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Artyom Tarasenko Cc: Blue Swirl , =?ISO-8859-1?Q?Andreas_F=E4rber?= , qemu-devel Artyom Tarasenko a =E9crit : > On Sun, Apr 14, 2013 at 10:05 AM, Herv=E9 Poussineau wrote: >> As m48t59 devices can only be created with m48t59_init() or m48t59_ini= t_isa(), >> we know exactly which nvram types are required. Register only those th= ree >> types. >> Remove .model and .size properties as they can be infered from nvram n= ame. >> Remove .io_base ISA address port as m48t59_init_isa() is always called= with ioport 0x74. >=20 > While this it indeed how it's currently called, this is wrong for the > sun4u emulation. > The isa (ebus) variant of the sun4u m48t59_init_isa() should be called > with a mem_base, not io_base. > Do you think it should be implemented as another device type? >=20 I don't know EBUS, but I think it should be implemented either as a=20 completly new bus (1), or as a child of the ISA bus type (2). For 1), you'll need to add a another device type to be plugged on EBUS. For 2), I let experts answer :) In all cases, maybe the m48t59_init() wrapper is what you need? You can=20 already give him a membase. Otherwise, you can maybe use sysbus_create_simple("m48t59"), get the=20 resulting MemoryRegion from the device, and add it in whatever MemoryRegi= on. Herv=E9