gem5  v20.1.0.0
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
ItsProcess Class Referenceabstract

ItsProcess is a base coroutine wrapper which is spawned by the Gicv3Its module when the latter needs to perform different actions, like translating a peripheral's MSI into an LPI (See derived ItsTranslation) or processing a Command from the ITS queue (ItsCommand). More...

#include <gic_v3_its.hh>

Inheritance diagram for ItsProcess:
Packet::SenderState ItsCommand ItsTranslation

Public Types

using DTE = Gicv3Its::DTE
 
using ITTE = Gicv3Its::ITTE
 
using CTE = Gicv3Its::CTE
 
using Coroutine = m5::Coroutine< PacketPtr, ItsAction >
 
using Yield = Coroutine::CallerType
 

Public Member Functions

 ItsProcess (Gicv3Its &_its)
 
virtual ~ItsProcess ()
 
const std::string name () const
 Returns the Gicv3Its name. More...
 
ItsAction run (PacketPtr pkt)
 
- Public Member Functions inherited from Packet::SenderState
 SenderState ()
 
virtual ~SenderState ()
 

Protected Member Functions

void reinit ()
 
virtual void main (Yield &yield)=0
 
void writeDeviceTable (Yield &yield, uint32_t device_id, DTE dte)
 
void writeIrqTranslationTable (Yield &yield, const Addr itt_base, uint32_t event_id, ITTE itte)
 
void writeIrqCollectionTable (Yield &yield, uint32_t collection_id, CTE cte)
 
uint64_t readDeviceTable (Yield &yield, uint32_t device_id)
 
uint64_t readIrqTranslationTable (Yield &yield, const Addr itt_base, uint32_t event_id)
 
uint64_t readIrqCollectionTable (Yield &yield, uint32_t collection_id)
 
void doRead (Yield &yield, Addr addr, void *ptr, size_t size)
 
void doWrite (Yield &yield, Addr addr, void *ptr, size_t size)
 
void terminate (Yield &yield)
 

Protected Attributes

Gicv3Itsits
 

Private Attributes

std::unique_ptr< Coroutinecoroutine
 

Additional Inherited Members

- Public Attributes inherited from Packet::SenderState
SenderStatepredecessor
 

Detailed Description

ItsProcess is a base coroutine wrapper which is spawned by the Gicv3Its module when the latter needs to perform different actions, like translating a peripheral's MSI into an LPI (See derived ItsTranslation) or processing a Command from the ITS queue (ItsCommand).

The action to take is implemented by the method:

virtual void main(Yield &yield) = 0; It's inheriting from Packet::SenderState since the generic process will be stopped (we are using coroutines) and sent with the packet to memory when doing table walks. When Gicv3Its receives a response, it will resume the coroutine from the point it stopped when yielding.

Definition at line 345 of file gic_v3_its.hh.

Member Typedef Documentation

◆ Coroutine

Definition at line 351 of file gic_v3_its.hh.

◆ CTE

using ItsProcess::CTE = Gicv3Its::CTE

Definition at line 350 of file gic_v3_its.hh.

◆ DTE

using ItsProcess::DTE = Gicv3Its::DTE

Definition at line 348 of file gic_v3_its.hh.

◆ ITTE

using ItsProcess::ITTE = Gicv3Its::ITTE

Definition at line 349 of file gic_v3_its.hh.

◆ Yield

Definition at line 352 of file gic_v3_its.hh.

Constructor & Destructor Documentation

◆ ItsProcess()

ItsProcess::ItsProcess ( Gicv3Its _its)

Definition at line 55 of file gic_v3_its.cc.

◆ ~ItsProcess()

ItsProcess::~ItsProcess ( )
virtual

Definition at line 60 of file gic_v3_its.cc.

Member Function Documentation

◆ doRead()

void ItsProcess::doRead ( Yield yield,
Addr  addr,
void *  ptr,
size_t  size 
)
protected

◆ doWrite()

void ItsProcess::doWrite ( Yield yield,
Addr  addr,
void *  ptr,
size_t  size 
)
protected

◆ main()

virtual void ItsProcess::main ( Yield yield)
protectedpure virtual

Implemented in ItsCommand, and ItsTranslation.

Referenced by reinit().

◆ name()

const std::string ItsProcess::name ( ) const

Returns the Gicv3Its name.

Mainly used for DPRINTS

Definition at line 72 of file gic_v3_its.cc.

References its, and SimObject::name().

◆ readDeviceTable()

uint64_t ItsProcess::readDeviceTable ( Yield yield,
uint32_t  device_id 
)
protected

◆ readIrqCollectionTable()

uint64_t ItsProcess::readIrqCollectionTable ( Yield yield,
uint32_t  collection_id 
)
protected

◆ readIrqTranslationTable()

uint64_t ItsProcess::readIrqTranslationTable ( Yield yield,
const Addr  itt_base,
uint32_t  event_id 
)
protected

◆ reinit()

void ItsProcess::reinit ( )
protected

Definition at line 65 of file gic_v3_its.cc.

References coroutine, and main().

Referenced by ItsCommand::ItsCommand(), and ItsTranslation::ItsTranslation().

◆ run()

ItsAction ItsProcess::run ( PacketPtr  pkt)

Definition at line 78 of file gic_v3_its.cc.

References coroutine.

Referenced by Gicv3Its::runProcessAtomic(), and Gicv3Its::runProcessTiming().

◆ terminate()

void ItsProcess::terminate ( Yield yield)
protected

◆ writeDeviceTable()

void ItsProcess::writeDeviceTable ( Yield yield,
uint32_t  device_id,
DTE  dte 
)
protected

Definition at line 144 of file gic_v3_its.cc.

References X86ISA::base, Gicv3Its::DEVICE_TABLE, doWrite(), DPRINTF, its, and Gicv3Its::pageAddress().

Referenced by ItsCommand::mapd().

◆ writeIrqCollectionTable()

void ItsProcess::writeIrqCollectionTable ( Yield yield,
uint32_t  collection_id,
CTE  cte 
)
protected

◆ writeIrqTranslationTable()

void ItsProcess::writeIrqTranslationTable ( Yield yield,
const Addr  itt_base,
uint32_t  event_id,
ITTE  itte 
)
protected

Definition at line 155 of file gic_v3_its.cc.

References doWrite(), and DPRINTF.

Referenced by ItsCommand::discard(), ItsCommand::mapi(), ItsCommand::mapti(), and ItsCommand::movi().

Member Data Documentation

◆ coroutine

std::unique_ptr<Coroutine> ItsProcess::coroutine
private

Definition at line 390 of file gic_v3_its.hh.

Referenced by reinit(), and run().

◆ its

Gicv3Its& ItsProcess::its
protected

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

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