Reserve all pages and then unreserve available pages

This commit is contained in:
Alex 2023-04-19 00:50:09 +03:00
parent b15f738e16
commit ecc19f4df0
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD

View File

@ -419,14 +419,9 @@ namespace Memory
*(uint8_t *)(PageBitmap.Buffer + i) = 0;
debug("Reserving pages...");
for (uint64_t i = 0; i < Info->Memory.Entries; i++)
{
if (Info->Memory.Entry[i].Type != Usable)
this->ReservePages(Info->Memory.Entry[i].BaseAddress, TO_PAGES(Info->Memory.Entry[i].Length));
}
this->ReservePages(0, TO_PAGES(Info->Memory.Size));
debug("Unreserving usable pages...");
/* Making sure that the lower memory area is properly reserved. */
this->ReservePages(0, 0x200);
for (uint64_t i = 0; i < Info->Memory.Entries; i++)
{
if (Info->Memory.Entry[i].Type == Usable)