gem5  v20.1.0.0
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
SMMUTranslationProcess Class Reference

#include <smmu_v3_transl.hh>

Inheritance diagram for SMMUTranslationProcess:
SMMUProcess Packet::SenderState

Classes

struct  TranslContext
 
struct  TranslResult
 

Public Member Functions

 SMMUTranslationProcess (const std::string &name, SMMUv3 &_smmu, SMMUv3DeviceInterface &_ifc)
 
virtual ~SMMUTranslationProcess ()
 
void beginTransaction (const SMMUTranslRequest &req)
 
void resumeTransaction ()
 
- Public Member Functions inherited from SMMUProcess
 SMMUProcess (const std::string &name, SMMUv3 &_smmu)
 
virtual ~SMMUProcess ()
 
SMMUAction run (PacketPtr pkt)
 
const std::string name () const
 
- Public Member Functions inherited from Packet::SenderState
 SenderState ()
 
virtual ~SenderState ()
 

Private Types

enum  FaultType { FAULT_NONE, FAULT_TRANSLATION, FAULT_PERMISSION }
 

Private Member Functions

virtual void main (Yield &yield)
 
TranslResult bypass (Addr addr) const
 
TranslResult smmuTranslation (Yield &yield)
 
bool microTLBLookup (Yield &yield, TranslResult &tr)
 
bool ifcTLBLookup (Yield &yield, TranslResult &tr, bool &wasPrefetched)
 
bool smmuTLBLookup (Yield &yield, TranslResult &tr)
 
void microTLBUpdate (Yield &yield, const TranslResult &tr)
 
void ifcTLBUpdate (Yield &yield, const TranslResult &tr)
 
void smmuTLBUpdate (Yield &yield, const TranslResult &tr)
 
bool configCacheLookup (Yield &yield, TranslContext &tc)
 
void configCacheUpdate (Yield &yield, const TranslContext &tc)
 
bool findConfig (Yield &yield, TranslContext &tc, TranslResult &tr)
 
void walkCacheLookup (Yield &yield, const WalkCache::Entry *&walkEntry, Addr addr, uint16_t asid, uint16_t vmid, unsigned stage, unsigned level)
 
void walkCacheUpdate (Yield &yield, Addr va, Addr vaMask, Addr pa, unsigned stage, unsigned level, bool leaf, uint8_t permissions)
 
TranslResult walkStage1And2 (Yield &yield, Addr addr, const PageTableOps *pt_ops, unsigned level, Addr walkPtr)
 
TranslResult walkStage2 (Yield &yield, Addr addr, bool final_tr, const PageTableOps *pt_ops, unsigned level, Addr walkPtr)
 
TranslResult translateStage1And2 (Yield &yield, Addr addr)
 
TranslResult translateStage2 (Yield &yield, Addr addr, bool final_tr)
 
TranslResult combineTranslations (const TranslResult &s1tr, const TranslResult &s2tr) const
 
bool hazard4kCheck ()
 Used to force ordering on transactions with same (SID, SSID, 4k page) to avoid multiple identical page-table walks. More...
 
void hazard4kRegister ()
 
void hazard4kHold (Yield &yield)
 
void hazard4kRelease ()
 
void hazardIdRegister ()
 Used to force ordering on transactions with the same orderId. More...
 
void hazardIdHold (Yield &yield)
 
void hazardIdRelease ()
 
void issuePrefetch (Addr addr)
 
void completeTransaction (Yield &yield, const TranslResult &tr)
 
void completePrefetch (Yield &yield)
 
void sendEvent (Yield &yield, const SMMUEvent &ev)
 
void doReadSTE (Yield &yield, StreamTableEntry &ste, uint32_t sid)
 
void doReadCD (Yield &yield, ContextDescriptor &cd, const StreamTableEntry &ste, uint32_t sid, uint32_t ssid)
 
void doReadConfig (Yield &yield, Addr addr, void *ptr, size_t size, uint32_t sid, uint32_t ssid)
 
void doReadPTE (Yield &yield, Addr va, Addr addr, void *ptr, unsigned stage, unsigned level)
 

Private Attributes

SMMUv3DeviceInterfaceifc
 
SMMUTranslRequest request
 
TranslContext context
 
Tick recvTick
 
Tick M5_CLASS_VAR_USED faultTick
 

Additional Inherited Members

- Public Attributes inherited from Packet::SenderState
SenderStatepredecessor
 
- Protected Types inherited from SMMUProcess
typedef Coroutine::CallerType Yield
 
- Protected Member Functions inherited from SMMUProcess
void reinit ()
 
void doRead (Yield &yield, Addr addr, void *ptr, size_t size)
 
