From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerry Van Baren Date: Sat, 17 Jan 2009 13:19:31 -0500 Subject: [U-Boot] [PATCH] fdt_resize(): fix actualsize calculations with unaligned blobs In-Reply-To: <1231937544-16452-1-git-send-email-jacmet@sunsite.dk> References: <1231937544-16452-1-git-send-email-jacmet@sunsite.dk> Message-ID: <49722133.5000406@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Peter Korsgaard wrote: > The code in fdt_resize() to extend the fdt size to end on a page boundary > is wrong for fdt's not located at an address aligned on a page boundary. > What's even worse, the code would make actualsize shrink rather than grow > if (blob & 0xfff) was bigger than the amount of padding added by ALIGN(), > causing fdt_add_mem_rsv to fail. > > Fix it by aligning end address (blob + size) to a page boundary instead. > For aligned fdt's this is equivalent to what we had before. > > Signed-off-by: Peter Korsgaard Applied to u-boot-fdt. I will call for Wolfgang to pull shortly. Thanks, gvb