e1000
include/drivers/e1000.h View source View on GitHubStructs
Section titled “Structs”e1000_device
Section titled “e1000_device” struct e1000_device (10 fields) source
TX
§
struct e1000_tx_desc *tx_descs §
uintptr_t tx_descs_phys §
uint32_t tx_tail §
void *tx_buffers[E1000_NUM_TX_DESC] one per desc
RX
§
struct e1000_rx_desc *rx_descs §
uintptr_t rx_descs_phys §
uint32_t rx_tail §
void *rx_buffers[E1000_NUM_RX_DESC] §
uint8_t bus PCI location
e1000_tx_desc
Section titled “e1000_tx_desc” struct e1000_tx_desc (7 fields) source
e1000_rx_desc
Section titled “e1000_rx_desc” struct e1000_rx_desc (6 fields) source
eth_hdr
Section titled “eth_hdr” struct eth_hdr (3 fields) source
ipv4_hdr
Section titled “ipv4_hdr” struct ipv4_hdr (10 fields) source
icmp_hdr
Section titled “icmp_hdr” struct icmp_hdr (5 fields) source
Functions
Section titled “Functions”e1000_init
Section titled “e1000_init”bool e1000_init(struct pci_device *dev, struct e1000_device *out) source Macros
Section titled “Macros”Register offsets
E1000_REG_CTRL
Section titled “E1000_REG_CTRL”#define E1000_REG_CTRL 0x0000 source E1000_REG_STATUS
Section titled “E1000_REG_STATUS”#define E1000_REG_STATUS 0x0008 source E1000_REG_TCTL
Section titled “E1000_REG_TCTL”#define E1000_REG_TCTL 0x0400 source E1000_REG_TDBAL
Section titled “E1000_REG_TDBAL”#define E1000_REG_TDBAL 0x03800 source E1000_REG_TDBAH
Section titled “E1000_REG_TDBAH”#define E1000_REG_TDBAH 0x03804 source E1000_REG_TDLEN
Section titled “E1000_REG_TDLEN”#define E1000_REG_TDLEN 0x03808 source E1000_REG_TDH
Section titled “E1000_REG_TDH”#define E1000_REG_TDH 0x03810 source E1000_REG_TDT
Section titled “E1000_REG_TDT”#define E1000_REG_TDT 0x03818 source E1000_REG_RCTL
Section titled “E1000_REG_RCTL”#define E1000_REG_RCTL 0x0100 source E1000_REG_RDBAL
Section titled “E1000_REG_RDBAL”#define E1000_REG_RDBAL 0x02800 source E1000_REG_RDBAH
Section titled “E1000_REG_RDBAH”#define E1000_REG_RDBAH 0x02804 source E1000_REG_RDLEN
Section titled “E1000_REG_RDLEN”#define E1000_REG_RDLEN 0x02808 source E1000_REG_RDH
Section titled “E1000_REG_RDH”#define E1000_REG_RDH 0x02810 source E1000_REG_RDT
Section titled “E1000_REG_RDT”#define E1000_REG_RDT 0x02818 source E1000_REG_IMS
Section titled “E1000_REG_IMS”#define E1000_REG_IMS 0x00D0 source E1000_REG_ICR
Section titled “E1000_REG_ICR”#define E1000_REG_ICR 0x00C0 source Transmit Control Register
E1000_TCTL_EN
Section titled “E1000_TCTL_EN”E1000_TCTL_PSP
Section titled “E1000_TCTL_PSP”E1000_TCTL_CT_SHIFT
Section titled “E1000_TCTL_CT_SHIFT”#define E1000_TCTL_CT_SHIFT 4 source E1000_TCTL_COLD_SHIFT
Section titled “E1000_TCTL_COLD_SHIFT”#define E1000_TCTL_COLD_SHIFT 12 source Receive Control Register
E1000_RCTL_EN
Section titled “E1000_RCTL_EN”E1000_RCTL_BAM
Section titled “E1000_RCTL_BAM”E1000_RCTL_SECRC
Section titled “E1000_RCTL_SECRC”E1000_NUM_RX_DESC
Section titled “E1000_NUM_RX_DESC”#define E1000_NUM_RX_DESC 64 source E1000_NUM_TX_DESC
Section titled “E1000_NUM_TX_DESC”#define E1000_NUM_TX_DESC 64 source E1000_TXD_CMD_EOP
Section titled “E1000_TXD_CMD_EOP”E1000_TXD_CMD_IFCS
Section titled “E1000_TXD_CMD_IFCS”E1000_TXD_CMD_RS
Section titled “E1000_TXD_CMD_RS”E1000_TXD_STAT_DD
Section titled “E1000_TXD_STAT_DD”E1000_RXD_STAT_DD
Section titled “E1000_RXD_STAT_DD”E1000_RXD_STAT_EOP
Section titled “E1000_RXD_STAT_EOP”E1000_CTRL_RST
Section titled “E1000_CTRL_RST”E1000_BAR_INDEX
Section titled “E1000_BAR_INDEX”#define E1000_BAR_INDEX 0 source PCI_BAR0
Section titled “PCI_BAR0”#define PCI_BAR0 0x10 source E1000_RX_BUF_SIZE
Section titled “E1000_RX_BUF_SIZE”#define E1000_RX_BUF_SIZE 2048 source E1000_MAX_TX_PACKET_SIZE
Section titled “E1000_MAX_TX_PACKET_SIZE”#define E1000_MAX_TX_PACKET_SIZE 1518 source Standard Ethernet frame