gem5  v20.1.0.0
Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Static Protected Attributes | List of all members
ItsCommand Class Reference

An ItsCommand is created whenever there is a new command in the command queue. More...

#include <gic_v3_its.hh>

Inheritance diagram for ItsCommand:
ItsProcess Packet::SenderState

Classes

union  CommandEntry
 
struct  DispatchEntry
 Dispatch entry is a metadata struct which contains information about the command (like the name) and the function object implementing the command. More...
 

Public Types

enum  CommandType : uint32_t {
  CLEAR = 0x04, DISCARD = 0x0F, INT = 0x03, INV = 0x0C,
  INVALL = 0x0D, MAPC = 0x09, MAPD = 0x08, MAPI = 0x0B,
  MAPTI = 0x0A, MOVALL = 0x0E, MOVI = 0x01, SYNC = 0x05,
  VINVALL = 0x2D, VMAPI = 0x2B, VMAPP = 0x29, VMAPTI = 0x2A,
  VMOVI = 0x21, VMOVP = 0x22, VSYNC = 0x25
}
 
- Public Types inherited from ItsProcess
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

 ItsCommand (Gicv3Its &_its)
 
 ~ItsCommand ()
 
- Public Member Functions inherited from ItsProcess
 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 Types

using DispatchTable = std::unordered_map< std::underlying_type< enum CommandType >::type, DispatchEntry >
 

Protected Member Functions

void main (Yield &yield) override
 
void readCommand (Yield &yield, CommandEntry &command)
 
void processCommand (Yield &yield, CommandEntry &command)
 
void clear (Yield &yield, CommandEntry &command)
 
void discard (Yield &yield, CommandEntry &command)
 
void mapc (Yield &yield, CommandEntry &command)
 
void mapd (Yield &yield, CommandEntry &command)
 
void mapi (Yield &yield, CommandEntry &command)
 
void mapti (Yield &yield, CommandEntry &command)
 
void movall (Yield &yield, CommandEntry &command)
 
void movi (Yield &yield, CommandEntry &command)
 
void sync (Yield &yield, CommandEntry &command)
 
void doInt (Yield &yield, CommandEntry &command)
 
void inv (Yield &yield, CommandEntry &command)
 
void invall (Yield &yield, CommandEntry &command)
 
void vinvall (Yield &yield, CommandEntry &command)
 
void vmapi (Yield &yield, CommandEntry &command)
 
void vmapp (Yield &yield, CommandEntry &command)
 
void vmapti (Yield &yield, CommandEntry &command)
 
void vmovi (Yield &yield, CommandEntry &command)
 
void vmovp (Yield &yield, CommandEntry &command)
 
void vsync (Yield &yield, CommandEntry &command)
 
bool idOutOfRange (CommandEntry &command, DTE dte) const
 
bool deviceOutOfRange (CommandEntry &command) const
 
bool sizeOutOfRange (CommandEntry &command) const
 
bool collectionOutOfRange (CommandEntry &command) const
 
- Protected Member Functions inherited from ItsProcess
void reinit ()
 
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)
 

Static Protected Member Functions

static std::string commandName (uint32_t cmd)
 

Static Protected Attributes

static DispatchTable cmdDispatcher
 

Additional Inherited Members

- Public Attributes inherited from Packet::SenderState
SenderStatepredecessor
 
- Protected Attributes inherited from ItsProcess
Gicv3Itsits
 

Detailed Description

An ItsCommand is created whenever there is a new command in the command queue.

Only one command can be executed per time. main will firstly read the command from memory and then it will process it.

Definition at line 418 of file gic_v3_its.hh.

Member Typedef Documentation

◆ DispatchTable

using ItsCommand::DispatchTable = std::unordered_map< std::underlying_type<enum CommandType>::type, DispatchEntry>
protected

Definition at line 480 of file gic_v3_its.hh.

Member Enumeration Documentation

◆ CommandType

