coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <arch/io.h>
#include <console/ne2k.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ops.h>
#include <ip_checksum.h>
#include "ns8390.h"
Go to the source code of this file.
Macros | |
#define | ETH_ALEN 6 /* Size of Ethernet address */ |
#define | ETH_HLEN 14 /* Size of ethernet header */ |
#define | ETH_ZLEN 60 /* Minimum packet */ |
#define | ETH_FRAME_LEN 1514 /* Maximum packet */ |
#define | ETH_DATA_ALIGN 2 /* Amount needed to align the data after an ethernet header */ |
#define | ETH_MAX_MTU (ETH_FRAME_LEN-ETH_HLEN) |
#define | MEM_SIZE MEM_32768 |
#define | TX_START 64 |
#define | RX_START (64 + D8390_TXBUF_SIZE) |
Functions | |
static unsigned int | get_count (unsigned int eth_nic_base) |
static void | set_count (unsigned int eth_nic_base, unsigned int what) |
static void | eth_pio_write (unsigned char *src, unsigned int dst, unsigned int cnt, unsigned int eth_nic_base) |
void | ne2k_append_data (unsigned char *d, int len, unsigned int base) |
static void | str2ip (const char *str, unsigned char *ip) |
static void | str2mac (const char *str, unsigned char *mac) |
static void | ns8390_tx_header (unsigned int eth_nic_base, int pktlen) |
void | ne2k_transmit (unsigned int eth_nic_base) |
static void | ns8390_reset (unsigned int eth_nic_base) |
int | ne2k_init (unsigned int eth_nic_base) |
static void | read_resources (struct device *dev) |
Variables | |
static struct device_operations | ne2k_ops |
static const struct pci_driver ne2k_driver | __pci_driver |
#define ETH_DATA_ALIGN 2 /* Amount needed to align the data after an ethernet header */ |
#define ETH_MAX_MTU (ETH_FRAME_LEN-ETH_HLEN) |
#define RX_START (64 + D8390_TXBUF_SIZE) |
|
static |
Definition at line 75 of file ne2k.c.
References D8390_COMMAND_RD1, D8390_COMMAND_RD2, D8390_COMMAND_STA, D8390_ISR_RDC, D8390_P0_COMMAND, D8390_P0_ISR, D8390_P0_RBCR0, D8390_P0_RBCR1, D8390_P0_RSAR0, D8390_P0_RSAR1, inb(), NE_ASIC_OFFSET, NE_DATA, and outb().
Referenced by ne2k_append_data(), and ns8390_tx_header().
Definition at line 50 of file ne2k.c.
References D8390_COMMAND_PS0, D8390_COMMAND_PS1, D8390_COMMAND_RD2, D8390_P0_COMMAND, inb(), and outb().
Referenced by ne2k_append_data(), and ne2k_transmit().
Definition at line 97 of file ne2k.c.
References base, eth_pio_write(), get_count(), set_count(), and TX_START.
int ne2k_init | ( | unsigned int | eth_nic_base | ) |
Definition at line 264 of file ne2k.c.
References c, D8390_COMMAND_RD2, D8390_COMMAND_STP, D8390_DCR_FT1, D8390_DCR_LS, D8390_P0_COMMAND, D8390_P0_DCR, D8390_P0_PSTART, D8390_P0_PSTOP, D8390_P0_RCR, D8390_RCR_MON, ENV_ROMSTAGE, inb(), MEM_16384, MEM_8192, NE_ASIC_OFFSET, NE_RESET, ns8390_reset(), outb(), PCI_DEV_INVALID, PCI_ID, pci_locate_device(), pci_s_write_config32(), pci_s_write_config8(), and void().
Definition at line 195 of file ne2k.c.
References D8390_COMMAND_PS0, D8390_COMMAND_RD2, D8390_COMMAND_STA, D8390_COMMAND_TXP, D8390_ISR_PTX, D8390_P0_COMMAND, D8390_P0_ISR, D8390_P0_TBCR0, D8390_P0_TBCR1, D8390_P0_TPSR, get_count(), inb(), ns8390_tx_header(), outb(), set_count(), and TX_START.
Definition at line 225 of file ne2k.c.
References D8390_COMMAND_PS0, D8390_COMMAND_PS1, D8390_COMMAND_RD2, D8390_COMMAND_STA, D8390_COMMAND_STP, D8390_P0_BOUND, D8390_P0_COMMAND, D8390_P0_DCR, D8390_P0_IMR, D8390_P0_ISR, D8390_P0_PSTART, D8390_P0_PSTOP, D8390_P0_RBCR0, D8390_P0_RBCR1, D8390_P0_RCR, D8390_P0_TCR, D8390_P0_TPSR, D8390_P1_CURR, D8390_P1_MAR0, D8390_P1_PAR0, ETH_ALEN, MEM_SIZE, outb(), RX_START, set_count(), and TX_START.
Referenced by ne2k_init().
Definition at line 147 of file ne2k.c.
References compute_ip_checksum(), eth_pio_write(), str2ip(), str2mac(), and TX_START.
Referenced by ne2k_transmit().
Definition at line 63 of file ne2k.c.
References D8390_COMMAND_PS0, D8390_COMMAND_PS1, D8390_COMMAND_RD2, D8390_P0_COMMAND, and outb().
Referenced by ne2k_append_data(), ne2k_transmit(), and ns8390_reset().
Definition at line 103 of file ne2k.c.
References c.
Referenced by ns8390_tx_header().
Definition at line 121 of file ne2k.c.
References c.
Referenced by ns8390_tx_header().
|
static |
|
static |