[PATCH] Added FDT PAD memory size while reserving memory for FDT to avoid some memory corruption issue
Tom Rini
trini at konsulko.com
Fri Feb 9 21:25:09 CET 2024
On Fri, Feb 09, 2024 at 07:45:10PM +0530, Selvakumar Velandi wrote:
> The FDT relocation is not disabled. I am adding the FDT PADDING bytes while
> doing FDT reservation in the board_f file.
> Also update the FDT length based on the new allocation, instead of blindly
> increasing the size.
> Currently the size is getting increased even for the relocation disabled
> scenario also.
> So without increasing the physical memory for the disable relocation use
> case, the fdt total size is updated. thus causing memory corruption
Please explain on what system you're seeing this with, and how things
are configured and what else is required to trigger this problem. Your
changes to boot/image-fdt.c change things so that we don't pad the
non-relocated device tree (but we need to, we still change the bootargs
and so forth). And the changes to common/board_f.c look like we're
trying to do that instead, earlier? But we should not have a kernel
corruption problem unless:
- We aren't relocating the device tree
- We aren't relocating the device tree far enough away from the kernel,
but this shouldn't be a problem on arm64 and riscv where the Image
header structure tells us how big the BSS is to be and we obey that.
--
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/20240209/ad253cf0/attachment.sig>
More information about the U-Boot
mailing list