DRV-220 · Device Drivers · Advanced
PCI & PCIe Drivers — full syllabus
Enumeration, BARs, MSI-X and DMA for PCIe devices, which is where most accelerator drivers live.
Who this course is for
Driver engineers working on PCIe devices — accelerators, FPGAs, NICs — who need enumeration, MSI-X and DMA set up correctly, and recovery paths that work when the device misbehaves.
Prerequisites
- DRV-110 level device-model knowledge
- C and kernel module build experience
- ARC-210 (PCIe interconnects) or equivalent platform knowledge recommended
Course outline
Day 1 — Discovery and probe
- Enumeration, BDF addressing and the PCIe topology
- Configuration space, capabilities and extended capabilities
- pci_driver, pci_device_id and the probe sequence
- pci_enable_device, region claiming and BAR sizing
- Reading lspci -vv and setpci output precisely
Day 2 — MMIO done correctly
- Mapping BARs with pcim_iomap_regions and pci_iomap
- ioread32/iowrite32 and their ordering guarantees
- Write posting, flush reads and the bugs they hide
- Memory barriers for device access: wmb/rmb and mmiowb
- 64-bit BARs and the pitfalls of split register access
Day 3 — Interrupts and DMA setup
- Legacy INTx vs MSI vs MSI-X and what each costs
- pci_alloc_irq_vectors and per-vector affinity
- DMA addressing: dma_set_mask_and_coherent and why 64-bit matters
- Coherent allocations with dma_alloc_coherent
- Building a descriptor ring the device can walk
Day 4 — Robustness and advanced features
- AER: the error handler callbacks and what recovery means
- Function-level reset and secondary bus reset
- SR-IOV: enabling VFs and the PF/VF driver split
- Safe unload under traffic: quiesce, mask, drain, free
- Hotplug and surprise-removal behaviour
Hands-on labs
- Lab: Walk a PCIe device's config space with lspci -xxxx and match every capability to the driver path that consumes it
- Lab: Write a probe that claims BARs, maps MMIO and reads a device ID register from real or emulated hardware
- Lab: Allocate MSI-X vectors, steer their affinity and prove the spread in /proc/interrupts
- Lab: Implement a coherent DMA ring exchange and verify data lands intact in both directions
- Lab: Exercise the recovery path: trigger an FLR (or observe an AER report) and walk error_detected through slot_resume
Capstone project
Deliver a PCI driver skeleton for an emulated or FPGA device: probe with capability discovery, BAR mapping, MSI-X with steered affinity, a coherent DMA ring, and the AER/FLR recovery callbacks — with an evidence pack of annotated lspci output, /proc/interrupts proof of vector spread, a DMA correctness test and a recovery log from a forced reset.
What you leave with
- A complete PCIe driver skeleton you understand end to end
- Correct MMIO access and ordering habits
- MSI-X allocation and affinity steering proven with interrupts data
- Coherent DMA setup for device communication
- Error-recovery structure (AER/FLR) that works before you need it
Upcoming dates
| Dates | Where | Seats | Early bird | Regular | |
|---|---|---|---|---|---|
| 1 Nov – 4 Nov 20264 full days | RiyadhIn person · KAFD Conference Centre | 8 of 14 | — | SAR 12,000 | |
| 8 Nov – 11 Nov 20264 full days | Kuwait CityIn person · Al Hamra Tower | 3 of 14 | KWD 890until 9 Oct | ||
| 8 Nov – 11 Nov 20264 full days | MuscatIn person · Knowledge Oasis Muscat | 8 of 14 | OMR 1,110until 9 Oct | ||
| 15 Nov – 24 Nov 20268 half-days | Gulf bandLive online · 09:00–13:00 GMT+3 | 14 of 20 | US$2,070until 16 Oct | ||
| 16 Nov – 19 Nov 20264 full days | OttawaIn person · Kanata North Tech Park | 3 of 14 | CAD 3,920until 17 Oct | ||
| 16 Nov – 25 Nov 20268 half-days | Europe bandLive online · 09:00–13:00 CET | 3 of 20 | US$2,070until 17 Oct | ||
| 23 Nov – 26 Nov 20264 full days | TorontoIn person · MaRS Discovery District | 8 of 14 | CAD 3,920until 24 Oct | ||
| 23 Nov – 26 Nov 20264 full days | LondonIn person · Shoreditch Works | 3 of 14 | GBP 2,250until 24 Oct | ||
| 23 Nov – 2 Dec 20268 half-days | Americas bandLive online · 13:00–17:00 ET | 8 of 20 | US$2,070until 24 Oct | ||
| 30 Nov – 3 Dec 20264 full days | BerlinIn person · Factory Görlitzer Park | 8 of 14 | EUR 2,650until 31 Oct |
Book a seat, or bring this course to your team
Seats can be reserved online; private delivery runs on-site or live online, adapted to your stack.
Questions about fit or prerequisites? Email hello@kernelsystems.academy. To save this syllabus, print this page to PDF from your browser.