also map reclaimable memory in hhdm
This commit is contained in:
+1
-1
@@ -118,7 +118,7 @@ void mem_init(struct phys_mem* map, size_t map_len, uintptr_t kernel_virt, phys_
|
|||||||
// Map all physical memory to the HHDM address.
|
// Map all physical memory to the HHDM address.
|
||||||
tmp_hhdm = arch_mem_hhdm_addr();
|
tmp_hhdm = arch_mem_hhdm_addr();
|
||||||
for (size_t i = 0; i < map_len; i++) {
|
for (size_t i = 0; i < map_len; i++) {
|
||||||
if (map[i].usage != PHYS_USABLE && map[i].usage != PHYS_STATIC)
|
if (map[i].usage != PHYS_USABLE && map[i].usage != PHYS_STATIC && map[i].usage != PHYS_RECLAIMABLE)
|
||||||
continue;
|
continue;
|
||||||
for (size_t p = 0; p < map[i].length; p += pgsz) {
|
for (size_t p = 0; p < map[i].length; p += pgsz) {
|
||||||
uintptr_t vaddr = (uintptr_t)(map[i].address + p + tmp_hhdm);
|
uintptr_t vaddr = (uintptr_t)(map[i].address + p + tmp_hhdm);
|
||||||
|
|||||||
Reference in New Issue
Block a user