aboutsummaryrefslogtreecommitdiff
path: root/hw/core
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2015-03-23 10:24:16 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2015-04-27 18:24:18 +0200
commit339240b5cd42bd13d4f6629f2aedf8b4b07459fb (patch)
treeb221479a166d67300790dbde821200942b42411d /hw/core
parent37d7c08413cd4307f53c83d43b1b06cf2701d7a7 (diff)
downloadqemu-339240b5cd42bd13d4f6629f2aedf8b4b07459fb.zip
qemu-339240b5cd42bd13d4f6629f2aedf8b4b07459fb.tar.gz
qemu-339240b5cd42bd13d4f6629f2aedf8b4b07459fb.tar.bz2
acpi-build: remove dependency from ram_addr.h
ram_addr_t is an internal interface, everyone should go through MemoryRegion. Clean it up by making rom_add_blob return a MemoryRegion* and using the new qemu_ram_resize infrastructure. Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/core')
-rw-r--r--hw/core/loader.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/core/loader.c b/hw/core/loader.c
index d4c441f..7ee675c 100644
--- a/hw/core/loader.c
+++ b/hw/core/loader.c
@@ -835,12 +835,12 @@ err:
return -1;
}
-ram_addr_t rom_add_blob(const char *name, const void *blob, size_t len,
+MemoryRegion *rom_add_blob(const char *name, const void *blob, size_t len,
size_t max_len, hwaddr addr, const char *fw_file_name,
FWCfgReadCallback fw_callback, void *callback_opaque)
{
Rom *rom;
- ram_addr_t ret = RAM_ADDR_MAX;
+ MemoryRegion *mr = NULL;
rom = g_malloc0(sizeof(*rom));
rom->name = g_strdup(name);
@@ -858,7 +858,7 @@ ram_addr_t rom_add_blob(const char *name, const void *blob, size_t len,
if (rom_file_has_mr) {
data = rom_set_mr(rom, OBJECT(fw_cfg), devpath);
- ret = memory_region_get_ram_addr(rom->mr);
+ mr = rom->mr;
} else {
data = rom->data;
}
@@ -867,7 +867,7 @@ ram_addr_t rom_add_blob(const char *name, const void *blob, size_t len,
fw_callback, callback_opaque,
data, rom->datasize);
}
- return ret;
+ return mr;
}
/* This function is specific for elf program because we don't need to allocate