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 <ths> 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 <[EMAIL PROTECTED]>