dxd - dynax driver framework 2.1.0d58
cross platform open source driver development framework
Loading...
Searching...
No Matches
dxd Namespace Reference

dynax driver framework kernel namespace More...

Namespaces

namespace  abstract
 
namespace  debug
 
namespace  dmus
 dmus namespace
 
namespace  doubly
 
namespace  ioctl
 kernel IOCTLs
 
namespace  linked
 
namespace  multichannel
 
namespace  portcls
 portcls namespace
 
namespace  property
 
namespace  range
 range namespace
 
namespace  wavecyclic
 wavecyclic namespace
 
namespace  wdm
 WDM++ - windows helper classes.
 

Classes

class  __atomic_pointer
 atomic pointer operations More...
 
class  __atomic_pointer< type_t * >
 
class  __atomic_scalar
 
class  __atomic_scalar< 4, type_t >
 32bit atomic operations More...
 
class  adapter
 adapter driver skeleton More...
 
struct  adjust
 
struct  adjust< host >
 
struct  adjust< swap >
 
class  array
 
class  atomic
 atomic operations More...
 
class  atomic< type_t * >
 explicitely specify pointer template argument: More...
 
class  audio
 
class  broadcast
 broadcast signalization of participating linked event items More...
 
class  buffer
 kernel memory buffer w/o alignment and boundary requirements More...
 
class  bus
 WDM BUS class. More...
 
class  client
 
class  device
 
class  engine
 
class  event
 IOKit user client. More...
 
class  event< dx::kernel >
 
class  event< dx::user >
 kernel representation of shared user space event More...
 
union  fourchar_string
 
class  fw
 WDK: FireWire device. More...
 
class  guid
 
class  iostream
 
class  lock
 
class  map
 WDK memory mapping. More...
 
class  map< dx::kernel, vm_t >
 WDK: kernel space memory mapping. More...
 
class  map< dx::user, vm_t >
 WDK: user space memory mapping. More...
 
class  memory
 virtual kernel memory description More...
 
class  mutex
 mutex More...
 
class  open
 
class  pci
 
class  port
 miniport creation helper More...
 
class  ppc
 PPC device. More...
 
class  process
 IOKit process thread. More...
 
class  reference
 reference holder for object based reference counter More...
 
class  referenced
 reference counting base class More...
 
class  scoped
 
class  scoped<::URB >
 
class  spinlock
 WDK spinlock. More...
 
class  stream
 generic kernel stream More...
 
class  usb_device
 
class  usb_stream_client
 generic USB user client class More...
 
class  usb_stream_device
 generic USB device More...
 
class  wstring
 

Typedefs

typedef ::KEVENT * os_event
 platform abstract type os_event for WDK driver
 
typedef ::NTSTATUS os_result
 platform abstract type os_result for WDK driver
 

Enumerations

enum  {
  ok =kIOReturnSuccess , not_implemented =kIOReturnUnsupported , invalid =kIOReturnBadArgument , device_error =kIOReturnDeviceError ,
  no_resources =kIOReturnNoResources , not_initialized =kIOReturnNotReady , timeout =kIOReturnTimeout , invalid_size =kIOReturnNoSpace ,
  aborted =kIOReturnAborted , exclusive =kIOReturnExclusiveAccess , device_removed =kIOReturnNotAttached , closed =kIOReturnNotOpen ,
  not_permitted =kIOReturnNotPermitted , internal_error =kIOReturnInternalError
}
 
enum  : int64_t {
  nsec =1ll , usec =nsec*1000ll , msec =usec*1000ll , sec =msec*1000ll ,
  base =0ll
}
 
enum  {
  ok =kIOReturnSuccess , not_implemented =kIOReturnUnsupported , invalid =kIOReturnBadArgument , device_error =kIOReturnDeviceError ,
  no_resources =kIOReturnNoResources , not_initialized =kIOReturnNotReady , interrupt_level_mismatch = STATUS_INVALID_LEVEL , timeout =kIOReturnTimeout ,
  invalid_size =kIOReturnNoSpace , not_aligned = STATUS_DATATYPE_MISALIGNMENT_ERROR , aborted =kIOReturnAborted , failed = STATUS_UNSUCCESSFUL ,
  device_removed =kIOReturnNotAttached , not_permitted =kIOReturnNotPermitted , internal_error =kIOReturnInternalError
}
 
enum  direction {
  in =::kIODirectionIn , out =::kIODirectionOut , both =::kIODirectionInOut , none ,
  in =::kIODirectionIn , out =::kIODirectionOut , both =::kIODirectionInOut
}
 direction of memory operation More...
 
enum  direction {
  in =::kIODirectionIn , out =::kIODirectionOut , both =::kIODirectionInOut , none ,
  in =::kIODirectionIn , out =::kIODirectionOut , both =::kIODirectionInOut
}
 
enum  endian { little_endian , big_endian , host =little_endian , swap =big_endian }
 
enum  scale : int64_t { nsec =1ll , usec =nsec*1000ll , msec =usec*1000ll , sec =msec*1000ll }
 
enum class  synchrony { sync , async }
 
enum  version { elcapitan =0x10110000 }
 

Functions

bool below32 (::MDL *mdl)
 indicates whether memory is mapped above 4GB boundary
 
template<class driver_t >
::NTSTATUS create (::DRIVER_OBJECT *wdm_driver, ::UNICODE_STRING *registry, const wchar_t *name=L"", dxd::guid guid=0)
 
template<class client_t = ::IOUserClient, typename return_t = os_result, typename exec_arg_t , typename exec_t >
return_t each (::OSIterator *iterator, exec_arg_t exec_arg, exec_t exec)
 for each iterator executor
 
void errorlog (const char *fmt...)
 
template<>
os_result fw::read32< dx::kernel, host > (unsigned int *dst, size_t size32, uint64_t space, int64_t timeout)
 
template<>
os_result fw::read32< dx::kernel, host > (unsigned int *dst, size_t size32, uint64_t space, int64_t timeout)
 WDK: synchronously submit an firewire async read request.
 
template<>
os_result fw::read32< dx::kernel, swap > (unsigned int *dst, size_t size32, uint64_t space, int64_t timeout)
 
template<>
os_result fw::read32< dx::kernel, swap > (unsigned int *dst, size_t size32, uint64_t space, int64_t timeout)
 WDK: synchronously submit an firewire async swapped data read request.
 
template<>
os_result fw::write32< dx::kernel, host > (const unsigned int *src, size_t size32, uint64_t space, int64_t timeout)
 
template<>
os_result fw::write32< dx::kernel, host > (const unsigned int *src, size_t size32, uint64_t space, int64_t timeout)
 WDK: synchronously submit an firewire async write request.
 
template<>
os_result fw::write32< dx::kernel, swap > (const unsigned int *src, size_t size32, uint64_t space, int64_t timeout)
 
template<>
os_result fw::write32< dx::kernel, swap > (const unsigned int *src, size_t size32, uint64_t space, int64_t timeout)
 WDK: synchronously submit an firewire async swapped data write request.
 
void log (const char *fmt...)
 windows kernel logging
 
unsigned int os_version ()
 
int64_t time (int64_t timestamp, scale scale=usec)
 WDK: timestamp to Windows time converter.
 
void warnlog (const char *fmt...)
 

Variables

::DRIVER_OBJECT * wdm_driver = nullptr
 Main driver entry.
 

Detailed Description

dynax driver framework kernel namespace

dxd - dynax driver framework

Typedef Documentation

◆ os_event

typedef::IOLock * dxd::os_event

platform abstract type os_event for WDK driver

platform abstract type os_event for IOKit driver

◆ os_result

typedef::IOReturn dxd::os_result

platform abstract type os_result for WDK driver

defining platform abstract type os_result for IOKit driver

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
ok 
not_implemented 
invalid 
device_error 
no_resources 
not_initialized 
timeout 
invalid_size 
aborted 
exclusive 
device_removed 
closed 
not_permitted 
internal_error 

◆ anonymous enum

anonymous enum : int64_t
Enumerator
nsec 

pseudo scale addressing Windows' odd 100ns precision

usec 
msec 
sec 
base 

◆ anonymous enum

anonymous enum
Enumerator
ok 
not_implemented 
invalid 
device_error 
no_resources 
not_initialized 
interrupt_level_mismatch 
timeout 
invalid_size 
not_aligned 
aborted 
failed 
device_removed 
not_permitted 
internal_error 

◆ direction [1/2]

direction of memory operation

Enumerator
in 
out 
both 
none 
in 
out 
both 

◆ direction [2/2]

Enumerator
in 
out 
both 
none 
in 
out 
both 

◆ endian

Enumerator
little_endian 

data is little endian and will only be swapped if either host or device is big endian

big_endian 

data is big endian and will only be swapped if either host or device is little endian

host 

data is in host endian format and will only be swapped if target device is in the opposit endian format

swap 

data is not in host endian format and will only be swapped if target device is in host endian format

◆ scale

Enumerator
nsec 

pseudo scale addressing Windows' odd 100ns precision

usec 
msec 
sec 

◆ synchrony

enum class dxd::synchrony
strong
Enumerator
sync 
async 

◆ version

Enumerator
elcapitan 

Function Documentation

◆ below32()

bool dxd::below32 ( ::MDL * mdl)

indicates whether memory is mapped above 4GB boundary

  • a serious OS should handle physical memory layout dependencies transparently. Bills buggy experiment on the other hand requires the awareness of where memory is physically mapped.
+ Here is the caller graph for this function:

◆ create()

template<class driver_t >
::NTSTATUS dxd::create ( ::DRIVER_OBJECT * wdm_driver,
::UNICODE_STRING * registry,
const wchar_t * name = L"",
dxd::guid guid = 0 )
Parameters
wdm_driverA pointer to a DRIVER_OBJECT structure that represents the driver's WDM driver object.
registryA pointer to a UNICODE_STRING structure that specifies the path to the driver's Parameters key in the registry.
nameAn internal unique name
guidGUID identifying the kernel driver interface

