38#ifndef __DEV_ARM_GICV3_ITS_H__
39#define __DEV_ARM_GICV3_ITS_H__
51#include "params/Gicv3Its.hh"
57class Gicv3Redistributor;
131 static const uint64_t
BASER_SZ = 0x00000000000000FF;
167 Bitfield<31> quiescent;
183 Bitfield<63, 32>
high;
207 Bitfield<63, 32>
high;
237 bool idOutOfRange(uint32_t event_id, uint8_t itt_range) const;
295 VIRTUAL_INTERRUPT = 0,
296 PHYSICAL_INTERRUPT = 1
358 using DTE = Gicv3Its::DTE;
360 using CTE = Gicv3Its::CTE;
368 const std::string
name()
const;
379 Yield &yield,
const Addr itt_base, uint32_t event_id,
ITTE itte);
382 Yield &yield, uint32_t collection_id,
CTE cte);
385 Yield &yield, uint32_t device_id);
388 Yield &yield,
const Addr itt_base, uint32_t event_id);
490 std::underlying_type<enum CommandType>::type,
DispatchEntry>;
535 const auto size =
bits(command.
raw[1], 4, 0);
536 const auto valid =
bits(command.
raw[2], 63);
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,...
The AddrRange class encapsulates an address range, and supports a number of tests to check if two ran...
CallerType: A reference to an object of this class will be passed to the coroutine task.
This template defines a Coroutine wrapper type with a Boost-like interface.
bool recvTimingResp(PacketPtr pkt)
Receive a timing response from the peer.
void recvReqRetry()
Called by the peer if sendTimingReq was called on this peer (causing recvTimingReq to be called on th...
DataPort(const std::string &_name, Gicv3Its &_its)
static const uint32_t CTLR_QUIESCENT
void moveAllPendingState(Gicv3Redistributor *rd1, Gicv3Redistributor *rd2)
Bitfield< 9, 8 > pageSize
bool lpiOutOfRange(uint32_t intid) const
Returns TRUE if the value supplied is larger than that permitted by GICD_TYPER.IDbits or not in the L...
EndBitUnion(CTLR) BitUnion64(CRDWR) Bitfield< 63
Port & getPort(const std::string &if_name, PortID idx) override
Get a port with a given name and index.
Tick read(PacketPtr pkt) override
Pure virtual function that the device must implement.
Bitfield< 35, 32 > cidBits
bool deviceOutOfRange(uint32_t device_id) const
Returns TRUE if the value supplied has bits above the implemented range or if the value supplied exce...
Bitfield< 52, 48 > entrySize
static const uint64_t BASER_WMASK_UNIMPL
static const uint32_t NUM_BASER_REGS
Bitfield< 61, 59 > innerCache
bool collectionOutOfRange(uint32_t collection_id) const
Returns TRUE if the value supplied has bits above the implemented range or if the value exceeds the t...
void translate(PacketPtr pkt)
void unserialize(CheckpointIn &cp) override
Unserialize an object.
EventFunctionWrapper commandEvent
Gicv3Redistributor * getRedistributor(uint64_t rd_base)
std::vector< BASER > tableBases
Bitfield< 52, 1 > ittAddress
Bitfield< 29, 16 > intNumHyp
bool idOutOfRange(uint32_t event_id, uint8_t itt_range) const
Returns TRUE if the eventID supplied has bits above the implemented size or above the itt_range.
ItsAction runProcessTiming(ItsProcess *proc, PacketPtr pkt)
AddrRangeList getAddrRanges() const override
Determine the address ranges that this device responds to.
Bitfield< 11, 10 > shareability
ItsAction runProcess(ItsProcess *proc, PacketPtr pkt)
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
Gicv3Redistributor * getRedistributor(CTE cte)
void serialize(CheckpointOut &cp) const override
Serialize an object.
static const uint64_t BASER_INDIRECT
Gicv3Its(const Gicv3ItsParams ¶ms)
ItsAction runProcessAtomic(ItsProcess *proc, PacketPtr pkt)
static const uint64_t BASER_SZ
static const uint32_t itsTranslate
DrainState drain() override
Draining is the process of clearing out the states of SimObjects.These are the SimObjects that are pa...
Addr pageAddress(enum ItsTables table)
bool sizeOutOfRange(uint32_t size) const
Returns TRUE if the value (size) supplied exceeds the maximum allowed by GITS_TYPER....
Bitfield< 7, 4 > ittEntrySize
uint64_t maxCommands() const
Bitfield< 51, 12 > physAddr
Bitfield< 17, 13 > devBits
Bitfield< 7, 4 > itsNumber
Bitfield< 55, 53 > outerCache
static const uint64_t BASER_WMASK
static const AddrRange GITS_BASER
static const uint64_t BASER_TYPE
static const uint32_t itsControl
static const uint64_t BASER_ESZ
bool recvTimingResp(PacketPtr pkt)
BitUnion32(CTLR) Bitfield< 31 > quiescent
std::queue< ItsAction > packetsToRetry
void incrementReadPointer()
uint32_t pendingTranslations
An ItsCommand is created whenever there is a new command in the command queue.
void movall(Yield &yield, CommandEntry &command)
bool sizeOutOfRange(CommandEntry &command) const
void doInt(Yield &yield, CommandEntry &command)
bool idOutOfRange(CommandEntry &command, DTE dte) const
ItsCommand(Gicv3Its &_its)
void sync(Yield &yield, CommandEntry &command)
void vsync(Yield &yield, CommandEntry &command)
void invall(Yield &yield, CommandEntry &command)
void vmapp(Yield &yield, CommandEntry &command)
void readCommand(Yield &yield, CommandEntry &command)
void mapd(Yield &yield, CommandEntry &command)
void discard(Yield &yield, CommandEntry &command)
void processCommand(Yield &yield, CommandEntry &command)
void vmovp(Yield &yield, CommandEntry &command)
void vmovi(Yield &yield, CommandEntry &command)
void vmapti(Yield &yield, CommandEntry &command)
void clear(Yield &yield, CommandEntry &command)
void movi(Yield &yield, CommandEntry &command)
void mapc(Yield &yield, CommandEntry &command)
void vinvall(Yield &yield, CommandEntry &command)
void vmapi(Yield &yield, CommandEntry &command)
static std::string commandName(uint32_t cmd)
bool deviceOutOfRange(CommandEntry &command) const
static DispatchTable cmdDispatcher
std::unordered_map< std::underlying_type< enum CommandType >::type, DispatchEntry > DispatchTable
bool collectionOutOfRange(CommandEntry &command) const
void mapi(Yield &yield, CommandEntry &command)
void mapti(Yield &yield, CommandEntry &command)
ItsProcess is a base coroutine wrapper which is spawned by the Gicv3Its module when the latter needs ...
void writeIrqTranslationTable(Yield &yield, const Addr itt_base, uint32_t event_id, ITTE itte)
uint64_t readIrqCollectionTable(Yield &yield, uint32_t collection_id)
const std::string name() const
Returns the Gicv3Its name.
void terminate(Yield &yield)
ItsAction run(PacketPtr pkt)
void writeDeviceTable(Yield &yield, uint32_t device_id, DTE dte)
void doWrite(Yield &yield, Addr addr, void *ptr, size_t size)
ItsProcess(Gicv3Its &_its)
std::unique_ptr< Coroutine > coroutine
void doRead(Yield &yield, Addr addr, void *ptr, size_t size)
uint64_t readIrqTranslationTable(Yield &yield, const Addr itt_base, uint32_t event_id)
virtual void main(Yield &yield)=0
uint64_t readDeviceTable(Yield &yield, uint32_t device_id)
void writeIrqCollectionTable(Yield &yield, uint32_t collection_id, CTE cte)
An ItsTranslation is created whenever a peripheral writes a message in GITS_TRANSLATER (MSI).
ItsTranslation(Gicv3Its &_its)
std::pair< uint32_t, Gicv3Redistributor * > translateLPI(Yield &yield, uint32_t device_id, uint32_t event_id)
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Ports are used to interface objects to each other.
A RequestPort is a specialisation of a Port, which implements the default protocol for the three diff...
constexpr T bits(T val, unsigned first, unsigned last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
#define BitUnion64(name)
Use this to define conveniently sized values overlayed with bitfields.
#define EndBitUnion(name)
This closes off the class and union started by the above macro.
DrainState
Object drain/handover states.
const Params & params() const
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
std::ostream CheckpointOut
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
uint64_t Tick
Tick count type.
Overload hash function for BasicBlockRange type.
Dispatch entry is a metadata struct which contains information about the command (like the name) and ...
DispatchEntry(std::string _name, ExecFn _exec)
std::function< void(ItsCommand *, Yield &, CommandEntry &)> ExecFn
A virtual base opaque structure used to hold state associated with the packet (e.g....