我要评分
获取效率
正确性
完整性
易理解

Memory Reservation Interface

Prototype

void *wd_reserve_memory(struct wd_queue *q, size_t size);

Function

Create DMA memory of a specified size based on q.

Input Description

q: queue

size: memory size

Output Description

N/A

Return Value Description

Start address of the valid memory: success

NULL: failure

Usage Instruction

This interface is used when SMMU is disabled. Memory can be reserved for each queue only once. The applied memory is released back to the kernel when the queue is released.

Precautions

  1. This interface is used only in no-IOMMU and IOMMU-passthrough scenarios.
  2. In the SVA scenario, the function of this interface is unavailable.