gem5  v20.1.0.0
Public Member Functions | Public Attributes | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
Gicv3Redistributor Class Reference

#include <gic_v3_redistributor.hh>

Inheritance diagram for Gicv3Redistributor:
Serializable

Public Member Functions

void activateIRQ (uint32_t int_id)
 
bool canBeSelectedFor1toNInterrupt (Gicv3::GroupId group) const
 
void deactivateIRQ (uint32_t int_id)
 
Gicv3CPUInterfacegetCPUInterface () const
 
uint32_t processorNumber () const
 
Gicv3::GroupId getIntGroup (int int_id) const
 
Gicv3::IntStatus intStatus (uint32_t int_id) const
 
uint8_t readEntryLPI (uint32_t intid)
 
void writeEntryLPI (uint32_t intid, uint8_t lpi_entry)
 
bool isPendingLPI (uint32_t intid)
 
void setClrLPI (uint64_t data, bool set)
 
void sendSGI (uint32_t int_id, Gicv3::GroupId group, bool ns)
 
void serialize (CheckpointOut &cp) const override
 Serialize an object. More...
 
void unserialize (CheckpointIn &cp) override
 Unserialize an object. More...
 
void update ()
 
void updateDistributor ()
 
 Gicv3Redistributor (Gicv3 *gic, uint32_t cpu_id)
 
uint32_t getAffinity () const
 
void init ()
 
uint64_t read (Addr addr, size_t size, bool is_secure_access)
 
void sendPPInt (uint32_t int_id)
 
void clearPPInt (uint32_t int_id)
 
void write (Addr addr, uint64_t data, size_t size, bool is_secure_access)
 
- 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)
 

Public Attributes

const uint32_t addrRangeSize
 

Static Public Attributes

static const uint32_t SMALLEST_LPI_ID = 8192
 

Protected Types

enum  {
  GICR_CTLR = RD_base + 0x0000, GICR_IIDR = RD_base + 0x0004, GICR_TYPER = RD_base + 0x0008, GICR_WAKER = RD_base + 0x0014,
  GICR_PIDR0 = RD_base + 0xffe0, GICR_PIDR1 = RD_base + 0xffe4, GICR_PIDR2 = RD_base + 0xffe8, GICR_PIDR3 = RD_base + 0xffec,
  GICR_PIDR4 = RD_base + 0xffd0, GICR_PIDR5 = RD_base + 0xffd4, GICR_PIDR6 = RD_base + 0xffd8, GICR_PIDR7 = RD_base + 0xffdc
}
 
enum  {
  GICR_IGROUPR0 = SGI_base + 0x0080, GICR_ISENABLER0 = SGI_base + 0x0100, GICR_ICENABLER0 = SGI_base + 0x0180, GICR_ISPENDR0 = SGI_base + 0x0200,
  GICR_ICPENDR0 = SGI_base + 0x0280, GICR_ISACTIVER0 = SGI_base + 0x0300, GICR_ICACTIVER0 = SGI_base + 0x0380, GICR_ICFGR0 = SGI_base + 0x0c00,
  GICR_ICFGR1 = SGI_base + 0x0c04, GICR_IGRPMODR0 = SGI_base + 0x0d00, GICR_NSACR = SGI_base + 0x0e00
}
 
enum  {
  GICR_SETLPIR = RD_base + 0x0040, GICR_CLRLPIR = RD_base + 0x0048, GICR_PROPBASER = RD_base + 0x0070, GICR_PENDBASER = RD_base + 0x0078,
  GICR_INVLPIR = RD_base + 0x00A0, GICR_INVALLR = RD_base + 0x00B0, GICR_SYNCR = RD_base + 0x00C0
}
 

Protected Member Functions

 BitUnion8 (LPIConfigurationTableEntry) Bitfield< 7
 
 EndBitUnion (LPIConfigurationTableEntry) static const uint32_t GICR_CTLR_ENABLE_LPIS
 
bool isLevelSensitive (uint32_t int_id) const
 
bool treatAsEdgeTriggered (uint32_t int_id) const
 This helper is used to check if an interrupt should be treated as edge triggered in the following scenarios: More...
 

Protected Attributes

Gicv3gic
 
Gicv3Distributordistributor
 
Gicv3CPUInterfacecpuInterface
 
uint32_t cpuId
 
PortProxymemProxy
 
bool peInLowPowerState
 
std::vector< uint8_t > irqGroup
 
std::vector< bool > irqEnabled
 
std::vector< bool > irqPending
 
std::vector< bool > irqPendingIspendr
 
std::vector< bool > irqActive
 
std::vector< uint8_t > irqPriority
 
std::vector< Gicv3::IntTriggerTypeirqConfig
 
std::vector< uint8_t > irqGrpmod
 
std::vector< uint8_t > irqNsacr
 
bool DPG1S
 
bool DPG1NS
 
bool DPG0
 
bool EnableLPIs
 
Addr lpiConfigurationTablePtr
 
uint8_t lpiIDBits
 
Addr lpiPendingTablePtr
 
 priority
 
Bitfield< 1 > res1
 
Bitfield< 0 > enable
 

Static Protected Attributes

static const uint32_t RD_base = 0x0
 
static const uint32_t SGI_base = 0x10000
 
static const uint32_t GICR_WAKER_ProcessorSleep = 1 << 1
 
static const uint32_t GICR_WAKER_ChildrenAsleep = 1 << 2
 
static const AddrRange GICR_IPRIORITYR
 
static const uint32_t GICR_CTLR_DPG0 = 1 << 24
 
static const uint32_t GICR_CTLR_DPG1NS = 1 << 25
 
static const uint32_t GICR_CTLR_DPG1S = 1 << 26
 

Friends

class Gicv3CPUInterface
 
class Gicv3Distributor
 
class Gicv3Its
 

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)
 

Detailed Description

Definition at line 52 of file gic_v3_redistributor.hh.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
GICR_CTLR 
GICR_IIDR 
GICR_TYPER 
GICR_WAKER 
GICR_PIDR0 
GICR_PIDR1 
GICR_PIDR2 
GICR_PIDR3 
GICR_PIDR4 
GICR_PIDR5 
GICR_PIDR6 
GICR_PIDR7 

Definition at line 75 of file gic_v3_redistributor.hh.

◆ anonymous enum

anonymous enum
protected
Enumerator
GICR_IGROUPR0 
GICR_ISENABLER0 
GICR_ICENABLER0 
GICR_ISPENDR0 
GICR_ICPENDR0 
GICR_ISACTIVER0 
GICR_ICACTIVER0 
GICR_ICFGR0 
GICR_ICFGR1 
GICR_IGRPMODR0 
GICR_NSACR 

Definition at line 107 of file gic_v3_redistributor.hh.

◆ anonymous enum

anonymous enum
protected
Enumerator
GICR_SETLPIR 
GICR_CLRLPIR 
GICR_PROPBASER 
GICR_PENDBASER 
GICR_INVLPIR 
GICR_INVALLR 
GICR_SYNCR 

Definition at line 136 of file gic_v3_redistributor.hh.

Constructor & Destructor Documentation

◆ Gicv3Redistributor()

Gicv3Redistributor::Gicv3Redistributor ( Gicv3 gic,
uint32_t  cpu_id 
)

Definition at line 53 of file gic_v3_redistributor.cc.

Member Function Documentation

◆ activateIRQ()

void Gicv3Redistributor::activateIRQ ( uint32_t  int_id)

Definition at line 995 of file gic_v3_redistributor.cc.

References irqActive, irqPending, and treatAsEdgeTriggered().

Referenced by Gicv3CPUInterface::readMiscReg().

◆ BitUnion8()

Gicv3Redistributor::BitUnion8 ( LPIConfigurationTableEntry  )
protected

◆ canBeSelectedFor1toNInterrupt()

bool Gicv3Redistributor::canBeSelectedFor1toNInterrupt ( Gicv3::GroupId  group) const

◆ clearPPInt()

void Gicv3Redistributor::clearPPInt ( uint32_t  int_id)

◆ deactivateIRQ()

void Gicv3Redistributor::deactivateIRQ ( uint32_t  int_id)

Definition at line 1004 of file gic_v3_redistributor.cc.

References irqActive.

Referenced by Gicv3CPUInterface::deactivateIRQ().

◆ EndBitUnion()

Gicv3Redistributor::EndBitUnion ( LPIConfigurationTableEntry  ) const
protected

◆ getAffinity()

uint32_t Gicv3Redistributor::getAffinity ( ) const

◆ getCPUInterface()

Gicv3CPUInterface* Gicv3Redistributor::getCPUInterface ( ) const
inline

Definition at line 202 of file gic_v3_redistributor.hh.

References cpuInterface.

Referenced by Gicv3Distributor::route().

◆ getIntGroup()

Gicv3::GroupId Gicv3Redistributor::getIntGroup ( int  int_id) const

◆ init()

void Gicv3Redistributor::init ( )

◆ intStatus()

Gicv3::IntStatus Gicv3Redistributor::intStatus ( uint32_t  int_id) const

◆ isLevelSensitive()

bool Gicv3Redistributor::isLevelSensitive ( uint32_t  int_id) const
inlineprotected

Definition at line 227 of file gic_v3_redistributor.hh.

References Gicv3::INT_LEVEL_SENSITIVE, and irqConfig.

Referenced by clearPPInt(), and treatAsEdgeTriggered().

◆ isPendingLPI()

bool Gicv3Redistributor::isPendingLPI ( uint32_t  intid)

Definition at line 907 of file gic_v3_redistributor.cc.

References readEntryLPI().

Referenced by ItsCommand::movi().

◆ processorNumber()

uint32_t Gicv3Redistributor::processorNumber ( ) const
inline

Definition at line 208 of file gic_v3_redistributor.hh.

References cpuId.

Referenced by Gicv3::read(), and Gicv3::write().

◆ read()

uint64_t Gicv3Redistributor::read ( Addr  addr,
size_t  size,
bool  is_secure_access 
)

◆ readEntryLPI()

uint8_t Gicv3Redistributor::readEntryLPI ( uint32_t  intid)

Definition at line 884 of file gic_v3_redistributor.cc.

References lpiPendingTablePtr, memProxy, and PortProxy::readBlob().

Referenced by isPendingLPI(), and setClrLPI().

◆ sendPPInt()

void Gicv3Redistributor::sendPPInt ( uint32_t  int_id)

◆ sendSGI()

void Gicv3Redistributor::sendSGI ( uint32_t  int_id,
Gicv3::GroupId  group,
bool  ns 
)

◆ serialize()

void Gicv3Redistributor::serialize ( CheckpointOut cp) const
overridevirtual

Serialize an object.

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

Parameters
cpCheckpoint state

Implements Serializable.

Definition at line 1053 of file gic_v3_redistributor.cc.

References DPG0, DPG1NS, DPG1S, EnableLPIs, irqActive, irqConfig, irqEnabled, irqGroup, irqGrpmod, irqNsacr, irqPending, irqPendingIspendr, irqPriority, lpiConfigurationTablePtr, lpiIDBits, lpiPendingTablePtr, peInLowPowerState, SERIALIZE_CONTAINER, and SERIALIZE_SCALAR.

◆ setClrLPI()

void Gicv3Redistributor::setClrLPI ( uint64_t  data,
bool  set 
)

◆ treatAsEdgeTriggered()

bool Gicv3Redistributor::treatAsEdgeTriggered ( uint32_t  int_id) const
inlineprotected

This helper is used to check if an interrupt should be treated as edge triggered in the following scenarios:

a) While activating the interrupt b) While clearing an interrupt via ICPENDR

In fact, in these two situations, a level sensitive interrupt which had been made pending via a write to ISPENDR, will be treated as it if was edge triggered.

Definition at line 243 of file gic_v3_redistributor.hh.

References irqPendingIspendr, and isLevelSensitive().

