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

Simon Goldschmidt simon.k.r.goldschmidt at gmail.com
Thu Nov 29 20:40:39 UTC 2018


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?

Regards,
Simon


More information about the U-Boot mailing list