iPXE
intelxvf.h
Go to the documentation of this file.
00001 #ifndef _INTELXVF_H
00002 #define _INTELXVF_H
00003 
00004 /** @file
00005  *
00006  * Intel 10 Gigabit Ethernet virtual function network card driver
00007  *
00008  */
00009 
00010 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
00011 
00012 #include "intelvf.h"
00013 
00014 /** Control Register */
00015 #define INTELXVF_CTRL 0x0000UL
00016 #define INTELXVF_CTRL_RST       0x04000000UL    /**< Function-level reset */
00017 
00018 /** Link Status Register */
00019 #define INTELXVF_LINKS 0x0010UL
00020 #define INTELXVF_LINKS_UP       0x40000000UL    /**< Link up */
00021 
00022 /** Extended Interrupt Cause Read Register */
00023 #define INTELXVF_EICR 0x0100UL
00024 #define INTELXVF_EIRQ_RX0       0x00000001UL    /**< RX queue 0 (via IVAR) */
00025 #define INTELXVF_EIRQ_TX0       0x00000002UL    /**< TX queue 0 (via IVAR) */
00026 #define INTELXVF_EIRQ_MBOX      0x00000004UL    /**< Mailbox (via IVARM) */
00027 
00028 /** Extended Interrupt Mask Set/Read Register */
00029 #define INTELXVF_EIMS 0x0108UL
00030 
00031 /** Extended Interrupt Mask Clear Register */
00032 #define INTELXVF_EIMC 0x010cUL
00033 
00034 /** Interrupt Vector Allocation Register */
00035 #define INTELXVF_IVAR 0x0120UL
00036 #define INTELXVF_IVAR_RX0(bit)  ( (bit) << 0 )  /**< RX queue 0 allocation */
00037 #define INTELXVF_IVAR_RX0_DEFAULT INTELXVF_IVAR_RX0 ( 0x00 )
00038 #define INTELXVF_IVAR_RX0_MASK  INTELXVF_IVAR_RX0 ( 0x01 )
00039 #define INTELXVF_IVAR_RX0_VALID 0x00000080UL    /**< RX queue 0 valid */
00040 #define INTELXVF_IVAR_TX0(bit)  ( (bit) << 8 )  /**< TX queue 0 allocation */
00041 #define INTELXVF_IVAR_TX0_DEFAULT INTELXVF_IVAR_TX0 ( 0x01 )
00042 #define INTELXVF_IVAR_TX0_MASK  INTELXVF_IVAR_TX0 ( 0x01 )
00043 #define INTELXVF_IVAR_TX0_VALID 0x00008000UL    /**< TX queue 0 valid */
00044 
00045 /** Interrupt Vector Allocation Miscellaneous Register */
00046 #define INTELXVF_IVARM 0x0140UL
00047 #define INTELXVF_IVARM_MBOX(bit) ( (bit) << 0 ) /**< Mailbox allocation */
00048 #define INTELXVF_IVARM_MBOX_DEFAULT INTELXVF_IVARM_MBOX ( 0x02 )
00049 #define INTELXVF_IVARM_MBOX_MASK INTELXVF_IVARM_MBOX ( 0x03 )
00050 #define INTELXVF_IVARM_MBOX_VALID 0x00000080UL  /**< Mailbox valid */
00051 
00052 /** Mailbox Memory Register Base */
00053 #define INTELXVF_MBMEM 0x0200UL
00054 
00055 /** Mailbox Control Register */
00056 #define INTELXVF_MBCTRL 0x02fcUL
00057 
00058 /** Packet Split Receive Type */
00059 #define INTELXVF_PSRTYPE 0x0300UL
00060 
00061 /** Receive Descriptor register block */
00062 #define INTELXVF_RD(n) ( 0x1000UL + ( 0x40 * (n) ) )
00063 
00064 /** RX DCA Control Register */
00065 #define INTELXVF_DCA_RXCTRL 0x100cUL
00066 #define INTELXVF_DCA_RXCTRL_MUST_BE_ZERO 0x00001000UL /**< Must be zero */
00067 
00068 /** Split Receive Control Register */
00069 #define INTELXVF_SRRCTL 0x1014UL
00070 #define INTELXVF_SRRCTL_BSIZE(kb) ( (kb) << 0 ) /**< Receive buffer size */
00071 #define INTELXVF_SRRCTL_BSIZE_DEFAULT INTELXVF_SRRCTL_BSIZE ( 0x02 )
00072 #define INTELXVF_SRRCTL_BSIZE_MASK INTELXVF_SRRCTL_BSIZE ( 0x1f )
00073 #define INTELXVF_SRRCTL_BHDRSIZE(kb) ( (kb) << 8 ) /**< Header size */
00074 #define INTELXVF_SRRCTL_BHDRSIZE_DEFAULT INTELXVF_SRRCTL_BHDRSIZE ( 0x04 )
00075 #define INTELXVF_SRRCTL_BHDRSIZE_MASK INTELXVF_SRRCTL_BHDRSIZE ( 0x0f )
00076 #define INTELXVF_SRRCTL_DESCTYPE(typ) ( (typ) << 25 ) /**< Descriptor type */
00077 #define INTELXVF_SRRCTL_DESCTYPE_DEFAULT INTELXVF_SRRCTL_DESCTYPE ( 0x00 )
00078 #define INTELXVF_SRRCTL_DESCTYPE_MASK INTELXVF_SRRCTL_DESCTYPE ( 0x07 )
00079 #define INTELXVF_SRRCTL_DROP_EN 0x10000000UL
00080 
00081 /** Good Packets Received Count */
00082 #define INTELXVF_GPRC 0x101c
00083 
00084 /** Good Packets Received Count Low */
00085 #define INTELXVF_GORCL 0x1020
00086 
00087 /** Good Packets Received Count High */
00088 #define INTELXVF_GORCH 0x1024
00089 
00090 /* Multicast Packets Received Count */
00091 #define INTELXVF_MPRC 0x1034
00092 
00093 /** Transmit Descriptor register block */
00094 #define INTELXVF_TD(n) ( 0x2000UL + ( 0x40 * (n) ) )
00095 
00096 /** Good Packets Transmitted Count */
00097 #define INTELXVF_GPTC 0x201c
00098 
00099 /** Good Packets Transmitted Count Low */
00100 #define INTELXVF_GOTCL 0x2020
00101 
00102 /** Good Packets Transmitted Count High */
00103 #define INTELXVF_GOTCH 0x2024
00104 
00105 /** Negotiate API version mailbox message */
00106 #define INTELXVF_MSG_TYPE_VERSION 0x00000008UL
00107 
00108 /** API version 1.1 */
00109 #define INTELXVF_MSG_VERSION_1_1 0x00000002UL
00110 
00111 /** Number of queues */
00112 #define INTELXVF_NUM_RINGS 8
00113 
00114 #endif /* _INTELXVF_H */