Spring 2017 :: CSE 506
Device Programming
Nima Honarmand
Device Programming Nima Honarmand Spring 2017 :: CSE 506 Device - - PowerPoint PPT Presentation
Spring 2017 :: CSE 506 Device Programming Nima Honarmand Spring 2017 :: CSE 506 Device Interface (Logical View) Device Interface Components: DRAM Device registers read/write DMA CPU Device Memory Buffer DMA buffers
Spring 2017 :: CSE 506
Nima Honarmand
Spring 2017 :: CSE 506
Device Interface Components:
CPU DRAM Device
Device Register Device Memory DMA Buffer Device Controller
read/write interrupt read/write read/write
Spring 2017 :: CSE 506
in JOS’ IDE driver)
Spring 2017 :: CSE 506
Spring 2017 :: CSE 506
different space
Spring 2017 :: CSE 506
Spring 2017 :: CSE 506
address space
device
Spring 2017 :: CSE 506
memory ops
Spring 2017 :: CSE 506
immediately
Spring 2017 :: CSE 506
compiler
Spring 2017 :: CSE 506
instructions in order
Write to <device register 1>; mb(); // fence Read from <device register 2>;
Spring 2017 :: CSE 506
non-cacheable
Spring 2017 :: CSE 506
bounces all I/O through the CPU
Spring 2017 :: CSE 506
well-sized to the load
memory overheads
Spring 2017 :: CSE 506
the ring and advances head pointer
Spring 2017 :: CSE 506
ring tail
the ring?
Spring 2017 :: CSE 506
Spring 2017 :: CSE 506
Spring 2017 :: CSE 506
Spring 2017 :: CSE 506
Spring 2017 :: CSE 506
Spring 2017 :: CSE 506
Source: Linux Device Drivers, 3rd Ed
Spring 2017 :: CSE 506
5 for device#, 3 for function#
lots of information on them
Spring 2017 :: CSE 506
Spring 2017 :: CSE 506
device
regions and interrupts
space to be able to access the device
driver for the device
Spring 2017 :: CSE 506
IOMMU:
physical addresses
translates from device-virtual to physical
SR-IOV:
based multiplexing unnecessary