38#ifndef __DEV_ARM_LOCALTIMER_HH__
39#define __DEV_ARM_LOCALTIMER_HH__
48#include "params/CpuLocalTimer.hh"
178 void init()
override;
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,...
Generic representation of an Arm interrupt pin.
Bitfield< 7, 3 > reserved
EndBitUnion(TimerCtrl) BitUnion32(WatchdogCtrl) Bitfield< 0 > enable
Bitfield< 15, 8 > prescalar
Bitfield< 7, 4 > reserved
void serialize(CheckpointOut &cp) const override
Serialize an object.
bool rawIntTimer
If timer has caused an interrupt.
uint32_t watchdogLoadValue
void restartTimerCounter(uint32_t val)
Restart the counter ticking at val.
WatchdogCtrl watchdogControl
EndBitUnion(WatchdogCtrl) protected CpuLocalTimer * parent
Pointer to parent class.
Timer(const std::string &name, CpuLocalTimer *_parent, ArmInterruptPin *int_timer, ArmInterruptPin *int_watchdog)
void write(PacketPtr pkt, Addr daddr)
Handle write for a single timer.
EventFunctionWrapper watchdogZeroEvent
uint32_t timerLoadValue
Value to load into counters when periodic mode reaches 0.
void timerAtZero()
Called when the counter reaches 0.
ArmInterruptPin * intWatchdog
EventFunctionWrapper timerZeroEvent
TimerCtrl timerControl
Control register as specified above.
BitUnion32(TimerCtrl) Bitfield< 0 > enable
void read(PacketPtr pkt, Addr daddr)
Handle read for a single timer.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
uint32_t watchdogDisableReg
bool pendingIntTimer
If an interrupt is currently pending.
void restartWatchdogCounter(uint32_t val)
Bitfield< 3 > watchdogMode
ArmInterruptPin * intTimer
Interrupt to cause/clear.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
void serialize(CheckpointOut &cp) const override
Serialize an object.
std::vector< std::unique_ptr< Timer > > localTimer
Timers that do the actual work.
Tick read(PacketPtr pkt) override
Handle a read to the device.
Tick write(PacketPtr pkt) override
Handle a write to the device.
CpuLocalTimer(const Params &p)
The constructor for RealView just registers itself with the MMU.
BaseGic * gic
Pointer to the GIC for causing an interrupt.
void init() override
Inits the local timers.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Basic support for object serialization.
#define EndBitUnion(name)
This closes off the class and union started by the above macro.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
std::ostream CheckpointOut
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
uint64_t Tick
Tick count type.