gem5  v21.1.0.2
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
gem5::ArmInterruptPin Class Referenceabstract

Generic representation of an Arm interrupt pin. More...

#include <base_gic.hh>

Inheritance diagram for gem5::ArmInterruptPin:
gem5::Serializable gem5::ArmPPI gem5::ArmSigInterruptPin gem5::ArmSPI

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 gem5::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 (const ArmInterruptPinParams &p, ThreadContext *tc)
 
ContextID targetContext () const
 Get the target context ID of this interrupt. More...
 

Protected Attributes

const ThreadContextthreadContext
 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...
 
const ArmInterruptType triggerType
 Interrupt triggering type. More...
 
bool _active
 True if interrupt pin is active, false otherwise. More...
 

Friends

class ArmInterruptPinGen
 

Additional Inherited Members

- Static Public Member Functions inherited from gem5::Serializable
static const std::string & currentSection ()
 Gets the fully-qualified name of the active section. More...
 
static void generateCheckpointOut (const std::string &cpt_dir, std::ofstream &outstream)
 Generate a checkpoint file so that the serialization can be routed to it. More...
 

Detailed Description

Generic representation of an Arm interrupt pin.

Definition at line 200 of file base_gic.hh.

Constructor & Destructor Documentation

◆ ArmInterruptPin()

gem5::ArmInterruptPin::ArmInterruptPin ( const ArmInterruptPinParams &  p,
ThreadContext tc 
)
protected

Definition at line 151 of file base_gic.cc.

References fatal_if, and platform.

Member Function Documentation

◆ active()

bool gem5::ArmInterruptPin::active ( ) const
inline

True if interrupt pin is active, false otherwise.

Definition at line 220 of file base_gic.hh.

References _active.

Referenced by gem5::Sp805::read(), gem5::Sp805::sendInt(), gem5::ArchTimer::setControl(), and gem5::ArchTimer::updateCounter().

◆ clear()

virtual void gem5::ArmInterruptPin::clear ( )
pure virtual

◆ num()

uint32_t gem5::ArmInterruptPin::num ( ) const
inline

Get interrupt number.

Definition at line 217 of file base_gic.hh.

References intNum.

Referenced by gem5::Gicv3CPUInterface::setThreadContext(), and gem5::Gicv3CPUInterface::virtualUpdate().

◆ raise()

virtual void gem5::ArmInterruptPin::raise ( )
pure virtual

◆ serialize()

void gem5::ArmInterruptPin::serialize ( CheckpointOut cp) const
overridevirtual

Serialize an object.

Output an object's state into the current checkpoint section.

Parameters
cpCheckpoint state

Implements gem5::Serializable.

Definition at line 177 of file base_gic.cc.

References _active, and SERIALIZE_SCALAR.

◆ setThreadContext()

void gem5::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 160 of file base_gic.cc.

References panic_if, and threadContext.

◆ targetContext()

ContextID gem5::ArmInterruptPin::targetContext ( ) const
protected

Get the target context ID of this interrupt.

Precondition
setThreadContext() must have been called prior to calling this method.

Definition at line 169 of file base_gic.cc.

References gem5::ThreadContext::contextId(), panic_if, and threadContext.

Referenced by gem5::ArmPPI::clear(), and gem5::ArmPPI::raise().

◆ unserialize()

void gem5::ArmInterruptPin::unserialize ( CheckpointIn cp)
overridevirtual

Unserialize an object.

Read an object's state from the current checkpoint section.

Parameters
cpCheckpoint state

Implements gem5::Serializable.

Definition at line 183 of file base_gic.cc.

References _active, and UNSERIALIZE_SCALAR.

Friends And Related Function Documentation

◆ ArmInterruptPinGen

friend class ArmInterruptPinGen
friend

Definition at line 202 of file base_gic.hh.

Member Data Documentation

◆ _active

bool gem5::ArmInterruptPin::_active
protected

◆ intNum

const uint32_t gem5::ArmInterruptPin::intNum
protected

Interrupt number to generate.

Definition at line 250 of file base_gic.hh.

Referenced by gem5::ArmSPI::clear(), gem5::ArmPPI::clear(), num(), gem5::ArmSPI::raise(), and gem5::ArmPPI::raise().

◆ platform

RealView* const gem5::ArmInterruptPin::platform
protected

Arm platform to use for interrupt generation.

Definition at line 247 of file base_gic.hh.

Referenced by ArmInterruptPin(), gem5::ArmSPI::clear(), gem5::ArmPPI::clear(), gem5::ArmSPI::raise(), and gem5::ArmPPI::raise().

◆ threadContext

const ThreadContext* gem5::ArmInterruptPin::threadContext
protected

Pointer to the thread context that owns this interrupt in case it is a thread-/CPU-private interrupt.

Definition at line 244 of file base_gic.hh.

Referenced by setThreadContext(), and targetContext().

◆ triggerType

const ArmInterruptType gem5::ArmInterruptPin::triggerType
protected

Interrupt triggering type.

Definition at line 253 of file base_gic.hh.


The documentation for this class was generated from the following files:

Generated on Tue Sep 21 2021 12:27:14 for gem5 by doxygen 1.8.17