summary refs log tree commit diff stats
path: root/hw/sysbus.h
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2010-10-02 14:27:41 +0000
committerBlue Swirl <blauwirbel@gmail.com>2010-10-02 14:27:41 +0000
commit3f7132d1a35040331ae4541f010713b835be75e3 (patch)
treec91ee1faef87dc1ac6d7b38dfabad575decba290 /hw/sysbus.h
parent211ecdc0e4226e86c406b0ce91ed355fdde021ab (diff)
downloadfocaccia-qemu-3f7132d1a35040331ae4541f010713b835be75e3.tar.gz
focaccia-qemu-3f7132d1a35040331ae4541f010713b835be75e3.zip
sysbus: fix address truncation
Fix address truncation in sysbus by using a wider type.

Reported-by: Artyom Tarasenko <atar4qemu@googlemail.com>
Tested-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/sysbus.h')
-rw-r--r--hw/sysbus.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/sysbus.h b/hw/sysbus.h
index 1a8f289c75..5980901845 100644
--- a/hw/sysbus.h
+++ b/hw/sysbus.h
@@ -21,7 +21,7 @@ struct SysBusDevice {
         target_phys_addr_t addr;
         target_phys_addr_t size;
         mmio_mapfunc cb;
-        int iofunc;
+        ram_addr_t iofunc;
     } mmio[QDEV_MAX_MMIO];
 };
 
@@ -39,7 +39,8 @@ typedef struct {
 void sysbus_register_dev(const char *name, size_t size, sysbus_initfn init);
 void sysbus_register_withprop(SysBusDeviceInfo *info);
 void *sysbus_new(void);
-void sysbus_init_mmio(SysBusDevice *dev, target_phys_addr_t size, int iofunc);
+void sysbus_init_mmio(SysBusDevice *dev, target_phys_addr_t size,
+                      ram_addr_t iofunc);
 void sysbus_init_mmio_cb(SysBusDevice *dev, target_phys_addr_t size,
                             mmio_mapfunc cb);
 void sysbus_init_irq(SysBusDevice *dev, qemu_irq *p);