41#include "debug/SMMUv3.hh"
49 const SMMUv3DeviceInterfaceParams &
p) :
77 p.prefetch_reserve_last_way),
92 fatal(
"Device port is not connected.\n");
99 if (
name ==
"ats_mem_side_port") {
101 }
else if (
name ==
"device_port") {
103 }
else if (
name ==
"ats_dev_side_port") {
170 smmu->runProcessTiming(proc, pkt);
182 const bool ats_request =
true;
184 proc_name, *
smmu, *
this);
208 const bool ats_request =
true;
213 smmu->runProcessTiming(proc, pkt);
221 DPRINTF(
SMMUv3,
"[t] ATS requestor resp addr=%#x size=%#x\n",
230 smmu->runProcessTiming(proc, pkt);
ClockedObject(const ClockedObjectParams &p)
Tick nextCycle() const
Based on the clock of the object, determine the start tick of the first cycle that is at least one cy...
virtual std::string name() const
uint32_t payloadDelay
The extra pipelining delay from seeing the packet until the end of payload is transmitted by the comp...
uint32_t headerDelay
The extra delay from seeing the packet until the header is transmitted.
SenderState * popSenderState()
Pop the top of the state stack and return a pointer to it.
Ports are used to interface objects to each other.
void beginTransaction(const SMMUTranslRequest &req)
SMMUATSMemoryPort atsMemPort
void atsSendDeviceRetry()
SMMUATSDevicePort atsDevicePort
void scheduleDeviceRetry()
void schedAtsTimingResp(PacketPtr pkt)
friend class SMMUTranslationProcess
Port & getPort(const std::string &name, PortID id) override
Get a port with a given name and index.
SMMUDeviceRetryEvent sendDeviceRetryEvent
Tick atsRecvAtomic(PacketPtr pkt)
void schedTimingResp(PacketPtr pkt)
SMMUv3DeviceInterface(const Params &p)
MemberEventWrapper<&SMMUv3DeviceInterface::atsSendDeviceRetry > atsSendDeviceRetryEvent
bool atsRecvTimingResp(PacketPtr pkt)
const bool prefetchReserveLastWay
Tick recvAtomic(PacketPtr pkt)
const bool microTLBEnable
bool atsRecvTimingReq(PacketPtr pkt)
SMMUDevicePort * devicePort
const bool prefetchEnable
DrainState drain() override
Provide a default implementation of the drain interface for objects that don't need draining.
SMMUSemaphore microTLBSem
unsigned wrBufSlotsRemaining
unsigned pendingMemAccesses
unsigned xlateSlotsRemaining
SMMUSemaphore devicePortSem
bool recvTimingReq(PacketPtr pkt)
DrainState
Object drain/handover states.
@ Draining
Draining buffers pending serialization/handover.
@ Drained
Buffers drained, ready for serialization/handover.
void schedule(Event &event, Tick when)
#define fatal(...)
This implements a cprintf based fatal() function.
const Params & params() const
virtual Port & getPort(const std::string &if_name, PortID idx=InvalidPortID)
Get a port with a given name and index.
Copyright (c) 2024 Arm Limited All rights reserved.
T safe_cast(U &&ref_or_ptr)
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
uint64_t Tick
Tick count type.
std::string csprintf(const char *format, const Args &...args)
This is an implementation of the SMMUv3 architecture.
static SMMUTranslRequest fromPacket(PacketPtr pkt, bool ats=false)