mbox series

[v2,00/16] Enable ARM Trusted Firmware for U-Boot

Message ID 20201001091614.184612-1-elly.siew.chin.lim@intel.com
Headers show
Series Enable ARM Trusted Firmware for U-Boot | expand

Message

Siew Chin Lim Oct. 1, 2020, 9:15 a.m. UTC
This is the 2nd version of patchset to Enable ARM Trusted Firmware
for U-Boot.

New U-boot flow with ARM Trusted Firmware (ATF) support:
SPL (EL3) -> ATF-BL31 (EL3) -> U-Boot Proper (EL2) -> Linux (EL1)

SPL loads the u-boot.itb which consist of:
1) u-boot-nodtb.bin (U-Boot Proper image)
2) u-boot.dtb (U-Boot Proper DTB)
3) bl31.bin (ATF-BL31 image)

Supported Platform: Intel SoCFPGA 64bits (Stratix10 & Agilex)

Patch status:
Have changes: Patch 2, 8, 9, 10, 11, 16
Other patches unchanged.

Detail changelog can find in commit message.

v1->v2:
--------
Patch 2:
-  Move soc64 folder from board/altera to board/intel folder

Patch 8:
-  Updated comments

Patch 9:
- Code clean up without functionality change

Patch 10:
- Code clean up without functionality change

Patch 11:
- Print error message and return instead of hang in socfpga_bridges_reset()
  when SMC call is failing.

Patch 16:
- Add CONFIG_SPL_LOAD_FIT_ADDRESS=0x02000000
- Move board/altera/soc64/fit_spl_atf.sh to board/intel/soc64/fit_spl_atf.sh

History:
--------
[v1]: https://patchwork.ozlabs.org/project/uboot/list/?series=195854


These patchsets have dependency on:
arm: socfpga: soc64: Add timeout waiting for NOC idle ACK
https://lists.denx.de/pipermail/u-boot/2020-August/423029.html

Rename Stratix10 FPGA driver and support Agilex
https://lists.denx.de/pipermail/u-boot/2020-August/422798.html

SoCFPGA mailbox driver fixes and enhancements
https://lists.denx.de/pipermail/u-boot/2020-August/423140.html

arm: socfpga: soc64: Initialize timer in SPL only
https://lists.denx.de/pipermail/u-boot/2020-July/419692.html

arm: socfpga: soc64: Remove PHY interface setup from misc arch init
https://lists.denx.de/pipermail/u-boot/2020-July/419690.html

Enable sysreset support for SoCFPGA SoC64 platforms
https://lists.denx.de/pipermail/u-boot/2020-August/422509.html

arm: socfpga: soc64: Disable CONFIG_PSCI_RESET
https://lists.denx.de/pipermail/u-boot/2020-August/423373.html

Chee Hong Ang (16):
  arm: socfpga: soc64: Remove CONFIG_OF_EMBED
  arm: socfpga: soc64: Add FIT generator script for pack itb with ATF
  arm: socfpga: Add function for checking description from FIT image
  arm: socfpga: soc64: Load FIT image with ATF support
  arm: socfpga: soc64: Override 'lowlevel_init' to support ATF
  arm: socfpga: Disable "spin-table" method for booting Linux
  arm: socfpga: soc64: Add SMC helper function for Intel SOCFPGA
    (64bits)
  arm: socfpga: soc64: Define SMC function identifiers for PSCI SiP
    services
  mmc: dwmmc: socfpga: Add ATF support for MMC driver
  net: designware: socfpga: Add ATF support for MAC driver
  arm: socfpga: soc64: Add ATF support for Reset Manager driver
  arm: socfpga: soc64: Add ATF support for FPGA reconfig driver
  arm: socfpga: mailbox: Add 'SYSTEM_RESET' PSCI support to
    mbox_reset_cold()
  arm: socfpga: soc64: SSBL shall not setup stack on OCRAM
  arm: socfpga: soc64: Skip handoff data access in SSBL
  configs: socfpga: Add defconfig for Agilex and Stratix 10 with ATF
    support

 arch/arm/mach-socfpga/Kconfig                      |   2 -
 arch/arm/mach-socfpga/Makefile                     |   4 +
 arch/arm/mach-socfpga/board.c                      |  12 +-
 arch/arm/mach-socfpga/include/mach/smc_api.h       |  13 +
 arch/arm/mach-socfpga/lowlevel_init_soc64.S        |  76 +++
 arch/arm/mach-socfpga/mailbox_s10.c                |   5 +
 arch/arm/mach-socfpga/reset_manager_s10.c          |  13 +
 arch/arm/mach-socfpga/smc_api.c                    |  56 ++
 arch/arm/mach-socfpga/wrap_pll_config_s10.c        |   3 +-
 board/intel/soc64/fit_spl_atf.sh                   |  92 ++++
 ...ilex_defconfig => socfpga_agilex_atf_defconfig} |  23 +-
 configs/socfpga_agilex_defconfig                   |   1 -
 ...0_defconfig => socfpga_stratix10_atf_defconfig} |  25 +-
 configs/socfpga_stratix10_defconfig                |   1 -
 drivers/fpga/intel_sdm_mb.c                        | 139 +++++
 drivers/mmc/socfpga_dw_mmc.c                       |  26 +-
 drivers/net/dwmac_socfpga.c                        |  31 +-
 include/configs/socfpga_soc64_common.h             |   9 +
 include/linux/intel-smc.h                          | 573 +++++++++++++++++++++
 19 files changed, 1071 insertions(+), 33 deletions(-)
 create mode 100644 arch/arm/mach-socfpga/include/mach/smc_api.h
 create mode 100644 arch/arm/mach-socfpga/lowlevel_init_soc64.S
 create mode 100644 arch/arm/mach-socfpga/smc_api.c
 create mode 100755 board/intel/soc64/fit_spl_atf.sh
 copy configs/{socfpga_agilex_defconfig => socfpga_agilex_atf_defconfig} (79%)
 copy configs/{socfpga_stratix10_defconfig => socfpga_stratix10_atf_defconfig} (79%)
 create mode 100644 include/linux/intel-smc.h

