The Pedigree Project  0.1
Classes | Public Member Functions | Static Public Member Functions | Static Private Attributes | List of all members
PciBus Class Reference

#include <Pci.h>

+ Collaboration diagram for PciBus:

Classes

struct  ConfigSpace
 

Public Member Functions

void initialise ()
 
uint32_t readConfigSpace (Device *pDev, uint8_t offset)
 
uint32_t readConfigSpace (uint8_t bus, uint8_t device, uint8_t function, uint8_t offset)
 
void writeConfigSpace (Device *pDev, uint8_t offset, uint32_t data)
 
void writeConfigSpace (uint8_t bus, uint8_t device, uint8_t function, uint8_t offset, uint32_t data)
 
struct PciBus::ConfigSpace __attribute__ ((packed))
 

Static Public Member Functions

static PciBusinstance ()
 

Static Private Attributes

static PciBus m_Instance
 

Detailed Description

Architecture-independent interface to a PCI bus

Definition at line 29 of file Pci.h.

Member Function Documentation

void PciBus::initialise ( )

Initialises the object for use.

Definition at line 59 of file Pci.cc.

References IoPort::allocate(), ERROR, IoPort::read32(), and IoPort::write32().

Referenced by Pc::initialiseDeviceTree().

+ Here is the caller graph for this function:

uint32_t PciBus::readConfigSpace ( Device pDev,
uint8_t  offset 
)

Reads from the configuration space

Parameters
pDevthe device to read configuration space for
offsetthe offset into the configuration space to read

Definition at line 75 of file Pci.cc.

References Device::getPciBusPosition(), Device::getPciDevicePosition(), Device::getPciFunctionNumber(), IoPort::read32(), and IoPort::write32().

Referenced by Ehci::initialiseController(), and PciAtaController::PciAtaController().

+ Here is the caller graph for this function:

uint32_t PciBus::readConfigSpace ( uint8_t  bus,
uint8_t  device,
uint8_t  function,
uint8_t  offset 
)

Reads from the configuration space

Parameters
busbus number for the read address
devicedevice number for the read address
functionfunction number for the read address
offsetthe offset into the configuration space to read

Definition at line 89 of file Pci.cc.

References IoPort::read32(), and IoPort::write32().

void PciBus::writeConfigSpace ( Device pDev,
uint8_t  offset,
uint32_t  data 
)

Writes to the configuration space

Parameters
pDevthe device to write configuration space for
offsetthe offset into the configuration space to write
datathe data to write

Definition at line 104 of file Pci.cc.

References Device::getPciBusPosition(), Device::getPciDevicePosition(), Device::getPciFunctionNumber(), and IoPort::write32().

Referenced by Ehci::initialiseController(), and PciAtaController::PciAtaController().

+ Here is the caller graph for this function:

void PciBus::writeConfigSpace ( uint8_t  bus,
uint8_t  device,
uint8_t  function,
uint8_t  offset,
uint32_t  data 
)

Writes to the configuration space

Parameters
busbus number for the write address
devicedevice number for the write address
functionfunction number for the write address
offsetthe offset into the configuration space to write
datathe data to write

Definition at line 118 of file Pci.cc.

References IoPort::write32().


The documentation for this class was generated from the following files: