Return to Training Programs


Course-Number: ATR-010

Course-Description: PCI programming with Linux

Duration of course: 1 day.

Course Description:

This is a one day course focused on explaining the core concepts behind the PCI bus and the way PCI devices interface with the linux operating system.

The course starts off with a detailed description of the PCI bus standards. The core bus protocol and bus commands are explained as well as the configuration header and the methods used by host systems for bus enumeration and device identification. The technique used by the PCI device vendors to “negotiate” a certain range of I/O addresses and / or physical memory addresses for automatic device addressability in the physical address space of the processor is explained clearly.

Bus, Device and Device-function concepts are explained and the APIs to query the configuration space are also elaborated.

The course uses the RTL-8139C based ethernet adaptor to explain the PCI programming interface.

The RTL-8139C chip allows the card to generate a timer based interrupt using a few registers. The course teaches how these registers are accessed, interrupt masks are set, interrupt status registers are queried and how to write an ISR for the countdown timer. In the process, all PCI based programming is exlained clearly.

 Target Audience:

This course would be ideal for linux systems programmers who have not worked with PCI earlier. The course would also be useful for systems programmers already familiar with the PCI bus coming into linux for the first time, in case they are interested in knowing how linux works with the PCI bus interface.


Knowledge of 'C' programming is mandatory for this course. Also, some knowledge of linux internals and kernel programming is deemed necessary since these are not part of the 1-day course.






The PCI Bus standard

1.5 hrs

The hardware standards, specifications, bus commands & protocol, interfacing mechanisms, hardware address negotiations

PCI utilities under linux

1.5 hrs

lspci, /proc/pci, /proc/bus/pci/devices etc.
/usr/share/hwdata/pci.ids, etc.

PCI programming APIs

1.5 hrs

The configuration space header, offsets, pci.h header file, accessing the configuration space and other APIs.

Case study - RTL-8139C chipset programming

1.5 hrs

Detailed treatment of a PCI based countdown timer implemented using the RTL-8139C chipset on a Realtek network card.

(C) 2005 -   All Rights Reserved.

Return to Training Programs