diff mbox series

[v2,06/21] configs: socfpga: Enable FIT image loading with ATF support

Message ID 1582115146-28658-7-git-send-email-chee.hong.ang@intel.com
State Superseded
Headers show
Series Enable ARM Trusted Firmware for U-Boot | expand

Commit Message

Ang, Chee Hong Feb. 19, 2020, 12:25 p.m. UTC
From: Chee Hong Ang <chee.hong.ang at intel.com>

SPL now loads ATF (BL31), U-Boot proper and DTB from FIT
image. The new boot flow with ATF support is as follow:

SPL -> ATF (BL31) -> U-Boot proper -> OS (Linux)

Signed-off-by: Chee Hong Ang <chee.hong.ang at intel.com>
---
 configs/socfpga_agilex_defconfig    | 8 +++++++-
 configs/socfpga_stratix10_defconfig | 8 +++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)

Comments

Marek Vasut Feb. 19, 2020, 5:14 p.m. UTC | #1
On 2/19/20 1:25 PM, chee.hong.ang at intel.com wrote:
> From: Chee Hong Ang <chee.hong.ang at intel.com>
> 
> SPL now loads ATF (BL31), U-Boot proper and DTB from FIT
> image. The new boot flow with ATF support is as follow:
> 
> SPL -> ATF (BL31) -> U-Boot proper -> OS (Linux)
> 
> Signed-off-by: Chee Hong Ang <chee.hong.ang at intel.com>
> ---
>  configs/socfpga_agilex_defconfig    | 8 +++++++-
>  configs/socfpga_stratix10_defconfig | 8 +++++++-
>  2 files changed, 14 insertions(+), 2 deletions(-)
> 
> diff --git a/configs/socfpga_agilex_defconfig b/configs/socfpga_agilex_defconfig
> index 693a774..0065ff0 100644
> --- a/configs/socfpga_agilex_defconfig
> +++ b/configs/socfpga_agilex_defconfig
> @@ -1,6 +1,6 @@
>  CONFIG_ARM=y
>  CONFIG_ARCH_SOCFPGA=y
> -CONFIG_SYS_TEXT_BASE=0x1000
> +CONFIG_SYS_TEXT_BASE=0x200000

Why did the text base change ?

>  CONFIG_SYS_MALLOC_F_LEN=0x2000
>  CONFIG_ENV_SIZE=0x1000
>  CONFIG_ENV_OFFSET=0x200
> @@ -10,10 +10,16 @@ CONFIG_TARGET_SOCFPGA_AGILEX_SOCDK=y
>  CONFIG_IDENT_STRING="socfpga_agilex"
>  CONFIG_SPL_FS_FAT=y
>  CONFIG_SPL_TEXT_BASE=0xFFE00000
> +CONFIG_FIT=y
> +CONFIG_SPL_LOAD_FIT=y
> +CONFIG_SPL_FIT_SOURCE="board/altera/soc64/its/fit_spl_atf.its"
>  CONFIG_BOOTDELAY=5
> +CONFIG_SPL_LEGACY_IMAGE_SUPPORT=y

