diff mbox

ARM64: dts: meson-gxl: Add alternate ARM Trusted Firmware reserved memory zone

Message ID 1507735392-20005-1-git-send-email-narmstrong@baylibre.com (mailing list archive)
State Accepted
Headers show

Commit Message

Neil Armstrong Oct. 11, 2017, 3:23 p.m. UTC
This year, Amlogic updated the ARM Trusted Firmware reserved memory mapping
for Meson GXL SoCs and products sold since May 2017 uses this alternate
reserved memory mapping.
But products had been sold using the previous mapping.

This issue has been explained in [1] and a dynamic solution is yet to be
found to avoid loosing another 3Mbytes of reservable memory.

In the meantime, this patch adds this alternate memory zone only for
the GXL and GXM SoCs since GXBB based new products stopped earlier.

[1] http://lists.infradead.org/pipermail/linux-amlogic/2017-October/004860.html

Fixes: bba8e3f42736 ("ARM64: dts: meson-gx: Add firmware reserved memory zones")
Reported-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
 arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Kevin Hilman Oct. 12, 2017, 12:24 a.m. UTC | #1
Neil Armstrong <narmstrong@baylibre.com> writes:

> This year, Amlogic updated the ARM Trusted Firmware reserved memory mapping
> for Meson GXL SoCs and products sold since May 2017 uses this alternate
> reserved memory mapping.
> But products had been sold using the previous mapping.
>
> This issue has been explained in [1] and a dynamic solution is yet to be
> found to avoid loosing another 3Mbytes of reservable memory.
>
> In the meantime, this patch adds this alternate memory zone only for
> the GXL and GXM SoCs since GXBB based new products stopped earlier.
>
> [1] http://lists.infradead.org/pipermail/linux-amlogic/2017-October/004860.html
>
> Fixes: bba8e3f42736 ("ARM64: dts: meson-gx: Add firmware reserved memory zones")
> Reported-by: Jerome Brunet <jbrunet@baylibre.com>
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>

Applied to v4.15/dt64,

Thanks,

Kevin
Will Deacon Oct. 26, 2017, 1:50 p.m. UTC | #2
On Wed, Oct 11, 2017 at 05:23:12PM +0200, Neil Armstrong wrote:
> This year, Amlogic updated the ARM Trusted Firmware reserved memory mapping
> for Meson GXL SoCs and products sold since May 2017 uses this alternate
> reserved memory mapping.
> But products had been sold using the previous mapping.
> 
> This issue has been explained in [1] and a dynamic solution is yet to be
> found to avoid loosing another 3Mbytes of reservable memory.
> 
> In the meantime, this patch adds this alternate memory zone only for
> the GXL and GXM SoCs since GXBB based new products stopped earlier.
> 
> [1] http://lists.infradead.org/pipermail/linux-amlogic/2017-October/004860.html
> 
> Fixes: bba8e3f42736 ("ARM64: dts: meson-gx: Add firmware reserved memory zones")
> Reported-by: Jerome Brunet <jbrunet@baylibre.com>
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> ---
>  arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 8 ++++++++
>  1 file changed, 8 insertions(+)

Thanks. Without this patch, memtest dies early on at physical address
0x05100000 due to an SError. With the patch, things work well, so:

Acked-by: Will Deacon <will.deacon@arm.com>
Tested-by: Will Deacon <will.deacon@arm.com>

Please also CC stable, because random SErrors under load aren't much fun ;)

Cheers,

Will
Kevin Hilman Nov. 27, 2017, 11:33 p.m. UTC | #3
Greg,

Neil Armstrong <narmstrong@baylibre.com> writes:

> This year, Amlogic updated the ARM Trusted Firmware reserved memory mapping
> for Meson GXL SoCs and products sold since May 2017 uses this alternate
> reserved memory mapping.
> But products had been sold using the previous mapping.
>
> This issue has been explained in [1] and a dynamic solution is yet to be
> found to avoid loosing another 3Mbytes of reservable memory.
>
> In the meantime, this patch adds this alternate memory zone only for
> the GXL and GXM SoCs since GXBB based new products stopped earlier.
>
> [1] http://lists.infradead.org/pipermail/linux-amlogic/2017-October/004860.html
>
> Fixes: bba8e3f42736 ("ARM64: dts: meson-gx: Add firmware reserved memory zones")
> Reported-by: Jerome Brunet <jbrunet@baylibre.com>
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>

I missed the Fixes tag on this one, but it's now commit 4ee8e51b9edf upstream.

Please apply to stable v4.10+

Thanks,

Kevin
Greg KH Nov. 28, 2017, 8:39 a.m. UTC | #4
On Mon, Nov 27, 2017 at 03:33:25PM -0800, Kevin Hilman wrote:
> Greg,
> 
> Neil Armstrong <narmstrong@baylibre.com> writes:
> 
> > This year, Amlogic updated the ARM Trusted Firmware reserved memory mapping
> > for Meson GXL SoCs and products sold since May 2017 uses this alternate
> > reserved memory mapping.
> > But products had been sold using the previous mapping.
> >
> > This issue has been explained in [1] and a dynamic solution is yet to be
> > found to avoid loosing another 3Mbytes of reservable memory.
> >
> > In the meantime, this patch adds this alternate memory zone only for
> > the GXL and GXM SoCs since GXBB based new products stopped earlier.
> >
> > [1] http://lists.infradead.org/pipermail/linux-amlogic/2017-October/004860.html
> >
> > Fixes: bba8e3f42736 ("ARM64: dts: meson-gx: Add firmware reserved memory zones")
> > Reported-by: Jerome Brunet <jbrunet@baylibre.com>
> > Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> 
> I missed the Fixes tag on this one, but it's now commit 4ee8e51b9edf upstream.
> 
> Please apply to stable v4.10+

Now applied, thanks.

greg k-h
diff mbox

Patch

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
index d8dd329..fb8d76a 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
@@ -49,6 +49,14 @@ 
 
 / {
 	compatible = "amlogic,meson-gxl";
+
+	reserved-memory {
+		/* Alternate 3 MiB reserved for ARM Trusted Firmware (BL31) */
+		secmon_reserved_alt: secmon@05000000 {
+			reg = <0x0 0x05000000 0x0 0x300000>;
+			no-map;
+		};
+	};
 };
 
 &ethmac {