#include <Mm/pmmngr.h>
#include <Mm/vmmngr.h>
#include <aurora.h>
Go to the source code of this file.
|
| AU_EXTERN AU_EXPORT AuDMAPool * | AuDMAPoolCreate (const char *name, size_t alloc_sz, size_t align, size_t boundary) |
| | AuDMAPoolCreate – create a new pool.
|
| |
| AU_EXTERN AU_EXPORT void * | AuDMAPoolAlloc (AuDMAPool *pool, uint64_t *phys_out) |
| | AuDMAPoolAlloc – allocate a slot from desired pool.
|
| |
| AU_EXTERN AU_EXPORT void | AuDMAPoolFree (AuDMAPool *pool, void *virt, uint64_t phys) |
| | AuDMAPoolFree – free up a slot within the pool.
|
| |
| AU_EXTERN AU_EXPORT void | AuDMAPoolDestroy (AuDMAPool *pool) |
| | AuDMAPoolDestroy – completely destroy a pool.
|
| |
| AU_EXTERN AU_EXPORT void | AuDMAGlobalClassInitialize (AuDMAGlobalClass *gclass, char *name) |
| | AuDMAGlobalClassInitialize – initialize and populate global class structure.
|
| |
| AU_EXTERN AU_EXPORT void * | AuDMAGClassAlloc (AuDMAGlobalClass *gClass, size_t sz, uint64_t *physOut) |
| | AuDMAGClassAlloc – allocate memory from DMA Global Class.
|
| |
| AU_EXTERN AU_EXPORT void | AuDMAGClassFree (AuDMAGlobalClass *gClass, void *virt, uint64_t physOut, size_t sz) |
| | AuDMAGClassFree – free a memory and put it to gclass pool.
|
| |
| AU_EXTERN AU_EXPORT void | AuDMAGClassDestroy (AuDMAGlobalClass *gClass) |
| | AuDMAGClassDestroy – destroy entire dma global class.
|
| |
◆ DMA_MAX_POOL_SIZE
| #define DMA_MAX_POOL_SIZE 512 |
◆ DMA_NUM_CLASSES
| #define DMA_NUM_CLASSES 7 |
◆ AuDMAGlobalClass
◆ AuDMAPage
◆ AuDMAPool
◆ AuDMAGClassAlloc()
AuDMAGClassAlloc – allocate memory from DMA Global Class.
- Parameters
-
| gClass | – pointer to gClass |
| sz | – size to allocate |
| physOut | – where to put the physical output |
return a full 4KiB page for larger than MAX_POOL_SZ
or allocate it using pool allocator
◆ AuDMAGClassDestroy()
AuDMAGClassDestroy – destroy entire dma global class.
- Parameters
-
| gClass | – pointer to gClass |
◆ AuDMAGClassFree()
AuDMAGClassFree – free a memory and put it to gclass pool.
- Parameters
-
| gClass | – pointer to global class |
| virt | – virtual address |
| physOut | – physical address to put |
| sz | – size of the allocated memory |
◆ AuDMAGlobalClassInitialize()
AuDMAGlobalClassInitialize – initialize and populate global class structure.
- Parameters
-
| gclass | – Pointer to allocated gclass |
| name | – suitable gclass name |
◆ AuDMAPoolAlloc()
AuDMAPoolAlloc – allocate a slot from desired pool.
- Parameters
-
| pool | – pointer to pool memory |
| phys_out | – where to store the physical address |
◆ AuDMAPoolCreate()
AuDMAPoolCreate – create a new pool.
- Parameters
-
| name | – name of the pool |
| alloc_sz | – allocation unit size |
| align | – alignment to check |
| boundary | – ofcourse page boundary |
◆ AuDMAPoolDestroy()
AuDMAPoolDestroy – completely destroy a pool.
- Parameters
-
◆ AuDMAPoolFree()
AuDMAPoolFree – free up a slot within the pool.
- Parameters
-
| pool | – pointer to dma pool |
| virt | – virtual address to free |
| phys | – physical address to free |