Kernelite 0.1.0
Kernelite is a minimalist, educational operating system kernel built from scratch. The project aims to recreate core components of the Linux architecture to explore the fundamentals of operating system design and hardware-software interaction.
Loading...
Searching...
No Matches
Macros | Functions
timer.c File Reference

Implementation of the system timer interface. More...

#include "timer/timer.h"
#include "fdt/fdt.h"
#include "utils/kprintf.h"
#include "../drivers/arm_timer.h"
#include <stdint.h>
Include dependency graph for timer.c:

Macros

#define MAX_TIMERS   10
 Maximum number of timer nodes the kernel will search for in the FDT.
 

Functions

bool setup_sys_timer (const void *fdt, uint64_t milliseconds, handler_data_t handler)
 Configure the system timer's tick period and interrupt handler.
 

Detailed Description

Implementation of the system timer interface.

Dispatches tick configuration and interrupt handler registration to the platform-specific timer driver.

Author
Abhin Parekadan Jose
Date
2026-06-28

Function Documentation

◆ setup_sys_timer()

bool setup_sys_timer ( const void *  fdt,
uint64_t  milliseconds,
handler_data_t  handler 
)

Configure the system timer's tick period and interrupt handler.

Parameters
fdtPointer to the Flattened Device Tree (FDT) blob, which may be used to discover timer properties and configuration.
millisecondsDesired tick period in milliseconds.
handlerHandler function and private data to invoke when the timer interrupt fires.
Returns
true if the timer was configured successfully, false otherwise.