mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 02:24:58 -06:00
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:
parent
86378b29fa
commit
5601d24164
3 changed files with 8 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue