Defines | |
#define | L4DM_RESIZE 0x00000080 |
#define | L4DM_CONTIGUOUS 0x00000100 |
#define | L4DM_PINNED 0x00000200 |
#define | L4DM_COW 0x00000400 |
#define | L4DM_SAME_TASK 0x00002000 |
#define | L4DM_WHOLE_DS (-1) |
#define | L4DM_DEFAULT_DSM L4_INVALID_ID |
#define | L4DM_MEMPHYS_DEFAULT 0 |
#define | L4DM_MEMPHYS_ISA_DMA 7 |
#define | L4DM_MEMPHYS_ANY_ADDR -1 |
#define | L4DM_MEMPHYS_SUPERPAGES 0x00010000 |
#define | L4DM_MEMPHYS_SAME_POOL 0x00020000 |
Functions | |
L4_CV int | l4dm_mem_open (l4_threadid_t dsm_id, l4_size_t size, l4_addr_t align, l4_uint32_t flags, const char *name, l4dm_dataspace_t *ds) |
Create new dataspace. | |
L4_CV int | l4dm_mem_resize (const l4dm_dataspace_t *ds, l4_size_t new_size) |
Resize dataspace. | |
L4_CV int | l4dm_mem_info (const l4dm_dataspace_t *ds, l4_size_t *size, l4_threadid_t *owner, char *name, l4_uint32_t *next_id) |
Get debugging information. | |
L4_CV int | l4dm_close (const l4dm_dataspace_t *ds) |
Close dataspace. | |
int | l4dm_close_all (l4_threadid_t dsm_id, l4_threadid_t client, l4_uint32_t flags) |
Close all dataspaces of a client. | |
L4_CV int | l4dm_copy (const l4dm_dataspace_t *ds, l4_uint32_t flags, const char *name, l4dm_dataspace_t *copy) |
Create dataspace copy, short form. | |
int | l4dm_copy_long (const l4dm_dataspace_t *ds, l4_offs_t src_offs, l4_offs_t dst_offs, l4_size_t num, l4_uint32_t flags, const char *name, l4dm_dataspace_t *copy) |
Create dataspace copy, long form. | |
L4_CV int | l4dm_memphys_open (int pool, l4_addr_t addr, l4_size_t size, l4_addr_t align, l4_uint32_t flags, const char *name, l4dm_dataspace_t *ds) |
Create new dataspace (extended version for DMphys). | |
L4_CV int | l4dm_memphys_copy (const l4dm_dataspace_t *ds, l4_offs_t src_offs, l4_offs_t dst_offs, l4_size_t num, int dst_pool, l4_addr_t dst_addr, l4_size_t dst_size, l4_addr_t dst_align, l4_uint32_t flags, const char *name, l4dm_dataspace_t *copy) |
Create dataspace copy (extended DMphys version). | |
L4_CV l4_threadid_t | l4dm_memphys_find_dmphys (void) |
Find DMphys. |
#define L4DM_RESIZE 0x00000080 |
Allow resize
Definition at line 45 of file dm_generic/include/consts.h.
#define L4DM_CONTIGUOUS 0x00000100 |
Allocate phys. contiguous memory
Definition at line 60 of file dm_generic/include/consts.h.
#define L4DM_PINNED 0x00000200 |
Allocated pinned memory
Definition at line 64 of file dm_generic/include/consts.h.
#define L4DM_COW 0x00000400 |
Create copy-on-write dataspace copy
Definition at line 67 of file dm_generic/include/consts.h.
#define L4DM_SAME_TASK 0x00002000 |
Close dataspace owned by threads of the same task
Definition at line 82 of file dm_generic/include/consts.h.
#define L4DM_WHOLE_DS (-1) |
Copy: create copy of the whole dataspace, phys_addr: return the phys. addresses of the whole dataspace
Definition at line 95 of file dm_generic/include/consts.h.
#define L4DM_DEFAULT_DSM L4_INVALID_ID |
Open: use default dataspcae manager
Definition at line 104 of file dm_generic/include/consts.h.
#define L4DM_MEMPHYS_DEFAULT 0 |
Use default memory pool
Definition at line 25 of file dm_phys/include/consts.h.
#define L4DM_MEMPHYS_ISA_DMA 7 |
Use ISA DMA capable memory (below 16MB)
Definition at line 28 of file dm_phys/include/consts.h.
#define L4DM_MEMPHYS_ANY_ADDR -1 |
find an appropriate memory area
Definition at line 34 of file dm_phys/include/consts.h.
#define L4DM_MEMPHYS_SUPERPAGES 0x00010000 |
Open/map: force super-pages
Definition at line 41 of file dm_phys/include/consts.h.
#define L4DM_MEMPHYS_SAME_POOL 0x00020000 |
Copy: use same pool like source to allocate memory
Definition at line 44 of file dm_phys/include/consts.h.
L4_CV int l4dm_mem_open | ( | l4_threadid_t | dsm_id, | |
l4_size_t | size, | |||
l4_addr_t | align, | |||
l4_uint32_t | flags, | |||
const char * | name, | |||
l4dm_dataspace_t * | ds | |||
) |
Create new dataspace.
dsm_id | Dataspace manager id, set to L4DM_DEFAULT_DSM to use default dataspace manager provided by the L4 environment | |
size | Dataspace size | |
align | Alignment | |
flags | Flags:
| |
name | Dataspace name |
ds | Dataspace id |
L4_CV int l4dm_mem_resize | ( | const l4dm_dataspace_t * | ds, | |
l4_size_t | new_size | |||
) |
Resize dataspace.
ds | Dataspace id | |
new_size | New dataspace size |
L4_CV int l4dm_mem_info | ( | const l4dm_dataspace_t * | ds, | |
l4_size_t * | size, | |||
l4_threadid_t * | owner, | |||
char * | name, | |||
l4_uint32_t * | next_id | |||
) |
Get debugging information.
ds | Dataspace id |
size | Dataspace size | |
owner | Dataspace owner | |
name | Dataspace name | |
next_id | Next dataspace id to iterate |
L4_CV int l4dm_close | ( | const l4dm_dataspace_t * | ds | ) |
Close dataspace.
ds | Dataspace id |
int l4dm_close_all | ( | l4_threadid_t | dsm_id, | |
l4_threadid_t | client, | |||
l4_uint32_t | flags | |||
) |
Close all dataspaces of a client.
dsm_id | Dataspace manager thread id | |
client | Client thread id | |
flags | Flags:
|
L4_CV int l4dm_copy | ( | const l4dm_dataspace_t * | ds, | |
l4_uint32_t | flags, | |||
const char * | name, | |||
l4dm_dataspace_t * | copy | |||
) |
Create dataspace copy, short form.
ds | Source dataspace id | |
flags | Flags:
| |
name | Copy name |
copy | Copy dataspace id |
int l4dm_copy_long | ( | const l4dm_dataspace_t * | ds, | |
l4_offs_t | src_offs, | |||
l4_offs_t | dst_offs, | |||
l4_size_t | num, | |||
l4_uint32_t | flags, | |||
const char * | name, | |||
l4dm_dataspace_t * | copy | |||
) |
Create dataspace copy, long form.
ds | Source dataspace id | |
src_offs | Offset in source dataspace | |
dst_offs | Offset in destination dataspace | |
num | Number of bytes to copy, set to L4DM_WHOLE_DS to copy the whole dataspace starting at src_offs | |
flags | Flags
| |
name | Copy name |
copy | Dataspace id of copy |
L4_CV int l4dm_memphys_open | ( | int | pool, | |
l4_addr_t | addr, | |||
l4_size_t | size, | |||
l4_addr_t | align, | |||
l4_uint32_t | flags, | |||
const char * | name, | |||
l4dm_dataspace_t * | ds | |||
) |
Create new dataspace (extended version for DMphys).
pool | Memory pool (0-7), predefined pools are:
| |
addr | Start address of memory area, set to L4DM_MEMPHYS_ANY_ADDR to find a suitable memory area, otherwise the contiguous area at addr is allocated. | |
size | Dataspace size | |
align | Memory area alignment, it is only used if addr is set to L4DM_MEMPHYS_ANY_ADDR and the flag L4DM_CONTIGUOUS ist set | |
flags | Flags:
| |
name | Dataspace name |
ds | Dataspace id |
L4_CV int l4dm_memphys_copy | ( | const l4dm_dataspace_t * | ds, | |
l4_offs_t | src_offs, | |||
l4_offs_t | dst_offs, | |||
l4_size_t | num, | |||
int | dst_pool, | |||
l4_addr_t | dst_addr, | |||
l4_size_t | dst_size, | |||
l4_addr_t | dst_align, | |||
l4_uint32_t | flags, | |||
const char * | name, | |||
l4dm_dataspace_t * | copy | |||
) |
Create dataspace copy (extended DMphys version).
ds | Source dataspace id | |
src_offs | Offset in source dataspace | |
dst_offs | Offset in destination dataspace | |
num | Number of bytes to copy, set to L4DM_WHOLE_DS to copy the whole dataspace starting at src_offs | |
dst_pool | Memory pool to use to allocate destination dataspace | |
dst_addr | Phys. address of destination dataspace, set to L4DM_MEMPHYS_ANY_ADDR to find an appropriate address | |
dst_size | Size of destination dataspace, if larger than dst_offs + num it is used as the size of the destination dataspace | |
dst_align | Alignment of destination dataspace | |
flags | Flags:
| |
name | Destination dataspace name |
copy | Copy dataspace id |
L4_CV l4_threadid_t l4dm_memphys_find_dmphys | ( | void | ) |
Find DMphys.