From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HeCIq-0003Xv-AM for qemu-devel@nongnu.org; Wed, 18 Apr 2007 11:42:40 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HeCIo-0003Xh-W0 for qemu-devel@nongnu.org; Wed, 18 Apr 2007 11:42:40 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HeCIo-0003Xe-Q7 for qemu-devel@nongnu.org; Wed, 18 Apr 2007 11:42:38 -0400 Received: from ug-out-1314.google.com ([66.249.92.169]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HeCDx-0000IJ-MX for qemu-devel@nongnu.org; Wed, 18 Apr 2007 11:37:37 -0400 Received: by ug-out-1314.google.com with SMTP id j40so377034ugd for ; Wed, 18 Apr 2007 08:37:36 -0700 (PDT) Message-ID: Date: Wed, 18 Apr 2007 18:37:36 +0300 From: "Blue Swirl" Subject: Re: [Qemu-devel] qemu/hw pckbd.c In-Reply-To: <1176906055.16811.24.camel@jma4.dev.netgem.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1176888568.6333.62.camel@rapid> <20070418130653.GA2879@networkno.de> <1176906055.16811.24.camel@jma4.dev.netgem.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: l_indien@magic.fr, qemu-devel@nongnu.org On 4/18/07, Jocelyn Mayer wrote: > On Wed, 2007-04-18 at 14:06 +0100, Thiemo Seufer wrote: > > J. Mayer wrote: > > > On Mon, 2007-04-16 at 22:47 +0000, Thiemo Seufer wrote: > > > > CVSROOT: /sources/qemu > > > > Module name: qemu > > > > Changes by: Thiemo Seufer 07/04/16 22:47:54 > > > > > > > > Modified files: > > > > hw : pckbd.c > > > > > > > > Log message: > > > > Support it_shift for mmapped pckbd. > > > > > > > > CVSWeb URLs: > > > > http://cvs.savannah.gnu.org/viewcvs/qemu/hw/pckbd.c?cvsroot=qemu&r1=1.19&r2=1.20 > > > > > > Thanks for the update. > > > Here's another small patch, based on the same idea of what is done for > > > the memory-mapped serial ports and which seems useful to implement some > > > targets: it may be needed not to register the I/O memory area in the > > > pckbd driver but let the caller do it. > > > Please take a look. > > > > Actually, I thought about adding such a feature but then decided to > > defer it until it is actually needed. OTOH, with qemu handling mmio > > at page granularity it is likely needed sooner or later, so we could > > just declare it a standard implementation feature. I am ok with it > > either way. > > If you're interressed in such a feature, you may take a look of what > I've done in hw/ppc405_uc.c. There are some device sharing the same > memory page on those microcontrollers so I introduced a fake device > called mmio that allow to register multiple devices into a single page > in Qemu. I do use the serial_mm_init with the ioregister parameter set > to 0 for those designs. > This code may not be as generic as it would be if we want to make it a > standard Qemu function, but this may give a basis or ideas for it. On Sparc32 there are several devices that would benefit from sub-page granularity, so I vote for making this generic.