|
iPXE
|
Exablaze ExaNIC driver. More...
#include <stdint.h>#include <ipxe/pci.h>#include <ipxe/ethernet.h>#include <ipxe/retry.h>#include <ipxe/i2c.h>#include <ipxe/bitbash.h>Go to the source code of this file.
Data Structures | |
| struct | exanic_tx_descriptor |
| An ExaNIC transmit chunk descriptor. More... | |
| struct | exanic_tx_chunk |
| An ExaNIC transmit chunk. More... | |
| struct | exanic_rx_descriptor |
| An ExaNIC receive chunk descriptor. More... | |
| struct | exanic_rx_chunk |
| An ExaNIC receive chunk. More... | |
| struct | exanic_i2c_config |
| An ExaNIC I2C bus configuration. More... | |
| struct | exanic_port |
| An ExaNIC port. More... | |
| struct | exanic |
| An ExaNIC. More... | |
Macros | |
| #define | EXANIC_MAX_PORTS 8 |
| Maximum number of ports. | |
| #define | EXANIC_REGS_BAR PCI_BASE_ADDRESS_0 |
| Register BAR. | |
| #define | EXANIC_TX_BAR PCI_BASE_ADDRESS_2 |
| Transmit region BAR. | |
| #define | EXANIC_ALIGN 0x1000 |
| Alignment for DMA regions. | |
| #define | EXANIC_DMA_32_BIT 0x00000001UL |
| Flag for 32-bit DMA addresses. | |
| #define | EXANIC_REGS_LEN 0x2000 |
| Register set length. | |
| #define | EXANIC_TXF_LEN 0x1000 |
| Transmit feedback region length. | |
| #define | EXANIC_TXF_SLOT(index) |
| Transmit feedback slot. | |
| #define | EXANIC_RX_LEN 0x200000 |
| Receive region length. | |
| #define | EXANIC_TXF_BASE 0x0014 |
| Transmit feedback base address register. | |
| #define | EXANIC_CAPS 0x0038 |
| Capabilities register. | |
| #define | EXANIC_CAPS_100M 0x01000000UL |
| 100Mbps supported | |
| #define | EXANIC_CAPS_1G 0x02000000UL |
| 1Gbps supported | |
| #define | EXANIC_CAPS_10G 0x04000000UL |
| 10Gbps supported | |
| #define | EXANIC_CAPS_40G 0x08000000UL |
| 40Gbps supported | |
| #define | EXANIC_CAPS_100G 0x10000000UL |
| 100Gbps supported | |
| #define | EXANIC_CAPS_SPEED_MASK 0x1f000000UL |
| Supported speeds mask. | |
| #define | EXANIC_I2C 0x012c |
| I2C GPIO register. | |
| #define | EXANIC_POWER 0x0138 |
| Power control register. | |
| #define | EXANIC_POWER_ON 0x000000f0UL |
| Power on PHYs. | |
| #define | EXANIC_PORT_REGS(index) |
| Port register offset. | |
| #define | EXANIC_PORT_ENABLE 0x0000 |
| Port enable register. | |
| #define | EXANIC_PORT_ENABLE_ENABLED 0x00000001UL |
| Port is enabled. | |
| #define | EXANIC_PORT_SPEED 0x0004 |
| Port speed register. | |
| #define | EXANIC_PORT_STATUS 0x0008 |
| Port status register. | |
| #define | EXANIC_PORT_STATUS_LINK 0x00000008UL |
| Link is up. | |
| #define | EXANIC_PORT_STATUS_ABSENT 0x80000000UL |
| Port is not present. | |
| #define | EXANIC_PORT_MAC 0x000c |
| Port MAC address (second half) register. | |
| #define | EXANIC_PORT_FLAGS 0x0010 |
| Port flags register. | |
| #define | EXANIC_PORT_FLAGS_PROMISC 0x00000001UL |
| Promiscuous mode. | |
| #define | EXANIC_PORT_RX_BASE 0x0014 |
| Port receive chunk base address register. | |
| #define | EXANIC_PORT_TX_COMMAND 0x0020 |
| Port transmit command register. | |
| #define | EXANIC_PORT_TX_OFFSET 0x0024 |
| Port transmit region offset register. | |
| #define | EXANIC_PORT_TX_LEN 0x0028 |
| Port transmit region length register. | |
| #define | EXANIC_PORT_OUI 0x0030 |
| Port MAC address (first half) register. | |
| #define | EXANIC_PORT_IRQ 0x0034 |
| Port interrupt configuration register. | |
| #define | EXANIC_TYPE_RAW 0x01 |
| Raw Ethernet frame type. | |
| #define | EXANIC_STATUS_ERROR_MASK 0x0f |
| Receive status error mask. | |
| #define | EXANIC_RX_COUNT ( EXANIC_RX_LEN / sizeof ( struct exanic_rx_chunk ) ) |
| Number of receive chunks. | |
| #define | EXANIC_EEPROM_ADDRESS 0x50 |
| EEPROM address. | |
| #define | EXANIC_MAX_TX_LEN ( 256 * sizeof ( struct exanic_tx_chunk ) ) |
| Maximum used length of transmit region. | |
| #define | EXANIC_MAX_RX_LEN ( ETH_FRAME_LEN + 4 /* VLAN */ + 4 /* CRC */ ) |
| Maximum length of received packet. | |
| #define | EXANIC_LINK_INTERVAL ( 1 * TICKS_PER_SEC ) |
| Interval between link state checks. | |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
Exablaze ExaNIC driver.
Definition in file exanic.h.
| #define EXANIC_MAX_PORTS 8 |
Maximum number of ports.
Definition at line 20 of file exanic.h.
Referenced by exanic_probe(), exanic_remove(), and exanic_reset().
| #define EXANIC_REGS_BAR PCI_BASE_ADDRESS_0 |
| #define EXANIC_TX_BAR PCI_BASE_ADDRESS_2 |
| #define EXANIC_ALIGN 0x1000 |
| #define EXANIC_DMA_32_BIT 0x00000001UL |
Flag for 32-bit DMA addresses.
Definition at line 32 of file exanic.h.
Referenced by exanic_write_base().
| #define EXANIC_REGS_LEN 0x2000 |
| #define EXANIC_TXF_LEN 0x1000 |
Transmit feedback region length.
Definition at line 38 of file exanic.h.
Referenced by exanic_probe(), and exanic_remove().
| #define EXANIC_TXF_SLOT | ( | index | ) |
Transmit feedback slot.
This is a policy decision.
Definition at line 44 of file exanic.h.
Referenced by exanic_probe_port().
| #define EXANIC_RX_LEN 0x200000 |
Receive region length.
Definition at line 47 of file exanic.h.
Referenced by exanic_open(), and exanic_probe_port().
| #define EXANIC_TXF_BASE 0x0014 |
Transmit feedback base address register.
Definition at line 50 of file exanic.h.
Referenced by exanic_probe(), and exanic_reset().
| #define EXANIC_CAPS 0x0038 |
| #define EXANIC_CAPS_SPEED_MASK 0x1f000000UL |
Supported speeds mask.
Definition at line 59 of file exanic.h.
Referenced by exanic_expired(), and exanic_probe_port().
| #define EXANIC_I2C 0x012c |
I2C GPIO register.
Definition at line 62 of file exanic.h.
Referenced by exanic_i2c_read_bit(), and exanic_i2c_write_bit().
| #define EXANIC_POWER 0x0138 |
| #define EXANIC_POWER_ON 0x000000f0UL |
| #define EXANIC_PORT_REGS | ( | index | ) |
Port register offset.
Definition at line 69 of file exanic.h.
Referenced by exanic_probe_port(), and exanic_reset().
| #define EXANIC_PORT_ENABLE 0x0000 |
Port enable register.
Definition at line 72 of file exanic.h.
Referenced by exanic_close(), exanic_open(), and exanic_reset().
| #define EXANIC_PORT_ENABLE_ENABLED 0x00000001UL |
| #define EXANIC_PORT_SPEED 0x0004 |
Port speed register.
Definition at line 76 of file exanic.h.
Referenced by exanic_check_link(), exanic_expired(), exanic_open(), and exanic_probe_port().
| #define EXANIC_PORT_STATUS 0x0008 |
Port status register.
Definition at line 79 of file exanic.h.
Referenced by exanic_check_link(), and exanic_probe_port().
| #define EXANIC_PORT_STATUS_LINK 0x00000008UL |
| #define EXANIC_PORT_STATUS_ABSENT 0x80000000UL |
| #define EXANIC_PORT_MAC 0x000c |
| #define EXANIC_PORT_FLAGS 0x0010 |
| #define EXANIC_PORT_FLAGS_PROMISC 0x00000001UL |
| #define EXANIC_PORT_RX_BASE 0x0014 |
Port receive chunk base address register.
Definition at line 91 of file exanic.h.
Referenced by exanic_close(), exanic_open(), and exanic_reset().
| #define EXANIC_PORT_TX_COMMAND 0x0020 |
Port transmit command register.
Definition at line 94 of file exanic.h.
Referenced by exanic_transmit().
| #define EXANIC_PORT_TX_OFFSET 0x0024 |
Port transmit region offset register.
Definition at line 97 of file exanic.h.
Referenced by exanic_probe_port().
| #define EXANIC_PORT_TX_LEN 0x0028 |
Port transmit region length register.
Definition at line 100 of file exanic.h.
Referenced by exanic_probe_port().
| #define EXANIC_PORT_OUI 0x0030 |
| #define EXANIC_PORT_IRQ 0x0034 |
Port interrupt configuration register.
Definition at line 106 of file exanic.h.
Referenced by exanic_reset().
| #define EXANIC_TYPE_RAW 0x01 |
| #define EXANIC_STATUS_ERROR_MASK 0x0f |
| #define EXANIC_RX_COUNT ( EXANIC_RX_LEN / sizeof ( struct exanic_rx_chunk ) ) |
| #define EXANIC_EEPROM_ADDRESS 0x50 |
| #define EXANIC_MAX_TX_LEN ( 256 * sizeof ( struct exanic_tx_chunk ) ) |
Maximum used length of transmit region.
This is a policy decision to avoid overflowing the 16-bit transmit producer and consumer counters.
Definition at line 249 of file exanic.h.
Referenced by exanic_probe_port().
| #define EXANIC_MAX_RX_LEN ( ETH_FRAME_LEN + 4 /* VLAN */ + 4 /* CRC */ ) |
Maximum length of received packet.
This is a policy decision.
Definition at line 255 of file exanic.h.
Referenced by exanic_poll_rx().
| #define EXANIC_LINK_INTERVAL ( 1 * TICKS_PER_SEC ) |
Interval between link state checks.
This is a policy decision.
Definition at line 261 of file exanic.h.
Referenced by exanic_expired(), and exanic_open().
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |