Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Feb 2013 02:41:38 +0000 (UTC)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r247251 - in head/sys/ia64: ia64 include
Message-ID:  <201302250241.r1P2fc2h088244@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marcel
Date: Mon Feb 25 02:41:38 2013
New Revision: 247251
URL: http://svnweb.freebsd.org/changeset/base/247251

Log:
  kernacc() expects all KVAs to be covered in the kernel map. With the
  introduction of the PBVM, this stopped being the case. Redefine the
  VM parameters so that the PBVM is included in the kernel map. In
  particular this introduces VM_INIT_KERNEL_ADDRESS to point to the base
  of region 5 now that VM_MIN_KERNEL_ADDRESS points to the base of
  region 4 to include the PBVM.
  While here define KERNBASE to the actual link address of the kernel as
  is intended.
  
  PR:		169926

Modified:
  head/sys/ia64/ia64/pmap.c
  head/sys/ia64/include/vmparam.h

Modified: head/sys/ia64/ia64/pmap.c
==============================================================================
--- head/sys/ia64/ia64/pmap.c	Mon Feb 25 01:50:04 2013	(r247250)
+++ head/sys/ia64/ia64/pmap.c	Mon Feb 25 02:41:38 2013	(r247251)
@@ -387,7 +387,7 @@ pmap_bootstrap()
 	 */
 	ia64_kptdir = ia64_physmem_alloc(PAGE_SIZE, PAGE_SIZE);
 	nkpt = 0;
-	kernel_vm_end = VM_MIN_KERNEL_ADDRESS;
+	kernel_vm_end = VM_INIT_KERNEL_ADDRESS;
 
 	/*
 	 * Determine a valid (mappable) VHPT size.
@@ -425,7 +425,7 @@ pmap_bootstrap()
 	ia64_set_pta(base + (1 << 8) + (pmap_vhpt_log2size << 2) + 1);
 	ia64_srlz_i();
 
-	virtual_avail = VM_MIN_KERNEL_ADDRESS;
+	virtual_avail = VM_INIT_KERNEL_ADDRESS;
 	virtual_end = VM_MAX_KERNEL_ADDRESS;
 
 	/*
@@ -1383,7 +1383,7 @@ pmap_kextract(vm_offset_t va)
 	/* Region 5 is our KVA. Bail out if the VA is beyond our limits. */
 	if (va >= kernel_vm_end)
 		goto err_out;
-	if (va >= VM_MIN_KERNEL_ADDRESS) {
+	if (va >= VM_INIT_KERNEL_ADDRESS) {
 		pte = pmap_find_kpte(va);
 		pa = pmap_present(pte) ? pmap_ppn(pte) | (va & PAGE_MASK) : 0;
 		goto out;
@@ -2746,7 +2746,7 @@ DB_COMMAND(kpte, db_kpte)
 		db_printf("usage: kpte <kva>\n");
 		return;
 	}
-	if (addr < VM_MIN_KERNEL_ADDRESS) {
+	if (addr < VM_INIT_KERNEL_ADDRESS) {
 		db_printf("kpte: error: invalid <kva>\n");
 		return;
 	}

Modified: head/sys/ia64/include/vmparam.h
==============================================================================
--- head/sys/ia64/include/vmparam.h	Mon Feb 25 01:50:04 2013	(r247250)
+++ head/sys/ia64/include/vmparam.h	Mon Feb 25 02:41:38 2013	(r247251)
@@ -181,12 +181,13 @@
 /* user/kernel map constants */
 #define	VM_MIN_ADDRESS		0
 #define	VM_MAXUSER_ADDRESS	IA64_RR_BASE(IA64_VM_MINKERN_REGION)
-#define	VM_MIN_KERNEL_ADDRESS	IA64_RR_BASE(IA64_VM_MINKERN_REGION + 1)
-#define	VM_MAX_KERNEL_ADDRESS	\
-		(VM_MIN_KERNEL_ADDRESS + IA64_REGION_GAP_START - 1)
+#define	VM_MIN_KERNEL_ADDRESS	VM_MAXUSER_ADDRESS
+#define	VM_INIT_KERNEL_ADDRESS	IA64_RR_BASE(IA64_VM_MINKERN_REGION + 1)
+#define	VM_MAX_KERNEL_ADDRESS	(IA64_RR_BASE(IA64_VM_MINKERN_REGION + 2) - 1)
 #define	VM_MAX_ADDRESS		~0UL
 
-#define	KERNBASE		VM_MAXUSER_ADDRESS
+/* We link the kernel at IA64_PBVM_BASE. */
+#define	KERNBASE		IA64_PBVM_BASE
 
 /*
  * USRSTACK is the top (end) of the user stack.  Immediately above the user



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