diff options
author | marcel <marcel@FreeBSD.org> | 2011-03-18 15:36:28 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2011-03-18 15:36:28 +0000 |
commit | a49f2105409febc6cbd31d723137adaad8135189 (patch) | |
tree | 1f2da4b4ad1a4ad54e9a0cc5cbea9ba830fa45e9 | |
parent | 0abc92bd66b106598b7d136b194a25bb9d1392df (diff) | |
download | FreeBSD-src-a49f2105409febc6cbd31d723137adaad8135189.zip FreeBSD-src-a49f2105409febc6cbd31d723137adaad8135189.tar.gz |
Use VM_MAXUSER_ADDRESS rather than VM_MAX_ADDRESS when we talk about
the bounds of user space. Redefine VM_MAX_ADDRESS as ~0UL, even though
it's not used anywhere in the source tree.
-rw-r--r-- | sys/ia64/ia64/genassym.c | 2 | ||||
-rw-r--r-- | sys/ia64/ia64/machdep.c | 6 | ||||
-rw-r--r-- | sys/ia64/ia64/support.S | 26 | ||||
-rw-r--r-- | sys/ia64/ia64/trap.c | 4 | ||||
-rw-r--r-- | sys/ia64/ia64/unaligned.c | 4 | ||||
-rw-r--r-- | sys/ia64/include/vmparam.h | 10 |
6 files changed, 26 insertions, 26 deletions
diff --git a/sys/ia64/ia64/genassym.c b/sys/ia64/ia64/genassym.c index 66a6cd4..9312dbe 100644 --- a/sys/ia64/ia64/genassym.c +++ b/sys/ia64/ia64/genassym.c @@ -116,4 +116,4 @@ ASSYM(TDF_NEEDRESCHED, TDF_NEEDRESCHED); ASSYM(UC_MCONTEXT, offsetof(ucontext_t, uc_mcontext)); -ASSYM(VM_MAX_ADDRESS, VM_MAX_ADDRESS); +ASSYM(VM_MAXUSER_ADDRESS, VM_MAXUSER_ADDRESS); diff --git a/sys/ia64/ia64/machdep.c b/sys/ia64/ia64/machdep.c index 51c57a3..0941c6b 100644 --- a/sys/ia64/ia64/machdep.c +++ b/sys/ia64/ia64/machdep.c @@ -601,12 +601,12 @@ map_gateway_page(void) pte |= (uint64_t)ia64_gateway_page & PTE_PPN_MASK; __asm __volatile("ptr.d %0,%1; ptr.i %0,%1" :: - "r"(VM_MAX_ADDRESS), "r"(PAGE_SHIFT << 2)); + "r"(VM_MAXUSER_ADDRESS), "r"(PAGE_SHIFT << 2)); __asm __volatile("mov %0=psr" : "=r"(psr)); __asm __volatile("rsm psr.ic|psr.i"); ia64_srlz_i(); - ia64_set_ifa(VM_MAX_ADDRESS); + ia64_set_ifa(VM_MAXUSER_ADDRESS); ia64_set_itir(PAGE_SHIFT << 2); ia64_srlz_d(); __asm __volatile("itr.d dtr[%0]=%1" :: "r"(3), "r"(pte)); @@ -616,7 +616,7 @@ map_gateway_page(void) ia64_srlz_i(); /* Expose the mapping to userland in ar.k5 */ - ia64_set_k5(VM_MAX_ADDRESS); + ia64_set_k5(VM_MAXUSER_ADDRESS); } static u_int diff --git a/sys/ia64/ia64/support.S b/sys/ia64/ia64/support.S index 1a82dd6..32af5ed 100644 --- a/sys/ia64/ia64/support.S +++ b/sys/ia64/ia64/support.S @@ -199,7 +199,7 @@ END(fusufault) ENTRY(casuword, 3) { .mlx add r15=PC_CURTHREAD,r13 - movl r14=VM_MAX_ADDRESS + movl r14=VM_MAXUSER_ADDRESS ;; } { .mib @@ -249,7 +249,7 @@ END(casuword) ENTRY(casuword32, 3) { .mlx add r15=PC_CURTHREAD,r13 - movl r14=VM_MAX_ADDRESS + movl r14=VM_MAXUSER_ADDRESS ;; } { .mib @@ -303,7 +303,7 @@ END(casuword32) ENTRY(subyte, 2) { .mlx add r15=PC_CURTHREAD,r13 - movl r14=VM_MAX_ADDRESS + movl r14=VM_MAXUSER_ADDRESS ;; } { .mib @@ -349,7 +349,7 @@ END(subyte) ENTRY(suword16, 2) { .mlx add r15=PC_CURTHREAD,r13 - movl r14=VM_MAX_ADDRESS + movl r14=VM_MAXUSER_ADDRESS ;; } { .mib @@ -395,7 +395,7 @@ END(suword16) ENTRY(suword32, 2) { .mlx add r15=PC_CURTHREAD,r13 - movl r14=VM_MAX_ADDRESS + movl r14=VM_MAXUSER_ADDRESS ;; } { .mib @@ -442,7 +442,7 @@ ENTRY(suword64, 2) XENTRY(suword) { .mlx add r15=PC_CURTHREAD,r13 - movl r14=VM_MAX_ADDRESS + movl r14=VM_MAXUSER_ADDRESS ;; } { .mib @@ -496,7 +496,7 @@ END(suword64) ENTRY(fubyte, 1) { .mlx add r15=PC_CURTHREAD,r13 - movl r14=VM_MAX_ADDRESS + movl r14=VM_MAXUSER_ADDRESS ;; } { .mib @@ -542,7 +542,7 @@ END(fubyte) ENTRY(fuword16, 2) { .mlx add r15=PC_CURTHREAD,r13 - movl r14=VM_MAX_ADDRESS + movl r14=VM_MAXUSER_ADDRESS ;; } { .mib @@ -588,7 +588,7 @@ END(fuword16) ENTRY(fuword32, 2) { .mlx add r15=PC_CURTHREAD,r13 - movl r14=VM_MAX_ADDRESS + movl r14=VM_MAXUSER_ADDRESS ;; } { .mib @@ -635,7 +635,7 @@ ENTRY(fuword64, 2) XENTRY(fuword) { .mlx add r15=PC_CURTHREAD,r13 - movl r14=VM_MAX_ADDRESS + movl r14=VM_MAXUSER_ADDRESS ;; } { .mib @@ -750,7 +750,7 @@ ENTRY(copyinstr, 4) mov loc1=rp .body - movl loc2=VM_MAX_ADDRESS // make sure that src addr + movl loc2=VM_MAXUSER_ADDRESS // make sure that src addr ;; cmp.geu p6,p0=in0,loc2 // is in user space. ;; @@ -863,7 +863,7 @@ ENTRY(copyin, 3) mov loc1=rp .body - movl loc2=VM_MAX_ADDRESS // make sure that src addr + movl loc2=VM_MAXUSER_ADDRESS // make sure that src addr ;; cmp.geu p6,p0=in0,loc2 // is in user space. ;; @@ -901,7 +901,7 @@ ENTRY(copyout, 3) mov loc1=rp .body - movl loc2=VM_MAX_ADDRESS // make sure that dest addr + movl loc2=VM_MAXUSER_ADDRESS // make sure that dest addr ;; cmp.geu p6,p0=in1,loc2 // is in user space. ;; diff --git a/sys/ia64/ia64/trap.c b/sys/ia64/ia64/trap.c index 60b00c4..4b84f76 100644 --- a/sys/ia64/ia64/trap.c +++ b/sys/ia64/ia64/trap.c @@ -532,7 +532,7 @@ trap(int vector, struct trapframe *tf) rv = 0; va = trunc_page(tf->tf_special.ifa); - if (va >= VM_MAX_ADDRESS) { + if (va >= VM_MAXUSER_ADDRESS) { /* * Don't allow user-mode faults for kernel virtual * addresses, including the gateway page. @@ -809,7 +809,7 @@ trap(int vector, struct trapframe *tf) * iip and enable single stepping only when it's an user * address. */ - if (tf->tf_special.iip >= VM_MAX_ADDRESS) + if (tf->tf_special.iip >= VM_MAXUSER_ADDRESS) return; tf->tf_special.psr &= ~IA64_PSR_TB; tf->tf_special.psr |= IA64_PSR_SS; diff --git a/sys/ia64/ia64/unaligned.c b/sys/ia64/ia64/unaligned.c index 2635a96..d4478f2 100644 --- a/sys/ia64/ia64/unaligned.c +++ b/sys/ia64/ia64/unaligned.c @@ -109,7 +109,7 @@ greg_ptr(mcontext_t *mc, int gr) static uint64_t rdreg(uint64_t *addr) { - if ((uintptr_t)addr < VM_MAX_ADDRESS) + if ((uintptr_t)addr < VM_MAXUSER_ADDRESS) return (fuword(addr)); return (*addr); } @@ -117,7 +117,7 @@ rdreg(uint64_t *addr) static void wrreg(uint64_t *addr, uint64_t val) { - if ((uintptr_t)addr < VM_MAX_ADDRESS) + if ((uintptr_t)addr < VM_MAXUSER_ADDRESS) suword(addr, val); else *addr = val; diff --git a/sys/ia64/include/vmparam.h b/sys/ia64/include/vmparam.h index 169b0c9..ec15312 100644 --- a/sys/ia64/include/vmparam.h +++ b/sys/ia64/include/vmparam.h @@ -45,7 +45,7 @@ * USRSTACK is the top (end) of the user stack. Immediately above the user * stack resides the syscall gateway page. */ -#define USRSTACK VM_MAX_ADDRESS +#define USRSTACK VM_MAXUSER_ADDRESS /* * Virtual memory related constants, all in bytes @@ -195,13 +195,13 @@ /* user/kernel map constants */ #define VM_MIN_ADDRESS 0 -#define VM_MAX_ADDRESS IA64_RR_BASE(5) +#define VM_MAXUSER_ADDRESS IA64_RR_BASE(5) #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_MIN_KERNEL_ADDRESS (VM_MAXUSER_ADDRESS + VM_GATEWAY_SIZE) #define VM_MAX_KERNEL_ADDRESS (IA64_RR_BASE(6) - 1) +#define VM_MAX_ADDRESS ~0UL -#define KERNBASE VM_MAX_ADDRESS +#define KERNBASE VM_MAXUSER_ADDRESS /* virtual sizes (bytes) for various kernel submaps */ #ifndef VM_KMEM_SIZE |