diff options
author | Prasad J Pandit <pjp@fedoraproject.org> | 2019-01-04 15:19:10 +0530 |
---|---|---|
committer | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2019-02-06 21:07:53 +0000 |
commit | ad280559c68360c9f1cd7be063857853759e6a73 (patch) | |
tree | ed621b31ee9f43933cf9df3fdbb9e95bd84b09d7 /hw/sparc64 | |
parent | c3019efc713c0afd6f0c51602b378f1094ef6e89 (diff) | |
download | qemu-ad280559c68360c9f1cd7be063857853759e6a73.zip qemu-ad280559c68360c9f1cd7be063857853759e6a73.tar.gz qemu-ad280559c68360c9f1cd7be063857853759e6a73.tar.bz2 |
sun4u: add power_mem_read routine
Define skeleton 'power_mem_read' routine. Avoid NULL dereference.
Reported-by: Fakhri Zulkifli <mohdfakhrizulkifli@gmail.com>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Diffstat (limited to 'hw/sparc64')
-rw-r--r-- | hw/sparc64/sun4u.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index 37ecc14..518d695 100644 --- a/hw/sparc64/sun4u.c +++ b/hw/sparc64/sun4u.c @@ -214,6 +214,11 @@ typedef struct PowerDevice { } PowerDevice; /* Power */ +static uint64_t power_mem_read(void *opaque, hwaddr addr, unsigned size) +{ + return 0; +} + static void power_mem_write(void *opaque, hwaddr addr, uint64_t val, unsigned size) { @@ -224,6 +229,7 @@ static void power_mem_write(void *opaque, hwaddr addr, } static const MemoryRegionOps power_mem_ops = { + .read = power_mem_read, .write = power_mem_write, .endianness = DEVICE_NATIVE_ENDIAN, .valid = { |