Classes | Typedefs | Enumerations | Functions

julian/host/host82573.cc File Reference

#include <nul/types.h>
#include <nul/motherboard.h>
#include <host/hostpci.h>
#include <host/jsdriver.h>
#include <service/net.h>
#include "host82573_regs.h"

Classes

struct  NICInfo
struct  DmaDesc
class  Host82573

Typedefs

typedef uint8 PacketBuffer [2048]

Enumerations

enum  NICType { INTEL_82540EM, INTEL_82573L, INTEL_82577, INTEL_82578 }
 

Host Intel 82573L driver (probably works for other devices, too).

More...
enum  Features {
  ADVANCED_QUEUE = 1U<<1, NO_LINK_UP = 1U<<2, MASTER_DISABLE = 1U<<3, PHY_RESET = 1U<<4,
  HAS_EERD = 1U<<5
}

Functions

 PARAM (host82573,{HostPci pci(mb.bus_hwpcicfg, mb.bus_hostop);unsigned found=0;for(unsigned bdf, num=0;(bdf=pci.search_device(0x2, 0x0, num++));){unsigned cfg0=pci.conf_read(bdf, 0x0);if((cfg0 &0xFFFF)!=0x8086) continue;unsigned i;for(i=0;i< (sizeof(intel_nics)/sizeof(NICInfo));i++){if((cfg0 >>16==intel_nics[i].devid)&&(found++==argv[0])){Host82573 *dev=new Host82573(argv[1], pci, mb.bus_hostop, mb.bus_acpi, mb.clock(), bdf, intel_nics[i]);mb.bus_hostirq.add(dev,&Host82573::receive_static< MessageIrq >);}}}},"host82573:instance,vnet - provide driver for Intel 82573L Ethernet controller.","Example: 'host82573:0")

Typedef Documentation

typedef uint8 PacketBuffer[2048]

Enumeration Type Documentation

enum Features
Enumerator:
ADVANCED_QUEUE 
NO_LINK_UP 
MASTER_DISABLE 
PHY_RESET 
HAS_EERD 
enum NICType

Host Intel 82573L driver (probably works for other devices, too).

Copyright (C) 2010-2011, Julian Stecklina <jsteckli@os.inf.tu-dresden.de> Economic rights: Technische Universitaet Dresden (Germany)

This file is part of NUL.

NUL is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

NUL is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License version 2 for more details.

Enumerator:
INTEL_82540EM 
INTEL_82573L 
INTEL_82577 
INTEL_82578 

Function Documentation

PARAM ( host82573   ) 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines