1/*- 2 * Copyright (C) 2007-2009 Semihalf, Rafal Jaworowski <raj@semihalf.com> 3 * Copyright (C) 2006 Semihalf, Marian Balakowicz <m8@semihalf.com> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 35 unchanged lines hidden (view full) --- 44 * 0xc100_0000 - 0xc100_3fff : reserved for page zero/copy 45 * 0xc100_4000 - 0xc200_3fff : reserved for ptbl bufs 46 * 0xc200_4000 - 0xc200_8fff : guard page + kstack0 47 * 0xc200_9000 - 0xfeef_ffff : actual free KVA space 48 * 0xfef0_0000 - 0xffff_ffff : I/O devices region 49 */ 50 51#include <sys/cdefs.h> |
52__FBSDID("$FreeBSD: head/sys/powerpc/booke/pmap.c 263620 2014-03-22 10:26:09Z bdrewery $"); |
53 54#include <sys/param.h> 55#include <sys/malloc.h> 56#include <sys/ktr.h> 57#include <sys/proc.h> 58#include <sys/user.h> 59#include <sys/queue.h> 60#include <sys/systm.h> --- 583 unchanged lines hidden (view full) --- 644 tlb_miss_unlock(); 645 mtx_unlock_spin(&tlbivax_mutex); 646 647 for (i = 0; i < PTBL_PAGES; i++) { 648 va = ((vm_offset_t)ptbl + (i * PAGE_SIZE)); 649 pa = pte_vatopa(mmu, kernel_pmap, va); 650 m = PHYS_TO_VM_PAGE(pa); 651 vm_page_free_zero(m); |
652 atomic_subtract_int(&vm_cnt.v_wire_count, 1); |
653 mmu_booke_kremove(mmu, va); 654 } 655 656 ptbl_free_pmap_ptbl(pmap, ptbl); 657} 658 659/* 660 * Decrement ptbl pages hold count and attempt to free ptbl pages. --- 719 unchanged lines hidden (view full) --- 1380 * Initialize the address space (zone) for the pv entries. Set a 1381 * high water mark so that the system can recover from excessive 1382 * numbers of pv entries. 1383 */ 1384 pvzone = uma_zcreate("PV ENTRY", sizeof(struct pv_entry), NULL, NULL, 1385 NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM | UMA_ZONE_NOFREE); 1386 1387 TUNABLE_INT_FETCH("vm.pmap.shpgperproc", &shpgperproc); |
1388 pv_entry_max = shpgperproc * maxproc + vm_cnt.v_page_count; |
1389 1390 TUNABLE_INT_FETCH("vm.pmap.pv_entries", &pv_entry_max); 1391 pv_entry_high_water = 9 * (pv_entry_max / 10); 1392 1393 uma_zone_reserve_kva(pvzone, pv_entry_max); 1394 1395 /* Pre-fill pvzone with initial number of pv entries. */ 1396 uma_prealloc(pvzone, PV_ENTRY_ZONE_MIN); --- 1903 unchanged lines hidden --- |