Skip to content

Implement the Page Frame Allocator#32

Merged
Sulfiore merged 19 commits intomasterfrom
mem-phys
Mar 25, 2022
Merged

Implement the Page Frame Allocator#32
Sulfiore merged 19 commits intomasterfrom
mem-phys

Conversation

@Sulfiore
Copy link
Copy Markdown
Collaborator

the page frame allocator allocates blocs of physical memory that are size of a Page (4096 bytes).

Sulfiore added 19 commits March 8, 2022 16:37
adapting the multiboot structures by setting some values to public
This is the very begining of the PFA, the PFA is in charge of
mapping the memory into pages, and keep track of free pages.
To archieve this it uses an internal bitmap, set to 1 if a page is in use or
reserved, to 0 if the page is free.
The page frame allocator does now mark as "reserved" (set bit to 1 on bitmap)
The reserved pages include grub marked as reserved and the kernel in memory and
finally the bitmap itself.
Changes how the bitmap reserving works. Because GRUB does not give us the
whole memory we have to mark usable memory only with hose that grub excplicitly
marks as usable. And we have to keep the lower memory reserved.
Since the mod is already named pageframe, allocator is enough to be called
pageframe::Allocator
@Sulfiore Sulfiore merged commit 6667735 into master Mar 25, 2022
@Sulfiore Sulfiore deleted the mem-phys branch March 25, 2022 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant