acadia/zion/memory/paging_util.h
Drew Galbraith b9b45c5e45 Add the ability to copy memory to non resident process.
Use/Test this by loading the user space elf from the kernel process
before it starts rather than as a part of the first thread.

This simplifies thread start a fair bit.
2023-05-30 01:27:47 -07:00

11 lines
339 B
C

#pragma once
#include <stdint.h>
void InitializePml4(uint64_t pml4_physical_addr);
uint64_t AllocatePageIfNecessary(uint64_t addr, uint64_t cr3 = 0);
void EnsureResident(uint64_t addr, uint64_t size);
void CopyIntoNonResidentProcess(uint64_t base, uint64_t size, uint64_t dest_cr3,
uint64_t dest_virt);