40 #ifndef __DEV_PCI_HOST_HH__
41 #define __DEV_PCI_HOST_HH__
47 struct GenericPciHostParams;
95 friend class ::PciHost;
111 const std::string
name()
const;
330 #endif // __DEV_PCI_HOST_HH__
virtual Addr dmaAddr(const PciBusAddr &bus_addr, Addr pci_addr) const =0
Calculate the physical address of a prefetchable memory location in the PCI address space...
void operator=(const DeviceInterface &)=delete
void postInt(const PciBusAddr &addr, PciIntPin pin) override
Post an interrupt to the CPU.
Addr memAddr(Addr addr) const
Calculate the physical address of a non-prefetchable memory location in the PCI address space...
Configurable generic PCI host interface.
PCI device, base implementation is only config space.
Addr dmaAddr(Addr addr) const
Calculate the physical address of a prefetchable memory location in the PCI address space...
virtual void postInt(const PciBusAddr &bus_addr, PciIntPin pin)=0
Post an interrupt to the CPU.
PciDevice * getDevice(const PciBusAddr &addr)
Retrieve a PCI device from its bus address.
virtual DeviceInterface registerDevice(PciDevice *device, PciBusAddr bus_addr, PciIntPin pin)
Register a PCI device with the host.
virtual uint32_t mapPciInterrupt(const PciBusAddr &bus_addr, PciIntPin pin) const
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
const std::string name() const
AddrRangeList getAddrRanges() const override
Every PIO device is obliged to provide an implementation that returns the address ranges the device r...
void clearInt(const PciBusAddr &addr, PciIntPin pin) override
Post an interrupt to the CPU.
virtual Addr memAddr(const PciBusAddr &bus_addr, Addr pci_addr) const =0
Calculate the physical address of a non-prefetchable memory location in the PCI address space...
Addr pioAddr(Addr addr) const
Calculate the physical address of an IO location on the PCI bus.
virtual void clearInt(const PciBusAddr &bus_addr, PciIntPin pin)=0
Post an interrupt to the CPU.
void clearInt()
Clear a posted PCI interrupt.
uint64_t Tick
Tick count type.
virtual Addr pioAddr(const PciBusAddr &bus_addr, Addr pci_addr) const =0
Calculate the physical address of an IO location on the PCI bus.
const PciIntPin interruptPin
This device is the base class which all devices senstive to an address range inherit from...
PciHost(const PciHostParams *p)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
The PCI host describes the interface between PCI devices and a simulated system.
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
Addr pioAddr(const PciBusAddr &bus_addr, Addr pci_addr) const override
Calculate the physical address of an IO location on the PCI bus.
virtual std::pair< PciBusAddr, Addr > decodeAddress(Addr address)
Decode a configuration space address.
Callback interface from PCI devices to the host.
Tick read(PacketPtr pkt) override
Pure virtual function that the device must implement.
GenericPciHost(const GenericPciHostParams *p)
Addr dmaAddr(const PciBusAddr &bus_addr, Addr pci_addr) const override
Calculate the physical address of a prefetchable memory location in the PCI address space...
const uint8_t confDeviceBits
std::map< PciBusAddr, PciDevice * > devices
Currently registered PCI devices.
void postInt()
Post a PCI interrupt to the CPU.
Addr memAddr(const PciBusAddr &bus_addr, Addr pci_addr) const override
Calculate the physical address of a non-prefetchable memory location in the PCI address space...
virtual ~GenericPciHost()