Skip to content
Snippets Groups Projects
Commit c088a108 authored by Peter Korsgaard's avatar Peter Korsgaard Committed by Gerald Van Baren
Browse files

fdt_resize(): fix actualsize calculations with unaligned blobs


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: default avatarPeter Korsgaard <jacmet@sunsite.dk>
parent fadad157
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment