[U-Boot] [PATCH v2 2/8] fdt: parse "reserved-memory" for memory reservation

Simon Glass sjg at chromium.org
Tue Dec 11 01:07:26 UTC 2018


Hi Simon,

On Thu, 29 Nov 2018 at 13:40, Simon Goldschmidt
<simon.k.r.goldschmidt at gmail.com> wrote:
>
> On 27.11.2018 06:40, Simon Goldschmidt wrote:
> > On Tue, Nov 27, 2018 at 2:02 AM Simon Glass <sjg at chromium.org> wrote:
> >> Hi Simon,
> >>
> >> On Sat, 17 Nov 2018 at 02:18, Simon Goldschmidt
> >> <simon.k.r.goldschmidt at gmail.com> wrote:
> >>> boot_fdt_add_mem_rsv_regions() adds reserved memory sections to an lmb
> >>> struct. Currently, it only parses regions described by /memreserve/
> >>> entries.
> >>>
> >>> Extend this to the more commonly used scheme of the "reserved-memory"
> >>> node.
> >>>
> >>> Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt at gmail.com>
> >>> ---
> >>>
> >>> Changes in v2:
> >>> - this patch is new in v2
> >>>
> >>>   common/image-fdt.c | 52 +++++++++++++++++++++++++++++++++++++++-------
> >>>   1 file changed, 44 insertions(+), 8 deletions(-)
> >> Reviewed-by: Simon Glass <sjg at chromium.org>
> >>
> >> But it would be nice to convert this to livetree.
> > OK, let me try that ;-)
>
> So I tried to convert to livetree but since the function
> 'boot_fdt_add_mem_rsv_regions' is used on devicetrees loaded to boot
> Linux, I can't really change it (the 'of' functions use gd->fdt_addr' as
> fallback, which is wrong in that case).
>
> Converting to livetree for the new usecases ('load' and 'tftp' commands)
> would be possible, but would result in code duplication.
>
> What do you think?

Yes I understand. We don't have a livetree version of the setprop APIs.

Regards,
Simon


More information about the U-Boot mailing list