Is legacy image support really needed ?
Ang, Chee Hong Feb. 20, 2020, 2:15 a.m. UTC | #2
> On 2/19/20 1:25 PM, chee.hong.ang at intel.com wrote:
> > From: Chee Hong Ang <chee.hong.ang at intel.com>
> >
> > SPL now loads ATF (BL31), U-Boot proper and DTB from FIT image. The
> > new boot flow with ATF support is as follow:
> >
> > SPL -> ATF (BL31) -> U-Boot proper -> OS (Linux)
> >
> > Signed-off-by: Chee Hong Ang <chee.hong.ang at intel.com>
> > ---
> >  configs/socfpga_agilex_defconfig    | 8 +++++++-
> >  configs/socfpga_stratix10_defconfig | 8 +++++++-
> >  2 files changed, 14 insertions(+), 2 deletions(-)
> >
> > diff --git a/configs/socfpga_agilex_defconfig
> > b/configs/socfpga_agilex_defconfig
> > index 693a774..0065ff0 100644
> > --- a/configs/socfpga_agilex_defconfig
> > +++ b/configs/socfpga_agilex_defconfig
> > @@ -1,6 +1,6 @@
> >  CONFIG_ARM=y
> >  CONFIG_ARCH_SOCFPGA=y
> > -CONFIG_SYS_TEXT_BASE=0x1000
> > +CONFIG_SYS_TEXT_BASE=0x200000
> 
> Why did the text base change ?
This defconfig support ATF.
ATF will occupy from this address range (0x1000)
U-Boot now starts at 0x200000.
> 
> >  CONFIG_SYS_MALLOC_F_LEN=0x2000
> >  CONFIG_ENV_SIZE=0x1000
> >  CONFIG_ENV_OFFSET=0x200
> > @@ -10,10 +10,16 @@ CONFIG_TARGET_SOCFPGA_AGILEX_SOCDK=y
> >  CONFIG_IDENT_STRING="socfpga_agilex"
> >  CONFIG_SPL_FS_FAT=y
> >  CONFIG_SPL_TEXT_BASE=0xFFE00000
> > +CONFIG_FIT=y
> > +CONFIG_SPL_LOAD_FIT=y
> > +CONFIG_SPL_FIT_SOURCE="board/altera/soc64/its/fit_spl_atf.its"
> >  CONFIG_BOOTDELAY=5
> > +CONFIG_SPL_LEGACY_IMAGE_SUPPORT=y
> 
> Is legacy image support really needed ?
Let me check. Will get rid of this if it's not needed. Thanks.
Marek Vasut Feb. 20, 2020, 4:45 p.m. UTC | #3
On 2/20/20 3:15 AM, Ang, Chee Hong wrote:
>> On 2/19/20 1:25 PM, chee.hong.ang at intel.com wrote:
>>> From: Chee Hong Ang <chee.hong.ang at intel.com>
>>>
>>> SPL now loads ATF (BL31), U-Boot proper and DTB from FIT image. The
>>> new boot flow with ATF support is as follow:
>>>
>>> SPL -> ATF (BL31) -> U-Boot proper -> OS (Linux)
>>>
>>> Signed-off-by: Chee Hong Ang <chee.hong.ang at intel.com>
>>> ---
>>>  configs/socfpga_agilex_defconfig    | 8 +++++++-
>>>  configs/socfpga_stratix10_defconfig | 8 +++++++-
>>>  2 files changed, 14 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/configs/socfpga_agilex_defconfig
>>> b/configs/socfpga_agilex_defconfig
>>> index 693a774..0065ff0 100644
>>> --- a/configs/socfpga_agilex_defconfig
>>> +++ b/configs/socfpga_agilex_defconfig
>>> @@ -1,6 +1,6 @@
>>>  CONFIG_ARM=y
>>>  CONFIG_ARCH_SOCFPGA=y
>>> -CONFIG_SYS_TEXT_BASE=0x1000
>>> +CONFIG_SYS_TEXT_BASE=0x200000
>>
>> Why did the text base change ?
> This defconfig support ATF.
> ATF will occupy from this address range (0x1000)
> U-Boot now starts at 0x200000.

Then please document it in the commit message.

>>>  CONFIG_SYS_MALLOC_F_LEN=0x2000
>>>  CONFIG_ENV_SIZE=0x1000
>>>  CONFIG_ENV_OFFSET=0x200
>>> @@ -10,10 +10,16 @@ CONFIG_TARGET_SOCFPGA_AGILEX_SOCDK=y
>>>  CONFIG_IDENT_STRING="socfpga_agilex"
>>>  CONFIG_SPL_FS_FAT=y
>>>  CONFIG_SPL_TEXT_BASE=0xFFE00000
>>> +CONFIG_FIT=y
>>> +CONFIG_SPL_LOAD_FIT=y
>>> +CONFIG_SPL_FIT_SOURCE="board/altera/soc64/its/fit_spl_atf.its"
>>>  CONFIG_BOOTDELAY=5
>>> +CONFIG_SPL_LEGACY_IMAGE_SUPPORT=y
>>
>> Is legacy image support really needed ?
> Let me check. Will get rid of this if it's not needed. Thanks.

