Hi Rick, >-----Original Message----- >From: Rick Chen <rickche...@gmail.com> >Sent: 06 August 2020 08:22 >To: Pragnesh Patel <pragnesh.pa...@sifive.com> >Cc: U-Boot Mailing List <u-boot@lists.denx.de>; Atish Patra ><atish.pa...@wdc.com>; Bin Meng <bmeng...@gmail.com>; Anup Patel ><anup.pa...@wdc.com>; Sagar Kadam <sagar.ka...@sifive.com>; Paul >Walmsley ( Sifive) <paul.walms...@sifive.com>; Simon Glass ><s...@chromium.org>; ovpan...@gmail.com; swar...@nvidia.com; >patrick.delau...@st.com; vikas.mano...@st.com; masahi...@kernel.org; >ye...@nxp.com; rick <r...@andestech.com>; Alan Kao ><alan...@andestech.com> >Subject: Re: [PATCH] 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.pa...@sifive.com] >> Sent: Wednesday, August 05, 2020 5:01 PM >> To: atish.pa...@wdc.com; bmeng...@gmail.com; u-boot@lists.denx.de; >> anup.pa...@wdc.com; sagar.ka...@sifive.com; Rick Jian-Zhi Chen(陳建志) >> Cc: paul.walms...@sifive.com; Pragnesh Patel; Simon Glass; Ovidiu >> Panait; Stephen Warren; Patrick Delaunay; Vikas Manocha; Masahiro >> Yamada; Ye Li >> Subject: [PATCH] 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. >> >> Signed-off-by: Pragnesh Patel <pragnesh.pa...@sifive.com> >> --- >> common/board_f.c | 6 +++--- >> 1 file changed, 3 insertions(+), 3 deletions(-) >> > >Maybe you can add the fix tag if it is caused by this. >Fixes: a8492e25ac71 ("riscv: Expand the DT size before copy reserved memory >node") > >Reviewed-by: Rick Chen <r...@andestech.com>
Good suggestion, will update in v2. Thanks for the review. > >> 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