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::pci Class Reference

#include <dxd_pci.h>

+ Inheritance diagram for dxd::pci:
+ Collaboration diagram for dxd::pci:

Classes

struct  resources
 
class  scatter_gather
 

Public Member Functions

template<class client_t = ::IOService, typename return_t = os_result, typename exec_arg_t , typename exec_t >
return_t each_child (exec_arg_t exec_arg, exec_t exec)
 apply executor functor for each child More...
 
template<class client_t = ::IOUserClient, typename return_t = os_result, typename exec_arg_t , typename exec_t >
return_t each_client (exec_arg_t exec_arg, exec_t exec)
 apply executor functor for each user client More...
 
virtual os_result ioctl (unsigned int ioctl, const void *in, size_t size_in, void *out, size_t size_out, size_t &size)
 device IOCTL handler More...
 
template<typename tx_t , typename rx_t >
os_result ioctl (unsigned int ioctl, const tx_t &tx, rx_t &rx)
 convenience ioctl accessor for direct inter-kext IOCTL More...
 
os_result notify_clients ()
 
 operator::IOPCIDevice * () const
 IOKit IOPCIDevice* implicit cast. More...
 
template<typename type_t >
os_result property (const char *key, type_t &value) const
 provider property request More...
 
template<typename type_t >
os_result query (const char *key, type_t &value)
 device property request More...
 
template<>
os_result query (const char *key, unsigned int &value)
 (defined(doxygen)||defined(DXD_EXTERN)) More...
 
os_result set (const char *key, unsigned int value)
 

Protected Member Functions

void conclude () override
 IOKit: Main driver finalization. More...
 
virtual bool irq (int, int64_t)
 IOKit: high priority interrupt request indication. More...
 
virtual os_result irq_disable ()
 IOKit: disable hardware irq handler. More...
 
virtual os_result irq_enable ()
 IOKit: enable hardware irq handler. More...
 
virtual os_result isr (int)
 IOKit: lowered priority interrupt service handler. More...
 
os_result launch () override
 IOKit: Main driver entry. More...
 

Protected Attributes

resources hw
 

Member Function Documentation

void dxd::pci::conclude ( )
inlineoverrideprotectedvirtual

IOKit: Main driver finalization.

conclude() is one of the driver-supplied routines that is called before a driver is to be removed. It is responsible for freeing all resource the driver acquired during launch().

Reimplemented from dxd::device.

template<class client_t = ::IOService, typename return_t = os_result, typename exec_arg_t , typename exec_t >
return_t dxd::device::each_child ( exec_arg_t  exec_arg,
exec_t  exec 
)
inlineinherited

apply executor functor for each child

template<class client_t = ::IOUserClient, typename return_t = os_result, typename exec_arg_t , typename exec_t >
return_t dxd::device::each_client ( exec_arg_t  exec_arg,
exec_t  exec 
)
inlineinherited

apply executor functor for each user client

virtual os_result dxd::device::ioctl ( unsigned int  ioctl,
const void *  in,
size_t  size_in,
void *  out,
size_t  size_out,
size_t &  size 
)
inlinevirtualinherited

device IOCTL handler

virtual ioctl() gets called by the dynax driver framework for device IOCTL handling.

remark: this is rarely done. usually IOCTLs are handled in the user client derivate.

Parameters
ioctlIOCTL
inbuffer pointer containing data from user mode
size_insize of the buffer containing data from user mode
outbuffer pointer accepting data to be returned to user mode
size_outsize of the buffer accepting data to be returned to user mode
sizeactual size of data to be returned to user mode

Reimplemented in dxd::usb_stream.

+ Here is the caller graph for this function:

template<typename tx_t , typename rx_t >
os_result dxd::device::ioctl ( unsigned int  ioctl,
const tx_t &  tx,
rx_t &  rx 
)
inlineinherited

convenience ioctl accessor for direct inter-kext IOCTL

+ Here is the call graph for this function:

virtual bool dxd::pci::irq ( int  ,
int64_t   
)
inlineprotectedvirtual

IOKit: high priority interrupt request indication.

virtual os_result dxd::pci::irq_disable ( )
inlineprotectedvirtual

IOKit: disable hardware irq handler.

virtual os_result dxd::pci::irq_enable ( )
inlineprotectedvirtual

IOKit: enable hardware irq handler.

virtual os_result dxd::pci::isr ( int  )
inlineprotectedvirtual

IOKit: lowered priority interrupt service handler.

os_result dxd::pci::launch ( )
inlineoverrideprotectedvirtual

IOKit: Main driver entry.

launch() is one of the dynax driver frameword-supplied routines that is called after this driver is loaded. It is responsible for initializing the driver.

PCI memory windows and interrupts will be created and connected by the framework, the hw member will be filled out accordingly.

Reimplemented from dxd::device.

+ Here is the caller graph for this function:

os_result dxd::device::notify_clients ( )
inlineinherited
dxd::pci::operator::IOPCIDevice * ( ) const
inline

IOKit IOPCIDevice* implicit cast.

template<typename type_t >
os_result dxd::device::property ( const char *  key,
type_t &  value 
) const
inlineinherited

provider property request

try if property is an OSString

or, try to get it as OSData

+ Here is the caller graph for this function:

template<typename type_t >
os_result dxd::device::query ( const char *  key,
type_t &  value 
)
inherited

device property request

device string property request

Todo:
move into property class

try if property is an OSString

get it as OSData

+ Here is the call graph for this function:

template<>
os_result dxd::device::query ( const char *  key,
unsigned int &  value 
)
inherited

(defined(doxygen)||defined(DXD_EXTERN))

device integer property request

os_result dxd::device::set ( const char *  key,
unsigned int  value 
)
inlineinherited

Member Data Documentation

resources dxd::pci::hw
protected

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.