All of lore.kernel.org
 help / color / mirror / Atom feed
* Possiable memory conflict with fdt memory region
@ 2021-12-27 11:10 Fangsuo Wu
  2022-01-27 15:06 ` Simon Glass
  0 siblings, 1 reply; 2+ messages in thread
From: Fangsuo Wu @ 2021-12-27 11:10 UTC (permalink / raw)
  To: u-boot

Hi,  in image_setup_linux(),
stage 1: Boot_fdt_add_mem_rsv_regions() is called first to add the mem
reserve regions which prevents u-boot from using them to store the
initrd or the fdt blob;
stage 2: Then boot_relocate_fdt() is called to reserve or alloc fdt
blob from the avaiable lmb region.

But it seems  at stage 1 it doesn't cover up all mem reserve regions.
For example, if CMD_PSTORE is configured,  fdt_fixup_pstore(blob) will
add pstore to reserved-memory node in fdt in image_setup_libfdt()
after stage 2 , which may conflict with fdt memory region and can't be
detected since fdt_fixup_pstore doesn't call lmb_reserve(lmb, pstrore
addr, pstore len).

In image_setup_libfdt, there are also other functions like
ft_board_setup which may change existing reserved memory node's size
and lead to the same issue.

Do you think  a common function is needed before
boot_fdt_add_mem_rsv_regions() in stage 1? The function can be used to
fix-up or add new reserved memory nodes. Thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-27 15:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-27 11:10 Possiable memory conflict with fdt memory region Fangsuo Wu
2022-01-27 15:06 ` Simon Glass

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.