dxd - dynax driver framework 2.1.0d58
cross platform open source driver development framework
Loading...
Searching...
No Matches
dxd::buffer< scope_t, limit_t, alignment_t, contigous_t > Class Template Reference

kernel memory buffer w/o alignment and boundary requirements More...

#include <dxd_memory.h>

+ Inheritance diagram for dxd::buffer< scope_t, limit_t, alignment_t, contigous_t >:
+ Collaboration diagram for dxd::buffer< scope_t, limit_t, alignment_t, contigous_t >:

Public Member Functions

 buffer ()=default
 IOKit default buffer constructor.
 
 buffer ()=default
 WDK buffer default constructor.
 
 buffer (size_t size, unsigned int limit=limit_t, unsigned int alignment=alignment_t, bool contigous=contigous_t)
 IOKit buffer constructor.
 
 buffer (size_t size, unsigned int limit=limit_t, unsigned int alignment=alignment_t, bool contigous=contigous_t)
 WDK buffer constructor.
 
void free ()
 
os_result initialize (::IOMemoryDescriptor *iokit_memory_descriptor)
 IOKit memory initializer.
 
os_result initialize (::IOMemoryDescriptor *iokit_memory_descriptor)
 IOKit memory initializer.
 
os_result initialize (::IOMemoryDescriptor *iokit_memory_descriptor, size_t offset, size_t size)
 IOKit memory initializer.
 
os_result initialize (::IOMemoryDescriptor *iokit_memory_descriptor, size_t offset, size_t size)
 IOKit memory initializer.
 
os_result initialize (const void *data, size_t size)
 IOKit memory initializer.
 
os_result initialize (const void *data, size_t size)
 IOKit memory initializer.
 
os_result initialize (const::MDL *mdl)
 
os_result initialize (const::MDL *mdl)
 
os_result initialize (const::MDL *mdl, size_t offset, size_t size)
 
os_result initialize (const::MDL *mdl, size_t offset, size_t size)
 
os_result initialize (size_t size, unsigned int limit=limit_t, unsigned int alignment=alignment_t, bool contigous=contigous_t)
 IOKit buffer initializer.
 
os_result initialize (size_t size, unsigned int limit=limit_t, unsigned int alignment=alignment_t, bool contigous=contigous_t)
 
os_result initialize (void *data, size_t size)
 IOKit memory initializer.
 
os_result initialize (void *data, size_t size)
 IOKit memory initializer.
 
 operator const::IOMemoryDescriptor * () const
 IOKit IOMemoryDescriptor* implicit cast.
 
 operator const::IOMemoryDescriptor * () const
 IOKit IOMemoryDescriptor* implicit cast.
 
 operator uint64_t () const
 IOKit physical address (only relevant for contigous memory)
 
 operator uint64_t () const
 IOKit physical address (only relevant for contigous memory)
 
 operator::IOMemoryDescriptor * ()
 
 operator::IOMemoryDescriptor * ()
 
 operator::MDL * () const
 
 operator::MDL * () const
 
size_t size () const
 IOKit memory size.
 
size_t size () const
 IOKit memory size.
 
virtual ~buffer ()
 WDK buffer memory destructor.
 

Public Attributes

os_result status
 IOKit memory status.
 
os_result status =not_initialized
 IOKit memory status.
 

Detailed Description

template<dx::scope scope_t = dx::kernel, unsigned int limit_t = 64, unsigned int alignment_t = 0, bool contigous_t = false>
class dxd::buffer< scope_t, limit_t, alignment_t, contigous_t >

kernel memory buffer w/o alignment and boundary requirements

generic WDK buffer class

The dxd::buffer is a kernel memory representation with an associated memory backing store allocation. The memory backing store is owned by this kernel memory representation and the reference will be released when this object is destroyed.

Constructor & Destructor Documentation

◆ buffer() [1/4]

template<dx::scope scope_t = dx::kernel, unsigned int limit_t = 64, unsigned int alignment_t = 0, bool contigous_t = false>
dxd::buffer< scope_t, limit_t, alignment_t, contigous_t >::buffer ( )
default

IOKit default buffer constructor.

Use this in conjunction with initialize()

◆ buffer() [2/4]

template<dx::scope scope_t = dx::kernel, unsigned int limit_t = 64, unsigned int alignment_t = 0, bool contigous_t = false>
dxd::buffer< scope_t, limit_t, alignment_t, contigous_t >::buffer ( size_t size,
unsigned int limit = limit_t,
unsigned int alignment = alignment_t,
bool contigous = contigous_t )
inline

