44 #ifndef __DEV_ARM_BASE_GIC_H__ 45 #define __DEV_ARM_BASE_GIC_H__ 47 #include <unordered_map> 59 struct ArmInterruptPinParams;
74 const Params *
params()
const;
84 virtual void sendInt(uint32_t num) = 0;
92 virtual void sendPPInt(uint32_t num, uint32_t cpu) = 0;
93 virtual void clearPPInt(uint32_t num, uint32_t cpu) = 0;
103 virtual void clearInt(uint32_t num) = 0;
122 virtual uint32_t readDistributor(
ContextID ctx,
Addr daddr) = 0;
127 virtual void writeCpu(
ContextID ctx,
Addr daddr, uint32_t data) = 0;
172 std::unordered_map<ContextID, ArmPPI*>
pins;
196 uint32_t
num()
const {
return intNum; }
199 virtual void raise() = 0;
201 virtual void clear() = 0;
232 void raise()
override;
233 void clear()
override;
243 void raise()
override;
244 void clear()
override;
const uint32_t intNum
Interrupt number to generate.
Platform * platform
Platform this GIC belongs to.
RealView *const platform
Arm platform to use for interrupt generation.
virtual void clearInt(uint32_t num)=0
Clear an interrupt from a device that is connected to the GIC.
Shared Peripheral Interrupt Generator It is capable of generating one interrupt only: it maintains a ...
ThreadContext is the external interface to all thread state for anything outside of the CPU...
virtual void sendPPInt(uint32_t num, uint32_t cpu)=0
Interface call for private peripheral interrupts.
virtual void sendInt(uint32_t num)=0
Post an interrupt from a device that is connected to the GIC.
This device is the base class which all devices senstive to an address range inherit from...
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
uint32_t num() const
Get interrupt number.
const ThreadContext * threadContext
Pointer to the thread context that owns this interrupt in case it is a thread-/CPU-private interrupt...
std::unordered_map< ContextID, ArmPPI * > pins
This SimObject is instantiated in the python world and serves as an ArmInterruptPin generator...
Private Peripheral Interrupt Generator Since PPIs are banked in the GIC, this class is capable of gen...
ArmSystem * getSystem() const
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
Generic representation of an Arm interrupt pin.
Abstract superclass for simulation objects.
int ContextID
Globally unique thread context ID.
virtual void clearPPInt(uint32_t num, uint32_t cpu)=0
const Params * params() const
virtual bool supportsVersion(GicVersion version)=0
Check if version supported.