Comments

Michal Simek Oct. 1, 2020, 4:52 p.m. UTC | #1
On 01. 10. 20 11:15, Siew Chin Lim wrote:
> This is the 2nd version of patchset to Enable ARM Trusted Firmware
> for U-Boot.
> 
> New U-boot flow with ARM Trusted Firmware (ATF) support:
> SPL (EL3) -> ATF-BL31 (EL3) -> U-Boot Proper (EL2) -> Linux (EL1)
> 
> SPL loads the u-boot.itb which consist of:
> 1) u-boot-nodtb.bin (U-Boot Proper image)
> 2) u-boot.dtb (U-Boot Proper DTB)
> 3) bl31.bin (ATF-BL31 image)
> 
> Supported Platform: Intel SoCFPGA 64bits (Stratix10 & Agilex)
> 
> Patch status:
> Have changes: Patch 2, 8, 9, 10, 11, 16
> Other patches unchanged.
> 
> Detail changelog can find in commit message.
> 
> v1->v2:
> --------
> Patch 2:
> -  Move soc64 folder from board/altera to board/intel folder
> 
> Patch 8:
> -  Updated comments
> 
> Patch 9:
> - Code clean up without functionality change
> 
> Patch 10:
> - Code clean up without functionality change
> 
> Patch 11:
> - Print error message and return instead of hang in socfpga_bridges_reset()
>   when SMC call is failing.
> 
> Patch 16:
> - Add CONFIG_SPL_LOAD_FIT_ADDRESS=0x02000000
> - Move board/altera/soc64/fit_spl_atf.sh to board/intel/soc64/fit_spl_atf.sh
> 
> History:
> --------
> [v1]: https://patchwork.ozlabs.org/project/uboot/list/?series=195854
> 
> 
> These patchsets have dependency on:
> arm: socfpga: soc64: Add timeout waiting for NOC idle ACK
> https://lists.denx.de/pipermail/u-boot/2020-August/423029.html
> 
> Rename Stratix10 FPGA driver and support Agilex
> https://lists.denx.de/pipermail/u-boot/2020-August/422798.html
> 
> SoCFPGA mailbox driver fixes and enhancements
> https://lists.denx.de/pipermail/u-boot/2020-August/423140.html
> 
> arm: socfpga: soc64: Initialize timer in SPL only
> https://lists.denx.de/pipermail/u-boot/2020-July/419692.html
> 
> arm: socfpga: soc64: Remove PHY interface setup from misc arch init
> https://lists.denx.de/pipermail/u-boot/2020-July/419690.html
> 
> Enable sysreset support for SoCFPGA SoC64 platforms
> https://lists.denx.de/pipermail/u-boot/2020-August/422509.html
> 
> arm: socfpga: soc64: Disable CONFIG_PSCI_RESET
> https://lists.denx.de/pipermail/u-boot/2020-August/423373.html
> 
> Chee Hong Ang (16):
>   arm: socfpga: soc64: Remove CONFIG_OF_EMBED
>   arm: socfpga: soc64: Add FIT generator script for pack itb with ATF
>   arm: socfpga: Add function for checking description from FIT image
>   arm: socfpga: soc64: Load FIT image with ATF support
>   arm: socfpga: soc64: Override 'lowlevel_init' to support ATF
>   arm: socfpga: Disable "spin-table" method for booting Linux
>   arm: socfpga: soc64: Add SMC helper function for Intel SOCFPGA
>     (64bits)
>   arm: socfpga: soc64: Define SMC function identifiers for PSCI SiP
>     services
>   mmc: dwmmc: socfpga: Add ATF support for MMC driver
>   net: designware: socfpga: Add ATF support for MAC driver
>   arm: socfpga: soc64: Add ATF support for Reset Manager driver
>   arm: socfpga: soc64: Add ATF support for FPGA reconfig driver
>   arm: socfpga: mailbox: Add 'SYSTEM_RESET' PSCI support to
>     mbox_reset_cold()
>   arm: socfpga: soc64: SSBL shall not setup stack on OCRAM
>   arm: socfpga: soc64: Skip handoff data access in SSBL
>   configs: socfpga: Add defconfig for Agilex and Stratix 10 with ATF
>     support
> 
>  arch/arm/mach-socfpga/Kconfig                      |   2 -
>  arch/arm/mach-socfpga/Makefile                     |   4 +
>  arch/arm/mach-socfpga/board.c                      |  12 +-
>  arch/arm/mach-socfpga/include/mach/smc_api.h       |  13 +
>  arch/arm/mach-socfpga/lowlevel_init_soc64.S        |  76 +++
>  arch/arm/mach-socfpga/mailbox_s10.c                |   5 +
>  arch/arm/mach-socfpga/reset_manager_s10.c          |  13 +
>  arch/arm/mach-socfpga/smc_api.c                    |  56 ++
>  arch/arm/mach-socfpga/wrap_pll_config_s10.c        |   3 +-
>  board/intel/soc64/fit_spl_atf.sh                   |  92 ++++

The patch

commit f4a43d292527ac671dee616ac973899d90a43401
Author:     Simon Glass <sjg@chromium.org>
AuthorDate: Sun Jul 19 13:56:11 2020 -0600
Commit:     Simon Glass <sjg@chromium.org>
CommitDate: Tue Jul 28 19:30:39 2020 -0600

    Makefile: Warn against using CONFIG_SPL_FIT_GENERATOR

Add warning to migrate to binman. It means do it directly.

Thanks,
Michal
Simon Glass Oct. 1, 2020, 6:37 p.m. UTC | #2
Hi Siew,

On Thu, 1 Oct 2020 at 10:52, Michal Simek <monstr@monstr.eu> wrote:
>
>
>
> On 01. 10. 20 11:15, Siew Chin Lim wrote:
> > This is the 2nd version of patchset to Enable ARM Trusted Firmware
> > for U-Boot.
> >
> > New U-boot flow with ARM Trusted Firmware (ATF) support:
> > SPL (EL3) -> ATF-BL31 (EL3) -> U-Boot Proper (EL2) -> Linux (EL1)
> >
> > SPL loads the u-boot.itb which consist of:
> > 1) u-boot-nodtb.bin (U-Boot Proper image)
> > 2) u-boot.dtb (U-Boot Proper DTB)
> > 3) bl31.bin (ATF-BL31 image)
> >
> > Supported Platform: Intel SoCFPGA 64bits (Stratix10 & Agilex)
> >
> > Patch status:
> > Have changes: Patch 2, 8, 9, 10, 11, 16
> > Other patches unchanged.
> >
> > Detail changelog can find in commit message.
> >
> > v1->v2:
> > --------
> > Patch 2:
> > -  Move soc64 folder from board/altera to board/intel folder
> >
> > Patch 8:
> > -  Updated comments
> >
> > Patch 9:
> > - Code clean up without functionality change
> >
> > Patch 10:
> > - Code clean up without functionality change
> >
> > Patch 11:
> > - Print error message and return instead of hang in socfpga_bridges_reset()
> >   when SMC call is failing.
> >
> > Patch 16:
> > - Add CONFIG_SPL_LOAD_FIT_ADDRESS=0x02000000
> > - Move board/altera/soc64/fit_spl_atf.sh to board/intel/soc64/fit_spl_atf.sh
> >
> > History:
> > --------
> > [v1]: https://patchwork.ozlabs.org/project/uboot/list/?series=195854
> >
> >
> > These patchsets have dependency on:
> > arm: socfpga: soc64: Add timeout waiting for NOC idle ACK
> > https://lists.denx.de/pipermail/u-boot/2020-August/423029.html
> >
> > Rename Stratix10 FPGA driver and support Agilex
> > https://lists.denx.de/pipermail/u-boot/2020-August/422798.html
> >
> > SoCFPGA mailbox driver fixes and enhancements
> > https://lists.denx.de/pipermail/u-boot/2020-August/423140.html
> >
> > arm: socfpga: soc64: Initialize timer in SPL only
> > https://lists.denx.de/pipermail/u-boot/2020-July/419692.html
> >
> > arm: socfpga: soc64: Remove PHY interface setup from misc arch init
> > https://lists.denx.de/pipermail/u-boot/2020-July/419690.html
> >
> > Enable sysreset support for SoCFPGA SoC64 platforms
> > https://lists.denx.de/pipermail/u-boot/2020-August/422509.html
> >
> > arm: socfpga: soc64: Disable CONFIG_PSCI_RESET
> > https://lists.denx.de/pipermail/u-boot/2020-August/423373.html
> >
> > Chee Hong Ang (16):
> >   arm: socfpga: soc64: Remove CONFIG_OF_EMBED
> >   arm: socfpga: soc64: Add FIT generator script for pack itb with ATF
> >   arm: socfpga: Add function for checking description from FIT image
> >   arm: socfpga: soc64: Load FIT image with ATF support
> >   arm: socfpga: soc64: Override 'lowlevel_init' to support ATF
> >   arm: socfpga: Disable "spin-table" method for booting Linux
> >   arm: socfpga: soc64: Add SMC helper function for Intel SOCFPGA
> >     (64bits)
> >   arm: socfpga: soc64: Define SMC function identifiers for PSCI SiP
> >     services
> >   mmc: dwmmc: socfpga: Add ATF support for MMC driver
> >   net: designware: socfpga: Add ATF support for MAC driver
> >   arm: socfpga: soc64: Add ATF support for Reset Manager driver
> >   arm: socfpga: soc64: Add ATF support for FPGA reconfig driver
> >   arm: socfpga: mailbox: Add 'SYSTEM_RESET' PSCI support to
> >     mbox_reset_cold()
> >   arm: socfpga: soc64: SSBL shall not setup stack on OCRAM
> >   arm: socfpga: soc64: Skip handoff data access in SSBL
> >   configs: socfpga: Add defconfig for Agilex and Stratix 10 with ATF
> >     support
> >
> >  arch/arm/mach-socfpga/Kconfig                      |   2 -
> >  arch/arm/mach-socfpga/Makefile                     |   4 +
> >  arch/arm/mach-socfpga/board.c                      |  12 +-
> >  arch/arm/mach-socfpga/include/mach/smc_api.h       |  13 +
> >  arch/arm/mach-socfpga/lowlevel_init_soc64.S        |  76 +++
> >  arch/arm/mach-socfpga/mailbox_s10.c                |   5 +
> >  arch/arm/mach-socfpga/reset_manager_s10.c          |  13 +
> >  arch/arm/mach-socfpga/smc_api.c                    |  56 ++
> >  arch/arm/mach-socfpga/wrap_pll_config_s10.c        |   3 +-
> >  board/intel/soc64/fit_spl_atf.sh                   |  92 ++++
>
> The patch
>
> commit f4a43d292527ac671dee616ac973899d90a43401
> Author:     Simon Glass <sjg@chromium.org>
> AuthorDate: Sun Jul 19 13:56:11 2020 -0600
> Commit:     Simon Glass <sjg@chromium.org>
> CommitDate: Tue Jul 28 19:30:39 2020 -0600
>
>     Makefile: Warn against using CONFIG_SPL_FIT_GENERATOR
>
> Add warning to migrate to binman. It means do it directly.
>

