DmaAdopt¶
Returns a fresh handle to the memory behind an existing DMA mapping.
| Number | Selector | Blocking | Since |
|---|---|---|---|
0x0B SVC_MANAGEMEMORY |
MNGMEM_DMAADOPT (7) |
no | 2.0 |
Handle DmaAdopt(Handle dev, uint32_t id);
Registers: (dev, id) -> r0 status, r1 memory handle
For a restarted driver to take over buffers its predecessor mapped. The new handle has PERM_MAP only.
Parameters¶
| Name | Direction | Description |
|---|---|---|
dev |
in | Device handle with PERM_MAP. |
id |
in | Mapping id, e.g. from HandleQueryAt() with QUERY_DMA_ID. |
Returns¶
The new memory handle, or a negative error code.
Errors¶
| Error | Condition |
|---|---|
ERR_NOENT |
No mapping with that id. |
ERR_BADHANDLE |
dev is not a live handle. |
ERR_BADTYPE |
dev is not a device. |
ERR_NOPERM |
dev lacks PERM_MAP. |
ERR_NOMEM |
The caller's handle table is full. |