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/ppc4xx_devs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'hw/ppc4xx_devs.c') diff --git a/hw/ppc4xx_devs.c b/hw/ppc4xx_devs.c index 37a3948..b15db81 100644 --- a/hw/ppc4xx_devs.c +++ b/hw/ppc4xx_devs.c @@ -668,7 +668,9 @@ ram_addr_t ppc4xx_sdram_adjust(ram_addr_t ram_size, int nr_banks, unsigned int bank_size = sdram_bank_sizes[j]; if (bank_size <= size_left) { - ram_bases[i] = qemu_ram_alloc(bank_size); + char name[32]; + snprintf(name, sizeof(name), "ppc4xx.sdram%d", i); + ram_bases[i] = qemu_ram_alloc(NULL, name, bank_size); ram_sizes[i] = bank_size; size_left -= bank_size; break; -- cgit v1.1