38#ifndef __DEV_PCI_HOST_HH__
39#define __DEV_PCI_HOST_HH__
48struct GenericPciHostParams;
112 const std::string
name()
const;
Configurable generic PCI host interface.
const uint8_t confDeviceBits
virtual uint32_t mapPciInterrupt(const PciBusAddr &bus_addr, PciIntPin pin) const
AddrRangeList getAddrRanges() const override
Every PIO device is obliged to provide an implementation that returns the address ranges the device r...
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
GenericPciHost(const GenericPciHostParams &p)
virtual std::pair< PciBusAddr, Addr > decodeAddress(Addr address)
Decode a configuration space address.
virtual ~GenericPciHost()
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.
Addr pioAddr(const PciBusAddr &bus_addr, Addr pci_addr) const override
Calculate the physical address of an IO location on the PCI bus.
void postInt(const PciBusAddr &addr, PciIntPin pin) override
Post an interrupt to the CPU.
Tick read(PacketPtr pkt) override
Pure virtual function that the device must implement.
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.
void clearInt(const PciBusAddr &addr, PciIntPin pin) override
Post an interrupt to the CPU.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
PCI device, base implementation is only config space.
Callback interface from PCI devices to the host.
void postInt()
Post a PCI interrupt to the CPU.
const PciIntPin interruptPin
void operator=(const DeviceInterface &)=delete
const std::string name() const
Addr pioAddr(Addr addr) const
Calculate the physical address of an IO location on the PCI bus.
Addr dmaAddr(Addr addr) const
Calculate the physical address of a prefetchable memory location in the PCI address space.
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.
The PCI host describes the interface between PCI devices and a simulated system.
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.
std::map< PciBusAddr, PciDevice * > devices
Currently registered PCI devices.
virtual void postInt(const PciBusAddr &bus_addr, PciIntPin pin)=0
Post an interrupt to the CPU.
PciHost(const PciHostParams &p)
virtual void clearInt(const PciBusAddr &bus_addr, PciIntPin pin)=0
Post an interrupt to the CPU.
virtual Addr pioAddr(const PciBusAddr &bus_addr, Addr pci_addr) const =0
Calculate the physical address of an IO location on the PCI bus.
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.
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.
This device is the base class which all devices senstive to an address range inherit from.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
uint64_t Tick
Tick count type.