unmap_and_free_physical_pages(): Don't try to free already free pages.
Apparently (at least when running in VMware >=2) the boot loader can still map the same physical page more than once -- in the ACPI or HPET code I suppose -- which would lead to this situation. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34954 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
1de5dffb8a
commit
aac9b8e4af
@ -2929,7 +2929,8 @@ unmap_and_free_physical_pages(vm_translation_map* map, addr_t start, addr_t end)
|
|||||||
if (map->ops->query(map, current, &physicalAddress, &flags) == B_OK
|
if (map->ops->query(map, current, &physicalAddress, &flags) == B_OK
|
||||||
&& (flags & PAGE_PRESENT) != 0) {
|
&& (flags & PAGE_PRESENT) != 0) {
|
||||||
vm_page* page = vm_lookup_page(physicalAddress / B_PAGE_SIZE);
|
vm_page* page = vm_lookup_page(physicalAddress / B_PAGE_SIZE);
|
||||||
if (page != NULL) {
|
if (page != NULL && page->state != PAGE_STATE_FREE
|
||||||
|
&& page->state != PAGE_STATE_CLEAR) {
|
||||||
DEBUG_PAGE_ACCESS_START(page);
|
DEBUG_PAGE_ACCESS_START(page);
|
||||||
vm_page_set_state(page, PAGE_STATE_FREE);
|
vm_page_set_state(page, PAGE_STATE_FREE);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user