[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] hw/arm/virt: Replace memory_region_init_ram with me
From: |
zhuyijun |
Subject: |
[Qemu-devel] [PATCH] hw/arm/virt: Replace memory_region_init_ram with memory_region_allocate_system_memory |
Date: |
Tue, 14 Oct 2014 10:36:04 +0800 |
From: Zhu Yijun <address@hidden>
Commit 0b183fc871:"memory: move mem_path handling to
memory_region_allocate_system_memory" split memory_region_init_ram and
memory_region_init_ram_from_file. Also it moved mem-path handling a step
up from memory_region_init_ram to memory_region_allocate_system_memory.
Therefore for any board that uses memory_region_init_ram directly,
-mem-path is not supported.
Commit e938ba0c35:"ppc: memory: Replace memory_region_init_ram with
memory_region_allocate_system_memory" have already fixed this on ppc.
arm/arm64 board also occurs, this patch is only for arm64 board(virt).
Signed-off-by: Zhu Yijun <address@hidden>
---
hw/arm/virt.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 8c6b171..32646a1 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -580,9 +580,8 @@ static void machvirt_init(MachineState *machine)
fdt_add_cpu_nodes(vbi);
fdt_add_psci_node(vbi);
- memory_region_init_ram(ram, NULL, "mach-virt.ram", machine->ram_size,
- &error_abort);
- vmstate_register_ram_global(ram);
+ memory_region_allocate_system_memory(ram, NULL, "mach-virt.ram",
+ machine->ram_size);
memory_region_add_subregion(sysmem, vbi->memmap[VIRT_MEM].base, ram);
create_flash(vbi);
--
1.7.1
- [Qemu-devel] [PATCH] hw/arm/virt: Replace memory_region_init_ram with memory_region_allocate_system_memory,
zhuyijun <=
Re: [Qemu-devel] [PATCH] hw/arm/virt: Replace memory_region_init_ram with memory_region_allocate_system_memory, Yijun Zhu, 2014/10/14