41#ifndef __DEV_PCI_UPSTREAM_HH__
42#define __DEV_PCI_UPSTREAM_HH__
50#include "params/PciConfigError.hh"
51#include "params/PciUpstream.hh"
130 const std::string
name()
const;
270 Addr pci_addr)
const = 0;
281 Addr pci_addr)
const = 0;
292 Addr pci_addr)
const = 0;
The AddrRange class encapsulates an address range, and supports a number of tests to check if two ran...
ClockedObject(const ClockedObjectParams &p)
ClockedObjectParams Params
Parameters of ClockedObject.
IsaFake(const Params &p)
The constructor for Isa Fake just registers itself with the MMU.
PciConfigError(const Params &p)
void setAddrRange(AddrRange range)
Base class to represent a PCI device.
This bridge lets packets pass from upstream to downstream of a PCI bridge.
Callback interface from PCI devices to the upstream.
Addr memAddr(Addr addr) const
Calculate the physical address of a non-prefetchable memory location in the PCI address space.
void clearInt()
Clear a posted PCI interrupt.
DeviceInterface(PciUpstream &upstream, const PciDevAddr &dev_addr, PciIntPin pin)
Instantiate a device interface.
const PciIntPin interruptPin
void postInt()
Post a PCI interrupt to the CPU.
void operator=(const DeviceInterface &)=delete
friend class gem5::PciUpstream
Addr dmaAddr(Addr addr) const
Calculate the physical address of a prefetchable memory location in the PCI address space.
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.
const std::string name() const
The PCI upstream describes any device (PCI host bridge, PCI-PCI bridge) that are connected upstream o...
void sendBusChange()
Inform each PCI devices connected to this upstream of a bus number change.
virtual PciBusNum getBusNum() const =0
Get the PCI bus number assign to that upstream.
virtual void interfaceClearInt(const PciDevAddr &dev_addr, PciIntPin pin)=0
Post an interrupt to the CPU.
PciUpstream(const Params &p)
PciUpDownBridge * upToDown
The two one way bridges to connect both side buses.
virtual Addr interfaceDmaAddr(const PciDevAddr &dev_addr, Addr pci_addr) const =0
Calculate the physical address of a prefetchable memory location in the PCI address space.
virtual Addr interfaceMemAddr(const PciDevAddr &dev_addr, Addr pci_addr) const =0
Calculate the physical address of a non-prefetchable memory location in the PCI address space.
PciDevice * getDevice(const PciDevAddr &addr)
Retrieve a PCI device from its bus address.
virtual void interfacePostInt(const PciDevAddr &dev_addr, PciIntPin pin)=0
Post an interrupt to the CPU.
virtual DeviceInterface registerDevice(PciDevice *device, PciDevAddr dev_addr, PciIntPin pin)
Register a PCI device with the host.
std::map< PciDevAddr, PciDevice * > devices
Currently registered PCI interfaces.
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
virtual AddrRange getConfigAddrRange() const =0
Get the range for the configuration memory space for which this PCI upstream is responsible.
PciConfigError * configErrorDevice
virtual Addr interfacePioAddr(const PciDevAddr &dev_addr, Addr pci_addr) const =0
Calculate the physical address of an IO location on the PCI bus.
virtual AddrRange interfaceConfigRange(const PciDevAddr &dev_addr) const =0
Calculate the physical address range of the PCI device configuration space.
ClockedObject declaration and implementation.
Declaration of a fake device.
Copyright (c) 2024 Arm Limited All rights reserved.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.