linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: mediatek: mt8195-demo: fix the memory size of node secmon
@ 2022-09-22  9:16 Macpaul Lin
  2022-09-26  7:05 ` Miles Chen
  2022-09-29  8:47 ` [PATCH v2] arm64: dts: mediatek: mt8195-demo: fix the memory size of node secmon Macpaul Lin
  0 siblings, 2 replies; 6+ messages in thread
From: Macpaul Lin @ 2022-09-22  9:16 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Matthias Brugger,
	Fabien Parent, devicetree, linux-arm-kernel, linux-mediatek,
	linux-kernel
  Cc: Miles Chen, Bear Wang, Pablo Sun, Macpaul Lin, Macpaul Lin,
	linux-usb, stable

The size of device tree node secmon (bl31_secmon_reserved) was
incorrect. It should be increased to 2MiB (0x200000).

The origin setting will cause some abnormal behavior due to
trusted-firmware-a and related firmware didn't load correctly.
The incorrect behavior may vary because of different software stacks.
For example, it will cause build error in some Yocto project because
it will check if there was enough memory to load trusted-firmware-a
to the reserved memory.

Cc: stable@vger.kernel.org      # v5.19
Fixes: 6147314aeedc ("arm64: dts: mediatek: Add device-tree for MT8195 Demo board")
Signed-off-by: Macpaul Lin <macpaul.lin@mediatek.com>
---
 arch/arm64/boot/dts/mediatek/mt8195-demo.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
index 4fbd99eb496a..dec85d254838 100644
--- a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
+++ b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
@@ -56,10 +56,10 @@
 		#size-cells = <2>;
 		ranges;
 
