summaryrefslogtreecommitdiff
path: root/hw/pc.c
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2010-06-25 11:09:35 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2010-07-06 10:36:28 -0500
commit1724f04985367b15751f11f4a9558f8736b2ab59 (patch)
tree8314db5ca99ed66015af03c2bf494177ae5e4460 /hw/pc.c
parent01657c867d21bbabb1af22c6fe62ff80a2970446 (diff)
downloadqemu-1724f04985367b15751f11f4a9558f8736b2ab59.tar.gz
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/pc.c')
-rw-r--r--hw/pc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/hw/pc.c b/hw/pc.c
index 7b48fbce50..a96187f5b5 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -909,7 +909,8 @@ void pc_memory_init(ram_addr_t ram_size,
linux_boot = (kernel_filename != NULL);
/* allocate RAM */
- ram_addr = qemu_ram_alloc(below_4g_mem_size + above_4g_mem_size);
+ ram_addr = qemu_ram_alloc(NULL, "pc.ram",
+ below_4g_mem_size + above_4g_mem_size);
cpu_register_physical_memory(0, 0xa0000, ram_addr);
cpu_register_physical_memory(0x100000,
below_4g_mem_size - 0x100000,
@@ -932,7 +933,7 @@ void pc_memory_init(ram_addr_t ram_size,
(bios_size % 65536) != 0) {
goto bios_error;
}
- bios_offset = qemu_ram_alloc(bios_size);
+ bios_offset = qemu_ram_alloc(NULL, "pc.bios", bios_size);
ret = rom_add_file_fixed(bios_name, (uint32_t)(-bios_size));
if (ret != 0) {
bios_error:
@@ -950,7 +951,7 @@ void pc_memory_init(ram_addr_t ram_size,
isa_bios_size,
(bios_offset + bios_size - isa_bios_size) | IO_MEM_ROM);
- option_rom_offset = qemu_ram_alloc(PC_ROM_SIZE);
+ option_rom_offset = qemu_ram_alloc(NULL, "pc.rom", PC_ROM_SIZE);
cpu_register_physical_memory(PC_ROM_MIN_VGA, PC_ROM_SIZE, option_rom_offset);
/* map all the bios at the top of memory */