Date: Sun, 6 Jun 2004 01:47:39 GMT From: Juli Mallett <jmallett@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 54247 for review Message-ID: <200406060147.i561ldaS084784@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=54247 Change 54247 by jmallett@jmallett_oingo on 2004/06/06 01:46:48 Integ from alpha. (untested.) Affected files ... .. //depot/projects/mips/sys/mips/mips/pmap.c#36 integrate Differences ... ==== //depot/projects/mips/sys/mips/mips/pmap.c#36 (text+ko) ==== @@ -162,8 +162,6 @@ pmap_t kernel_pmap = &kernel_pmap_store; vm_offset_t phys_avail[10]; -vm_offset_t avail_start; /* PA of first available physical page */ -vm_offset_t avail_end; /* PA of last available physical page */ vm_offset_t virtual_avail; /* VA of first avail page (after kernel bss) */ vm_offset_t virtual_end; /* VA of last avail page (end of kernel AS) */ static boolean_t pmap_initialized = FALSE; /* Has pmap_init completed? */ @@ -281,12 +279,12 @@ */ tlb_bootstrap(physsz >> PAGE_SHIFT, pmap_steal_memory); - avail_start = phys_avail[0]; - for (i = 0; phys_avail[i+2]; i+= 2) ; - avail_end = phys_avail[i+1]; + } + + for (i = 0; phys_avail[i+2]; i+= 2) /* find non-empty ones */; virtual_avail = VM_MIN_KERNEL_ADDRESS; - virtual_end = virtual_avail + (avail_end - avail_start); + virtual_end = virtual_avail + (phys_avail[i+1] - phys_avail[0]); kernel_vm_end = virtual_end; /* @@ -692,7 +690,7 @@ */ VM_OBJECT_LOCK(pmap->pm_pteobj); lev1pg = vm_page_grab(pmap->pm_pteobj, NUSERLEV3MAPS + NUSERLEV2MAPS, - VM_ALLOC_NORMAL | VM_ALLOC_RETRY | VM_ALLOC_WIRED); + VM_ALLOC_NORMAL | VM_ALLOC_RETRY | VM_ALLOC_WIRED | VM_ALLOC_ZERO); vm_page_lock_queues(); vm_page_flag_clear(lev1pg, PG_BUSY); @@ -701,10 +699,7 @@ VM_OBJECT_UNLOCK(pmap->pm_pteobj); pmap->pm_lev1 = (pt_entry_t*) MIPS_PHYS_TO_KSEG1(VM_PAGE_TO_PHYS(lev1pg)); - if ((lev1pg->flags & PG_ZERO) == 0) - bzero(pmap->pm_lev1, PAGE_SIZE); - /* install self-referential address mapping entry (not PG_ASM) */ pmap->pm_lev1[PTLEV1I] = pmap_phys_to_pte(VM_PAGE_TO_PHYS(lev1pg)) | PG_V | PG_KRE | PG_KWE; @@ -1160,7 +1155,8 @@ * raise IPL while manipulating pv_table since pmap_enter can be * called at interrupt time. */ - if (pmap_initialized && (m->flags & PG_FICTITIOUS) == 0) { + if (pmap_initialized && + (m->flags & (PG_FICTITIOUS|PG_UNMANAGED)) == 0) { pmap_insert_entry(pmap, va, mpte, m); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200406060147.i561ldaS084784>