Main Page   Modules   Alphabetical List   Data Structures   File List   Data Fields   Globals   Related Pages  

pci_cfg Struct Reference
[Peripheral Component Interconnect (PCI) bus]

PCI configuration structure for a device. Every PCI device belong to a known class. To find this class we have to look at the base_class, sub_class and interface code. More...

#include <pci.h>


Data Fields

uint16_t vendor_id
 The vendor ID of this device.

uint16_t device_id
 The device ID of this device.

uint16_t command
 By writing to this field the system controls the device.

uint16_t status
 This field gives the status of the device with the meaning of the bits of this field set by the standard.

uint8_t revision_id
 The revision ID of this device.

uint8_t interface
 The interface code of this device.

uint8_t sub_class
 The sub-class ID of this device.

uint8_t base_class
 The base-class code of this device.

uint8_t cache_line_size
 The cache line size.

uint8_t latency_timer
 The latency timer.

uint8_t header_type
 The header type.

uint8_t bist
 Build-in Self Test. If BIST is implemented, can write to a 1 to initiate BIST.

uint8_t bus
 The bus number where this device resides.

uint8_t dev
 The device number where this device resides.

uint8_t func
 The function number where this device resides.

uint8_t irq
 The IRQ line (if the device has it! otherwise it is 0). Remeber that a PCI IRQ line can be shared between more than one device. This is a fetature of the PCI devices only. If more than one device shares a IRQ line the software must provide an opportune interrupt handler that recognizes the right device which causes the interrupt and switches the execution between the dedicated routines.

uint32_t base [6]
 Base addresses (for both I/O and memory-based devices). Every PCI device has up to 6 base addresses (6 for normal devices, 2 for PCI to PCI bridges and only 1 for cardbuses).

uint32_t size [6]
 Size of the I/O space. For memory-based devices it is the size of the memory-mapped buffer; for I/O based devices it is the maximum offset of the ports used.

uint8_t type [6]
 Type of the I/O operation (memory based or I/O based).

uint32_t rom_base
 The ROM base address.

uint32_t rom_size
 The ROM memory space.

uint16_t subsys_vendor
 Subsystem vendor ID.

uint16_t subsys_device
 Subsystem device ID.

uint8_t current_state
 Power management state (from D0 to D3).


Detailed Description

PCI configuration structure for a device. Every PCI device belong to a known class. To find this class we have to look at the base_class, sub_class and interface code.

pci_config_header.jpg

The PCI configuration header

Definition at line 173 of file pci.h.


Field Documentation

uint32_t pci_cfg::base[6]
 

Base addresses (for both I/O and memory-based devices). Every PCI device has up to 6 base addresses (6 for normal devices, 2 for PCI to PCI bridges and only 1 for cardbuses).

Definition at line 231 of file pci.h.

uint8_t pci_cfg::base_class
 

The base-class code of this device.

Definition at line 196 of file pci.h.

uint8_t pci_cfg::bist
 

Build-in Self Test. If BIST is implemented, can write to a 1 to initiate BIST.

Definition at line 206 of file pci.h.

uint8_t pci_cfg::bus
 

The bus number where this device resides.

Definition at line 213 of file pci.h.

uint8_t pci_cfg::cache_line_size
 

The cache line size.

Definition at line 199 of file pci.h.

uint16_t pci_cfg::command
 

By writing to this field the system controls the device.

Definition at line 184 of file pci.h.

uint8_t pci_cfg::current_state
 

Power management state (from D0 to D3).

Definition at line 249 of file pci.h.

uint8_t pci_cfg::dev
 

The device number where this device resides.

Definition at line 215 of file pci.h.

uint16_t pci_cfg::device_id
 

The device ID of this device.

Definition at line 181 of file pci.h.

uint8_t pci_cfg::func
 

The function number where this device resides.

Definition at line 217 of file pci.h.

uint8_t pci_cfg::header_type
 

The header type.

Definition at line 203 of file pci.h.

uint8_t pci_cfg::interface
 

The interface code of this device.

Definition at line 192 of file pci.h.

uint8_t pci_cfg::irq
 

The IRQ line (if the device has it! otherwise it is 0). Remeber that a PCI IRQ line can be shared between more than one device. This is a fetature of the PCI devices only. If more than one device shares a IRQ line the software must provide an opportune interrupt handler that recognizes the right device which causes the interrupt and switches the execution between the dedicated routines.

Definition at line 225 of file pci.h.

uint8_t pci_cfg::latency_timer
 

The latency timer.

Definition at line 201 of file pci.h.

uint8_t pci_cfg::revision_id
 

The revision ID of this device.

Definition at line 190 of file pci.h.

uint32_t pci_cfg::rom_base
 

The ROM base address.

Definition at line 239 of file pci.h.

uint32_t pci_cfg::rom_size
 

The ROM memory space.

Definition at line 241 of file pci.h.

uint32_t pci_cfg::size[6]
 

Size of the I/O space. For memory-based devices it is the size of the memory-mapped buffer; for I/O based devices it is the maximum offset of the ports used.

Definition at line 235 of file pci.h.

uint16_t pci_cfg::status
 

This field gives the status of the device with the meaning of the bits of this field set by the standard.

Definition at line 187 of file pci.h.

uint8_t pci_cfg::sub_class
 

The sub-class ID of this device.

Definition at line 194 of file pci.h.

uint16_t pci_cfg::subsys_device
 

Subsystem device ID.

Definition at line 246 of file pci.h.

uint16_t pci_cfg::subsys_vendor
 

Subsystem vendor ID.

Definition at line 244 of file pci.h.

uint8_t pci_cfg::type[6]
 

Type of the I/O operation (memory based or I/O based).

Definition at line 237 of file pci.h.

uint16_t pci_cfg::vendor_id
 

The vendor ID of this device.

Definition at line 179 of file pci.h.


The documentation for this struct was generated from the following file:
Generated on Fri Feb 20 15:32:21 2004 for Minirighi by doxygen1.2.18