Go to the documentation of this file.
42 #include "params/ArmInterruptPin.hh"
43 #include "params/ArmPPI.hh"
44 #include "params/ArmSPI.hh"
45 #include "params/BaseGic.hh"
57 fatal_if(!rv,
"GIC model can't register with platform code");
102 panic_if(!tc,
"Invalid Thread Context\n");
105 auto pin_it =
pins.find(cid);
107 if (pin_it !=
pins.end()) {
109 return pin_it->second;
112 auto p =
static_cast<const ArmPPIParams *
>(
_params);
115 pins.insert({cid, pin});
123 : threadContext(tc), platform(dynamic_cast<
RealView*>(_platform)),
124 intNum(int_num), _active(false)
133 "InterruptLine::setThreadContext called twice\n");
142 "call to InterruptLine::setThreadContext.\n");
159 Platform *_platform, uint32_t int_num)
199 ArmSPIParams::create()
205 ArmPPIParams::create()
void raise() override
Signal an interrupt.
ArmSPI(Platform *platform, uint32_t int_num)
Private Peripheral Interrupt Generator Since PPIs are banked in the GIC, this class is capable of gen...
void clear() override
Clear a signalled interrupt.
ArmSPIGen(const ArmSPIParams *p)
#define UNSERIALIZE_SCALAR(scalar)
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
std::unordered_map< ContextID, ArmPPI * > pins
void setGic(BaseGic *_gic)
Give platform a pointer to interrupt controller.
void setThreadContext(ThreadContext *tc)
Set the thread context owning this interrupt.
int ContextID
Globally unique thread context ID.
ArmInterruptPin * get(ThreadContext *tc=nullptr) override
bool _active
True if interrupt pin is active, false otherwise.
const uint32_t intNum
Interrupt number to generate.
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
ArmInterruptPin * get(ThreadContext *tc=nullptr) override
Shared Peripheral Interrupt Generator It is capable of generating one interrupt only: it maintains a ...
This device is the base class which all devices senstive to an address range inherit from.
ThreadContext is the external interface to all thread state for anything outside of the CPU.
ContextID targetContext() const
Get the target context ID of this interrupt.
ArmInterruptPin(Platform *platform, ThreadContext *tc, uint32_t int_num)
This SimObject is instantiated in the python world and serves as an ArmInterruptPin generator.
void clear() override
Clear a signalled interrupt.
virtual ContextID contextId() const =0
ArmInterruptPinGen(const ArmInterruptPinParams *p)
const ThreadContext * threadContext
Pointer to the thread context that owns this interrupt in case it is a thread-/CPU-private interrupt.
virtual void clearPPInt(uint32_t num, uint32_t cpu)=0
RealView *const platform
Arm platform to use for interrupt generation.
#define SERIALIZE_SCALAR(scalar)
virtual void sendInt(uint32_t num)=0
Post an interrupt from a device that is connected to the GIC.
virtual void clearInt(uint32_t num)=0
Clear an interrupt from a device that is connected to the GIC.
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
const SimObjectParams * _params
Cached copy of the object parameters.
void setGIC(BaseGic *gic)
Sets the pointer to the GIC.
Generic representation of an Arm interrupt pin.
std::ostream CheckpointOut
ArmSystem * getSystem() const
const Params * params() const
void raise() override
Signal an interrupt.
virtual void sendPPInt(uint32_t num, uint32_t cpu)=0
Interface call for private peripheral interrupts.
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
ArmPPIGen(const ArmPPIParams *p)
void serialize(CheckpointOut &cp) const override
Serialize an object.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
ArmPPI(Platform *platform, ThreadContext *tc, uint32_t int_num)
Abstract superclass for simulation objects.
Generated on Wed Sep 30 2020 14:02:10 for gem5 by doxygen 1.8.17