2021-06-07 13:41:25

by Aswath Govindraju

[permalink] [raw]
Subject: [PATCH v2] arm64: dts: ti: k3-am64-main: Update the location of ATF in SRAM and increase its max size

Due to a limitation for USB DFU boot mode, SPL load address has to be less
than or equal to 0x70001000. So, load address of SPL and ATF have been
moved to 0x70000000 and 0x701a0000 respectively.

Also, the maximum size of ATF has been increased to 0x1c000 [1].

Therefore, update ATF's location and maximum size accordingly in the device
tree file.

[1] - https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/commit/?id=2fb5312f61a7de8b7a70e1639199c4f14a10b6f9

Signed-off-by: Aswath Govindraju <[email protected]>
---
arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/ti/k3-am64-main.dtsi b/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
index ca59d1f711f8..fcd12b6f10f6 100644
--- a/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
@@ -13,8 +13,8 @@
#size-cells = <1>;
ranges = <0x0 0x00 0x70000000 0x200000>;

- atf-sram@0 {
- reg = <0x0 0x1a000>;
+ atf-sram@1a0000 {
+ reg = <0x1a0000 0x1c000>;
};
};

--
2.17.1


2021-06-09 15:35:11

by Lokesh Vutla

[permalink] [raw]
Subject: Re: [PATCH v2] arm64: dts: ti: k3-am64-main: Update the location of ATF in SRAM and increase its max size



On 07/06/21 7:08 pm, Aswath Govindraju wrote:
> Due to a limitation for USB DFU boot mode, SPL load address has to be less
> than or equal to 0x70001000. So, load address of SPL and ATF have been
> moved to 0x70000000 and 0x701a0000 respectively.
>
> Also, the maximum size of ATF has been increased to 0x1c000 [1].
>
> Therefore, update ATF's location and maximum size accordingly in the device
> tree file.
>
> [1] - https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/commit/?id=2fb5312f61a7de8b7a70e1639199c4f14a10b6f9
>
> Signed-off-by: Aswath Govindraju <[email protected]>

Reviewed-by: Lokesh Vutla <[email protected]>

I have already applied the corresponding U-Boot change into for-next branch.

Thanks and regards,
Lokesh

2021-06-09 15:42:09

by Lokesh Vutla

[permalink] [raw]
Subject: Re: [PATCH v2] arm64: dts: ti: k3-am64-main: Update the location of ATF in SRAM and increase its max size



On 07/06/21 7:08 pm, Aswath Govindraju wrote:
> Due to a limitation for USB DFU boot mode, SPL load address has to be less
> than or equal to 0x70001000. So, load address of SPL and ATF have been
> moved to 0x70000000 and 0x701a0000 respectively.
>
> Also, the maximum size of ATF has been increased to 0x1c000 [1].
>
> Therefore, update ATF's location and maximum size accordingly in the device
> tree file.
>
> [1] - https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/commit/?id=2fb5312f61a7de8b7a70e1639199c4f14a10b6f9
>
> Signed-off-by: Aswath Govindraju <[email protected]>
> ---
> arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/ti/k3-am64-main.dtsi b/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
> index ca59d1f711f8..fcd12b6f10f6 100644
> --- a/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
> @@ -13,8 +13,8 @@
> #size-cells = <1>;
> ranges = <0x0 0x00 0x70000000 0x200000>;
>
> - atf-sram@0 {
> - reg = <0x0 0x1a000>;
> + atf-sram@1a0000 {
> + reg = <0x1a0000 0x1c000>;

After thinking a bot more, isn't size be 0x20000?
ATF is allocated with 125KB no? no point keeping the ~3 as hole IMO.

Thanks and regards,
Lokesh

> };
> };
>
>

2021-06-09 16:19:24

by Aswath Govindraju

[permalink] [raw]
Subject: Re: [PATCH v2] arm64: dts: ti: k3-am64-main: Update the location of ATF in SRAM and increase its max size

Hi Lokesh,

