summaryrefslogtreecommitdiffstats
path: root/hw/m68k/mcf5208.c
diff options
context:
space:
mode:
authorPaolo Bonzini2020-10-28 11:15:40 +0100
committerPaolo Bonzini2020-12-10 18:15:08 +0100
commit5601d24164551b3473588837c4f92ef1bbde0415 (patch)
treee6f173985df95864e68d0b840808e02b7f895b80 /hw/m68k/mcf5208.c
parenti386: do not use ram_size global (diff)
downloadqemu-5601d24164551b3473588837c4f92ef1bbde0415.tar.gz
qemu-5601d24164551b3473588837c4f92ef1bbde0415.tar.xz
qemu-5601d24164551b3473588837c4f92ef1bbde0415.zip
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/mcf5208.c')
-rw-r--r--hw/m68k/mcf5208.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/m68k/mcf5208.c b/hw/m68k/mcf5208.c
index 7c8ca5ddf6..2205145ecc 100644
--- a/hw/m68k/mcf5208.c
+++ b/hw/m68k/mcf5208.c
@@ -157,8 +157,9 @@ static uint64_t m5208_sys_read(void *opaque, hwaddr addr,
{
int n;
for (n = 0; n < 32; n++) {
- if (ram_size < (2u << n))
+ if (current_machine->ram_size < (2u << n)) {
break;
+ }
}
return (n - 1) | 0x40000000;
}