The Pedigree Project
0.1
|
#include <Pci.h>
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 PciBus & | instance () |
Static Private Attributes | |
static PciBus | m_Instance |
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().
uint32_t PciBus::readConfigSpace | ( | Device * | pDev, |
uint8_t | offset | ||
) |
Reads from the configuration space
pDev | the device to read configuration space for |
offset | the 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().
uint32_t PciBus::readConfigSpace | ( | uint8_t | bus, |
uint8_t | device, | ||
uint8_t | function, | ||
uint8_t | offset | ||
) |
Reads from the configuration space
bus | bus number for the read address |
device | device number for the read address |
function | function number for the read address |
offset | the 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
pDev | the device to write configuration space for |
offset | the offset into the configuration space to write |
data | the 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().
void PciBus::writeConfigSpace | ( | uint8_t | bus, |
uint8_t | device, | ||
uint8_t | function, | ||
uint8_t | offset, | ||
uint32_t | data | ||
) |
Writes to the configuration space
bus | bus number for the write address |
device | device number for the write address |
function | function number for the write address |
offset | the offset into the configuration space to write |
data | the data to write |
Definition at line 118 of file Pci.cc.
References IoPort::write32().