Previous Home Next


System Timer

The system timer source code is in the source file arch/arm/vx115_clk.c, and provides the basic NetBSD system time reference. The main functionality is as a driver for one of the hardware timers on the SoC that responds to timer interrupts by calling appropriate system functions to update the time. The timer source also provides several other functions for services such as delays.

Initialization

The driver provides the usual autoconfig match/attach functions to initialize the bus operations structure.

System clock

The system clock provides ticks at the rate defined by the configuration define HZ. The default value for HZ is 100, giving a system tick period of 10 ms. However, because the Vx115 timer uses a 32 kHz clock as a source, for this platform HZ is defined as 64 to give an integer value for the hardware timer max count value.

The system clock is started through a call to cpu_initclocks( ) from within the initclocks( ) function in kern/kern_clocks.c. This starts the process of timer interrupt generation.

cpu_initclocks( )

vx115_clk_intr( )

delay( )

microtime( )


Time-of-day functions

todr_attach( )

inittodr( )

resettodr( )




Previous Home Next

Comments/questions: jsevy@cs.drexel.edu