diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2020-10-28 06:18:20 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-12-10 12:15:07 -0500 |
commit | 6e504a989dece8136d58f9f7c42f6e22b1ce49ae (patch) | |
tree | ab27d39dffde32254fd3e70b81aa1f996090ca2a /hw/arm | |
parent | d619f157a50f0c98baee2dce0b6a5ca66fa89ac9 (diff) | |
download | qemu-6e504a989dece8136d58f9f7c42f6e22b1ce49ae.zip |
arm: do not use ram_size global
Use the machine properties instead.
Cc: qemu-ppc@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/arm')
-rw-r--r-- | hw/arm/aspeed.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index bfe2051cfe..a17b75f494 100644 --- a/hw/arm/aspeed.c +++ b/hw/arm/aspeed.c @@ -309,7 +309,7 @@ static void aspeed_machine_init(MachineState *machine) /* * This will error out if isize is not supported by memory controller. */ - object_property_set_uint(OBJECT(&bmc->soc), "ram-size", ram_size, + object_property_set_uint(OBJECT(&bmc->soc), "ram-size", machine->ram_size, &error_fatal); for (i = 0; i < sc->macs_num; i++) { @@ -346,8 +346,8 @@ static void aspeed_machine_init(MachineState *machine) max_ram_size = object_property_get_uint(OBJECT(&bmc->soc), "max-ram-size", &error_abort); memory_region_init_io(&bmc->max_ram, NULL, &max_ram_ops, NULL, - "max_ram", max_ram_size - ram_size); - memory_region_add_subregion(&bmc->ram_container, ram_size, &bmc->max_ram); + "max_ram", max_ram_size - machine->ram_size); + memory_region_add_subregion(&bmc->ram_container, machine->ram_size, &bmc->max_ram); aspeed_board_init_flashes(&bmc->soc.fmc, bmc->fmc_model ? bmc->fmc_model : amc->fmc_model); @@ -392,7 +392,7 @@ static void aspeed_machine_init(MachineState *machine) aspeed_board_binfo.smp_loader_start = AST_SMP_MBOX_CODE; } - aspeed_board_binfo.ram_size = ram_size; + aspeed_board_binfo.ram_size = machine->ram_size; aspeed_board_binfo.loader_start = sc->memmap[ASPEED_DEV_SDRAM]; aspeed_board_binfo.nb_cpus = sc->num_cpus; |