dxd - dynax driver framework 3.0.2
cross platform open source driver development framework
Loading...
Searching...
No Matches
dxd::firewire::controller< super_device_t > Class Template Reference

IEEE 1394 OHCI host controller: the link the OS matched by its PCI class, its GUID the device's puid. More...

#include <dxd_firewire_controller.h>

Inheritance diagram for dxd::firewire::controller< super_device_t >:
Collaboration diagram for dxd::firewire::controller< super_device_t >:

Public Member Functions

client* client_create() override
 a client for an open: the platform's device makes the platform's client
void identify(uint64_t id)
 the OS's identity of the hardware as the puid, until launch() states a persistent one
os_result ioctl(unsigned int ioctl, const void* in, size_t size_in, void* out, size_t size_out, size_t& size) override
template<typename transition_t>
os_result powered(bool on, transition_t&& transition)
 a power transition, as dxd::power binds the OS's: sleep() ahead of leaving the working state, the transition, wake() once in it - a change of a launched device alone
template<typename reference_t>
int release(reference_t& reference)
template<typename desc_t>
os_result requested(desc_t& desc) const
 the desc the host created this device with
void retain()
void try_conclude()
 conclude()s if launched
os_result try_launch()
 launch()es unless launched, a failure concluded

Public Attributes

bool launched{}
const char* model{}
 the model's name alike
bool on{true}
char puid [0x80] {}
 persistent UID, system unique: the platform takes it from the OS's identity of the device
atomic<int> references{}
os_result status{not_initialized}
const char* vendor{}
 the vendor's name the desc states, published with the puid for user mode to match by

Protected Member Functions

client* client_create() override
 a client for an open: the platform's device makes the platform's client
void conclude() override
 remove hook, the last word to the hardware
void filter(::IO_RESOURCE_REQUIREMENTS_LIST& list) override
 a memory requirement of length 0 the bus states is dropped: no window answers it
bool irq(unsigned int, int64_t) override
 the link's events taken, its interrupt masked until isr() has worked them; a masked link's events are none of a shared line's
os_result irq_enable(bool enable= true)
os_result irq_enable(bool enable= true)
 the vectors connected or disconnected, at passive level
void isr(unsigned int) override
os_result launch() override
 start hook, called before any client can reach the device
uint32_t read32(uint8_t bar, uint64_t offset) const
 a BAR the nub does not reach reads as a device gone from the bus, a write to it goes nowhere: conclude() takes any launch()
uint32_t read32(uint8_t bar, uint64_t offset) const
os_result sleep() override
 the interrupts off, then the link halted whatever their answer; the first failure is the result
os_result start(const ::CM_RESOURCE_LIST* raw, const ::CM_RESOURCE_LIST* translated, const ::GUID& guid)
 the start: launch() with the resources at hand, then the control clients' interface
void unplugged() override
 the interrupts go at the surprise removal, the BARs stay mapped until conclude(): the device reads all ones meanwhile
os_result wake() override
 power hooks: a launched device comes back to the working state, and leaves it - its start and its removal are launch() and conclude()
void write32(uint8_t bar, uint64_t offset, uint32_t value) const
void write32(uint8_t bar, uint64_t offset, uint32_t value) const

Static Protected Member Functions

static constexpr bool removed(uint32_t value)
 a register read of a device gone from the bus
static constexpr bool removed(uint32_t value)
 a register read of a device gone from the bus

Protected Attributes

::IOPCIDevice* pci{}
::IOService* provider{}
 the driver's shell it stands on
bool removed{}
 the device vanished: the stack below no longer answers
::IOService* service
 the shell hosting this device
struct dxd::platform::device:: { ... }  wdm

Detailed Description

template<typename super_device_t = pci::device>
class dxd::firewire::controller< super_device_t >

IEEE 1394 OHCI host controller: the link the OS matched by its PCI class, its GUID the device's puid.

reset() brings the link up from a soft reset - interrupts masked, physical requests closed - and enable() joins it to the bus: its self-ID buffer and configuration ROM mapped, a bus reset initiated; both run at launch and at every wake. conclude() and sleep() leave the link in reset, so no context's DMA outlives the memory it runs on. Every bus reset ends in self_id() on the device's queue, which takes the topology the self-ID packets state.

Member Function Documentation

◆ client_create() [1/2]

client* dxd::platform::device::client_create()
inlineoverridevirtualinherited

a client for an open: the platform's device makes the platform's client

Implements dxd::device.

Here is the caller graph for this function:

◆ client_create() [2/2]

client* dxd::platform::device::client_create()
inlineoverrideprotectedvirtualinherited

a client for an open: the platform's device makes the platform's client

Implements dxd::device.

◆ conclude()

template<typename super_device_t= pci::device>
void dxd::firewire::controller<super_device_t>::conclude()
inlineoverrideprotectedvirtual

remove hook, the last word to the hardware

Reimplemented from dxd::device.

Here is the call graph for this function:

◆ filter()

void dxd::pci::device::filter(::IO_RESOURCE_REQUIREMENTS_LIST& list)
inlineoverrideprotectedvirtualinherited

a memory requirement of length 0 the bus states is dropped: no window answers it

Reimplemented from dxd::platform::device.

◆ identify()

void dxd::device::identify(uint64_t id)
inlineinherited

the OS's identity of the hardware as the puid, until launch() states a persistent one

Here is the caller graph for this function:

◆ ioctl()

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

dx::ioctl::device::reenumerate: the shell of a device the OS matched on its hardware terminates, the OS matches the hardware anew - a dext a replacement activated takes it, kernelmanagerd leaving the replaced one to its devices

