Classes | Functions

julian/host/hostne2k_vnet.cc File Reference

#include "nul/motherboard.h"
#include "host/hostpci.h"
#include "../model/simplenet.h"
#include "host/simplehwioin.h"
#include "host/simplehwioout.h"

Classes

class  HostNe2kVnet
 Host ne2k driver. More...
class  HostNe2kVnet::TxDone

Functions

 PARAM (hostne2k_vnet,{HostPci pci(mb.bus_hwpcicfg, mb.bus_hostop);for(unsigned bdf, num=0;bdf=pci.search_device(0x2, 0x0, num++);) if(pci.conf_read(bdf, 0)==0x802910ec){unsigned port=pci.conf_read(bdf, HostPci::BAR0);if((port &3)!=1||(port >> 16)) continue;port &=~3;unsigned irq=pci.get_gsi(mb.bus_hostop, mb.bus_acpi, bdf, 0);Logging::printf("bdf %x id %x port %x irq %x\n", bdf, pci.conf_read(bdf, 0), port, irq);MessageHostOp msg_io(MessageHostOp::OP_ALLOC_IOIO_REGION, port<< 8|5);if(!mb.bus_hostop.send(msg_io)){Logging::printf("%s could not allocate ioports %x-%x\n", __PRETTY_FUNCTION__, port, port+(1<< 5)-1);continue;}HostNe2kVnet *dev=new HostNe2kVnet(mb.bus_vnet, mb.bus_hwioin, mb.bus_hwioout, mb.clock(), port, irq);mb.bus_hostirq.add(dev, HostNe2kVnet::receive_static< MessageIrq >);mb.bus_vnetping.add(dev, HostNe2kVnet::receive_static< MessageVirtualNetPing >);}},"hostne2k_vnet - provide ne2k-pci drivers.","Example: hostne2k.")

Function Documentation

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