iPXE
Data Structures | Macros | Enumerations | Functions | Variables
linda.h File Reference

QLogic Linda Infiniband HCA. More...

#include <ipxe/pseudobit.h>
#include "qib_7220_regs.h"

Go to the source code of this file.

Data Structures

struct  QIB_7220_GPIO_pb
 A Linda GPIO register. More...
 
struct  QIB_7220_GPIO
 
struct  QIB_7220_scalar_pb
 A Linda general scalar register. More...
 
struct  QIB_7220_scalar
 
struct  QIB_7220_SendPbc_pb
 Linda send per-buffer control word. More...
 
struct  QIB_7220_SendPbc
 
struct  QIB_7220_SendBufAvail_pb
 Linda send buffer availability. More...
 
struct  QIB_7220_SendBufAvail
 
struct  QIB_7220_RcvEgr_pb
 A Linda eager receive descriptor. More...
 
struct  QIB_7220_RcvEgr
 
struct  QIB_7220_RcvHdrFlags_pb
 Linda receive header flags. More...
 
struct  QIB_7220_RcvHdrFlags
 

Macros

#define PSEUDOBIT_LITTLE_ENDIAN
 
#define LINDA_SENDBUFAVAIL_ALIGN   64
 DMA alignment for send buffer availability. More...
 
#define LINDA_BAR0_SIZE   0x400000
 Linda memory BAR size. More...
 
#define LINDA_GPIO_SCL   0
 Linda I2C SCL line GPIO number. More...
 
#define LINDA_GPIO_SDA   1
 Linda I2C SDA line GPIO number. More...
 
#define LINDA_EEPROM_GUID_OFFSET   3
 GUID offset within EEPROM. More...
 
#define LINDA_EEPROM_GUID_SIZE   8
 GUID size within EEPROM. More...
 
#define LINDA_EEPROM_SERIAL_OFFSET   12
 Board serial number offset within EEPROM. More...
 
#define LINDA_EEPROM_SERIAL_SIZE   12
 Board serial number size within EEPROM. More...
 
#define LINDA_MAX_SEND_BUFS   32
 Maximum number of send buffers used. More...
 
#define LINDA_SEND_BUF_SIZE   4096
 Linda send buffer size. More...
 
#define LINDA_NUM_CONTEXTS   5
 Number of contexts (including kernel context) More...
 
#define LINDA_EAGER_ARRAY_SIZE_5CTX_0   2048
 PortCfg values for different numbers of contexts. More...
 
#define LINDA_EAGER_ARRAY_SIZE_5CTX_OTHER   4096
 
#define LINDA_EAGER_ARRAY_SIZE_9CTX_0   2048
 
#define LINDA_EAGER_ARRAY_SIZE_9CTX_OTHER   2048
 
#define LINDA_EAGER_ARRAY_SIZE_17CTX_0   2048
 
#define LINDA_EAGER_ARRAY_SIZE_17CTX_OTHER   1024
 
#define LINDA_EAGER_BUFFER_ALIGN   2048
 Eager buffer required alignment. More...
 
#define LINDA_RECV_HEADER_COUNT   8
 Number of RX headers per context. More...
 
#define LINDA_RECV_HEADER_SIZE   96
 Maximum size of each RX header. More...
 
#define LINDA_RECV_HEADERS_SIZE   ( LINDA_RECV_HEADER_SIZE * LINDA_RECV_HEADER_COUNT )
 Total size of an RX header ring. More...
 
#define LINDA_RECV_HEADERS_ALIGN   64
 RX header alignment. More...
 
#define LINDA_RECV_PAYLOAD_SIZE   2048
 RX payload size. More...
 
#define LINDA_QP_IDETH   0xdead0
 QPN used for Infinipath Packets. More...
 
#define LINDA_EPB_REQUEST_MAX_WAIT_US   500
 Maximum time for wait for external parallel bus request, in us. More...
 
