gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
PciHost::DeviceInterface Class Reference

Callback interface from PCI devices to the host. More...

#include <host.hh>

Public Member Functions

 DeviceInterface ()=delete
 
void operator= (const DeviceInterface &)=delete
 
const std::string name () const
 
void postInt ()
 Post a PCI interrupt to the CPU. More...
 
void clearInt ()
 Clear a posted PCI interrupt. More...
 
Addr pioAddr (Addr addr) const
 Calculate the physical address of an IO location on the PCI bus. More...
 
Addr memAddr (Addr addr) const
 Calculate the physical address of a non-prefetchable memory location in the PCI address space. More...
 
Addr dmaAddr (Addr addr) const
 Calculate the physical address of a prefetchable memory location in the PCI address space. More...
 

Protected Member Functions

 DeviceInterface (PciHost &host, PciBusAddr &bus_addr, PciIntPin pin)
 Instantiate a device interface. More...
 

Protected Attributes

PciHosthost
 
const PciBusAddr busAddr
 
const PciIntPin interruptPin
 

Friends

class ::PciHost
 

Detailed Description

Callback interface from PCI devices to the host.

Devices get an instance of this object when they register themselves with the host using the PciHost::registerDevice() call.

Definition at line 93 of file host.hh.

Constructor & Destructor Documentation

PciHost::DeviceInterface::DeviceInterface ( PciHost host,
PciBusAddr bus_addr,
PciIntPin  pin 
)
protected

Instantiate a device interface.

Parameters
hostPCI host that this device belongs to.
bus_addrThe device's position on the PCI bus
pinInterrupt pin

Definition at line 88 of file host.cc.

PciHost::DeviceInterface::DeviceInterface ( )
delete

Member Function Documentation

void PciHost::DeviceInterface::clearInt ( )

Clear a posted PCI interrupt.

Definition at line 112 of file host.cc.

References DPRINTF.

Referenced by PciDevice::intrClear().

Addr PciHost::DeviceInterface::dmaAddr ( Addr  addr) const
inline

Calculate the physical address of a prefetchable memory location in the PCI address space.

Parameters
addrAddress in the PCI DMA memory address space
Returns
Address in the system's physical address space.

Definition at line 148 of file host.hh.

References busAddr, PciHost::dmaAddr(), and host.

Referenced by PciDevice::pciToDma().

Addr PciHost::DeviceInterface::memAddr ( Addr  addr) const
inline

Calculate the physical address of a non-prefetchable memory location in the PCI address space.

Parameters
addrAddress in the PCI memory address space
Returns
Address in the system's physical address space.

Definition at line 139 of file host.hh.

References busAddr, host, and PciHost::memAddr().

Referenced by PciDevice::writeConfig().

const std::string PciHost::DeviceInterface::name ( ) const

Definition at line 97 of file host.cc.

References csprintf().

void PciHost::DeviceInterface::operator= ( const DeviceInterface )
delete
Addr PciHost::DeviceInterface::pioAddr ( Addr  addr) const
inline

Calculate the physical address of an IO location on the PCI bus.

Parameters
addrAddress in the PCI IO address space
Returns
Address in the system's physical address space.

Definition at line 130 of file host.hh.

References busAddr, host, and PciHost::pioAddr().

Referenced by PciDevice::writeConfig().

void PciHost::DeviceInterface::postInt ( )

Post a PCI interrupt to the CPU.

Definition at line 104 of file host.cc.

References DPRINTF.

Referenced by PciDevice::intrPost().

Friends And Related Function Documentation

friend class ::PciHost
friend

Definition at line 95 of file host.hh.

Member Data Documentation

const PciBusAddr PciHost::DeviceInterface::busAddr
protected

Definition at line 153 of file host.hh.

Referenced by dmaAddr(), memAddr(), and pioAddr().

PciHost& PciHost::DeviceInterface::host
protected

Definition at line 151 of file host.hh.

Referenced by dmaAddr(), memAddr(), and pioAddr().

const PciIntPin PciHost::DeviceInterface::interruptPin
protected

Definition at line 154 of file host.hh.


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

Generated on Fri Jun 9 2017 13:04:16 for gem5 by doxygen 1.8.6