Re: [RFC PATCH 2/5] cma-heap: Allow registration of custom cma heaps
From: Maxime Ripard
Date: Thu Jan 30 2025 - 08:34:44 EST
Hi,
On Thu, Jan 30, 2025 at 01:08:58PM +0000, Florent Tomasin wrote:
> This patch introduces a cma-heap probe function, allowing
> users to register custom cma heaps in the device tree.
>
> A "memory-region" is bound to the cma heap at probe time
> allowing allocation of DMA buffers from that heap.
>
> Use cases:
> - registration of carved out secure heaps. Some devices
> are implementing secure memory by reserving a specific
> memory regions for that purpose. For example, this is the
> case of platforms making use of early version of
> ARM TrustZone.
In such a case, the CMA heap would de-facto become un-mappable for
userspace, right?
> - registration of multiple memory regions at different
> locations for efficiency or HW integration reasons.
> For example, a peripheral may expect to share data at a
> specific location in RAM. This information could have been
> programmed by a FW prior to the kernel boot.
How would you differentiate between them?
Maxime
Attachment:
signature.asc
Description: PGP signature