[PATCH 7/8] board: sl28: add ATF support (bl31)

Michael Walle michael at walle.cc
Wed Nov 18 15:20:04 CET 2020


Am 2020-11-18 15:15, schrieb Michal Simek:
> On 18. 11. 20 15:10, Michael Walle wrote:
>> Am 2020-11-18 15:06, schrieb Michal Simek:
>>> On 16. 11. 20 22:47, Michael Walle wrote:
>>>> Add support to load the bl31 part of the ARM Trusted Firmware by the
>>>> SPL.
>>>> 
>>>> Signed-off-by: Michael Walle <michael at walle.cc>
>>>> ---
>>>>  .../dts/fsl-ls1028a-kontron-sl28-u-boot.dtsi  | 41 +++++++++++++-
>>>>  board/kontron/sl28/Kconfig                    | 10 ++++
>>>>  board/kontron/sl28/Makefile                   |  6 ++-
>>>>  board/kontron/sl28/spl_atf.c                  | 54 
>>>> +++++++++++++++++++
>>>>  4 files changed, 109 insertions(+), 2 deletions(-)
>>>>  create mode 100644 board/kontron/sl28/spl_atf.c
>>>> 
>>>> diff --git a/arch/arm/dts/fsl-ls1028a-kontron-sl28-u-boot.dtsi
>>>> b/arch/arm/dts/fsl-ls1028a-kontron-sl28-u-boot.dtsi
>>>> index 2375549c6e..4b97e9d388 100644
>>>> --- a/arch/arm/dts/fsl-ls1028a-kontron-sl28-u-boot.dtsi
>>>> +++ b/arch/arm/dts/fsl-ls1028a-kontron-sl28-u-boot.dtsi
>>>> @@ -16,7 +16,7 @@
>>>>          ethernet3 = &enetc6;
>>>>      };
>>>> 
>>>> -    binman {
>>>> +    binman: binman {
>>>>          filename = "u-boot.rom";
>>>>          pad-byte = <0xff>;
>>>> 
>>>> @@ -102,6 +102,45 @@
>>>>      };
>>>>  };
>>>> 
>>>> +#ifdef CONFIG_SL28_SPL_LOADS_ATF_BL31
>>>> +&binman {
>>>> +    fit {
>>>> +        images {
>>>> +            bl31 {
>>>> +                description = "ARM Trusted Firmware (bl31)";
>>>> +                type = "firmware";
>>>> +                arch = "arm";
>>>> +                os = "arm-trusted-firmware";
>>>> +                compression = "none";
>>>> +                load = <CONFIG_SL28_BL31_ENTRY_ADDR>;
>>>> +                entry = <CONFIG_SL28_BL31_ENTRY_ADDR>;
>>>> +
>>>> +                blob-ext {
>>>> +                    filename = "bl31.bin";
>>>> +                };
>>>> +            };
>>>> +        };
>>>> +
>>>> +        configurations {
>>>> +            conf-1 {
>>>> +                firmware = "bl31";
>>>> +                loadables = "uboot", "bl31";
>>>> +            };
>>>> +
>>>> +            conf-2 {
>>>> +                firmware = "bl31";
>>>> +                loadables = "uboot", "bl31";
>>>> +            };
>>>> +
>>>> +            conf-3 {
>>>> +                firmware = "bl31";
>>>> +                loadables = "uboot", "bl31";
>>>> +            };
>>> 
>>> Why do you need 3 the same configurations here?
>> 
>> Because they differ in the fdt, but I still need to change the 
>> loadable
>> property if BL31/BL32 is enabled. See:
>> 
>> https://elixir.bootlin.com/u-boot/v2021.01-rc2/source/arch/arm/dts/fsl-ls1028a-kontron-sl28-u-boot.dtsi#L77
> 
> ah. ok. It is another overlay. But still you have firmware bl31 and
> loadables bl31 too. It means you are loading bl31 twice.
> 
> This should just work.
>                 firmware = "bl31";
>                 loadables = "uboot";

My former local version had that, too. And yes it works. I wasn't aware 
that this will
load the bl31 twice.

-michael


More information about the U-Boot mailing list