]> git.baikalelectronics.ru Git - uboot.git/commit
Fix data abort caused by mis-aligning FIT data
authorReuben Dowle <reuben.dowle@4rf.com>
Tue, 1 Sep 2020 21:32:01 +0000 (21:32 +0000)
committerTom Rini <trini@konsulko.com>
Fri, 11 Sep 2020 21:13:56 +0000 (17:13 -0400)
commit9232474632355fc3f881f51ea9cdb6dfee3a48f5
tree93782078ccf62a0559a5b152171bb7ece6f5a717
parent0e4f2469c5af7a185463089cd2cb4f962fc33991
Fix data abort caused by mis-aligning FIT data

Attempting to place device tree immediately after an image in memory can lead
to mis-aligned data accesses if that image size is not divisible by the
alignment requirements of the architecture.

Data aborts caused by this were observed on a custom Marvel A388 based system,
where the image was a uboot FIT file. The total size varies depending on the
uboot device tree size, which does not always lead to correct alignment.

The minimum alignment specified for ARM [1] and ARM64 [2] linux booting has been
used

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/arm/booting.rst#n126
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/arm64/booting.rst#n45

Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
common/spl/spl_fit.c