gem5  v21.1.0.2
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
gem5::SMMUTranslationProcess Class Reference

#include <smmu_v3_transl.hh>

Inheritance diagram for gem5::SMMUTranslationProcess:
gem5::SMMUProcess gem5::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 gem5::SMMUProcess
 SMMUProcess (const std::string &name, SMMUv3 &_smmu)
 
virtual ~SMMUProcess ()
 
SMMUAction run (PacketPtr pkt)
 
const std::string name () const
 
- Public Member Functions inherited from gem5::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
 
GEM5_CLASS_VAR_USED Tick faultTick
 

Additional Inherited Members

- Public Attributes inherited from gem5::Packet::SenderState
SenderStatepredecessor
 
- Protected Types inherited from gem5::SMMUProcess
typedef Coroutine::CallerType Yield
 
- Protected Member Functions inherited from gem5::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 gem5::SMMUProcess
SMMUv3smmu
 

Detailed Description

Definition at line 66 of file smmu_v3_transl.hh.

Member Enumeration Documentation

◆ FaultType

Enumerator
FAULT_NONE 
FAULT_TRANSLATION 
FAULT_PERMISSION 

Definition at line 82 of file smmu_v3_transl.hh.

Constructor & Destructor Documentation

◆ SMMUTranslationProcess()

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

◆ ~SMMUTranslationProcess()

gem5::SMMUTranslationProcess::~SMMUTranslationProcess ( )
virtual

Member Function Documentation

◆ beginTransaction()

void gem5::SMMUTranslationProcess::beginTransaction ( const SMMUTranslRequest req)

◆ bypass()

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

◆ combineTranslations()

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

◆ completePrefetch()

void gem5::SMMUTranslationProcess::completePrefetch ( Yield yield)
private

◆ completeTransaction()

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

◆ configCacheLookup()

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

◆ configCacheUpdate()

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

◆ doReadCD()

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

◆ doReadConfig()

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

Definition at line 1464 of file smmu_v3_transl.cc.

References gem5::X86ISA::addr, and gem5::SMMUProcess::doRead().

Referenced by doReadCD(), and doReadSTE().

◆ doReadPTE()

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

◆ doReadSTE()

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

◆ findConfig()

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

◆ hazard4kCheck()

bool gem5::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 1046 of file smmu_v3_transl.cc.

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

Referenced by main().

◆ hazard4kHold()

void gem5::SMMUTranslationProcess::hazard4kHold ( Yield yield)
private

◆ hazard4kRegister()

void gem5::SMMUTranslationProcess::hazard4kRegister ( )
private

◆ hazard4kRelease()

void gem5::SMMUTranslationProcess::hazard4kRelease ( )
private

◆ hazardIdHold()

void gem5::SMMUTranslationProcess::hazardIdHold ( Yield yield)
private

◆ hazardIdRegister()

void gem5::SMMUTranslationProcess::hazardIdRegister ( )
private

Used to force ordering on transactions with the same orderId.

This attempts to model AXI IDs.

Definition at line 1130 of file smmu_v3_transl.cc.

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

Referenced by main().

◆ hazardIdRelease()

void gem5::SMMUTranslationProcess::hazardIdRelease ( )
private

◆ ifcTLBLookup()

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

◆ ifcTLBUpdate()

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

◆ issuePrefetch()

void gem5::SMMUTranslationProcess::issuePrefetch ( Addr  addr)
private

◆ main()

void gem5::SMMUTranslationProcess::main ( Yield yield)
privatevirtual

◆ microTLBLookup()

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

◆ microTLBUpdate()

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

◆ resumeTransaction()

void gem5::SMMUTranslationProcess::resumeTransaction ( )

◆ sendEvent()

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

◆ smmuTLBLookup()

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

◆ smmuTLBUpdate()

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

◆ smmuTranslation()

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

◆ translateStage1And2()

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

◆ translateStage2()

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

◆ walkCacheLookup()

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

◆ walkCacheUpdate()

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

◆ walkStage1And2()

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

◆ walkStage2()

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

Member Data Documentation

◆ context

TranslContext gem5::SMMUTranslationProcess::context
private

◆ faultTick

GEM5_CLASS_VAR_USED Tick gem5::SMMUTranslationProcess::faultTick
private

Definition at line 103 of file smmu_v3_transl.hh.

Referenced by resumeTransaction().

◆ ifc

SMMUv3DeviceInterface& gem5::SMMUTranslationProcess::ifc
private

◆ recvTick

Tick gem5::SMMUTranslationProcess::recvTick
private

Definition at line 102 of file smmu_v3_transl.hh.

Referenced by completeTransaction(), and main().

◆ request

SMMUTranslRequest gem5::SMMUTranslationProcess::request
private

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

Generated on Tue Sep 21 2021 12:28:10 for gem5 by doxygen 1.8.17