IOKit buffer constructor.

Parameters
sizesize to be alloced by buffer object
limitlimit physical memory address space
alignmentenforce physical memory alignment
contigousenforce contiguos physical memory
+ Here is the call graph for this function:

◆ buffer() [3/4]

template<dx::scope scope_t = dx::kernel, unsigned int limit_t = 64, unsigned int alignment_t = 0, bool contigous_t = false>
dxd::buffer< scope_t, limit_t, alignment_t, contigous_t >::buffer ( )
default

WDK buffer default constructor.

◆ buffer() [4/4]

template<dx::scope scope_t = dx::kernel, unsigned int limit_t = 64, unsigned int alignment_t = 0, bool contigous_t = false>
dxd::buffer< scope_t, limit_t, alignment_t, contigous_t >::buffer ( size_t size,
unsigned int limit = limit_t,
unsigned int alignment = alignment_t,
bool contigous = contigous_t )
inline

WDK buffer constructor.

Parameters
sizesize to be alloced by buffer object
limitlimit physical memory address space
alignmentenforce physical memory alignment
contigousenforce contiguos physical memory
+ Here is the call graph for this function:

◆ ~buffer()

template<dx::scope scope_t = dx::kernel, unsigned int limit_t = 64, unsigned int alignment_t = 0, bool contigous_t = false>
virtual dxd::buffer< scope_t, limit_t, alignment_t, contigous_t >::~buffer ( )
inlinevirtual

WDK buffer memory destructor.

+ Here is the call graph for this function:

Member Function Documentation

◆ free()

template<dx::scope scope_t = dx::kernel, unsigned int limit_t = 64, unsigned int alignment_t = 0, bool contigous_t = false>
void dxd::buffer< scope_t, limit_t, alignment_t, contigous_t >::free ( )
inline
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initialize() [1/14]

template<dx::scope scope_t = dx::kernel>
os_result dxd::memory< scope_t >::initialize ( ::IOMemoryDescriptor * iokit_memory_descriptor)
inlineinherited

IOKit memory initializer.

+ Here is the call graph for this function:

◆ initialize() [2/14]

os_result dxd::memory< scope_t >::initialize ( ::IOMemoryDescriptor * iokit_memory_descriptor)
inlineinherited

IOKit memory initializer.

◆ initialize() [3/14]

template<dx::scope scope_t = dx::kernel>
os_result dxd::memory< scope_t >::initialize ( ::IOMemoryDescriptor * iokit_memory_descriptor,
size_t offset,
size_t size )
inlineinherited

IOKit memory initializer.

+ Here is the call graph for this function:

◆ initialize() [4/14]

os_result dxd::memory< scope_t >::initialize ( ::IOMemoryDescriptor * iokit_memory_descriptor,
size_t offset,
size_t size )
inlineinherited

IOKit memory initializer.

◆ initialize() [5/14]

os_result dxd::memory< scope_t >::initialize ( const void * data,
size_t size )
inherited

IOKit memory initializer.

Parameters
datavirtual base address of range to create memory descriptor from
sizesize of range to create memory descriptor from

◆ initialize() [6/14]

template<dx::scope scope_t = dx::kernel>
os_result dxd::memory< scope_t >::initialize ( const void * data,
size_t size )
inherited

IOKit memory initializer.

Parameters
datavirtual base address of range to create memory descriptor from
sizesize of range to create memory descriptor from
+ Here is the caller graph for this function:

◆ initialize() [7/14]

template<dx::scope scope_t = dx::kernel>
os_result dxd::memory< scope_t >::initialize ( const::MDL * mdl)
inlineinherited

in contrast to an IOKit MemoryDescriptor MDLs do not support reference counting. take care when creating a dxd::memory from a dxd::buffer: although the dxd::memory holds an MDL to the buffer the buffer itself is not retained after the dxd::buffer is released!

+ Here is the call graph for this function:

◆ initialize() [8/14]

os_result dxd::memory< scope_t >::initialize ( const::MDL * mdl)
inlineinherited

in contrast to an IOKit MemoryDescriptor MDLs do not support reference counting. take care when creating a dxd::memory from a dxd::buffer: although the dxd::memory holds an MDL to the buffer the buffer itself is not retained after the dxd::buffer is released!

◆ initialize() [9/14]

os_result dxd::memory< scope_t >::initialize ( const::MDL * mdl,
size_t offset,
size_t size )
inlineinherited

◆ initialize() [10/14]

template<dx::scope scope_t = dx::kernel>
os_result dxd::memory< scope_t >::initialize ( const::MDL * mdl,
size_t offset,
size_t size )
inlineinherited
+ Here is the call graph for this function:

◆ initialize() [11/14]

template<dx::scope scope_t = dx::kernel, unsigned int limit_t = 64, unsigned int alignment_t = 0, bool contigous_t = false>
os_result dxd::buffer< scope_t, limit_t, alignment_t, contigous_t >::initialize ( size_t size,
unsigned int limit = limit_t,
unsigned int alignment = alignment_t,
bool contigous = contigous_t )
inline

IOKit buffer initializer.

Allows re-initialization.

Creates a buffer and associated memory descriptor.

Wires down the backing store memory.

Parameters
sizesize to be alloced by buffer object
limitlimit physical memory address space
alignmentenforce physical memory alignment
contigousenforce contiguos physical memory
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initialize() [12/14]

template<dx::scope scope_t = dx::kernel, unsigned int limit_t = 64, unsigned int alignment_t = 0, bool contigous_t = false>
os_result dxd::buffer< scope_t, limit_t, alignment_t, contigous_t >::initialize ( size_t size,
unsigned int limit = limit_t,
unsigned int alignment = alignment_t,
bool contigous = contigous_t )
inline

Allows re-initialization

Parameters
sizesize to be alloced by buffer object
limitlimit physical memory address space
alignmentenforce physical memory alignment
contigousenforce contiguos physical memory
+ Here is the call graph for this function:

◆ initialize() [13/14]

template<dx::scope scope_t = dx::kernel>
os_result dxd::memory< scope_t >::initialize ( void * data,
size_t size )
inherited

IOKit memory initializer.

Parameters
datavirtual base address of range to create memory descriptor from
sizesize of range to create memory descriptor from

◆ initialize() [14/14]

os_result dxd::memory< scope_t >::initialize ( void * data,
size_t size )
inherited

IOKit memory initializer.

Parameters
datavirtual base address of range to create memory descriptor from
sizesize of range to create memory descriptor from

◆ operator const::IOMemoryDescriptor *() [1/2]

dxd::memory< scope_t >::operator const::IOMemoryDescriptor * ( ) const
inlineinherited

IOKit IOMemoryDescriptor* implicit cast.

◆ operator const::IOMemoryDescriptor *() [2/2]

template<dx::scope scope_t = dx::kernel>
dxd::memory< scope_t >::operator const::IOMemoryDescriptor * ( ) const
inlineinherited

IOKit IOMemoryDescriptor* implicit cast.

◆ operator uint64_t() [1/2]

template<dx::scope scope_t = dx::kernel>
dxd::memory< scope_t >::operator uint64_t ( ) const
inlineinherited

IOKit physical address (only relevant for contigous memory)

◆ operator uint64_t() [2/2]

dxd::memory< scope_t >::operator uint64_t ( ) const
inlineinherited

IOKit physical address (only relevant for contigous memory)

◆ operator::IOMemoryDescriptor *() [1/2]

dxd::memory< scope_t >::operator::IOMemoryDescriptor * ( )
inlineinherited

◆ operator::IOMemoryDescriptor *() [2/2]

template<dx::scope scope_t = dx::kernel>
dxd::memory< scope_t >::operator::IOMemoryDescriptor * ( )
inlineinherited

◆ operator::MDL *() [1/2]

dxd::memory< scope_t >::operator::MDL * ( ) const
inlineinherited

◆ operator::MDL *() [2/2]

template<dx::scope scope_t = dx::kernel>
dxd::memory< scope_t >::operator::MDL * ( ) const
inlineinherited

◆ size() [1/2]

template<dx::scope scope_t = dx::kernel>
size_t dxd::memory< scope_t >::size ( ) const
inlineinherited

IOKit memory size.

+ Here is the caller graph for this function:

◆ size() [2/2]

size_t dxd::memory< scope_t >::size ( ) const
inlineinherited

IOKit memory size.

Member Data Documentation

◆ status [1/2]

os_result dxd::memory< scope_t >::status
inherited

IOKit memory status.

status of memory object

◆ status [2/2]

template<dx::scope scope_t = dx::kernel>
os_result dxd::memory< scope_t >::status =not_initialized
inherited

IOKit memory status.

status of memory object


The documentation for this class was generated from the following files:

(c) copyright 2009 dynamic acoustics e.U. generated on Fri Mar 29 2024

a closed source license may be obtained by requesting a written permission from dynamic acoustics e.U.
however - governmental use generally and military use especially is strictly prohibited though.