vmm: properly handle direct physical mapping unmap

This commit is contained in:
Matheus
2024-07-30 20:49:38 -03:00
parent 4a7ccc208c
commit d447751c30
2 changed files with 4 additions and 3 deletions
+3 -2
View File
@@ -243,9 +243,10 @@ static void destroyrange(vmmrange_t *range, uintmax_t _offset, size_t size, int
pmm_release(physical);
}
} else {
// anonymous or private non character device mapping
// anonymous, physical or private non character device mapping
arch_mmu_unmap(_cpu()->vmmctx->pagetable, vaddr);
pmm_release(physical);
if ((range->flags & VMM_FLAGS_PHYSICAL) == 0)
pmm_release(physical);
}
}