enum ItsCommand::CommandType : uint32_t
Enumerator
CLEAR 
DISCARD 
INT 
INV 
INVALL 
MAPC 
MAPD 
MAPI 
MAPTI 
MOVALL 
MOVI 
SYNC 
VINVALL 
VMAPI 
VMAPP 
VMAPTI 
VMOVI 
VMOVP 
VSYNC 

Definition at line 435 of file gic_v3_its.hh.

Constructor & Destructor Documentation

◆ ItsCommand()

ItsCommand::ItsCommand ( Gicv3Its _its)

Definition at line 310 of file gic_v3_its.cc.

References ItsProcess::its, Gicv3Its::pendingCommands, and ItsProcess::reinit().

◆ ~ItsCommand()

ItsCommand::~ItsCommand ( )

Member Function Documentation

◆ clear()

void ItsCommand::clear ( Yield yield,
CommandEntry command 
)
protected

◆ collectionOutOfRange()

bool ItsCommand::collectionOutOfRange ( CommandEntry command) const
inlineprotected

◆ commandName()

std::string ItsCommand::commandName ( uint32_t  cmd)
staticprotected

Definition at line 328 of file gic_v3_its.cc.

References cmdDispatcher.

Referenced by readCommand().

◆ deviceOutOfRange()

bool ItsCommand::deviceOutOfRange ( CommandEntry command) const
inlineprotected

◆ discard()

void ItsCommand::discard ( Yield yield,
CommandEntry command 
)
protected

◆ doInt()

void ItsCommand::doInt ( Yield yield,
CommandEntry command 
)
protected

◆ idOutOfRange()

bool ItsCommand::idOutOfRange ( CommandEntry command,
DTE  dte 
) const
inlineprotected

◆ inv()

void ItsCommand::inv ( Yield yield,
CommandEntry command 
)
protected

◆ invall()

void ItsCommand::invall ( Yield yield,
CommandEntry command 
)
protected

◆ main()

void ItsCommand::main ( Yield yield)
overrideprotectedvirtual

◆ mapc()

void ItsCommand::mapc ( Yield yield,
CommandEntry command 
)
protected

◆ mapd()

void ItsCommand::mapd ( Yield yield,
CommandEntry command 
)
protected

◆ mapi()

void ItsCommand::mapi ( Yield yield,
CommandEntry command 
)
protected

◆ mapti()

void ItsCommand::mapti ( Yield yield,
CommandEntry command 
)
protected

◆ movall()

void ItsCommand::movall ( Yield yield,
CommandEntry command 
)
protected

◆ movi()

void ItsCommand::movi ( Yield yield,
CommandEntry command 
)
protected

◆ processCommand()

void ItsCommand::processCommand ( Yield yield,
CommandEntry command 
)
protected

Definition at line 373 of file gic_v3_its.cc.

References cmdDispatcher, panic, and ItsCommand::CommandEntry::type.

Referenced by main().

◆ readCommand()

void ItsCommand::readCommand ( Yield yield,
CommandEntry command 
)
protected

◆ sizeOutOfRange()

bool ItsCommand::sizeOutOfRange ( CommandEntry command) const
inlineprotected

Definition at line 523 of file gic_v3_its.hh.

References bits(), ItsProcess::its, ItsCommand::CommandEntry::raw, and Gicv3Its::sizeOutOfRange().

Referenced by mapd().

◆ sync()

void ItsCommand::sync ( Yield yield,
CommandEntry command 
)
protected

Definition at line 727 of file gic_v3_its.cc.

References warn.

◆ vinvall()

void ItsCommand::vinvall ( Yield yield,
CommandEntry command 
)
protected

Definition at line 733 of file gic_v3_its.cc.

References panic.

◆ vmapi()

void ItsCommand::vmapi ( Yield yield,
CommandEntry command 
)
protected

Definition at line 739 of file gic_v3_its.cc.

References panic.

