]> git.baikalelectronics.ru Git - arm-tf.git/commitdiff
fix(zynqmp): fix DT reserved allocated size
authorMichal Simek <michal.simek@amd.com>
Mon, 13 Feb 2023 12:11:28 +0000 (13:11 +0100)
committerMichal Simek <michal.simek@amd.com>
Mon, 13 Feb 2023 12:19:03 +0000 (13:19 +0100)
BL31_LIMIT is not size but reserved node reg property contains base
address and size that's why BL31_LIMIT - BL31_BASE + 1 is correct size
of reseved space for BL31.
Also update warning message to cover that it is for BL31.

Change-Id: I53f53d2170eb873f758f9ba250d54f57f0b562b4
Signed-off-by: Michal Simek <michal.simek@amd.com>
plat/xilinx/zynqmp/bl31_zynqmp_setup.c

index 1d59537d511fece534b2ca0ca8d4f7e70ccbdf16..36cf992e60616dd2c704d618933a4fc1b7d9ea35 100644 (file)
@@ -197,8 +197,9 @@ static void prepare_dtb(void)
        }
 
        /* Reserve memory used by Trusted Firmware. */
-       if (fdt_add_reserved_memory(dtb, "tf-a", BL31_BASE, BL31_LIMIT - BL31_BASE)) {
-               WARN("Failed to add reserved memory nodes to DT.\n");
+       if (fdt_add_reserved_memory(dtb, "tf-a", BL31_BASE,
+                                   BL31_LIMIT - BL31_BASE + 1)) {
+               WARN("Failed to add reserved memory nodes for BL31 to DT.\n");
        }
 
        ret = fdt_pack(dtb);