dxd - dynax driver framework 2.5.0d148
cross platform open source driver development framework
Loading...
Searching...
No Matches
map< scope_t, vm_t > Class Template Reference

DriverKit physical address (only relevant for contigous memory) More...

#include <dxd_memory.h>

Public Member Functions

void free ()
 DriverKit map free.
 
os_result initialize (::IOMemoryDescriptor *io_memory_descriptor, size_t offset=0, size_t size=0, uint64_t alignment=0, void *address=nullptr)
 DriverKit map initializer.
 
 map ()=default
 DriverKit default mapping constructor.
 
 map (::IOMemoryDescriptor *io_memory_descriptor, size_t offset=0)
 DriverKit mapping constructor.
 
 operator const vm_t * () const
 
 operator const::IOMemoryMap * () const
 
 operator vm_t * () const
 
vm_t * operator-> ()
 
const vm_t * operator-> () const
 operator to use mapping like pointer
 
 operator::IOMemoryMap * ()
 
size_t size () const
 DriverKit mapping size.
 
 ~map ()
 

Public Attributes

os_result status = not_initialized
 status of mapping object
 

Protected Attributes

vm_t * _vm = nullptr
 DriverKit virtual address mapping.
 
::IOMemoryMap * io_memory_map = nullptr
 

Detailed Description

template<dx::scope scope_t = dx::kernel, typename vm_t = unsigned int>
class map< scope_t, vm_t >

DriverKit physical address (only relevant for contigous memory)

Constructor & Destructor Documentation

◆ map() [1/2]

template<dx::scope scope_t = dx::kernel, typename vm_t = unsigned int>
map< scope_t, vm_t >::map ( )
default

DriverKit default mapping constructor.

◆ map() [2/2]

template<dx::scope scope_t = dx::kernel, typename vm_t = unsigned int>
map< scope_t, vm_t >::map ( ::IOMemoryDescriptor * io_memory_descriptor,
size_t offset = 0 )
inline

DriverKit mapping constructor.

Parameters
io_memory_descriptorIOMemoryDescriptor to be mapped into the kernel address space
offsetoffset into memory descriptor to create mapping
+ Here is the call graph for this function:

◆ ~map()

template<dx::scope scope_t = dx::kernel, typename vm_t = unsigned int>
map< scope_t, vm_t >::~map ( )
inline
+ Here is the call graph for this function:

Member Function Documentation

◆ free()

template<dx::scope scope_t = dx::kernel, typename vm_t = unsigned int>
void map< scope_t, vm_t >::free ( )
inline

DriverKit map free.

Checks if DriverKit mapping already exists and

does not call unmap(): IOMemoryMap instances will unmap themselves upon free, ie. when the last client with a reference calls release. unmap() forces the IOMemoryMap to destroy the mapping it represents, regardless of the number of clients. releases the map object.

+ Here is the caller graph for this function:

◆ initialize()

template<dx::scope scope_t = dx::kernel, typename vm_t = unsigned int>
os_result map< scope_t, vm_t >::initialize ( ::IOMemoryDescriptor * io_memory_descriptor,
size_t offset = 0,
size_t size = 0,
uint64_t alignment = 0,
void * address = nullptr )
inline

DriverKit map initializer.

map<kernel> maps an IOMemoryDescriptor (typically cast of a dxd::memory or buffer class) into the DriverKit address space.

            kIOMemoryMapFixedAddress map at the address requested
            kIOMemoryMapReadOnly create a read only mapping
            kIOMemoryMapCacheModeDefault default cache mode
            kIOMemoryMapCacheModeInhibit inhibited cache mode
            kIOMemoryMapCacheModeCopyback copyback cache mode
            kIOMemoryMapCacheModeWriteThrough write through cache mode

Allows re-initialization.

Checks buffer object,

maps the buffer into the DriverKit (will fail if offset is given)

and obtains a DriverKit virtual address (apply offset here instead).

Parameters
io_memory_descriptorIOMemoryDescriptor to be mapped into the DriverKit address space
offsetoffset into memory descriptor to create mapping
sizesize of mapping
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator const vm_t *()

template<dx::scope scope_t = dx::kernel, typename vm_t = unsigned int>
map< scope_t, vm_t >::operator const vm_t * ( ) const
inline

◆ operator const::IOMemoryMap *()

template<dx::scope scope_t = dx::kernel, typename vm_t = unsigned int>
map< scope_t, vm_t >::operator const::IOMemoryMap * ( ) const
inline

◆ operator vm_t *()

template<dx::scope scope_t = dx::kernel, typename vm_t = unsigned int>
map< scope_t, vm_t >::operator vm_t * ( ) const
inline

◆ operator->() [1/2]

template<dx::scope scope_t = dx::kernel, typename vm_t = unsigned int>
vm_t * map< scope_t, vm_t >::operator-> ( )
inline

◆ operator->() [2/2]

template<dx::scope scope_t = dx::kernel, typename vm_t = unsigned int>
const vm_t * map< scope_t, vm_t >::operator-> ( ) const
inline

operator to use mapping like pointer

◆ operator::IOMemoryMap *()

template<dx::scope scope_t = dx::kernel, typename vm_t = unsigned int>
map< scope_t, vm_t >::operator::IOMemoryMap * ( )
inline

◆ size()

template<dx::scope scope_t = dx::kernel, typename vm_t = unsigned int>
size_t map< scope_t, vm_t >::size ( ) const
inline

DriverKit mapping size.

Member Data Documentation

◆ _vm

template<dx::scope scope_t = dx::kernel, typename vm_t = unsigned int>
vm_t* map< scope_t, vm_t >::_vm = nullptr
protected

DriverKit virtual address mapping.

◆ io_memory_map

template<dx::scope scope_t = dx::kernel, typename vm_t = unsigned int>
::IOMemoryMap* map< scope_t, vm_t >::io_memory_map = nullptr
protected

◆ status

template<dx::scope scope_t = dx::kernel, typename vm_t = unsigned int>
os_result map< scope_t, vm_t >::status = not_initialized

status of mapping object


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

(c) copyright 2009 dynamic acoustics e.U. generated on Fri Aug 22 2025

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.