◆ each()

template<class client_t = ::IOUserClient, typename return_t = os_result, typename exec_arg_t , typename exec_t >
return_t dxd::each ( ::OSIterator * iterator,
exec_arg_t exec_arg,
exec_t exec )

for each iterator executor

Todo
deduct exec_t return type
+ Here is the caller graph for this function:

◆ errorlog()

void dxd::errorlog ( const char * fmt...)

◆ fw::read32< dx::kernel, host >() [1/2]

template<>
os_result dxd::fw::read32< dx::kernel, host > ( unsigned int * dst,
size_t size32,
uint64_t space,
int64_t timeout )

Checks for valid fw unit object,

creates kernel memory object from pointer:size of kernel origin,

checks kernel memory object,

create and submit read command for kernel memory object.

◆ fw::read32< dx::kernel, host >() [2/2]

template<>
os_result dxd::fw::read32< dx::kernel, host > ( unsigned int * dst,
size_t size32,
uint64_t space,
int64_t timeout )

WDK: synchronously submit an firewire async read request.

Create a memory object from kernel originated pointer:size

checks the kernel memory object,

constructs the appropriate irb and submits it to the lower device

◆ fw::read32< dx::kernel, swap >() [1/2]

template<>
os_result dxd::fw::read32< dx::kernel, swap > ( unsigned int * dst,
size_t size32,
uint64_t space,
int64_t timeout )

Checks for valid fw unit object,

create kernel memory object from pointer:size of kernel origin

check kernel memory object

◆ fw::read32< dx::kernel, swap >() [2/2]

template<>
os_result dxd::fw::read32< dx::kernel, swap > ( unsigned int * dst,
size_t size32,
uint64_t space,
int64_t timeout )

WDK: synchronously submit an firewire async swapped data read request.

Create a memory object from kernel originated pointer:size

checks the kernel memory object,

constructs the appropriate irb and submits it to the lower device,

swaps the received data.

◆ fw::write32< dx::kernel, host >() [1/2]

template<>
os_result dxd::fw::write32< dx::kernel, host > ( const unsigned int * src,
size_t size32,
uint64_t space,
int64_t timeout )

Checks for valid fw unit object,

create a kernel memory object from kernel originated pointer:size

check kernel memory object

create and submit firewire write cmd

◆ fw::write32< dx::kernel, host >() [2/2]

template<>
os_result dxd::fw::write32< dx::kernel, host > ( const unsigned int * src,
size_t size32,
uint64_t space,
int64_t timeout )

WDK: synchronously submit an firewire async write request.

Create a memory object from kernel originated pointer:size

checks the kernel memory object,

constructs the appropriate irb and submits it to the lower device.

◆ fw::write32< dx::kernel, swap >() [1/2]

template<>
os_result dxd::fw::write32< dx::kernel, swap > ( const unsigned int * src,
size_t size32,
uint64_t space,
int64_t timeout )

Checks for valid fw unit object,

creates a secondary endian swap kernel buffer memory object below 4GB boundary from size,

creates kernel mapping to endian swap data into,

checks the mapping,

endian swaps into kernel buffer,

creates and submits firewire write cmd.

◆ fw::write32< dx::kernel, swap >() [2/2]

template<>
os_result dxd::fw::write32< dx::kernel, swap > ( const unsigned int * src,
size_t size32,
uint64_t space,
int64_t timeout )

WDK: synchronously submit an firewire async swapped data write request.

Creates an intermediate swap buffer memory object,

checks the buffer creation status,

swaps the data into the newly constructed buffer,

constructs the appropriate irb and submits it to the lower device.

◆ log()

void dxd::log ( const char * fmt...)

windows kernel logging

By default Windows only displays critical logging from the errorlog. To enable other the levels and tracing: double click kernel/wdk/dxd_log.reg https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/reading-and-filtering-debugging-messages

+ Here is the caller graph for this function:

◆ os_version()

unsigned int dxd::os_version ( )

◆ time()

int64_t dxd::time ( int64_t timestamp,
scale scale = usec )
inline

WDK: timestamp to Windows time converter.

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

◆ warnlog()

void dxd::warnlog ( const char * fmt...)

Variable Documentation

◆ wdm_driver

extern::DRIVER_OBJECT * dxd::wdm_driver = nullptr

Main driver entry.

DriverEntry is the first driver-supplied routine that is called after a driver is loaded. It is responsible for initializing the driver.

This is the main WDF managed driver entry; the first call to the driver will end up here. from here it is the responisibilty of the driver to register at least a callback for the case the I/O manager matches a device to this driver and adds the FDO to the driver stack.

The WDF framework is called with an initialized WDF_DRIVER_CONFIG containing the EvtDeviceAdd callback.

for further reference see: http://msdn.microsoft.com/en-us/library/aa491316.aspx


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