fork() stub and QoL improvements

This commit is contained in:
Alex
2023-05-03 06:37:39 +03:00
parent 6e6d22403c
commit 61aea6aa8d
25 changed files with 426 additions and 185 deletions

20
Core/Memory/PageTable.cpp Normal file
View File

@ -0,0 +1,20 @@
#include <memory.hpp>
namespace Memory
{
void PageTable::Update()
{
#if defined(a86)
asmv("mov %0, %%cr3" ::"r"(this));
#elif defined(aa64)
asmv("msr ttbr0_el1, %0" ::"r"(this));
#endif
}
PageTable PageTable::Fork()
{
PageTable NewTable;
memcpy(&NewTable, this, sizeof(PageTable));
return NewTable;
}
}