Allocate physical memory.

This commit is contained in:
Ben Vanik
2013-10-21 19:28:25 -07:00
parent 1fea07b6aa
commit f9dd0b0cb2
2 changed files with 89 additions and 30 deletions

View File

@@ -240,6 +240,15 @@ uint32_t xeMmAllocatePhysicalMemoryEx(
return 0;
}
// Move the address into the right range.
if (protect_bits & X_MEM_LARGE_PAGES) {
base_address |= 0xA0000000;
} else if (protect_bits & X_MEM_16MB_PAGES) {
base_address |= 0xC0000000;
} else {
base_address |= 0xE0000000;
}
return base_address;
}