bzr branch
http://suren.me/webbzr/alps/pcitool
45
by root
North West Logick DMA implementation |
1 |
#ifndef _PCILIB_TYPES_H
|
2 |
#define _PCILIB_TYPES_H
|
|
3 |
||
80
by Suren A. Chilingaryan
List kernel buffers |
4 |
#define KMEM_REF_HW 0x80000000 /**< Special reference to indicate hardware access */ |
5 |
#define KMEM_REF_COUNT 0x0FFFFFFF /**< Mask of reference counter (mmap/munmap), couting in mmaped memory pages */ |
|
6 |
||
7 |
#define KMEM_MODE_REUSABLE 0x80000000 /**< Indicates reusable buffer */ |
|
8 |
#define KMEM_MODE_EXCLUSIVE 0x40000000 /**< Only a single process is allowed to mmap the buffer */ |
|
9 |
#define KMEM_MODE_PERSISTENT 0x20000000 /**< Persistent mode instructs kmem_free to preserve buffer in memory */ |
|
10 |
#define KMEM_MODE_COUNT 0x0FFFFFFF /**< Mask of reuse counter (alloc/free) */ |
|
11 |
||
105
by Suren A. Chilingaryan
Properly perform synchronization of DMA buffers |
12 |
#define PCILIB_KMEM_TYPE_MASK 0xFFFF0000
|
13 |
||
45
by root
North West Logick DMA implementation |
14 |
typedef enum { |
105
by Suren A. Chilingaryan
Properly perform synchronization of DMA buffers |
15 |
PCILIB_KMEM_TYPE_CONSISTENT = 0x00000, |
16 |
PCILIB_KMEM_TYPE_PAGE = 0x10000, |
|
17 |
PCILIB_KMEM_TYPE_DMA_S2C_PAGE = 0x10001, |
|
18 |
PCILIB_KMEM_TYPE_DMA_C2S_PAGE = 0x10002 |
|
45
by root
North West Logick DMA implementation |
19 |
} pcilib_kmem_type_t; |
20 |
||
21 |
typedef enum { |
|
71
by Suren A. Chilingaryan
First iteration of work to preserve DMA state between executions |
22 |
PCILIB_KMEM_USE_STANDARD = 0, |
23 |
PCILIB_KMEM_USE_DMA_RING = 1, |
|
24 |
PCILIB_KMEM_USE_DMA_PAGES = 2 |
|
45
by root
North West Logick DMA implementation |
25 |
} pcilib_kmem_use_t; |
26 |
||
27 |
typedef enum { |
|
105
by Suren A. Chilingaryan
Properly perform synchronization of DMA buffers |
28 |
PCILIB_KMEM_SYNC_BIDIRECTIONAL = 0, |
45
by root
North West Logick DMA implementation |
29 |
PCILIB_KMEM_SYNC_TODEVICE = 1, |
30 |
PCILIB_KMEM_SYNC_FROMDEVICE = 2 |
|
31 |
} pcilib_kmem_sync_direction_t; |
|
32 |
||
33 |
||
34 |
#define PCILIB_KMEM_USE(type, subtype) (((type) << 16)|(subtype))
|
|
35 |
||
36 |
||
37 |
//pcilib_alloc_kmem_buffer(pcilib_t *ctx, size_t size, size_t alignment)
|
|
38 |
||
39 |
||
40 |
#endif /* _PCILIB_TYPES_H */ |