From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Walle Date: Wed, 18 Nov 2020 17:11:55 +0100 Subject: [PATCH 7/8] board: sl28: add ATF support (bl31) In-Reply-To: <4113f298-378f-ee37-cd9c-ada9711635d8@xilinx.com> References: <20201116214731.29128-1-michael@walle.cc> <20201116214731.29128-8-michael@walle.cc> <958ba183-2e58-d0d1-21a8-73a0e0d9e57a@xilinx.com> <4113f298-378f-ee37-cd9c-ada9711635d8@xilinx.com> Message-ID: <0dff05b7a3b8a7bfba6b4cb8955739a1@walle.cc> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 >>>> --- >>>> ?.../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 = ; >>>> +??????????????? entry = ; >>>> + >>>> +??????????????? 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. Just for completeness (in spl_load_simple_fit()): /* * if the firmware is also a loadable, skip it because * it already has been loaded. This is typically the case with * u-boot.img generated by mkimage. */ No harm here; but I'll remove it anyway. -michael