[U-Boot] U-Boot overlaps BSS and initrd on arm64
Dmitry Vyukov
dvyukov at google.com
Tue Nov 8 18:41:13 CET 2016
Hello,
We've got a boot problem on arm64 devices. Here is boot log:
https://storage.kernelci.org/mainline/v4.9-rc4/arm64-defconfig+CONFIG_KASAN=y/lab-baylibre-seattle/boot-juno-r2.txt
https://kernelci.org/boot/id/581ece5a59b514e448f03bd7/
Here is some debugging that Andrey and Mark did:
On Tue, Nov 8, 2016 at 2:00 AM, Andrey Ryabinin wrote:
> I've looked at juno-r2: https://kernelci.org/boot/id/581ece5a59b514e448f03bd7/
> So we have
> Dtb address 0x81f00000
> Load address 0x80000000
> Which gives us 31Mb for kernel.
>
> It says that Kernel image is 24.62 MiB, but that's without BSS.
> If bss is big enough it might overwrite dtb.
> And indeed, build details -
> https://kernelci.org/build/id/581e850959b514e564f03bdc/
> shows that bss is 8.5 Mb which is enough to overlap with dtb.
On Tue, Nov 8, 2016 at 3:21 AM, Mark Rutland wrote:
> FWIW, since v3.17 we've had an image_size field in the arm64 Image
> header which describes the "real" size of the Image, BSS included. See
> [1,2].
> It should be possible to modify U-Boot to use that to automatically
> place the DTB and initrd at non-clashing locations (or at least to
> expose the value somehow).
> I had assumed U-Boot already did that, but it doesn't seem to be the
> case.
> [1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=a2c1d73b94ed49f5fac12e95052d7b140783f800
> [2] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/arm64/booting.txt?h=v4.9-rc4
Thanks
More information about the U-Boot
mailing list