Yes, no more scripts please.

Let me know if you need help.

Regards,
Simon
Marek Vasut Oct. 1, 2020, 6:48 p.m. UTC | #3
On 10/1/20 8:37 PM, Simon Glass wrote:
> Hi Siew,
> 
> On Thu, 1 Oct 2020 at 10:52, Michal Simek <monstr@monstr.eu> wrote:
>>
>>
>>
>> On 01. 10. 20 11:15, Siew Chin Lim wrote:
>>> This is the 2nd version of patchset to Enable ARM Trusted Firmware
>>> for U-Boot.
>>>
>>> New U-boot flow with ARM Trusted Firmware (ATF) support:
>>> SPL (EL3) -> ATF-BL31 (EL3) -> U-Boot Proper (EL2) -> Linux (EL1)
>>>
>>> SPL loads the u-boot.itb which consist of:
>>> 1) u-boot-nodtb.bin (U-Boot Proper image)
>>> 2) u-boot.dtb (U-Boot Proper DTB)
>>> 3) bl31.bin (ATF-BL31 image)
>>>
>>> Supported Platform: Intel SoCFPGA 64bits (Stratix10 & Agilex)
>>>
>>> Patch status:
>>> Have changes: Patch 2, 8, 9, 10, 11, 16
>>> Other patches unchanged.
>>>
>>> Detail changelog can find in commit message.
>>>
>>> v1->v2:
>>> --------
>>> Patch 2:
>>> -  Move soc64 folder from board/altera to board/intel folder
>>>
>>> Patch 8:
>>> -  Updated comments
>>>
>>> Patch 9:
>>> - Code clean up without functionality change
>>>
>>> Patch 10:
>>> - Code clean up without functionality change
>>>
>>> Patch 11:
>>> - Print error message and return instead of hang in socfpga_bridges_reset()
>>>   when SMC call is failing.
>>>
>>> Patch 16:
>>> - Add CONFIG_SPL_LOAD_FIT_ADDRESS=0x02000000
>>> - Move board/altera/soc64/fit_spl_atf.sh to board/intel/soc64/fit_spl_atf.sh
>>>
>>> History:
>>> --------
>>> [v1]: https://patchwork.ozlabs.org/project/uboot/list/?series=195854
>>>
>>>
>>> These patchsets have dependency on:
>>> arm: socfpga: soc64: Add timeout waiting for NOC idle ACK
>>> https://lists.denx.de/pipermail/u-boot/2020-August/423029.html
>>>
>>> Rename Stratix10 FPGA driver and support Agilex
>>> https://lists.denx.de/pipermail/u-boot/2020-August/422798.html
>>>
>>> SoCFPGA mailbox driver fixes and enhancements
>>> https://lists.denx.de/pipermail/u-boot/2020-August/423140.html
>>>
>>> arm: socfpga: soc64: Initialize timer in SPL only
>>> https://lists.denx.de/pipermail/u-boot/2020-July/419692.html
>>>
>>> arm: socfpga: soc64: Remove PHY interface setup from misc arch init
>>> https://lists.denx.de/pipermail/u-boot/2020-July/419690.html
>>>
>>> Enable sysreset support for SoCFPGA SoC64 platforms
>>> https://lists.denx.de/pipermail/u-boot/2020-August/422509.html
>>>
>>> arm: socfpga: soc64: Disable CONFIG_PSCI_RESET
>>> https://lists.denx.de/pipermail/u-boot/2020-August/423373.html
>>>
>>> Chee Hong Ang (16):
>>>   arm: socfpga: soc64: Remove CONFIG_OF_EMBED
>>>   arm: socfpga: soc64: Add FIT generator script for pack itb with ATF
>>>   arm: socfpga: Add function for checking description from FIT image
>>>   arm: socfpga: soc64: Load FIT image with ATF support
>>>   arm: socfpga: soc64: Override 'lowlevel_init' to support ATF
>>>   arm: socfpga: Disable "spin-table" method for booting Linux
>>>   arm: socfpga: soc64: Add SMC helper function for Intel SOCFPGA
>>>     (64bits)
>>>   arm: socfpga: soc64: Define SMC function identifiers for PSCI SiP
>>>     services
>>>   mmc: dwmmc: socfpga: Add ATF support for MMC driver
>>>   net: designware: socfpga: Add ATF support for MAC driver
>>>   arm: socfpga: soc64: Add ATF support for Reset Manager driver
>>>   arm: socfpga: soc64: Add ATF support for FPGA reconfig driver
>>>   arm: socfpga: mailbox: Add 'SYSTEM_RESET' PSCI support to
>>>     mbox_reset_cold()
>>>   arm: socfpga: soc64: SSBL shall not setup stack on OCRAM
>>>   arm: socfpga: soc64: Skip handoff data access in SSBL
>>>   configs: socfpga: Add defconfig for Agilex and Stratix 10 with ATF
>>>     support
>>>
>>>  arch/arm/mach-socfpga/Kconfig                      |   2 -
>>>  arch/arm/mach-socfpga/Makefile                     |   4 +
>>>  arch/arm/mach-socfpga/board.c                      |  12 +-
>>>  arch/arm/mach-socfpga/include/mach/smc_api.h       |  13 +
>>>  arch/arm/mach-socfpga/lowlevel_init_soc64.S        |  76 +++
>>>  arch/arm/mach-socfpga/mailbox_s10.c                |   5 +
>>>  arch/arm/mach-socfpga/reset_manager_s10.c          |  13 +
>>>  arch/arm/mach-socfpga/smc_api.c                    |  56 ++
>>>  arch/arm/mach-socfpga/wrap_pll_config_s10.c        |   3 +-
>>>  board/intel/soc64/fit_spl_atf.sh                   |  92 ++++
>>
>> The patch
>>
>> commit f4a43d292527ac671dee616ac973899d90a43401
>> Author:     Simon Glass <sjg@chromium.org>
>> AuthorDate: Sun Jul 19 13:56:11 2020 -0600
>> Commit:     Simon Glass <sjg@chromium.org>
>> CommitDate: Tue Jul 28 19:30:39 2020 -0600
>>
>>     Makefile: Warn against using CONFIG_SPL_FIT_GENERATOR
>>
>> Add warning to migrate to binman. It means do it directly.
>>
> 
> Yes, no more scripts please.

