Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 May 2003 00:15:06 -0700 (PDT)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 30689 for review
Message-ID:  <200305070715.h477F6s9098892@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200305070715.h477F6s9098892>