mirror of https://github.com/xemu-project/xemu.git
sparc64: do not use ram_size global
Use the machine properties instead. Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
382a04afa0
commit
48c0b1e45f
|
@ -25,6 +25,7 @@
|
|||
|
||||
#include "qemu/osdep.h"
|
||||
#include "cpu.h"
|
||||
#include "hw/boards.h"
|
||||
#include "hw/char/serial.h"
|
||||
#include "hw/sparc/sparc64.h"
|
||||
#include "qemu/timer.h"
|
||||
|
@ -180,7 +181,7 @@ static void main_cpu_reset(void *opaque)
|
|||
cpu_timer_reset(env->hstick);
|
||||
|
||||
env->gregs[1] = 0; /* Memory start */
|
||||
env->gregs[2] = ram_size; /* Memory size */
|
||||
env->gregs[2] = current_machine->ram_size; /* Memory size */
|
||||
env->gregs[3] = 0; /* Machine description XXX */
|
||||
if (nr_resets++ == 0) {
|
||||
/* Power on reset */
|
||||
|
|
|
@ -690,7 +690,7 @@ static void sun4uv_init(MemoryRegion *address_space_mem,
|
|||
initrd_addr = 0;
|
||||
kernel_size = sun4u_load_kernel(machine->kernel_filename,
|
||||
machine->initrd_filename,
|
||||
ram_size, &initrd_size, &initrd_addr,
|
||||
machine->ram_size, &initrd_size, &initrd_addr,
|
||||
&kernel_addr, &kernel_entry);
|
||||
|
||||
sun4u_NVRAM_set_params(nvram, NVRAM_SIZE, "Sun4u", machine->ram_size,
|
||||
|
@ -713,7 +713,7 @@ static void sun4uv_init(MemoryRegion *address_space_mem,
|
|||
fw_cfg = FW_CFG(dev);
|
||||
fw_cfg_add_i16(fw_cfg, FW_CFG_NB_CPUS, (uint16_t)machine->smp.cpus);
|
||||
fw_cfg_add_i16(fw_cfg, FW_CFG_MAX_CPUS, (uint16_t)machine->smp.max_cpus);
|
||||
fw_cfg_add_i64(fw_cfg, FW_CFG_RAM_SIZE, (uint64_t)ram_size);
|
||||
fw_cfg_add_i64(fw_cfg, FW_CFG_RAM_SIZE, (uint64_t)machine->ram_size);
|
||||
fw_cfg_add_i16(fw_cfg, FW_CFG_MACHINE_ID, hwdef->machine_id);
|
||||
fw_cfg_add_i64(fw_cfg, FW_CFG_KERNEL_ADDR, kernel_entry);
|
||||
fw_cfg_add_i64(fw_cfg, FW_CFG_KERNEL_SIZE, kernel_size);
|
||||
|
|
Loading…
Reference in New Issue