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>
This commit is contained in:
Paolo Bonzini 2020-10-28 06:15:40 -04:00
parent 86378b29fa
commit 5601d24164
3 changed files with 8 additions and 4 deletions

View file

@ -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;
}