coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <cbfs.h>
#include <acpi/acpi_device.h>
#include <acpi/acpigen.h>
#include <string.h>
#include <arch/io.h>
#include <console/console.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ops.h>
#include <device/pci_def.h>
#include <device/pci_ids.h>
#include <delay.h>
#include <fmap.h>
#include <types.h>
#include "chip.h"
Go to the source code of this file.
Macros | |
#define | NIC_TIMEOUT 1000 |
#define | CMD_REG 0x37 |
#define | CMD_REG_RESET 0x10 |
#define | CMD_LED0_LED1 0x18 |
#define | CMD_LED_FEATURE 0x94 |
#define | CMD_LEDSEL0 0x18 |
#define | CMD_LEDSEL2 0x84 |
#define | CFG_9346 0x50 |
#define | CFG_9346_LOCK 0x00 |
#define | CFG_9346_UNLOCK 0xc0 |
#define | CMD_REG_ASPM 0xb0 |
#define | ASPM_L1_2_MASK 0xe059000f |
#define | DEVICE_INDEX_BYTE 12 |
#define | MAX_DEVICE_SUPPORT 10 |
#define | MACLEN 17 |
Functions | |
static size_t | search (const char *p, const u8 *a, size_t lengthp, size_t lengtha) |
search: Find first instance of string in a given region More... | |
static u8 | get_hex_digit (const u8 c) |
static enum cb_err | fetch_mac_vpd_key (u8 *macstrbuf, const char *vpd_key) |
static enum cb_err | fetch_mac_vpd_dev_idx (u8 *macstrbuf, u8 device_index) |
static void | fetch_mac_string_vpd (struct drivers_net_config *config, u8 *macstrbuf) |
static enum cb_err | fetch_mac_string_cbfs (u8 *macstrbuf) |
static void | get_mac_address (u8 *macaddr, const u8 *strbuf) |
static void | program_mac_address (struct device *dev, u16 io_base) |
static void | enable_aspm_l1_2 (u16 io_base) |
static void | r8168_set_customized_led (struct device *dev, u16 io_base) |
static void | r8168_init (struct device *dev) |
Variables | |
static struct device_operations | r8168_ops |
static const unsigned short | pci_device_ids [] |
static const struct pci_driver r8168_driver | __pci_driver |
struct chip_operations | drivers_net_ops |
Definition at line 249 of file r8168.c.
References ASPM_L1_2_MASK, BIOS_INFO, CFG_9346, CFG_9346_LOCK, CFG_9346_UNLOCK, CMD_REG_ASPM, outb(), outl(), and printk.
Referenced by r8168_init().
Definition at line 146 of file r8168.c.
References BIOS_ERR, CB_SUCCESS, config, CONFIG, fetch_mac_vpd_dev_idx(), fetch_mac_vpd_key(), MAX_DEVICE_SUPPORT, and printk.
Referenced by program_mac_address().
|
static |
Definition at line 146 of file r8168.c.
Referenced by program_mac_address().
Definition at line 70 of file r8168.c.
Referenced by fetch_mac_string_cbfs().
Definition at line 70 of file r8168.c.
Referenced by get_mac_address().
Definition at line 181 of file r8168.c.
References BIOS_ERR, get_hex_digit(), offset, and printk.
Referenced by program_mac_address().
Definition at line 201 of file r8168.c.
References BIOS_DEBUG, BIOS_ERR, CB_SUCCESS, CFG_9346, CFG_9346_LOCK, CFG_9346_UNLOCK, device::chip_info, CMD_REG, CMD_REG_RESET, config, CONFIG, fetch_mac_string_cbfs(), fetch_mac_string_vpd(), get_mac_address(), inb(), inl(), MACLEN, NIC_TIMEOUT, outb(), outl(), printk, and udelay().
Referenced by r8168_init().
Definition at line 335 of file r8168.c.
References resource::base, BIOS_ERR, device::chip_info, config, CONFIG, enable_aspm_l1_2(), find_resource(), PCI_BASE_ADDRESS_0, PCI_COMMAND, PCI_COMMAND_IO, PCI_COMMAND_MEMORY, pci_write_config16(), printk, program_mac_address(), and r8168_set_customized_led().
Definition at line 263 of file r8168.c.
References BIOS_DEBUG, device::chip_info, CMD_LED0_LED1, CMD_LED_FEATURE, CMD_LEDSEL0, CMD_LEDSEL2, config, device::device, inb(), inw(), outb(), outw(), PCI_DID_REALTEK_8125, and printk.
Referenced by r8168_init().
search: Find first instance of string in a given region
p | string to find |
a | start address of region to search |
lengthp | length of string to search for |
lengtha | length of region to search in |
Definition at line 53 of file r8168.c.
Referenced by search_bus_resources(), and search_global_resources().
|
static |
struct chip_operations drivers_net_ops |
|
static |
|
static |