[PATCH] Added FDT PAD memory size while reserving memory for FDT to avoid some memory corruption issue

Selvakumar Velandi selvakumar.velandi at olakrutrim.com
Fri Feb 9 08:52:08 CET 2024


Hi,

Issue:
Linux kernel getting crash after loading kernel in VM system using RISCV
QEMU.

RootCause:
Memory corruption in uboot FDT memory while launching a VM system in RISCV
QEMU.

Fix:
In the board_f.c file the FDT memory region is reserved without FDT padding
bytes. uboot will add some params like bootargs while launching linux.
While relocate the FDT, if its decided as run in the Fixed memory location
i.e fdy_high is set as -1, then the padding bytes not added while
relocating the FDT,
but the size is blindly added with padding bytes without reserving the
physical memory in the FDT header in the image_fdt.c file.

Please find the attached patch file to fix the issue. Please review and
revert your comments.

Regards,
SelvakumarVelandi
Krutrim SI designs

-- 
***
This communication is confidential, may be privileged and is meant only 
for the intended recipient and purpose. No part of this email or any files 
transmitted with it can be shared, copied, forwarded or published online or 
offline, without prior written consent of the sender. If you are not the 
intended recipient, please preserve the confidentiality, delete the e-mail 
and attachments, if any from your system and inform the sender immediately. 
 

***





-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-PATCH-RISCV-QEMU-Add-PAD-size-during-the-FDT-memory-.patch
Type: application/x-patch
Size: 3051 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20240209/5ec8eacc/attachment.bin>


More information about the U-Boot mailing list