iPXE
intelxvf.h
Go to the documentation of this file.
1 #ifndef _INTELXVF_H
2 #define _INTELXVF_H
3 
4 /** @file
5  *
6  * Intel 10 Gigabit Ethernet virtual function network card driver
7  *
8  */
9 
10 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11 FILE_SECBOOT ( PERMITTED );
12 
13 #include "intelvf.h"
14 
15 /** Control Register */
16 #define INTELXVF_CTRL 0x0000UL
17 #define INTELXVF_CTRL_RST 0x04000000UL /**< Function-level reset */
18 
19 /** Link Status Register */
20 #define INTELXVF_LINKS 0x0010UL
21 #define INTELXVF_LINKS_UP 0x40000000UL /**< Link up */
22 
23 /** Extended Interrupt Cause Read Register */
24 #define INTELXVF_EICR 0x0100UL
25 #define INTELXVF_EIRQ_RX0 0x00000001UL /**< RX queue 0 (via IVAR) */
26 #define INTELXVF_EIRQ_TX0 0x00000002UL /**< TX queue 0 (via IVAR) */
27 #define INTELXVF_EIRQ_MBOX 0x00000004UL /**< Mailbox (via IVARM) */
28 
29 /** Extended Interrupt Mask Set/Read Register */
30 #define INTELXVF_EIMS 0x0108UL
31 
32 /** Extended Interrupt Mask Clear Register */
33 #define INTELXVF_EIMC 0x010cUL
34 
35 /** Interrupt Vector Allocation Register */
36 #define INTELXVF_IVAR 0x0120UL
37 #define INTELXVF_IVAR_RX0(bit) ( (bit) << 0 ) /**< RX queue 0 allocation */
38 #define INTELXVF_IVAR_RX0_DEFAULT INTELXVF_IVAR_RX0 ( 0x00 )
39 #define INTELXVF_IVAR_RX0_MASK INTELXVF_IVAR_RX0 ( 0x01 )
40 #define INTELXVF_IVAR_RX0_VALID 0x00000080UL /**< RX queue 0 valid */
41 #define INTELXVF_IVAR_TX0(bit) ( (bit) << 8 ) /**< TX queue 0 allocation */
42 #define INTELXVF_IVAR_TX0_DEFAULT INTELXVF_IVAR_TX0 ( 0x01 )
43 #define INTELXVF_IVAR_TX0_MASK INTELXVF_IVAR_TX0 ( 0x01 )
44 #define INTELXVF_IVAR_TX0_VALID 0x00008000UL /**< TX queue 0 valid */
45 
46 /** Interrupt Vector Allocation Miscellaneous Register */
47 #define INTELXVF_IVARM 0x0140UL
48 #define INTELXVF_IVARM_MBOX(bit) ( (bit) << 0 ) /**< Mailbox allocation */
49 #define INTELXVF_IVARM_MBOX_DEFAULT INTELXVF_IVARM_MBOX ( 0x02 )
50 #define INTELXVF_IVARM_MBOX_MASK INTELXVF_IVARM_MBOX ( 0x03 )
51 #define INTELXVF_IVARM_MBOX_VALID 0x00000080UL /**< Mailbox valid */
52 
53 /** Mailbox Memory Register Base */
54 #define INTELXVF_MBMEM 0x0200UL
55 
56 /** Mailbox Control Register */
57 #define INTELXVF_MBCTRL 0x02fcUL
58 
59 /** Packet Split Receive Type */
60 #define INTELXVF_PSRTYPE 0x0300UL
61 
62 /** Receive Descriptor register block */
63 #define INTELXVF_RD(n) ( 0x1000UL + ( 0x40 * (n) ) )
64 
65 /** RX DCA Control Register */
66 #define INTELXVF_DCA_RXCTRL 0x100cUL
67 #define INTELXVF_DCA_RXCTRL_MUST_BE_ZERO 0x00001000UL /**< Must be zero */
68 
69 /** Split Receive Control Register */
70 #define INTELXVF_SRRCTL 0x1014UL
71 #define INTELXVF_SRRCTL_BSIZE(kb) ( (kb) << 0 ) /**< Receive buffer size */
72 #define INTELXVF_SRRCTL_BSIZE_DEFAULT INTELXVF_SRRCTL_BSIZE ( 0x02 )
73 #define INTELXVF_SRRCTL_BSIZE_MASK INTELXVF_SRRCTL_BSIZE ( 0x1f )
74 #define INTELXVF_SRRCTL_BHDRSIZE(kb) ( (kb) << 8 ) /**< Header size */
75 #define INTELXVF_SRRCTL_BHDRSIZE_DEFAULT INTELXVF_SRRCTL_BHDRSIZE ( 0x04 )
76 #define INTELXVF_SRRCTL_BHDRSIZE_MASK INTELXVF_SRRCTL_BHDRSIZE ( 0x0f )
77 #define INTELXVF_SRRCTL_DESCTYPE(typ) ( (typ) << 25 ) /**< Descriptor type */
78 #define INTELXVF_SRRCTL_DESCTYPE_DEFAULT INTELXVF_SRRCTL_DESCTYPE ( 0x00 )
79 #define INTELXVF_SRRCTL_DESCTYPE_MASK INTELXVF_SRRCTL_DESCTYPE ( 0x07 )
80 #define INTELXVF_SRRCTL_DROP_EN 0x10000000UL
81 
82 /** Good Packets Received Count */
83 #define INTELXVF_GPRC 0x101c
84 
85 /** Good Packets Received Count Low */
86 #define INTELXVF_GORCL 0x1020
87 
88 /** Good Packets Received Count High */
89 #define INTELXVF_GORCH 0x1024
90 
91 /* Multicast Packets Received Count */
92 #define INTELXVF_MPRC 0x1034
93 
94 /** Transmit Descriptor register block */
95 #define INTELXVF_TD(n) ( 0x2000UL + ( 0x40 * (n) ) )
96 
97 /** Good Packets Transmitted Count */
98 #define INTELXVF_GPTC 0x201c
99 
100 /** Good Packets Transmitted Count Low */
101 #define INTELXVF_GOTCL 0x2020
102 
103 /** Good Packets Transmitted Count High */
104 #define INTELXVF_GOTCH 0x2024
105 
106 /** Negotiate API version mailbox message */
107 #define INTELXVF_MSG_TYPE_VERSION 0x00000008UL
108 
109 /** API version 1.1 */
110 #define INTELXVF_MSG_VERSION_1_1 0x00000002UL
111 
112 /** Number of queues */
113 #define INTELXVF_NUM_RINGS 8
114 
115 #endif /* _INTELXVF_H */
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
FILE_SECBOOT(PERMITTED)
Intel 10/100/1000 virtual function network card driver.