My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions
cpu_api.c File Reference
#include <sw_types.h>
#include <sw_board.h>
#include <sw_debug.h>
#include <global.h>
#include <cpu.h>
#include <gic.h>
#include <secure_timer.h>

Functions

void timer_init (void)
 Init secure kernel timer. More...
 
void enable_timer (void)
 Enable secure kernel timer. More...
 
void disable_timer (void)
 Disable secure kernel timer. More...
 
void trigger_tick (u64 usecs)
 This function writes the number of clockcycles to be expired before the next tick to the tick timer and enables the tick timer. More...
 
void clockcycles_to_timeval (u32 clockcycles, timeval_t *ret_timeval)
 
void timeval_to_clockcycles (timeval_t *time, pa_t *ret_clockcycles)
 It converts the time (seconds and nanoseconds) to the number of clockcycles. More...
 
void emulate_timer_irq (void)
 Emulate timer IRQ functionality. More...
 
void schedule (void)
 Invoke scheduler. More...
 

Function Documentation

void clockcycles_to_timeval ( u32  clockcycles,
timeval_t ret_timeval 
)
Parameters
clockcycles
Returns
void disable_timer ( void  )

Disable secure kernel timer.

This function disables the secure kernel timer

void emulate_timer_irq ( void  )

Emulate timer IRQ functionality.

void enable_timer ( void  )

Enable secure kernel timer.

This function enables the secure kernel timer

void schedule ( void  )

Invoke scheduler.

This function invokes the scheduler to schedule the next ready task

void timer_init ( void  )

Init secure kernel timer.

This function initialize the secure kernel timer

void timeval_to_clockcycles ( timeval_t time,
pa_t *  ret_clockcycles 
)

It converts the time (seconds and nanoseconds) to the number of clockcycles.

Parameters
time
Returns
void trigger_tick ( u64  usecs)

This function writes the number of clockcycles to be expired before the next tick to the tick timer and enables the tick timer.

Parameters
usecs