◆ vmapp()

void ItsCommand::vmapp ( Yield yield,
CommandEntry command 
)
protected

Definition at line 745 of file gic_v3_its.cc.

References panic.

◆ vmapti()

void ItsCommand::vmapti ( Yield yield,
CommandEntry command 
)
protected

Definition at line 751 of file gic_v3_its.cc.

References panic.

◆ vmovi()

void ItsCommand::vmovi ( Yield yield,
CommandEntry command 
)
protected

Definition at line 757 of file gic_v3_its.cc.

References panic.

◆ vmovp()

void ItsCommand::vmovp ( Yield yield,
CommandEntry command 
)
protected

Definition at line 763 of file gic_v3_its.cc.

References panic.

◆ vsync()

void ItsCommand::vsync ( Yield yield,
CommandEntry command 
)
protected

Definition at line 769 of file gic_v3_its.cc.

References panic.

Member Data Documentation

◆ cmdDispatcher

ItsCommand::DispatchTable ItsCommand::cmdDispatcher
staticprotected

The documentation for this class was generated from the following files:
ItsCommand::MOVALL
@ MOVALL
Definition: gic_v3_its.hh:446
ItsCommand::movall
void movall(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:652
ItsCommand::vmapp
void vmapp(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:745
ItsCommand::doInt
void doInt(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:460
ItsCommand::vsync
void vsync(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:769
ItsCommand::VMOVP
@ VMOVP
Definition: gic_v3_its.hh:454
ItsCommand::MAPI
@ MAPI
Definition: gic_v3_its.hh:444
ItsCommand::MAPTI
@ MAPTI
Definition: gic_v3_its.hh:445
ItsCommand::INV
@ INV
Definition: gic_v3_its.hh:440
ItsCommand::SYNC
@ SYNC
Definition: gic_v3_its.hh:448
ItsCommand::VMAPP
@ VMAPP
Definition: gic_v3_its.hh:451
ItsCommand::VSYNC
@ VSYNC
Definition: gic_v3_its.hh:455
ItsCommand::mapi
void mapi(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:582
ItsCommand::sync
void sync(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:727
ItsCommand::movi
void movi(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:666
ItsCommand::MAPC
@ MAPC
Definition: gic_v3_its.hh:442
ItsCommand::INVALL
@ INVALL
Definition: gic_v3_its.hh:441
ItsCommand::mapd
void mapd(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:566
ItsCommand::clear
void clear(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:386
ItsCommand::vmapi
void vmapi(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:739
ItsCommand::INT
@ INT
Definition: gic_v3_its.hh:439
ItsCommand::vmapti
void vmapti(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:751
ItsCommand::vmovp
void vmovp(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:763
ItsCommand::vmovi
void vmovi(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:757
ItsCommand::mapc
void mapc(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:549
ItsCommand::MAPD
@ MAPD
Definition: gic_v3_its.hh:443
ItsCommand::discard
void discard(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:421
ItsCommand::vinvall
void vinvall(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:733
ItsCommand::VINVALL
@ VINVALL
Definition: gic_v3_its.hh:449
ItsCommand::inv
void inv(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:495
ItsCommand::invall
void invall(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:529
ItsCommand::mapti
void mapti(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:616
COMMAND
#define COMMAND(x, method)
Definition: gic_v3_its.cc:49
ItsCommand::DISCARD
@ DISCARD
Definition: gic_v3_its.hh:438
ItsCommand::VMAPI
@ VMAPI
Definition: gic_v3_its.hh:450
ItsCommand::CLEAR
@ CLEAR
Definition: gic_v3_its.hh:437
ItsCommand::VMAPTI
@ VMAPTI
Definition: gic_v3_its.hh:452
ItsCommand::VMOVI
@ VMOVI
Definition: gic_v3_its.hh:453
ItsCommand::MOVI
@ MOVI
Definition: gic_v3_its.hh:447

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