mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
hw/char/sh_serial: Add device id to trace output
Normally there are at least two sh_serial instances. Add device id to trace messages to make it clear which instance they belong to otherwise its not possible to tell which serial device is accessed. Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <cc1f9ff9f4259ae799750e452f8871849c7a104c.1635541329.git.balaton@eik.bme.hu> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
This commit is contained in:
parent
beeb520925
commit
44ae04f032
2 changed files with 6 additions and 4 deletions
|
@ -94,9 +94,10 @@ static void sh_serial_write(void *opaque, hwaddr offs,
|
|||
uint64_t val, unsigned size)
|
||||
{
|
||||
SHSerialState *s = opaque;
|
||||
DeviceState *d = DEVICE(s);
|
||||
unsigned char ch;
|
||||
|
||||
trace_sh_serial_write(size, offs, val);
|
||||
trace_sh_serial_write(d->id, size, offs, val);
|
||||
switch (offs) {
|
||||
case 0x00: /* SMR */
|
||||
s->smr = val & ((s->feat & SH_SERIAL_FEAT_SCIF) ? 0x7b : 0xff);
|
||||
|
@ -212,6 +213,7 @@ static uint64_t sh_serial_read(void *opaque, hwaddr offs,
|
|||
unsigned size)
|
||||
{
|
||||
SHSerialState *s = opaque;
|
||||
DeviceState *d = DEVICE(s);
|
||||
uint32_t ret = UINT32_MAX;
|
||||
|
||||
#if 0
|
||||
|
@ -304,7 +306,7 @@ static uint64_t sh_serial_read(void *opaque, hwaddr offs,
|
|||
break;
|
||||
}
|
||||
}
|
||||
trace_sh_serial_read(size, offs, ret);
|
||||
trace_sh_serial_read(d->id, size, offs, ret);
|
||||
|
||||
if (ret > UINT16_MAX) {
|
||||
qemu_log_mask(LOG_GUEST_ERROR,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue