gem5 v24.0.0.0
Loading...
Searching...
No Matches
gem5::ArchTimerKvm Class Reference

#include <generic_timer.hh>

Inheritance diagram for gem5::ArchTimerKvm:
gem5::ArchTimer gem5::SystemCounterListener gem5::Drainable gem5::Serializable

Public Member Functions

 ArchTimerKvm (const std::string &name, ArmSystem &system, SimObject &parent, SystemCounter &sysctr, ArmInterruptPin *interrupt)
 
- Public Member Functions inherited from gem5::ArchTimer
 ArchTimer (const std::string &name, SimObject &parent, SystemCounter &sysctr, ArmInterruptPin *interrupt)
 
std::string name () const
 Returns the timer name.
 
uint64_t compareValue () const
 Returns the CompareValue view of the timer.
 
void setCompareValue (uint64_t val)
 Sets the CompareValue view of the timer.
 
uint32_t timerValue () const
 Returns the TimerValue view of the timer.
 
void setTimerValue (uint32_t val)
 Sets the TimerValue view of the timer.
 
uint32_t control () const
 Sets the control register.
 
void setControl (uint32_t val)
 
uint64_t offset () const
 
void setOffset (uint64_t val)
 
uint64_t value () const
 Returns the value of the counter which this timer relies on.
 
Tick whenValue (uint64_t target_val)
 
void notify (void) override
 Called from the SystemCounter when a change in counting speed occurred Events should be rescheduled properly inside this member function.
 
void serialize (CheckpointOut &cp) const override
 Serialize an object.
 
void unserialize (CheckpointIn &cp) override
 Unserialize an object.
 
DrainState drain () override
 Draining is the process of clearing out the states of SimObjects.These are the SimObjects that are partially executed or are partially in flight.
 
void drainResume () override
 Resume execution after a successful drain.
 
- Public Member Functions inherited from gem5::Drainable
DrainState drainState () const
 Return the current drain state of an object.
 
virtual void notifyFork ()
 Notify a child process of a fork.
 
- 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.
 
void serializeSection (CheckpointOut &cp, const std::string &name) const
 
void unserializeSection (CheckpointIn &cp, const char *name)
 Unserialize an a child object.
 
void unserializeSection (CheckpointIn &cp, const std::string &name)
 

Protected Member Functions

bool scheduleEvents () override
 
- Protected Member Functions inherited from gem5::ArchTimer
 BitUnion32 (ArchTimerCtrl) Bitfield< 0 > enable
 Control register.
 
void updateCounter ()
 Timer settings or the offset has changed, re-evaluate trigger condition and raise interrupt if necessary.
 
void counterLimitReached ()
 Called when the upcounter reaches the programmed value.
 
- Protected Member Functions inherited from gem5::Drainable
 Drainable ()
 
virtual ~Drainable ()
 
void signalDrainDone () const
 Signal that an object is drained.
 

Private Attributes

ArmSystemsystem
 

Additional Inherited Members

- Static Public Member Functions inherited from gem5::Serializable
static const std::string & currentSection ()
 Gets the fully-qualified name of the active section.
 
static void generateCheckpointOut (const std::string &cpt_dir, std::ofstream &outstream)
 Generate a checkpoint file so that the serialization can be routed to it.
 
- Protected Attributes inherited from gem5::ArchTimer
Bitfield< 1 > imask
 
Bitfield< 2 > istatus
 
EndBitUnion(ArchTimerCtrl) const std SimObject_parent
 Name of this timer.
 
SystemCounter_systemCounter
 
ArmInterruptPin *const _interrupt
 
ArchTimerCtrl _control
 Value of the control register ({CNTP/CNTHP/CNTV}_CTL).
 
uint64_t _counterLimit
 Programmed limit value for the upcounter ({CNTP/CNTHP/CNTV}_CVAL).
 
uint64_t _offset
 Offset relative to the physical timer (CNTVOFF)
 
EventFunctionWrapper _counterLimitReachedEvent
 

Detailed Description

Definition at line 266 of file generic_timer.hh.

Constructor & Destructor Documentation

◆ ArchTimerKvm()

gem5::ArchTimerKvm::ArchTimerKvm ( const std::string & name,
ArmSystem & system,
SimObject & parent,
SystemCounter & sysctr,
ArmInterruptPin * interrupt )
inline

Definition at line 272 of file generic_timer.hh.

Member Function Documentation

◆ scheduleEvents()

bool gem5::ArchTimerKvm::scheduleEvents ( )
overrideprotectedvirtual

Reimplemented from gem5::ArchTimer.

Definition at line 411 of file generic_timer.cc.

References gem5::System::getKvmVM(), system, gem5::KvmVM::validEnvironment(), and gem5::ArmISA::vm.

Member Data Documentation

◆ system

ArmSystem& gem5::ArchTimerKvm::system
private

Definition at line 269 of file generic_timer.hh.

Referenced by scheduleEvents().


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

Generated on Tue Jun 18 2024 16:24:09 for gem5 by doxygen 1.11.0