dxd - dynax driver framework 2.1.0d58
cross platform open source driver development framework
Loading...
Searching...
No Matches
dxd::fw::phy Class Reference

IOKit: FireWire physical address space. More...

#include <dxd_fw.h>

+ Inheritance diagram for dxd::fw::phy:
+ Collaboration diagram for dxd::fw::phy:

Public Member Functions

void free ()
 IOKit physical address space free.
 
void free ()
 IOKit address space free.
 
template<class sgl_t >
os_result initialize (::IOFireWireUnit *iokit_fw_unit, ::IOMemoryDescriptor *iokit_memory_descriptor, unsigned int &segments, sgl_t &sgl)
 IOKit physical address space allocator.
 
os_result initialize (::IOFireWireUnit *iokit_fw_unit, uint64_t space, size_t size32)
 IOKit: firewire address space initializer.
 
template<class sgl_t >
os_result initialize (const dxd::fw &fw, ::MDL *mdl, unsigned int &segments, sgl_t &sgl)
 
os_result initialize (const dxd::fw &fw, uint64_t space, size_t size32)
 WDK: firewire pseudeo address space initializer.
 
 phy ()
 
os_result synchronize (direction direction=direction::both)
 
virtual ~phy ()
 

Public Attributes

size_t size32
 
uint64_t space =0
 firewire address
 
os_result status
 

Protected Member Functions

virtual os_result write (uint64_t space, const unsigned int *data32, size_t size32)
 

Detailed Description

IOKit: FireWire physical address space.

Infrastructure to open a firewire physical address space, transparently maps backing store memory or if this is not possible due to memory boundary restrictions handles external device I/O requests to it.

Todo
templatize endianism!
Todo
templatize endianism!

Constructor & Destructor Documentation

◆ phy()

dxd::fw::phy::phy ( )
inline

◆ ~phy()

virtual dxd::fw::phy::~phy ( )
inline
+ Here is the call graph for this function:

Member Function Documentation

◆ free() [1/2]

void dxd::fw::phy::free ( )
inlinevirtual

IOKit physical address space free.

Checks if its a physical address space and

completes its DMA if it was prepared,

lets the super class complete the freeing of the address space.

Reimplemented from dxd::fw::address.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ free() [2/2]

void dxd::fw::phy::free ( )
inlinevirtual

IOKit address space free.

Reimplemented from dxd::fw::address.

◆ initialize() [1/4]

template<class sgl_t >
os_result dxd::fw::phy::initialize ( ::IOFireWireUnit * iokit_fw_unit,
::IOMemoryDescriptor * iokit_memory_descriptor,
unsigned int & segments,
sgl_t & sgl )
inline

IOKit physical address space allocator.

Allows re-initialization.

Checks the provided firewire device and

the provided memory.

checks firewire device state,

Tries to create a firewire physical address space out of the provided backing store,

if its entire range is below 4GB, it prepares its DMA,

it activates the newly created physical address space,

obtains the physical firewire address space scatter gather list and

converts it into the user supplied structure.

If the physical address range could not be created

it tries to create a simple R/W pseudo address space;

it activates the newly created simple R/W pseudo address space,

on success it converts the address space into the user supplied structure.

Parameters
iokit_fw_unitfirewire unit to create the address space for
iokit_memory_descriptorfirewire backing store physical memory
segmentsin: max amount of segments of scatter gather list; out: occupied amount of segments of scatter gather list
sglscatter gather list; user defined array of lo,hi and length members
+ Here is the call graph for this function:

◆ initialize() [2/4]

os_result dxd::fw::address::initialize ( ::IOFireWireUnit * iokit_fw_unit,
uint64_t space,
size_t size32 )
inlineinherited

IOKit: firewire address space initializer.

Allows re-initialization.

Checks for valid fw unit object,

checks firewire device state,

creates a pdeudo address space,

returns the address and

activates the firewire space.

Parameters
iokit_fw_unitfirewire unit to create the address space for
spacefirewire address
size32firewire address space size
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initialize() [3/4]

template<class sgl_t >
os_result dxd::fw::phy::initialize ( const dxd::fw & fw,
::MDL * mdl,
unsigned int & segments,
sgl_t & sgl )
inline

Allows re-initialization.

limit SGL elements

against size of the buffer described by the provided MDL,

create temporary buffer to receive address space segments

constructs the appropriate irb, if necessary applies workaround for bounce buffer bug in 64 bit Windows with more than 4GB physical memory,

Todo
remove workaround using pseudo address space if physical memory is located above 4GB (Bill cannot handle this bidirectionally: content will not be flushed back from bounce buffers)

and submits it to the lower device,

obtains an handle to windows representation of the spawned address space,

checks returned number of physical segments,

obtains number of physical segments,

converts physical segment range into user supplied structure

Parameters
mdlbacking store: needs to be mapped below 4GB boundary or
segmentscorrect paging needs to be ensured
+ Here is the call graph for this function:

◆ initialize() [4/4]

os_result dxd::fw::address::initialize ( const dxd::fw & fw,
uint64_t space,
size_t size32 )
inlineinherited

WDK: firewire pseudeo address space initializer.

Make sure to free the address space as long as there is a valid connection to the device object (i.e. during device::conclude() or device::sleep(). The system will crash after the driver was unloaded if the device writes into a previously allocated address space - even if the address space has been re-allocated after re-loading the driver!

Allows re-initialization.

iterates over all fifo elements and for each fifo elements:

  • creates a wired backing store,
  • initializes the fifo MDL pointer with the backing store MDL
  • atomically inserts the fifo element at the beginning of the sequenced singly linked list of the address space

constructs the appropriate irb

and submits it to the lower device,

obtains an handle to windows representation of the spawned address space,

retrieves the actual address and length of firewire space.

+ Here is the call graph for this function:

◆ synchronize()

os_result dxd::fw::phy::synchronize ( direction direction = direction::both)
inline

◆ write()

virtual os_result dxd::fw::address::write ( uint64_t space,
const unsigned int * data32,
size_t size32 )
inlineprotectedvirtualinherited

Member Data Documentation

◆ size32

size_t dxd::fw::address::size32
inherited

◆ space

uint64_t dxd::fw::address::space =0
inherited

firewire address

◆ status

os_result dxd::fw::phy::status

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

(c) copyright 2009 dynamic acoustics e.U. generated on Wed Apr 24 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.