From owner-p4-projects@FreeBSD.ORG Wed May 7 00:15:08 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 356AE37B404; Wed, 7 May 2003 00:15:08 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C3FCA37B401 for ; Wed, 7 May 2003 00:15:07 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6A32543F3F for ; Wed, 7 May 2003 00:15:07 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h477F70U098895 for ; Wed, 7 May 2003 00:15:07 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h477F6s9098892 for perforce@freebsd.org; Wed, 7 May 2003 00:15:06 -0700 (PDT) Date: Wed, 7 May 2003 00:15:06 -0700 (PDT) Message-Id: <200305070715.h477F6s9098892@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 30689 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2003 07:15:09 -0000 http://perforce.freebsd.org/chv.cgi?CH=30689 Change 30689 by marcel@marcel_nfs on 2003/05/07 00:15:05 Fix bug introduced by the previous commit to pmap_growkernel that was accidentally non-present prior to the previous commit. We index the kernel page tables based on the VA in region 5. This covers the pageway page that we put that offset 0 in that region although we have set VM_MIN_KERNEL_ADDRESS to start after it. Initializing kernel_vm_end based on VM_MIN_KERNEL_ADDRESS is wrong as it has the adjustion for the gateway page, which does not apply here. Therefore subtract the gateway page size from VM_MIN_KERNEL_ADDRESS. The gateway page size has been abstracted to allow for a larger gateway. This fixes the border case when we try to enter a mapping at the last page in the VM space. A VM space that is 1 page smaller than we think it is. Affected files ... .. //depot/projects/ia64_epc/sys/ia64/ia64/pmap.c#10 edit .. //depot/projects/ia64_epc/sys/ia64/include/vmparam.h#2 edit Differences ... ==== //depot/projects/ia64_epc/sys/ia64/ia64/pmap.c#10 (text+ko) ==== @@ -354,7 +354,8 @@ ia64_kptdir[i] = (void*)pmap_steal_memory(PAGE_SIZE); } nkpt = NKPT; - kernel_vm_end = NKPT * PAGE_SIZE * NKPTEPG + VM_MIN_KERNEL_ADDRESS; + kernel_vm_end = NKPT * PAGE_SIZE * NKPTEPG + VM_MIN_KERNEL_ADDRESS - + VM_GATEWAY_SIZE; avail_start = phys_avail[0]; for (i = 0; phys_avail[i+2]; i+= 2) ; ==== //depot/projects/ia64_epc/sys/ia64/include/vmparam.h#2 (text+ko) ==== @@ -140,7 +140,8 @@ /* user/kernel map constants */ #define VM_MIN_ADDRESS 0 #define VM_MAX_ADDRESS IA64_RR_BASE(5) -#define VM_MAXUSER_ADDRESS VM_MAX_ADDRESS + PAGE_SIZE +#define VM_GATEWAY_SIZE PAGE_SIZE +#define VM_MAXUSER_ADDRESS VM_MAX_ADDRESS + VM_GATEWAY_SIZE #define VM_MIN_KERNEL_ADDRESS VM_MAXUSER_ADDRESS #define VM_MAX_KERNEL_ADDRESS (IA64_RR_BASE(6) - 1)