aboutsummaryrefslogtreecommitdiff
path: root/hw/sparc64/sparc64.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2020-10-28 06:14:33 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2020-12-10 12:15:09 -0500
commit48c0b1e45f364e75a450ddd0ebbbf84b28197d6e (patch)
tree218b0fd5d34c2b96010cd05022e78ac7947ca21f /hw/sparc64/sparc64.c
parent382a04afa075927d843f11e9fb8c450a084bbfa8 (diff)
downloadqemu-48c0b1e45f364e75a450ddd0ebbbf84b28197d6e.zip
qemu-48c0b1e45f364e75a450ddd0ebbbf84b28197d6e.tar.gz
qemu-48c0b1e45f364e75a450ddd0ebbbf84b28197d6e.tar.bz2
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>
Diffstat (limited to 'hw/sparc64/sparc64.c')
-rw-r--r--hw/sparc64/sparc64.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/sparc64/sparc64.c b/hw/sparc64/sparc64.c
index 100b2fa..e3f9219 100644
--- a/hw/sparc64/sparc64.c
+++ b/hw/sparc64/sparc64.c
@@ -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 */