aboutsummaryrefslogtreecommitdiff
path: root/hw/m68k/mcf5206.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2020-10-28 06:15:40 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2020-12-10 12:15:08 -0500
commit5601d24164551b3473588837c4f92ef1bbde0415 (patch)
treee6f173985df95864e68d0b840808e02b7f895b80 /hw/m68k/mcf5206.c
parent86378b29fa22a9854a084241bf51515e149133e4 (diff)
downloadqemu-5601d24164551b3473588837c4f92ef1bbde0415.zip
qemu-5601d24164551b3473588837c4f92ef1bbde0415.tar.gz
qemu-5601d24164551b3473588837c4f92ef1bbde0415.tar.bz2
m68k: do not use ram_size global
Use the machine properties instead. Cc: Laurent Vivier <lvivier@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/m68k/mcf5206.c')
-rw-r--r--hw/m68k/mcf5206.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/m68k/mcf5206.c b/hw/m68k/mcf5206.c
index 92a194d..6d93d76 100644
--- a/hw/m68k/mcf5206.c
+++ b/hw/m68k/mcf5206.c
@@ -10,6 +10,7 @@
#include "qemu/error-report.h"
#include "qemu/log.h"
#include "cpu.h"
+#include "hw/boards.h"
#include "hw/irq.h"
#include "hw/m68k/mcf.h"
#include "qemu/timer.h"
@@ -312,8 +313,9 @@ static uint64_t m5206_mbar_read(m5206_mbar_state *s,
/* FIXME: currently hardcoded to 128Mb. */
{
uint32_t mask = ~0;
- while (mask > ram_size)
+ while (mask > current_machine->ram_size) {
mask >>= 1;
+ }
return mask & 0x0ffe0000;
}
case 0x5c: return 1; /* DRAM bank 1 empty. */