* [PATCH] arm64: dts: renesas: r8a77951: Add reserved memory region
@ 2022-11-14 19:48 Detlev Casanova
2022-11-14 19:56 ` Biju Das
2022-11-14 19:57 ` Geert Uytterhoeven
0 siblings, 2 replies; 4+ messages in thread
From: Detlev Casanova @ 2022-11-14 19:48 UTC (permalink / raw)
To: linux-kernel
Cc: Geert Uytterhoeven, Magnus Damm, Rob Herring, Krzysztof Kozlowski,
open list:ARM/RENESAS ARCHITECTURE,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
Detlev Casanova
The 0x3000000 bytes memory region starting at 0x54000000 is
reserved for the lossy_decompression hardware that will try to
decompress any data written in the region.
Mark the region as no-map to prevent linux from using it as RAM.
Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
---
arch/arm64/boot/dts/renesas/r8a77951.dtsi | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r8a77951.dtsi b/arch/arm64/boot/dts/renesas/r8a77951.dtsi
index 07c8763c1e77..171833d91313 100644
--- a/arch/arm64/boot/dts/renesas/r8a77951.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a77951.dtsi
@@ -290,6 +290,18 @@ CPU_SLEEP_1: cpu-sleep-1 {
};
};
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ /* device specific region for Lossy Decompression */
+ lossy_decompress: memory-region@54000000 {
+ no-map;
+ reg = <0x00000000 0x54000000 0x0 0x03000000>;
+ };
+ };
+
extal_clk: extal {
compatible = "fixed-clock";
#clock-cells = <0>;
--
2.38.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* RE: [PATCH] arm64: dts: renesas: r8a77951: Add reserved memory region
2022-11-14 19:48 [PATCH] arm64: dts: renesas: r8a77951: Add reserved memory region Detlev Casanova
@ 2022-11-14 19:56 ` Biju Das
2022-11-14 19:57 ` Geert Uytterhoeven
1 sibling, 0 replies; 4+ messages in thread
From: Biju Das @ 2022-11-14 19:56 UTC (permalink / raw)
To: Detlev Casanova, linux-kernel@vger.kernel.org, Marek Vasut
Cc: Geert Uytterhoeven, Magnus Damm, Rob Herring, Krzysztof Kozlowski,
open list:ARM/RENESAS ARCHITECTURE,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
> -----Original Message-----
> From: Detlev Casanova <detlev.casanova@collabora.com>
> Sent: 14 November 2022 19:49
> To: linux-kernel@vger.kernel.org
> Cc: Geert Uytterhoeven <geert+renesas@glider.be>; Magnus Damm
> <magnus.damm@gmail.com>; Rob Herring <robh+dt@kernel.org>; Krzysztof
> Kozlowski <krzysztof.kozlowski+dt@linaro.org>; open list:ARM/RENESAS
> ARCHITECTURE <linux-renesas-soc@vger.kernel.org>; open list:OPEN
> FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
> <devicetree@vger.kernel.org>; Detlev Casanova
> <detlev.casanova@collabora.com>
> Subject: [PATCH] arm64: dts: renesas: r8a77951: Add reserved memory
> region
>
> The 0x3000000 bytes memory region starting at 0x54000000 is reserved
> for the lossy_decompression hardware that will try to decompress any
> data written in the region.
>
> Mark the region as no-map to prevent linux from using it as RAM.
>
> Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
> ---
> arch/arm64/boot/dts/renesas/r8a77951.dtsi | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/renesas/r8a77951.dtsi
> b/arch/arm64/boot/dts/renesas/r8a77951.dtsi
> index 07c8763c1e77..171833d91313 100644
> --- a/arch/arm64/boot/dts/renesas/r8a77951.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a77951.dtsi
> @@ -290,6 +290,18 @@ CPU_SLEEP_1: cpu-sleep-1 {
> };
> };
>
> + reserved-memory {
> + #address-cells = <2>;
> + #size-cells = <2>;
> + ranges;
> +
> + /* device specific region for Lossy Decompression */
> + lossy_decompress: memory-region@54000000 {
> + no-map;
> + reg = <0x00000000 0x54000000 0x0 0x03000000>;
> + };
> + };
Is not part of TFA[1]?
[1] https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/tree/plat/renesas/rcar/bl2_plat_setup.c#n174
> +
> extal_clk: extal {
> compatible = "fixed-clock";
> #clock-cells = <0>;
> --
> 2.38.1
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] arm64: dts: renesas: r8a77951: Add reserved memory region
2022-11-14 19:48 [PATCH] arm64: dts: renesas: r8a77951: Add reserved memory region Detlev Casanova
2022-11-14 19:56 ` Biju Das
@ 2022-11-14 19:57 ` Geert Uytterhoeven
2022-11-14 20:03 ` Detlev Casanova
1 sibling, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2022-11-14 19:57 UTC (permalink / raw)
To: Detlev Casanova
Cc: linux-kernel, Magnus Damm, Rob Herring, Krzysztof Kozlowski,
open list:ARM/RENESAS ARCHITECTURE,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
Hi Detlev,
On Mon, Nov 14, 2022 at 8:48 PM Detlev Casanova
<detlev.casanova@collabora.com> wrote:
> The 0x3000000 bytes memory region starting at 0x54000000 is
> reserved for the lossy_decompression hardware that will try to
> decompress any data written in the region.
>
> Mark the region as no-map to prevent linux from using it as RAM.
>
> Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
Thanks for your patch!
> --- a/arch/arm64/boot/dts/renesas/r8a77951.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a77951.dtsi
> @@ -290,6 +290,18 @@ CPU_SLEEP_1: cpu-sleep-1 {
> };
> };
>
> + reserved-memory {
> + #address-cells = <2>;
> + #size-cells = <2>;
> + ranges;
> +
> + /* device specific region for Lossy Decompression */
> + lossy_decompress: memory-region@54000000 {
> + no-map;
> + reg = <0x00000000 0x54000000 0x0 0x03000000>;
> + };
> + };
This depends on the firmware/boot loader stack. If it configures a
Lossy Decompression region, it should make sure to pass this
info through the various boot loader components to Linux,
just like is already done with the memory regions, RPC-IF state,
and OpTee configuration.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] arm64: dts: renesas: r8a77951: Add reserved memory region
2022-11-14 19:57 ` Geert Uytterhoeven
@ 2022-11-14 20:03 ` Detlev Casanova
0 siblings, 0 replies; 4+ messages in thread
From: Detlev Casanova @ 2022-11-14 20:03 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: linux-kernel, Magnus Damm, Rob Herring, Krzysztof Kozlowski,
open list:ARM/RENESAS ARCHITECTURE,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
On Monday, November 14, 2022 2:57:21 P.M. EST Geert Uytterhoeven wrote:
> Hi Detlev,
>
> On Mon, Nov 14, 2022 at 8:48 PM Detlev Casanova
>
> <detlev.casanova@collabora.com> wrote:
> > The 0x3000000 bytes memory region starting at 0x54000000 is
> > reserved for the lossy_decompression hardware that will try to
> > decompress any data written in the region.
> >
> > Mark the region as no-map to prevent linux from using it as RAM.
> >
> > Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
>
> Thanks for your patch!
>
> > --- a/arch/arm64/boot/dts/renesas/r8a77951.dtsi
> > +++ b/arch/arm64/boot/dts/renesas/r8a77951.dtsi
> > @@ -290,6 +290,18 @@ CPU_SLEEP_1: cpu-sleep-1 {
> >
> > };
> >
> > };
> >
> > + reserved-memory {
> > + #address-cells = <2>;
> > + #size-cells = <2>;
> > + ranges;
> > +
> > + /* device specific region for Lossy Decompression */
> > + lossy_decompress: memory-region@54000000 {
> > + no-map;
> > + reg = <0x00000000 0x54000000 0x0 0x03000000>;
> > + };
> > + };
>
> This depends on the firmware/boot loader stack. If it configures a
> Lossy Decompression region, it should make sure to pass this
> info through the various boot loader components to Linux,
> just like is already done with the memory regions, RPC-IF state,
> and OpTee configuration.
Thanks for your fast answer ! I didn't realise ATF was doing that, I probably
have a configuration issue in ATF then, I'll rebuild and start from there.
Thanks !
> Gr{oetje,eeting}s,
>
> Geert
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-11-14 20:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-14 19:48 [PATCH] arm64: dts: renesas: r8a77951: Add reserved memory region Detlev Casanova
2022-11-14 19:56 ` Biju Das
2022-11-14 19:57 ` Geert Uytterhoeven
2022-11-14 20:03 ` Detlev Casanova
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox