dxd - dynax driver framework  2675
cross platform open source driver development framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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
 WDK buffer default constructor. More...
 
 buffer (size_t size, unsigned int limit=limit_t, unsigned int alignment=alignment_t, bool contigous=contigous_t)
 WDK buffer constructor. More...
 
 buffer ()=default
 IOKit default buffer constructor. More...
 
 buffer (size_t size, unsigned int limit=limit_t, unsigned int alignment=alignment_t, bool contigous=contigous_t)
 IOKit buffer constructor. More...
 
void free ()
 
os_result initialize (const void *data, size_t size)
 IOKit memory initializer. More...
 
os_result initialize (const void *data, size_t size)
 IOKit memory initializer. More...
 
os_result initialize (const ::MDL *mdl)
 
os_result initialize (const ::MDL *mdl)
 
os_result initialize (void *data, size_t size)
 IOKit memory initializer. More...
 
os_result initialize (void *data, size_t size)
 IOKit memory initializer. More...
 
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 (::IOMemoryDescriptor *iokit_memory_descriptor)
 IOKit memory initializer. More...
 
os_result initialize (::IOMemoryDescriptor *iokit_memory_descriptor)
 IOKit memory initializer. More...
 
os_result initialize (::IOMemoryDescriptor *iokit_memory_descriptor, size_t offset, size_t size)
 IOKit memory initializer. More...
 
os_result initialize (::IOMemoryDescriptor *iokit_memory_descriptor, size_t offset, size_t size)
 IOKit memory initializer. More...
 
os_result initialize (size_t size, unsigned int limit=limit_t, unsigned int alignment=alignment_t, bool contigous=contigous_t)
 
os_result initialize (size_t size, unsigned int limit=limit_t, unsigned int alignment=alignment_t, bool contigous=contigous_t)
 IOKit buffer initializer. More...
 
 operator const ::IOMemoryDescriptor * () const
 IOKit IOMemoryDescriptor* implicit cast. More...
 
 operator const ::IOMemoryDescriptor * () const
 IOKit IOMemoryDescriptor* implicit cast. More...
 
 operator uint64_t () const
 IOKit physical address (only relevant for contigous memory) More...
 
 operator uint64_t () const
 IOKit physical address (only relevant for contigous memory) More...
 
 operator::IOMemoryDescriptor * ()
 
 operator::IOMemoryDescriptor * ()
 
 operator::MDL * () const
 
 operator::MDL * () const
 
size_t size () const
 IOKit memory size. More...
 
size_t size () const
 IOKit memory size. More...
 
virtual ~buffer ()
 WDK buffer memory destructor. More...
 

Public Attributes

os_result status
 IOKit memory status. More...
 
os_result status
 IOKit memory status. More...
 

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

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()

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
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.

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
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 ( )
inline

WDK buffer memory destructor.

Member Function Documentation

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 caller graph for this function:

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
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
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!

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:

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
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
os_result dxd::memory< scope_t >::initialize ( const ::MDL *  mdl,
size_t  offset,
size_t  size 
)
inlineinherited
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:

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

IOKit memory initializer.

+ Here is the call graph for this function:

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

IOKit memory initializer.

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:

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

IOKit memory initializer.

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
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 caller graph for this function:

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

IOKit IOMemoryDescriptor* implicit cast.

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

IOKit IOMemoryDescriptor* implicit cast.

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

IOKit physical address (only relevant for contigous memory)

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

IOKit physical address (only relevant for contigous memory)

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

IOKit memory size.

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

IOKit memory size.

Member Data Documentation

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

IOKit memory status.

status of memory object

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

IOKit memory status.

status of memory object


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

(c) copyright 2009 dynamic acoustics e.U. generated on Tue Dec 4 2018

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.