Add a bootstrap physical memory manager.

This will allow the real physical memory manager to use allocations.
This commit is contained in:
Drew Galbraith 2023-05-18 11:00:05 -07:00
parent 747c2a4e17
commit 2d719d0443
5 changed files with 105 additions and 6 deletions

View file

@ -0,0 +1,18 @@
#pragma once
#include <stdint.h>
namespace phys_mem {
// Called before creating a kernel heap object
// that allows dynamic allocation. The real
// PhysicalMemoryManager requires some allocations
// to initialize so we need this first.
void InitBootstrapPageAllocation();
void InitPhysicalMemoryManager();
uint64_t AllocatePage();
void FreePage(uint64_t page);
} // namespace phys_mem