|
|
#include <sys/eisa.h> #include <sys/ddi.h>
eisa_funcinfo- SVR5 EISA bus slot information
EISA bus device configuration space is composed of two structures: slot specific information, given by the SVR5 eisa_slotinfo_t structure, and function-specific information, given by the SVR5 eisa_funcinfo_t structure. There may be multiple functions per slot.
#pragma pack(1)/* * Size of each function configuration block. */ #define EISA_MAX_SELECTIONS 26 #define EISA_MAX_TYPE 80 #define EISA_MAX_MEMORY 9 #define EISA_MAX_IRQ 7 #define EISA_MAX_DMA 4 #define EISA_MAX_PORT 20 #define EISA_MAX_INIT 60 #define EISA_MAX_DATA 203
/*
* Returned information from an INT 15h call "Read Slot" (AH=D8h, AL=0).
*/
typedef struct {
uchar_t boardid[4]; /* Compressed board ID */
ushort_t revision; /* Utility version */
uchar_t functions; /* Number of functions */
struct {
uchar_t type :1, /* Type string present */
memory :1, /* Memory configuration present */
irq :1, /* IRQ configuration present */
dma :1, /* DMA configuration present */
port :1, /* Port configuration present */
init :1, /* Port initialization present */
data :1, /* Free form data */
disable :1; /* Function is disabled */
} fib; /* Function information byte */
ushort_t checksum; /* CFG checksum */
struct {
ushort_t cpid :4, /* Duplicate ID number */
type :2, /* Slot type */
readid :1, /* Readable ID */
dups :1, /* Duplicates exist */
disable :1, /* Board disable is supported */
IOcheck :1, /* EISA I/O check supported */
:5, /* Reserved */
partial :1; /* Configuration incomplete */
} dupid; /* Duplicate ID information */
} eisa_slotinfo_t;
#define EISA_SLOTINFO_SIZE (sizeof(eisa_slotinfo_t))
#define EISA_EXP_SLOT 0x00 /* expansion slot */
#define EISA_EMB_SLOT 0x01 /* embedded slot */
#define EISA_VIR_SLOT 0x02 /* virtual slot */
/* Standard Function Configuration Data Block Structure (size = 320 bytes).
*
* Returned information from an INT 15h call "Read Function" (AH=D8h, AL=01h).
*/
typedef struct {
uchar_t boardid[4]; /* Compressed board ID */
/*
* Duplicate ID information byte format. (total bytes = 2, offset = 0x4)
*/
struct {
ushort_t cpid :4, /* Duplicate ID number */
type :2, /* Slot type */
readid :1, /* Readable ID */
dups :1, /* Duplicates exist */
disable :1, /* Board disable is supported */
IOcheck :1, /* EISA I/O check supported */
:5, /* Reserved */
partial :1; /* Configuration incomplete */
} dupid; /* 0x04: Duplicate ID information */
uchar_t ovl_minor; /* Minor revision of .OVL code */
uchar_t ovl_major; /* Major revision of .OVL code */
uchar_t selects[EISA_MAX_SELECTIONS]; /* Selections */
/*
* Function information byte. (total bytes = 1, offset = 0x22)
*/
struct {
uchar_t type :1, /* Type string present */
memory :1, /* Memory configuration present */
irq :1, /* IRQ configuration present */
dma :1, /* DMA configuration present */
port :1, /* Port configuration present */
init :1, /* Port initialization present */
data :1, /* Free form data */
disable :1; /* Function is disabled */
} fib; /* 0x22: Function information byte */
uchar_t type[EISA_MAX_TYPE]; /* Function type/subtype */
/*
* Function block configuration resource data definition.
*/
union {
/*
* Configuration resource data definition.
*/
struct {
/*
* Memory Configuration Info. (total bytes = 63, offset = 0x73)
*/
struct {
struct {
uchar_t write :1, /* Memory is read only */
cache :1, /* Memory is cached */
:1, /* Reserved */
type :2, /* Memory type */
share :1, /* Shared Memory */
:1, /* Reserved */
more :1; /* More entries follow */
} config;
struct {
uchar_t width :2, /* Data path size */
decode :2; /* Address decode */
} datapath;
uchar_t start[3]; /* Start addr DIV 100h */
ushort_t size; /* Mem size in 1K bytes */
} memory[EISA_MAX_MEMORY]; /* Memory conf. */
/*
* IRQ Configuration Info. (total bytes = 14, offset = 0x82)
*/
struct {
ushort_t line :4, /* IRQ line */
:1, /* Reserved */
trigger :1, /* Trigger (EGDE=0, LEVEL=1) */
share :1, /* Sharable */
more :1, /* More follow */
:8; /* Reserved */
} irq[EISA_MAX_IRQ]; /* IRQ conf. */
/*
* DMA Channel Description. (total bytes = 8, offset = 0xc0)
*/
struct {
ushort_t channel :3, /* DMA channel number */
:3, /* Reserved */
share :1, /* Shareable */
more :1, /* More entries follow */
:2, /* Reserved */
width :2, /* Transfer size */
timing :2, /* Transfer timing */
:2; /* Reserved */
} dma[EISA_MAX_DMA]; /* 0xc0: DMA conf. */
/*
* I/O port info. (total bytes = 60, offset = 0xc8)
*/
struct {
uchar_t count :5, /* No.of sequential ports - 1 */
:1, /* Reserved */
share :1, /* Shareable */
more :1; /* More entries follow */
ushort_t address; /* IO port address */
} port[EISA_MAX_PORT]; /* PORT conf. */
/*
* Initialization Data (total bytes = 60, offset = 0x104)
*/
union {
struct {
uchar_t type :2, /* Port type */
mask :1, /* Apply mask */
:4, /* Reserved */
more :1; /* More entries follow */
ushort_t port; /* Port address */
union {
struct {
uchar_t value; /* Byte to write */
} bv;
struct {
uchar_t value; /* Byte to write */
uchar_t mask; /* Mask to apply */
} bvm;
struct {
ushort_t value; /* Word to write */
} wv;
struct {
ushort_t value; /* Word to write */
ushort_t mask; /* Mask to apply */
} wvm;
struct {
ulong_t value; /* Dword to write */
} dv;
struct {
ulong_t value; /* Dword to write */
ulong_t mask; /* Mask to apply */
} dvm;
} vm;
} initform[5]; /* EISA_MAX_INIT / 11 */
uchar_t initdata[EISA_MAX_INIT];
} init; /* INIT info. */
} rd; /* Resource Data */
uchar_t freeform[EISA_MAX_DATA + 1];
/* Free format */
} fd; /* Function Data */
} eisa_funcinfo_t;
/*
* EISA Function Information aliases.
*/
#define eisa_memory fd.rd.memory
#define eisa_irq fd.rd.irq
#define eisa_dma fd.rd.dma
#define eisa_port fd.rd.port
#define eisa_init fd.rd.init
#define eisa_freeform fd.freeform
#define EISA_FUNCINFO_SIZE (sizeof(eisa_funcinfo_t))
#pragma pack()
``EISA device configuration'' in HDK Technical Reference
BCPR EISA Specification, Version 3.12