gem5
v20.1.0.0
|
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>
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 | |
Gicv3Its & | its |
Private Attributes | |
std::unique_ptr< Coroutine > | coroutine |
Additional Inherited Members | |
Public Attributes inherited from Packet::SenderState | |
SenderState * | predecessor |
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.
using ItsProcess::Coroutine = m5::Coroutine<PacketPtr, ItsAction> |
Definition at line 351 of file gic_v3_its.hh.
using ItsProcess::CTE = Gicv3Its::CTE |
Definition at line 350 of file gic_v3_its.hh.
using ItsProcess::DTE = Gicv3Its::DTE |
Definition at line 348 of file gic_v3_its.hh.
using ItsProcess::ITTE = Gicv3Its::ITTE |
Definition at line 349 of file gic_v3_its.hh.
Definition at line 352 of file gic_v3_its.hh.
ItsProcess::ItsProcess | ( | Gicv3Its & | _its | ) |
Definition at line 55 of file gic_v3_its.cc.
|
virtual |
Definition at line 60 of file gic_v3_its.cc.
Definition at line 86 of file gic_v3_its.cc.
References ArmISA::a, addr, ContextSwitchTaskId::DMA, m5::Coroutine< Arg, Ret >::CallerType::get(), Packet::getSize(), its, MemCmd::ReadReq, Gicv3Its::requestorId, SEND_REQ, and Gicv3Its::size.
Referenced by ItsCommand::readCommand(), readDeviceTable(), readIrqCollectionTable(), and readIrqTranslationTable().
Definition at line 110 of file gic_v3_its.cc.
References ArmISA::a, addr, ContextSwitchTaskId::DMA, m5::Coroutine< Arg, Ret >::CallerType::get(), Packet::getSize(), its, Gicv3Its::requestorId, SEND_REQ, Gicv3Its::size, and MemCmd::WriteReq.
Referenced by writeDeviceTable(), writeIrqCollectionTable(), and writeIrqTranslationTable().
|
protectedpure virtual |
Implemented in ItsCommand, and ItsTranslation.
Referenced by reinit().
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().
|
protected |
Definition at line 178 of file gic_v3_its.cc.
References X86ISA::base, Gicv3Its::DEVICE_TABLE, doRead(), DPRINTF, its, and Gicv3Its::pageAddress().
Referenced by ItsCommand::clear(), ItsCommand::discard(), ItsCommand::doInt(), ItsCommand::inv(), ItsCommand::mapi(), ItsCommand::mapti(), ItsCommand::movi(), and ItsTranslation::translateLPI().
|
protected |
Definition at line 204 of file gic_v3_its.cc.
References X86ISA::base, Gicv3Its::COLLECTION_TABLE, doRead(), DPRINTF, its, and Gicv3Its::pageAddress().
Referenced by ItsCommand::clear(), ItsCommand::discard(), ItsCommand::doInt(), ItsCommand::inv(), ItsCommand::invall(), ItsCommand::movi(), and ItsTranslation::translateLPI().
|
protected |
Definition at line 191 of file gic_v3_its.cc.
References doRead(), and DPRINTF.
Referenced by ItsCommand::clear(), ItsCommand::discard(), ItsCommand::doInt(), ItsCommand::inv(), ItsCommand::mapi(), ItsCommand::mapti(), ItsCommand::movi(), and ItsTranslation::translateLPI().
|
protected |
Definition at line 65 of file gic_v3_its.cc.
References coroutine, and main().
Referenced by ItsCommand::ItsCommand(), and ItsTranslation::ItsTranslation().
Definition at line 78 of file gic_v3_its.cc.
References coroutine.
Referenced by Gicv3Its::runProcessAtomic(), and Gicv3Its::runProcessTiming().
|
protected |
Definition at line 134 of file gic_v3_its.cc.
References ArmISA::a, and TERMINATE.
Referenced by ItsCommand::clear(), ItsCommand::discard(), ItsCommand::doInt(), ItsCommand::inv(), ItsCommand::invall(), ItsTranslation::main(), ItsCommand::main(), ItsCommand::mapc(), ItsCommand::mapd(), ItsCommand::mapi(), ItsCommand::mapti(), ItsCommand::movi(), and ItsTranslation::translateLPI().
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().
|
protected |
Definition at line 166 of file gic_v3_its.cc.
References X86ISA::base, Gicv3Its::COLLECTION_TABLE, doWrite(), DPRINTF, its, and Gicv3Its::pageAddress().
Referenced by ItsCommand::mapc().
|
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().
|
private |
Definition at line 390 of file gic_v3_its.hh.
|
protected |
Definition at line 387 of file gic_v3_its.hh.
Referenced by ItsCommand::clear(), ItsCommand::collectionOutOfRange(), ItsCommand::deviceOutOfRange(), ItsCommand::discard(), ItsCommand::doInt(), doRead(), doWrite(), ItsCommand::idOutOfRange(), ItsCommand::inv(), ItsCommand::invall(), ItsCommand::ItsCommand(), ItsTranslation::ItsTranslation(), ItsTranslation::main(), ItsCommand::main(), ItsCommand::mapc(), ItsCommand::mapd(), ItsCommand::mapi(), ItsCommand::mapti(), ItsCommand::movall(), ItsCommand::movi(), name(), ItsCommand::readCommand(), readDeviceTable(), readIrqCollectionTable(), ItsCommand::sizeOutOfRange(), ItsTranslation::translateLPI(), writeDeviceTable(), writeIrqCollectionTable(), ItsCommand::~ItsCommand(), and ItsTranslation::~ItsTranslation().