From 1724f04985367b15751f11f4a9558f8736b2ab59 Mon Sep 17 00:00:00 2001 From: Alex Williamson Date: Fri, 25 Jun 2010 11:09:35 -0600 Subject: 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 Signed-off-by: Anthony Liguori --- hw/pc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'hw/pc.c') 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 */ -- cgit 1.4.1