Skip to content

E1000 driver in Rust for the Intel 82540EP/EM Gigabit Ethernet.

License

Notifications You must be signed in to change notification settings

Tunghohin/e1000-driver

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

E1000 Driver

E1000 driver in Rust for the Intel 82540EP/EM and 82574L Gigabit Ethernet.

Support features

  • e1000 and e1000e driver for RISCV and x86_64 on Qemu is supported
  • Initialize simple PCI-Express for e1000 device
  • Implement the e1000 driver as a linux driver module
  • Todo: networking protocol support: IP, ARP, UDP

Quick start on bare metal OS

Initialize PCI and E1000 driver

pub struct Kernfn;
impl e1000_driver::e1000::KernelFunc for Kernfn { ... }

e1000_driver::pci::pci_init();

let mut e1000_device = e1000_driver::e1000::E1000Device::<Kernfn>::new(e1000_driver::pci::E1000_REGS as usize).unwrap();

Sending network packets

e1000_device.e1000_transmit(&frame);

Receiving network packets

let rx_buf = e1000_device.e1000_recv();

Rust e1000 driver for Linux kernel module

cd src/linux
make ARCH=<cpu arch> KDIR=<path to linux>
# e.g. make ARCH=x86_64 KDIR=/home/rust/linux/build

Reference

About

E1000 driver in Rust for the Intel 82540EP/EM Gigabit Ethernet.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 99.0%
  • Other 1.0%