MLIR-AIE
Classes | Macros | Enumerations
ion.h File Reference
#include <linux/ioctl.h>
#include <linux/types.h>
+ Include dependency graph for ion.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ion_allocation_data
 DOC: Ion Userspace API. More...
 
struct  ion_heap_data
 
struct  ion_heap_query
 struct ion_heap_query - collection of data about all heaps @cnt - total number of heaps to be copied @heaps - buffer to copy heap data More...
 

Macros

#define ION_NUM_HEAP_IDS   (sizeof(unsigned int) * 8)
 
#define ION_FLAG_CACHED   1
 allocation flags - the lower 16 bits are used by core ion, the upper 16 bits are reserved for use by the heaps themselves.
 
#define MAX_HEAP_NAME   32
 
- first 32 characters of the heap name

struct ion_heap_data - data about a heap

@type - heap type @heap_id - heap id for the heap

#define ION_IOC_MAGIC   'I'
 
#define ION_IOC_ALLOC   _IOWR(ION_IOC_MAGIC, 0, struct ion_allocation_data)
 DOC: ION_IOC_ALLOC - allocate memory.
 
#define ION_IOC_HEAP_QUERY   _IOWR(ION_IOC_MAGIC, 8, struct ion_heap_query)
 DOC: ION_IOC_HEAP_QUERY - information about available heaps.
 

Enumerations

enum  ion_heap_type {
  ION_HEAP_TYPE_SYSTEM , ION_HEAP_TYPE_SYSTEM_CONTIG , ION_HEAP_TYPE_CARVEOUT , ION_HEAP_TYPE_CHUNK ,
  ION_HEAP_TYPE_DMA , ION_HEAP_TYPE_CUSTOM
}
 enum ion_heap_types - list of all possible types of heaps @ION_HEAP_TYPE_SYSTEM: memory allocated via vmalloc @ION_HEAP_TYPE_SYSTEM_CONTIG: memory allocated via kmalloc @ION_HEAP_TYPE_CARVEOUT: memory allocated from a prereserved carveout heap, allocations are physically contiguous @ION_HEAP_TYPE_DMA: memory allocated via DMA API @ION_NUM_HEAPS: helper for iterating over heaps, a bit mask is used to identify the heaps, so only 32 total heap types are supported More...
 

Macro Definition Documentation

◆ ION_FLAG_CACHED

#define ION_FLAG_CACHED   1

allocation flags - the lower 16 bits are used by core ion, the upper 16 bits are reserved for use by the heaps themselves.

Definition at line 49 of file ion.h.

◆ ION_IOC_ALLOC

#define ION_IOC_ALLOC   _IOWR(ION_IOC_MAGIC, 0, struct ion_allocation_data)

DOC: ION_IOC_ALLOC - allocate memory.

Takes an ion_allocation_data struct and returns it with the handle field populated with the opaque handle for the allocation.

Definition at line 115 of file ion.h.

◆ ION_IOC_HEAP_QUERY

#define ION_IOC_HEAP_QUERY   _IOWR(ION_IOC_MAGIC, 8, struct ion_heap_query)

DOC: ION_IOC_HEAP_QUERY - information about available heaps.

Takes an ion_heap_query structure and populates information about available Ion heaps.

Definition at line 123 of file ion.h.

◆ ION_IOC_MAGIC

#define ION_IOC_MAGIC   'I'

Definition at line 107 of file ion.h.

◆ ION_NUM_HEAP_IDS

#define ION_NUM_HEAP_IDS   (sizeof(unsigned int) * 8)

Definition at line 38 of file ion.h.

◆ MAX_HEAP_NAME

#define MAX_HEAP_NAME   32

Definition at line 77 of file ion.h.

Enumeration Type Documentation

◆ ion_heap_type

enum ion_heap_types - list of all possible types of heaps @ION_HEAP_TYPE_SYSTEM: memory allocated via vmalloc @ION_HEAP_TYPE_SYSTEM_CONTIG: memory allocated via kmalloc @ION_HEAP_TYPE_CARVEOUT: memory allocated from a prereserved carveout heap, allocations are physically contiguous @ION_HEAP_TYPE_DMA: memory allocated via DMA API @ION_NUM_HEAPS: helper for iterating over heaps, a bit mask is used to identify the heaps, so only 32 total heap types are supported

Enumerator
ION_HEAP_TYPE_SYSTEM 
ION_HEAP_TYPE_SYSTEM_CONTIG 
ION_HEAP_TYPE_CARVEOUT 
ION_HEAP_TYPE_CHUNK 
ION_HEAP_TYPE_DMA 
ION_HEAP_TYPE_CUSTOM 

Definition at line 26 of file ion.h.