iPXE
Data Structures | Macros | Functions
icplus.h File Reference

IC+ network driver. More...

#include <ipxe/nvs.h>
#include <ipxe/mii_bit.h>

Go to the source code of this file.

Data Structures

union  icplus_fragment
 Data fragment. More...
 
struct  icplus_descriptor
 Transmit or receive descriptor. More...
 
struct  icplus_ring
 Descriptor ring. More...
 
struct  icplus_nic
 An IC+ network card. More...
 

Macros

#define ICP_BAR_SIZE   0x200
 BAR size. More...
 
#define ICP_ALIGN   0x8
 Alignment requirement. More...
 
#define ICP_BASE_LO   0x0
 Base address low register offset. More...
 
#define ICP_BASE_HI   0x4
 Base address high register offset. More...
 
#define ICP_ASICCTRL   0x30
 ASIC control register (double word) More...
 
#define ICP_ASICCTRL_PHYSPEED1000   0x00000040UL
 PHY speed 1000. More...
 
#define ICP_ASICCTRL_GLOBALRESET   0x00010000UL
 Global reset. More...
 
#define ICP_ASICCTRL_DMA   0x00080000UL
 DMA. More...
 
#define ICP_ASICCTRL_FIFO   0x00100000UL
 FIFO. More...
 
#define ICP_ASICCTRL_NETWORK   0x00200000UL
 Network. More...
 
#define ICP_ASICCTRL_HOST   0x00400000UL
 Host. More...
 
#define ICP_ASICCTRL_AUTOINIT   0x00800000UL
 Auto init. More...
 
#define ICP_ASICCTRL_RESETBUSY   0x04000000UL
 Reset busy. More...
 
#define ICP_RESET_MAX_WAIT_MS   1000
 Maximum time to wait for reset. More...
 
#define ICP_DMACTRL   0x00
 DMA control register (word/double word) More...
 
#define ICP_DMACTRL_RXPOLLNOW   0x0010
 Receive poll now. More...
 
#define ICP_DMACTRL_TXPOLLNOW   0x1000
 Transmit poll now. More...
 
#define ICP_EEPROMCTRL   0x4a
 EEPROM control register (word) More...
 
#define ICP_EEPROMCTRL_ADDRESS(x)   ( (x) << 0 )
 Address. More...
 
#define ICP_EEPROMCTRL_OPCODE(x)   ( (x) << 8 )
 Opcode. More...
 
#define ICP_EEPROMCTRL_OPCODE_READ   ICP_EEPROMCTRL_OPCODE ( 2 )
 Read register. More...
 
#define ICP_EEPROMCTRL_BUSY   0x8000
 EEPROM busy. More...
 
#define ICP_EEPROM_MAX_WAIT_MS   1000
 Maximum time to wait for reading EEPROM. More...
 
#define ICP_EEPROM_WORD_LEN_LOG2   1
 EEPROM word length. More...
 
#define ICP_EEPROM_MIN_SIZE_WORDS   0x20
 Minimum EEPROM size, in words. More...
 
#define ICP_EEPROM_MAC   0x10
 Address of MAC address within EEPROM. More...
 
#define ICP_EEPROMDATA   0x48
 EEPROM data register (word) More...
 
#define ICP_INTSTATUS   0x5e
 Interupt status register (word) More...
 
#define ICP_INTSTATUS_TXCOMPLETE   0x0004
 TX complete. More...
 
#define ICP_INTSTATUS_LINKEVENT   0x0100
 Link event. More...
 
#define ICP_INTSTATUS_RXDMACOMPLETE   0x0400
 RX DMA complete. More...
 
#define ICP_MACCTRL   0x6c
 MAC control register (double word) More...
 
#define ICP_MACCTRL_DUPLEX   0x00000020UL
 Duplex select. More...
 
#define ICP_MACCTRL_TXENABLE   0x01000000UL
 TX enable. More...
 
#define ICP_MACCTRL_TXDISABLE   0x02000000UL
 TX disable. More...
 
#define ICP_MACCTRL_RXENABLE   0x08000000UL
 RX enable. More...
 
#define ICP_MACCTRL_RXDISABLE   0x10000000UL
 RX disable. More...
 
#define ICP_PHYCTRL   0x76
 PHY control register (byte) More...
 
#define ICP_PHYCTRL_MGMTCLK   0x01
 Management clock. More...
 
#define ICP_PHYCTRL_MGMTDATA   0x02
 Management data. More...
 
#define ICP_PHYCTRL_MGMTDIR   0x04
 Management direction. More...
 
#define ICP_PHYCTRL_LINKSPEED   0xc0
 Link speed. More...
 
#define ICP_RXMODE   0x88
 Receive mode register (word) More...
 
#define ICP_RXMODE_UNICAST   0x0001
 Receive unicast. More...
 
#define ICP_RXMODE_MULTICAST   0x0002
 Receice multicast. More...
 
#define ICP_RXMODE_BROADCAST   0x0004
 Receive broadcast. More...
 
#define ICP_RXMODE_ALLFRAMES   0x0008
 Receive all frames. More...
 
#define ICP_RFDLISTPTR   0x1c
 List pointer receive register. More...
 
#define ICP_TFDLISTPTR   0x10
 List pointer transmit register. More...
 
#define ICP_TXSTATUS   0x60
 Transmit status register. More...
 
#define ICP_TXSTATUS_ERROR   0x00000001UL
 TX error. More...
 
#define ICP_DONE   0x80
 Descriptor complete. More...
 
#define ICP_TX_UNALIGN   0x01
 Transmit alignment disabled. More...
 
#define ICP_TX_INDICATE   0x40
 Request transmit completion. More...
 
#define ICP_TX_SOLE_FRAG   0x01
 Sole transmit fragment. More...
 
#define ICP_RX_ERR_OVERRUN   0x01
 Recieve frame overrun error. More...
 
#define ICP_RX_ERR_RUNT   0x02
 Receive runt frame error. More...
 
#define ICP_RX_ERR_ALIGN   0x04
 Receive alignment error. More...
 
#define ICP_RX_ERR_FCS   0x08
 Receive FCS error. More...
 
#define ICP_RX_ERR_OVERSIZED   0x10
 Receive oversized frame error. More...
 
#define ICP_RX_ERR_LEN   0x20
 Recieve length error. More...
 
#define ICP_NUM_DESC   4
 Number of descriptors. More...
 
#define ICP_RX_MAX_LEN   ETH_FRAME_LEN
 Maximum receive packet length. More...
 

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 

Detailed Description

IC+ network driver.

Definition in file icplus.h.

Macro Definition Documentation

◆ ICP_BAR_SIZE

#define ICP_BAR_SIZE   0x200

BAR size.

Definition at line 16 of file icplus.h.

◆ ICP_ALIGN

#define ICP_ALIGN   0x8

Alignment requirement.

Definition at line 19 of file icplus.h.

◆ ICP_BASE_LO

#define ICP_BASE_LO   0x0

Base address low register offset.

Definition at line 22 of file icplus.h.

◆ ICP_BASE_HI

#define ICP_BASE_HI   0x4

Base address high register offset.

Definition at line 25 of file icplus.h.

◆ ICP_ASICCTRL

#define ICP_ASICCTRL   0x30

ASIC control register (double word)

Definition at line 28 of file icplus.h.

◆ ICP_ASICCTRL_PHYSPEED1000

#define ICP_ASICCTRL_PHYSPEED1000   0x00000040UL

PHY speed 1000.

Definition at line 29 of file icplus.h.

◆ ICP_ASICCTRL_GLOBALRESET

#define ICP_ASICCTRL_GLOBALRESET   0x00010000UL

Global reset.

Definition at line 30 of file icplus.h.

◆ ICP_ASICCTRL_DMA

#define ICP_ASICCTRL_DMA   0x00080000UL

DMA.

Definition at line 31 of file icplus.h.

◆ ICP_ASICCTRL_FIFO

#define ICP_ASICCTRL_FIFO   0x00100000UL

FIFO.

Definition at line 32 of file icplus.h.

◆ ICP_ASICCTRL_NETWORK

#define ICP_ASICCTRL_NETWORK   0x00200000UL

Network.

Definition at line 33 of file icplus.h.

◆ ICP_ASICCTRL_HOST

#define ICP_ASICCTRL_HOST   0x00400000UL

Host.

Definition at line 34 of file icplus.h.

◆ ICP_ASICCTRL_AUTOINIT

#define ICP_ASICCTRL_AUTOINIT   0x00800000UL

Auto init.

Definition at line 35 of file icplus.h.

◆ ICP_ASICCTRL_RESETBUSY

#define ICP_ASICCTRL_RESETBUSY   0x04000000UL

Reset busy.

Definition at line 36 of file icplus.h.