On 09/06/21 7:59 pm, Lokesh Vutla wrote:
>
>
> On 07/06/21 7:08 pm, Aswath Govindraju wrote:
>> Due to a limitation for USB DFU boot mode, SPL load address has to be less
>> than or equal to 0x70001000. So, load address of SPL and ATF have been
>> moved to 0x70000000 and 0x701a0000 respectively.
>>
>> Also, the maximum size of ATF has been increased to 0x1c000 [1].
>>
>> Therefore, update ATF's location and maximum size accordingly in the device
>> tree file.
>>
>> [1] - https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/commit/?id=2fb5312f61a7de8b7a70e1639199c4f14a10b6f9
>>
>> Signed-off-by: Aswath Govindraju <[email protected]>
>> ---
>> arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/arm64/boot/dts/ti/k3-am64-main.dtsi b/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
>> index ca59d1f711f8..fcd12b6f10f6 100644
>> --- a/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
>> +++ b/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
>> @@ -13,8 +13,8 @@
>> #size-cells = <1>;
>> ranges = <0x0 0x00 0x70000000 0x200000>;
>>
>> - atf-sram@0 {
>> - reg = <0x0 0x1a000>;
>> + atf-sram@1a0000 {
>> + reg = <0x1a0000 0x1c000>;
>
> After thinking a bot more, isn't size be 0x20000?
> ATF is allocated with 125KB no? no point keeping the ~3 as hole IMO.
>

The max size of ATF as defined above in [1] is 0x1c000 and as the
argument has to reflect it I have modified it to the same.

Thanks,
Aswath


> Thanks and regards,
> Lokesh
>
>> };
>> };
>>
>>

2021-06-09 18:05:57

by Lokesh Vutla

[permalink] [raw]
Subject: Re: [PATCH v2] arm64: dts: ti: k3-am64-main: Update the location of ATF in SRAM and increase its max size



On 09/06/21 8:52 pm, Aswath Govindraju wrote:
> Hi Lokesh,
>
> On 09/06/21 7:59 pm, Lokesh Vutla wrote:
>>
>>
>> On 07/06/21 7:08 pm, Aswath Govindraju wrote:
>>> Due to a limitation for USB DFU boot mode, SPL load address has to be less
>>> than or equal to 0x70001000. So, load address of SPL and ATF have been
>>> moved to 0x70000000 and 0x701a0000 respectively.
>>>
>>> Also, the maximum size of ATF has been increased to 0x1c000 [1].
>>>
>>> Therefore, update ATF's location and maximum size accordingly in the device
>>> tree file.
>>>
>>> [1] - https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/commit/?id=2fb5312f61a7de8b7a70e1639199c4f14a10b6f9
>>>
>>> Signed-off-by: Aswath Govindraju <[email protected]>
>>> ---
>>> arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 4 ++--
>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/arch/arm64/boot/dts/ti/k3-am64-main.dtsi b/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
>>> index ca59d1f711f8..fcd12b6f10f6 100644
>>> --- a/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
>>> +++ b/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
>>> @@ -13,8 +13,8 @@
>>> #size-cells = <1>;
>>> ranges = <0x0 0x00 0x70000000 0x200000>;
>>>
>>> - atf-sram@0 {
>>> - reg = <0x0 0x1a000>;
>>> + atf-sram@1a0000 {
>>> + reg = <0x1a0000 0x1c000>;
>>
>> After thinking a bot more, isn't size be 0x20000?
>> ATF is allocated with 125KB no? no point keeping the ~3 as hole IMO.
>>
>
> The max size of ATF as defined above in [1] is 0x1c000 and as the
> argument has to reflect it I have modified it to the same.

ahh..Got it. Ignore my comment.

Thanks and regards,
Lokesh

>
> Thanks,
> Aswath
>
>
>> Thanks and regards,
>> Lokesh
>>
>>> };
>>> };
>>>
>>>
>

2021-06-11 19:04:49

by Nishanth Menon

[permalink] [raw]
Subject: Re: [PATCH v2] arm64: dts: ti: k3-am64-main: Update the location of ATF in SRAM and increase its max size

On Mon, 7 Jun 2021 19:08:06 +0530, Aswath Govindraju wrote:
> Due to a limitation for USB DFU boot mode, SPL load address has to be less
> than or equal to 0x70001000. So, load address of SPL and ATF have been
> moved to 0x70000000 and 0x701a0000 respectively.
>
> Also, the maximum size of ATF has been increased to 0x1c000 [1].
>
> Therefore, update ATF's location and maximum size accordingly in the device
> tree file.
>
> [...]

Hi Aswath Govindraju,

I have applied the following to branch ti-k3-dts-next on [1].
Thank you!

[1/1] arm64: dts: ti: k3-am64-main: Update the location of ATF in SRAM and increase its max size
commit: d05c19bd3f588445eb6769fb71f2e5e02b7a959e


