[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 09/22] sun4m: fix slavio sysctrl and led register siz
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 09/22] sun4m: fix slavio sysctrl and led register sizes |
Date: |
Tue, 28 Apr 2015 16:40:16 +0200 |
From: Mark Cave-Ayland <address@hidden>
These were being incorrectly declared as MISC_SIZE (1 byte) rather than
4 bytes and 2 bytes respectively. As a result accesses clamped to the
real register size would unexpectedly fail.
Signed-off-by: Mark Cave-Ayland <address@hidden>
CC: Paolo Bonzini <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
hw/misc/slavio_misc.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/hw/misc/slavio_misc.c b/hw/misc/slavio_misc.c
index 5098595..ec50f10 100644
--- a/hw/misc/slavio_misc.c
+++ b/hw/misc/slavio_misc.c
@@ -68,6 +68,7 @@ typedef struct APCState {
} APCState;
#define MISC_SIZE 1
+#define LED_SIZE 2
#define SYSCTRL_SIZE 4
#define AUX1_TC 0x02
@@ -452,13 +453,13 @@ static int slavio_misc_init1(SysBusDevice *sbd)
/* 16 bit registers */
/* ss600mp diag LEDs */
memory_region_init_io(&s->led_iomem, OBJECT(s), &slavio_led_mem_ops, s,
- "leds", MISC_SIZE);
+ "leds", LED_SIZE);
sysbus_init_mmio(sbd, &s->led_iomem);
/* 32 bit registers */
/* System control */
memory_region_init_io(&s->sysctrl_iomem, OBJECT(s),
&slavio_sysctrl_mem_ops, s,
- "system-control", MISC_SIZE);
+ "system-control", SYSCTRL_SIZE);
sysbus_init_mmio(sbd, &s->sysctrl_iomem);
/* AUX 1 (Misc System Functions) */
--
2.3.5
- [Qemu-devel] [PULL 00/22] Memory, TCG, NBD, build system changes for 2015-04-27, Paolo Bonzini, 2015/04/28
- [Qemu-devel] [PULL 01/22] translate-all: use glib for all page descriptor allocations, Paolo Bonzini, 2015/04/28
- [Qemu-devel] [PULL 02/22] exec: Atomic access to bounce buffer, Paolo Bonzini, 2015/04/28
- [Qemu-devel] [PULL 04/22] exec: Protect map_client_list with mutex, Paolo Bonzini, 2015/04/28
- [Qemu-devel] [PULL 03/22] linux-user, bsd-user: Remove two calls to cpu_exec_init_all, Paolo Bonzini, 2015/04/28
- [Qemu-devel] [PULL 05/22] exec: Notify cpu_register_map_client caller if the bounce buffer is available, Paolo Bonzini, 2015/04/28
- [Qemu-devel] [PULL 06/22] dma-helpers: Fix race condition of continue_after_map_failure and dma_aio_cancel, Paolo Bonzini, 2015/04/28
- [Qemu-devel] [PULL 07/22] memory: add memory_region_ram_resize, Paolo Bonzini, 2015/04/28
- [Qemu-devel] [PULL 08/22] acpi-build: remove dependency from ram_addr.h, Paolo Bonzini, 2015/04/28
- [Qemu-devel] [PULL 09/22] sun4m: fix slavio sysctrl and led register sizes,
Paolo Bonzini <=
- [Qemu-devel] [PULL 10/22] sb16: remove useless mixer_write_indexw, Paolo Bonzini, 2015/04/28
- [Qemu-devel] [PULL 11/22] gus: clean up MemoryRegionPortio, Paolo Bonzini, 2015/04/28
- [Qemu-devel] [PULL 12/22] ide: there is only one data port, Paolo Bonzini, 2015/04/28
- [Qemu-devel] [PULL 13/22] ioport: remove wrong comment, Paolo Bonzini, 2015/04/28
- [Qemu-devel] [PULL 14/22] ioport: loosen assertions on emulation of 16-bit ports, Paolo Bonzini, 2015/04/28
- [Qemu-devel] [PULL 15/22] ioport: reserve the whole range of an I/O port in the AddressSpace, Paolo Bonzini, 2015/04/28
- [Qemu-devel] [PULL 16/22] exec: Respect as_translate_internal length clamp, Paolo Bonzini, 2015/04/28
- [Qemu-devel] [PULL 18/22] milkymist: do not modify libs-softmmu, Paolo Bonzini, 2015/04/28
- [Qemu-devel] [PULL 17/22] configure: Add support for tcmalloc, Paolo Bonzini, 2015/04/28
- [Qemu-devel] [PULL 19/22] Makefile.target: prepend $libs_softmmu to $LIBS, Paolo Bonzini, 2015/04/28