mirror of https://github.com/xqemu/xqemu.git
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>
This commit is contained in:
parent
211ecdc0e4
commit
3f7132d1a3
|
@ -82,7 +82,8 @@ void sysbus_pass_irq(SysBusDevice *dev, SysBusDevice *target)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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)
|
||||||
{
|
{
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ struct SysBusDevice {
|
||||||
target_phys_addr_t addr;
|
target_phys_addr_t addr;
|
||||||
target_phys_addr_t size;
|
target_phys_addr_t size;
|
||||||
mmio_mapfunc cb;
|
mmio_mapfunc cb;
|
||||||
int iofunc;
|
ram_addr_t iofunc;
|
||||||
} mmio[QDEV_MAX_MMIO];
|
} 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_dev(const char *name, size_t size, sysbus_initfn init);
|
||||||
void sysbus_register_withprop(SysBusDeviceInfo *info);
|
void sysbus_register_withprop(SysBusDeviceInfo *info);
|
||||||
void *sysbus_new(void);
|
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,
|
void sysbus_init_mmio_cb(SysBusDevice *dev, target_phys_addr_t size,
|
||||||
mmio_mapfunc cb);
|
mmio_mapfunc cb);
|
||||||
void sysbus_init_irq(SysBusDevice *dev, qemu_irq *p);
|
void sysbus_init_irq(SysBusDevice *dev, qemu_irq *p);
|
||||||
|
|
Loading…
Reference in New Issue