gem5
v20.1.0.0
|
Generic representation of an Arm interrupt pin. More...
#include <base_gic.hh>
Public Member Functions | |
void | setThreadContext (ThreadContext *tc) |
Set the thread context owning this interrupt. More... | |
uint32_t | num () const |
Get interrupt number. More... | |
bool | active () const |
True if interrupt pin is active, false otherwise. More... | |
virtual void | raise ()=0 |
Signal an interrupt. More... | |
virtual void | clear ()=0 |
Clear a signalled interrupt. More... | |
void | serialize (CheckpointOut &cp) const override |
Serialize an object. More... | |
void | unserialize (CheckpointIn &cp) override |
Unserialize an object. More... | |
Public Member Functions inherited from Serializable | |
Serializable () | |
virtual | ~Serializable () |
void | serializeSection (CheckpointOut &cp, const char *name) const |
Serialize an object into a new section. More... | |
void | serializeSection (CheckpointOut &cp, const std::string &name) const |
void | unserializeSection (CheckpointIn &cp, const char *name) |
Unserialize an a child object. More... | |
void | unserializeSection (CheckpointIn &cp, const std::string &name) |
Protected Member Functions | |
ArmInterruptPin (Platform *platform, ThreadContext *tc, uint32_t int_num) | |
ContextID | targetContext () const |
Get the target context ID of this interrupt. More... | |
Protected Attributes | |
const ThreadContext * | threadContext |
Pointer to the thread context that owns this interrupt in case it is a thread-/CPU-private interrupt. More... | |
RealView *const | platform |
Arm platform to use for interrupt generation. More... | |
const uint32_t | intNum |
Interrupt number to generate. More... | |
bool | _active |
True if interrupt pin is active, false otherwise. More... | |
Friends | |
class | ArmInterruptPinGen |
Additional Inherited Members | |
Static Public Member Functions inherited from Serializable | |
static const std::string & | currentSection () |
Gets the fully-qualified name of the active section. More... | |
static void | serializeAll (const std::string &cpt_dir) |
Serializes all the SimObjects. More... | |
static void | unserializeGlobals (CheckpointIn &cp) |
Generic representation of an Arm interrupt pin.
Definition at line 176 of file base_gic.hh.
|
protected |
Definition at line 121 of file base_gic.cc.
|
inline |
True if interrupt pin is active, false otherwise.
Definition at line 197 of file base_gic.hh.
References _active.
Referenced by Sp805::read(), Sp805::sendInt(), ArchTimer::setControl(), and ArchTimer::updateCounter().
|
pure virtual |
Clear a signalled interrupt.
Implemented in ArmPPI, and ArmSPI.
Referenced by Sp805::clearInt(), ArmISA::PMU::clearInterrupt(), BaseArmKvmCPU::kvmRun(), ArchTimer::setControl(), Pl011::setInterrupts(), MmioVirtIO::setInterrupts(), HDLcd::setInterrupts(), ArchTimer::updateCounter(), Pl050::updateIntCtrl(), Gicv3CPUInterface::virtualUpdate(), and Pl111::write().
|
inline |
Get interrupt number.
Definition at line 194 of file base_gic.hh.
References intNum.
Referenced by Gicv3CPUInterface::setThreadContext(), and Gicv3CPUInterface::virtualUpdate().
|
pure virtual |
Signal an interrupt.
Implemented in ArmPPI, and ArmSPI.
Referenced by ArchTimer::counterLimitReached(), PL031::counterMatch(), Pl011::generateInterrupt(), Pl111::generateInterrupt(), BaseArmKvmCPU::kvmRun(), ArmISA::PMU::raiseInterrupt(), Sp805::sendInt(), MmioVirtIO::setInterrupts(), HDLcd::setInterrupts(), Pl050::updateIntCtrl(), and Gicv3CPUInterface::virtualUpdate().
|
overridevirtual |
Serialize an object.
Output an object's state into the current checkpoint section.
cp | Checkpoint state |
Implements Serializable.
Definition at line 147 of file base_gic.cc.
References _active, and SERIALIZE_SCALAR.
void ArmInterruptPin::setThreadContext | ( | ThreadContext * | tc | ) |
Set the thread context owning this interrupt.
This method is used to set the thread context for interrupts that are thread/CPU-specific. Only devices that are used in such a context are expected to call this method.
Definition at line 130 of file base_gic.cc.
References panic_if, and threadContext.
|
protected |
Get the target context ID of this interrupt.
Definition at line 139 of file base_gic.cc.
References ThreadContext::contextId(), panic_if, and threadContext.
Referenced by ArmPPI::clear(), and ArmPPI::raise().
|
overridevirtual |
Unserialize an object.
Read an object's state from the current checkpoint section.
cp | Checkpoint state |
Implements Serializable.
Definition at line 153 of file base_gic.cc.
References _active, and UNSERIALIZE_SCALAR.
|
friend |
Definition at line 178 of file base_gic.hh.
|
protected |
True if interrupt pin is active, false otherwise.
Definition at line 230 of file base_gic.hh.
Referenced by active(), ArmSPI::clear(), ArmPPI::clear(), ArmSPI::raise(), ArmPPI::raise(), serialize(), and unserialize().
|
protected |
Interrupt number to generate.
Definition at line 227 of file base_gic.hh.
Referenced by ArmSPI::clear(), ArmPPI::clear(), num(), ArmSPI::raise(), and ArmPPI::raise().
|
protected |
Arm platform to use for interrupt generation.
Definition at line 224 of file base_gic.hh.
Referenced by ArmInterruptPin(), ArmSPI::clear(), ArmPPI::clear(), ArmSPI::raise(), and ArmPPI::raise().
|
protected |
Pointer to the thread context that owns this interrupt in case it is a thread-/CPU-private interrupt.
Definition at line 221 of file base_gic.hh.
Referenced by setThreadContext(), and targetContext().