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
symbols.h
Go to the documentation of this file.
1
11#ifndef LINKER_SYMBOLS_H
12#define LINKER_SYMBOLS_H
13
16
17#include <stddef.h>
18#include <stdint.h>
19
23extern uint8_t idmap_pg_dir_bitmap_start[];
24
28extern uint8_t idmap_pg_dir_start[];
29
33extern uint8_t kernel_pg_dir_root_start[];
34
36extern const char image_start;
37
39extern const char image_end;
40
49static inline size_t get_image_size(void)
50{
51 return (size_t)((uintptr_t)&image_end - (uintptr_t)(&image_start));
52}
53
60{
62}
63
68static inline page_table_t *get_id_map_root(void)
69{
71}
72
78{
80}
81
82#endif // LINKER_SYMBOLS_H
Memory layout definitions.
uint64_t phy_addr
Type for representing physical addresses.
Definition mem_layout.h:17
Page table definitions and helpers for virtual memory mapping.
Represents a single page table level (512 entries).
Definition page_table.h:315
static page_table_t * get_id_map_root(void)
Return the root of the id map.
Definition symbols.h:68
static size_t get_image_size(void)
Return the size of the linked image in bytes.
Definition symbols.h:49
static page_table_t * get_kernel_map_root(void)
Return the root of the kernel map.
Definition symbols.h:77
uint8_t idmap_pg_dir_bitmap_start[]
Start of the identity page map directory bitmap.
const char image_end
Linker-provided symbol marking the end of the linked image.
uint8_t idmap_pg_dir_start[]
Start of the identity page map directory pages.
const char image_start
Linker-provided symbol marking the start of the linked image.
uint8_t kernel_pg_dir_root_start[]
Start of the kernel page map directory pages.
static phy_addr get_id_map_region_start(void)
Return the start of the identity-map memory region.
Definition symbols.h:59