PCI Bus.
authorThadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Mon, 24 May 2010 10:36:33 +0000 (06:36 -0400)
committerThadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Mon, 24 May 2010 10:36:33 +0000 (06:36 -0400)
13buses/pci [new file with mode: 0644]

diff --git a/13buses/pci b/13buses/pci
new file mode 100644 (file)
index 0000000..63582da
--- /dev/null
@@ -0,0 +1,87 @@
+%PCI
+%Thadeu Cascardo
+
+# PCI Basics
+
+* Addressing: bus, device and function
+* Configuration space
+* "Firmware" (BIOS, PROM, etc) sets up the devices
+
+# Files and Tools
+
+* /sys/bus/pci/
+       - devices/*/
+               * vendor
+               * device
+               * class
+               * config
+* /proc/bus/pci/
+* /proc/bus/pci/devices
+* lspci
+
+# Configuration space
+
+* 64 standardized bytes
+* Identifiers
+* Base Addresses
+* IRQs
+* Little-endian
+
+# PCI IDs
+
+* struct pci\\_device\\_id
+       - vendor
+       - device
+       - subvendor
+       - subdevice
+       - class
+       - class\\_mask
+       - driver\\_data
+* PCI\\_ANY\\_ID
+* PCI\\_DEVICE
+* PCI\\_DEVICE\\_CLASS
+* DEFINE\\_PCI\\_DEVICE\\_TABLE
+
+# PCI Drivers
+
+* struct pci\\_driver
+       - name
+       - id\\_table
+       - probe
+       - remove
+* pci\\_register\\_driver
+* pci\\_unregister\\_driver
+
+# PCI Device
+
+* struct pci\\_dev
+* pci\\_enable\\_device
+* pci\\_disable\\_device
+* pci\\_set\\_drvdata
+
+# Accessing the configuration space
+
+* pci\\_read\\_config\\_byte(dev, where, *val)
+* pci\\_read\\_config\\_word(dev, where, *val)
+* pci\\_read\\_config\\_dword(dev, where, *val)
+* pci\\_write\\_config\\_byte(dev, where, val)
+* pci\\_write\\_config\\_word(dev, where, val)
+* pci\\_write\\_config\\_dword(dev, where, val)
+
+# PCI Resources
+
+* pci\\_resource\\_start(dev, bar)
+* pci\\_resource\\_end(dev, bar)
+* pci\\_resource\\_len(dev, bar)
+* pci\\_resource\\_flags(dev, bar)
+       - IORESOURCE\\_IO
+       - IORESOURCE\\_MEM
+
+# Using PCI devices
+
+* pci\\_request\\_regions
+* pci\\_release\\_regions
+* pci\\_iomap
+* pci\\_ioremap\\_bar
+* struct pci\\_dev
+       - irq