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
Functions | Variables
symbols.h File Reference

Symbol definitions from the linker script. More...

#include "mem_layout/mem_layout.h"
#include "page_table/page_table.h"
#include <stddef.h>
#include <stdint.h>
Include dependency graph for symbols.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

static size_t get_image_size (void)
 Return the size of the linked image in bytes.
 
static phy_addr get_id_map_region_start (void)
 Return the start of the identity-map memory region.
 
static page_table_tget_id_map_root (void)
 Return the root of the id map.
 
static page_table_tget_kernel_map_root (void)
 Return the root of the kernel map.
 

Variables

uint8_t idmap_pg_dir_bitmap_start []
 Start of the identity page map directory bitmap.
 
uint8_t idmap_pg_dir_start []
 Start of the identity page map directory pages.
 
uint8_t kernel_pg_dir_root_start []
 Start of the kernel page map directory pages.
 
const char image_start
 Linker-provided symbol marking the start of the linked image.
 
const char image_end
 Linker-provided symbol marking the end of the linked image.
 

Detailed Description

Symbol definitions from the linker script.

Declares the linker-provided symbols used by the kernel to locate the image bounds, zero page allocator bitmap, and other layout metadata.

Author
Abhin Parekadan Jose
Date
2026-04-12

Function Documentation

◆ get_id_map_region_start()

static phy_addr get_id_map_region_start ( void  )
inlinestatic

Return the start of the identity-map memory region.

Returns
the physical address of the start of the id-map region, which is the bitmap page preceding the id-map page directory.

◆ get_id_map_root()

static page_table_t * get_id_map_root ( void  )
inlinestatic

Return the root of the id map.

Returns
the pointer to the root of the id map.

◆ get_image_size()

static size_t get_image_size ( void  )
inlinestatic

Return the size of the linked image in bytes.

Uses the linker-provided image_start and image_end symbols injected by the linker script to compute the kernel image size.

Returns
The number of bytes in the linked kernel image.

◆ get_kernel_map_root()

static page_table_t * get_kernel_map_root ( void  )
inlinestatic

Return the root of the kernel map.

Returns
the pointer to the root of the kernel map.