1*45682Sbostic /*- 2*45682Sbostic * @(#)if_acpreg.h 7.2 (Berkeley) 12/02/90 3*45682Sbostic */ 445680Sbostic 545680Sbostic /*************************************************************************/ 645680Sbostic /* */ 745680Sbostic /* */ 845680Sbostic /* ________________________________________________________ */ 945680Sbostic /* / \ */ 1045680Sbostic /* | AAA CCCCCCCCCCCCCC CCCCCCCCCCCCCC | */ 1145680Sbostic /* | AAAAA CCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCC | */ 1245680Sbostic /* | AAAAAAA CCCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCCC | */ 1345680Sbostic /* | AAAA AAAA CCCC CCCC | */ 1445680Sbostic /* | AAAA AAAA CCCC CCCC | */ 1545680Sbostic /* | AAAA AAAA CCCC CCCC | */ 1645680Sbostic /* | AAAA AAAA CCCC CCCC | */ 1745680Sbostic /* | AAAA AAAAAAAAAAA CCCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCCC | */ 1845680Sbostic /* | AAAA AAAAAAAAAAA CCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCC | */ 1945680Sbostic /* | AAAA AAAAAAAAA CCCCCCCCCCCCCC CCCCCCCCCCCCCC | */ 2045680Sbostic /* \________________________________________________________/ */ 2145680Sbostic /* */ 2245680Sbostic /* Copyright (c) 1986 by Advanced Computer Communications */ 2345680Sbostic /* 720 Santa Barbara Street, Santa Barbara, California 93101 */ 2445680Sbostic /* (805) 963-9431 */ 2545680Sbostic /* */ 2645680Sbostic /* */ 2745680Sbostic /* File: if_acpreg.h */ 2845680Sbostic /* */ 2945680Sbostic /* Author: Arthur Berggreen */ 3045680Sbostic /* */ 3145680Sbostic /* Project: ACP6100 (UPB with HDLC firmware) */ 3245680Sbostic /* ACP5100 (QPB with HDLC firmware) */ 3345680Sbostic /* */ 3445680Sbostic /* Revision History: */ 3545680Sbostic /* */ 3645680Sbostic /* 21-NOV-1985 Clare Russ: add fileheader and comments */ 3745680Sbostic /* Add definitions for implementatin of new Command Interface */ 3845680Sbostic /* (CIF) and Access Path Allocation Protocol (APAP). */ 3945680Sbostic /* */ 4045680Sbostic /*************************************************************************/ 4145680Sbostic 4245680Sbostic 4345680Sbostic /* device registers */ 4445680Sbostic struct acpregs { 4545680Sbostic u_short csr; /* control and status register */ 4645680Sbostic /* I/O request mailbox */ 4745680Sbostic u_short req_chan; /* FDX channel number */ 4845680Sbostic u_char req_adx; /* address bits 17-16 */ 4945680Sbostic u_char req_flags; /* mailbox flags */ 5045680Sbostic u_short req_addr; /* address bits 15-00 */ 5145680Sbostic u_short req_cnt; /* byte count */ 5245680Sbostic u_char req_fcn; /* I/O function */ 5345680Sbostic u_char req_sbf; /* I/O subfunction */ 5445680Sbostic /* I/O completion mailbox */ 5545680Sbostic u_short cmp_chan; /* FDX channel number */ 5645680Sbostic u_char cmp_unused; /* address bits 17-16 */ 5745680Sbostic u_char cmp_flags; /* mailbox flags */ 5845680Sbostic u_short cmp_cnt; /* byte count */ 5945680Sbostic u_char cmp_stat; /* I/O status */ 6045680Sbostic u_char cmp_sbst; /* I/O substatus */ 6145680Sbostic /* Transfer request mailbox */ 6245680Sbostic u_short xfr_chan; /* FDX channel number */ 6345680Sbostic u_char xfr_adx; /* address bits 17-16 */ 6445680Sbostic u_char xfr_flags; /* mailbox flags */ 6545680Sbostic u_short xfr_addr; /* address bits 15-00 */ 6645680Sbostic u_short xfr_cnt; /* byte count */ 6745680Sbostic /* System status mailbox */ 6845680Sbostic u_char sys_vers; /* system version number */ 6945680Sbostic u_char sys_id; /* system identification */ 7045680Sbostic u_char sys_vect; /* interrupt vector base */ 7145680Sbostic u_char sys_stat; /* system status */ 7245680Sbostic }; 7345680Sbostic 7445680Sbostic 7545680Sbostic /* defines for CSR */ 7645680Sbostic 7745680Sbostic #define CSR_BIT15 0x8000 7845680Sbostic #define CSR_BIT14 0x4000 7945680Sbostic #define CSR_MAINT 0x2000 8045680Sbostic #define CSR_HALT 0x1000 8145680Sbostic #define CSR_IBPEND 0x0800 8245680Sbostic #define CSR_IAPEND 0x0400 8345680Sbostic #define CSR_IBREQ 0x0200 8445680Sbostic #define CSR_IAREQ 0x0100 8545680Sbostic #define CSR_BIT7 0x0080 8645680Sbostic #define CSR_BIT6 0x0040 8745680Sbostic #define CSR_INTRB 0x0020 /* ACP CPU Interrupt A Request */ 8845680Sbostic #define CSR_INTRA 0x0010 /* ACP CPU Interrupt B Request */ 8945680Sbostic #define CSR_IENB 0x0008 /* enable UNIBUS interrupt b */ 9045680Sbostic #define CSR_IENA 0x0004 /* enable UNIBUS interrupt a */ 9145680Sbostic #define CSR_DMAEN 0x0002 9245680Sbostic #define CSR_RESET 0x0001 9345680Sbostic 9445680Sbostic /* mailbox handshake flags */ 9545680Sbostic 9645680Sbostic #define FLAGS_RDY 0x80 9745680Sbostic #define FLAGS_DON 0x40 9845680Sbostic #define FLAGS_DIR 0x20 9945680Sbostic 10045680Sbostic /* I/O request function code definitions */ 10145680Sbostic 10245680Sbostic #define ACPRED 0x01 /* read from ACP */ 10345680Sbostic #define ACPWRT 0x02 /* write to ACP */ 10445680Sbostic #define ACPSTR 0x10 /* stream flag */ 10545680Sbostic #define ACPEOS (0x20|ACPSTR) /* end of stream flag */ 10645680Sbostic #define ACPABT 0x04 /* abort flag */ 10745680Sbostic #define ACPXFR 0x40 /* tranfer req/grant flag */ 10845680Sbostic 10945680Sbostic #define FCN_MASK 0x07 110