diff options
author | Nathan Rossi <nathan@nathanrossi.com> | 2016-12-19 00:03:34 +1000 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2016-12-20 09:15:28 +0100 |
commit | de9bf1b591a80ef8fce8cad5c3d5a1139d136a77 (patch) | |
tree | bb35e0536d8903acca368a6b078776767e2bd3b5 /board/dnp5370/Makefile | |
parent | 623f60198b38c4fdae596038cd5956e44b6224a4 (diff) | |
download | u-boot-imx-de9bf1b591a80ef8fce8cad5c3d5a1139d136a77.zip u-boot-imx-de9bf1b591a80ef8fce8cad5c3d5a1139d136a77.tar.gz u-boot-imx-de9bf1b591a80ef8fce8cad5c3d5a1139d136a77.tar.bz2 |
ARM: zynq: Replace board specific with generic memory bank decoding
The dram_init and dram_init_banksize functions were using a board
specific implementation for decoding the memory banks from the fdt. This
board specific implementation uses a static variable 'tmp' which makes
these functions unsafe for execution from within the board_init_f
context.
This unsafe use of a static variable was causing a specific bug when
using the zynq_zybo configuration, U-Boot would generate the following
error during image load. This was caused due to dram_init overwriting
the relocations for the 'image' variable within the do_bootm function.
Out of coincidence the un-initialized memory has a compression type
which is the same as the value for the relocation type R_ARM_RELATIVE.
Uncompressing Invalid Image ... Unimplemented compression type 23
It should be noted that this is just one way the issue could surface,
other cases my not be observed in normal boot flow. Depending on the
size of various sections, and location of relocations within __rel_dyn
and the compiler/linker the outcome of this bug can differ greatly.
This change makes the dram_init* functions use a generic implementation
of decoding and populating memory bank and size data.
Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Fixes: 758f29d0f8 ("ARM: zynq: Support systems with more memory banks")
Cc: Michal Simek <monstr@monstr.eu>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'board/dnp5370/Makefile')
0 files changed, 0 insertions, 0 deletions