ppc: do not use ram_size global

Use the machine properties instead.

Cc: qemu-ppc@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2020-10-28 06:17:31 -04:00
parent 541693a419
commit ead2b283ad
2 changed files with 3 additions and 3 deletions

View File

@ -420,7 +420,7 @@ static void ibm_40p_init(MachineState *machine)
/* Prepare firmware configuration for Open Hack'Ware */ /* Prepare firmware configuration for Open Hack'Ware */
if (m48t59) { if (m48t59) {
PPC_NVRAM_set_params(m48t59, NVRAM_SIZE, "PREP", ram_size, PPC_NVRAM_set_params(m48t59, NVRAM_SIZE, "PREP", machine->ram_size,
boot_device, boot_device,
kernel_base, kernel_size, kernel_base, kernel_size,
machine->kernel_cmdline, machine->kernel_cmdline,

View File

@ -525,10 +525,10 @@ static void spapr_vio_busdev_realize(DeviceState *qdev, Error **errp)
uint32_t liobn = SPAPR_VIO_LIOBN(dev->reg); uint32_t liobn = SPAPR_VIO_LIOBN(dev->reg);
memory_region_init(&dev->mrroot, OBJECT(dev), "iommu-spapr-root", memory_region_init(&dev->mrroot, OBJECT(dev), "iommu-spapr-root",
ram_size); MACHINE(spapr)->ram_size);
memory_region_init_alias(&dev->mrbypass, OBJECT(dev), memory_region_init_alias(&dev->mrbypass, OBJECT(dev),
"iommu-spapr-bypass", get_system_memory(), "iommu-spapr-bypass", get_system_memory(),
0, ram_size); 0, MACHINE(spapr)->ram_size);
memory_region_add_subregion_overlap(&dev->mrroot, 0, &dev->mrbypass, 1); memory_region_add_subregion_overlap(&dev->mrroot, 0, &dev->mrbypass, 1);
address_space_init(&dev->as, &dev->mrroot, qdev->id); address_space_init(&dev->as, &dev->mrroot, qdev->id);