#ifdef notdef
struct bvpregs {
u_long p_pcr;
u_long p_psr;
u_long p_per;
u_long p_pdr;
};
struct ni_regs {
struct biiregs ni_bi;
struct bvpregs ni_tkp;
u_long ni_xxx[64];
u_long ni_rxcd;
struct bvpregs ni_nip;
u_long ni_pudr;
};
#endif
#define NI_PCR 0x204
#define NI_PSR 0x208
#define NI_PER 0x20c
#define NI_PDR 0x210
#define NI_PUDR 0x204
#define PCR_OWN 0x80
#define PCR_MFREEQ 0x000
#define PCR_DFREEQ 0x100
#define PCR_RFREEQ 0x200
#define PCR_IFREEQ 0x300
#define PCR_CMDQ0 PCR_MFREEQ
#define PCR_CMDQ1 PCR_DFREEQ
#define PCR_CMDQ2 PCR_RFREEQ
#define PCR_CMDQ3 PCR_IFREEQ
#define PCR_RESTART 11
#define PCR_FREEQNE 7
#define PCR_CMDQNE 6
#define PCR_SHUTDOWN 4
#define PCR_ENABLE 2
#define PCR_INIT 1
#define PSR_OWN 0x80000000
#define PSR_STATE 0x00070000
#define PSR_STOPPED 0x00060000
#define PSR_ENABLED 0x00040000
#define PSR_INITED 0x00020000
#define PSR_UNDEF 0x00010000
#define PSR_RSQ 0x00000080
#define PSR_ERR 0x00000040
struct ni_msg {
u_int32_t nm_forw;
u_int32_t nm_back;
u_int32_t nm_pad1;
u_int8_t nm_pad2;
u_int8_t nm_status;
u_int8_t nm_opcode;
u_int8_t nm_pad3;
u_int16_t nm_len;
u_int8_t nm_opcode2;
u_int8_t nm_status2;
u_int32_t nm_pad4;
u_int8_t nm_text[128];
};
struct ni_dg {
u_int32_t nd_forw;
u_int32_t nd_back;
u_int32_t nd_pad1;
u_int8_t nd_pad2;
u_int8_t nd_status;
u_int8_t nd_opcode;
u_int8_t nd_pad3;
u_int16_t nd_len;
u_int16_t nd_status2;
u_int32_t nd_cmdref;
u_int32_t nd_ptdbidx;
struct {
u_int16_t _offset;
u_int16_t _len;
u_int16_t _index;
u_int16_t _key;
} bufs[NTXFRAGS];
};
#define NIDG_CHAIN 0x8000
struct ni_param {
u_int8_t np_dpa[8];
u_int8_t np_apa[8];
u_int8_t np_lsa[8];
u_int8_t np_bvc[8];
u_int16_t np_curaddr;
u_int16_t np_maxaddr;
u_int16_t np_curptt;
u_int16_t np_maxptt;
u_int16_t np_curfq;
u_int16_t np_maxfq;
u_int32_t np_sid;
u_int32_t np_mop;
u_int32_t np_flags;
u_int32_t np_rcto;
u_int32_t np_xmto;
};
#define NP_ECT 0x01
#define NP_PAD 0x02
#define NP_BOO 0x04
#define NP_CAR 0x08
#define NP_ILP 0x10
#define NP_ELP 0x20
#define NP_DCRC 0x40
#define NP_THRU 0x80
struct ni_ptdb {
u_int16_t np_type;
u_int8_t np_fque;
u_int8_t np_flags;
u_int32_t np_index;
u_int16_t np_adrlen;
u_int16_t np_802;
u_int8_t np_mcast[16][8];
};
#define PTDB_PROMISC 0x08
#define PTDB_802 0x10
#define PTDB_BDC 0x20
#define PTDB_UNKN 0x40
#define PTDB_AMC 0x80
struct ni_bbd {
u_int16_t nb_status;
u_int16_t nb_key;
u_int32_t nb_len;
u_int32_t nb_pte;
u_int32_t nb_pad;
};
#define NIBD_OFFSET 0x1ff
#define NIBD_VALID 0x8000
struct ni_fqb {
u_int32_t nf_mlen;
u_int32_t nf_mpad;
u_int32_t nf_mforw;
u_int32_t nf_mback;
u_int32_t nf_dlen;
u_int32_t nf_dpad;
u_int32_t nf_dforw;
u_int32_t nf_dback;
u_int32_t nf_rlen;
u_int32_t nf_rpad;
u_int32_t nf_rforw;
u_int32_t nf_rback;
u_int32_t nf_ilen;
u_int32_t nf_ipad;
u_int32_t nf_iforw;
u_int32_t nf_iback;
};
struct ni_pqb {
u_int16_t np_veclvl;
u_int16_t np_node;
u_int32_t np_freeq;
u_int32_t np_vfqb;
u_int32_t np_pad1[39];
u_int32_t np_bvplvl;
u_int32_t np_vpqb;
u_int32_t np_vbdt;
u_int32_t np_nbdr;
u_int32_t np_spt;
u_int32_t np_sptlen;
u_int32_t np_gpt;
u_int32_t np_gptlen;
u_int32_t np_mask;
u_int32_t np_pad2[67];
};
struct ni_gvppqb {
u_int32_t nc_forw0;
u_int32_t nc_back0;
u_int32_t nc_forw1;
u_int32_t nc_back1;
u_int32_t nc_forw2;
u_int32_t nc_back2;
u_int32_t nc_forw3;
u_int32_t nc_back3;
u_int32_t nc_forwr;
u_int32_t nc_backr;
struct ni_pqb nc_pqb;
};
#define BVP_DGRAM 1
#define BVP_MSG 2
#define BVP_DGRAMI 3
#define BVP_DGRAMRX 33
#define BVP_MSGRX 34
#define BVP_DGRAMIRX 35
#define NI_WSYSID 1
#define NI_RSYSID 2
#define NI_WPARAM 3
#define NI_RPARAM 4
#define NI_RCCNTR 5
#define NI_RDCNTR 6
#define NI_STPTDB 7
#define NI_CLPTDB 8
#define PUDR_TAPE 0x40000000
#define PUDR_PATCH 0x20000000
#define PUDR_VRAM 0x10000000
#define PUDR_VROM1 0x08000000
#define PUDR_VROM2 0x04000000
#define PUDR_VROM3 0x02000000
#define PUDR_VROM4 0x01000000
#define PUDR_UVAX 0x00800000
#define PUDR_BI 0x00400000
#define PUDR_TMR 0x00200000
#define PUDR_IRQ 0x00100000
#define PUDR_NI 0x00080000
#define PUDR_TK50 0x00040000
#define PUDR_PRES 0x00001000
#define PUDR_UVINT 0x00000800
#define PUDR_BUSHD 0x00000400
#define PUDR_II32 0x00000200
#define PUDR_MPSC 0x00000100
#define PUDR_GAP 0x00000080
#define PUDR_MISC 0x00000040
#define PUDR_UNEXP 0x00000020
#define PUDR_80186 0x00000010
#define PUDR_PATCH2 0x00000008
#define PUDR_8RAM 0x00000004
#define PUDR_8ROM2 0x00000002
#define PUDR_8ROM1 0x00000001