void doWrite (Yield &yield, Addr addr, const void *ptr, size_t size)
 
void doDelay (Yield &yield, Cycles cycles)
 
void doSleep (Yield &yield)
 
void doSemaphoreDown (Yield &yield, SMMUSemaphore &sem)
 
void doSemaphoreUp (SMMUSemaphore &sem)
 
void doWaitForSignal (Yield &yield, SMMUSignal &sig)
 
void doBroadcastSignal (SMMUSignal &sig)
 
void scheduleWakeup (Tick when)
 
- Protected Attributes inherited from SMMUProcess
SMMUv3smmu
 

Detailed Description

Definition at line 63 of file smmu_v3_transl.hh.

Member Enumeration Documentation

◆ FaultType

Enumerator
FAULT_NONE 
FAULT_TRANSLATION 
FAULT_PERMISSION 

Definition at line 79 of file smmu_v3_transl.hh.

Constructor & Destructor Documentation

◆ SMMUTranslationProcess()

SMMUTranslationProcess::SMMUTranslationProcess ( const std::string &  name,
SMMUv3 _smmu,
SMMUv3DeviceInterface _ifc 
)

◆ ~SMMUTranslationProcess()

SMMUTranslationProcess::~SMMUTranslationProcess ( )
virtual

Member Function Documentation

◆ beginTransaction()

void SMMUTranslationProcess::beginTransaction ( const SMMUTranslRequest req)

◆ bypass()

SMMUTranslationProcess::TranslResult SMMUTranslationProcess::bypass ( Addr  addr) const
private

◆ combineTranslations()

SMMUTranslationProcess::TranslResult SMMUTranslationProcess::combineTranslations ( const TranslResult s1tr,
const TranslResult s2tr 
) const
private

◆ completePrefetch()

void SMMUTranslationProcess::completePrefetch ( Yield yield)
private

Definition at line 1286 of file smmu_v3_transl.cc.

References ArmISA::a, ACTION_TERMINATE, ifc, and SMMUv3DeviceInterface::xlateSlotsRemaining.

Referenced by main().

◆ completeTransaction()

void SMMUTranslationProcess::completeTransaction ( Yield yield,
const TranslResult tr 
)
private

◆ configCacheLookup()

bool SMMUTranslationProcess::configCacheLookup ( Yield yield,
TranslContext tc 
)
private

◆ configCacheUpdate()

void SMMUTranslationProcess::configCacheUpdate ( Yield yield,
const TranslContext tc 
)
private

◆ doReadCD()

void SMMUTranslationProcess::doReadCD ( Yield yield,
ContextDescriptor cd,
const StreamTableEntry ste,
uint32_t  sid,
uint32_t  ssid 
)
private

◆ doReadConfig()

void SMMUTranslationProcess::doReadConfig ( Yield yield,
Addr  addr,
void *  ptr,
size_t  size,
uint32_t  sid,
uint32_t  ssid 
)
private

Definition at line 1460 of file smmu_v3_transl.cc.

References addr, and SMMUProcess::doRead().

Referenced by doReadCD(), and doReadSTE().

◆ doReadPTE()

void SMMUTranslationProcess::doReadPTE ( Yield yield,
Addr  va,
Addr  addr,
void *  ptr,
unsigned  stage,
unsigned  level 
)
private

Definition at line 1468 of file smmu_v3_transl.cc.

References addr, X86ISA::base, SMMUProcess::doRead(), and ArmISA::mask.

Referenced by walkStage1And2(), and walkStage2().

◆ doReadSTE()

void SMMUTranslationProcess::doReadSTE ( Yield yield,
StreamTableEntry ste,
uint32_t  sid 
)
private

◆ findConfig()

bool SMMUTranslationProcess::findConfig ( Yield yield,
TranslContext tc,
TranslResult tr 
)
private

◆ hazard4kCheck()

bool SMMUTranslationProcess::hazard4kCheck ( )
private

Used to force ordering on transactions with same (SID, SSID, 4k page) to avoid multiple identical page-table walks.

Definition at line 1043 of file smmu_v3_transl.cc.

References SMMUTranslRequest::addr, SMMUv3DeviceInterface::duplicateReqs, ifc, request, and ULL.

Referenced by main().

◆ hazard4kHold()

void SMMUTranslationProcess::hazard4kHold ( Yield yield)
private

◆ hazard4kRegister()

void SMMUTranslationProcess::hazard4kRegister ( )
private

Definition at line 1060 of file smmu_v3_transl.cc.

References SMMUTranslRequest::addr, DPRINTF, SMMUv3DeviceInterface::duplicateReqs, ifc, and request.

