⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 i82586reg.h

📁 RTEMS (Real-Time Executive for Multiprocessor Systems) is a free open source real-time operating sys
💻 H
📖 第 1 页 / 共 2 页
字号:
#define IE_FD_OK	0x2000	/* frame is ok */#define IE_FD_CRC	0x0800	/* CRC error */#define IE_FD_ALGN	0x0400	/* Alignment error */#define IE_FD_RNR	0x0200	/* receiver out of resources here */#define IE_FD_OVR	0x0100	/* DMA overrun */#define IE_FD_SHORT	0x0080	/* Short frame */#define IE_FD_NOEOF	0x0040	/* no EOF (?) */#define IE_FD_ERRMASK		/* all error bits */ \	(IE_FD_CRC|IE_FD_ALGN|IE_FD_RNR|IE_FD_OVR|IE_FD_SHORT|IE_FD_NOEOF)#define IE_FD_STATUSBITS	\	"\20\20COMPLT\17BUSY\16OK\14CRC\13ALGN\12RNR\11OVR\10SHORT\7NOEOF"/* * linked list of buffers... *-struct __ie_recv_buf_desc {	u_int16_t	ie_rbd_status;	// status for this buffer	u_int16_t	ie_rbd_next;	// 16-pointer to next RBD	caddr_t		ie_rbd_buffer;	// 24-pointer to buffer for this RBD	u_int16_t	ie_rbd_length;	// length of the buffer	u_int16_t	mbz;		// must be zero}; */#define IE_RBD_SZ			12#define IE_RBD_ADDR(base,i)		((base) + (i) * IE_RBD_SZ)#define IE_RBD_STATUS(b,i)		(IE_RBD_ADDR(b,i) + 0)#define IE_RBD_NEXT(b,i)		(IE_RBD_ADDR(b,i) + 2)#define IE_RBD_BUFADDR(b,i)		(IE_RBD_ADDR(b,i) + 4)#define IE_RBD_BUFLEN(b,i)		(IE_RBD_ADDR(b,i) + 8)/* RBD status fields */#define IE_RBD_LAST	0x8000		/* last buffer */#define IE_RBD_USED	0x4000		/* this buffer has data */#define IE_RBD_CNTMASK	0x3fff		/* byte count of buffer data *//* RDB `End Of List' flag; encoded in `buffer length' field */#define IE_RBD_EOL	0x8000		/* last buffer *//* * All commands share this in common. *-struct __ie_cmd_common {	u_int16_t ie_cmd_status;	// status of this command 	u_int16_t ie_cmd_cmd;		// command word	u_int16_t ie_cmd_link;		// link to next command}; */#define IE_CMD_COMMON_SZ		6#define IE_CMD_COMMON_STATUS(base)	((base) + 0)#define IE_CMD_COMMON_CMD(base)		((base) + 2)#define IE_CMD_COMMON_LINK(base)	((base) + 4)#define IE_STAT_COMPL	0x8000	/* command is completed */#define IE_STAT_BUSY	0x4000	/* command is running now */#define IE_STAT_OK	0x2000	/* command completed successfully */#define IE_STAT_ABORT	0x1000  /* command was aborted */#define IE_CMD_NOP	0x0000	/* NOP */#define IE_CMD_IASETUP	0x0001	/* initial address setup */#define IE_CMD_CONFIG	0x0002	/* configure command */#define IE_CMD_MCAST	0x0003	/* multicast setup command */#define IE_CMD_XMIT	0x0004	/* transmit command */#define IE_CMD_TDR	0x0005	/* time-domain reflectometer command */#define IE_CMD_DUMP	0x0006	/* dump command */#define IE_CMD_DIAGNOSE	0x0007	/* diagnostics command */#define IE_CMD_LAST	0x8000	/* this is the last command in the list */#define IE_CMD_SUSPEND	0x4000	/* suspend CU after this command */#define IE_CMD_INTR	0x2000	/* post an interrupt after completion *//* * No-op commands; just like COMMON but "indexable" */#define IE_CMD_NOP_SZ			IE_CMD_COMMON_SZ#define IE_CMD_NOP_ADDR(base,i)		((base) + (i) * IE_CMD_NOP_SZ)#define IE_CMD_NOP_STATUS(b,i)		(IE_CMD_NOP_ADDR(b,i) + 0)#define IE_CMD_NOP_CMD(b,i)		(IE_CMD_NOP_ADDR(b,i) + 2)#define IE_CMD_NOP_LINK(b,i)		(IE_CMD_NOP_ADDR(b,i) + 4)/* * This is the command to transmit a frame. *-struct __ie_xmit_cmd {	struct __ie_cmd_common	com;		// common part#define __ie_xmit_status	com.ie_cmd_status	u_int16_t	ie_xmit_desc;		// pointer to buffer descriptor	struct __ie_en_addr ie_xmit_addr;	// destination address	u_int16_t	ie_xmit_length;		// 802.3 length/Ether type field}; */#define IE_CMD_XMIT_SZ			(IE_CMD_COMMON_SZ + 10)#define IE_CMD_XMIT_ADDR(base,i)	((base) + (i) * IE_CMD_XMIT_SZ)#define IE_CMD_XMIT_STATUS(b,i)		\	(IE_CMD_XMIT_ADDR(b,i) + 0)	/* == CMD_COMMON_STATUS */#define IE_CMD_XMIT_CMD(b,i)		\	(IE_CMD_XMIT_ADDR(b,i) + 2)	/* == CMD_COMMON_CMD */#define IE_CMD_XMIT_LINK(b,i)		\	(IE_CMD_XMIT_ADDR(b,i) + 4)	/* == CMD_COMMON_LINK */#define IE_CMD_XMIT_DESC(b,i)		\	(IE_CMD_XMIT_ADDR(b,i) + IE_CMD_COMMON_SZ + 0)#define IE_CMD_XMIT_EADDR(b,i)		\	(IE_CMD_XMIT_ADDR(b,i) + IE_CMD_COMMON_SZ + 2)#define IE_CMD_XMIT_LEN(b,i)		\	(IE_CMD_XMIT_ADDR(b,i) + IE_CMD_COMMON_SZ + 8)#define IE_XS_MAXCOLL  	0x000f	/* number of collisions during transmit */#define IE_XS_EXCMAX	0x0020	/* exceeded maximum number of collisions */#define IE_XS_SQE	0x0040	/* SQE positive */#define IE_XS_DEFERRED	0x0080	/* transmission deferred */#define IE_XS_UNDERRUN	0x0100	/* DMA underrun */#define IE_XS_LOSTCTS	0x0200	/* Lost CTS */#define IE_XS_NOCARRIER	0x0400	/* No Carrier */#define	IE_XS_LATECOLL	0x0800	/* Late collision *//* * This is a buffer descriptor for a frame to be transmitted. *-struct __ie_xmit_buf {	u_int16_t ie_xmit_flags;	// see below	u_int16_t ie_xmit_next;		// 16-pointer to next desc	caddr_t ie_xmit_buf;		// 24-pointer to the actual buffer}; */#define IE_XBD_SZ			8#define IE_XBD_ADDR(base,i)		((base) + (i) * IE_XBD_SZ)#define IE_XBD_FLAGS(b,i)		(IE_XBD_ADDR(b,i) + 0)#define IE_XBD_NEXT(b,i)		(IE_XBD_ADDR(b,i) + 2)#define IE_XBD_BUF(b,i)			(IE_XBD_ADDR(b,i) + 4)#define IE_TBD_EOL	0x8000		/* this TBD is the last one */#define IE_TBD_CNTMASK	0x3fff		/* The rest of the `flags' word					   is actually the length. *//* * Multicast setup command. *-struct __ie_mcast_cmd {	struct __ie_cmd_common	com;	// common part#define ie_mcast_status		com.ie_cmd_status	// size (in bytes) of multicast addresses	u_short		ie_mcast_bytes;	struct __ie_en_addr ie_mcast_addrs[IE_MAXMCAST + 1];// space for them}; */#define IE_CMD_MCAST_SZ			(IE_CMD_COMMON_SZ + 2 /* + XXX */)#define IE_CMD_MCAST_BYTES(base)	((base) + IE_CMD_COMMON_SZ + 0)#define IE_CMD_MCAST_MADDR(base)	((base) + IE_CMD_COMMON_SZ + 2)/* * Time Domain Reflectometer command. *-struct __ie_tdr_cmd {	struct __ie_cmd_common com;	// common part#define ie_tdr_status com.ie_cmd_status	u_short ie_tdr_time;		// error bits and time}; */#define IE_CMD_TDR_SZ		(IE_CMD_COMMON_SZ + 2)#define IE_CMD_TDR_TIME(base)	((base) + IE_CMD_COMMON_SZ + 0)#define IE_TDR_SUCCESS	0x8000	/* TDR succeeded without error */#define IE_TDR_XCVR	0x4000	/* detected a transceiver problem */#define IE_TDR_OPEN	0x2000	/* detected an incorrect termination ("open") */#define IE_TDR_SHORT	0x1000	/* TDR detected a short circuit */#define IE_TDR_TIME	0x07ff	/* mask for reflection time *//* * Initial Address Setup command *-struct __ie_iasetup_cmd {	struct __ie_cmd_common com;#define ie_iasetup_status com.ie_cmd_status	struct __ie_en_addr ie_address;}; */#define IE_CMD_IAS_SZ		(IE_CMD_COMMON_SZ + 6)#define IE_CMD_IAS_EADDR(base)	((base) + IE_CMD_COMMON_SZ + 0)/* * Configuration command *-struct __ie_config_cmd {	struct __ie_cmd_common com;	// common part#define ie_config_status com.ie_cmd_status	u_int8_t ie_config_count;	// byte count (0x0c)	u_int8_t ie_fifo;		// fifo (8)	u_int8_t ie_save_bad;		// save bad frames (0x40)	u_int8_t ie_addr_len;		// address length (0x2e) (AL-LOC == 1)	u_int8_t ie_priority;		// priority and backoff (0x0)	u_int8_t ie_ifs;		// inter-frame spacing (0x60)	u_int8_t ie_slot_low;		// slot time, LSB (0x0)	u_int8_t ie_slot_high;		// slot time, MSN, and retries (0xf2)	u_int8_t ie_promisc;		// 1 if promiscuous, else 0	u_int8_t ie_crs_cdt;		// CSMA/CD parameters (0x0)	u_int8_t ie_min_len;		// min frame length (0x40)	u_int8_t ie_junk;		// stuff for 82596 (0xff)}; */#define IE_CMD_CFG_SZ			(IE_CMD_COMMON_SZ + 12)#define IE_CMD_CFG_CNT(base)		((base) + IE_CMD_COMMON_SZ + 0)#define IE_CMD_CFG_FIFO(base)		((base) + IE_CMD_COMMON_SZ + 1)#define IE_CMD_CFG_SAVEBAD(base)	((base) + IE_CMD_COMMON_SZ + 2)#define IE_CMD_CFG_ADDRLEN(base)	((base) + IE_CMD_COMMON_SZ + 3)#define IE_CMD_CFG_PRIORITY(base)	((base) + IE_CMD_COMMON_SZ + 4)#define IE_CMD_CFG_IFS(base)		((base) + IE_CMD_COMMON_SZ + 5)#define IE_CMD_CFG_SLOT_LOW(base)	((base) + IE_CMD_COMMON_SZ + 6)#define IE_CMD_CFG_SLOT_HIGH(base)	((base) + IE_CMD_COMMON_SZ + 7)#define IE_CMD_CFG_PROMISC(base)	((base) + IE_CMD_COMMON_SZ + 8)#define IE_CMD_CFG_CRSCDT(base)		((base) + IE_CMD_COMMON_SZ + 9)#define IE_CMD_CFG_MINLEN(base)		((base) + IE_CMD_COMMON_SZ + 10)#define IE_CMD_CFG_JUNK(base)		((base) + IE_CMD_COMMON_SZ + 11)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -