feat: overhaul userspace heap and virtual memory
This commit is contained in:
@@ -104,6 +104,17 @@ public:
|
||||
// Map a page into an arbitrary PML4 (specified by physical address) with User bit set.
|
||||
static bool MapUserIn(std::uint64_t pml4Phys, std::uint64_t physicalAddress, std::uint64_t virtualAddress);
|
||||
|
||||
// Map ordinary user memory with explicit leaf permissions. Read access
|
||||
// is implied by x86 paging; writable and executable are independent.
|
||||
static bool MapUserInPermissions(std::uint64_t pml4Phys,
|
||||
std::uint64_t physicalAddress,
|
||||
std::uint64_t virtualAddress,
|
||||
bool writable, bool executable);
|
||||
|
||||
// Change leaf permissions on an existing user page.
|
||||
static bool ProtectUserIn(std::uint64_t pml4Phys, std::uint64_t virtualAddress,
|
||||
bool writable, bool executable);
|
||||
|
||||
// Map a page into an arbitrary PML4 with User + Write-Combining attributes.
|
||||
static bool MapUserInWC(std::uint64_t pml4Phys, std::uint64_t physicalAddress, std::uint64_t virtualAddress);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user