[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 1/4] hw/arm/boot: load DTB as a ROM image
From: |
Ard Biesheuvel |
Subject: |
[Qemu-devel] [PATCH v3 1/4] hw/arm/boot: load DTB as a ROM image |
Date: |
Thu, 11 Sep 2014 18:45:12 +0200 |
In order to make the device tree blob (DTB) available in memory not only at
first boot, but also after system reset, use rom_blob_add_fixed() to install
it into memory.
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Ard Biesheuvel <address@hidden>
---
hw/arm/boot.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/hw/arm/boot.c b/hw/arm/boot.c
index e32f2f415885..50eca931e1a4 100644
--- a/hw/arm/boot.c
+++ b/hw/arm/boot.c
@@ -396,7 +396,10 @@ static int load_dtb(hwaddr addr, const struct
arm_boot_info *binfo)
qemu_fdt_dumpdtb(fdt, size);
- cpu_physical_memory_write(addr, fdt, size);
+ /* Put the DTB into the memory map as a ROM image: this will ensure
+ * the DTB is copied again upon reset, even if addr points into RAM.
+ */
+ rom_add_blob_fixed("dtb", fdt, size, addr);
g_free(fdt);
--
1.8.3.2