Changeset View
Changeset View
Standalone View
Standalone View
head/sys/vm/vm_page.c
Show First 20 Lines • Show All 601 Lines • ▼ Show 20 Lines | #if MINIDUMP_PAGE_TRACKING | ||||
* The amd64 port needs this to indicate which direct map pages | * The amd64 port needs this to indicate which direct map pages | ||||
* need to be dumped, via calls to dump_add_page()/dump_drop_page(). | * need to be dumped, via calls to dump_add_page()/dump_drop_page(). | ||||
* | * | ||||
* However, i386 still needs this workspace internally within the | * However, i386 still needs this workspace internally within the | ||||
* minidump code. In theory, they are not needed on i386, but are | * minidump code. In theory, they are not needed on i386, but are | ||||
* included should the sf_buf code decide to use them. | * included should the sf_buf code decide to use them. | ||||
*/ | */ | ||||
last_pa = 0; | last_pa = 0; | ||||
for (i = 0; dump_avail[i + 1] != 0; i += 2) | vm_page_dump_pages = 0; | ||||
for (i = 0; dump_avail[i + 1] != 0; i += 2) { | |||||
vm_page_dump_pages += howmany(dump_avail[i + 1], PAGE_SIZE) - | |||||
dump_avail[i] / PAGE_SIZE; | |||||
if (dump_avail[i + 1] > last_pa) | if (dump_avail[i + 1] > last_pa) | ||||
last_pa = dump_avail[i + 1]; | last_pa = dump_avail[i + 1]; | ||||
vm_page_dump_pages = last_pa / PAGE_SIZE; | } | ||||
vm_page_dump_size = round_page(BITSET_SIZE(vm_page_dump_pages)); | vm_page_dump_size = round_page(BITSET_SIZE(vm_page_dump_pages)); | ||||
new_end -= vm_page_dump_size; | new_end -= vm_page_dump_size; | ||||
vm_page_dump = (void *)(uintptr_t)pmap_map(&vaddr, new_end, | vm_page_dump = (void *)(uintptr_t)pmap_map(&vaddr, new_end, | ||||
new_end + vm_page_dump_size, VM_PROT_READ | VM_PROT_WRITE); | new_end + vm_page_dump_size, VM_PROT_READ | VM_PROT_WRITE); | ||||
bzero((void *)vm_page_dump, vm_page_dump_size); | bzero((void *)vm_page_dump, vm_page_dump_size); | ||||
#else | #else | ||||
(void)last_pa; | (void)last_pa; | ||||
#endif | #endif | ||||
▲ Show 20 Lines • Show All 4,890 Lines • Show Last 20 Lines |