◆ ICP_RESET_MAX_WAIT_MS

#define ICP_RESET_MAX_WAIT_MS   1000

Maximum time to wait for reset.

Definition at line 39 of file icplus.h.

◆ ICP_DMACTRL

#define ICP_DMACTRL   0x00

DMA control register (word/double word)

Definition at line 42 of file icplus.h.

◆ ICP_DMACTRL_RXPOLLNOW

#define ICP_DMACTRL_RXPOLLNOW   0x0010

Receive poll now.

Definition at line 43 of file icplus.h.

◆ ICP_DMACTRL_TXPOLLNOW

#define ICP_DMACTRL_TXPOLLNOW   0x1000

Transmit poll now.

Definition at line 44 of file icplus.h.

◆ ICP_EEPROMCTRL

#define ICP_EEPROMCTRL   0x4a

EEPROM control register (word)

Definition at line 47 of file icplus.h.

◆ ICP_EEPROMCTRL_ADDRESS

#define ICP_EEPROMCTRL_ADDRESS (   x)    ( (x) << 0 )

Address.

Definition at line 48 of file icplus.h.

◆ ICP_EEPROMCTRL_OPCODE

#define ICP_EEPROMCTRL_OPCODE (   x)    ( (x) << 8 )

Opcode.

Definition at line 49 of file icplus.h.

◆ ICP_EEPROMCTRL_OPCODE_READ

#define ICP_EEPROMCTRL_OPCODE_READ   ICP_EEPROMCTRL_OPCODE ( 2 )

Read register.

Definition at line 50 of file icplus.h.

◆ ICP_EEPROMCTRL_BUSY

#define ICP_EEPROMCTRL_BUSY   0x8000

EEPROM busy.

Definition at line 52 of file icplus.h.

◆ ICP_EEPROM_MAX_WAIT_MS

#define ICP_EEPROM_MAX_WAIT_MS   1000

Maximum time to wait for reading EEPROM.

Definition at line 55 of file icplus.h.

◆ ICP_EEPROM_WORD_LEN_LOG2

#define ICP_EEPROM_WORD_LEN_LOG2   1

EEPROM word length.

Definition at line 58 of file icplus.h.

◆ ICP_EEPROM_MIN_SIZE_WORDS

#define ICP_EEPROM_MIN_SIZE_WORDS   0x20

Minimum EEPROM size, in words.

Definition at line 61 of file icplus.h.

◆ ICP_EEPROM_MAC

#define ICP_EEPROM_MAC   0x10

Address of MAC address within EEPROM.

Definition at line 64 of file icplus.h.

◆ ICP_EEPROMDATA

#define ICP_EEPROMDATA   0x48

EEPROM data register (word)

Definition at line 67 of file icplus.h.

◆ ICP_INTSTATUS

#define ICP_INTSTATUS   0x5e

Interupt status register (word)

Definition at line 70 of file icplus.h.

◆ ICP_INTSTATUS_TXCOMPLETE

#define ICP_INTSTATUS_TXCOMPLETE   0x0004

TX complete.

Definition at line 71 of file icplus.h.

◆ ICP_INTSTATUS_LINKEVENT

#define ICP_INTSTATUS_LINKEVENT   0x0100

Link event.

Definition at line 72 of file icplus.h.

◆ ICP_INTSTATUS_RXDMACOMPLETE

#define ICP_INTSTATUS_RXDMACOMPLETE   0x0400

RX DMA complete.

Definition at line 73 of file icplus.h.

◆ ICP_MACCTRL

#define ICP_MACCTRL   0x6c

MAC control register (double word)

Definition at line 76 of file icplus.h.

◆ ICP_MACCTRL_DUPLEX

#define ICP_MACCTRL_DUPLEX   0x00000020UL

Duplex select.

Definition at line 77 of file icplus.h.

◆ ICP_MACCTRL_TXENABLE

#define ICP_MACCTRL_TXENABLE   0x01000000UL

TX enable.

Definition at line 78 of file icplus.h.

◆ ICP_MACCTRL_TXDISABLE

#define ICP_MACCTRL_TXDISABLE   0x02000000UL

TX disable.

Definition at line 79 of file icplus.h.

◆ ICP_MACCTRL_RXENABLE

#define ICP_MACCTRL_RXENABLE   0x08000000UL

RX enable.

Definition at line 80 of file icplus.h.

◆ ICP_MACCTRL_RXDISABLE

#define ICP_MACCTRL_RXDISABLE   0x10000000UL

RX disable.

Definition at line 81 of file icplus.h.

◆ ICP_PHYCTRL

#define ICP_PHYCTRL   0x76

PHY control register (byte)

Definition at line 84 of file icplus.h.

◆ ICP_PHYCTRL_MGMTCLK

#define ICP_PHYCTRL_MGMTCLK   0x01

Management clock.

Definition at line 85 of file icplus.h.

◆ ICP_PHYCTRL_MGMTDATA

#define ICP_PHYCTRL_MGMTDATA   0x02

Management data.

Definition at line 86 of file icplus.h.

◆ ICP_PHYCTRL_MGMTDIR

#define ICP_PHYCTRL_MGMTDIR   0x04

Management direction.

Definition at line 87 of file icplus.h.

◆ ICP_PHYCTRL_LINKSPEED

#define ICP_PHYCTRL_LINKSPEED   0xc0

Link speed.

Definition at line 88 of file icplus.h.

◆ ICP_RXMODE

#define ICP_RXMODE   0x88

Receive mode register (word)

Definition at line 91 of file icplus.h.

◆ ICP_RXMODE_UNICAST

#define ICP_RXMODE_UNICAST   0x0001

Receive unicast.

Definition at line 92 of file icplus.h.

◆ ICP_RXMODE_MULTICAST

#define ICP_RXMODE_MULTICAST   0x0002

Receice multicast.

Definition at line 93 of file icplus.h.

◆ ICP_RXMODE_BROADCAST

#define ICP_RXMODE_BROADCAST   0x0004

Receive broadcast.

Definition at line 94 of file icplus.h.

◆ ICP_RXMODE_ALLFRAMES

#define ICP_RXMODE_ALLFRAMES   0x0008

Receive all frames.

Definition at line 95 of file icplus.h.

◆ ICP_RFDLISTPTR

#define ICP_RFDLISTPTR   0x1c

List pointer receive register.

Definition at line 98 of file icplus.h.

◆ ICP_TFDLISTPTR

#define ICP_TFDLISTPTR   0x10

List pointer transmit register.

Definition at line 101 of file icplus.h.

◆ ICP_TXSTATUS

#define ICP_TXSTATUS   0x60

Transmit status register.

Definition at line 104 of file icplus.h.

◆ ICP_TXSTATUS_ERROR

#define ICP_TXSTATUS_ERROR   0x00000001UL

TX error.

Definition at line 105 of file icplus.h.

◆ ICP_DONE

#define ICP_DONE   0x80

Descriptor complete.

Definition at line 141 of file icplus.h.

◆ ICP_TX_UNALIGN

#define ICP_TX_UNALIGN   0x01

Transmit alignment disabled.

Definition at line 144 of file icplus.h.

◆ ICP_TX_INDICATE

#define ICP_TX_INDICATE   0x40

Request transmit completion.

Definition at line 147 of file icplus.h.

◆ ICP_TX_SOLE_FRAG

#define ICP_TX_SOLE_FRAG   0x01

Sole transmit fragment.

Definition at line 150 of file icplus.h.

◆ ICP_RX_ERR_OVERRUN

#define ICP_RX_ERR_OVERRUN   0x01

Recieve frame overrun error.

Definition at line 153 of file icplus.h.

◆ ICP_RX_ERR_RUNT

#define ICP_RX_ERR_RUNT   0x02

Receive runt frame error.

Definition at line 156 of file icplus.h.

◆ ICP_RX_ERR_ALIGN

#define ICP_RX_ERR_ALIGN   0x04

Receive alignment error.

Definition at line 159 of file icplus.h.

◆ ICP_RX_ERR_FCS

#define ICP_RX_ERR_FCS   0x08

Receive FCS error.

Definition at line 162 of file icplus.h.

◆ ICP_RX_ERR_OVERSIZED

#define ICP_RX_ERR_OVERSIZED   0x10

Receive oversized frame error.

Definition at line 165 of file icplus.h.

◆ ICP_RX_ERR_LEN

#define ICP_RX_ERR_LEN   0x20

Recieve length error.

Definition at line 168 of file icplus.h.

◆ ICP_NUM_DESC

#define ICP_NUM_DESC   4

Number of descriptors.

Definition at line 183 of file icplus.h.

◆ ICP_RX_MAX_LEN

#define ICP_RX_MAX_LEN   ETH_FRAME_LEN

Maximum receive packet length.

Definition at line 186 of file icplus.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )