Skip to content
Snippets Groups Projects
Commit 43b08af5 authored by Timur Tabi's avatar Timur Tabi Committed by Kumar Gala
Browse files

always relocate fdt into an lmb-allocated memory block


The device tree (fdt) must always exist in within the bootmap (usually the
first 16MB of RAM).  If it doesn't, then boot_relocate_fdt() will allocate
an LMB region in the bootmap and copy the fdt into that region.  It will
also increase the size of the fdt.

If the fdt is already in the bootmap, then previously the memory was just
reserved.  There was no contingency if the reservation failed, however.

By always allocating an lmb region and copying/resizing the fdt into that
region, the code is simplified and the memory region is always allocated
properly.

Also change the types of some variables to avoid some typecasts.

Signed-off-by: default avatarTimur Tabi <timur@freescale.com>
Tested-by: default avatarIra Snyder <iws@ovro.caltech.edu>
Acked-by: default avatarGerald Van Baren <vanbaren@cideas.com>
Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
parent a1964ea5
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