Add a bootstrap physical memory manager.
This will allow the real physical memory manager to use allocations.
This commit is contained in:
parent
747c2a4e17
commit
2d719d0443
5 changed files with 105 additions and 6 deletions
18
zion/memory/physical_memory.h
Normal file
18
zion/memory/physical_memory.h
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue