gem5 [DEVELOP-FOR-25.1]
Loading...
Searching...
No Matches
gem5::PciUpstream::DeviceInterface Class Reference

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

#include <upstream.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.
void clearInt ()
 Clear a posted PCI interrupt.
AddrRange configRange () const
 Calculate the physical address range of the PCI device configuration space.
Addr pioAddr (Addr addr) const
 Calculate the physical address of an IO location on the PCI bus.
Addr memAddr (Addr addr) const
 Calculate the physical address of a non-prefetchable memory location in the PCI address space.
Addr dmaAddr (Addr addr) const
 Calculate the physical address of a prefetchable memory location in the PCI address space.

Protected Member Functions

 DeviceInterface (PciUpstream &upstream, const PciDevAddr &dev_addr, PciIntPin pin)
 Instantiate a device interface.

Protected Attributes

PciUpstreamupstream
const PciDevAddr devAddr
const PciIntPin interruptPin

Friends

class gem5::PciUpstream

Detailed Description

Callback interface from PCI devices to the upstream.

Devices get an instance of this object by calling PciUpstream::registerDevice() on their direct upstream.

Definition at line 111 of file upstream.hh.

Constructor & Destructor Documentation

◆ DeviceInterface() [1/2]

gem5::PciUpstream::DeviceInterface::DeviceInterface ( PciUpstream & upstream,
const PciDevAddr & dev_addr,
PciIntPin pin )
protected

Instantiate a device interface.

Parameters
upstreamPCI upstream that this device belongs to.
dev_addrThe device's position on the PCI bus
pinInterrupt pin

Definition at line 112 of file upstream.cc.

References devAddr, gem5::PciUpstream, interruptPin, and upstream.

Referenced by operator=().

◆ DeviceInterface() [2/2]

gem5::PciUpstream::DeviceInterface::DeviceInterface ( )
delete

Member Function Documentation

◆ clearInt()

void gem5::PciUpstream::DeviceInterface::clearInt ( )

Clear a posted PCI interrupt.

Definition at line 134 of file upstream.cc.

References devAddr, DPRINTF, gem5::PciUpstream, interruptPin, and upstream.

◆ configRange()

AddrRange gem5::PciUpstream::DeviceInterface::configRange ( ) const
inline

Calculate the physical address range of the PCI device configuration space.

Returns
Address range in the system's physical address space.

Definition at line 149 of file upstream.hh.

References devAddr, and upstream.

◆ dmaAddr()

Addr gem5::PciUpstream::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 188 of file upstream.hh.

References gem5::X86ISA::addr, devAddr, and upstream.

◆ memAddr()

Addr gem5::PciUpstream::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 175 of file upstream.hh.

References gem5::X86ISA::addr, devAddr, and upstream.

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

◆ name()

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

Definition at line 119 of file upstream.cc.

References gem5::csprintf(), devAddr, and upstream.

◆ operator=()

void gem5::PciUpstream::DeviceInterface::operator= ( const DeviceInterface & )
delete

References DeviceInterface().

◆ pioAddr()

Addr gem5::PciUpstream::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 162 of file upstream.hh.

References gem5::X86ISA::addr, devAddr, and upstream.

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

◆ postInt()

void gem5::PciUpstream::DeviceInterface::postInt ( )

Post a PCI interrupt to the CPU.

Definition at line 126 of file upstream.cc.

References devAddr, DPRINTF, gem5::PciUpstream, interruptPin, and upstream.

◆ gem5::PciUpstream

friend class gem5::PciUpstream
friend

Definition at line 113 of file upstream.hh.

References gem5::PciUpstream, and upstream.

Referenced by clearInt(), DeviceInterface(), gem5::PciUpstream, and postInt().

Member Data Documentation

◆ devAddr

const PciDevAddr gem5::PciUpstream::DeviceInterface::devAddr
protected

Definition at line 196 of file upstream.hh.

Referenced by clearInt(), configRange(), DeviceInterface(), dmaAddr(), memAddr(), name(), pioAddr(), and postInt().

◆ interruptPin

const PciIntPin gem5::PciUpstream::DeviceInterface::interruptPin
protected

Definition at line 197 of file upstream.hh.

Referenced by clearInt(), DeviceInterface(), and postInt().

◆ upstream

PciUpstream& gem5::PciUpstream::DeviceInterface::upstream
protected

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

Generated on Mon Oct 27 2025 04:13:12 for gem5 by doxygen 1.14.0