All of lore.kernel.org
 help / color / mirror / Atom feed
From: "J. Mayer" <l_indien@magic.fr>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] qemu/hw pckbd.c
Date: Wed, 18 Apr 2007 11:29:28 +0200	[thread overview]
Message-ID: <1176888568.6333.62.camel@rapid> (raw)
In-Reply-To: <E1HdZzG-0007a3-4T@cvs>

[-- Attachment #1: Type: text/plain, Size: 706 bytes --]

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.

-- 
J. Mayer <l_indien@magic.fr>
Never organized

[-- Attachment #2: pckbd.diff --]
[-- Type: text/x-patch, Size: 1850 bytes --]

Index: vl.h
===================================================================
RCS file: /sources/qemu/qemu/vl.h,v
retrieving revision 1.216
diff -u -d -d -p -r1.216 vl.h
--- vl.h	17 Apr 2007 16:28:29 -0000	1.216
+++ vl.h	18 Apr 2007 09:23:43 -0000
@@ -1035,8 +1035,9 @@ void *vmmouse_init(void *m);
 
 /* pckbd.c */
 
-void i8042_init(qemu_irq kbd_irq, qemu_irq mouse_irq, uint32_t io_base);
-void i8042_mm_init(qemu_irq kbd_irq, qemu_irq mouse_irq, target_ulong base, int it_shift);
+void i8042_init(qemu_irq kdb_irq, qemu_irq mouse_irq, uint32_t io_base);
+void i8042_mm_init(qemu_irq kbd_irq, qemu_irq mouse_irq,
+                   target_ulong base, int it_shift, int ioregister);
 
 /* mc146818rtc.c */
 
Index: hw/pckbd.c
===================================================================
RCS file: /sources/qemu/qemu/hw/pckbd.c,v
retrieving revision 1.20
diff -u -d -d -p -r1.20 pckbd.c
--- hw/pckbd.c	16 Apr 2007 22:47:54 -0000	1.20
+++ hw/pckbd.c	18 Apr 2007 09:23:43 -0000
@@ -422,7 +421,7 @@ void kbd_mm_writeb (void *opaque, target
 };
 
 void i8042_mm_init(qemu_irq kbd_irq, qemu_irq mouse_irq, target_ulong base,
-                   int it_shift)
+                   int it_shift, int ioregister)
 {
     KBDState *s = &kbd_state;
     int s_io_memory;
@@ -434,8 +493,10 @@ void i8042_mm_init(qemu_irq kbd_irq, qem
 
     kbd_reset(s);
     register_savevm("pckbd", 0, 3, kbd_save, kbd_load, s);
-    s_io_memory = cpu_register_io_memory(0, kbd_mm_read, kbd_mm_write, s);
-    cpu_register_physical_memory(base, 8 << it_shift, s_io_memory);
+    if (ioregister) {
+        s_io_memory = cpu_register_io_memory(0, kbd_mm_read, kbd_mm_write, s);
+        cpu_register_physical_memory(base, 8 << it_shift, s_io_memory);
+    }
 
     s->kbd = ps2_kbd_init(kbd_update_kbd_irq, s);
     s->mouse = ps2_mouse_init(kbd_update_aux_irq, s);

  reply	other threads:[~2007-04-18  9:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-16 22:47 [Qemu-devel] qemu/hw pckbd.c Thiemo Seufer
2007-04-18  9:29 ` J. Mayer [this message]
2007-04-18 13:06   ` Thiemo Seufer
2007-04-18 14:20     ` Jocelyn Mayer
2007-04-18 15:37       ` Blue Swirl
2007-04-18 16:08         ` Paul Brook
2007-04-19  8:43           ` J. Mayer
2007-04-19 14:44             ` Paul Brook
2007-04-19 18:15               ` Blue Swirl
  -- strict thread matches above, loose matches on Subject: below --
2008-02-10 13:39 Andrzej Zaborowski
2007-10-20 20:48 Thiemo Seufer
2007-02-18  0:08 Thiemo Seufer
2005-01-27 22:32 Fabrice Bellard
2005-01-17 22:31 Fabrice Bellard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1176888568.6333.62.camel@rapid \
    --to=l_indien@magic.fr \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.