Message ID | 20200124055026.30787-8-pragnesh.patel@sifive.com |
---|---|
State | New |
Headers | show |
Series | RISC-V SiFive FU540 support SPL | expand |
On Fri, Jan 24, 2020 at 11:21 AM Pragnesh Patel <pragnesh.patel at sifive.com> wrote: > > With sifive_fu540_spl_defconfig: > > U-Boot SPL will be loaded by ZSBL from SD card (replace fsbl.bin with > u-boot-spl.bin) and runs in L2 LIM in machine mode and then load FIT > image u-boot.itb from 1st partition of SD card (replace fw_payload.bin > with u-boot.itb) into RAM. > > U-boot SPL expects u-boot.itb FIT image in the 1st partition of SD > card irrespective of GUID > > Signed-off-by: Pragnesh Patel <pragnesh.patel at sifive.com> > --- I'm thinking we don't need any separate config for SPL. Say if we have single config that creates both SPL and U-Boot proper and give feasibility to the user to use 1) SPL + U-Boot proper 2) SiFive SPL + U-Boot proper We are using a similar approach for other platforms, I guess the same will valid here, any comments?
On Fri, Jan 24, 2020 at 12:21 PM Jagan Teki <jagan at amarulasolutions.com> wrote: > > On Fri, Jan 24, 2020 at 11:21 AM Pragnesh Patel > <pragnesh.patel at sifive.com> wrote: > > > > With sifive_fu540_spl_defconfig: > > > > U-Boot SPL will be loaded by ZSBL from SD card (replace fsbl.bin with > > u-boot-spl.bin) and runs in L2 LIM in machine mode and then load FIT > > image u-boot.itb from 1st partition of SD card (replace fw_payload.bin > > with u-boot.itb) into RAM. > > > > U-boot SPL expects u-boot.itb FIT image in the 1st partition of SD > > card irrespective of GUID > > > > Signed-off-by: Pragnesh Patel <pragnesh.patel at sifive.com> > > --- > > I'm thinking we don't need any separate config for SPL. Say if we have > single config that creates both SPL and U-Boot proper and give > feasibility to the user to use > 1) SPL + U-Boot proper > 2) SiFive SPL + U-Boot proper > > We are using a similar approach for other platforms, I guess the same > will valid here, any comments? I agree with Jagan. We can augment all required SPL related config options directly in sifive_fu540_defconfig but we have to ensure that u-boot.bin created with updated sifive_fu540_defconfig works fine with OpenSBI FW_PAYLOAD. Regards, Anup
>-----Original Message----- >From: Jagan Teki <jagan at amarulasolutions.com> >Sent: 24 January 2020 12:21 >To: Pragnesh Patel <pragnesh.patel at sifive.com> >Cc: U-Boot-Denx <u-boot at lists.denx.de>; Atish Patra ><atish.patra at wdc.com>; palmerdabbelt at google.com; Bin Meng ><bmeng.cn at gmail.com>; Paul Walmsley ( Sifive) ><paul.walmsley at sifive.com>; Troy Benjegerdes ( Sifive) ><troy.benjegerdes at sifive.com>; Anup Patel <anup.patel at wdc.com>; Sagar >Kadam <sagar.kadam at sifive.com> >Subject: Re: [PATCH v3 07/10] configs: fu540: Add config file for U-boot SPL > >On Fri, Jan 24, 2020 at 11:21 AM Pragnesh Patel <pragnesh.patel at sifive.com> >wrote: >> >> With sifive_fu540_spl_defconfig: >> >> U-Boot SPL will be loaded by ZSBL from SD card (replace fsbl.bin with >> u-boot-spl.bin) and runs in L2 LIM in machine mode and then load FIT >> image u-boot.itb from 1st partition of SD card (replace fw_payload.bin >> with u-boot.itb) into RAM. >> >> U-boot SPL expects u-boot.itb FIT image in the 1st partition of SD >> card irrespective of GUID >> >> Signed-off-by: Pragnesh Patel <pragnesh.patel at sifive.com> >> --- > >I'm thinking we don't need any separate config for SPL. Say if we have single >config that creates both SPL and U-Boot proper and give feasibility to the user >to use >1) SPL + U-Boot proper >2) SiFive SPL + U-Boot proper Sifive SPL ? > >We are using a similar approach for other platforms, I guess the same will >valid here, any comments?
On Mon, Jan 27, 2020 at 12:20 PM Pragnesh Patel <pragnesh.patel at sifive.com> wrote: > > > >-----Original Message----- > >From: Jagan Teki <jagan at amarulasolutions.com> > >Sent: 24 January 2020 12:21 > >To: Pragnesh Patel <pragnesh.patel at sifive.com> > >Cc: U-Boot-Denx <u-boot at lists.denx.de>; Atish Patra > ><atish.patra at wdc.com>; palmerdabbelt at google.com; Bin Meng > ><bmeng.cn at gmail.com>; Paul Walmsley ( Sifive) > ><paul.walmsley at sifive.com>; Troy Benjegerdes ( Sifive) > ><troy.benjegerdes at sifive.com>; Anup Patel <anup.patel at wdc.com>; Sagar > >Kadam <sagar.kadam at sifive.com> > >Subject: Re: [PATCH v3 07/10] configs: fu540: Add config file for U-boot SPL > > > >On Fri, Jan 24, 2020 at 11:21 AM Pragnesh Patel <pragnesh.patel at sifive.com> > >wrote: > >> > >> With sifive_fu540_spl_defconfig: > >> > >> U-Boot SPL will be loaded by ZSBL from SD card (replace fsbl.bin with > >> u-boot-spl.bin) and runs in L2 LIM in machine mode and then load FIT > >> image u-boot.itb from 1st partition of SD card (replace fw_payload.bin > >> with u-boot.itb) into RAM. > >> > >> U-boot SPL expects u-boot.itb FIT image in the 1st partition of SD > >> card irrespective of GUID > >> > >> Signed-off-by: Pragnesh Patel <pragnesh.patel at sifive.com> > >> --- > > > >I'm thinking we don't need any separate config for SPL. Say if we have single > >config that creates both SPL and U-Boot proper and give feasibility to the user > >to use > >1) SPL + U-Boot proper > >2) SiFive SPL + U-Boot proper > > Sifive SPL ? I think what Jagan meant was: 1) U-Boot SPL + OpenSBI FW_DYNAMIC + U-Boot proper 2) FSBL + OpenSBI FW_PAYLOAD + U-Boot proper So "SiFive SPL" is actually "FSBL" Regards, Anup
>-----Original Message----- >From: Anup Patel <anup at brainfault.org> >Sent: 27 January 2020 13:09 >To: Pragnesh Patel <pragnesh.patel at sifive.com> >Cc: Jagan Teki <jagan at amarulasolutions.com>; Atish Patra ><atish.patra at wdc.com>; palmerdabbelt at google.com; U-Boot-Denx <u- >boot at lists.denx.de> >Subject: Re: [PATCH v3 07/10] configs: fu540: Add config file for U-boot SPL > >On Mon, Jan 27, 2020 at 12:20 PM Pragnesh Patel ><pragnesh.patel at sifive.com> wrote: >> >> >> >-----Original Message----- >> >From: Jagan Teki <jagan at amarulasolutions.com> >> >Sent: 24 January 2020 12:21 >> >To: Pragnesh Patel <pragnesh.patel at sifive.com> >> >Cc: U-Boot-Denx <u-boot at lists.denx.de>; Atish Patra >> ><atish.patra at wdc.com>; palmerdabbelt at google.com; Bin Meng >> ><bmeng.cn at gmail.com>; Paul Walmsley ( Sifive) >> ><paul.walmsley at sifive.com>; Troy Benjegerdes ( Sifive) >> ><troy.benjegerdes at sifive.com>; Anup Patel <anup.patel at wdc.com>; Sagar >> >Kadam <sagar.kadam at sifive.com> >> >Subject: Re: [PATCH v3 07/10] configs: fu540: Add config file for >> >U-boot SPL >> > >> >On Fri, Jan 24, 2020 at 11:21 AM Pragnesh Patel >> ><pragnesh.patel at sifive.com> >> >wrote: >> >> >> >> With sifive_fu540_spl_defconfig: >> >> >> >> U-Boot SPL will be loaded by ZSBL from SD card (replace fsbl.bin >> >> with >> >> u-boot-spl.bin) and runs in L2 LIM in machine mode and then load >> >> FIT image u-boot.itb from 1st partition of SD card (replace >> >> fw_payload.bin with u-boot.itb) into RAM. >> >> >> >> U-boot SPL expects u-boot.itb FIT image in the 1st partition of SD >> >> card irrespective of GUID >> >> >> >> Signed-off-by: Pragnesh Patel <pragnesh.patel at sifive.com> >> >> --- >> > >> >I'm thinking we don't need any separate config for SPL. Say if we >> >have single config that creates both SPL and U-Boot proper and give >> >feasibility to the user to use >> >1) SPL + U-Boot proper >> >2) SiFive SPL + U-Boot proper >> >> Sifive SPL ? > >I think what Jagan meant was: > >1) U-Boot SPL + OpenSBI FW_DYNAMIC + U-Boot proper >2) FSBL + OpenSBI FW_PAYLOAD + U-Boot proper > >So "SiFive SPL" is actually "FSBL" Ok, Thanks for the clarification. > >Regards, >Anup
>-----Original Message----- >From: Anup Patel <anup at brainfault.org> >Sent: 25 January 2020 14:12 >To: Jagan Teki <jagan at amarulasolutions.com> >Cc: Pragnesh Patel <pragnesh.patel at sifive.com>; Atish Patra ><atish.patra at wdc.com>; Palmer Dabbelt <palmerdabbelt at google.com>; U- >Boot-Denx <u-boot at lists.denx.de> >Subject: Re: [PATCH v3 07/10] configs: fu540: Add config file for U-boot SPL > >On Fri, Jan 24, 2020 at 12:21 PM Jagan Teki <jagan at amarulasolutions.com> >wrote: >> >> On Fri, Jan 24, 2020 at 11:21 AM Pragnesh Patel >> <pragnesh.patel at sifive.com> wrote: >> > >> > With sifive_fu540_spl_defconfig: >> > >> > U-Boot SPL will be loaded by ZSBL from SD card (replace fsbl.bin >> > with >> > u-boot-spl.bin) and runs in L2 LIM in machine mode and then load FIT >> > image u-boot.itb from 1st partition of SD card (replace >> > fw_payload.bin with u-boot.itb) into RAM. >> > >> > U-boot SPL expects u-boot.itb FIT image in the 1st partition of SD >> > card irrespective of GUID >> > >> > Signed-off-by: Pragnesh Patel <pragnesh.patel at sifive.com> >> > --- >> >> I'm thinking we don't need any separate config for SPL. Say if we have >> single config that creates both SPL and U-Boot proper and give >> feasibility to the user to use >> 1) SPL + U-Boot proper >> 2) SiFive SPL + U-Boot proper >> >> We are using a similar approach for other platforms, I guess the same >> will valid here, any comments? > >I agree with Jagan. > >We can augment all required SPL related config options directly in >sifive_fu540_defconfig but we have to ensure that u-boot.bin created with >updated sifive_fu540_defconfig works fine with OpenSBI FW_PAYLOAD. If SPL related configs will be included in sifive_fu540_defconfig then the generated u-boot.bin works fine with OpenSBI FW_PAYLOAD. There are 2 cases: 1) Without U-boot SPL - FSBL + OpenSBI fw_payload + U-boot proper works. 2) With U-boot SPL - SPL + FW_DYNAMIC + U-boot proper works. Will include SPL related configs in sifive_fu540_defconfig in v4. Any comments? > >Regards, >Anup
On Mon, Jan 27, 2020 at 1:19 PM Pragnesh Patel <pragnesh.patel at sifive.com> wrote: > > > >-----Original Message----- > >From: Anup Patel <anup at brainfault.org> > >Sent: 25 January 2020 14:12 > >To: Jagan Teki <jagan at amarulasolutions.com> > >Cc: Pragnesh Patel <pragnesh.patel at sifive.com>; Atish Patra > ><atish.patra at wdc.com>; Palmer Dabbelt <palmerdabbelt at google.com>; U- > >Boot-Denx <u-boot at lists.denx.de> > >Subject: Re: [PATCH v3 07/10] configs: fu540: Add config file for U-boot SPL > > > >On Fri, Jan 24, 2020 at 12:21 PM Jagan Teki <jagan at amarulasolutions.com> > >wrote: > >> > >> On Fri, Jan 24, 2020 at 11:21 AM Pragnesh Patel > >> <pragnesh.patel at sifive.com> wrote: > >> > > >> > With sifive_fu540_spl_defconfig: > >> > > >> > U-Boot SPL will be loaded by ZSBL from SD card (replace fsbl.bin > >> > with > >> > u-boot-spl.bin) and runs in L2 LIM in machine mode and then load FIT > >> > image u-boot.itb from 1st partition of SD card (replace > >> > fw_payload.bin with u-boot.itb) into RAM. > >> > > >> > U-boot SPL expects u-boot.itb FIT image in the 1st partition of SD > >> > card irrespective of GUID > >> > > >> > Signed-off-by: Pragnesh Patel <pragnesh.patel at sifive.com> > >> > --- > >> > >> I'm thinking we don't need any separate config for SPL. Say if we have > >> single config that creates both SPL and U-Boot proper and give > >> feasibility to the user to use > >> 1) SPL + U-Boot proper > >> 2) SiFive SPL + U-Boot proper > >> > >> We are using a similar approach for other platforms, I guess the same > >> will valid here, any comments? > > > >I agree with Jagan. > > > >We can augment all required SPL related config options directly in > >sifive_fu540_defconfig but we have to ensure that u-boot.bin created with > >updated sifive_fu540_defconfig works fine with OpenSBI FW_PAYLOAD. > > If SPL related configs will be included in sifive_fu540_defconfig then the generated > u-boot.bin works fine with OpenSBI FW_PAYLOAD. > > There are 2 cases: > 1) Without U-boot SPL - > FSBL + OpenSBI fw_payload + U-boot proper works. > > 2) With U-boot SPL - > SPL + FW_DYNAMIC + U-boot proper works. > > Will include SPL related configs in sifive_fu540_defconfig in v4. > Any comments? You will have to update your last documentation patch accordingly. Regards, Anup > > > > >Regards, > >Anup
diff --git a/configs/sifive_fu540_spl_defconfig b/configs/sifive_fu540_spl_defconfig new file mode 100644 index 0000000000..4053743f4c --- /dev/null +++ b/configs/sifive_fu540_spl_defconfig @@ -0,0 +1,26 @@ +CONFIG_RISCV=y +CONFIG_ENV_SIZE=0x20000 +CONFIG_NR_DRAM_BANKS=1 +CONFIG_TARGET_SIFIVE_FU540=y +CONFIG_ARCH_RV64I=y +CONFIG_RISCV_SMODE=y +CONFIG_DISTRO_DEFAULTS=y +CONFIG_FIT=y +CONFIG_MISC=y +CONFIG_EMEMORY_OTP=y +CONFIG_MISC_INIT_R=y +CONFIG_DEFAULT_DEVICE_TREE="hifive-unleashed-a00" +CONFIG_DISPLAY_CPUINFO=y +CONFIG_DISPLAY_BOARDINFO=y +CONFIG_OF_SEPARATE=y +CONFIG_SPL_SEPARATE_BSS=y +CONFIG_SYS_RELOC_GD_ENV_ADDR=y +CONFIG_DM_MTD=y +CONFIG_SPL=y +CONFIG_SPL_MMC_SUPPORT=y +CONFIG_SPL_SPI_SUPPORT=y +CONFIG_SPL_YMODEM_SUPPORT=y +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION=y +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION=1 +CONFIG_SPL_CLK=y +CONFIG_SPL_PAYLOAD="u-boot.itb"
With sifive_fu540_spl_defconfig: U-Boot SPL will be loaded by ZSBL from SD card (replace fsbl.bin with u-boot-spl.bin) and runs in L2 LIM in machine mode and then load FIT image u-boot.itb from 1st partition of SD card (replace fw_payload.bin with u-boot.itb) into RAM. U-boot SPL expects u-boot.itb FIT image in the 1st partition of SD card irrespective of GUID Signed-off-by: Pragnesh Patel <pragnesh.patel at sifive.com> --- configs/sifive_fu540_spl_defconfig | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 configs/sifive_fu540_spl_defconfig