coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
i210.h File Reference
#include <types.h>
#include <device/device.h>
Include dependency graph for i210.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define I210_PCI_MEM_BAR_OFFSET   0x10
 
#define I210_REG_EECTRL   0x12010 /* Offset for EEPROM control reg */
 
#define I210_FLUPD   0x800000 /* Start flash update bit */
 
#define I210_FLUDONE   0x4000000 /* Flash update done indicator */
 
#define I210_REG_EEREAD   0x12014 /* Offset for EEPROM read reg */
 
#define I210_REG_EEWRITE   0x12018 /* Offset for EEPROM write reg */
 
#define I210_CMDV   0x01 /* command valid bit */
 
#define I210_DONE   0x02 /* command done bit */
 
#define I210_TARGET_CHECKSUM   0xBABA /* resulting checksum */
 
#define I210_POLL_TIMEOUT_US   300000 /* 300 ms */
 
#define I210_SUCCESS   0x00000000
 
#define I210_INVALID_PARAM   0x00000001
 
#define I210_NOT_READY   0x00000002
 
#define I210_READ_ERROR   0x00000004
 
#define I210_WRITE_ERROR   0x00000008
 
#define I210_CHECKSUM_ERROR   0x00000010
 
#define I210_FLASH_UPDATE_ERROR   0x00000020
 
#define MAC_ADDR_LEN   6
 

Functions

enum cb_err mainboard_get_mac_address (struct device *dev, uint8_t mac[MAC_ADDR_LEN])
 This function will search for a MAC address which can be assigned to a MACPHY. More...
 

Macro Definition Documentation

◆ I210_CHECKSUM_ERROR

#define I210_CHECKSUM_ERROR   0x00000010

Definition at line 27 of file i210.h.

◆ I210_CMDV

#define I210_CMDV   0x01 /* command valid bit */

Definition at line 15 of file i210.h.

◆ I210_DONE

#define I210_DONE   0x02 /* command done bit */

Definition at line 16 of file i210.h.

◆ I210_FLASH_UPDATE_ERROR

#define I210_FLASH_UPDATE_ERROR   0x00000020

Definition at line 28 of file i210.h.

◆ I210_FLUDONE

#define I210_FLUDONE   0x4000000 /* Flash update done indicator */

Definition at line 12 of file i210.h.

◆ I210_FLUPD

#define I210_FLUPD   0x800000 /* Start flash update bit */

Definition at line 11 of file i210.h.

◆ I210_INVALID_PARAM

#define I210_INVALID_PARAM   0x00000001

Definition at line 23 of file i210.h.

◆ I210_NOT_READY

#define I210_NOT_READY   0x00000002

Definition at line 24 of file i210.h.

◆ I210_PCI_MEM_BAR_OFFSET

#define I210_PCI_MEM_BAR_OFFSET   0x10

Definition at line 9 of file i210.h.

◆ I210_POLL_TIMEOUT_US

#define I210_POLL_TIMEOUT_US   300000 /* 300 ms */

Definition at line 20 of file i210.h.

◆ I210_READ_ERROR

#define I210_READ_ERROR   0x00000004

Definition at line 25 of file i210.h.

◆ I210_REG_EECTRL

#define I210_REG_EECTRL   0x12010 /* Offset for EEPROM control reg */

Definition at line 10 of file i210.h.

◆ I210_REG_EEREAD

#define I210_REG_EEREAD   0x12014 /* Offset for EEPROM read reg */

Definition at line 13 of file i210.h.

◆ I210_REG_EEWRITE

#define I210_REG_EEWRITE   0x12018 /* Offset for EEPROM write reg */

Definition at line 14 of file i210.h.

◆ I210_SUCCESS

#define I210_SUCCESS   0x00000000

Definition at line 22 of file i210.h.

◆ I210_TARGET_CHECKSUM

#define I210_TARGET_CHECKSUM   0xBABA /* resulting checksum */

Definition at line 17 of file i210.h.

◆ I210_WRITE_ERROR

#define I210_WRITE_ERROR   0x00000008

Definition at line 26 of file i210.h.

◆ MAC_ADDR_LEN

#define MAC_ADDR_LEN   6

Definition at line 30 of file i210.h.

Function Documentation

◆ mainboard_get_mac_address()

enum cb_err mainboard_get_mac_address ( struct device dev,
uint8_t  mac[MAC_ADDR_LEN] 
)

This function will search for a MAC address which can be assigned to a MACPHY.

Parameters
devpointer to PCI device
macbuffer where to store the MAC address
Returns
cb_err CB_ERR or CB_SUCCESS

Definition at line 39 of file mainboard.c.

Referenced by init().

Here is the caller graph for this function: