|
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.
|
Utility functions for kernel development. More...
#include <stdbool.h>#include <stdint.h>

Go to the source code of this file.
Data Structures | |
| union | mpidr_el1_t |
| AArch64 Multiprocessor Affinity Register (MPIDR_EL1, read-only). More... | |
Typedefs | |
| typedef union mpidr_el1_t | mpidr_el1_t |
| AArch64 Multiprocessor Affinity Register (MPIDR_EL1, read-only). | |
Functions | |
| void | print_kernelite_logo (void) |
| Prints the Kernelite ASCII art logo and banner to the console. | |
| uint32_t | get_core_id (void) |
| Gets the core id. | |
| void | print_current_el (void) |
| Prints the current exeception level. | |
| bool | setup_page_allocator (const void *fdt_addr) |
| Set up the global page allocator. | |
Utility functions for kernel development.
This module contains utility functions for kernel development, including functions for reserving kernel image pages, setting up the global page allocator, and other helper functions used across the kernel.
| typedef union mpidr_el1_t mpidr_el1_t |
AArch64 Multiprocessor Affinity Register (MPIDR_EL1, read-only).
Identifies the PE within a multiprocessor system. In a simple single-cluster system (e.g. QEMU virt), Aff1/Aff2/Aff3 are 0 and Aff0 is the core number.
Compare AffinityValue (Aff3.Aff2.Aff1.Aff0) against GICR_TYPER.AffinityValue to find the Redistributor frame belonging to this PE.
Note:
mrs <Xn>, mpidr_el1.| uint32_t get_core_id | ( | void | ) |
Gets the core id.
| bool setup_page_allocator | ( | const void * | fdt_addr | ) |
Set up the global page allocator.
This function initializes the global page allocator based on the memory map obtained from the Device Tree Blob (FDT).
| fdt_addr | Pointer to the FDT blob. |