Skip to content
Snippets Groups Projects
Commit ce0e6a2c authored by Mark Cave-Ayland's avatar Mark Cave-Ayland Committed by Laurent Vivier
Browse files

nubus: add trace-events for empty slot accesses


Increase the max_access_size to 4 bytes for empty Nubus slot and super slot
accesses to allow tracing of the Nubus enumeration process by the guest OS.

Signed-off-by: default avatarMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: default avatarLaurent Vivier <laurent@vivier.eu>
Message-Id: <20210924073808.1041-8-mark.cave-ayland@ilande.co.uk>
Signed-off-by: default avatarLaurent Vivier <laurent@vivier.eu>
parent c0ad4eaf
No related branches found
No related tags found
No related merge requests found
......@@ -19,6 +19,7 @@
#include "qemu/osdep.h"
#include "hw/nubus/nubus.h"
#include "qapi/error.h"
#include "trace.h"
static NubusBus *nubus_find(void)
......@@ -31,12 +32,13 @@ static void nubus_slot_write(void *opaque, hwaddr addr, uint64_t val,
unsigned int size)
{
/* read only */
trace_nubus_slot_write(addr, val, size);
}
static uint64_t nubus_slot_read(void *opaque, hwaddr addr,
unsigned int size)
{
trace_nubus_slot_read(addr, size);
return 0;
}
......@@ -46,7 +48,7 @@ static const MemoryRegionOps nubus_slot_ops = {
.endianness = DEVICE_BIG_ENDIAN,
.valid = {
.min_access_size = 1,
.max_access_size = 1,
.max_access_size = 4,
},
};
......@@ -54,11 +56,13 @@ static void nubus_super_slot_write(void *opaque, hwaddr addr, uint64_t val,
unsigned int size)
{
/* read only */
trace_nubus_super_slot_write(addr, val, size);
}
static uint64_t nubus_super_slot_read(void *opaque, hwaddr addr,
unsigned int size)
{
trace_nubus_super_slot_read(addr, size);
return 0;
}
......@@ -68,7 +72,7 @@ static const MemoryRegionOps nubus_super_slot_ops = {
.endianness = DEVICE_BIG_ENDIAN,
.valid = {
.min_access_size = 1,
.max_access_size = 1,
.max_access_size = 4,
},
};
......
# See docs/devel/tracing.txt for syntax documentation.
# nubus-bus.c
nubus_slot_read(uint64_t addr, int size) "reading unassigned addr 0x%"PRIx64 " size %d"
nubus_slot_write(uint64_t addr, uint64_t val, int size) "writing unassigned addr 0x%"PRIx64 " value 0x%"PRIx64 " size %d"
nubus_super_slot_read(uint64_t addr, int size) "reading unassigned addr 0x%"PRIx64 " size %d"
nubus_super_slot_write(uint64_t addr, uint64_t val, int size) "writing unassigned addr 0x%"PRIx64 " value 0x%"PRIx64 " size %d"
#include "trace/trace-hw_nubus.h"
......@@ -2142,6 +2142,7 @@ if have_system
'hw/misc/macio',
'hw/net',
'hw/net/can',
'hw/nubus',
'hw/nvme',
'hw/nvram',
'hw/pci',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment