summaryrefslogtreecommitdiffstats
path: root/sys/ia64/include
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2011-03-21 01:09:50 +0000
committermarcel <marcel@FreeBSD.org>2011-03-21 01:09:50 +0000
commite347771c19e724b8f6f65f19eb5dbe52bad74a8f (patch)
tree3cc2155fad6793100e990e33f6fbc398a993be96 /sys/ia64/include
parentf4c860e4081b50e74d88594f66d8ff2c5721f347 (diff)
downloadFreeBSD-src-e347771c19e724b8f6f65f19eb5dbe52bad74a8f.zip
FreeBSD-src-e347771c19e724b8f6f65f19eb5dbe52bad74a8f.tar.gz
Change region 4 to be part of the kernel. This serves 2 purposes:
1. The PBVM is in region 4, so if we want to make use of it, we need region 4 freed up. 2. Region 4 and above cannot be represented by an off_t by virtue of that type being signed. This is problematic for truss(1), ktrace(1) and other such programs.
Diffstat (limited to 'sys/ia64/include')
-rw-r--r--sys/ia64/include/pmap.h3
-rw-r--r--sys/ia64/include/vmparam.h32
2 files changed, 19 insertions, 16 deletions
diff --git a/sys/ia64/include/pmap.h b/sys/ia64/include/pmap.h
index 2b6088c..151e18a 100644
--- a/sys/ia64/include/pmap.h
+++ b/sys/ia64/include/pmap.h
@@ -50,6 +50,7 @@
#include <sys/_mutex.h>
#include <machine/atomic.h>
#include <machine/pte.h>
+#include <machine/vmparam.h>
#ifdef _KERNEL
@@ -75,7 +76,7 @@ struct md_page {
struct pmap {
struct mtx pm_mtx;
TAILQ_HEAD(,pv_entry) pm_pvlist; /* list of mappings in pmap */
- uint32_t pm_rid[5]; /* base RID for pmap */
+ uint32_t pm_rid[IA64_VM_MINKERN_REGION];
struct pmap_statistics pm_stats; /* pmap statistics */
};
diff --git a/sys/ia64/include/vmparam.h b/sys/ia64/include/vmparam.h
index ec15312..5f2a2ec 100644
--- a/sys/ia64/include/vmparam.h
+++ b/sys/ia64/include/vmparam.h
@@ -42,12 +42,6 @@
#define _MACHINE_VMPARAM_H_
/*
- * USRSTACK is the top (end) of the user stack. Immediately above the user
- * stack resides the syscall gateway page.
- */
-#define USRSTACK VM_MAXUSER_ADDRESS
-
-/*
* Virtual memory related constants, all in bytes
*/
#ifndef MAXTSIZ
@@ -122,6 +116,8 @@
#define VM_NRESERVLEVEL 0
#endif
+#define IA64_VM_MINKERN_REGION 4
+
/*
* Manipulating region bits of an address.
*/
@@ -138,7 +134,8 @@
* to 0x1ffbffffffffffff. We define the top half of a region in terms of
* this worst-case gap.
*/
-#define IA64_REGION_TOP_HALF 0x1ffc000000000000
+#define IA64_REGION_GAP_START 0x0004000000000000
+#define IA64_REGION_GAP_EXTEND 0x1ffc000000000000
/*
* Page size of the identity mappings in region 7.
@@ -151,7 +148,6 @@
#define IA64_ID_PAGE_SIZE (1<<(LOG2_ID_PAGE_SIZE))
#define IA64_ID_PAGE_MASK (IA64_ID_PAGE_SIZE-1)
-#define IA64_BACKINGSTORE IA64_RR_BASE(4)
/*
* Parameters for Pre-Boot Virtual Memory (PBVM).
@@ -177,9 +173,9 @@
* and wired into the CPU, but does not assume that the mapping covers the
* whole of PBVM.
*/
-#define IA64_PBVM_RR 4
+#define IA64_PBVM_RR IA64_VM_MINKERN_REGION
#define IA64_PBVM_BASE \
- (IA64_RR_BASE(IA64_PBVM_RR) + IA64_REGION_TOP_HALF)
+ (IA64_RR_BASE(IA64_PBVM_RR) + IA64_REGION_GAP_EXTEND)
#define IA64_PBVM_PGTBL_MAXSZ 1048576
#define IA64_PBVM_PGTBL \
@@ -194,15 +190,21 @@
*/
/* user/kernel map constants */
-#define VM_MIN_ADDRESS 0
-#define VM_MAXUSER_ADDRESS IA64_RR_BASE(5)
-#define VM_GATEWAY_SIZE PAGE_SIZE
-#define VM_MIN_KERNEL_ADDRESS (VM_MAXUSER_ADDRESS + VM_GATEWAY_SIZE)
-#define VM_MAX_KERNEL_ADDRESS (IA64_RR_BASE(6) - 1)
+#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 (IA64_RR_BASE(IA64_VM_MINKERN_REGION + 2) - 1)
#define VM_MAX_ADDRESS ~0UL
#define KERNBASE VM_MAXUSER_ADDRESS
+/*
+ * USRSTACK is the top (end) of the user stack. Immediately above the user
+ * stack resides the syscall gateway page.
+ */
+#define USRSTACK VM_MAXUSER_ADDRESS
+#define IA64_BACKINGSTORE (USRSTACK - (2 * MAXSSIZ) - PAGE_SIZE)
+
/* virtual sizes (bytes) for various kernel submaps */
#ifndef VM_KMEM_SIZE
#define VM_KMEM_SIZE (12 * 1024 * 1024)
OpenPOWER on IntegriCloud