* [Qemu-devel] [PATCH] adb: add trace-events for monitoring keyboard/mouse during bus enumeration
@ 2018-03-05 21:51 Mark Cave-Ayland
2018-03-06 2:09 ` David Gibson
0 siblings, 1 reply; 2+ messages in thread
From: Mark Cave-Ayland @ 2018-03-05 21:51 UTC (permalink / raw)
To: qemu-devel, qemu-ppc, david
This is useful to help diagnose problems related to address clashes during
MacOS 9 boot.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
hw/input/adb-kbd.c | 4 ++++
hw/input/adb-mouse.c | 5 +++++
hw/input/trace-events | 5 +++++
3 files changed, 14 insertions(+)
diff --git a/hw/input/adb-kbd.c b/hw/input/adb-kbd.c
index 266aed1b7b..50b62712c8 100644
--- a/hw/input/adb-kbd.c
+++ b/hw/input/adb-kbd.c
@@ -258,6 +258,7 @@ static int adb_kbd_request(ADBDevice *d, uint8_t *obuf,
case ADB_CMD_CHANGE_ID_AND_ACT:
case ADB_CMD_CHANGE_ID_AND_ENABLE:
d->devaddr = buf[1] & 0xf;
+ trace_adb_kbd_request_change_addr(d->devaddr);
break;
default:
d->devaddr = buf[1] & 0xf;
@@ -269,6 +270,9 @@ static int adb_kbd_request(ADBDevice *d, uint8_t *obuf,
if (buf[2] == 1 || buf[2] == 2 || buf[2] == 3) {
d->handler = buf[2];
}
+
+ trace_adb_kbd_request_change_addr_and_handler(d->devaddr,
+ d->handler);
break;
}
}
diff --git a/hw/input/adb-mouse.c b/hw/input/adb-mouse.c
index 47e88faf25..3ba6027d33 100644
--- a/hw/input/adb-mouse.c
+++ b/hw/input/adb-mouse.c
@@ -118,6 +118,7 @@ static int adb_mouse_request(ADBDevice *d, uint8_t *obuf,
s->dx = 0;
s->dy = 0;
s->dz = 0;
+ trace_adb_mouse_flush();
return 0;
}
@@ -138,6 +139,7 @@ static int adb_mouse_request(ADBDevice *d, uint8_t *obuf,
case ADB_CMD_CHANGE_ID_AND_ACT:
case ADB_CMD_CHANGE_ID_AND_ENABLE:
d->devaddr = buf[1] & 0xf;
+ trace_adb_mouse_request_change_addr(d->devaddr);
break;
default:
d->devaddr = buf[1] & 0xf;
@@ -155,6 +157,9 @@ static int adb_mouse_request(ADBDevice *d, uint8_t *obuf,
if (buf[2] == 1 || buf[2] == 2) {
d->handler = buf[2];
}
+
+ trace_adb_mouse_request_change_addr_and_handler(d->devaddr,
+ d->handler);
break;
}
}
diff --git a/hw/input/trace-events b/hw/input/trace-events
index 5affabc81d..db72484a25 100644
--- a/hw/input/trace-events
+++ b/hw/input/trace-events
@@ -4,10 +4,15 @@
adb_kbd_no_key(void) "Ignoring NO_KEY"
adb_kbd_writereg(int reg, uint8_t val) "reg %d val 0x%2.2x"
adb_kbd_readreg(int reg, uint8_t val0, uint8_t val1) "reg %d obuf[0] 0x%2.2x obuf[1] 0x%2.2x"
+adb_kbd_request_change_addr(int devaddr) "change addr to 0x%x"
+adb_kbd_request_change_addr_and_handler(int devaddr, int handler) "change addr and handler to 0x%x, 0x%x"
# hw/input/adb-mouse.c
+adb_mouse_flush(void) "flush"
adb_mouse_writereg(int reg, uint8_t val) "reg %d val 0x%2.2x"
adb_mouse_readreg(int reg, uint8_t val0, uint8_t val1) "reg %d obuf[0] 0x%2.2x obuf[1] 0x%2.2x"
+adb_mouse_request_change_addr(int devaddr) "change addr to 0x%x"
+adb_mouse_request_change_addr_and_handler(int devaddr, int handler) "change addr and handler to 0x%x, 0x%x"
# hw/input/ps2.c
ps2_put_keycode(void *opaque, int keycode) "%p keycode 0x%02x"
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] adb: add trace-events for monitoring keyboard/mouse during bus enumeration
2018-03-05 21:51 [Qemu-devel] [PATCH] adb: add trace-events for monitoring keyboard/mouse during bus enumeration Mark Cave-Ayland
@ 2018-03-06 2:09 ` David Gibson
0 siblings, 0 replies; 2+ messages in thread
From: David Gibson @ 2018-03-06 2:09 UTC (permalink / raw)
To: Mark Cave-Ayland; +Cc: qemu-devel, qemu-ppc
[-- Attachment #1: Type: text/plain, Size: 3862 bytes --]
On Mon, Mar 05, 2018 at 09:51:13PM +0000, Mark Cave-Ayland wrote:
> This is useful to help diagnose problems related to address clashes during
> MacOS 9 boot.
>
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Applied, thanks.
> ---
> hw/input/adb-kbd.c | 4 ++++
> hw/input/adb-mouse.c | 5 +++++
> hw/input/trace-events | 5 +++++
> 3 files changed, 14 insertions(+)
>
> diff --git a/hw/input/adb-kbd.c b/hw/input/adb-kbd.c
> index 266aed1b7b..50b62712c8 100644
> --- a/hw/input/adb-kbd.c
> +++ b/hw/input/adb-kbd.c
> @@ -258,6 +258,7 @@ static int adb_kbd_request(ADBDevice *d, uint8_t *obuf,
> case ADB_CMD_CHANGE_ID_AND_ACT:
> case ADB_CMD_CHANGE_ID_AND_ENABLE:
> d->devaddr = buf[1] & 0xf;
> + trace_adb_kbd_request_change_addr(d->devaddr);
> break;
> default:
> d->devaddr = buf[1] & 0xf;
> @@ -269,6 +270,9 @@ static int adb_kbd_request(ADBDevice *d, uint8_t *obuf,
> if (buf[2] == 1 || buf[2] == 2 || buf[2] == 3) {
> d->handler = buf[2];
> }
> +
> + trace_adb_kbd_request_change_addr_and_handler(d->devaddr,
> + d->handler);
> break;
> }
> }
> diff --git a/hw/input/adb-mouse.c b/hw/input/adb-mouse.c
> index 47e88faf25..3ba6027d33 100644
> --- a/hw/input/adb-mouse.c
> +++ b/hw/input/adb-mouse.c
> @@ -118,6 +118,7 @@ static int adb_mouse_request(ADBDevice *d, uint8_t *obuf,
> s->dx = 0;
> s->dy = 0;
> s->dz = 0;
> + trace_adb_mouse_flush();
> return 0;
> }
>
> @@ -138,6 +139,7 @@ static int adb_mouse_request(ADBDevice *d, uint8_t *obuf,
> case ADB_CMD_CHANGE_ID_AND_ACT:
> case ADB_CMD_CHANGE_ID_AND_ENABLE:
> d->devaddr = buf[1] & 0xf;
> + trace_adb_mouse_request_change_addr(d->devaddr);
> break;
> default:
> d->devaddr = buf[1] & 0xf;
> @@ -155,6 +157,9 @@ static int adb_mouse_request(ADBDevice *d, uint8_t *obuf,
> if (buf[2] == 1 || buf[2] == 2) {
> d->handler = buf[2];
> }
> +
> + trace_adb_mouse_request_change_addr_and_handler(d->devaddr,
> + d->handler);
> break;
> }
> }
> diff --git a/hw/input/trace-events b/hw/input/trace-events
> index 5affabc81d..db72484a25 100644
> --- a/hw/input/trace-events
> +++ b/hw/input/trace-events
> @@ -4,10 +4,15 @@
> adb_kbd_no_key(void) "Ignoring NO_KEY"
> adb_kbd_writereg(int reg, uint8_t val) "reg %d val 0x%2.2x"
> adb_kbd_readreg(int reg, uint8_t val0, uint8_t val1) "reg %d obuf[0] 0x%2.2x obuf[1] 0x%2.2x"
> +adb_kbd_request_change_addr(int devaddr) "change addr to 0x%x"
> +adb_kbd_request_change_addr_and_handler(int devaddr, int handler) "change addr and handler to 0x%x, 0x%x"
>
> # hw/input/adb-mouse.c
> +adb_mouse_flush(void) "flush"
> adb_mouse_writereg(int reg, uint8_t val) "reg %d val 0x%2.2x"
> adb_mouse_readreg(int reg, uint8_t val0, uint8_t val1) "reg %d obuf[0] 0x%2.2x obuf[1] 0x%2.2x"
> +adb_mouse_request_change_addr(int devaddr) "change addr to 0x%x"
> +adb_mouse_request_change_addr_and_handler(int devaddr, int handler) "change addr and handler to 0x%x, 0x%x"
>
> # hw/input/ps2.c
> ps2_put_keycode(void *opaque, int keycode) "%p keycode 0x%02x"
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-03-06 3:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-05 21:51 [Qemu-devel] [PATCH] adb: add trace-events for monitoring keyboard/mouse during bus enumeration Mark Cave-Ayland
2018-03-06 2:09 ` David Gibson
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.