[U-Boot] [PATCH] ARM: rmobile: Convert to bootm_size
Tom Rini
trini at konsulko.com
Wed Nov 28 01:23:38 UTC 2018
On Tue, Nov 27, 2018 at 08:03:04AM +0100, Simon Goldschmidt wrote:
> On Tue, Nov 27, 2018 at 1:11 AM Marek Vasut <marek.vasut at gmail.com> wrote:
> >
> > Convert all Renesas R-Car boards to bootm_size of 256 MiB and drop both
> > fdt_high and initrd_high. This change implies that the FDT and initrd
> > will always be copied into the first 256 MiB of RAM instead of being
> > used in place, which can cause various kinds of inobvious problems.
> >
> > The simpler problems include FDT or initrd being overwritten or being
> > used from unaligned addresses, especially on ARM64. The overhead of
> > copying the FDT to aligned location is negligible and these problems
> > go away, so the benefit is significant.
> >
> > Regarding alignment problems with fitImage. The alignment of DT properties
> > is always 32 bits, which implies that the alignment of the "data" property
> > in fitImage is also 32 bits. The /incbin/ syntax plays no role here. The
> > kernel expects all elements, including DT and initrd, to be aligned to
> > 64 bits on ARM64, thus using them in place may not be possible. Using the
> > bootm_size assures correct alignment, again with negligible overhead.
>
> In my opinion, all of these raw addresses defined in scripts or config
> should be removed: They are probably vulnerable to overwriting
> themselves as they only provide an address, not a range.
>
> Just out of curiosity: is it required to put fdt and initrd into the
> first 256 MiB or is this just some 'random' limit to ensure we use lmb
It's the smallest limit that both gives us room for fairly large
ramdisks, kernels and device tree yet will still be within lowmem for
Linux and otherwise meet the requirements of both
linux/Documentation/arm/Booting and linux/Documentation/arm64/booting.txt
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181127/0aff0888/attachment.sig>
More information about the U-Boot
mailing list