diff options
author | Igor Mammedov <imammedo@redhat.com> | 2020-02-19 11:09:44 -0500 |
---|---|---|
committer | Patchew Importer <importer@patchew.org> | 2020-02-19 16:50:01 +0000 |
commit | b2554752b1da7c8fa8f16d5551743e66ccce0a67 (patch) | |
tree | 82e88d4b58a066740df03124da459b61dc6570d7 /default-configs/or1k-linux-user.mak | |
parent | fe3e7b71e68ad0272d535afbc2b38a82e6c5379a (diff) |
sparc/sun4m: use memdev for RAM
memory_region_allocate_system_memory() API is going away, so
replace it with memdev allocated MemoryRegion. The later is
initialized by generic code, so board only needs to opt in
to memdev scheme by providing
MachineClass::default_ram_id
and using MachineState::ram instead of manually initializing
RAM memory region.
Patch moves ram size check into sun4m_hw_init() and drops
ram_init() moving remainder to sun4m_hw_init() as well,
as it was the only place that called it.
Also it rewrites impl. of RamDevice a little bit, which
could serve as an example of frontend device for RAM backend.
(Caveats are:
1. it doesn't check for memdev backend being mapped
since it's been usurped by generic machine to handle
majority of machines which don't have RAM frontend device
2. it still lacks 'addr' property and still has hardcoded
sysbus_mmio_map() in board init. If done right, board should
set 'addr' property and bus/machine plug handler should map
it during device realize time.
)
Further improvements were left as exercise for the future,
since frontends are out scope of RAM conversion to memdev.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20200219160953.13771-71-imammedo@redhat.com>
Diffstat (limited to 'default-configs/or1k-linux-user.mak')
0 files changed, 0 insertions, 0 deletions