All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent up the chain during
the next merge window (or sooner if it is a relevant bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

[1] git://git.kernel.org/pub/scm/linux/kernel/git/nmenon/linux.git
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D

2021-06-14 14:34:00

by Nishanth Menon

[permalink] [raw]
Subject: Re: [PATCH v2] arm64: dts: ti: k3-am64-main: Update the location of ATF in SRAM and increase its max size

On 14:00-20210611, Nishanth Menon wrote:
> On Mon, 7 Jun 2021 19:08:06 +0530, Aswath Govindraju wrote:
> > Due to a limitation for USB DFU boot mode, SPL load address has to be less
> > than or equal to 0x70001000. So, load address of SPL and ATF have been
> > moved to 0x70000000 and 0x701a0000 respectively.
> >
> > Also, the maximum size of ATF has been increased to 0x1c000 [1].
> >
> > Therefore, update ATF's location and maximum size accordingly in the device
> > tree file.
> >
> > [...]
>
> Hi Aswath Govindraju,
>
> I have applied the following to branch ti-k3-dts-next on [1].
> Thank you!
>
> [1/1] arm64: dts: ti: k3-am64-main: Update the location of ATF in SRAM and increase its max size
> commit: d05c19bd3f588445eb6769fb71f2e5e02b7a959e
>
>
> All being well this means that it will be integrated into the linux-next
> tree (usually sometime in the next 24 hours) and sent up the chain during
> the next merge window (or sooner if it is a relevant bug fix), however if
> problems are discovered then the patch may be dropped or reverted.
>
> You may get further e-mails resulting from automated or manual testing
> and review of the tree, please engage with people reporting problems and
> send followup patches addressing any issues that are reported if needed.
>
> If any updates are required or you are submitting further changes they
> should be sent as incremental updates against current git, existing
> patches will not be replaced.
>
> Please add any relevant lists and maintainers to the CCs when replying
> to this mail.
>
> [1] git://git.kernel.org/pub/scm/linux/kernel/git/nmenon/linux.git


Based on discussion in [1], I have dropped this patch from my queue.


[1] https://lore.kernel.org/linux-arm-kernel/20210614142849.ogi4emuqgxg3m7ls@constrict/T/#t
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D

2021-06-14 18:18:30

by Suman Anna

[permalink] [raw]
Subject: Re: [PATCH v2] arm64: dts: ti: k3-am64-main: Update the location of ATF in SRAM and increase its max size

Hi Aswath,

On 6/9/21 10:24 AM, Lokesh Vutla wrote:
>
>
> On 09/06/21 8:52 pm, Aswath Govindraju wrote:
>> Hi Lokesh,
>>
>> On 09/06/21 7:59 pm, Lokesh Vutla wrote:
>>>
>>>
>>> On 07/06/21 7:08 pm, Aswath Govindraju wrote:
>>>> Due to a limitation for USB DFU boot mode, SPL load address has to be less
>>>> than or equal to 0x70001000. So, load address of SPL and ATF have been
>>>> moved to 0x70000000 and 0x701a0000 respectively.
>>>>
>>>> Also, the maximum size of ATF has been increased to 0x1c000 [1].
>>>>
>>>> Therefore, update ATF's location and maximum size accordingly in the device
>>>> tree file.
>>>>
>>>> [1] - https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/commit/?id=2fb5312f61a7de8b7a70e1639199c4f14a10b6f9
>>>>
>>>> Signed-off-by: Aswath Govindraju <[email protected]>
>>>> ---
>>>> arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 4 ++--
>>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/arch/arm64/boot/dts/ti/k3-am64-main.dtsi b/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
>>>> index ca59d1f711f8..fcd12b6f10f6 100644
>>>> --- a/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
>>>> +++ b/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
>>>> @@ -13,8 +13,8 @@
>>>> #size-cells = <1>;
>>>> ranges = <0x0 0x00 0x70000000 0x200000>;
>>>>
>>>> - atf-sram@0 {
>>>> - reg = <0x0 0x1a000>;
>>>> + atf-sram@1a0000 {
>>>> + reg = <0x1a0000 0x1c000>;
>>>
>>> After thinking a bot more, isn't size be 0x20000?
>>> ATF is allocated with 125KB no? no point keeping the ~3 as hole IMO.
>>>
>>
>> The max size of ATF as defined above in [1] is 0x1c000 and as the
>> argument has to reflect it I have modified it to the same.
>

I personally prefer that the size increase and address relocation are split up
into two separate patches for appropriate version compatibility. TFA 2.5 has
updated the size to 0x1c000, so I would like to see that as the first patch. We
should be able to merge that change right away. I see there is some on-going
discussion around the relocated address, so it can fall in line with the
corresponding SYSFW reservation patch.

regards
Suman

> ahh..Got it. Ignore my comment.
>
> Thanks and regards,
> Lokesh
>
>>
>> Thanks,
>> Aswath
>>
>>
>>> Thanks and regards,
>>> Lokesh
>>>
>>>> };
>>>> };
>>>>
>>>>
>>