Signed-off-by: Grant Likely <[email protected]>
---
 hw/arm_boot.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/arm_boot.c b/hw/arm_boot.c
index 22fba26..04b29d8 100644
--- a/hw/arm_boot.c
+++ b/hw/arm_boot.c
@@ -220,8 +220,8 @@ static int load_dtb(target_phys_addr_t addr, const struct 
arm_boot_info *binfo)
             fprintf(stderr, "couldn't set /chosen/linux,initrd-start\n");
 
         rc = qemu_devtree_setprop_cell(fdt, "/chosen", "linux,initrd-end",
-                    binfo->loader_start +INITRD_LOAD_ADDR +
-                    binfo->initrd_size);
+                    binfo->loader_start + INITRD_LOAD_ADDR +
+                    binfo->initrd_size - 1);
         if (rc < 0)
             fprintf(stderr, "couldn't set /chosen/linux,initrd-end\n");
     }

_______________________________________________
devicetree-discuss mailing list
[email protected]
https://lists.ozlabs.org/listinfo/devicetree-discuss

Reply via email to