From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HeB7i-0002wI-9H for qemu-devel@nongnu.org; Wed, 18 Apr 2007 10:27:06 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HeB7a-0002w5-M6 for qemu-devel@nongnu.org; Wed, 18 Apr 2007 10:27:04 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HeB7a-0002w2-JC for qemu-devel@nongnu.org; Wed, 18 Apr 2007 10:26:58 -0400 Received: from honiara.magic.fr ([195.154.193.36]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HeB2h-0006gV-Os for qemu-devel@nongnu.org; Wed, 18 Apr 2007 10:21:57 -0400 Subject: Re: [Qemu-devel] qemu/hw pckbd.c From: Jocelyn Mayer In-Reply-To: <20070418130653.GA2879@networkno.de> References: <1176888568.6333.62.camel@rapid> <20070418130653.GA2879@networkno.de> Content-Type: text/plain Date: Wed, 18 Apr 2007 16:20:55 +0200 Message-Id: <1176906055.16811.24.camel@jma4.dev.netgem.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Reply-To: l_indien@magic.fr, qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thiemo Seufer Cc: qemu-devel@nongnu.org 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. -- Jocelyn Mayer