mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
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>
This commit is contained in:
parent
01657c867d
commit
1724f04985
49 changed files with 133 additions and 100 deletions
|
@ -629,7 +629,7 @@ static int prom_init1(SysBusDevice *dev)
|
|||
{
|
||||
ram_addr_t prom_offset;
|
||||
|
||||
prom_offset = qemu_ram_alloc(PROM_SIZE_MAX);
|
||||
prom_offset = qemu_ram_alloc(NULL, "sun4u.prom", PROM_SIZE_MAX);
|
||||
sysbus_init_mmio(dev, PROM_SIZE_MAX, prom_offset | IO_MEM_ROM);
|
||||
return 0;
|
||||
}
|
||||
|
@ -665,7 +665,7 @@ static int ram_init1(SysBusDevice *dev)
|
|||
|
||||
RAM_size = d->size;
|
||||
|
||||
ram_offset = qemu_ram_alloc(RAM_size);
|
||||
ram_offset = qemu_ram_alloc(NULL, "sun4u.ram", RAM_size);
|
||||
sysbus_init_mmio(dev, RAM_size, ram_offset);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue