coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
i210.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #ifndef _INTEL_I210_H_
4 #define _INTEL_I210_H_
5 
6 #include <types.h>
7 #include <device/device.h>
8 
9 #define I210_PCI_MEM_BAR_OFFSET 0x10
10 #define I210_REG_EECTRL 0x12010 /* Offset for EEPROM control reg */
11 #define I210_FLUPD 0x800000 /* Start flash update bit */
12 #define I210_FLUDONE 0x4000000 /* Flash update done indicator */
13 #define I210_REG_EEREAD 0x12014 /* Offset for EEPROM read reg */
14 #define I210_REG_EEWRITE 0x12018 /* Offset for EEPROM write reg */
15 #define I210_CMDV 0x01 /* command valid bit */
16 #define I210_DONE 0x02 /* command done bit */
17 #define I210_TARGET_CHECKSUM 0xBABA /* resulting checksum */
18 
19 /*define some other useful values here */
20 #define I210_POLL_TIMEOUT_US 300000 /* 300 ms */
21 /*Define some error states here*/
22 #define I210_SUCCESS 0x00000000
23 #define I210_INVALID_PARAM 0x00000001
24 #define I210_NOT_READY 0x00000002
25 #define I210_READ_ERROR 0x00000004
26 #define I210_WRITE_ERROR 0x00000008
27 #define I210_CHECKSUM_ERROR 0x00000010
28 #define I210_FLASH_UPDATE_ERROR 0x00000020
29 
30 #define MAC_ADDR_LEN 6
31 
32 /* We need one function we can call to get a MAC address to use */
33 /* This function can be coded somewhere else but must exist. */
34 extern enum cb_err mainboard_get_mac_address(struct device *dev, uint8_t mac[MAC_ADDR_LEN]);
35 
36 #endif /* _INTEL_I210_H_ */
cb_err
coreboot error codes
Definition: cb_err.h:15
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.
Definition: mainboard.c:56
#define MAC_ADDR_LEN
Definition: i210.h:30
unsigned char uint8_t
Definition: stdint.h:8
Definition: device.h:107