Referenced by activateIRQ(), and write().

◆ unserialize()

void Gicv3Redistributor::unserialize ( CheckpointIn cp)
overridevirtual

Unserialize an object.

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

Parameters
cpCheckpoint state

Implements Serializable.

Definition at line 1075 of file gic_v3_redistributor.cc.

References DPG0, DPG1NS, DPG1S, EnableLPIs, irqActive, irqConfig, irqEnabled, irqGroup, irqGrpmod, irqNsacr, irqPending, irqPendingIspendr, irqPriority, lpiConfigurationTablePtr, lpiIDBits, lpiPendingTablePtr, peInLowPowerState, UNSERIALIZE_CONTAINER, and UNSERIALIZE_SCALAR.

◆ update()

void Gicv3Redistributor::update ( )

◆ updateDistributor()

void Gicv3Redistributor::updateDistributor ( )

◆ write()

void Gicv3Redistributor::write ( Addr  addr,
uint64_t  data,
size_t  size,
bool  is_secure_access 
)

◆ writeEntryLPI()

void Gicv3Redistributor::writeEntryLPI ( uint32_t  intid,
uint8_t  lpi_entry 
)

Definition at line 897 of file gic_v3_redistributor.cc.

References lpiPendingTablePtr, memProxy, and PortProxy::writeBlob().

Referenced by setClrLPI().

Friends And Related Function Documentation

◆ Gicv3CPUInterface

friend class Gicv3CPUInterface
friend

Definition at line 56 of file gic_v3_redistributor.hh.

◆ Gicv3Distributor

friend class Gicv3Distributor
friend

Definition at line 57 of file gic_v3_redistributor.hh.

◆ Gicv3Its

friend class Gicv3Its
friend

Definition at line 58 of file gic_v3_redistributor.hh.

Member Data Documentation

◆ addrRangeSize

const uint32_t Gicv3Redistributor::addrRangeSize

Definition at line 192 of file gic_v3_redistributor.hh.

◆ cpuId

uint32_t Gicv3Redistributor::cpuId
protected

Definition at line 65 of file gic_v3_redistributor.hh.

Referenced by getAffinity(), init(), processorNumber(), and read().

◆ cpuInterface

Gicv3CPUInterface* Gicv3Redistributor::cpuInterface
protected

Definition at line 64 of file gic_v3_redistributor.hh.

Referenced by getCPUInterface(), init(), setClrLPI(), update(), and write().

◆ distributor

Gicv3Distributor* Gicv3Redistributor::distributor
protected

◆ DPG0

bool Gicv3Redistributor::DPG0
protected

◆ DPG1NS

bool Gicv3Redistributor::DPG1NS
protected

◆ DPG1S

bool Gicv3Redistributor::DPG1S
protected

◆ enable

Bitfield<0> Gicv3Redistributor::enable
protected

Definition at line 175 of file gic_v3_redistributor.hh.

Referenced by write().

◆ EnableLPIs

bool Gicv3Redistributor::EnableLPIs
protected

Definition at line 166 of file gic_v3_redistributor.hh.

Referenced by read(), serialize(), setClrLPI(), unserialize(), update(), and write().

◆ gic

Gicv3* Gicv3Redistributor::gic
protected

Definition at line 62 of file gic_v3_redistributor.hh.

Referenced by getAffinity(), init(), and read().

◆ GICR_CTLR_DPG0

const uint32_t Gicv3Redistributor::GICR_CTLR_DPG0 = 1 << 24
staticprotected

Definition at line 179 of file gic_v3_redistributor.hh.

Referenced by read(), and write().

◆ GICR_CTLR_DPG1NS

const uint32_t Gicv3Redistributor::GICR_CTLR_DPG1NS = 1 << 25
staticprotected

Definition at line 180 of file gic_v3_redistributor.hh.

Referenced by read(), and write().

◆ GICR_CTLR_DPG1S

const uint32_t Gicv3Redistributor::GICR_CTLR_DPG1S = 1 << 26
staticprotected

Definition at line 181 of file gic_v3_redistributor.hh.

Referenced by read(), and write().

◆ GICR_IPRIORITYR

const AddrRange Gicv3Redistributor::GICR_IPRIORITYR
staticprotected

Definition at line 133 of file gic_v3_redistributor.hh.

Referenced by read(), and write().

◆ GICR_WAKER_ChildrenAsleep

const uint32_t Gicv3Redistributor::GICR_WAKER_ChildrenAsleep = 1 << 2
staticprotected

Definition at line 103 of file gic_v3_redistributor.hh.

Referenced by read().

◆ GICR_WAKER_ProcessorSleep

const uint32_t Gicv3Redistributor::GICR_WAKER_ProcessorSleep = 1 << 1
staticprotected

Definition at line 102 of file gic_v3_redistributor.hh.

Referenced by read(), and write().

◆ irqActive

std::vector<bool> Gicv3Redistributor::irqActive
protected

◆ irqConfig

std::vector<Gicv3::IntTriggerType> Gicv3Redistributor::irqConfig
protected

Definition at line 159 of file gic_v3_redistributor.hh.

Referenced by isLevelSensitive(), read(), serialize(), unserialize(), and write().

◆ irqEnabled

std::vector<bool> Gicv3Redistributor::irqEnabled
protected

Definition at line 154 of file gic_v3_redistributor.hh.

Referenced by read(), serialize(), unserialize(), update(), and write().

◆ irqGroup

std::vector<uint8_t> Gicv3Redistributor::irqGroup
protected

Definition at line 153 of file gic_v3_redistributor.hh.

Referenced by getIntGroup(), read(), serialize(), unserialize(), and write().

◆ irqGrpmod

std::vector<uint8_t> Gicv3Redistributor::irqGrpmod
protected

Definition at line 160 of file gic_v3_redistributor.hh.

Referenced by getIntGroup(), read(), serialize(), unserialize(), and write().

◆ irqNsacr

std::vector<uint8_t> Gicv3Redistributor::irqNsacr
protected

Definition at line 161 of file gic_v3_redistributor.hh.

Referenced by read(), sendSGI(), serialize(), unserialize(), and write().

◆ irqPending

std::vector<bool> Gicv3Redistributor::irqPending
protected

◆ irqPendingIspendr

std::vector<bool> Gicv3Redistributor::irqPendingIspendr
protected

◆ irqPriority

std::vector<uint8_t> Gicv3Redistributor::irqPriority
protected

Definition at line 158 of file gic_v3_redistributor.hh.

Referenced by read(), serialize(), unserialize(), update(), and write().

◆ lpiConfigurationTablePtr

Addr Gicv3Redistributor::lpiConfigurationTablePtr
protected

Definition at line 168 of file gic_v3_redistributor.hh.

Referenced by read(), serialize(), unserialize(), update(), and write().

◆ lpiIDBits

uint8_t Gicv3Redistributor::lpiIDBits
protected

◆ lpiPendingTablePtr

Addr Gicv3Redistributor::lpiPendingTablePtr
protected

◆ memProxy

PortProxy* Gicv3Redistributor::memProxy
protected

◆ peInLowPowerState

bool Gicv3Redistributor::peInLowPowerState
protected

◆ priority

Gicv3Redistributor::priority
protected

Definition at line 173 of file gic_v3_redistributor.hh.

◆ RD_base

const uint32_t Gicv3Redistributor::RD_base = 0x0
staticprotected

Definition at line 72 of file gic_v3_redistributor.hh.

◆ res1

Bitfield<1> Gicv3Redistributor::res1
protected

Definition at line 174 of file gic_v3_redistributor.hh.

◆ SGI_base

const uint32_t Gicv3Redistributor::SGI_base = 0x10000
staticprotected

Definition at line 73 of file gic_v3_redistributor.hh.

◆ SMALLEST_LPI_ID

const uint32_t Gicv3Redistributor::SMALLEST_LPI_ID = 8192
static

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

Generated on Wed Sep 30 2020 14:02:25 for gem5 by doxygen 1.8.17