From: Keerthy Date: Wed, 30 Jan 2019 20:11:45 +0530 Subject: [U-Boot] [RFC PATCH] common: fdt_support: Remove fdt_add_mem_rsv in fdt_shrink_to_minimum Message-ID: <20190130144145.5389-1-j-keerthy@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de With introduction of commit: a156c47e39ad: tftp: prevent overwriting reserved memory tftp with loadaddr is failing for Images of the size bigger than SPL. The issue is that SPL image is located at bootaddr and dtb is allocated at bootaddr + spl_size. The region where dtb is present is marked reserved. So when the tftp tries to load the Image it tries to find a location from loadaddr to the first reserved memory region which is the dtb base address. The max_size obtained is pretty less and hence tftp fails with the below error: TFTP error: trying to overwrite reserved memory... Signed-off-by: Keerthy --- I am sure there are better solutions so just wanted to know if there is one. common/fdt_support.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/common/fdt_support.c b/common/fdt_support.c index 42583e3ed8..2bb101e56e 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -633,11 +633,6 @@ int fdt_shrink_to_minimum(void *blob, uint extrasize) /* Change the fdt header to reflect the correct size */ fdt_set_totalsize(blob, actualsize); - /* Add the new reservation */ - ret = fdt_add_mem_rsv(blob, map_to_sysmem(blob), actualsize); - if (ret < 0) - return ret; - return actualsize; } -- 2.17.1