NOVA User-Level Environment  Version testbox/changed-memory-timing-317-g320d8b5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PerCpuTimerService Class Reference
Inheritance diagram for PerCpuTimerService:
BasicHpet StaticReceiver< PerCpuTimerService > CapAllocator Device InternalCapAllocator

Classes

struct  ClientData
struct  PerCpu
struct  RemoteSlot
struct  Timer
struct  WorkerMessage

Public Member Functions

bool receive (MessageIrq &msg)
unsigned alloc_crd ()
unsigned portal_func (Utcb &utcb, Utcb::Frame &input, bool &free_cap, cap_sel pid)
uint64 wallclock_init ()
 PerCpuTimerService (Motherboard &mb, unsigned cap, unsigned cap_order, bool hpet_force_legacy, bool force_pit, unsigned pit_period_us, bool verbose, bool slow_wallclock)
- Public Member Functions inherited from StaticReceiver< PerCpuTimerService >
 StaticReceiver ()
- Public Member Functions inherited from Device
void debug_dump ()
 Device (const char *debug_name)
- Public Member Functions inherited from CapAllocator
 CapAllocator (unsigned long cap_, unsigned long cap_start, unsigned long cap_order)
unsigned alloc_cap (unsigned count=1)
void dealloc_cap (unsigned cap, unsigned count=1)

Static Public Member Functions

static void do_xcpu_wakeup_thread (void *t) REGPARM(0) NORETURN
static void do_per_cpu_worker (void *t, Utcb *u) REGPARM(0)
- Static Public Member Functions inherited from StaticReceiver< PerCpuTimerService >
static bool receive_static (Device *o, M &msg)

Private Member Functions

bool attach_timer_irq (DBus< MessageHostOp > &bus_hostop, Timer *timer, phy_cpu_no cpu)
uint64 absolute_tsc_to_timer (PerCpu *per_cpu, uint64 tsc)
bool per_cpu_handle_xcpu (PerCpu *per_cpu)
bool per_cpu_client_request (PerCpu *per_cpu, ClientData *data)
uint64 handle_expired_timers (PerCpu *per_cpu, uint64 now)
void update_hpet_estimation (PerCpu *per_cpu)
void per_cpu_worker (Utcb *u)
bool hpet_init (bool hpet_force_legacy)
void hpet_start (uint64 value)
void start_thread (ServiceThreadFn fn, unsigned prio, phy_cpu_no cpu)
void pit_init (unsigned period_us)
void xcpu_wakeup_thread () NORETURN

Private Attributes

Motherboard_mb
HostHpetRegister * _reg
uint32 _timer_freq
uint64 _nominal_tsc_ticks_per_timer_tick
unsigned _usable_timers
uint64 _pit_ticks
struct PerCpuTimerService::Timer _timer [MAX_TIMERS]
ClientDataStorage< ClientData,
PerCpuTimerService
_storage
KernelSemaphore _xcpu_up
PerCpu_per_cpu [Config::MAX_CPUS]
uint32 _assigned_irqs
bool _verbose
bool _slow_wallclock

Static Private Attributes

static const unsigned MAX_TIMERS = 24

Additional Inherited Members

- Public Attributes inherited from CapAllocator
unsigned long _cap_
unsigned long _cap_start
unsigned long _cap_order
- Private Types inherited from BasicHpet
enum  {
  ENABLE_CNF = (1U << 0), LEG_RT_CNF = (1U << 1), LEG_RT_CAP = (1U << 15), BIT64_CAP = (1U << 13),
  FSB_INT_DEL_CAP = (1U << 15), FSB_INT_EN_CNF = (1U << 14), MODE32_CNF = (1U << 8), PER_INT_CAP = (1U << 4),
  TYPE_CNF = (1U << 3), INT_ENB_CNF = (1U << 2), INT_TYPE_CNF = (1U << 1)
}
- Static Private Member Functions inherited from BasicHpet
static unsigned long get_hpet_address (DBus< MessageAcpi > &bus_acpi)
 Get the HPET address from the ACPI table.
static uint16 get_hpet_rid (DBus< MessageAcpi > &bus_acpi, unsigned block, unsigned comparator)
 Try to find out HPET routing ID.
static bool check_hpet_present (void *address, unsigned timer, unsigned irq)
 Check whether some address points to an hpet.

Constructor & Destructor Documentation

PerCpuTimerService::PerCpuTimerService ( Motherboard mb,
unsigned  cap,
unsigned  cap_order,
bool  hpet_force_legacy,
bool  force_pit,
unsigned  pit_period_us,
bool  verbose,
bool  slow_wallclock 
)
inline

Member Function Documentation

uint64 PerCpuTimerService::absolute_tsc_to_timer ( PerCpu per_cpu,
uint64  tsc 
)
inlineprivate
unsigned PerCpuTimerService::alloc_crd ( )
inline
bool PerCpuTimerService::attach_timer_irq ( DBus< MessageHostOp > &  bus_hostop,
Timer timer,
phy_cpu_no  cpu 
)
inlineprivate
static void PerCpuTimerService::do_per_cpu_worker ( void *  t,
Utcb u 
)
inlinestatic
static void PerCpuTimerService::do_xcpu_wakeup_thread ( void *  t)
inlinestatic
uint64 PerCpuTimerService::handle_expired_timers ( PerCpu per_cpu,
uint64  now 
)
inlineprivate
bool PerCpuTimerService::hpet_init ( bool  hpet_force_legacy)
inlineprivate
void PerCpuTimerService::hpet_start ( uint64  value)
inlineprivate
bool PerCpuTimerService::per_cpu_client_request ( PerCpu per_cpu,
ClientData data 
)
inlineprivate
bool PerCpuTimerService::per_cpu_handle_xcpu ( PerCpu per_cpu)
inlineprivate
void PerCpuTimerService::per_cpu_worker ( Utcb u)
inlineprivate
void PerCpuTimerService::pit_init ( unsigned  period_us)
inlineprivate
unsigned PerCpuTimerService::portal_func ( Utcb utcb,
Utcb::Frame input,
bool &  free_cap,
cap_sel  pid 
)
inline
bool PerCpuTimerService::receive ( MessageIrq msg)
inline
void PerCpuTimerService::start_thread ( ServiceThreadFn  fn,
unsigned  prio,
phy_cpu_no  cpu 
)
inlineprivate
void PerCpuTimerService::update_hpet_estimation ( PerCpu per_cpu)
inlineprivate
uint64 PerCpuTimerService::wallclock_init ( )
inline
void PerCpuTimerService::xcpu_wakeup_thread ( )
inlineprivate

Member Data Documentation

uint32 PerCpuTimerService::_assigned_irqs
private
Motherboard& PerCpuTimerService::_mb
private
uint64 PerCpuTimerService::_nominal_tsc_ticks_per_timer_tick
private
PerCpu* PerCpuTimerService::_per_cpu[Config::MAX_CPUS]
private
uint64 PerCpuTimerService::_pit_ticks
private
HostHpetRegister* PerCpuTimerService::_reg
private
bool PerCpuTimerService::_slow_wallclock
private
ClientDataStorage<ClientData, PerCpuTimerService> PerCpuTimerService::_storage
private
struct PerCpuTimerService::Timer PerCpuTimerService::_timer[MAX_TIMERS]
private
uint32 PerCpuTimerService::_timer_freq
private
unsigned PerCpuTimerService::_usable_timers
private
bool PerCpuTimerService::_verbose
private
KernelSemaphore PerCpuTimerService::_xcpu_up
private
const unsigned PerCpuTimerService::MAX_TIMERS = 24
staticprivate

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