gem5  v22.1.0.0
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
gem5::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 gem5::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 94 of file host.hh.

Constructor & Destructor Documentation

◆ DeviceInterface() [1/2]

gem5::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 89 of file host.cc.

◆ DeviceInterface() [2/2]

gem5::PciHost::DeviceInterface::DeviceInterface ( )
delete

Member Function Documentation

◆ clearInt()

void gem5::PciHost::DeviceInterface::clearInt ( void  )

Clear a posted PCI interrupt.

Definition at line 113 of file host.cc.

References DPRINTF.

Referenced by gem5::PciDevice::intrClear().

◆ dmaAddr()

Addr gem5::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 149 of file host.hh.

References gem5::X86ISA::addr, busAddr, gem5::PciHost::dmaAddr(), and host.

Referenced by gem5::PciDevice::pciToDma().

◆ memAddr()

Addr gem5::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 140 of file host.hh.

References gem5::X86ISA::addr, busAddr, host, and gem5::PciHost::memAddr().

Referenced by gem5::PciMemBar::upper(), and gem5::PciMemBar::write().

◆ name()

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

Definition at line 98 of file host.cc.

References gem5::csprintf().

◆ operator=()

void gem5::PciHost::DeviceInterface::operator= ( const DeviceInterface )
delete

◆ pioAddr()

Addr gem5::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 131 of file host.hh.

References gem5::X86ISA::addr, busAddr, host, and gem5::PciHost::pioAddr().

Referenced by gem5::PciIoBar::write(), and gem5::PciLegacyIoBar::write().

◆ postInt()

void gem5::PciHost::DeviceInterface::postInt ( )

Post a PCI interrupt to the CPU.

Definition at line 105 of file host.cc.

References DPRINTF.

Referenced by gem5::PciDevice::intrPost().

Friends And Related Function Documentation

◆ gem5::PciHost

friend class gem5::PciHost
friend

Definition at line 96 of file host.hh.

Member Data Documentation

◆ busAddr

const PciBusAddr gem5::PciHost::DeviceInterface::busAddr
protected

Definition at line 154 of file host.hh.

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

◆ host

PciHost& gem5::PciHost::DeviceInterface::host
protected

Definition at line 152 of file host.hh.

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

◆ interruptPin

const PciIntPin gem5::PciHost::DeviceInterface::interruptPin
protected

Definition at line 155 of file host.hh.


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

Generated on Wed Dec 21 2022 10:23:21 for gem5 by doxygen 1.9.1