43 #include "debug/SMMUv3.hh" 48 const SMMUv3SlaveInterfaceParams *
p) :
51 microTLB(new
SMMUTLB(p->utlb_entries,
54 mainTLB(new
SMMUTLB(p->tlb_entries,
57 microTLBEnable(p->utlb_enable),
58 mainTLBEnable(p->tlb_enable),
60 microTLBSem(p->utlb_slots),
61 mainTLBSem(p->tlb_slots),
62 microTLBLat(p->utlb_lat),
63 mainTLBLat(p->tlb_lat),
65 atsSlavePort(
name() +
".atsSlave", *this),
66 atsMasterPort(
name() +
".atsMaster", *this),
67 portWidth(p->port_width),
68 wrBufSlotsRemaining(p->wrbuf_slots),
69 xlateSlotsRemaining(p->xlate_slots),
70 pendingMemAccesses(0),
71 prefetchEnable(p->prefetch_enable),
72 prefetchReserveLastWay(
73 p->prefetch_reserve_last_way),
74 deviceNeedsRetry(false),
75 atsDeviceNeedsRetry(false),
76 sendDeviceRetryEvent(*this),
77 atsSendDeviceRetryEvent(this)
88 fatal(
"Slave port is not connected.\n");
95 if (name ==
"ats_master") {
97 }
else if (name ==
"slave") {
99 }
else if (name ==
"ats_slave") {
178 const bool ats_request =
true;
180 proc_name, *
smmu, *
this);
204 const bool ats_request =
true;
265 SMMUv3SlaveInterfaceParams::create()
Ports are used to interface objects to each other.
Tick recvAtomic(PacketPtr pkt)
virtual Port & getPort(const std::string &if_name, PortID idx=InvalidPortID)
Get a port with a given name and index.
void sendRangeChange() const
Called by the owner to send a range change.
SMMUDeviceRetryEvent sendDeviceRetryEvent
#define fatal(...)
This implements a cprintf based fatal() function.
const std::string & name()
DrainState
Object drain/handover states.
Port & getPeer()
Return a reference to this port's peer.
void schedAtsTimingResp(PacketPtr pkt)
SMMUATSSlavePort atsSlavePort
bool atsSlaveRecvTimingReq(PacketPtr pkt)
bool isConnected() const
Is this port currently connected to a peer?
unsigned wrBufSlotsRemaining
bool recvTimingReq(PacketPtr pkt)
unsigned xlateSlotsRemaining
const SMMUv3SlaveInterfaceParams * params() const
friend class SMMUTranslationProcess
void beginTransaction(const SMMUTranslRequest &req)
std::string csprintf(const char *format, const Args &...args)
bool atsMasterRecvTimingResp(PacketPtr pkt)
bool scheduled() const
Determine if the current event is scheduled.
uint32_t headerDelay
The extra delay from seeing the packet until the header is transmitted.
void schedTimingResp(PacketPtr pkt, Tick when)
Schedule the sending of a timing response.
uint64_t Tick
Tick count type.
The ClockedObject class extends the SimObject with a clock and accessor functions to relate ticks to ...
SMMUv3SlaveInterface(const SMMUv3SlaveInterfaceParams *p)
SMMUATSMasterPort atsMasterPort
Tick atsSlaveRecvAtomic(PacketPtr pkt)
static SMMUTranslRequest fromPacket(PacketPtr pkt, bool ats=false)
void atsSendDeviceRetry()
void schedTimingResp(PacketPtr pkt)
Tick nextCycle() const
Based on the clock of the object, determine the start tick of the first cycle that is at least one cy...
Draining buffers pending serialization/handover.
uint32_t payloadDelay
The extra pipelining delay from seeing the packet until the end of payload is transmitted by the comp...
virtual const std::string name() const
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
void scheduleDeviceRetry()
This is an implementation of the SMMUv3 architecture.
SMMUAction runProcessTiming(SMMUProcess *proc, PacketPtr pkt)
void sendRetryReq()
Send a retry to the master port that previously attempted a sendTimingReq to this slave port and fail...
DrainState drain() override
Notify an object that it needs to drain its state.
void schedule(Event &event, Tick when)
SenderState * popSenderState()
Pop the top of the state stack and return a pointer to it.
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
EventWrapper< SMMUv3SlaveInterface, &SMMUv3SlaveInterface::atsSendDeviceRetry > atsSendDeviceRetryEvent
Port & getPort(const std::string &name, PortID id) override
Get a port with a given name and index.
SMMUAction runProcessAtomic(SMMUProcess *proc, PacketPtr pkt)
SMMUSlavePort * slavePort