/* * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. * * Derived from IRIX <sys/SN/SN0/hubio.h>, Revision 1.80. * * Copyright (C) 1992 - 1997, 1999 Silicon Graphics, Inc. * Copyright (C) 1999 by Ralf Baechle
*/ #ifndef _ASM_SGI_SN_SN0_HUBIO_H #define _ASM_SGI_SN_SN0_HUBIO_H
/* * Hub I/O interface registers * * All registers in this file are subject to change until Hub chip tapeout. * In general, the longer software name should be used when available.
*/
/* * The following definitions use the names defined in the IO interface * document for ease of reference. When possible, software should * generally use the longer but clearer names defined above.
*/
/* IO Translation Table Entries */ #define IIO_NUM_ITTES 7/* ITTEs numbered 0..6 */ /* Hw manuals number them 1..7! */
/* * As a permanent workaround for a bug in the PI side of the hub, we've * redefined big window 7 as small window 0.
*/ #define HUB_NUM_BIG_WINDOW IIO_NUM_ITTES - 1
/* * Use the top big window as a surrogate for the first small window
*/ #define SWIN0_BIGWIN HUB_NUM_BIG_WINDOW
#define ILCSR_WARM_RESET 0x100 /* * The IO LLP control status register and widget control register
*/ #ifndef __ASSEMBLY__
/* * IIO CRB control register Fields: IIO_ICCR
*/ #define IIO_ICCR_PENDING (0x10000) #define IIO_ICCR_CMD_MASK (0xFF) #define IIO_ICCR_CMD_SHFT (7) #define IIO_ICCR_CMD_NOP (0x0) /* No Op */ #define IIO_ICCR_CMD_WAKE (0x100) /* Reactivate CRB entry and process */ #define IIO_ICCR_CMD_TIMEOUT (0x200) /* Make CRB timeout & mark invalid */ #define IIO_ICCR_CMD_EJECT (0x400) /* Contents of entry written to memory * via a WB
*/ #define IIO_ICCR_CMD_FLUSH (0x800)
/* * CRB manipulation macros * The CRB macros are slightly complicated, since there are up to * four registers associated with each CRB entry.
*/ #define IIO_NUM_CRBS 15/* Number of CRBs */ #define IIO_NUM_NORMAL_CRBS 12/* Number of regular CRB entries */ #define IIO_NUM_PC_CRBS 4/* Number of partial cache CRBs */ #define IIO_ICRB_OFFSET 8 #define IIO_ICRB_0 0x400400 /* XXX - This is now tuneable: #define IIO_FIRST_PC_ENTRY 12
*/
/* * * CRB Register description. * * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * * Many of the fields in CRB are status bits used by hardware * for implementation of the protocol. It's very dangerous to * mess around with the CRB registers. * * It's OK to read the CRB registers and try to make sense out of the * fields in CRB. * * Updating CRB requires all activities in Hub IIO to be quiesced. * otherwise, a write to CRB could corrupt other CRB entries. * CRBs are here only as a back door peek to hub IIO's status. * Quiescing implies no dmas no PIOs * either directly from the cpu or from sn0net. * this is not something that can be done easily. So, AVOID updating * CRBs.
*/
/* * Fields in CRB Register A
*/ #ifndef __ASSEMBLY__ typedefunion icrba_u {
u64 reg_value; struct {
u64 resvd: 6,
stall_bte0: 1, /* Stall BTE 0 */
stall_bte1: 1, /* Stall BTE 1 */
error: 1, /* CRB has an error */
ecode: 3, /* Error Code */
lnetuce: 1, /* SN0net Uncorrectable error */
mark: 1, /* CRB Has been marked */
xerr: 1, /* Error bit set in xtalk header */
sidn: 4, /* SIDN field from xtalk */
tnum: 5, /* TNUM field in xtalk */
addr: 38, /* Address of request */
valid: 1, /* Valid status */
iow: 1; /* IO Write operation */
} icrba_fields_s;
} icrba_t;
/* This is an alternate typedef for the HUB1 CRB A in order to allow runtime selection of the format based on the REV_ID field of the
NI_STATUS_REV_ID register. */ typedefunion h1_icrba_u {
u64 reg_value;
struct {
u64 resvd: 6,
unused: 1, /* Unused but RW!! */
error: 1, /* CRB has an error */
ecode: 4, /* Error Code */
lnetuce: 1, /* SN0net Uncorrectable error */
mark: 1, /* CRB Has been marked */
xerr: 1, /* Error bit set in xtalk header */
sidn: 4, /* SIDN field from xtalk */
tnum: 5, /* TNUM field in xtalk */
addr: 38, /* Address of request */
valid: 1, /* Valid status */
iow: 1; /* IO Write operation */
} h1_icrba_fields_s;
} h1_icrba_t;
/* XXX - Is this still right? Check the spec. */ #define ICRBN_A_CERR_SHFT 54 #define ICRBN_A_ERR_MASK 0x3ff
#endif/* !__ASSEMBLY__ */
#define IIO_ICRB_ADDR_SHFT 2/* Shift to get proper address */
/* * values for "ecode" field
*/ #define IIO_ICRB_ECODE_DERR 0/* Directory error due to IIO access */ #define IIO_ICRB_ECODE_PERR 1/* Poison error on IO access */ #define IIO_ICRB_ECODE_WERR 2/* Write error by IIO access * e.g. WINV to a Read only line.
*/ #define IIO_ICRB_ECODE_AERR 3/* Access error caused by IIO access */ #define IIO_ICRB_ECODE_PWERR 4/* Error on partial write */ #define IIO_ICRB_ECODE_PRERR 5/* Error on partial read */ #define IIO_ICRB_ECODE_TOUT 6/* CRB timeout before deallocating */ #define IIO_ICRB_ECODE_XTERR 7/* Incoming xtalk pkt had error bit */
/* * Fields in CRB Register B
*/ #ifndef __ASSEMBLY__ typedefunion icrbb_u {
u64 reg_value; struct {
u64 rsvd1: 5,
btenum: 1, /* BTE to which entry belongs to */
cohtrans: 1, /* Coherent transaction */
xtsize: 2, /* Xtalk operation size * 0: Double Word * 1: 32 Bytes. * 2: 128 Bytes, * 3: Reserved.
*/
srcnode: 9, /* Source Node ID */
srcinit: 2, /* Source Initiator: * See below for field values.
*/
useold: 1, /* Use OLD command for processing */
imsgtype: 2, /* Incoming message type * see below for field values
*/
imsg: 8, /* Incoming message */
initator: 3, /* Initiator of original request * See below for field values.
*/
reqtype: 5, /* Identifies type of request * See below for field values.
*/
rsvd2: 7,
ackcnt: 11, /* Invalidate ack count */
resp: 1, /* data response given to processor */
ack: 1, /* indicates data ack received */
hold: 1, /* entry is gathering inval acks */
wb_pend:1, /* waiting for writeback to complete */
intvn: 1, /* Intervention */
stall_ib: 1, /* Stall Ibuf (from crosstalk) */
stall_intr: 1; /* Stall internal interrupts */
} icrbb_field_s;
} icrbb_t;
/* This is an alternate typedef for the HUB1 CRB B in order to allow runtime selection of the format based on the REV_ID field of the
NI_STATUS_REV_ID register. */ typedefunion h1_icrbb_u {
u64 reg_value; struct {
u64 rsvd1: 5,
btenum: 1, /* BTE to which entry belongs to */
cohtrans: 1, /* Coherent transaction */
xtsize: 2, /* Xtalk operation size * 0: Double Word * 1: 32 Bytes. * 2: 128 Bytes, * 3: Reserved.
*/
srcnode: 9, /* Source Node ID */
srcinit: 2, /* Source Initiator: * See below for field values.
*/
useold: 1, /* Use OLD command for processing */
imsgtype: 2, /* Incoming message type * see below for field values
*/
imsg: 8, /* Incoming message */
initator: 3, /* Initiator of original request * See below for field values.
*/
rsvd2: 1,
pcache: 1, /* entry belongs to partial cache */
reqtype: 5, /* Identifies type of request * See below for field values.
*/
stl_ib: 1, /* stall Ibus coming from xtalk */
stl_intr: 1, /* Stall internal interrupts */
stl_bte0: 1, /* Stall BTE 0 */
stl_bte1: 1, /* Stall BTE 1 */
intrvn: 1, /* Req was target of intervention */
ackcnt: 11, /* Invalidate ack count */
resp: 1, /* data response given to processor */
ack: 1, /* indicates data ack received */
hold: 1, /* entry is gathering inval acks */
wb_pend:1, /* waiting for writeback to complete */
sleep: 1, /* xtalk req sleeping till IO-sync */
pnd_reply: 1, /* replies not issed due to IOQ full */
pnd_req: 1; /* reqs not issued due to IOQ full */
} h1_icrbb_field_s;
} h1_icrbb_t;
/* * values for field xtsize
*/ #define IIO_ICRB_XTSIZE_DW 0/* Xtalk operation size is 8 bytes */ #define IIO_ICRB_XTSIZE_32 1/* Xtalk operation size is 32 bytes */ #define IIO_ICRB_XTSIZE_128 2/* Xtalk operation size is 128 bytes */
/* * values for field srcinit
*/ #define IIO_ICRB_PROC0 0/* Source of request is Proc 0 */ #define IIO_ICRB_PROC1 1/* Source of request is Proc 1 */ #define IIO_ICRB_GB_REQ 2/* Source is Guaranteed BW request */ #define IIO_ICRB_IO_REQ 3/* Source is Normal IO request */
/* * Values for field imsgtype
*/ #define IIO_ICRB_IMSGT_XTALK 0/* Incoming Message from Xtalk */ #define IIO_ICRB_IMSGT_BTE 1/* Incoming message from BTE */ #define IIO_ICRB_IMSGT_SN0NET 2/* Incoming message from SN0 net */ #define IIO_ICRB_IMSGT_CRB 3/* Incoming message from CRB ??? */
/* * values for field initiator.
*/ #define IIO_ICRB_INIT_XTALK 0/* Message originated in xtalk */ #define IIO_ICRB_INIT_BTE0 0x1 /* Message originated in BTE 0 */ #define IIO_ICRB_INIT_SN0NET 0x2 /* Message originated in SN0net */ #define IIO_ICRB_INIT_CRB 0x3 /* Message originated in CRB ? */ #define IIO_ICRB_INIT_BTE1 0x5 /* MEssage originated in BTE 1 */
/* * Values for field reqtype.
*/ /* XXX - Need to fix this for Hub 2 */ #define IIO_ICRB_REQ_DWRD 0/* Request type double word */ #define IIO_ICRB_REQ_QCLRD 1/* Request is Qrtr Caceh line Rd */ #define IIO_ICRB_REQ_BLKRD 2/* Request is block read */ #define IIO_ICRB_REQ_RSHU 6/* Request is BTE block read */ #define IIO_ICRB_REQ_REXU 7/* request is BTE Excl Read */ #define IIO_ICRB_REQ_RDEX 8/* Request is Read Exclusive */ #define IIO_ICRB_REQ_WINC 9/* Request is Write Invalidate */ #define IIO_ICRB_REQ_BWINV 10/* Request is BTE Winv */ #define IIO_ICRB_REQ_PIORD 11/* Request is PIO read */ #define IIO_ICRB_REQ_PIOWR 12/* Request is PIO Write */ #define IIO_ICRB_REQ_PRDM 13/* Request is Fetch&Op */ #define IIO_ICRB_REQ_PWRM 14/* Request is Store &Op */ #define IIO_ICRB_REQ_PTPWR 15/* Request is Peer to peer */ #define IIO_ICRB_REQ_WB 16/* Request is Write back */ #define IIO_ICRB_REQ_DEX 17/* Retained DEX Cache line */
/* * Fields in CRB Register C
*/
#ifndef __ASSEMBLY__
typedefunion icrbc_s {
u64 reg_value; struct {
u64 rsvd: 6,
sleep: 1,
pricnt: 4, /* Priority count sent with Read req */
pripsc: 4, /* Priority Pre scalar */
bteop: 1, /* BTE Operation */
push_be: 34, /* Push address Byte enable * Holds push addr, if CRB is for BTE * If CRB belongs to Partial cache, * this contains byte enables bits * ([47:46] = 0)
*/
suppl: 11, /* Supplemental field */
barrop: 1, /* Barrier Op bit set in xtalk req */
doresp: 1, /* Xtalk req needs a response */
gbr: 1; /* GBR bit set in xtalk packet */
} icrbc_field_s;
} icrbc_t;
#ifndef __ASSEMBLY__ typedefunion icrbd_s {
u64 reg_value; struct {
u64 rsvd: 38,
toutvld: 1, /* Timeout in progress for this CRB */
ctxtvld: 1, /* Context field below is valid */
rsvd2: 1,
context: 15, /* Bit vector: * Has a bit set for each CRB entry * which needs to be deallocated * before this CRB entry is processed. * Set only for barrier operations.
*/
timeout: 8; /* Timeout Upper 8 bits */
} icrbd_field_s;
} icrbd_t;
#ifndef __ASSEMBLY__ /* * Note: Fields bnakctr, anakctr, xtalkctrmode, ovflow fields are * "Status" fields, and should only be used in case of clean up after errors.
*/
/* * values for mode field in iprb_t. * For details of the meanings of NAK and Accept, refer the PIO flow * document
*/ #define IPRB_MODE_NORMAL (0) #define IPRB_MODE_COLLECT_A (1) /* PRB in collect A mode */ #define IPRB_MODE_SERVICE_A (2) /* NAK B and Accept A */ #define IPRB_MODE_SERVICE_B (3) /* NAK A and Accept B */
/* * Get a hub's widget id from widget control register
*/ #define IIO_WCR_WID_GET(nasid) (REMOTE_HUB_L(nasid, III_WCR) & 0xf) #define IIO_WST_ERROR_MASK (UINT64_CAST 1 << 32) /* Widget status error */
/* * Number of credits Hub widget has while sending req/response to * xbow. * Value of 3 is required by Xbow 1.1 * We may be able to increase this to 4 with Xbow 1.2.
*/ #define HUBII_XBOW_CREDIT 3 #define HUBII_XBOW_REV2_CREDIT 4
#endif/* _ASM_SGI_SN_SN0_HUBIO_H */
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.12 Sekunden
(vorverarbeitet am 2026-06-05)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.