My Kernel v0.1.0
Internal structures and definitions

Internal structures and definitions used by the PMM. More...

Collaboration diagram for Internal structures and definitions:

Data Structures

struct  pmm_frame_allocator
 A pageframe allocator. More...
 

Functions

static bool pmm_initialize_pages (struct multiboot_info *mbt)
 Initialize the static array of page structs. More...
 

Variables

struct page pmm_pageframes [TOTAL_PAGEFRAMES_COUNT]
 The static array of all existing pages. More...
 
static pmm_frame_allocator g_pmm_allocator
 Allocator for 'classical' pageframes.
 

Detailed Description

No module outside of the PMM should access these.

Function Documentation

◆ pmm_initialize_pages()

static bool pmm_initialize_pages ( struct multiboot_info *  mbt)
static

Using the bootloader's information, we mark unusable pageframes as being unavailable. The kernel's code is also marked as unavailable, since this distinction is not made by the bootloader.

Finally, we initialize the allocator structs, locating their first respective available address.

Parameters
mbtThe information passed on by the bootloader
Returns
Whether the initialization process succeeded

Variable Documentation

◆ pmm_pageframes

struct page pmm_pageframes[TOTAL_PAGEFRAMES_COUNT]

The array of all existing pageframes.

Note
The arrays's size is hardcoded to be able to fit each and every pageframes (even though only part of them will be available at runtime).