Reimplemented from dxd::device.

Reimplemented in dxd::usb::device< super_device_t >.

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

◆ irq()

template<typename super_device_t= pci::device>
bool dxd::firewire::controller<super_device_t>::irq(unsigned int, int64_t)
inlineoverrideprotectedvirtual

the link's events taken, its interrupt masked until isr() has worked them; a masked link's events are none of a shared line's

Reimplemented from dxd::pci::device.

◆ irq_enable() [1/2]

os_result dxd::pci::device::irq_enable(bool enable= true)
inlineprotectedinherited
Here is the caller graph for this function:

◆ irq_enable() [2/2]

os_result dxd::pci::device::irq_enable(bool enable= true)
inlineprotectedinherited

the vectors connected or disconnected, at passive level

◆ isr()

template<typename super_device_t= pci::device>
void dxd::firewire::controller<super_device_t>::isr(unsigned int)
inlineoverrideprotectedvirtual

Reimplemented from dxd::pci::device.

Here is the call graph for this function:

◆ launch()

template<typename super_device_t= pci::device>
os_result dxd::firewire::controller<super_device_t>::launch()
inlineoverrideprotectedvirtual

start hook, called before any client can reach the device

Reimplemented from dxd::device.

Here is the call graph for this function:

◆ powered()

template<typename transition_t>
os_result dxd::device::powered(bool on, transition_t&& transition)
inlineinherited

a power transition, as dxd::power binds the OS's: sleep() ahead of leaving the working state, the transition, wake() once in it - a change of a launched device alone

Here is the call graph for this function:

◆ read32() [1/2]

uint32_t dxd::pci::device::read32(uint8_t bar, uint64_t offset) const
inlineprotectedinherited

a BAR the nub does not reach reads as a device gone from the bus, a write to it goes nowhere: conclude() takes any launch()

◆ read32() [2/2]

uint32_t dxd::pci::device::read32(uint8_t bar, uint64_t offset) const
inlineprotectedinherited

◆ release()

template<typename reference_t>
int dxd::referenced::release(reference_t& reference)
inlineinherited
Here is the caller graph for this function:

◆ removed() [1/2]

constexpr bool dxd::pci::device::removed(uint32_t value)
inlinestaticconstexprprotectedinherited

a register read of a device gone from the bus

◆ removed() [2/2]

constexpr bool dxd::pci::device::removed(uint32_t value)
inlinestaticconstexprprotectedinherited

a register read of a device gone from the bus

◆ requested()

template<typename desc_t>
os_result dxd::platform::device::requested(desc_t& desc) const
inlineinherited

the desc the host created this device with

◆ retain()

void dxd::referenced::retain()
inlineinherited
Here is the caller graph for this function:

◆ sleep()

template<typename super_device_t= pci::device>
os_result dxd::firewire::controller<super_device_t>::sleep()
inlineoverrideprotectedvirtual

the interrupts off, then the link halted whatever their answer; the first failure is the result

Reimplemented from dxd::device.

◆ start()

os_result dxd::platform::device::start(const ::CM_RESOURCE_LIST* raw, const ::CM_RESOURCE_LIST* translated, const ::GUID& guid)
inlineprotectedinherited

the start: launch() with the resources at hand, then the control clients' interface

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

◆ try_conclude()

void dxd::device::try_conclude()
inlineinherited

conclude()s if launched

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

◆ try_launch()

os_result dxd::device::try_launch()
inlineinherited

launch()es unless launched, a failure concluded

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

◆ unplugged()

void dxd::pci::device::unplugged()
inlineoverrideprotectedvirtualinherited

the interrupts go at the surprise removal, the BARs stay mapped until conclude(): the device reads all ones meanwhile

Reimplemented from dxd::device.

Here is the call graph for this function:

◆ wake()

template<typename super_device_t= pci::device>
os_result dxd::firewire::controller<super_device_t>::wake()
inlineoverrideprotectedvirtual

power hooks: a launched device comes back to the working state, and leaves it - its start and its removal are launch() and conclude()

Reimplemented from dxd::device.

◆ write32() [1/2]

void dxd::pci::device::write32(uint8_t bar, uint64_t offset, uint32_t value) const
inlineprotectedinherited

◆ write32() [2/2]

void dxd::pci::device::write32(uint8_t bar, uint64_t offset, uint32_t value) const
inlineprotectedinherited

Member Data Documentation

◆ launched

bool dxd::device::launched{}
inherited

◆ model

const char* dxd::device::model{}
inherited

the model's name alike

◆ on

bool dxd::device::on{true}
inherited

in the working state

◆ pci

::IOPCIDevice* dxd::pci::device::pci{}
protectedinherited

◆ provider

::IOService* dxd::platform::device::provider{}
protectedinherited

the driver's shell it stands on

◆ puid

char dxd::device::puid[0x80]{}
inherited

persistent UID, system unique: the platform takes it from the OS's identity of the device

◆ references

atomic<int> dxd::referenced::references{}
inherited

◆ removed

bool dxd::platform::device::removed{}
protectedinherited

the device vanished: the stack below no longer answers

◆ service

::IOService* dxd::platform::device::service
protectedinherited

the shell hosting this device

◆ status

os_result dxd::device::status{not_initialized}
inherited

◆ vendor

const char* dxd::device::vendor{}
inherited

the vendor's name the desc states, published with the puid for user mode to match by

◆ wdm

struct { ... } dxd::platform::device::wdm

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