pdiagex_dds_t
The pdiagex_dds_t structure defines the device driver structure (dds) for PDIAGEX.
The pdiagex_dds_t structure must be initialized with attributes for the resource before
calling pdiag_open(). The pdiagex_dds_t
structure is defined in /usr/include/sys/pdiagex_dds.h and contains the following fields:
/*----------------------------------------------------------------------*/
/* PDIAGEX_DDS_T
/* This structure MUST be filled in by the Calling Application (TU)
/* This structure is passed to pdiagex in the pdiag_open() routine
/*----------------------------------------------------------------------*/
typedef struct {
uint32 slot_num; /* slot number of adapter
/* BUS DATA */
uint32 bus_id; /* Identifies the I/O bus that the DMA
/* channel is to be allocated on.
uint32 bus_type; /* BUS_MICRO_CHANNEL, BUS_60X or BUS_BID
uint32 bus_io_addr; /* Base address of Bus I/O area
uint32 bus_io_length; /* Length (width) of Bus I/O area
uint32 bus_mem_addr; /* Base address of Shared Bus Memory area
uint32 bus_mem_length; /* Length (width) of Shared Bus Memory area
/* DMA /
/* Next three are for BUS_MICRO_CHANNEL devices only */
uint32 dma_bus_mem; /* Base address of Bus Memory DMA area
uint32 dma_bus_length; /* Length (multiple of PAGESIZE) of BUS
/* Memory DMA area in bytes.
uint32 dma_lvl; /* Bus arbitration level
uint32 maxmaster; /* maximum number of concurrent
/* dma_master calls
uint32 dma_flags; /* DMA flags as defined in sys/dma.h.
/* These flags describe what actions to
/* take ( controller/worker, initialize the
/* channel, etc. Not used by 60X type devices)
/* dma_bus_flags is for BUS_BID devices only */
uint32 dma_bus_flags; /* Bus flags specific for DMA operation
uint32 dma_chan_id; /* For BUS_MICRO_CHANNEL
/* Dma channel ID is returned as a result
/* of the DMA initialization.
/* For BUS_BID
/* Dma channel ID is the assigned DMA
/* channel for the device.
/* For BUS_60X
/* Dma channel ID is not used
/* Interrupt Handler */
pdiag_addr_t data_ptr; /* Pointer for passing data to interrupt
uint32 d_count; /* Count of bytes of data for interrupt
uint32 bus_intr_lvl; /* Interrupt level
uint32 intr_priority; /* Interrupt priority
uint32 intr_flags; /* Interrupt flags as defined in intr.h
/* Attribute Expansion Area */
pdiag_addr_t attributes; /* Pointer to specific attributes
}pdiagex_dds_t;