|
gem5
v21.1.0.2
|
#include <interrupts.hh>
Public Types | |
| using | Params = X86LocalApicParams |
Public Types inherited from gem5::BaseInterrupts | |
| using | Params = BaseInterruptsParams |
Public Types inherited from gem5::SimObject | |
| typedef SimObjectParams | Params |
Public Member Functions | |
| int | getInitialApicId () |
| void | setThreadContext (ThreadContext *_tc) override |
| void | init () override |
| init() is called after all C++ SimObjects have been created and all ports are connected. More... | |
| Tick | read (PacketPtr pkt) |
| Tick | write (PacketPtr pkt) |
| Tick | recvMessage (PacketPtr pkt) |
| void | completeIPI (PacketPtr pkt) |
| bool | triggerTimerInterrupt () |
| AddrRangeList | getAddrRanges () const |
| AddrRangeList | getIntAddrRange () const |
| Port & | getPort (const std::string &if_name, PortID idx=InvalidPortID) override |
| Get a port with a given name and index. More... | |
| uint32_t | readReg (ApicRegIndex miscReg) |
| void | setReg (ApicRegIndex reg, uint32_t val) |
| void | setRegNoEffect (ApicRegIndex reg, uint32_t val) |
| Interrupts (const Params &p) | |
| bool | checkInterrupts () const override |
| bool | checkInterruptsRaw () const |
| Check if there are pending interrupts without ignoring the interrupts disabled flag. More... | |
| bool | hasPendingUnmaskable () const |
| Check if there are pending unmaskable interrupts. More... | |
| Fault | getInterrupt () override |
| void | updateIntrInfo () override |
| void | serialize (CheckpointOut &cp) const override |
| Serialize an object. More... | |
| void | unserialize (CheckpointIn &cp) override |
| Unserialize an object. More... | |
| void | post (int int_num, int index) override |
| void | clear (int int_num, int index) override |
| void | clearAll () override |
Public Member Functions inherited from gem5::BaseInterrupts | |
| BaseInterrupts (const Params &p) | |
Public Member Functions inherited from gem5::SimObject | |
| const Params & | params () const |
| SimObject (const Params &p) | |
| virtual | ~SimObject () |
| virtual void | loadState (CheckpointIn &cp) |
| loadState() is called on each SimObject when restoring from a checkpoint. More... | |
| virtual void | initState () |
| initState() is called on each SimObject when not restoring from a checkpoint. More... | |
| virtual void | regProbePoints () |
| Register probe points for this object. More... | |
| virtual void | regProbeListeners () |
| Register probe listeners for this object. More... | |
| ProbeManager * | getProbeManager () |
| Get the probe manager for this object. More... | |
| virtual void | startup () |
| startup() is the final initialization call before simulation. More... | |
| DrainState | drain () override |
| Provide a default implementation of the drain interface for objects that don't need draining. More... | |
| virtual void | memWriteback () |
| Write back dirty buffers to memory using functional writes. More... | |
| virtual void | memInvalidate () |
| Invalidate the contents of memory buffers. 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::EventManager | |
| EventQueue * | eventQueue () const |
| void | schedule (Event &event, Tick when) |
| void | deschedule (Event &event) |
| void | reschedule (Event &event, Tick when, bool always=false) |
| void | schedule (Event *event, Tick when) |
| void | deschedule (Event *event) |
| void | reschedule (Event *event, Tick when, bool always=false) |
| void | wakeupEventQueue (Tick when=(Tick) -1) |
| This function is not needed by the usual gem5 event loop but may be necessary in derived EventQueues which host gem5 on other schedulers. More... | |
| void | setCurTick (Tick newVal) |
| EventManager (EventManager &em) | |
| Event manger manages events in the event queue. More... | |
| EventManager (EventManager *em) | |
| EventManager (EventQueue *eq) | |
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) |
Public Member Functions inherited from gem5::Drainable | |
| DrainState | drainState () const |
| Return the current drain state of an object. More... | |
| virtual void | notifyFork () |
| Notify a child process of a fork. More... | |
Public Member Functions inherited from gem5::statistics::Group | |
| Group (Group *parent, const char *name=nullptr) | |
| Construct a new statistics group. More... | |
| virtual | ~Group () |
| virtual void | regStats () |
| Callback to set stat parameters. More... | |
| virtual void | resetStats () |
| Callback to reset stats. More... | |
| virtual void | preDumpStats () |
| Callback before stats are dumped. More... | |
| void | addStat (statistics::Info *info) |
| Register a stat with this group. More... | |
| const std::map< std::string, Group * > & | getStatGroups () const |
| Get all child groups associated with this object. More... | |
| const std::vector< Info * > & | getStats () const |
| Get all stats associated with this object. More... | |
| void | addStatGroup (const char *name, Group *block) |
| Add a stat block as a child of this block. More... | |
| const Info * | resolveStat (std::string name) const |
| Resolve a stat by its name within this group. More... | |
| void | mergeStatGroup (Group *block) |
| Merge the contents (stats & children) of a block to this block. More... | |
| Group ()=delete | |
| Group (const Group &)=delete | |
| Group & | operator= (const Group &)=delete |
Public Member Functions inherited from gem5::Named | |
| Named (const std::string &name_) | |
| virtual | ~Named ()=default |
| virtual std::string | name () const |
Protected Member Functions | |
| BitUnion32 (LVTEntry) Bitfield< 7 | |
| EndBitUnion (LVTEntry) EventFunctionWrapper apicTimerEvent | |
| void | processApicTimerEvent () |
| int | findRegArrayMSB (ApicRegIndex base) |
| void | updateIRRV () |
| void | updateISRV () |
| void | setRegArrayBit (ApicRegIndex base, uint8_t vector) |
| void | clearRegArrayBit (ApicRegIndex base, uint8_t vector) |
| bool | getRegArrayBit (ApicRegIndex base, uint8_t vector) |
| Tick | clockPeriod () const |
| void | requestInterrupt (uint8_t vector, uint8_t deliveryMode, bool level) |
Protected Member Functions inherited from gem5::Drainable | |
| Drainable () | |
| virtual | ~Drainable () |
| virtual void | drainResume () |
| Resume execution after a successful drain. More... | |
| void | signalDrainDone () const |
| Signal that an object is drained. More... | |
Protected Attributes | |
| System * | sys |
| ClockDomain & | clockDomain |
| uint32_t | regs [NUM_APIC_REGS] |
| vector | |
| Bitfield< 10, 8 > | deliveryMode |
| Bitfield< 12 > | status |
| Bitfield< 13 > | polarity |
| Bitfield< 14 > | remoteIRR |
| Bitfield< 15 > | trigger |
| Bitfield< 16 > | masked |
| Bitfield< 17 > | periodic |
| bool | pendingSmi |
| uint8_t | smiVector |
| bool | pendingNmi |
| uint8_t | nmiVector |
| bool | pendingExtInt |
| uint8_t | extIntVector |
| bool | pendingInit |
| uint8_t | initVector |
| bool | pendingStartup |
| uint8_t | startupVector |
| bool | startedUp |
| bool | pendingUnmaskableInt |
| int | pendingIPIs |
| uint8_t | IRRV |
| uint8_t | ISRV |
| int | initialApicId |
| IntResponsePort< Interrupts > | intResponsePort |
| IntRequestPort< Interrupts > | intRequestPort |
| PioPort< Interrupts > | pioPort |
| Tick | pioDelay |
| Addr | pioAddr = MaxAddr |
Protected Attributes inherited from gem5::BaseInterrupts | |
| ThreadContext * | tc = nullptr |
Protected Attributes inherited from gem5::SimObject | |
| const SimObjectParams & | _params |
| Cached copy of the object parameters. More... | |
Protected Attributes inherited from gem5::EventManager | |
| EventQueue * | eventq |
| A pointer to this object's event queue. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from gem5::SimObject | |
| static void | serializeAll (const std::string &cpt_dir) |
| Create a checkpoint by serializing all SimObjects in the system. More... | |
| static SimObject * | find (const char *name) |
| Find the SimObject with the given name and return a pointer to it. More... | |
| static void | setSimObjectResolver (SimObjectResolver *resolver) |
| There is a single object name resolver, and it is only set when simulation is restoring from checkpoints. More... | |
| static SimObjectResolver * | getSimObjectResolver () |
| There is a single object name resolver, and it is only set when simulation is restoring from checkpoints. More... | |
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... | |
Definition at line 77 of file interrupts.hh.
| using gem5::X86ISA::Interrupts::Params = X86LocalApicParams |
Definition at line 196 of file interrupts.hh.
| gem5::X86ISA::Interrupts::Interrupts | ( | const Params & | p | ) |
Definition at line 599 of file interrupts.cc.
References processApicTimerEvent().
|
protected |
|
overridevirtual |
Implements gem5::BaseInterrupts.
Definition at line 624 of file interrupts.cc.
References gem5::X86ISA::APIC_TASK_PRIORITY, gem5::bits(), DPRINTF, and gem5::X86ISA::MISCREG_RFLAGS.
| bool gem5::X86ISA::Interrupts::checkInterruptsRaw | ( | ) | const |
Check if there are pending interrupts without ignoring the interrupts disabled flag.
Definition at line 646 of file interrupts.cc.
References gem5::X86ISA::APIC_TASK_PRIORITY, and gem5::bits().
|
inlineoverridevirtual |
Reimplemented from gem5::BaseInterrupts.
Definition at line 294 of file interrupts.hh.
References panic.
|
inlineoverridevirtual |
Reimplemented from gem5::BaseInterrupts.
Definition at line 300 of file interrupts.hh.
References panic.
|
inlineprotected |
Definition at line 162 of file interrupts.hh.
References gem5::X86ISA::base, regs, and vector.
|
inlineprotected |
Definition at line 173 of file interrupts.hh.
References clockDomain, and gem5::ClockDomain::clockPeriod().
| void gem5::X86ISA::Interrupts::completeIPI | ( | PacketPtr | pkt | ) |
Definition at line 333 of file interrupts.cc.
References gem5::X86ISA::APIC_INTERRUPT_COMMAND_LOW, and DPRINTF.
|
protected |
|
inlineprotected |
Definition at line 132 of file interrupts.hh.
References gem5::X86ISA::base, gem5::findMsbSet(), gem5::X86ISA::offset, and regs.
Referenced by updateIRRV(), and updateISRV().
| AddrRangeList gem5::X86ISA::Interrupts::getAddrRanges | ( | ) | const |
Definition at line 347 of file interrupts.cc.
References gem5::X86ISA::PageBytes, and gem5::RangeSize().
|
inline |
Definition at line 191 of file interrupts.hh.
References initialApicId.
| AddrRangeList gem5::X86ISA::Interrupts::getIntAddrRange | ( | ) | const |
Definition at line 357 of file interrupts.cc.
References gem5::X86ISA::PhysAddrAPICRangeSize, gem5::RangeEx(), and gem5::X86ISA::x86InterruptAddress().
|
overridevirtual |
Implements gem5::BaseInterrupts.
Definition at line 654 of file interrupts.cc.
References DPRINTF, gem5::NoFault, and panic.
|
inlineoverridevirtual |
Get a port with a given name and index.
This is used at binding time and returns a reference to a protocol-agnostic port.
gem5 has a request and response port interface. All memory objects are connected together via ports. These ports provide a rigid interface between these memory objects. These ports implement three different memory system modes: timing, atomic, and functional. The most important mode is the timing mode and here timing mode is used for conducting cycle-level timing experiments. The other modes are only used in special circumstances and should not be used to conduct cycle-level timing experiments. The other modes are only used in special circumstances. These ports allow SimObjects to communicate with each other.
| if_name | Port name |
| idx | Index in the case of a VectorPort |
Reimplemented from gem5::SimObject.
Definition at line 225 of file interrupts.hh.
References gem5::SimObject::getPort(), intRequestPort, intResponsePort, and pioPort.
|
inlineprotected |
Definition at line 168 of file interrupts.hh.
References gem5::X86ISA::base, gem5::bits(), regs, and vector.
|
inline |
Check if there are pending unmaskable interrupts.
Definition at line 273 of file interrupts.hh.
References pendingUnmaskableInt.
|
overridevirtual |
init() is called after all C++ SimObjects have been created and all ports are connected.
Initializations that are independent of unserialization but rely on a fully instantiated and connected SimObject graph should be done here.
Reimplemented from gem5::SimObject.
Definition at line 292 of file interrupts.cc.
|
inlineoverridevirtual |
Reimplemented from gem5::BaseInterrupts.
Definition at line 288 of file interrupts.hh.
References panic.
|
protected |
Definition at line 780 of file interrupts.cc.
References gem5::X86ISA::APIC_INITIAL_COUNT.
Referenced by Interrupts().
Definition at line 193 of file interrupts.cc.
References gem5::X86ISA::decodeAddr(), DPRINTF, gem5::Packet::getAddr(), gem5::Packet::getSize(), gem5::htole(), gem5::Packet::makeAtomicResponse(), gem5::X86ISA::mask, gem5::X86ISA::offset, panic, pioAddr, pioDelay, readReg(), gem5::X86ISA::reg, gem5::Packet::setData(), and gem5::X86ISA::val.
| uint32_t gem5::X86ISA::Interrupts::readReg | ( | ApicRegIndex | miscReg | ) |
Definition at line 368 of file interrupts.cc.
References gem5::X86ISA::APIC_ARBITRATION_PRIORITY, gem5::X86ISA::APIC_CURRENT_COUNT, gem5::X86ISA::APIC_DIVIDE_CONFIGURATION, gem5::X86ISA::APIC_ERROR_STATUS, gem5::X86ISA::APIC_INTERNAL_STATE, gem5::X86ISA::APIC_PROCESSOR_PRIORITY, gem5::X86ISA::APIC_TRIGGER_MODE(), gem5::curTick(), gem5::divideFromConf(), panic, gem5::X86ISA::reg, and gem5::X86ISA::val.
Referenced by read().
Definition at line 305 of file interrupts.cc.
References gem5::Packet::cmd, DPRINTF, gem5::Packet::getAddr(), gem5::Packet::getRaw(), gem5::Packet::makeAtomicResponse(), gem5::X86ISA::offset, panic, gem5::MemCmd::WriteReq, and gem5::X86ISA::x86InterruptAddress().
|
protected |
Definition at line 227 of file interrupts.cc.
References gem5::X86ISA::APIC_INTERRUPT_REQUEST_BASE, gem5::X86ISA::APIC_TRIGGER_MODE_BASE, gem5::X86ISA::deliveryMode, DPRINTF, gem5::X86ISA::delivery_mode::ExtInt, gem5::X86ISA::delivery_mode::Fixed, gem5::FullSystem, gem5::X86ISA::delivery_mode::INIT, gem5::X86ISA::delivery_mode::isReserved(), gem5::X86ISA::level, gem5::X86ISA::delivery_mode::LowestPriority, gem5::X86ISA::delivery_mode::names, gem5::X86ISA::delivery_mode::NMI, gem5::X86ISA::delivery_mode::SIPI, gem5::X86ISA::delivery_mode::SMI, and gem5::X86ISA::vector.
Referenced by triggerTimerInterrupt().
|
overridevirtual |
Serialize an object.
Output an object's state into the current checkpoint section.
| cp | Checkpoint state |
Implements gem5::Serializable.
Definition at line 723 of file interrupts.cc.
References gem5::X86ISA::NUM_APIC_REGS, SERIALIZE_ARRAY, and SERIALIZE_SCALAR.
| void gem5::X86ISA::Interrupts::setReg | ( | ApicRegIndex | reg, |
| uint32_t | val | ||
| ) |
Definition at line 406 of file interrupts.cc.
References gem5::X86ISA::APIC_ARBITRATION_PRIORITY, gem5::X86ISA::APIC_CURRENT_COUNT, gem5::X86ISA::APIC_DESTINATION_FORMAT, gem5::X86ISA::APIC_DIVIDE_CONFIGURATION, gem5::X86ISA::APIC_EOI, gem5::X86ISA::APIC_ERROR_STATUS, gem5::X86ISA::APIC_ID, gem5::X86ISA::APIC_IN_SERVICE(), gem5::X86ISA::APIC_IN_SERVICE_BASE, gem5::X86ISA::APIC_INITIAL_COUNT, gem5::X86ISA::APIC_INTERNAL_STATE, gem5::X86ISA::APIC_INTERRUPT_COMMAND_HIGH, gem5::X86ISA::APIC_INTERRUPT_COMMAND_LOW, gem5::X86ISA::APIC_INTERRUPT_REQUEST(), gem5::X86ISA::APIC_LOGICAL_DESTINATION, gem5::X86ISA::APIC_LVT_ERROR, gem5::X86ISA::APIC_LVT_LINT0, gem5::X86ISA::APIC_LVT_LINT1, gem5::X86ISA::APIC_LVT_PERFORMANCE_MONITORING_COUNTERS, gem5::X86ISA::APIC_LVT_THERMAL_SENSOR, gem5::X86ISA::APIC_LVT_TIMER, gem5::X86ISA::APIC_PROCESSOR_PRIORITY, gem5::X86ISA::APIC_SPURIOUS_INTERRUPT_VECTOR, gem5::X86ISA::APIC_TASK_PRIORITY, gem5::X86ISA::APIC_TRIGGER_MODE(), gem5::X86ISA::APIC_VERSION, gem5::bits(), gem5::X86ISA::buildIntTriggerPacket(), gem5::curTick(), gem5::divideFromConf(), hack_once, gem5::high, gem5::ArmISA::i, gem5::X86ISA::delivery_mode::LowestPriority, gem5::X86ISA::offset, panic, gem5::X86ISA::reg, gem5::X86ISA::val, and warn.
|
inlineprotected |
Definition at line 156 of file interrupts.hh.
References gem5::X86ISA::base, regs, and vector.
|
inline |
Definition at line 245 of file interrupts.hh.
References gem5::X86ISA::reg, regs, and gem5::X86ISA::val.
|
overridevirtual |
Reimplemented from gem5::BaseInterrupts.
Definition at line 277 of file interrupts.cc.
References gem5::X86ISA::APIC_ID, gem5::ThreadContext::cpuId(), panic_if, gem5::BaseInterrupts::setThreadContext(), and gem5::X86ISA::x86LocalAPICAddress().
|
inline |
Definition at line 214 of file interrupts.hh.
References gem5::X86ISA::APIC_LVT_TIMER, regs, and requestInterrupt().
|
overridevirtual |
Unserialize an object.
Read an object's state from the current checkpoint section.
| cp | Checkpoint state |
Implements gem5::Serializable.
Definition at line 748 of file interrupts.cc.
References gem5::X86ISA::NUM_APIC_REGS, UNSERIALIZE_ARRAY, and UNSERIALIZE_SCALAR.
|
overridevirtual |
Implements gem5::BaseInterrupts.
Definition at line 688 of file interrupts.cc.
References gem5::X86ISA::APIC_IN_SERVICE_BASE, gem5::X86ISA::APIC_INTERRUPT_REQUEST_BASE, and DPRINTF.
|
inlineprotected |
Definition at line 144 of file interrupts.hh.
References gem5::X86ISA::APIC_INTERRUPT_REQUEST_BASE, findRegArrayMSB(), and IRRV.
|
inlineprotected |
Definition at line 150 of file interrupts.hh.
References gem5::X86ISA::APIC_IN_SERVICE_BASE, findRegArrayMSB(), and ISRV.
Definition at line 210 of file interrupts.cc.
References gem5::X86ISA::decodeAddr(), DPRINTF, gem5::Packet::getAddr(), gem5::Packet::getSize(), gem5::letoh(), gem5::Packet::makeAtomicResponse(), gem5::X86ISA::mask, gem5::X86ISA::offset, panic, gem5::X86ISA::reg, gem5::X86ISA::val, and gem5::Packet::writeData().
|
protected |
Definition at line 81 of file interrupts.hh.
Referenced by clockPeriod().
|
protected |
Definition at line 88 of file interrupts.hh.
|
protected |
Definition at line 112 of file interrupts.hh.
|
protected |
Definition at line 177 of file interrupts.hh.
Referenced by getInitialApicId().
|
protected |
Definition at line 114 of file interrupts.hh.
|
protected |
Definition at line 181 of file interrupts.hh.
Referenced by getPort().
|
protected |
Definition at line 180 of file interrupts.hh.
Referenced by getPort().
|
protected |
Definition at line 128 of file interrupts.hh.
Referenced by updateIRRV().
|
protected |
Definition at line 129 of file interrupts.hh.
Referenced by updateISRV().
|
protected |
Definition at line 93 of file interrupts.hh.
|
protected |
Definition at line 110 of file interrupts.hh.
|
protected |
Definition at line 111 of file interrupts.hh.
|
protected |
Definition at line 113 of file interrupts.hh.
|
protected |
Definition at line 123 of file interrupts.hh.
|
protected |
Definition at line 109 of file interrupts.hh.
|
protected |
Definition at line 107 of file interrupts.hh.
|
protected |
Definition at line 115 of file interrupts.hh.
|
protected |
Definition at line 120 of file interrupts.hh.
Referenced by hasPendingUnmaskable().
|
protected |
Definition at line 94 of file interrupts.hh.
Definition at line 187 of file interrupts.hh.
Referenced by read().
|
protected |
Definition at line 186 of file interrupts.hh.
Referenced by read().
|
protected |
Definition at line 184 of file interrupts.hh.
Referenced by getPort().
|
protected |
Definition at line 90 of file interrupts.hh.
|
protected |
Definition at line 84 of file interrupts.hh.
Referenced by clearRegArrayBit(), findRegArrayMSB(), getRegArrayBit(), setRegArrayBit(), setRegNoEffect(), and triggerTimerInterrupt().
|
protected |
Definition at line 91 of file interrupts.hh.
|
protected |
Definition at line 108 of file interrupts.hh.
|
protected |
Definition at line 117 of file interrupts.hh.
|
protected |
Definition at line 116 of file interrupts.hh.
|
protected |
Definition at line 89 of file interrupts.hh.
|
protected |
Definition at line 80 of file interrupts.hh.
|
protected |
Definition at line 92 of file interrupts.hh.
|
protected |
Definition at line 87 of file interrupts.hh.
Referenced by clearRegArrayBit(), getRegArrayBit(), and setRegArrayBit().