Forked from
Reform / reform-boundary-uboot
Source project has a limited visibility.
-
Timur Tabi authored
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:
Timur Tabi <timur@freescale.com> Tested-by:
Ira Snyder <iws@ovro.caltech.edu> Acked-by:
Gerald Van Baren <vanbaren@cideas.com> Signed-off-by:
Kumar Gala <galak@kernel.crashing.org>
Timur Tabi authoredThe 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:
Timur Tabi <timur@freescale.com> Tested-by:
Ira Snyder <iws@ovro.caltech.edu> Acked-by:
Gerald Van Baren <vanbaren@cideas.com> Signed-off-by:
Kumar Gala <galak@kernel.crashing.org>