1 2 /* if_acpreg.h V1.3 05/30/86 */ 3 4 /*************************************************************************/ 5 /* */ 6 /* */ 7 /* ________________________________________________________ */ 8 /* / \ */ 9 /* | AAA CCCCCCCCCCCCCC CCCCCCCCCCCCCC | */ 10 /* | AAAAA CCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCC | */ 11 /* | AAAAAAA CCCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCCC | */ 12 /* | AAAA AAAA CCCC CCCC | */ 13 /* | AAAA AAAA CCCC CCCC | */ 14 /* | AAAA AAAA CCCC CCCC | */ 15 /* | AAAA AAAA CCCC CCCC | */ 16 /* | AAAA AAAAAAAAAAA CCCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCCC | */ 17 /* | AAAA AAAAAAAAAAA CCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCC | */ 18 /* | AAAA AAAAAAAAA CCCCCCCCCCCCCC CCCCCCCCCCCCCC | */ 19 /* \________________________________________________________/ */ 20 /* */ 21 /* Copyright (c) 1986 by Advanced Computer Communications */ 22 /* 720 Santa Barbara Street, Santa Barbara, California 93101 */ 23 /* (805) 963-9431 */ 24 /* */ 25 /* */ 26 /* File: if_acpreg.h */ 27 /* */ 28 /* Author: Arthur Berggreen */ 29 /* */ 30 /* Project: ACP6100 (UPB with HDLC firmware) */ 31 /* ACP5100 (QPB with HDLC firmware) */ 32 /* */ 33 /* Revision History: */ 34 /* */ 35 /* 21-NOV-1985 Clare Russ: add fileheader and comments */ 36 /* Add definitions for implementatin of new Command Interface */ 37 /* (CIF) and Access Path Allocation Protocol (APAP). */ 38 /* */ 39 /*************************************************************************/ 40 41 42 /* device registers */ 43 struct acpregs { 44 u_short csr; /* control and status register */ 45 /* I/O request mailbox */ 46 u_short req_chan; /* FDX channel number */ 47 u_char req_adx; /* address bits 17-16 */ 48 u_char req_flags; /* mailbox flags */ 49 u_short req_addr; /* address bits 15-00 */ 50 u_short req_cnt; /* byte count */ 51 u_char req_fcn; /* I/O function */ 52 u_char req_sbf; /* I/O subfunction */ 53 /* I/O completion mailbox */ 54 u_short cmp_chan; /* FDX channel number */ 55 u_char cmp_unused; /* address bits 17-16 */ 56 u_char cmp_flags; /* mailbox flags */ 57 u_short cmp_cnt; /* byte count */ 58 u_char cmp_stat; /* I/O status */ 59 u_char cmp_sbst; /* I/O substatus */ 60 /* Transfer request mailbox */ 61 u_short xfr_chan; /* FDX channel number */ 62 u_char xfr_adx; /* address bits 17-16 */ 63 u_char xfr_flags; /* mailbox flags */ 64 u_short xfr_addr; /* address bits 15-00 */ 65 u_short xfr_cnt; /* byte count */ 66 /* System status mailbox */ 67 u_char sys_vers; /* system version number */ 68 u_char sys_id; /* system identification */ 69 u_char sys_vect; /* interrupt vector base */ 70 u_char sys_stat; /* system status */ 71 }; 72 73 74 /* defines for CSR */ 75 76 #define CSR_BIT15 0x8000 77 #define CSR_BIT14 0x4000 78 #define CSR_MAINT 0x2000 79 #define CSR_HALT 0x1000 80 #define CSR_IBPEND 0x0800 81 #define CSR_IAPEND 0x0400 82 #define CSR_IBREQ 0x0200 83 #define CSR_IAREQ 0x0100 84 #define CSR_BIT7 0x0080 85 #define CSR_BIT6 0x0040 86 #define CSR_INTRB 0x0020 /* ACP CPU Interrupt A Request */ 87 #define CSR_INTRA 0x0010 /* ACP CPU Interrupt B Request */ 88 #define CSR_IENB 0x0008 /* enable UNIBUS interrupt b */ 89 #define CSR_IENA 0x0004 /* enable UNIBUS interrupt a */ 90 #define CSR_DMAEN 0x0002 91 #define CSR_RESET 0x0001 92 93 /* mailbox handshake flags */ 94 95 #define FLAGS_RDY 0x80 96 #define FLAGS_DON 0x40 97 #define FLAGS_DIR 0x20 98 99 /* I/O request function code definitions */ 100 101 #define ACPRED 0x01 /* read from ACP */ 102 #define ACPWRT 0x02 /* write to ACP */ 103 #define ACPSTR 0x10 /* stream flag */ 104 #define ACPEOS (0x20|ACPSTR) /* end of stream flag */ 105 #define ACPABT 0x04 /* abort flag */ 106 #define ACPXFR 0x40 /* tranfer req/grant flag */ 107 108 #define FCN_MASK 0x07 109