gem5 v24.0.0.0
Loading...
Searching...
No Matches
gem5::SMMUTranslationProcess Class Reference

#include <smmu_v3_transl.hh>

Inheritance diagram for gem5::SMMUTranslationProcess:
gem5::SMMUProcess gem5::Packet::SenderState

Classes

struct  Fault
 
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 : uint8_t {
  FAULT_NONE , FAULT_UUT = 0x1 , FAULT_BAD_STREAMID = 0x2 , FAULT_STE_FETCH = 0x3 ,
  FAULT_BAD_STE = 0x4 , FAULT_BAD_ATS_TREQ = 0x5 , FAULT_STREAM_DISABLED = 0x6 , FAULT_TRANSL_FORBIDDEN = 0x7 ,
  FAULT_BAD_SUBSTREAMID = 0x8 , FAULT_CD_FETCH = 0x9 , FAULT_BAD_CD = 0xa , FAULT_WALK_EABT = 0xb ,
  FAULT_TRANSLATION = 0x10 , FAULT_ADDR_SIZE = 0x11 , FAULT_ACCESS = 0x12 , FAULT_PERMISSION = 0x13 ,
  FAULT_TLB_CONFLICT = 0x20 , FAULT_CFG_CONFLICT = 0x21 , FAULT_PAGE_REQUEST = 0x24 , FAULT_VMS_FETCH = 0x25
}
 
enum  FaultClass { CD = 0x0 , TT = 0x1 , IN = 0x2 , RESERVED = 0x3 }
 

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 ArmISA::PageTableOps *pt_ops, unsigned level, Addr walkPtr)
 
TranslResult walkStage2 (Yield &yield, Addr addr, bool final_tr, const ArmISA::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.
 
void hazard4kRegister ()
 
void hazard4kHold (Yield &yield)
 
void hazard4kRelease ()
 
void hazardIdRegister ()
 Used to force ordering on transactions with the same orderId.
 
void hazardIdHold (Yield &yield)
 
void hazardIdRelease ()
 
void issuePrefetch (Addr addr)
 
void abortTransaction (Yield &yield, const TranslResult &tr)
 
void completeTransaction (Yield &yield, const TranslResult &tr)
 
void completePrefetch (Yield &yield)
 
SMMUEvent generateEvent (const TranslResult &tr)
 
void sendEvent (Yield &yield, const SMMUEvent &ev)
 
void sendEventInterrupt (Yield &yield)
 
void doReadSTE (Yield &yield, StreamTableEntry &ste, uint32_t sid)
 
TranslResult 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 70 of file smmu_v3_transl.hh.

Member Enumeration Documentation

◆ FaultClass

Enumerator
CD 
TT 
IN 
RESERVED 

Definition at line 111 of file smmu_v3_transl.hh.

◆ FaultType

Enumerator
FAULT_NONE 
FAULT_UUT 
FAULT_BAD_STREAMID 
FAULT_STE_FETCH 
FAULT_BAD_STE 
FAULT_BAD_ATS_TREQ 
FAULT_STREAM_DISABLED 
FAULT_TRANSL_FORBIDDEN 
FAULT_BAD_SUBSTREAMID 
FAULT_CD_FETCH 
FAULT_BAD_CD 
FAULT_WALK_EABT 
FAULT_TRANSLATION 
FAULT_ADDR_SIZE 
FAULT_ACCESS 
FAULT_PERMISSION 
FAULT_TLB_CONFLICT 
FAULT_CFG_CONFLICT 
FAULT_PAGE_REQUEST 
FAULT_VMS_FETCH 

Definition at line 86 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

◆ abortTransaction()

◆ beginTransaction()

◆ bypass()

◆ combineTranslations()

◆ completePrefetch()

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

◆ completeTransaction()

◆ configCacheLookup()

◆ configCacheUpdate()

◆ doReadCD()

◆ doReadConfig()

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

Definition at line 1576 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()

◆ findConfig()

◆ generateEvent()

◆ 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 1054 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()

◆ 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 1138 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()

◆ ifcTLBLookup()

◆ ifcTLBUpdate()

◆ issuePrefetch()

◆ main()

◆ microTLBLookup()

◆ microTLBUpdate()

◆ resumeTransaction()

◆ sendEvent()

◆ sendEventInterrupt()

void gem5::SMMUTranslationProcess::sendEventInterrupt ( Yield & yield)
private

◆ smmuTLBLookup()

◆ smmuTLBUpdate()

◆ smmuTranslation()

◆ translateStage1And2()

◆ translateStage2()

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

◆ walkCacheLookup()

◆ walkCacheUpdate()

◆ walkStage1And2()

◆ walkStage2()

Member Data Documentation

◆ context

◆ faultTick

GEM5_CLASS_VAR_USED Tick gem5::SMMUTranslationProcess::faultTick
private

Definition at line 162 of file smmu_v3_transl.hh.

Referenced by resumeTransaction().

◆ ifc

◆ recvTick

Tick gem5::SMMUTranslationProcess::recvTick
private

Definition at line 161 of file smmu_v3_transl.hh.

Referenced by completeTransaction(), and main().

◆ request


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

Generated on Tue Jun 18 2024 16:24:14 for gem5 by doxygen 1.11.0