-		/* 192 KiB reserved for ARM Trusted Firmware (BL31) */
+		/* 2 MiB reserved for ARM Trusted Firmware (BL31) */
 		bl31_secmon_reserved: secmon@54600000 {
 			no-map;
-			reg = <0 0x54600000 0x0 0x30000>;
+			reg = <0 0x54600000 0x0 0x200000>;
 		};
 
 		/* 12 MiB reserved for OP-TEE (BL32)
-- 
2.18.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] arm64: dts: mediatek: mt8195-demo: fix the memory size of node secmon
  2022-09-22  9:16 [PATCH] arm64: dts: mediatek: mt8195-demo: fix the memory size of node secmon Macpaul Lin
@ 2022-09-26  7:05 ` Miles Chen
  2022-09-27  4:00   ` Macpaul Lin
  2022-09-29  8:47 ` [PATCH v2] arm64: dts: mediatek: mt8195-demo: fix the memory size of node secmon Macpaul Lin
  1 sibling, 1 reply; 6+ messages in thread
From: Miles Chen @ 2022-09-26  7:05 UTC (permalink / raw)
  To: macpaul.lin
  Cc: bear.wang, devicetree, fparent, krzysztof.kozlowski+dt,
	linux-arm-kernel, linux-kernel, linux-mediatek, linux-usb,
	macpaul, matthias.bgg, miles.chen, pablo.sun, robh+dt, stable

Hi Macpaul,

> The size of device tree node secmon (bl31_secmon_reserved) was
> incorrect. It should be increased to 2MiB (0x200000).

192K should work when the patch(6147314aeedc) was accepted.
Does the trusted-firmware-a get larger now, so we need to
increase the size to 2MiB?

thanks,
Miles

> 
> The origin setting will cause some abnormal behavior due to
> trusted-firmware-a and related firmware didn't load correctly.
> The incorrect behavior may vary because of different software stacks.
> For example, it will cause build error in some Yocto project because
> it will check if there was enough memory to load trusted-firmware-a
> to the reserved memory.
> 
> Cc: stable@vger.kernel.org      # v5.19
> Fixes: 6147314aeedc ("arm64: dts: mediatek: Add device-tree for MT8195 Demo board")
> Signed-off-by: Macpaul Lin <macpaul.lin@mediatek.com>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] arm64: dts: mediatek: mt8195-demo: fix the memory size of node secmon
  2022-09-26  7:05 ` Miles Chen
@ 2022-09-27  4:00   ` Macpaul Lin
  2022-09-28  1:47     ` [PATCH] arm64: dts: mediatek: mt8195-demo: fix the memory size of Miles Chen
  0 siblings, 1 reply; 6+ messages in thread
From: Macpaul Lin @ 2022-09-27  4:00 UTC (permalink / raw)
  To: Miles Chen
  Cc: bear.wang, devicetree, fparent, krzysztof.kozlowski+dt,
	linux-arm-kernel, linux-kernel, linux-mediatek, linux-usb,
	macpaul, matthias.bgg, pablo.sun, robh+dt, stable



On 9/26/22 15:05, Miles Chen wrote:
> Hi Macpaul,
> 
>> The size of device tree node secmon (bl31_secmon_reserved) was
>> incorrect. It should be increased to 2MiB (0x200000).
> 
> 192K should work when the patch(6147314aeedc) was accepted.
> Does the trusted-firmware-a get larger now, so we need to
> increase the size to 2MiB?
> 
> thanks,
> Miles

When mt8195-demo.dts sent to the upstream, at that time the size of
BL31 was small. Because supported functions and modules in BL31 are 
basic sets when the board was under early development stage.

Now BL31 includes more firmwares of coprocessors and maturer functions
so the size has grown bigger in real applications. According to the 
value reported by customers, we think reserved 2MiB for BL31 might be 
enough for maybe the following 2 or 3 years.

>>
>> The origin setting will cause some abnormal behavior due to
>> trusted-firmware-a and related firmware didn't load correctly.
>> The incorrect behavior may vary because of different software stacks.
>> For example, it will cause build error in some Yocto project because
>> it will check if there was enough memory to load trusted-firmware-a
>> to the reserved memory.
>>
>> Cc: stable@vger.kernel.org      # v5.19
>> Fixes: 6147314aeedc ("arm64: dts: mediatek: Add device-tree for MT8195 Demo board")
>> Signed-off-by: Macpaul Lin <macpaul.lin@mediatek.com>

Thanks
Macpaul Lin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] arm64: dts: mediatek: mt8195-demo: fix the memory size of
  2022-09-27  4:00   ` Macpaul Lin
@ 2022-09-28  1:47     ` Miles Chen
  0 siblings, 0 replies; 6+ messages in thread
From: Miles Chen @ 2022-09-28  1:47 UTC (permalink / raw)
  To: macpaul.lin
  Cc: bear.wang, devicetree, fparent, krzysztof.kozlowski+dt,
	linux-arm-kernel, linux-kernel, linux-mediatek, linux-usb,
	macpaul, matthias.bgg, miles.chen, pablo.sun, robh+dt, stable

>On 9/26/22 15:05, Miles Chen wrote:
>> Hi Macpaul,
>> 
>>> The size of device tree node secmon (bl31_secmon_reserved) was
>>> incorrect. It should be increased to 2MiB (0x200000).
>> 
>> 192K should work when the patch(6147314aeedc) was accepted.
>> Does the trusted-firmware-a get larger now, so we need to
>> increase the size to 2MiB?
>> 
>> thanks,
>> Miles
>
>When mt8195-demo.dts sent to the upstream, at that time the size of
>BL31 was small. Because supported functions and modules in BL31 are 
>basic sets when the board was under early development stage.
>
>Now BL31 includes more firmwares of coprocessors and maturer functions
>so the size has grown bigger in real applications. According to the 
>value reported by customers, we think reserved 2MiB for BL31 might be 
>enough for maybe the following 2 or 3 years.

Thanks for your explanation,
please add this to the commit message and submit next version.

With that, feel free to add:
Reviewed-by: Miles Chen <miles.chen@mediatek.com> 

thanks,
Miles

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2] arm64: dts: mediatek: mt8195-demo: fix the memory size of node secmon
  2022-09-22  9:16 [PATCH] arm64: dts: mediatek: mt8195-demo: fix the memory size of node secmon Macpaul Lin
  2022-09-26  7:05 ` Miles Chen
@ 2022-09-29  8:47 ` Macpaul Lin
  2022-10-24  6:18   ` Macpaul Lin
  1 sibling, 1 reply; 6+ messages in thread
From: Macpaul Lin @ 2022-09-29  8:47 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Matthias Brugger,
	Fabien Parent, devicetree, linux-arm-kernel, linux-mediatek,
	linux-kernel
  Cc: Miles Chen, Bear Wang, Pablo Sun, Macpaul Lin, Macpaul Lin,
	linux-usb, stable

The size of device tree node secmon (bl31_secmon_reserved) was
incorrect. It should be increased to 2MiB (0x200000).

The origin setting will cause some abnormal behavior due to
trusted-firmware-a and related firmware didn't load correctly.
The incorrect behavior may vary because of different software stacks.
For example, it will cause build error in some Yocto project because
it will check if there was enough memory to load trusted-firmware-a
to the reserved memory.

When mt8195-demo.dts sent to the upstream, at that time the size of
BL31 was small. Because supported functions and modules in BL31 are
basic sets when the board was under early development stage.

Now BL31 includes more firmwares of coprocessors and maturer functions
so the size has grown bigger in real applications. According to the value
reported by customers, we think reserved 2MiB for BL31 might be enough
for maybe the following 2 or 3 years.

Cc: stable@vger.kernel.org      # v5.19
Fixes: 6147314aeedc ("arm64: dts: mediatek: Add device-tree for MT8195 Demo board")
Signed-off-by: Macpaul Lin <macpaul.lin@mediatek.com>
Reviewed-by: Miles Chen <miles.chen@mediatek.com>
---
Changes for v2
 - Add more information about the size difference for BL31 in commit message.
   Thanks for Miles's review.

 arch/arm64/boot/dts/mediatek/mt8195-demo.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
index 4fbd99eb496a..dec85d254838 100644
--- a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
+++ b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
@@ -56,10 +56,10 @@
 		#size-cells = <2>;
 		ranges;
 
-		/* 192 KiB reserved for ARM Trusted Firmware (BL31) */
+		/* 2 MiB reserved for ARM Trusted Firmware (BL31) */
 		bl31_secmon_reserved: secmon@54600000 {
 			no-map;
-			reg = <0 0x54600000 0x0 0x30000>;
+			reg = <0 0x54600000 0x0 0x200000>;
 		};
 
 		/* 12 MiB reserved for OP-TEE (BL32)
-- 
2.18.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] arm64: dts: mediatek: mt8195-demo: fix the memory size of node secmon
  2022-09-29  8:47 ` [PATCH v2] arm64: dts: mediatek: mt8195-demo: fix the memory size of node secmon Macpaul Lin
@ 2022-10-24  6:18   ` Macpaul Lin
  0 siblings, 0 replies; 6+ messages in thread
From: Macpaul Lin @ 2022-10-24  6:18 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Matthias Brugger,
	Fabien Parent, devicetree, linux-arm-kernel, linux-mediatek,
	linux-kernel
  Cc: Miles Chen, Bear Wang, Pablo Sun, Macpaul Lin, linux-usb, stable,
	Matthias Brugger

On 9/29/22 16:47, Macpaul Lin wrote:
> The size of device tree node secmon (bl31_secmon_reserved) was
> incorrect. It should be increased to 2MiB (0x200000).
> 
> The origin setting will cause some abnormal behavior due to
> trusted-firmware-a and related firmware didn't load correctly.
> The incorrect behavior may vary because of different software stacks.
> For example, it will cause build error in some Yocto project because
> it will check if there was enough memory to load trusted-firmware-a
> to the reserved memory.
> 
> When mt8195-demo.dts sent to the upstream, at that time the size of
> BL31 was small. Because supported functions and modules in BL31 are
> basic sets when the board was under early development stage.
> 
> Now BL31 includes more firmwares of coprocessors and maturer functions
> so the size has grown bigger in real applications. According to the value
> reported by customers, we think reserved 2MiB for BL31 might be enough
> for maybe the following 2 or 3 years.

Dear Matthias, sorry for a gentle reminder. MediaTek hope this simple 
fix could be applied to 6.1-rc and be picked-up to current stable tree 
after v5.19. Thanks a lot.

> Cc: stable@vger.kernel.org      # v5.19
> Fixes: 6147314aeedc ("arm64: dts: mediatek: Add device-tree for MT8195 Demo board")
> Signed-off-by: Macpaul Lin <macpaul.lin@mediatek.com>
> Reviewed-by: Miles Chen <miles.chen@mediatek.com>
> ---
> Changes for v2
>   - Add more information about the size difference for BL31 in commit message.
>     Thanks for Miles's review.
> 
>   arch/arm64/boot/dts/mediatek/mt8195-demo.dts | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
> index 4fbd99eb496a..dec85d254838 100644
> --- a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
> +++ b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
> @@ -56,10 +56,10 @@
>   		#size-cells = <2>;
>   		ranges;
>   
> -		/* 192 KiB reserved for ARM Trusted Firmware (BL31) */
> +		/* 2 MiB reserved for ARM Trusted Firmware (BL31) */
>   		bl31_secmon_reserved: secmon@54600000 {
>   			no-map;
> -			reg = <0 0x54600000 0x0 0x30000>;
> +			reg = <0 0x54600000 0x0 0x200000>;
>   		};
>   
>   		/* 12 MiB reserved for OP-TEE (BL32)

Regards,
Macpaul Lin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-10-24  6:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-22  9:16 [PATCH] arm64: dts: mediatek: mt8195-demo: fix the memory size of node secmon Macpaul Lin
2022-09-26  7:05 ` Miles Chen
2022-09-27  4:00   ` Macpaul Lin
2022-09-28  1:47     ` [PATCH] arm64: dts: mediatek: mt8195-demo: fix the memory size of Miles Chen
2022-09-29  8:47 ` [PATCH v2] arm64: dts: mediatek: mt8195-demo: fix the memory size of node secmon Macpaul Lin
2022-10-24  6:18   ` Macpaul Lin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).