gem5 v24.0.0.0
|
#include <gic_v2.hh>
Classes | |
struct | BankedRegs |
Registers "banked for each connected processor" per ARM IHI0048B. More... | |
Public Types | |
using | Params = GicV2Params |
Public Types inherited from gem5::BaseGic | |
enum class | GicVersion { GIC_V2 , GIC_V3 , GIC_V4 } |
typedef BaseGicParams | Params |
Public Types inherited from gem5::PioDevice | |
using | Params = PioDeviceParams |
Public Types inherited from gem5::ClockedObject | |
using | Params = ClockedObjectParams |
Parameters of ClockedObject. | |
Public Types inherited from gem5::SimObject | |
typedef SimObjectParams | Params |
Public Member Functions | |
GicV2 (const Params &p) | |
~GicV2 () | |
DrainState | drain () override |
Draining is the process of clearing out the states of SimObjects.These are the SimObjects that are partially executed or are partially in flight. | |
void | drainResume () override |
Resume execution after a successful drain. | |
void | serialize (CheckpointOut &cp) const override |
Serialize an object. | |
void | unserialize (CheckpointIn &cp) override |
Unserialize an object. | |
AddrRangeList | getAddrRanges () const override |
Every PIO device is obliged to provide an implementation that returns the address ranges the device responds to. | |
Tick | read (PacketPtr pkt) override |
A PIO read to the device, immediately split up into readDistributor() or readCpu() | |
Tick | write (PacketPtr pkt) override |
A PIO read to the device, immediately split up into writeDistributor() or writeCpu() | |
void | sendInt (uint32_t number) override |
Post an interrupt from a device that is connected to the GIC. | |
void | clearInt (uint32_t number) override |
Clear an interrupt from a device that is connected to the GIC. | |
void | sendPPInt (uint32_t num, uint32_t cpu) override |
Interface call for private peripheral interrupts. | |
void | clearPPInt (uint32_t num, uint32_t cpu) override |
bool | supportsVersion (GicVersion version) override |
Check if version supported. | |
Public Member Functions inherited from gem5::BaseGic | |
BaseGic (const Params &p) | |
virtual | ~BaseGic () |
void | init () override |
init() is called after all C++ SimObjects have been created and all ports are connected. | |
const Params & | params () const |
ArmSystem * | getSystem () const |
Public Member Functions inherited from gem5::PioDevice | |
PioDevice (const Params &p) | |
virtual | ~PioDevice () |
void | init () override |
init() is called after all C++ SimObjects have been created and all ports are connected. | |
Port & | getPort (const std::string &if_name, PortID idx=InvalidPortID) override |
Get a port with a given name and index. | |
Public Member Functions inherited from gem5::ClockedObject | |
ClockedObject (const ClockedObjectParams &p) | |
Public Member Functions inherited from gem5::SimObject | |
const Params & | params () const |
SimObject (const Params &p) | |
virtual | ~SimObject () |
virtual void | loadState (CheckpointIn &cp) |
loadState() is called on each SimObject when restoring from a checkpoint. | |
virtual void | initState () |
initState() is called on each SimObject when not restoring from a checkpoint. | |
virtual void | regProbePoints () |
Register probe points for this object. | |
virtual void | regProbeListeners () |
Register probe listeners for this object. | |
ProbeManager * | getProbeManager () |
Get the probe manager for this object. | |
virtual void | startup () |
startup() is the final initialization call before simulation. | |
DrainState | drain () override |
Provide a default implementation of the drain interface for objects that don't need draining. | |
virtual void | memWriteback () |
Write back dirty buffers to memory using functional writes. | |
virtual void | memInvalidate () |
Invalidate the contents of memory buffers. | |
void | serialize (CheckpointOut &cp) const override |
Serialize an object. | |
void | unserialize (CheckpointIn &cp) override |
Unserialize an object. | |
Public Member Functions inherited from gem5::EventManager | |
EventQueue * | eventQueue () const |
void | schedule (Event &event, Tick when) |
void | deschedule (Event &event) |
void | reschedule (Event &event, Tick when, bool always=false) |
void | schedule (Event *event, Tick when) |
void | deschedule (Event *event) |
void | reschedule (Event *event, Tick when, bool always=false) |
void | wakeupEventQueue (Tick when=(Tick) -1) |
This function is not needed by the usual gem5 event loop but may be necessary in derived EventQueues which host gem5 on other schedulers. | |
void | setCurTick (Tick newVal) |
EventManager (EventManager &em) | |
Event manger manages events in the event queue. | |
EventManager (EventManager *em) | |
EventManager (EventQueue *eq) | |
Public Member Functions inherited from gem5::Serializable | |
Serializable () | |
virtual | ~Serializable () |
void | serializeSection (CheckpointOut &cp, const char *name) const |
Serialize an object into a new section. | |
void | serializeSection (CheckpointOut &cp, const std::string &name) const |
void | unserializeSection (CheckpointIn &cp, const char *name) |
Unserialize an a child object. | |
void | unserializeSection (CheckpointIn &cp, const std::string &name) |
Public Member Functions inherited from gem5::Drainable | |
DrainState | drainState () const |
Return the current drain state of an object. | |
virtual void | notifyFork () |
Notify a child process of a fork. | |
Public Member Functions inherited from gem5::statistics::Group | |
Group (Group *parent, const char *name=nullptr) | |
Construct a new statistics group. | |
virtual | ~Group () |
virtual void | regStats () |
Callback to set stat parameters. | |
virtual void | resetStats () |
Callback to reset stats. | |
virtual void | preDumpStats () |
Callback before stats are dumped. | |
void | addStat (statistics::Info *info) |
Register a stat with this group. | |
const std::map< std::string, Group * > & | getStatGroups () const |
Get all child groups associated with this object. | |
const std::vector< Info * > & | getStats () const |
Get all stats associated with this object. | |
void | addStatGroup (const char *name, Group *block) |
Add a stat block as a child of this block. | |
const Info * | resolveStat (std::string name) const |
Resolve a stat by its name within this group. | |
void | mergeStatGroup (Group *block) |
Merge the contents (stats & children) of a block to this block. | |
Group ()=delete | |
Group (const Group &)=delete | |
Group & | operator= (const Group &)=delete |
Public Member Functions inherited from gem5::Named | |
Named (const std::string &name_) | |
virtual | ~Named ()=default |
virtual std::string | name () const |
Public Member Functions inherited from gem5::Clocked | |
void | updateClockPeriod () |
Update the tick to the current tick. | |
Tick | clockEdge (Cycles cycles=Cycles(0)) const |
Determine the tick when a cycle begins, by default the current one, but the argument also enables the caller to determine a future cycle. | |
Cycles | curCycle () const |
Determine the current cycle, corresponding to a tick aligned to a clock edge. | |
Tick | nextCycle () const |
Based on the clock of the object, determine the start tick of the first cycle that is at least one cycle in the future. | |
uint64_t | frequency () const |
Tick | clockPeriod () const |
double | voltage () const |
Cycles | ticksToCycles (Tick t) const |
Tick | cyclesToTicks (Cycles c) const |
Protected Types | |
enum | { GICD_CTLR = 0x000 , GICD_TYPER = 0x004 , GICD_IIDR = 0x008 , GICD_SGIR = 0xf00 , GICD_PIDR0 = 0xfe0 , GICD_PIDR1 = 0xfe4 , GICD_PIDR2 = 0xfe8 , GICD_PIDR3 = 0xfec , DIST_SIZE = 0x1000 } |
enum | { GICC_CTLR = 0x00 , GICC_PMR = 0x04 , GICC_BPR = 0x08 , GICC_IAR = 0x0C , GICC_EOIR = 0x10 , GICC_RPR = 0x14 , GICC_HPPIR = 0x18 , GICC_ABPR = 0x1c , GICC_APR0 = 0xd0 , GICC_APR1 = 0xd4 , GICC_APR2 = 0xd8 , GICC_APR3 = 0xdc , GICC_IIDR = 0xfc , GICC_DIR = 0x1000 } |
Protected Member Functions | |
BitUnion32 (SWI) Bitfield< 3 | |
EndBitUnion (SWI) BitUnion32(IAR) Bitfield< 9 | |
EndBitUnion (IAR) BitUnion32(CTLR) Bitfield< 3 > fiqEn | |
BankedRegs & | getBankedRegs (ContextID) |
uint32_t & | getIntEnabled (ContextID ctx, uint32_t ix) |
uint32_t & | getPendingInt (ContextID ctx, uint32_t ix) |
uint32_t & | getActiveInt (ContextID ctx, uint32_t ix) |
uint32_t & | getIntGroup (ContextID ctx, uint32_t ix) |
uint8_t & | getIntPriority (ContextID ctx, uint32_t ix) |
uint32_t & | getIntConfig (ContextID ctx, uint32_t ix) |
Reads the GICD_ICFGRn register. | |
uint8_t | getCpuTarget (ContextID ctx, uint32_t ix) const |
bool | isLevelSensitive (ContextID ctx, uint32_t int_num) |
bool | isGroup0 (ContextID ctx, uint32_t int_num) |
bool | isFiq (ContextID ctx, uint32_t int_num) |
This method checks if an interrupt ID must be signaled or has been signaled as a FIQ to the cpu. | |
bool | cpuEnabled (ContextID ctx) const |
CPU enabled: Checks if GICC_CTLR.EnableGrp0 or EnableGrp1 are set. | |
uint8_t | getCpuPriority (unsigned cpu) |
void | softInt (ContextID ctx, SWI swi) |
software generated interrupt | |
void | updateIntState (int hint) |
See if some processor interrupt flags need to be enabled/disabled. | |
void | updateRunPri () |
Update the register that records priority of the highest priority active interrupt. | |
uint64_t | genSwiMask (int cpu) |
generate a bit mask to check cpuSgi for an interrupt. | |
int | intNumToWord (int num) const |
int | intNumToBit (int num) const |
void | clearInt (ContextID ctx, uint32_t int_num) |
Clears a cpu IRQ or FIQ signal. | |
void | postInt (uint32_t cpu, Tick when) |
Post an interrupt to a CPU with a delay. | |
void | postFiq (uint32_t cpu, Tick when) |
void | postDelayedInt (uint32_t cpu) |
Deliver a delayed interrupt to the target CPU. | |
void | postDelayedFiq (uint32_t cpu) |
void | copyGicState (GicV2Registers *from, GicV2Registers *to) |
GIC state transfer. | |
Tick | readDistributor (PacketPtr pkt) |
Handle a read to the distributor portion of the GIC. | |
uint32_t | readDistributor (ContextID ctx, Addr daddr, size_t resp_sz) |
uint32_t | readDistributor (ContextID ctx, Addr daddr) override |
Tick | readCpu (PacketPtr pkt) |
Handle a read to the cpu portion of the GIC. | |
uint32_t | readCpu (ContextID ctx, Addr daddr) override |
Tick | writeDistributor (PacketPtr pkt) |
Handle a write to the distributor portion of the GIC. | |
void | writeDistributor (ContextID ctx, Addr daddr, uint32_t data, size_t data_sz) |
void | writeDistributor (ContextID ctx, Addr daddr, uint32_t data) override |
Tick | writeCpu (PacketPtr pkt) |
Handle a write to the cpu portion of the GIC. | |
void | writeCpu (ContextID ctx, Addr daddr, uint32_t data) override |
Protected Member Functions inherited from gem5::BaseGic | |
virtual bool | blockIntUpdate () const |
When trasferring the state between two GICs (essentially writing architectural registers) an interrupt might be posted by the model. | |
Protected Member Functions inherited from gem5::Drainable | |
Drainable () | |
virtual | ~Drainable () |
void | signalDrainDone () const |
Signal that an object is drained. | |
Protected Member Functions inherited from gem5::Clocked | |
Clocked (ClockDomain &clk_domain) | |
Create a clocked object and set the clock domain based on the parameters. | |
Clocked (Clocked &)=delete | |
Clocked & | operator= (Clocked &)=delete |
virtual | ~Clocked () |
Virtual destructor due to inheritance. | |
void | resetClock () const |
Reset the object's clock using the current global tick value. | |
virtual void | clockPeriodUpdated () |
A hook subclasses can implement so they can do any extra work that's needed when the clock rate is changed. | |
Protected Attributes | |
const uint32_t | gicdPIDR |
const uint32_t | gicdIIDR |
const uint32_t | giccIIDR |
sgi_id | |
Bitfield< 23, 16 > | cpu_list |
Bitfield< 25, 24 > | list_type |
ack_id | |
Bitfield< 12, 10 > | cpu_id |
Bitfield< 1 > | enableGrp1 |
Bitfield< 0 > | enableGrp0 |
EndBitUnion(CTLR) protected const AddrRange | cpuRange |
Address range for the distributor interface. | |
const AddrRangeList | addrRanges |
All address ranges used by this GIC. | |
const Tick | distPioDelay |
Latency for a distributor operation. | |
const Tick | cpuPioDelay |
Latency for a cpu operation. | |
const Tick | intLatency |
Latency for a interrupt to get to CPU. | |
bool | enabled |
Gic enabled. | |
const bool | haveGem5Extensions |
Are gem5 extensions available? | |
bool | gem5ExtensionsEnabled |
gem5 many-core extension enabled by driver | |
uint32_t | itLines |
Number of itLines enabled. | |
std::vector< BankedRegs * > | bankedRegs |
uint32_t | intEnabled [INT_BITS_MAX-1] |
GICD_I{S,C}ENABLER{1..31} interrupt enable bits for global interrupts 1b per interrupt, 32 bits per word, 31 words. | |
uint32_t | pendingInt [INT_BITS_MAX-1] |
GICD_I{S,C}PENDR{1..31} interrupt pending bits for global interrupts 1b per interrupt, 32 bits per word, 31 words. | |
uint32_t | activeInt [INT_BITS_MAX-1] |
GICD_I{S,C}ACTIVER{1..31} interrupt active bits for global interrupts 1b per interrupt, 32 bits per word, 31 words. | |
uint32_t | intGroup [INT_BITS_MAX-1] |
GICD_IGROUPR{1..31} interrupt group bits for global interrupts 1b per interrupt, 32 bits per word, 31 words. | |
uint32_t | iccrpr [CPU_MAX] |
read only running priority register, 1 per cpu | |
uint8_t | intPriority [GLOBAL_INT_LINES] |
GICD_IPRIORITYR{8..255} an 8 bit priority (lower is higher priority) for each of the global (not replicated per CPU) interrupts. | |
uint32_t | intConfig [INT_BITS_MAX *2 - 2] |
GICD_ICFGR{2...63} 2 bit per interrupt signaling if it's level or edge sensitive and if it is 1:N or N:N. | |
uint8_t | cpuTarget [GLOBAL_INT_LINES] |
GICD_ITARGETSR{8..255} an 8 bit cpu target id for each global interrupt. | |
CTLR | cpuControl [CPU_MAX] |
GICC_CTLR: CPU interface control register. | |
uint8_t | cpuPriority [CPU_MAX] |
CPU priority. | |
uint8_t | cpuBpr [CPU_MAX] |
Binary point registers. | |
uint32_t | cpuHighestInt [CPU_MAX] |
highest interrupt that is interrupting CPU | |
uint64_t | cpuSgiPending [SGI_MAX] |
One bit per cpu per software interrupt that is pending for each possible sgi source. | |
uint64_t | cpuSgiActive [SGI_MAX] |
uint32_t | cpuSgiPendingExt [CPU_MAX] |
SGI pending arrays for gem5 GIC extension mode, which instead keeps 16 SGI pending bits for each of the (large number of) CPUs. | |
uint32_t | cpuSgiActiveExt [CPU_MAX] |
uint32_t | cpuPpiPending [CPU_MAX] |
One bit per private peripheral interrupt. | |
uint32_t | cpuPpiActive [CPU_MAX] |
EventFunctionWrapper * | postIntEvent [CPU_MAX] |
EventFunctionWrapper * | postFiqEvent [CPU_MAX] |
int | pendingDelayedInterrupts |
Protected Attributes inherited from gem5::BaseGic | |
Platform * | platform |
Platform this GIC belongs to. | |
Protected Attributes inherited from gem5::PioDevice | |
System * | sys |
PioPort< PioDevice > | pioPort |
The pioPort that handles the requests for us and provides us requests that it sees. | |
Protected Attributes inherited from gem5::SimObject | |
const SimObjectParams & | _params |
Cached copy of the object parameters. | |
Protected Attributes inherited from gem5::EventManager | |
EventQueue * | eventq |
A pointer to this object's event queue. | |
Static Protected Attributes | |
static const AddrRange | GICD_IGROUPR |
static const AddrRange | GICD_ISENABLER |
static const AddrRange | GICD_ICENABLER |
static const AddrRange | GICD_ISPENDR |
static const AddrRange | GICD_ICPENDR |
static const AddrRange | GICD_ISACTIVER |
static const AddrRange | GICD_ICACTIVER |
static const AddrRange | GICD_IPRIORITYR |
static const AddrRange | GICD_ITARGETSR |
static const AddrRange | GICD_ICFGR |
static const int | SGI_MAX = 16 |
static const int | PPI_MAX = 16 |
static const int | SGI_MASK = 0xFFFF0000 |
Mask off SGI's when setting/clearing pending bits. | |
static const int | NN_CONFIG_MASK = 0x55555555 |
Mask for bits that config N:N mode in GICD_ICFGR's. | |
static const int | CPU_MAX = 256 |
static const int | SPURIOUS_INT = 1023 |
static const int | INT_BITS_MAX = 32 |
static const int | INT_LINES_MAX = 1020 |
static const int | GLOBAL_INT_LINES = INT_LINES_MAX - SGI_MAX - PPI_MAX |
static const int | GICC_BPR_MINIMUM = 2 |
minimum value for Binary Point Register ("IMPLEMENTATION DEFINED"); chosen for consistency with Linux's in-kernel KVM GIC model | |
Additional Inherited Members | |
Static Public Member Functions inherited from gem5::SimObject | |
static void | serializeAll (const std::string &cpt_dir) |
Create a checkpoint by serializing all SimObjects in the system. | |
static SimObject * | find (const char *name) |
Find the SimObject with the given name and return a pointer to it. | |
static void | setSimObjectResolver (SimObjectResolver *resolver) |
There is a single object name resolver, and it is only set when simulation is restoring from checkpoints. | |
static SimObjectResolver * | getSimObjectResolver () |
There is a single object name resolver, and it is only set when simulation is restoring from checkpoints. | |
Static Public Member Functions inherited from gem5::Serializable | |
static const std::string & | currentSection () |
Gets the fully-qualified name of the active section. | |
static void | generateCheckpointOut (const std::string &cpt_dir, std::ofstream &outstream) |
Generate a checkpoint file so that the serialization can be routed to it. | |
Public Attributes inherited from gem5::ClockedObject | |
PowerState * | powerState |
Static Protected Member Functions inherited from gem5::GicV2Registers | |
static void | copyDistRegister (GicV2Registers *from, GicV2Registers *to, ContextID ctx, Addr daddr) |
static void | copyCpuRegister (GicV2Registers *from, GicV2Registers *to, ContextID ctx, Addr daddr) |
static void | copyBankedDistRange (System *sys, GicV2Registers *from, GicV2Registers *to, Addr daddr, size_t size) |
static void | clearBankedDistRange (System *sys, GicV2Registers *to, Addr daddr, size_t size) |
static void | copyDistRange (GicV2Registers *from, GicV2Registers *to, Addr daddr, size_t size) |
static void | clearDistRange (GicV2Registers *to, Addr daddr, size_t size) |
using gem5::GicV2::Params = GicV2Params |
|
protected |
|
protected |
gem5::GicV2::GicV2 | ( | const Params & | p | ) |
Definition at line 122 of file gic_v2.cc.
References CPU_MAX, cpuBpr, cpuControl, cpuEnabled(), cpuHighestInt, cpuPriority, DPRINTF, gem5ExtensionsEnabled, GICC_BPR_MINIMUM, iccrpr, postDelayedFiq(), postDelayedInt(), postFiqEvent, postIntEvent, SPURIOUS_INT, and gem5::RiscvISA::x.
gem5::GicV2::~GicV2 | ( | ) |
Definition at line 161 of file gic_v2.cc.
References CPU_MAX, postFiqEvent, postIntEvent, and gem5::RiscvISA::x.
|
protected |
|
protected |
Clears a cpu IRQ or FIQ signal.
Definition at line 1045 of file gic_v2.cc.
References gem5::ArmISA::INT_FIQ, gem5::ArmISA::INT_IRQ, isFiq(), gem5::PioDevice::sys, and gem5::System::threads.
Referenced by readCpu(), and updateIntState().
|
overridevirtual |
Clear an interrupt from a device that is connected to the GIC.
Depending on the configuration, the GIC may de-assert it's CPU line.
num | number of interrupt to send |
Implements gem5::BaseGic.
Definition at line 1011 of file gic_v2.cc.
References DPRINTF, getCpuTarget(), getPendingInt(), intNumToBit(), intNumToWord(), isLevelSensitive(), and updateIntState().
|
overridevirtual |
Implements gem5::BaseGic.
Definition at line 1030 of file gic_v2.cc.
References cpuPpiPending, DPRINTF, intNumToWord(), isLevelSensitive(), SGI_MAX, and updateIntState().
|
protected |
GIC state transfer.
CPU state (GICC_*)
Distributor state (GICD_*)
Definition at line 1120 of file gic_v2.cc.
References gem5::GicV2Registers::clearBankedDistRange(), gem5::GicV2Registers::clearDistRange(), gem5::GicV2Registers::copyBankedDistRange(), gem5::GicV2Registers::copyCpuRegister(), gem5::GicV2Registers::copyDistRange(), gem5::GicV2Registers::copyDistRegister(), GICC_BPR, GICC_CTLR, GICC_PMR, GICD_CTLR, GICD_ICACTIVER, GICD_ICENABLER, GICD_ICFGR, GICD_ICPENDR, GICD_IPRIORITYR, GICD_ISACTIVER, GICD_ISENABLER, GICD_ISPENDR, GICD_ITARGETSR, itLines, gem5::ArmISA::set, gem5::System::Threads::size(), gem5::AddrRange::start(), gem5::PioDevice::sys, gem5::System::threads, and gem5::PowerISA::to.
|
inlineprotected |
CPU enabled: Checks if GICC_CTLR.EnableGrp0 or EnableGrp1 are set.
Definition at line 433 of file gic_v2.hh.
References cpuControl.
Referenced by GicV2(), readCpu(), softInt(), updateIntState(), updateRunPri(), and writeCpu().
|
overridevirtual |
Draining is the process of clearing out the states of SimObjects.These are the SimObjects that are partially executed or are partially in flight.
Draining is mostly used before forking and creating a check point.
This function notifies an object that it needs to drain its state.
If the object does not need further simulation to drain internal buffers, it returns DrainState::Drained and automatically switches to the Drained state. If the object needs more simulation, it returns DrainState::Draining and automatically enters the Draining state. Other return values are invalid.
Implements gem5::Drainable.
Definition at line 1102 of file gic_v2.cc.
References gem5::Drained, gem5::Draining, and pendingDelayedInterrupts.
|
overridevirtual |
Resume execution after a successful drain.
Reimplemented from gem5::Drainable.
Definition at line 1113 of file gic_v2.cc.
References updateIntState().
|
protected |
|
protected |
|
protected |
generate a bit mask to check cpuSgi for an interrupt.
Definition at line 840 of file gic_v2.cc.
References panic_if, gem5::System::Threads::size(), gem5::PioDevice::sys, and gem5::System::threads.
Referenced by updateIntState(), and updateRunPri().
|
inlineprotected |
Definition at line 287 of file gic_v2.hh.
References activeInt, gem5::GicV2::BankedRegs::activeInt, getBankedRegs(), and INT_BITS_MAX.
Referenced by readCpu(), readDistributor(), updateIntState(), updateRunPri(), writeCpu(), and writeDistributor().
|
inlineoverridevirtual |
Every PIO device is obliged to provide an implementation that returns the address ranges the device responds to.
Implements gem5::PioDevice.
Definition at line 523 of file gic_v2.hh.
References addrRanges.
|
protected |
Definition at line 760 of file gic_v2.cc.
References bankedRegs.
Referenced by getActiveInt(), getIntConfig(), getIntEnabled(), getIntGroup(), getIntPriority(), getPendingInt(), and unserialize().
|
protected |
Definition at line 847 of file gic_v2.cc.
References cpuBpr, and cpuPriority.
Referenced by updateIntState().
|
inlineprotected |
Definition at line 363 of file gic_v2.hh.
References cpuTarget, fatal_if, gem5ExtensionsEnabled, INT_LINES_MAX, name(), PPI_MAX, and SGI_MAX.
Referenced by clearInt(), readDistributor(), sendInt(), and updateIntState().
|
inlineprotected |
Reads the GICD_ICFGRn register.
ctx | context id (PE specific) |
ix | interrupt word index |
SGIs and PPIs
Definition at line 346 of file gic_v2.hh.
References getBankedRegs(), INT_BITS_MAX, gem5::GicV2::BankedRegs::intConfig, and intConfig.
Referenced by isLevelSensitive(), readDistributor(), and writeDistributor().
|
inlineprotected |
Definition at line 256 of file gic_v2.hh.
References getBankedRegs(), gem5::GicV2::BankedRegs::intEnabled, and intEnabled.
Referenced by readDistributor(), updateIntState(), and writeDistributor().
|
inlineprotected |
Definition at line 303 of file gic_v2.hh.
References getBankedRegs(), INT_BITS_MAX, gem5::GicV2::BankedRegs::intGroup, and intGroup.
Referenced by isGroup0(), readDistributor(), and writeDistributor().
|
inlineprotected |
Definition at line 323 of file gic_v2.hh.
References getBankedRegs(), INT_LINES_MAX, gem5::GicV2::BankedRegs::intPriority, intPriority, PPI_MAX, and SGI_MAX.
Referenced by readDistributor(), updateIntState(), updateRunPri(), and writeDistributor().
|
inlineprotected |
Definition at line 271 of file gic_v2.hh.
References getBankedRegs(), INT_BITS_MAX, gem5::GicV2::BankedRegs::pendingInt, and pendingInt.
Referenced by clearInt(), readCpu(), readDistributor(), sendInt(), updateIntState(), and writeDistributor().
|
inlineprotected |
Definition at line 490 of file gic_v2.hh.
Referenced by clearInt(), isGroup0(), isLevelSensitive(), readCpu(), sendInt(), updateIntState(), updateRunPri(), and writeCpu().
|
inlineprotected |
Definition at line 489 of file gic_v2.hh.
Referenced by clearInt(), clearPPInt(), isGroup0(), isLevelSensitive(), readCpu(), sendInt(), sendPPInt(), updateIntState(), updateRunPri(), and writeCpu().
|
inlineprotected |
This method checks if an interrupt ID must be signaled or has been signaled as a FIQ to the cpu.
It does that by reading:
1) GICD_IGROUPR: controls if the interrupt is part of group0 or group1. Only group0 interrupts can be signaled as FIQs.
2) GICC_CTLR.FIQEn: controls whether the CPU interface signals Group 0 interrupts to a target processor using the FIQ or the IRQ signal
Definition at line 417 of file gic_v2.hh.
References cpuControl, and isGroup0().
Referenced by clearInt(), and updateIntState().
|
inlineprotected |
Definition at line 400 of file gic_v2.hh.
References gem5::bits(), getIntGroup(), intNumToBit(), and intNumToWord().
Referenced by isFiq().
|
inlineprotected |
Definition at line 388 of file gic_v2.hh.
References gem5::bits(), getIntConfig(), intNumToBit(), intNumToWord(), and SPURIOUS_INT.
Referenced by clearInt(), clearPPInt(), readCpu(), and updateIntState().
|
protected |
Definition at line 1091 of file gic_v2.cc.
References gem5::ArmISA::INT_FIQ, pendingDelayedInterrupts, gem5::Drainable::signalDrainDone(), gem5::PioDevice::sys, and gem5::System::threads.
Referenced by GicV2().
|
protected |
Deliver a delayed interrupt to the target CPU.
Definition at line 1065 of file gic_v2.cc.
References gem5::ArmISA::INT_IRQ, pendingDelayedInterrupts, gem5::Drainable::signalDrainDone(), gem5::PioDevice::sys, and gem5::System::threads.
Referenced by GicV2().
|
protected |
Definition at line 1076 of file gic_v2.cc.
References gem5::EventManager::eventq, pendingDelayedInterrupts, postFiqEvent, and gem5::EventQueue::schedule().
Referenced by updateIntState().
|
protected |
Post an interrupt to a CPU with a delay.
Definition at line 1056 of file gic_v2.cc.
References gem5::EventManager::eventq, pendingDelayedInterrupts, postIntEvent, and gem5::EventQueue::schedule().
Referenced by updateIntState().
A PIO read to the device, immediately split up into readDistributor() or readCpu()
Implements gem5::PioDevice.
Definition at line 170 of file gic_v2.cc.
References gem5::X86ISA::addr, gem5::AddrRange::contains(), cpuRange, gem5::Packet::getAddr(), panic, readCpu(), and readDistributor().
Implements gem5::GicV2Registers.
Definition at line 377 of file gic_v2.cc.
References gem5::bits(), clearInt(), cpuBpr, cpuControl, cpuEnabled(), cpuHighestInt, cpuPpiActive, cpuPpiPending, cpuPriority, cpuSgiActive, cpuSgiActiveExt, cpuSgiPending, cpuSgiPendingExt, DPRINTF, enabled, gem5ExtensionsEnabled, getActiveInt(), getPendingInt(), GICC_BPR, GICC_CTLR, GICC_HPPIR, GICC_IAR, GICC_IIDR, GICC_PMR, GICC_RPR, giccIIDR, iccrpr, intNumToBit(), intNumToWord(), isLevelSensitive(), gem5::System::Threads::numRunning(), panic, panic_if, PPI_MAX, SGI_MAX, SPURIOUS_INT, gem5::PioDevice::sys, gem5::System::threads, updateIntState(), updateRunPri(), and gem5::RiscvISA::x.
Handle a read to the cpu portion of the GIC.
pkt | packet to respond to |
Definition at line 362 of file gic_v2.cc.
References cpuPioDelay, cpuRange, gem5::Packet::getAddr(), gem5::Packet::makeAtomicResponse(), readCpu(), gem5::Packet::req, gem5::Packet::setLE(), and gem5::AddrRange::start().
Implements gem5::GicV2Registers.
Definition at line 554 of file gic_v2.hh.
References readDistributor().
Definition at line 224 of file gic_v2.cc.
References gem5::AddrRange::contains(), DPRINTF, enabled, getActiveInt(), getCpuTarget(), getIntConfig(), getIntEnabled(), getIntGroup(), getIntPriority(), getPendingInt(), GICD_CTLR, GICD_ICACTIVER, GICD_ICENABLER, GICD_ICFGR, GICD_ICPENDR, GICD_IGROUPR, GICD_IIDR, GICD_IPRIORITYR, GICD_ISACTIVER, GICD_ISENABLER, GICD_ISPENDR, GICD_ITARGETSR, GICD_PIDR0, GICD_PIDR1, GICD_PIDR2, GICD_PIDR3, GICD_TYPER, gicdIIDR, gicdPIDR, haveGem5Extensions, INT_BITS_MAX, INT_LINES_MAX, itLines, gem5::mbits(), gem5::System::Threads::numRunning(), panic, gem5::AddrRange::start(), gem5::PioDevice::sys, and gem5::System::threads.
Handle a read to the distributor portion of the GIC.
pkt | packet to respond to |
Definition at line 197 of file gic_v2.cc.
References distPioDelay, gem5::Packet::getAddr(), gem5::Packet::getSize(), gem5::Packet::makeAtomicResponse(), panic, readDistributor(), gem5::Packet::req, and gem5::Packet::setLE().
Referenced by read(), readDistributor(), and readDistributor().
|
overridevirtual |
Post an interrupt from a device that is connected to the GIC.
Depending on the configuration, the GIC will pass this interrupt on through to a CPU.
num | number of interrupt to send |
Implements gem5::BaseGic.
Definition at line 988 of file gic_v2.cc.
References DPRINTF, gem5ExtensionsEnabled, getCpuTarget(), getPendingInt(), intNumToBit(), intNumToWord(), panic, panic_if, PPI_MAX, SGI_MAX, and updateIntState().
|
overridevirtual |
Interface call for private peripheral interrupts.
num | number of interrupt to send |
cpu | CPU to forward interrupt to |
Implements gem5::BaseGic.
Definition at line 1002 of file gic_v2.cc.
References cpuPpiPending, DPRINTF, intNumToWord(), SGI_MAX, and updateIntState().
|
overridevirtual |
Serialize an object.
Output an object's state into the current checkpoint section.
cp | Checkpoint state |
Reimplemented from gem5::ClockedObject.
Definition at line 1192 of file gic_v2.cc.
References activeInt, bankedRegs, CPU_MAX, cpuBpr, cpuControl, cpuHighestInt, cpuPpiActive, cpuPpiPending, cpuPriority, cpuSgiActive, cpuSgiActiveExt, cpuSgiPending, cpuSgiPendingExt, cpuTarget, gem5::csprintf(), DPRINTF, enabled, gem5ExtensionsEnabled, GLOBAL_INT_LINES, gem5::ArmISA::i, iccrpr, INT_BITS_MAX, intConfig, intEnabled, intGroup, intPriority, itLines, pendingInt, SERIALIZE_ARRAY, SERIALIZE_SCALAR, and SGI_MAX.
|
protected |
software generated interrupt
data | data to decode that indicates which cpus to interrupt |
Definition at line 770 of file gic_v2.cc.
References cpu_list, cpuEnabled(), cpuSgiPending, cpuSgiPendingExt, DPRINTF, gem5ExtensionsEnabled, gem5::ArmISA::i, gem5::System::Threads::size(), gem5::PioDevice::sys, gem5::System::threads, updateIntState(), and gem5::RiscvISA::x.
Referenced by writeDistributor().
|
overridevirtual |
Check if version supported.
Implements gem5::BaseGic.
Definition at line 1085 of file gic_v2.cc.
References gem5::BaseGic::GIC_V2.
|
overridevirtual |
Unserialize an object.
Read an object's state from the current checkpoint section.
cp | Checkpoint state |
Reimplemented from gem5::ClockedObject.
Definition at line 1237 of file gic_v2.cc.
References activeInt, CPU_MAX, cpuBpr, cpuControl, cpuHighestInt, cpuPpiActive, cpuPpiPending, cpuPriority, cpuSgiActive, cpuSgiActiveExt, cpuSgiPending, cpuSgiPendingExt, cpuTarget, gem5::csprintf(), gem5::Serializable::currentSection(), DPRINTF, enabled, gem5::CheckpointIn::entryExists(), gem5ExtensionsEnabled, getBankedRegs(), GLOBAL_INT_LINES, gem5::ArmISA::i, iccrpr, INT_BITS_MAX, intConfig, intEnabled, intGroup, intPriority, itLines, pendingInt, postIntEvent, gem5::EventManager::schedule(), gem5::CheckpointIn::sectionExists(), SGI_MAX, gem5::GicV2::BankedRegs::unserialize(), UNSERIALIZE_ARRAY, UNSERIALIZE_OPT_SCALAR, and UNSERIALIZE_SCALAR.
|
protected |
See if some processor interrupt flags need to be enabled/disabled.
hint | which set of interrupts needs to be checked |
Definition at line 858 of file gic_v2.cc.
References gem5::bits(), gem5::BaseGic::blockIntUpdate(), clearInt(), cpuEnabled(), cpuHighestInt, cpuPpiPending, cpuSgiPending, cpuSgiPendingExt, gem5::curTick(), DPRINTF, enabled, gem5ExtensionsEnabled, genSwiMask(), getActiveInt(), getCpuPriority(), getCpuTarget(), getIntEnabled(), getIntPriority(), getPendingInt(), INT_BITS_MAX, intLatency, intNumToBit(), intNumToWord(), isFiq(), isLevelSensitive(), itLines, gem5::System::Threads::numRunning(), postFiq(), postInt(), PPI_MAX, SGI_MAX, gem5::System::Threads::size(), SPURIOUS_INT, gem5::PioDevice::sys, gem5::System::threads, and gem5::RiscvISA::x.
Referenced by clearInt(), clearPPInt(), drainResume(), readCpu(), sendInt(), sendPPInt(), softInt(), writeCpu(), and writeDistributor().
|
protected |
Update the register that records priority of the highest priority active interrupt.
Definition at line 959 of file gic_v2.cc.
References cpuEnabled(), cpuPpiActive, cpuSgiActive, cpuSgiActiveExt, genSwiMask(), getActiveInt(), getIntPriority(), gem5::ArmISA::i, iccrpr, intNumToBit(), intNumToWord(), itLines, PPI_MAX, SGI_MAX, gem5::System::Threads::size(), gem5::PioDevice::sys, and gem5::System::threads.
Referenced by readCpu(), writeCpu(), and writeDistributor().
A PIO read to the device, immediately split up into writeDistributor() or writeCpu()
Implements gem5::PioDevice.
Definition at line 184 of file gic_v2.cc.
References gem5::X86ISA::addr, gem5::AddrRange::contains(), cpuRange, gem5::Packet::getAddr(), panic, writeCpu(), and writeDistributor().
Implements gem5::GicV2Registers.
Definition at line 689 of file gic_v2.cc.
References cpuBpr, cpuControl, cpuEnabled(), cpuPpiActive, cpuPriority, cpuSgiActive, cpuSgiActiveExt, data, DPRINTF, gem5ExtensionsEnabled, getActiveInt(), GICC_APR0, GICC_APR1, GICC_APR2, GICC_APR3, GICC_BPR, GICC_BPR_MINIMUM, GICC_CTLR, GICC_DIR, GICC_EOIR, GICC_PMR, intNumToBit(), intNumToWord(), panic, PPI_MAX, SGI_MAX, updateIntState(), updateRunPri(), and warn.
Handle a write to the cpu portion of the GIC.
pkt | packet to respond to |
Definition at line 674 of file gic_v2.cc.
References cpuPioDelay, cpuRange, data, gem5::Packet::getAddr(), gem5::Packet::getLE(), gem5::Packet::makeAtomicResponse(), gem5::Packet::req, gem5::AddrRange::start(), and writeCpu().
Referenced by write(), and writeCpu().
|
inlineoverrideprotectedvirtual |
Implements gem5::GicV2Registers.
Definition at line 572 of file gic_v2.hh.
References data, and writeDistributor().
|
protected |
Definition at line 503 of file gic_v2.cc.
References gem5::bits(), gem5::AddrRange::contains(), cpuTarget, data, DPRINTF, enabled, gem5ExtensionsEnabled, getActiveInt(), getIntConfig(), getIntEnabled(), getIntGroup(), getIntPriority(), getPendingInt(), GICD_CTLR, GICD_ICACTIVER, GICD_ICENABLER, GICD_ICFGR, GICD_ICPENDR, GICD_IGROUPR, GICD_IPRIORITYR, GICD_ISACTIVER, GICD_ISENABLER, GICD_ISPENDR, GICD_ITARGETSR, GICD_SGIR, GICD_TYPER, haveGem5Extensions, gem5::ArmISA::mask, NN_CONFIG_MASK, gem5::ArmISA::offset, panic, PPI_MAX, SGI_MASK, SGI_MAX, softInt(), gem5::AddrRange::start(), updateIntState(), updateRunPri(), and warn.
Handle a write to the distributor portion of the GIC.
pkt | packet to respond to |
Definition at line 471 of file gic_v2.cc.
References distPioDelay, gem5::Packet::getAddr(), gem5::Packet::getLE(), gem5::Packet::getSize(), gem5::Packet::makeAtomicResponse(), panic, gem5::Packet::req, and writeDistributor().
Referenced by write(), writeDistributor(), and writeDistributor().
|
protected |
GICD_I{S,C}ACTIVER{1..31} interrupt active bits for global interrupts 1b per interrupt, 32 bits per word, 31 words.
Definition at line 284 of file gic_v2.hh.
Referenced by getActiveInt(), serialize(), gem5::GicV2::BankedRegs::unserialize(), and unserialize().
|
protected |
All address ranges used by this GIC.
Definition at line 187 of file gic_v2.hh.
Referenced by getAddrRanges().
|
protected |
Definition at line 246 of file gic_v2.hh.
Referenced by getBankedRegs(), and serialize().
|
protected |
|
staticprotected |
Definition at line 152 of file gic_v2.hh.
Referenced by GicV2(), serialize(), unserialize(), and ~GicV2().
|
protected |
Binary point registers.
Definition at line 449 of file gic_v2.hh.
Referenced by getCpuPriority(), GicV2(), readCpu(), serialize(), unserialize(), and writeCpu().
|
protected |
GICC_CTLR: CPU interface control register.
Definition at line 442 of file gic_v2.hh.
Referenced by cpuEnabled(), GicV2(), isFiq(), readCpu(), serialize(), unserialize(), and writeCpu().
|
protected |
highest interrupt that is interrupting CPU
Definition at line 452 of file gic_v2.hh.
Referenced by GicV2(), readCpu(), serialize(), unserialize(), and updateIntState().
|
protected |
Latency for a cpu operation.
Definition at line 193 of file gic_v2.hh.
Referenced by readCpu(), and writeCpu().
|
protected |
Definition at line 470 of file gic_v2.hh.
Referenced by readCpu(), serialize(), unserialize(), updateRunPri(), and writeCpu().
|
protected |
One bit per private peripheral interrupt.
Only upper 16 bits will be used since PPI interrupts are numberred from 16 to 32
Definition at line 469 of file gic_v2.hh.
Referenced by clearPPInt(), readCpu(), sendPPInt(), serialize(), unserialize(), and updateIntState().
|
protected |
CPU priority.
Definition at line 445 of file gic_v2.hh.
Referenced by getCpuPriority(), GicV2(), readCpu(), serialize(), unserialize(), and writeCpu().
|
protected |
|
protected |
Definition at line 459 of file gic_v2.hh.
Referenced by readCpu(), serialize(), unserialize(), updateRunPri(), and writeCpu().
|
protected |
Definition at line 465 of file gic_v2.hh.
Referenced by readCpu(), serialize(), unserialize(), updateRunPri(), and writeCpu().
|
protected |
One bit per cpu per software interrupt that is pending for each possible sgi source.
Indexed by SGI number. Each byte in generating cpu id and bits in position is destination id. e.g. 0x4 = CPU 0 generated interrupt for CPU 2.
Definition at line 458 of file gic_v2.hh.
Referenced by readCpu(), serialize(), softInt(), unserialize(), and updateIntState().
|
protected |
SGI pending arrays for gem5 GIC extension mode, which instead keeps 16 SGI pending bits for each of the (large number of) CPUs.
Definition at line 464 of file gic_v2.hh.
Referenced by readCpu(), serialize(), softInt(), unserialize(), and updateIntState().
|
protected |
GICD_ITARGETSR{8..255} an 8 bit cpu target id for each global interrupt.
Definition at line 360 of file gic_v2.hh.
Referenced by getCpuTarget(), serialize(), unserialize(), and writeDistributor().
|
protected |
Latency for a distributor operation.
Definition at line 190 of file gic_v2.hh.
Referenced by readDistributor(), and writeDistributor().
|
protected |
Gic enabled.
Definition at line 200 of file gic_v2.hh.
Referenced by readCpu(), readDistributor(), serialize(), unserialize(), updateIntState(), and writeDistributor().
|
protected |
gem5 many-core extension enabled by driver
Definition at line 206 of file gic_v2.hh.
Referenced by getCpuTarget(), GicV2(), readCpu(), sendInt(), serialize(), softInt(), unserialize(), updateIntState(), writeCpu(), and writeDistributor().
|
staticprotected |
minimum value for Binary Point Register ("IMPLEMENTATION DEFINED"); chosen for consistency with Linux's in-kernel KVM GIC model
Definition at line 160 of file gic_v2.hh.
Referenced by GicV2(), and writeCpu().
|
protected |
|
staticprotected |
Definition at line 119 of file gic_v2.hh.
Referenced by copyGicState(), readDistributor(), and writeDistributor().
|
staticprotected |
Definition at line 115 of file gic_v2.hh.
Referenced by copyGicState(), readDistributor(), and writeDistributor().
|
staticprotected |
Definition at line 122 of file gic_v2.hh.
Referenced by copyGicState(), readDistributor(), and writeDistributor().
|
staticprotected |
Definition at line 117 of file gic_v2.hh.
Referenced by copyGicState(), readDistributor(), and writeDistributor().
|
staticprotected |
Definition at line 113 of file gic_v2.hh.
Referenced by readDistributor(), and writeDistributor().
|
staticprotected |
Definition at line 120 of file gic_v2.hh.
Referenced by copyGicState(), readDistributor(), and writeDistributor().
|
staticprotected |
Definition at line 118 of file gic_v2.hh.
Referenced by copyGicState(), readDistributor(), and writeDistributor().
|
staticprotected |
Definition at line 114 of file gic_v2.hh.
Referenced by copyGicState(), readDistributor(), and writeDistributor().
|
staticprotected |
Definition at line 116 of file gic_v2.hh.
Referenced by copyGicState(), readDistributor(), and writeDistributor().
|
staticprotected |
Definition at line 121 of file gic_v2.hh.
Referenced by copyGicState(), readDistributor(), and writeDistributor().
|
protected |
Definition at line 110 of file gic_v2.hh.
Referenced by readDistributor().
|
protected |
Definition at line 109 of file gic_v2.hh.
Referenced by readDistributor().
|
staticprotected |
Definition at line 156 of file gic_v2.hh.
Referenced by serialize(), and unserialize().
|
protected |
Are gem5 extensions available?
Definition at line 203 of file gic_v2.hh.
Referenced by readDistributor(), and writeDistributor().
|
protected |
read only running priority register, 1 per cpu
Definition at line 314 of file gic_v2.hh.
Referenced by GicV2(), readCpu(), serialize(), unserialize(), and updateRunPri().
|
staticprotected |
Definition at line 154 of file gic_v2.hh.
Referenced by getActiveInt(), getIntConfig(), getIntGroup(), getPendingInt(), readDistributor(), serialize(), unserialize(), and updateIntState().
|
staticprotected |
Definition at line 155 of file gic_v2.hh.
Referenced by getCpuTarget(), getIntPriority(), and readDistributor().
|
protected |
GICD_ICFGR{2...63} 2 bit per interrupt signaling if it's level or edge sensitive and if it is 1:N or N:N.
Definition at line 337 of file gic_v2.hh.
Referenced by getIntConfig(), serialize(), gem5::GicV2::BankedRegs::unserialize(), and unserialize().
|
protected |
GICD_I{S,C}ENABLER{1..31} interrupt enable bits for global interrupts 1b per interrupt, 32 bits per word, 31 words.
Definition at line 253 of file gic_v2.hh.
Referenced by getIntEnabled(), serialize(), gem5::GicV2::BankedRegs::unserialize(), and unserialize().
|
protected |
GICD_IGROUPR{1..31} interrupt group bits for global interrupts 1b per interrupt, 32 bits per word, 31 words.
Definition at line 300 of file gic_v2.hh.
Referenced by getIntGroup(), serialize(), gem5::GicV2::BankedRegs::unserialize(), and unserialize().
|
protected |
Latency for a interrupt to get to CPU.
Definition at line 196 of file gic_v2.hh.
Referenced by updateIntState().
|
protected |
GICD_IPRIORITYR{8..255} an 8 bit priority (lower is higher priority) for each of the global (not replicated per CPU) interrupts.
Definition at line 320 of file gic_v2.hh.
Referenced by getIntPriority(), serialize(), gem5::GicV2::BankedRegs::unserialize(), and unserialize().
|
protected |
Number of itLines enabled.
Definition at line 209 of file gic_v2.hh.
Referenced by copyGicState(), readDistributor(), serialize(), unserialize(), updateIntState(), and updateRunPri().
|
staticprotected |
Mask for bits that config N:N mode in GICD_ICFGR's.
Definition at line 150 of file gic_v2.hh.
Referenced by writeDistributor().
|
protected |
Definition at line 509 of file gic_v2.hh.
Referenced by drain(), postDelayedFiq(), postDelayedInt(), postFiq(), and postInt().
|
protected |
GICD_I{S,C}PENDR{1..31} interrupt pending bits for global interrupts 1b per interrupt, 32 bits per word, 31 words.
Definition at line 268 of file gic_v2.hh.
Referenced by getPendingInt(), serialize(), gem5::GicV2::BankedRegs::unserialize(), and unserialize().
|
protected |
|
protected |
|
staticprotected |
Definition at line 144 of file gic_v2.hh.
Referenced by getCpuTarget(), getIntPriority(), readCpu(), sendInt(), gem5::GicV2::BankedRegs::serialize(), gem5::GicV2::BankedRegs::unserialize(), updateIntState(), updateRunPri(), writeCpu(), and writeDistributor().
|
staticprotected |
Mask off SGI's when setting/clearing pending bits.
Definition at line 147 of file gic_v2.hh.
Referenced by writeDistributor().
|
staticprotected |
Definition at line 143 of file gic_v2.hh.
Referenced by clearPPInt(), getCpuTarget(), getIntPriority(), readCpu(), sendInt(), sendPPInt(), gem5::GicV2::BankedRegs::serialize(), serialize(), gem5::GicV2::BankedRegs::unserialize(), unserialize(), updateIntState(), updateRunPri(), writeCpu(), and writeDistributor().
|
staticprotected |
Definition at line 153 of file gic_v2.hh.
Referenced by GicV2(), isLevelSensitive(), readCpu(), and updateIntState().