[PATCH v2] common/board_f: make sure to call fix_fdt() before reserve_fdt()

Pragnesh Patel pragnesh.patel at sifive.com
Thu Aug 13 06:17:48 CEST 2020


Hi Rick,

>-----Original Message-----
>From: Rick Chen <rickchen36 at gmail.com>
>Sent: 13 August 2020 08:59
>To: Pragnesh Patel <pragnesh.patel at sifive.com>
>Cc: U-Boot Mailing List <u-boot at lists.denx.de>; Atish Patra
><atish.patra at wdc.com>; Bin Meng <bmeng.cn at gmail.com>; Anup Patel
><anup.patel at wdc.com>; Sagar Kadam <sagar.kadam at sifive.com>; Paul
>Walmsley ( Sifive) <paul.walmsley at sifive.com>; Simon Glass
><sjg at chromium.org>; ovpanait at gmail.com; swarren at nvidia.com; rick
><rick at andestech.com>; Alan Kao <alankao at andestech.com>
>Subject: Re: [PATCH v2] common/board_f: make sure to call fix_fdt() before
>reserve_fdt()
>
>[External Email] Do not click links or attachments unless you recognize the
>sender and know the content is safe
>
>Hi Pragnesh
>
>> From: Pragnesh Patel [mailto:pragnesh.patel at sifive.com]
>> Sent: Thursday, August 06, 2020 3:55 PM
>> To: atish.patra at wdc.com; bmeng.cn at gmail.com; u-boot at lists.denx.de;
>> anup.patel at wdc.com; sagar.kadam at sifive.com; Rick Jian-Zhi Chen(陳建志)
>> Cc: paul.walmsley at sifive.com; Pragnesh Patel; Simon Glass; Ovidiu
>> Panait; Stephen Warren; Patrick Delaunay; Joe Hershberger; Vikas
>> Manocha; Masahiro Yamada; Ye Li
>> Subject: [PATCH v2] common/board_f: make sure to call fix_fdt() before
>> reserve_fdt()
>>
>> There may be a chance that board specific fix_fdt() will change the size of FDT
>blob so it's safe to call reserve_fdt() after fix_fdt() otherwise global data (gd) will
>overwrite with FDT blob values.
>>
>> Fixes: a8492e25ac71 ("riscv: Expand the DT size before copy reserved
>> memory node")
>>
>> Signed-off-by: Pragnesh Patel <pragnesh.patel at sifive.com>
>> Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
>> Reviewed-by: Rick Chen <rick at andestech.com>
>> ---
>>  common/board_f.c | 6 +++---
>>  1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/common/board_f.c b/common/board_f.c index
>> 88ff0424a7..7ae01e9fff 100644
>> --- a/common/board_f.c
>> +++ b/common/board_f.c
>> @@ -956,6 +956,9 @@ static const init_fnc_t init_sequence_f[] = {
>>          *  - board info struct
>>          */
>>         setup_dest_addr,
>> +#ifdef CONFIG_OF_BOARD_FIXUP
>> +       fix_fdt,
>> +#endif
>>  #ifdef CONFIG_PRAM
>>         reserve_pram,
>>  #endif
>> @@ -984,9 +987,6 @@ static const init_fnc_t init_sequence_f[] = {
>>         setup_board_part2,
>>  #endif
>>         display_new_sp,
>> -#ifdef CONFIG_OF_BOARD_FIXUP
>> -       fix_fdt,
>> -#endif
>>         INIT_FUNC_WATCHDOG_RESET
>>         reloc_fdt,
>>         reloc_bootstage,
>> --
>> 2.17.1
>>
>
>Applying: common/board_f: make sure to call fix_fdt() before reserve_fdt()
>error: patch failed: common/board_f.c:984
>error: common/board_f.c: patch does not apply Patch failed at 0001
>common/board_f: make sure to call fix_fdt() before reserve_fdt()

Will rebase and send it again.

>
>Thanks,
>Rick


More information about the U-Boot mailing list