aboutsummaryrefslogtreecommitdiff
path: root/hw/omap_l4.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/omap_l4.c')
-rw-r--r--hw/omap_l4.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/hw/omap_l4.c b/hw/omap_l4.c
index 59c84b19a2..a4a8883d2a 100644
--- a/hw/omap_l4.c
+++ b/hw/omap_l4.c
@@ -120,7 +120,7 @@ struct omap_l4_s {
struct omap_l4_s *omap_l4_init(target_phys_addr_t base, int ta_num)
{
- struct omap_l4_s *bus = qemu_mallocz(
+ struct omap_l4_s *bus = g_malloc0(
sizeof(*bus) + ta_num * sizeof(*bus->ta));
bus->ta_num = ta_num;
@@ -128,19 +128,19 @@ struct omap_l4_s *omap_l4_init(target_phys_addr_t base, int ta_num)
#ifdef L4_MUX_HACK
omap_l4_io_entries = 1;
- omap_l4_io_entry = qemu_mallocz(125 * sizeof(*omap_l4_io_entry));
+ omap_l4_io_entry = g_malloc0(125 * sizeof(*omap_l4_io_entry));
omap_cpu_io_entry =
cpu_register_io_memory(omap_l4_io_readfn,
omap_l4_io_writefn, bus, DEVICE_NATIVE_ENDIAN);
# define L4_PAGES (0xb4000 / TARGET_PAGE_SIZE)
- omap_l4_io_readb_fn = qemu_mallocz(sizeof(void *) * L4_PAGES);
- omap_l4_io_readh_fn = qemu_mallocz(sizeof(void *) * L4_PAGES);
- omap_l4_io_readw_fn = qemu_mallocz(sizeof(void *) * L4_PAGES);
- omap_l4_io_writeb_fn = qemu_mallocz(sizeof(void *) * L4_PAGES);
- omap_l4_io_writeh_fn = qemu_mallocz(sizeof(void *) * L4_PAGES);
- omap_l4_io_writew_fn = qemu_mallocz(sizeof(void *) * L4_PAGES);
- omap_l4_io_opaque = qemu_mallocz(sizeof(void *) * L4_PAGES);
+ omap_l4_io_readb_fn = g_malloc0(sizeof(void *) * L4_PAGES);
+ omap_l4_io_readh_fn = g_malloc0(sizeof(void *) * L4_PAGES);
+ omap_l4_io_readw_fn = g_malloc0(sizeof(void *) * L4_PAGES);
+ omap_l4_io_writeb_fn = g_malloc0(sizeof(void *) * L4_PAGES);
+ omap_l4_io_writeh_fn = g_malloc0(sizeof(void *) * L4_PAGES);
+ omap_l4_io_writew_fn = g_malloc0(sizeof(void *) * L4_PAGES);
+ omap_l4_io_opaque = g_malloc0(sizeof(void *) * L4_PAGES);
#endif
return bus;