Go to the documentation of this file.
46 #ifndef __DEV_ARM_GICV2_H__
47 #define __DEV_ARM_GICV2_H__
58 #include "params/GicV2.hh"
331 assert(ctx < sys->threads.numRunning());
342 "%s requires the gem5_extensions parameter to support "
343 "more than 8 cores\n",
name());
360 const uint8_t cfg_hi =
intNumToBit(int_num * 2) + 1;
385 const bool is_group0 =
isGroup0(ctx, int_num);
388 if (is_group0 && use_fiq) {
507 void sendInt(uint32_t number)
override;
508 void clearInt(uint32_t number)
override;
510 void sendPPInt(uint32_t num, uint32_t cpu)
override;
511 void clearPPInt(uint32_t num, uint32_t cpu)
override;
539 uint32_t
data,
size_t data_sz);
553 #endif //__DEV_ARM_GIC_H__
uint32_t intGroup
GICD_IGROUPR0 interrupt group bits for first 32 interrupts, 1b per interrupt.
uint32_t & getIntConfig(ContextID ctx, uint32_t ix)
Reads the GICD_ICFGRn register.
uint32_t pendingInt[INT_BITS_MAX-1]
GICD_I{S,C}PENDR{1..31} interrupt pending bits for global interrupts 1b per interrupt,...
uint32_t iccrpr[CPU_MAX]
read only running priority register, 1 per cpu
Tick writeDistributor(PacketPtr pkt)
Handle a write to the distributor portion of the GIC.
Tick readCpu(PacketPtr pkt)
Handle a read to the cpu portion of the GIC.
void updateRunPri()
Update the register that records priority of the highest priority active interrupt.
Tick write(PacketPtr pkt) override
A PIO read to the device, immediately split up into writeDistributor() or writeCpu()
static const AddrRange GICD_ISENABLER
static const int SGI_MASK
Mask off SGI's when setting/clearing pending bits.
const Tick intLatency
Latency for a interrupt to get to CPU.
uint32_t & getActiveInt(ContextID ctx, uint32_t ix)
static const int GICC_BPR_MINIMUM
minimum value for Binary Point Register ("IMPLEMENTATION DEFINED"); chosen for consistency with Linux...
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 ...
uint32_t cpuSgiActiveExt[CPU_MAX]
void clearInt(ContextID ctx, uint32_t int_num)
Clears a cpu IRQ or FIQ signal.
Basic support for object serialization.
EndBitUnion(SWI) BitUnion32(IAR) Bitfield< 9
const Tick distPioDelay
Latency for a distributor operation.
Bitfield< 23, 16 > cpu_list
static const int GLOBAL_INT_LINES
int ContextID
Globally unique thread context ID.
uint64_t Tick
Tick count type.
uint32_t intEnabled[INT_BITS_MAX-1]
GICD_I{S,C}ENABLER{1..31} interrupt enable bits for global interrupts 1b per interrupt,...
Tick read(PacketPtr pkt) override
A PIO read to the device, immediately split up into readDistributor() or readCpu()
void softInt(ContextID ctx, SWI swi)
software generated interrupt
uint32_t cpuPpiActive[CPU_MAX]
uint32_t pendingInt
GICD_I{S,C}PENDR0 interrupt pending bits for first 32 interrupts, 1b per interrupt.
bool gem5ExtensionsEnabled
gem5 many-core extension enabled by driver
uint32_t readDistributor(ContextID ctx, Addr daddr) override
CTLR cpuControl[CPU_MAX]
GICC_CTLR: CPU interface control register.
static const int INT_LINES_MAX
EventFunctionWrapper * postFiqEvent[CPU_MAX]
uint8_t & getIntPriority(ContextID ctx, uint32_t ix)
bool isLevelSensitive(ContextID ctx, uint32_t int_num)
static const AddrRange GICD_ICENABLER
uint8_t intPriority[GLOBAL_INT_LINES]
GICD_IPRIORITYR{8..255} an 8 bit priority (lower is higher priority) for each of the global (not repl...
void unserialize(CheckpointIn &cp) override
Unserialize an object.
uint32_t intGroup[INT_BITS_MAX-1]
GICD_IGROUPR{1..31} interrupt group bits for global interrupts 1b per interrupt, 32 bits per word,...
virtual void updateIntState(int hint)
See if some processor interrupt flags need to be enabled/disabled.
bool isGroup0(ContextID ctx, uint32_t int_num)
int intNumToWord(int num) const
static const int SPURIOUS_INT
const AddrRangeList addrRanges
All address ranges used by this GIC.
DrainState
Object drain/handover states.
uint8_t cpuBpr[CPU_MAX]
Binary point registers.
uint64_t genSwiMask(int cpu)
generate a bit mask to check cpuSgi for an interrupt.
uint8_t intPriority[SGI_MAX+PPI_MAX]
GICD_IPRIORITYR{0..7} interrupt priority for SGIs and PPIs.
The AddrRange class encapsulates an address range, and supports a number of tests to check if two ran...
static const AddrRange GICD_ISACTIVER
static const int NN_CONFIG_MASK
Mask for bits that config N:N mode in GICD_ICFGR's.
static const AddrRange GICD_IPRIORITYR
Bitfield< 25, 24 > list_type
const Params * params() const
void postInt(uint32_t cpu, Tick when)
Post an interrupt to a CPU with a delay.
uint8_t cpuPriority[CPU_MAX]
CPU priority.
uint64_t cpuSgiPending[SGI_MAX]
One bit per cpu per software interrupt that is pending for each possible sgi source.
uint32_t & getPendingInt(ContextID ctx, uint32_t ix)
static const AddrRange GICD_ICACTIVER
uint32_t activeInt[INT_BITS_MAX-1]
GICD_I{S,C}ACTIVER{1..31} interrupt active bits for global interrupts 1b per interrupt,...
void serialize(CheckpointOut &cp) const override
Serialize an object.
uint32_t & getIntEnabled(ContextID ctx, uint32_t ix)
void sendInt(uint32_t number) override
Post an interrupt from a device that is connected to the GIC.
uint64_t cpuSgiActive[SGI_MAX]
bool supportsVersion(GicVersion version) override
Check if version supported.
Tick readDistributor(PacketPtr pkt)
Handle a read to the distributor portion of the GIC.
int pendingDelayedInterrupts
void postDelayedFiq(uint32_t cpu)
uint32_t activeInt
GICD_I{S,C}ACTIVER0 interrupt active bits for first 32 interrupts, 1b per interrupt.
uint32_t itLines
Number of itLines enabled.
DrainState drain() override
Draining is the process of clearing out the states of SimObjects.These are the SimObjects that are pa...
AddrRangeList getAddrRanges() const override
Every PIO device is obliged to provide an implementation that returns the address ranges the device r...
EventFunctionWrapper * postIntEvent[CPU_MAX]
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
uint8_t getCpuTarget(ContextID ctx, uint32_t ix) const
uint32_t cpuHighestInt[CPU_MAX]
highest interrupt that is interrupting CPU
uint32_t intConfig[2]
GICD_ICFGR0, GICD_ICFGR1 interrupt config bits for first 32 interrupts, 2b per interrupt.
virtual const std::string name() const
uint8_t getCpuPriority(unsigned cpu)
bool cpuEnabled(ContextID ctx) const
CPU enabled: Checks if GICC_CTLR.EnableGrp0 or EnableGrp1 are set.
static const AddrRange GICD_ICFGR
uint8_t cpuTarget[GLOBAL_INT_LINES]
GICD_ITARGETSR{8..255} an 8 bit cpu target id for each global interrupt.
std::vector< BankedRegs * > bankedRegs
uint32_t cpuSgiPendingExt[CPU_MAX]
SGI pending arrays for gem5 GIC extension mode, which instead keeps 16 SGI pending bits for each of t...
static const int INT_BITS_MAX
static const AddrRange GICD_ISPENDR
uint32_t & getIntGroup(ContextID ctx, uint32_t ix)
void clearPPInt(uint32_t num, uint32_t cpu) override
const SimObjectParams * _params
Cached copy of the object parameters.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
static const AddrRange GICD_ITARGETSR
static const AddrRange GICD_ICPENDR
Registers "banked for each connected processor" per ARM IHI0048B.
void drainResume() override
Resume execution after a successful drain.
const bool haveGem5Extensions
Are gem5 extensions available?
std::ostream CheckpointOut
int intNumToBit(int num) const
void sendPPInt(uint32_t num, uint32_t cpu) override
Interface call for private peripheral interrupts.
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.
Tick writeCpu(PacketPtr pkt)
Handle a write to the cpu portion of the GIC.
void postFiq(uint32_t cpu, Tick when)
void writeDistributor(ContextID ctx, Addr daddr, uint32_t data) override
BitUnion32(SWI) Bitfield< 3
void postDelayedInt(uint32_t cpu)
Deliver a delayed interrupt to the target CPU.
Bitfield< 12, 10 > cpu_id
BankedRegs & getBankedRegs(ContextID)
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
uint32_t intEnabled
GICD_I{S,C}ENABLER0 interrupt enable bits for first 32 interrupts, 1b per interrupt.
const EndBitUnion(CTLR) protected AddrRange cpuRange
Address range for the distributor interface.
const Tick cpuPioDelay
Latency for a cpu operation.
static const AddrRange GICD_IGROUPR
uint32_t cpuPpiPending[CPU_MAX]
One bit per private peripheral interrupt.
T bits(T val, int first, int last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
Generated on Wed Sep 30 2020 14:02:10 for gem5 by doxygen 1.8.17