Message ID | 20221114194846.108814-1-detlev.casanova@collabora.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2334266wru; Mon, 14 Nov 2022 11:54:04 -0800 (PST) X-Google-Smtp-Source: AA0mqf6tSYkOhoXxa+YGxNZeRxcLeVO9CM6T4pZHQmPNgo+TKwICPNKOGZHxgAKi5kOu6O6HnhjF X-Received: by 2002:a63:1c61:0:b0:464:45f3:8272 with SMTP id c33-20020a631c61000000b0046445f38272mr13209073pgm.610.1668455643717; Mon, 14 Nov 2022 11:54:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668455643; cv=none; d=google.com; s=arc-20160816; b=eulrrIm/bBFGgLTaVsyjMoU3WcEBtNolXFQUIq5o5w8babZ2xBB1zoAGchGVllLbe3 Lag1itVI9tvBZbYWAZbplZCkm6NNrwUvlfgysKzL2Yn1ZLfk8JKIBB4faLDW9Wv+DIsY CVWMA93DgW5EUgrPQ+D3hSFN+mFjSM3vpqEgG+2kbkkNW1diwDv6yl/RF02hUqT5bYQC wV35s9JAO4rQIlx/MwMY3xn9pJR4GOMHCSaTw7NokN2CAaGEumUYvz6puAy0F7EC6fLf oQFEEOC436F+a6jwO8MWwxsy9wFx+0aOUACD592B6eSYN7/cNA3A5buGsi0nDSmgVAnz Qmdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=BiX/L+8iwkRp8uMRoj0xR5W4eCHorg6Y9RYXdioYDnE=; b=I4IvNWiHrMcE4z2yyOLOJyCL2gETkGQfPyTieB9pv8Fcnv57XQJpJkq+rcTWq8YFzu nSocnKi7kyAoMcopzFWamhR8phZg8E1/Xf/U8N3nrrJ44MfkZp7DawS176VHBN+YYYGk 9r397A5JurEUCMGl6rAW4MTiqViXa/Jn8XP25UKaid8Zc72dwW3RAa8lQiZhMAayAmXy zHBZha3XZy5grF/DorwNBpA+FKyEXBi0/4vmAhK126G/vSmUQ4yfzPD2nRtOKqytI327 +z7HZySRT+ceJBe7xHpPpPoXABVfc11BFhvcfVtJFU4JMkryek/QpEITg0k9ZY5w4Alu bKIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=c5GsRd8K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k5-20020a170902760500b00186a06a3396si9222723pll.153.2022.11.14.11.53.49; Mon, 14 Nov 2022 11:54:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=c5GsRd8K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235865AbiKNTtr (ORCPT <rfc822;zwp10758@gmail.com> + 99 others); Mon, 14 Nov 2022 14:49:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237427AbiKNTt2 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 14 Nov 2022 14:49:28 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39CE52649D; Mon, 14 Nov 2022 11:48:53 -0800 (PST) Received: from Falcon9.mtl.collabora.ca (mtl.collabora.ca [66.171.169.34]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: detlev) by madras.collabora.co.uk (Postfix) with ESMTPSA id 57386660296B; Mon, 14 Nov 2022 19:48:51 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1668455332; bh=MLIKw1v4Jq1PCDVbOsMzfRiH8Kzx3kjxryEHcmtLcEw=; h=From:To:Cc:Subject:Date:From; b=c5GsRd8KXYuQQNtE2igjr0XnkGwB18MKCBgXckogVDELeZVgtWZxjxfLGUQyFhWNg nt1RJu+QEqZyyIR4Z08K3pLtoIECvEF0aBM1JNExwpqXjWftublznK2bRvpJOnyHEl kDan6Dvn+OXlEzTyCD9sR2E+oETAprRmYdTZBbQIZLk89ihE+oiEqWQLs7b+wI3XjH r2haG2iWpDJQkxB2cBs9RbN7nesmV0+b2JYl4av4JGr+F44xOg1dyfv/q4s5yb0KUA lTsI09n4xASEssP2uvdA2i+SK++GzxZ5UldmFmr5TAZLi6oBIb08/Uboaz0u2MwiCR 8F871c4IsJoGA== From: Detlev Casanova <detlev.casanova@collabora.com> 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>, linux-renesas-soc@vger.kernel.org (open list:ARM/RENESAS ARCHITECTURE), devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), Detlev Casanova <detlev.casanova@collabora.com> Subject: [PATCH] arm64: dts: renesas: r8a77951: Add reserved memory region Date: Mon, 14 Nov 2022 14:48:46 -0500 Message-Id: <20221114194846.108814-1-detlev.casanova@collabora.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749502545159698332?= X-GMAIL-MSGID: =?utf-8?q?1749502545159698332?= |
Series |
arm64: dts: renesas: r8a77951: Add reserved memory region
|
|
Commit Message
Detlev Casanova
Nov. 14, 2022, 7:48 p.m. UTC
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(+)
Comments
> -----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
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
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
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>;