Thanks
Simon Goldschmidt Feb. 20, 2020, 8 p.m. UTC | #4
Am 20.02.2020 um 17:45 schrieb Marek Vasut:
> On 2/20/20 3:15 AM, Ang, Chee Hong wrote:
>>> On 2/19/20 1:25 PM, chee.hong.ang at intel.com wrote:
>>>> From: Chee Hong Ang <chee.hong.ang at intel.com>
>>>>
>>>> SPL now loads ATF (BL31), U-Boot proper and DTB from FIT image. The
>>>> new boot flow with ATF support is as follow:
>>>>
>>>> SPL -> ATF (BL31) -> U-Boot proper -> OS (Linux)
>>>>
>>>> Signed-off-by: Chee Hong Ang <chee.hong.ang at intel.com>
>>>> ---
>>>>  configs/socfpga_agilex_defconfig    | 8 +++++++-
>>>>  configs/socfpga_stratix10_defconfig | 8 +++++++-
>>>>  2 files changed, 14 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/configs/socfpga_agilex_defconfig
>>>> b/configs/socfpga_agilex_defconfig
>>>> index 693a774..0065ff0 100644
>>>> --- a/configs/socfpga_agilex_defconfig
>>>> +++ b/configs/socfpga_agilex_defconfig
>>>> @@ -1,6 +1,6 @@
>>>>  CONFIG_ARM=y
>>>>  CONFIG_ARCH_SOCFPGA=y
>>>> -CONFIG_SYS_TEXT_BASE=0x1000
>>>> +CONFIG_SYS_TEXT_BASE=0x200000
>>>
>>> Why did the text base change ?
>> This defconfig support ATF.
>> ATF will occupy from this address range (0x1000)
>> U-Boot now starts at 0x200000.
> 
> Then please document it in the commit message.

Or even better, could we have 2 defconfigs, one for ATF, one for
non-ATF? That way, we get build coverage that this still works.

Regards,
Simon

> 
>>>>  CONFIG_SYS_MALLOC_F_LEN=0x2000
>>>>  CONFIG_ENV_SIZE=0x1000
>>>>  CONFIG_ENV_OFFSET=0x200
>>>> @@ -10,10 +10,16 @@ CONFIG_TARGET_SOCFPGA_AGILEX_SOCDK=y
>>>>  CONFIG_IDENT_STRING="socfpga_agilex"
>>>>  CONFIG_SPL_FS_FAT=y
>>>>  CONFIG_SPL_TEXT_BASE=0xFFE00000
>>>> +CONFIG_FIT=y
>>>> +CONFIG_SPL_LOAD_FIT=y
>>>> +CONFIG_SPL_FIT_SOURCE="board/altera/soc64/its/fit_spl_atf.its"
>>>>  CONFIG_BOOTDELAY=5
>>>> +CONFIG_SPL_LEGACY_IMAGE_SUPPORT=y
>>>
>>> Is legacy image support really needed ?
>> Let me check. Will get rid of this if it's not needed. Thanks.
> 
> Thanks
>
Westergreen, Dalon Feb. 20, 2020, 10:20 p.m. UTC | #5
On Thu, 2020-02-20 at 21:00 +0100, Simon Goldschmidt wrote:

Am 20.02.2020 um 17:45 schrieb Marek Vasut:

On 2/20/20 3:15 AM, Ang, Chee Hong wrote:

On 2/19/20 1:25 PM,

<mailto:chee.hong.ang at intel.com>

chee.hong.ang at intel.com

 wrote:

From: Chee Hong Ang <

<mailto:chee.hong.ang at intel.com>

chee.hong.ang at intel.com

>


SPL now loads ATF (BL31), U-Boot proper and DTB from FIT image. The

new boot flow with ATF support is as follow:


SPL -> ATF (BL31) -> U-Boot proper -> OS (Linux)


Signed-off-by: Chee Hong Ang <

<mailto:chee.hong.ang at intel.com>

chee.hong.ang at intel.com

>

---

 configs/socfpga_agilex_defconfig    | 8 +++++++-

 configs/socfpga_stratix10_defconfig | 8 +++++++-

 2 files changed, 14 insertions(+), 2 deletions(-)


diff --git a/configs/socfpga_agilex_defconfig

b/configs/socfpga_agilex_defconfig

index 693a774..0065ff0 100644

--- a/configs/socfpga_agilex_defconfig

+++ b/configs/socfpga_agilex_defconfig

@@ -1,6 +1,6 @@

 CONFIG_ARM=y

 CONFIG_ARCH_SOCFPGA=y

-CONFIG_SYS_TEXT_BASE=0x1000

+CONFIG_SYS_TEXT_BASE=0x200000


