diff options
author | Alex Williamson | 2010-06-25 19:09:35 +0200 |
---|---|---|
committer | Anthony Liguori | 2010-07-06 17:36:28 +0200 |
commit | 1724f04985367b15751f11f4a9558f8736b2ab59 (patch) | |
tree | 8314db5ca99ed66015af03c2bf494177ae5e4460 /hw/omap_sx1.c | |
parent | virtio-net: Incorporate a DeviceState pointer and let savevm track instances (diff) | |
download | qemu-1724f04985367b15751f11f4a9558f8736b2ab59.tar.gz qemu-1724f04985367b15751f11f4a9558f8736b2ab59.tar.xz qemu-1724f04985367b15751f11f4a9558f8736b2ab59.zip |
qemu_ram_alloc: Add DeviceState and name parameters
These will be used to generate unique id strings for ramblocks. The name
field is required, the device pointer is optional as most callers don't
have a device. When there's no device or the device isn't a child of
a bus implementing BusInfo.get_dev_path, the name should be unique for
the platform.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/omap_sx1.c')
-rw-r--r-- | hw/omap_sx1.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/hw/omap_sx1.c b/hw/omap_sx1.c index 2e9879f0ef..c3f197393d 100644 --- a/hw/omap_sx1.c +++ b/hw/omap_sx1.c @@ -139,7 +139,8 @@ static void sx1_init(ram_addr_t ram_size, /* External Flash (EMIFS) */ cpu_register_physical_memory(OMAP_CS0_BASE, flash_size, - qemu_ram_alloc(flash_size) | IO_MEM_ROM); + qemu_ram_alloc(NULL, "omap_sx1.flash0-0", + flash_size) | IO_MEM_ROM); io = cpu_register_io_memory(static_readfn, static_writefn, &cs0val); cpu_register_physical_memory(OMAP_CS0_BASE + flash_size, @@ -157,7 +158,8 @@ static void sx1_init(ram_addr_t ram_size, #endif if ((dinfo = drive_get(IF_PFLASH, 0, fl_idx)) != NULL) { - if (!pflash_cfi01_register(OMAP_CS0_BASE, qemu_ram_alloc(flash_size), + if (!pflash_cfi01_register(OMAP_CS0_BASE, qemu_ram_alloc(NULL, + "omap_sx1.flash0-1", flash_size), dinfo->bdrv, sector_size, flash_size / sector_size, 4, 0, 0, 0, 0, be)) { @@ -170,12 +172,14 @@ static void sx1_init(ram_addr_t ram_size, if ((version == 1) && (dinfo = drive_get(IF_PFLASH, 0, fl_idx)) != NULL) { cpu_register_physical_memory(OMAP_CS1_BASE, flash1_size, - qemu_ram_alloc(flash1_size) | IO_MEM_ROM); + qemu_ram_alloc(NULL, "omap_sx1.flash1-0", + flash1_size) | IO_MEM_ROM); io = cpu_register_io_memory(static_readfn, static_writefn, &cs1val); cpu_register_physical_memory(OMAP_CS1_BASE + flash1_size, OMAP_CS1_SIZE - flash1_size, io); - if (!pflash_cfi01_register(OMAP_CS1_BASE, qemu_ram_alloc(flash1_size), + if (!pflash_cfi01_register(OMAP_CS1_BASE, qemu_ram_alloc(NULL, + "omap_sx1.flash1-1", flash1_size), dinfo->bdrv, sector_size, flash1_size / sector_size, 4, 0, 0, 0, 0, be)) { |