From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D61F937881F; Tue, 17 Feb 2026 20:06:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771358764; cv=none; b=bLVLLtfAA4CZuJpF82PfhFOGsxw/gK4r6sGavhVXGdIECcLh0K/HOJNOvZNqB7gkuc9XP4K5Ac+GuADL6lH/DlWj6KN4ybCYLkvhXHTMjPjvJOVjNOCoyOkdTF35FHBMGuMhyLkn5O7wKexzl7vYkUlFsek92ZqMwU9nOCwqcmo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771358764; c=relaxed/simple; bh=pB8XSOQnXS9spkcF/dY7JICgWxaL/46DvpLGgS0hD64=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=HKY3rnjEtqOfKQrR6M/kOLzgrEM7PQk/jfLgjpPimBym0dv+2IjfRfwSV+8TV8L+9O/Uvz+Psgv1XxDUDgo1VuEXd3+UWd1i346pflkSCvFeNyKZuVuGhjJwvbaPZQeU8U8MrZ60IyIQjI9bP3fCYIXqWaROirWtDlhiaMuU968= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dzdzmtJX; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dzdzmtJX" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EEC70C19425; Tue, 17 Feb 2026 20:06:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1771358764; bh=pB8XSOQnXS9spkcF/dY7JICgWxaL/46DvpLGgS0hD64=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=dzdzmtJXntv6tZ3xrZ5/5KDFCpCaBwCJWdFrb1Gf1xl4GzW/CTwauy2hAF96iXdMt i0n5nvdbl296y7+sk9fmCAdIEIp/B2q31R6sz0B7BZ0RfsOmRurQk0ko9xZSA7Lmk1 PKmfgL66joDhQNzsadZvTYNPseLmcLyi3aw3I2ltNx2Gjqx7pF5YIplrzgDvMSewt7 uXSp4O6mltdcHOorb8+irJInXtOGvGGUnPEd1NlAsbyF/CSMFU/Kv+71nUE/hocMTY B5pQU357Jc3Q7ljfy/adc26KdCkkol4HtfbeVY2NxVUIPr0pHqZ+e6FTXPAjZ/dXm2 4krqz4VMaRI0w== Message-ID: Date: Tue, 17 Feb 2026 21:06:00 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/7] dt-bindings: soc: st: document the RISAB firewall peripheral To: Gatien CHEVALLIER , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue Cc: devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20260209-stm32_risab-v1-0-ef0b2b6a7e0a@foss.st.com> <20260209-stm32_risab-v1-1-ef0b2b6a7e0a@foss.st.com> <516036b6-b825-4a29-a48a-5d3af3234968@foss.st.com> <66ecf6a5-cc1f-4872-971d-6bc32894dbac@foss.st.com> From: Krzysztof Kozlowski Content-Language: en-US Autocrypt: addr=krzk@kernel.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG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wNNq2U9pPWmu 4vXVFBYIGmpyNPYzRm0QPwARAQABwsF8BBgBCgAmAhsMFiEEm9B+DgxR+NWWd7dUG5NDfTtB YpsFAmgXUF8FCRaWWyoACgkQG5NDfTtBYptO0w//dlXJs5/42hAXKsk+PDg3wyEFb4NpyA1v qmx7SfAzk9Hf6lWwU1O6AbqNMbh6PjEwadKUk1m04S7EjdQLsj/MBSgoQtCT3MDmWUUtHZd5 RYIPnPq3WVB47GtuO6/u375tsxhtf7vt95QSYJwCB+ZUgo4T+FV4hquZ4AsRkbgavtIzQisg Dgv76tnEv3YHV8Jn9mi/Bu0FURF+5kpdMfgo1sq6RXNQ//TVf8yFgRtTUdXxW/qHjlYURrm2 H4kutobVEIxiyu6m05q3e9eZB/TaMMNVORx+1kM3j7f0rwtEYUFzY1ygQfpcMDPl7pRYoJjB dSsm0ZuzDaCwaxg2t8hqQJBzJCezTOIkjHUsWAK+tEbU4Z4SnNpCyM3fBqsgYdJxjyC/tWVT AQ18NRLtPw7tK1rdcwCl0GFQHwSwk5pDpz1NH40e6lU+NcXSeiqkDDRkHlftKPV/dV+lQXiu jWt87ecuHlpL3uuQ0ZZNWqHgZoQLXoqC2ZV5KrtKWb/jyiFX/sxSrodALf0zf+tfHv0FZWT2 zHjUqd0t4njD/UOsuIMOQn4Ig0SdivYPfZukb5cdasKJukG1NOpbW7yRNivaCnfZz6dTawXw XRIV/KDsHQiyVxKvN73bThKhONkcX2LWuD928tAR6XMM2G5ovxLe09vuOzzfTWQDsm++9UKF a/A= In-Reply-To: <66ecf6a5-cc1f-4872-971d-6bc32894dbac@foss.st.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 17/02/2026 14:12, Gatien CHEVALLIER wrote: > > > On 2/13/26 16:06, Krzysztof Kozlowski wrote: >> On 10/02/2026 10:55, Gatien CHEVALLIER wrote: >>>>> + memory-region: >>>>> + minItems: 1 >>>>> + maxItems: 32 >>>>> + description: >>>>> + Phandle to nodes describing memory regions to be configured in the RISAB >>>>> + by the trusted domain of at least a RISAB page size. >>>>> + These regions cannot overlap. A zone must be within st,mem-map range and >>>>> + can be represented by one or more pages. >>>>> + >>>>> + st,mem-map: >>>>> + $ref: /schemas/types.yaml#/definitions/uint32-array >>>>> + description: Memory address range covered by the RISAB. >>>>> + items: >>>>> + - description: Memory range base address >>>>> + - description: Memory range size >>>> >>>> Why do you need this property if you have memory-region already? This >>>> also should be part of , although this mixing with memory-region is >>>> anyway confusing. >>>> >>> >>> The RISAB is a memory firewall peripheral covering internal RAMs. It is >>> possible to configure multiple memory regions within these RAMs (done by >>> the Trusted Domain) with security, privilege and compartment isolation. >>> This peripheral allow 4kBytes page granularity. Each page can hold >>> different access rights, with 32 pages at most (hence the maxItems: 32). >>> That is some information that can be added to the documentation. >>> >>> Moreover, when a region is delegated to a non-secure privileged >>> component, this component can configure the privilege level necessary to >>> access the region. >>> >>> This property gives me the opportunity to get the memory range covered >>> by the RISAB. "reg" here is used to access the actual RISAB registers >>> holding the configuration. >> >> Looks awfully like memory regions still :/ >> > > IIUC the memory-region property references memory regions within > a reserved memory. Which is not really what I want to describe > here as I want to get the boundaries of the whole range. The > memory-region property would be used by the Trusted Domain / kernel > to get each regions (or only one that represents the whole range) of the > internal RAM to apply desired access rights to them / use them. > > Describing the memory range using a reserved memory would make the > kernel exclude this memory range from the normal usage, no? In general yes, but also depends on the use case/drivers/purpose. I do not understand why would you mark some memory for generic use by kernel (so not reserved for specific purpose) and still configure it somehow for trusted firmware to allow secure read/write access. If you mark some part of memory as a meaning for TF for secure access, you already claim it is not a generic memory. Otherwise TF just writes all over malloced() pages? > > I think declaring a "boundaries" memory region with no usage for the > kernel wouldn't make sense. The kernel may not be able to access the > whole memory range. I don't understand that. reserved-memory is for cases with "no usage for the kernel", so it would perfectly make sense. Look what your description said: "used to protect internal RAMs by applying access" and " a trusted domain, or the domain to whom the page configuration has been delegated," so how it is not a dedicated, special memory delegated to specific devices and/or TF? Best regards, Krzysztof