Referenced by main().

◆ hazard4kRelease()

void SMMUTranslationProcess::hazard4kRelease ( )
private

◆ hazardIdHold()

void SMMUTranslationProcess::hazardIdHold ( Yield yield)
private

◆ hazardIdRegister()

void SMMUTranslationProcess::hazardIdRegister ( )
private

Used to force ordering on transactions with the same orderId.

This attempts to model AXI IDs.

Definition at line 1127 of file smmu_v3_transl.cc.

References SMMUv3DeviceInterface::dependentReads, SMMUv3DeviceInterface::dependentWrites, DPRINTF, ifc, SMMUTranslRequest::isWrite, AMBA::orderId(), SMMUTranslRequest::pkt, request, and SMMU_MAX_TRANS_ID.

Referenced by main().

◆ hazardIdRelease()

void SMMUTranslationProcess::hazardIdRelease ( )
private

◆ ifcTLBLookup()

bool SMMUTranslationProcess::ifcTLBLookup ( Yield yield,
TranslResult tr,
bool &  wasPrefetched 
)
private

◆ ifcTLBUpdate()

void SMMUTranslationProcess::ifcTLBUpdate ( Yield yield,
const TranslResult tr 
)
private

◆ issuePrefetch()

void SMMUTranslationProcess::issuePrefetch ( Addr  addr)
private

◆ main()

void SMMUTranslationProcess::main ( Yield yield)
privatevirtual

◆ microTLBLookup()

bool SMMUTranslationProcess::microTLBLookup ( Yield yield,
TranslResult tr 
)
private

◆ microTLBUpdate()

void SMMUTranslationProcess::microTLBUpdate ( Yield yield,
const TranslResult tr 
)
private

◆ resumeTransaction()

void SMMUTranslationProcess::resumeTransaction ( )

◆ sendEvent()

void SMMUTranslationProcess::sendEvent ( Yield yield,
const SMMUEvent ev 
)
private

◆ smmuTLBLookup()

bool SMMUTranslationProcess::smmuTLBLookup ( Yield yield,
TranslResult tr 
)
private

◆ smmuTLBUpdate()

void SMMUTranslationProcess::smmuTLBUpdate ( Yield yield,
const TranslResult tr 
)
private

◆ smmuTranslation()

SMMUTranslationProcess::TranslResult SMMUTranslationProcess::smmuTranslation ( Yield yield)
private

◆ translateStage1And2()

SMMUTranslationProcess::TranslResult SMMUTranslationProcess::translateStage1And2 ( Yield yield,
Addr  addr 
)
private

◆ translateStage2()

SMMUTranslationProcess::TranslResult SMMUTranslationProcess::translateStage2 ( Yield yield,
Addr  addr,
bool  final_tr 
)
private

◆ walkCacheLookup()

void SMMUTranslationProcess::walkCacheLookup ( Yield yield,
const WalkCache::Entry *&  walkEntry,
Addr  addr,
uint16_t  asid,
uint16_t  vmid,
unsigned  stage,
unsigned  level 
)
private

◆ walkCacheUpdate()

void SMMUTranslationProcess::walkCacheUpdate ( Yield yield,
Addr  va,
Addr  vaMask,
Addr  pa,
unsigned  stage,
unsigned  level,
bool  leaf,
uint8_t  permissions 
)
private

◆ walkStage1And2()

SMMUTranslationProcess::TranslResult SMMUTranslationProcess::walkStage1And2 ( Yield yield,
Addr  addr,
const PageTableOps pt_ops,
unsigned  level,
Addr  walkPtr 
)
private

◆ walkStage2()

SMMUTranslationProcess::TranslResult SMMUTranslationProcess::walkStage2 ( Yield yield,
Addr  addr,
bool  final_tr,
const PageTableOps pt_ops,
unsigned  level,
Addr  walkPtr 
)
private

Member Data Documentation

◆ context

TranslContext SMMUTranslationProcess::context
private

◆ faultTick

Tick M5_CLASS_VAR_USED SMMUTranslationProcess::faultTick
private

Definition at line 100 of file smmu_v3_transl.hh.

Referenced by resumeTransaction().

◆ ifc

SMMUv3DeviceInterface& SMMUTranslationProcess::ifc
private

◆ recvTick

Tick SMMUTranslationProcess::recvTick
private

Definition at line 99 of file smmu_v3_transl.hh.

Referenced by completeTransaction(), and main().

◆ request

SMMUTranslRequest SMMUTranslationProcess::request
private

The documentation for this class was generated from the following files:

Generated on Wed Sep 30 2020 14:02:32 for gem5 by doxygen 1.8.17