#define LINDA_EPB_XACT_MAX_WAIT_US   500
 Maximum time for wait for external parallel bus transaction, in us. More...
 
#define LINDA_EPB_CS_SERDES   1
 Linda external parallel bus chip selects. More...
 
#define LINDA_EPB_CS_UC   2
 
#define LINDA_EPB_WRITE   0
 Linda external parallel bus read/write operations. More...
 
#define LINDA_EPB_READ   1
 
#define LINDA_EPB_ADDRESS(_channel, _element, _reg)   ( (_element) | ( (_channel) << 4 ) | ( (_reg) << 9 ) )
 Linda external parallel bus register addresses. More...
 
#define LINDA_EPB_ADDRESS_CHANNEL(_address)   ( ( (_address) >> 4 ) & 0x1f )
 
#define LINDA_EPB_ADDRESS_ELEMENT(_address)   ( ( (_address) >> 0 ) & 0x0f )
 
#define LINDA_EPB_ADDRESS_REG(_address)   ( ( (_address) >> 9 ) & 0x3f )
 
#define LINDA_EPB_LOC(_cs, _channel, _element, _reg)   ( ( (_cs) << 16 ) | LINDA_EPB_ADDRESS ( _channel, _element, _reg ) )
 Linda external parallel bus locations. More...
 
#define LINDA_EPB_LOC_ADDRESS(_loc)   ( (_loc) & 0xffff )
 
#define LINDA_EPB_LOC_CS(_loc)   ( (_loc) >> 16 )
 
#define LINDA_EPB_UC_CHANNEL   6
 Linda external parallel bus microcontroller register addresses. More...
 
#define LINDA_EPB_UC_LOC(_reg)   LINDA_EPB_LOC ( LINDA_EPB_CS_UC, LINDA_EPB_UC_CHANNEL, 0, (_reg) )
 
#define LINDA_EPB_UC_CTL   LINDA_EPB_UC_LOC ( 0 )
 
#define LINDA_EPB_UC_CTL_WRITE   1
 
#define LINDA_EPB_UC_CTL_READ   2
 
#define LINDA_EPB_UC_ADDR_LO   LINDA_EPB_UC_LOC ( 2 )
 
#define LINDA_EPB_UC_ADDR_HI   LINDA_EPB_UC_LOC ( 3 )
 
#define LINDA_EPB_UC_DATA   LINDA_EPB_UC_LOC ( 4 )
 
#define LINDA_EPB_UC_CHUNK_SIZE   64
 
#define LINDA_TRIM_DONE_MAX_WAIT_MS   1000
 Maximum time to wait for "trim done" signal, in ms. More...
 
#define LINDA_LINK_STATE_MAX_WAIT_US   20
 Maximum time to wait for link state changes, in us. More...
 

Enumerations

enum  linda_portcfg { LINDA_PORTCFG_5CTX = 0, LINDA_PORTCFG_9CTX = 1, LINDA_PORTCFG_17CTX = 2 }
 PortCfg values for different numbers of contexts. More...
 
enum  linda_eager_buffer_size {
  LINDA_EAGER_BUFFER_NONE = 0, LINDA_EAGER_BUFFER_2K = 1, LINDA_EAGER_BUFFER_4K = 2, LINDA_EAGER_BUFFER_8K = 3,
  LINDA_EAGER_BUFFER_16K = 4, LINDA_EAGER_BUFFER_32K = 5, LINDA_EAGER_BUFFER_64K = 6
}
 Eager buffer size encodings. More...
 
enum  linda_link_state {
  LINDA_LINK_STATE_DOWN = 0, LINDA_LINK_STATE_INIT = 1, LINDA_LINK_STATE_ARM = 2, LINDA_LINK_STATE_ACTIVE = 3,
  LINDA_LINK_STATE_ACT_DEFER = 4
}
 Linda link states. More...
 

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 

Variables

uint8_t linda_ib_fw [8192]
 

Detailed Description

QLogic Linda Infiniband HCA.