Does that mean we now have more, additional dependencies, instead of
plain bourne shell ?
Tom Rini Oct. 1, 2020, 8:33 p.m. UTC | #4
On Thu, Oct 01, 2020 at 08:48:44PM +0200, Marek Vasut wrote:
> On 10/1/20 8:37 PM, Simon Glass wrote:
> > Hi Siew,
> > 
> > On Thu, 1 Oct 2020 at 10:52, Michal Simek <monstr@monstr.eu> wrote:
> >>
> >>
> >>
> >> On 01. 10. 20 11:15, Siew Chin Lim wrote:
> >>> This is the 2nd version of patchset to Enable ARM Trusted Firmware
> >>> for U-Boot.
> >>>
> >>> New U-boot flow with ARM Trusted Firmware (ATF) support:
> >>> SPL (EL3) -> ATF-BL31 (EL3) -> U-Boot Proper (EL2) -> Linux (EL1)
> >>>
> >>> SPL loads the u-boot.itb which consist of:
> >>> 1) u-boot-nodtb.bin (U-Boot Proper image)
> >>> 2) u-boot.dtb (U-Boot Proper DTB)
> >>> 3) bl31.bin (ATF-BL31 image)
> >>>
> >>> Supported Platform: Intel SoCFPGA 64bits (Stratix10 & Agilex)
> >>>
> >>> Patch status:
> >>> Have changes: Patch 2, 8, 9, 10, 11, 16
> >>> Other patches unchanged.
> >>>
> >>> Detail changelog can find in commit message.
> >>>
> >>> v1->v2:
> >>> --------
> >>> Patch 2:
> >>> -  Move soc64 folder from board/altera to board/intel folder
> >>>
> >>> Patch 8:
> >>> -  Updated comments
> >>>
> >>> Patch 9:
> >>> - Code clean up without functionality change
> >>>
> >>> Patch 10:
> >>> - Code clean up without functionality change
> >>>
> >>> Patch 11:
> >>> - Print error message and return instead of hang in socfpga_bridges_reset()
> >>>   when SMC call is failing.
> >>>
> >>> Patch 16:
> >>> - Add CONFIG_SPL_LOAD_FIT_ADDRESS=0x02000000
> >>> - Move board/altera/soc64/fit_spl_atf.sh to board/intel/soc64/fit_spl_atf.sh
> >>>
> >>> History:
> >>> --------
> >>> [v1]: https://patchwork.ozlabs.org/project/uboot/list/?series=195854
> >>>
> >>>
> >>> These patchsets have dependency on:
> >>> arm: socfpga: soc64: Add timeout waiting for NOC idle ACK
> >>> https://lists.denx.de/pipermail/u-boot/2020-August/423029.html
> >>>
> >>> Rename Stratix10 FPGA driver and support Agilex
> >>> https://lists.denx.de/pipermail/u-boot/2020-August/422798.html
> >>>
> >>> SoCFPGA mailbox driver fixes and enhancements
> >>> https://lists.denx.de/pipermail/u-boot/2020-August/423140.html
> >>>
> >>> arm: socfpga: soc64: Initialize timer in SPL only
> >>> https://lists.denx.de/pipermail/u-boot/2020-July/419692.html
> >>>
> >>> arm: socfpga: soc64: Remove PHY interface setup from misc arch init
> >>> https://lists.denx.de/pipermail/u-boot/2020-July/419690.html
> >>>
> >>> Enable sysreset support for SoCFPGA SoC64 platforms
> >>> https://lists.denx.de/pipermail/u-boot/2020-August/422509.html
> >>>
> >>> arm: socfpga: soc64: Disable CONFIG_PSCI_RESET
> >>> https://lists.denx.de/pipermail/u-boot/2020-August/423373.html
> >>>
> >>> Chee Hong Ang (16):
> >>>   arm: socfpga: soc64: Remove CONFIG_OF_EMBED
> >>>   arm: socfpga: soc64: Add FIT generator script for pack itb with ATF
> >>>   arm: socfpga: Add function for checking description from FIT image
> >>>   arm: socfpga: soc64: Load FIT image with ATF support
> >>>   arm: socfpga: soc64: Override 'lowlevel_init' to support ATF
> >>>   arm: socfpga: Disable "spin-table" method for booting Linux
> >>>   arm: socfpga: soc64: Add SMC helper function for Intel SOCFPGA
> >>>     (64bits)
> >>>   arm: socfpga: soc64: Define SMC function identifiers for PSCI SiP
> >>>     services
> >>>   mmc: dwmmc: socfpga: Add ATF support for MMC driver
> >>>   net: designware: socfpga: Add ATF support for MAC driver
> >>>   arm: socfpga: soc64: Add ATF support for Reset Manager driver
> >>>   arm: socfpga: soc64: Add ATF support for FPGA reconfig driver
> >>>   arm: socfpga: mailbox: Add 'SYSTEM_RESET' PSCI support to
> >>>     mbox_reset_cold()
> >>>   arm: socfpga: soc64: SSBL shall not setup stack on OCRAM
> >>>   arm: socfpga: soc64: Skip handoff data access in SSBL
> >>>   configs: socfpga: Add defconfig for Agilex and Stratix 10 with ATF
> >>>     support
> >>>
> >>>  arch/arm/mach-socfpga/Kconfig                      |   2 -
> >>>  arch/arm/mach-socfpga/Makefile                     |   4 +
> >>>  arch/arm/mach-socfpga/board.c                      |  12 +-
> >>>  arch/arm/mach-socfpga/include/mach/smc_api.h       |  13 +
> >>>  arch/arm/mach-socfpga/lowlevel_init_soc64.S        |  76 +++
> >>>  arch/arm/mach-socfpga/mailbox_s10.c                |   5 +
> >>>  arch/arm/mach-socfpga/reset_manager_s10.c          |  13 +
> >>>  arch/arm/mach-socfpga/smc_api.c                    |  56 ++
> >>>  arch/arm/mach-socfpga/wrap_pll_config_s10.c        |   3 +-
> >>>  board/intel/soc64/fit_spl_atf.sh                   |  92 ++++
> >>
> >> The patch
> >>
> >> commit f4a43d292527ac671dee616ac973899d90a43401
> >> Author:     Simon Glass <sjg@chromium.org>
> >> AuthorDate: Sun Jul 19 13:56:11 2020 -0600
> >> Commit:     Simon Glass <sjg@chromium.org>
> >> CommitDate: Tue Jul 28 19:30:39 2020 -0600
> >>
> >>     Makefile: Warn against using CONFIG_SPL_FIT_GENERATOR
> >>
> >> Add warning to migrate to binman. It means do it directly.
> >>
> > 
> > Yes, no more scripts please.
> 
> Does that mean we now have more, additional dependencies, instead of
> plain bourne shell ?

Yes, it means the tools we provide need to be used and re-used rather
than every SoC making an ad-hoc slightly different script to do almost
but not quite the same thing.  Looking over patch #2, which introduces
the script here, I would expect it to be easy to enable the provided
generator instead.
Simon Glass Oct. 1, 2020, 9:46 p.m. UTC | #5
Hi Marek,

On Thu, 1 Oct 2020 at 12:48, Marek Vasut <marex@denx.de> wrote:
>
> On 10/1/20 8:37 PM, Simon Glass wrote:
> > Hi Siew,
> >
> > On Thu, 1 Oct 2020 at 10:52, Michal Simek <monstr@monstr.eu> wrote:
> >>
> >>
> >>
> >> On 01. 10. 20 11:15, Siew Chin Lim wrote:
> >>> This is the 2nd version of patchset to Enable ARM Trusted Firmware
> >>> for U-Boot.
> >>>
> >>> New U-boot flow with ARM Trusted Firmware (ATF) support:
> >>> SPL (EL3) -> ATF-BL31 (EL3) -> U-Boot Proper (EL2) -> Linux (EL1)
> >>>
> >>> SPL loads the u-boot.itb which consist of:
> >>> 1) u-boot-nodtb.bin (U-Boot Proper image)
> >>> 2) u-boot.dtb (U-Boot Proper DTB)
> >>> 3) bl31.bin (ATF-BL31 image)
> >>>
> >>> Supported Platform: Intel SoCFPGA 64bits (Stratix10 & Agilex)
> >>>
> >>> Patch status:
> >>> Have changes: Patch 2, 8, 9, 10, 11, 16
> >>> Other patches unchanged.
> >>>
> >>> Detail changelog can find in commit message.
> >>>
> >>> v1->v2:
> >>> --------
> >>> Patch 2:
> >>> -  Move soc64 folder from board/altera to board/intel folder
> >>>
> >>> Patch 8:
> >>> -  Updated comments
> >>>
> >>> Patch 9:
> >>> - Code clean up without functionality change
> >>>
> >>> Patch 10:
> >>> - Code clean up without functionality change
> >>>
> >>> Patch 11:
> >>> - Print error message and return instead of hang in socfpga_bridges_reset()
> >>>   when SMC call is failing.
> >>>
> >>> Patch 16:
> >>> - Add CONFIG_SPL_LOAD_FIT_ADDRESS=0x02000000
> >>> - Move board/altera/soc64/fit_spl_atf.sh to board/intel/soc64/fit_spl_atf.sh
> >>>
> >>> History:
> >>> --------
> >>> [v1]: https://patchwork.ozlabs.org/project/uboot/list/?series=195854
> >>>
> >>>
> >>> These patchsets have dependency on:
> >>> arm: socfpga: soc64: Add timeout waiting for NOC idle ACK
> >>> https://lists.denx.de/pipermail/u-boot/2020-August/423029.html
> >>>
> >>> Rename Stratix10 FPGA driver and support Agilex
> >>> https://lists.denx.de/pipermail/u-boot/2020-August/422798.html
> >>>
> >>> SoCFPGA mailbox driver fixes and enhancements
> >>> https://lists.denx.de/pipermail/u-boot/2020-August/423140.html
> >>>
> >>> arm: socfpga: soc64: Initialize timer in SPL only
> >>> https://lists.denx.de/pipermail/u-boot/2020-July/419692.html
> >>>
> >>> arm: socfpga: soc64: Remove PHY interface setup from misc arch init
> >>> https://lists.denx.de/pipermail/u-boot/2020-July/419690.html
> >>>
> >>> Enable sysreset support for SoCFPGA SoC64 platforms
> >>> https://lists.denx.de/pipermail/u-boot/2020-August/422509.html
> >>>
> >>> arm: socfpga: soc64: Disable CONFIG_PSCI_RESET
> >>> https://lists.denx.de/pipermail/u-boot/2020-August/423373.html
> >>>
> >>> Chee Hong Ang (16):
> >>>   arm: socfpga: soc64: Remove CONFIG_OF_EMBED
> >>>   arm: socfpga: soc64: Add FIT generator script for pack itb with ATF
> >>>   arm: socfpga: Add function for checking description from FIT image
> >>>   arm: socfpga: soc64: Load FIT image with ATF support
> >>>   arm: socfpga: soc64: Override 'lowlevel_init' to support ATF
> >>>   arm: socfpga: Disable "spin-table" method for booting Linux
> >>>   arm: socfpga: soc64: Add SMC helper function for Intel SOCFPGA
> >>>     (64bits)
> >>>   arm: socfpga: soc64: Define SMC function identifiers for PSCI SiP
> >>>     services
> >>>   mmc: dwmmc: socfpga: Add ATF support for MMC driver
> >>>   net: designware: socfpga: Add ATF support for MAC driver
> >>>   arm: socfpga: soc64: Add ATF support for Reset Manager driver
> >>>   arm: socfpga: soc64: Add ATF support for FPGA reconfig driver
> >>>   arm: socfpga: mailbox: Add 'SYSTEM_RESET' PSCI support to
> >>>     mbox_reset_cold()
> >>>   arm: socfpga: soc64: SSBL shall not setup stack on OCRAM
> >>>   arm: socfpga: soc64: Skip handoff data access in SSBL
> >>>   configs: socfpga: Add defconfig for Agilex and Stratix 10 with ATF
> >>>     support
> >>>
> >>>  arch/arm/mach-socfpga/Kconfig                      |   2 -
> >>>  arch/arm/mach-socfpga/Makefile                     |   4 +
> >>>  arch/arm/mach-socfpga/board.c                      |  12 +-
> >>>  arch/arm/mach-socfpga/include/mach/smc_api.h       |  13 +
> >>>  arch/arm/mach-socfpga/lowlevel_init_soc64.S        |  76 +++
> >>>  arch/arm/mach-socfpga/mailbox_s10.c                |   5 +
> >>>  arch/arm/mach-socfpga/reset_manager_s10.c          |  13 +
> >>>  arch/arm/mach-socfpga/smc_api.c                    |  56 ++
> >>>  arch/arm/mach-socfpga/wrap_pll_config_s10.c        |   3 +-
> >>>  board/intel/soc64/fit_spl_atf.sh                   |  92 ++++
> >>
> >> The patch
> >>
> >> commit f4a43d292527ac671dee616ac973899d90a43401
> >> Author:     Simon Glass <sjg@chromium.org>
> >> AuthorDate: Sun Jul 19 13:56:11 2020 -0600
> >> Commit:     Simon Glass <sjg@chromium.org>
> >> CommitDate: Tue Jul 28 19:30:39 2020 -0600
> >>
> >>     Makefile: Warn against using CONFIG_SPL_FIT_GENERATOR
> >>
> >> Add warning to migrate to binman. It means do it directly.
> >>
> >
> > Yes, no more scripts please.
>
> Does that mean we now have more, additional dependencies, instead of
> plain bourne shell ?

Yes, binman is written in Python. So is dtoc, the tool that enables
smaller SPL binaries. I know it is a pain to have extra dependencies,
but a bunch of vendor-specific scripts, each slightly different,
generating a .dts file in bash is not great, IMO. In 5 years it could
really get out of hand.

Regards,
Simon