[PATCH 05/14] lmb: Add generic arch_lmb_reserve_generic()

Tom Rini trini at konsulko.com
Sun Aug 15 21:49:19 CEST 2021


On Sun, Aug 15, 2021 at 08:13:05PM +0200, Marek Vasut wrote:

> The arc/arm/m68k/microblaze/mips/ppc arch_lmb_reserve() implementations
> are all mostly the same, except for a couple of details. Implement a
> generic arch_lmb_reserve_generic() function which can be parametrized
> enough to cater for those differences between architectures. This can
> also be parametrized enough so it can handle cases where U-Boot is not
> relocated to the end of DRAM e.g. because there is some other reserved
> memory past U-Boot (e.g. unmovable firmware for coprocessor), it is not
> relocated at all, and other such use cases.
[snip]
> +void arch_lmb_reserve_generic(struct lmb *lmb, ulong sp, ulong end, ulong align)
> +{
> +	ulong bank_end;
> +	int bank;
> +
> +	/*
> +	 * Booting a (Linux) kernel image
> +	 *
> +	 * Allocate space for command line and board info - the
> +	 * address should be as high as possible within the reach of
> +	 * the kernel (see CONFIG_SYS_BOOTMAPSZ settings), but in unused
> +	 * memory, which means far enough below the current stack
> +	 * pointer.
> +	 */

This comment is wrong, and we need to fix it, rather than continue to
perpetuate it.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210815/bc849c4a/attachment.sig>


More information about the U-Boot mailing list