Why did the text base change ?

This defconfig support ATF.

ATF will occupy from this address range (0x1000)

U-Boot now starts at 0x200000.


Then please document it in the commit message.


Or even better, could we have 2 defconfigs, one for ATF, one for

non-ATF? That way, we get build coverage that this still works.

This patch set does already add a separate defconfig for non-ATF in 21/21

--dalon



Regards,

Simon



 CONFIG_SYS_MALLOC_F_LEN=0x2000

 CONFIG_ENV_SIZE=0x1000

 CONFIG_ENV_OFFSET=0x200

@@ -10,10 +10,16 @@ CONFIG_TARGET_SOCFPGA_AGILEX_SOCDK=y

 CONFIG_IDENT_STRING="socfpga_agilex"

 CONFIG_SPL_FS_FAT=y

 CONFIG_SPL_TEXT_BASE=0xFFE00000

+CONFIG_FIT=y

+CONFIG_SPL_LOAD_FIT=y

+CONFIG_SPL_FIT_SOURCE="board/altera/soc64/its/fit_spl_atf.its"

 CONFIG_BOOTDELAY=5

+CONFIG_SPL_LEGACY_IMAGE_SUPPORT=y


Is legacy image support really needed ?

Let me check. Will get rid of this if it's not needed. Thanks.


Thanks
diff mbox series

Patch

diff --git a/configs/socfpga_agilex_defconfig b/configs/socfpga_agilex_defconfig
index 693a774..0065ff0 100644
--- a/configs/socfpga_agilex_defconfig
+++ b/configs/socfpga_agilex_defconfig
@@ -1,6 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_SOCFPGA=y
-CONFIG_SYS_TEXT_BASE=0x1000
+CONFIG_SYS_TEXT_BASE=0x200000
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_ENV_SIZE=0x1000
 CONFIG_ENV_OFFSET=0x200
@@ -10,10 +10,16 @@  CONFIG_TARGET_SOCFPGA_AGILEX_SOCDK=y
 CONFIG_IDENT_STRING="socfpga_agilex"
 CONFIG_SPL_FS_FAT=y
 CONFIG_SPL_TEXT_BASE=0xFFE00000
+CONFIG_FIT=y
+CONFIG_SPL_LOAD_FIT=y
+CONFIG_SPL_FIT_SOURCE="board/altera/soc64/its/fit_spl_atf.its"
 CONFIG_BOOTDELAY=5
+CONFIG_SPL_LEGACY_IMAGE_SUPPORT=y
 CONFIG_SPL_CACHE=y
 CONFIG_SPL_SPI_LOAD=y
 CONFIG_SYS_SPI_U_BOOT_OFFS=0x3c00000
+CONFIG_SPL_ATF=y
+CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="SOCFPGA_AGILEX # "
 CONFIG_CMD_MEMTEST=y
diff --git a/configs/socfpga_stratix10_defconfig b/configs/socfpga_stratix10_defconfig
index 26db40f..4882d50 100644
--- a/configs/socfpga_stratix10_defconfig
+++ b/configs/socfpga_stratix10_defconfig
@@ -1,6 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_SOCFPGA=y
-CONFIG_SYS_TEXT_BASE=0x1000
+CONFIG_SYS_TEXT_BASE=0x200000
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_ENV_SIZE=0x1000
 CONFIG_ENV_OFFSET=0x200
@@ -10,9 +10,15 @@  CONFIG_TARGET_SOCFPGA_STRATIX10_SOCDK=y
 CONFIG_IDENT_STRING="socfpga_stratix10"
 CONFIG_SPL_FS_FAT=y
 CONFIG_SPL_TEXT_BASE=0xFFE00000
+CONFIG_FIT=y
+CONFIG_SPL_LOAD_FIT=y
+CONFIG_SPL_FIT_SOURCE="board/altera/soc64/its/fit_spl_atf.its"
 CONFIG_BOOTDELAY=5
+CONFIG_SPL_LEGACY_IMAGE_SUPPORT=y
 CONFIG_SPL_SPI_LOAD=y
 CONFIG_SYS_SPI_U_BOOT_OFFS=0x3C00000
+CONFIG_SPL_ATF=y
+CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="SOCFPGA_STRATIX10 # "
 CONFIG_CMD_MEMTEST=y