Definition in file linda.h.

Macro Definition Documentation

◆ PSEUDOBIT_LITTLE_ENDIAN

#define PSEUDOBIT_LITTLE_ENDIAN

Definition at line 36 of file linda.h.

◆ LINDA_SENDBUFAVAIL_ALIGN

#define LINDA_SENDBUFAVAIL_ALIGN   64

DMA alignment for send buffer availability.

Definition at line 85 of file linda.h.

◆ LINDA_BAR0_SIZE

#define LINDA_BAR0_SIZE   0x400000

Linda memory BAR size.

Definition at line 124 of file linda.h.

◆ LINDA_GPIO_SCL

#define LINDA_GPIO_SCL   0

Linda I2C SCL line GPIO number.

Definition at line 127 of file linda.h.

◆ LINDA_GPIO_SDA

#define LINDA_GPIO_SDA   1

Linda I2C SDA line GPIO number.

Definition at line 130 of file linda.h.

◆ LINDA_EEPROM_GUID_OFFSET

#define LINDA_EEPROM_GUID_OFFSET   3

GUID offset within EEPROM.

Definition at line 133 of file linda.h.

◆ LINDA_EEPROM_GUID_SIZE

#define LINDA_EEPROM_GUID_SIZE   8

GUID size within EEPROM.

Definition at line 136 of file linda.h.

◆ LINDA_EEPROM_SERIAL_OFFSET

#define LINDA_EEPROM_SERIAL_OFFSET   12

Board serial number offset within EEPROM.

Definition at line 139 of file linda.h.

◆ LINDA_EEPROM_SERIAL_SIZE

#define LINDA_EEPROM_SERIAL_SIZE   12

Board serial number size within EEPROM.

Definition at line 142 of file linda.h.

◆ LINDA_MAX_SEND_BUFS

#define LINDA_MAX_SEND_BUFS   32

Maximum number of send buffers used.

This is a policy decision. Must be less than or equal to the total number of send buffers supported by the hardware (128).

Definition at line 149 of file linda.h.

◆ LINDA_SEND_BUF_SIZE

#define LINDA_SEND_BUF_SIZE   4096

Linda send buffer size.

Definition at line 152 of file linda.h.

◆ LINDA_NUM_CONTEXTS

#define LINDA_NUM_CONTEXTS   5

Number of contexts (including kernel context)

This is a policy decision. Must be 5, 9 or 17.

Definition at line 158 of file linda.h.

◆ LINDA_EAGER_ARRAY_SIZE_5CTX_0

#define LINDA_EAGER_ARRAY_SIZE_5CTX_0   2048

PortCfg values for different numbers of contexts.

Definition at line 168 of file linda.h.

◆ LINDA_EAGER_ARRAY_SIZE_5CTX_OTHER

#define LINDA_EAGER_ARRAY_SIZE_5CTX_OTHER   4096

Definition at line 169 of file linda.h.

◆ LINDA_EAGER_ARRAY_SIZE_9CTX_0

#define LINDA_EAGER_ARRAY_SIZE_9CTX_0   2048

Definition at line 170 of file linda.h.

◆ LINDA_EAGER_ARRAY_SIZE_9CTX_OTHER

#define LINDA_EAGER_ARRAY_SIZE_9CTX_OTHER   2048

Definition at line 171 of file linda.h.

◆ LINDA_EAGER_ARRAY_SIZE_17CTX_0

#define LINDA_EAGER_ARRAY_SIZE_17CTX_0   2048

Definition at line 172 of file linda.h.

◆ LINDA_EAGER_ARRAY_SIZE_17CTX_OTHER

#define LINDA_EAGER_ARRAY_SIZE_17CTX_OTHER   1024

Definition at line 173 of file linda.h.

◆ LINDA_EAGER_BUFFER_ALIGN

#define LINDA_EAGER_BUFFER_ALIGN   2048

Eager buffer required alignment.

Definition at line 176 of file linda.h.

◆ LINDA_RECV_HEADER_COUNT

#define LINDA_RECV_HEADER_COUNT   8

Number of RX headers per context.

This is a policy decision.

Definition at line 193 of file linda.h.

◆ LINDA_RECV_HEADER_SIZE

#define LINDA_RECV_HEADER_SIZE   96

Maximum size of each RX header.

This is a policy decision. Must be divisible by 4.

Definition at line 199 of file linda.h.

◆ LINDA_RECV_HEADERS_SIZE

#define LINDA_RECV_HEADERS_SIZE   ( LINDA_RECV_HEADER_SIZE * LINDA_RECV_HEADER_COUNT )

Total size of an RX header ring.

Definition at line 202 of file linda.h.

◆ LINDA_RECV_HEADERS_ALIGN

#define LINDA_RECV_HEADERS_ALIGN   64

RX header alignment.

Definition at line 206 of file linda.h.

◆ LINDA_RECV_PAYLOAD_SIZE

#define LINDA_RECV_PAYLOAD_SIZE   2048

RX payload size.

This is a policy decision. Must be a valid eager buffer size.

Definition at line 212 of file linda.h.

◆ LINDA_QP_IDETH

#define LINDA_QP_IDETH   0xdead0

QPN used for Infinipath Packets.

This is a policy decision. Must have bit 0 clear. Must not be a QPN that we will use.

Definition at line 219 of file linda.h.

◆ LINDA_EPB_REQUEST_MAX_WAIT_US

#define LINDA_EPB_REQUEST_MAX_WAIT_US   500

Maximum time for wait for external parallel bus request, in us.

Definition at line 222 of file linda.h.

◆ LINDA_EPB_XACT_MAX_WAIT_US

#define LINDA_EPB_XACT_MAX_WAIT_US   500

Maximum time for wait for external parallel bus transaction, in us.

Definition at line 225 of file linda.h.

◆ LINDA_EPB_CS_SERDES

#define LINDA_EPB_CS_SERDES   1

Linda external parallel bus chip selects.

Definition at line 228 of file linda.h.

◆ LINDA_EPB_CS_UC

#define LINDA_EPB_CS_UC   2

Definition at line 229 of file linda.h.

◆ LINDA_EPB_WRITE

#define LINDA_EPB_WRITE   0

Linda external parallel bus read/write operations.

Definition at line 232 of file linda.h.

◆ LINDA_EPB_READ

#define LINDA_EPB_READ   1

Definition at line 233 of file linda.h.

◆ LINDA_EPB_ADDRESS

#define LINDA_EPB_ADDRESS (   _channel,
  _element,
  _reg 
)    ( (_element) | ( (_channel) << 4 ) | ( (_reg) << 9 ) )

Linda external parallel bus register addresses.

Definition at line 236 of file linda.h.

◆ LINDA_EPB_ADDRESS_CHANNEL

#define LINDA_EPB_ADDRESS_CHANNEL (   _address)    ( ( (_address) >> 4 ) & 0x1f )

Definition at line 238 of file linda.h.

◆ LINDA_EPB_ADDRESS_ELEMENT

#define LINDA_EPB_ADDRESS_ELEMENT (   _address)    ( ( (_address) >> 0 ) & 0x0f )

Definition at line 239 of file linda.h.

◆ LINDA_EPB_ADDRESS_REG

#define LINDA_EPB_ADDRESS_REG (   _address)    ( ( (_address) >> 9 ) & 0x3f )

Definition at line 240 of file linda.h.

◆ LINDA_EPB_LOC

#define LINDA_EPB_LOC (   _cs,
  _channel,
  _element,
  _reg 
)    ( ( (_cs) << 16 ) | LINDA_EPB_ADDRESS ( _channel, _element, _reg ) )

Linda external parallel bus locations.

The location is used by the driver to encode both the chip select and the EPB address.

Definition at line 247 of file linda.h.

◆ LINDA_EPB_LOC_ADDRESS

#define LINDA_EPB_LOC_ADDRESS (   _loc)    ( (_loc) & 0xffff )

Definition at line 249 of file linda.h.

◆ LINDA_EPB_LOC_CS

#define LINDA_EPB_LOC_CS (   _loc)    ( (_loc) >> 16 )

Definition at line 250 of file linda.h.

◆ LINDA_EPB_UC_CHANNEL

#define LINDA_EPB_UC_CHANNEL   6

Linda external parallel bus microcontroller register addresses.

Definition at line 253 of file linda.h.

◆ LINDA_EPB_UC_LOC

#define LINDA_EPB_UC_LOC (   _reg)    LINDA_EPB_LOC ( LINDA_EPB_CS_UC, LINDA_EPB_UC_CHANNEL, 0, (_reg) )

Definition at line 254 of file linda.h.

◆ LINDA_EPB_UC_CTL

#define LINDA_EPB_UC_CTL   LINDA_EPB_UC_LOC ( 0 )

Definition at line 256 of file linda.h.

◆ LINDA_EPB_UC_CTL_WRITE

#define LINDA_EPB_UC_CTL_WRITE   1

Definition at line 257 of file linda.h.

◆ LINDA_EPB_UC_CTL_READ

#define LINDA_EPB_UC_CTL_READ   2

Definition at line 258 of file linda.h.

◆ LINDA_EPB_UC_ADDR_LO

#define LINDA_EPB_UC_ADDR_LO   LINDA_EPB_UC_LOC ( 2 )

Definition at line 259 of file linda.h.

◆ LINDA_EPB_UC_ADDR_HI

#define LINDA_EPB_UC_ADDR_HI   LINDA_EPB_UC_LOC ( 3 )

Definition at line 260 of file linda.h.

◆ LINDA_EPB_UC_DATA

#define LINDA_EPB_UC_DATA   LINDA_EPB_UC_LOC ( 4 )

Definition at line 261 of file linda.h.

◆ LINDA_EPB_UC_CHUNK_SIZE

#define LINDA_EPB_UC_CHUNK_SIZE   64

Definition at line 262 of file linda.h.

◆ LINDA_TRIM_DONE_MAX_WAIT_MS

#define LINDA_TRIM_DONE_MAX_WAIT_MS   1000

Maximum time to wait for "trim done" signal, in ms.

Definition at line 267 of file linda.h.

◆ LINDA_LINK_STATE_MAX_WAIT_US

#define LINDA_LINK_STATE_MAX_WAIT_US   20

Maximum time to wait for link state changes, in us.

Definition at line 279 of file linda.h.

Enumeration Type Documentation

◆ linda_portcfg

PortCfg values for different numbers of contexts.

Enumerator
LINDA_PORTCFG_5CTX 
LINDA_PORTCFG_9CTX 
LINDA_PORTCFG_17CTX 

Definition at line 161 of file linda.h.

◆ linda_eager_buffer_size

Eager buffer size encodings.

Enumerator
LINDA_EAGER_BUFFER_NONE 
LINDA_EAGER_BUFFER_2K 
LINDA_EAGER_BUFFER_4K 
LINDA_EAGER_BUFFER_8K 
LINDA_EAGER_BUFFER_16K 
LINDA_EAGER_BUFFER_32K 
LINDA_EAGER_BUFFER_64K 

Definition at line 179 of file linda.h.

◆ linda_link_state

Linda link states.

Enumerator
LINDA_LINK_STATE_DOWN 
LINDA_LINK_STATE_INIT 
LINDA_LINK_STATE_ARM 
LINDA_LINK_STATE_ACTIVE 
LINDA_LINK_STATE_ACT_DEFER 

Definition at line 270 of file linda.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

Variable Documentation

◆ linda_ib_fw

uint8_t linda_ib_fw[8192]

Definition at line 44 of file linda_fw.c.

Referenced by linda_program_uc_ram(), and linda_verify_uc_ram().