Thread (48 messages) 48 messages, 8 authors, 2025-03-12

Re: [RFC PATCH 2/5] cma-heap: Allow registration of custom cma heaps

From: Maxime Ripard <mripard@kernel.org>
Date: 2025-01-30 13:34:34
Also in: dmaengine, dri-devel, linux-devicetree, linux-media, linux-mediatek, lkml

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

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help