intel e1000 ethernet controller driver
play

Intel e1000 Ethernet Controller Driver Intel e1000 controller - PowerPoint PPT Presentation

Intel e1000 Ethernet Controller Driver Ivan D elalande Introduction PCI Intel e1000 Ethernet Controller Driver Intel e1000 controller Conclusion Ivan D elalande colona@lse.epita.fr http://lse.epita.fr February 12, 2013 . . . . . .


  1. Intel e1000 Ethernet Controller Driver Ivan D elalande Introduction PCI Intel e1000 Ethernet Controller Driver Intel e1000 controller Conclusion Ivan D elalande colona@lse.epita.fr http://lse.epita.fr February 12, 2013 . . . . . . . . . . . . . . . . . . . . .. . . .. . .. . .. . .. . . .. . .. . .. .. . . .. . .. .. . . .. . .. .. . .. . .. . .. . .. . .. .

  2. Plan Intel e1000 Ethernet Controller Driver Ivan D elalande . . Introduction Introduction 1 PCI Intel e1000 controller . . PCI 2 Conclusion . . Intel e1000 controller 3 . . Conclusion 4 . . . . . . . . . . . . . . . . . . . . .. . . . .. . .. . .. . .. .. . .. . .. . .. . .. . .. . . .. . .. . .. .. . .. . .. . .. . .. . .. .

  3. Plan Intel e1000 Ethernet Controller Driver Ivan D elalande Introduction PCI Intel e1000 . . Introduction 1 controller Conclusion . . . . . . . . . . . . . . . . . . . . . . .. . .. . .. . .. . .. . .. .. . . .. .. . . .. . .. . .. . .. . .. .. . .. . .. . .. . .. . .. .

  4. Motivation Intel e1000 Ethernet Controller Driver Ivan D elalande Introduction PCI Intel e1000 controller Conclusion Write a network stack for STOS. Handle data link, network and transport layers. Provide network syscalls: socket , listen , connect . . . . . . . . . . . . . . . . . . . . . . . .. . . .. . .. . .. . .. . . .. . .. . .. .. . . .. . .. .. . . .. . .. .. . .. . .. . .. . .. . .. .

  5. Plan Intel e1000 Ethernet Controller Driver Ivan D elalande Introduction PCI Intel e1000 . . PCI 2 controller Conclusion . . . . . . . . . . . . . . . . . . . . . . .. . .. . .. . .. . .. . .. .. . . .. .. . . .. . .. . .. . .. . .. .. . .. . .. . .. . .. . .. .

  6. PCI Intel e1000 Ethernet Controller Driver Ivan D elalande Introduction PCI PCI: Peripheral Component Interconnect, Intel e1000 Bus to connect devices to the system. controller Conclusion Hierarchical device organization: Bus, Device, Function, Register. . . . . . . . . . . . . . . . . . . . . .. . . .. . .. . . .. . .. .. . .. . . .. .. . . .. . .. . .. .. . . .. .. . .. . .. . .. . .. . .. .

  7. Device Discovery Intel e1000 Ethernet Controller Driver Ivan D elalande Introduction PCI Intel e1000 Bus scan to find the location of the device, controller Devices identified by their Vendor ID and Device ID Conclusion eg: 0x8086 ; 0x100E . . . . . . . . . . . . . . . . . . . . .. . . .. . . .. . .. . .. . .. .. . . .. .. . . .. . .. . .. . .. .. . .. . .. . .. . .. . .. . .. .

  8. Device Structure Intel e1000 Ethernet Controller Driver Ivan D elalande Introduction PCI Various useful information. Intel e1000 controller Command register (bus master, address spaces, Conclusion interrupt disable. . . ), BAR: base address registers, I / O address space, Memory address space. . . . . . . . . . . . . . . . . . . . . . .. . . .. .. . . .. . .. . .. .. . .. . . .. .. . . .. . .. . .. . .. .. . .. . .. . .. . .. . .. .

  9. Communication with the device Intel e1000 Ethernet Controller Driver Ivan D elalande Memory-mapped I / O Introduction Allow addressing devices’ memory or registers as a chunk of the system memory. PCI Intel e1000 controller DMA: Direct Memory Access Conclusion Memory operations without the direct intervention of the CPU, Devices that master the PCI bus can initiate memory transfer by themselves. PCI Interrupts Four interrupt lines shared by all PCI devices. . . . . . . . . . . . . . . . . . . . . . .. . .. . . .. .. . .. . .. . .. . .. . .. . .. . . .. . .. . .. .. . .. . .. . .. . .. . .. . .. .

  10. Plan Intel e1000 Ethernet Controller Driver Ivan D elalande Introduction PCI Intel e1000 . . Intel e1000 controller 3 controller Conclusion . . . . . . . . . . . . . . . . . . . . . . .. . .. . .. . .. . .. . .. .. . . .. .. . . .. . .. . .. . .. . .. .. . .. . .. . .. . .. . .. .

  11. Presentation Intel e1000 Ethernet Controller Driver Ivan D elalande Common gigabit ethernet controller by Intel with a Introduction (pretty) good documentation, PCI Intel e1000 Provide (too) many feature to reduce kernel’s work: controller Link auto-negocitation, Conclusion Filters IP addresses, Compute IP packets’ checksum, Tries to limit the number of interrupts, Provide e ff ective shutdown method (a.k.a. Packet of Death). . . Full customization of LEDs’ blinking! . . . . . . . . . . . . . . . . . . . . . .. . .. . . .. .. . .. . .. . .. . .. . .. . .. . . .. . .. . .. .. . .. . .. . .. . .. . .. . .. .

  12. PCI Configuration Intel e1000 Ethernet Controller Driver Ivan D elalande Introduction PCI Intel e1000 Set the bus master bit to allow DMA from the controller controller, Conclusion Retrieve the base address of the configuration register. . . . . . . . . . . . . . . . . . . . . .. . . .. . .. . .. . .. . . .. . .. . .. .. . . .. . .. .. . . .. . .. .. . .. . .. . .. . .. . .. .

  13. Controller Initialization Intel e1000 Ethernet Controller Driver Ivan D elalande Introduction PCI Set configuration registers to appropriate values: Intel e1000 MAC address, transmission modes. . . controller Conclusion Find the proper way to read the EEPROM to get various information (MAC address, . . . ), Allocate memory for network frames transmission and reception. . . . . . . . . . . . . . . . . . . . . . .. . . .. .. . . .. . .. . .. .. . .. . . .. .. . . .. . .. . .. . .. .. . .. . .. . .. . .. . .. .

  14. Frame transmission and reception Intel e1000 Ethernet Controller Driver Ivan D elalande Introduction PCI Intel e1000 controller Conclusion Two descriptor ring structures that point to frame bu ff ers, Software moves Descriptor Tail and hardware moves Descriptor Head . Signaling from the controller via PCI interrupts. . . . . . . . . . . . . . . . . . . . . . . .. . .. . .. .. . .. . .. . .. . . .. . .. .. . .. . .. . .. . .. . .. . .. . .. . .. . .. . .. .

  15. Plan Intel e1000 Ethernet Controller Driver Ivan D elalande Introduction PCI Intel e1000 . . Conclusion 4 controller Conclusion . . . . . . . . . . . . . . . . . . . . . . .. . .. . .. . .. . .. . .. .. . . .. .. . . .. . .. . .. . .. . .. .. . .. . .. . .. . .. . .. .

  16. Next steps Intel e1000 Ethernet Controller Driver Ivan D elalande Introduction PCI Intel e1000 Process and verify the frames: check of the header, controller collisions detection. . . Conclusion Proceed with the remaining layers of the network stack: network and transport. . . . . . . . . . . . . . . . . . . . . .. . . .. . .. . .. . .. . . .. . .. . .. .. . . .. . .. .. . . .. . .. .. . .. . .. . .. . .. . .. .

  17. Questions? Intel e1000 Ethernet Controller Driver Ivan D elalande Introduction PCI Intel e1000 controller Conclusion . . . . . . . . . . . . . . . . . . . . .. . . .. . . .. .. . . .. . .. . .. . .. .. . .. . .. . .. . .. . . .. .. . .. . .. . .. . .. . .. .

Recommend


More recommend