]> xenbits.xensource.com Git - xen.git/commitdiff
bootfdt: Unify early printing of memory ranges endpoints
authorMichal Orzel <michal.orzel@amd.com>
Tue, 19 Nov 2024 11:51:41 +0000 (12:51 +0100)
committerStefano Stabellini <stefano.stabellini@amd.com>
Tue, 19 Nov 2024 21:45:16 +0000 (13:45 -0800)
At the moment, when printing memory ranges during early boot, endpoints
of some ranges are printed as inclusive (RAM, RESVD, SHMEM) and some
as exclusive (Initrd, MODULE). Make the behavior consistent and print
all the endpoints as inclusive.

Signed-off-by: Michal Orzel <michal.orzel@amd.com>
Reviewed-by: Luca Fancellu <luca.fancellu@arm.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
xen/common/device-tree/bootfdt.c

index 927f59c64b0d64842e2a0fd09562ac919c204e6e..480644b4b421dc2b29a6f465019ea1d284e31062 100644 (file)
@@ -439,7 +439,7 @@ static int __init process_chosen_node(const void *fdt, int node,
         return -EINVAL;
     }
 
-    printk("Initrd %"PRIpaddr"-%"PRIpaddr"\n", start, end);
+    printk("Initrd %"PRIpaddr"-%"PRIpaddr"\n", start, end - 1);
 
     add_boot_module(BOOTMOD_RAMDISK, start, end-start, false);
 
@@ -524,7 +524,7 @@ static void __init early_print_info(void)
         printk("MODULE[%d]: %"PRIpaddr" - %"PRIpaddr" %-12s\n",
                 i,
                 mods->module[i].start,
-                mods->module[i].start + mods->module[i].size,
+                mods->module[i].start + mods->module[i].size - 1,
                 boot_module_kind_as_string(mods->module[i].kind));
 
     for ( i = 0; i < mem_resv->nr_banks; i++ )