mirror of
https://github.com/xemu-project/xemu.git
synced 2025-01-23 12:27:11 +00:00
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>
This commit is contained in:
parent
c3019efc71
commit
ad280559c6
@ -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 = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user