Subject: CVS commit: src/sys
To: None <>
From: Frank van der Linden <>
List: source-changes
Date: 03/26/2005 05:12:36
Module Name:	src
Committed By:	fvdl
Date:		Sat Mar 26 05:12:36 UTC 2005

Modified Files:
	src/sys/arch/amd64/amd64: netbsd32_machdep.c
	src/sys/arch/amd64/include: vmparam.h
	src/sys/arch/sparc64/include: vmparam.h
	src/sys/arch/sparc64/sparc64: netbsd32_machdep.c svr4_32_machdep.c
	src/sys/compat/aoutm68k: aoutm68k_exec.c
	src/sys/compat/darwin: darwin_exec.c
	src/sys/compat/freebsd: freebsd_exec.c
	src/sys/compat/hpux: hpux_exec.c
	src/sys/compat/ibcs2: ibcs2_exec.c
	src/sys/compat/irix: irix_exec.c
	src/sys/compat/linux/common: linux_exec.c
	src/sys/compat/mach: mach_exec.c
	src/sys/compat/netbsd32: netbsd32.h netbsd32_netbsd.c
	src/sys/compat/osf1: osf1_exec.c
	src/sys/compat/pecoff: pecoff_emul.c
	src/sys/compat/sunos: sunos_exec.c
	src/sys/compat/sunos32: sunos32_exec.c
	src/sys/compat/svr4: svr4_exec.c
	src/sys/compat/svr4_32: svr4_32_exec.c svr4_32_exec.h
	src/sys/compat/ultrix: ultrix_misc.c
	src/sys/kern: exec_elf32.c kern_exec.c kern_resource.c sysv_shm.c
	src/sys/sys: param.h proc.h
	src/sys/uvm: uvm_extern.h uvm_mmap.c

Log Message:
Fix some things regarding COMPAT_NETBSD32 and limits/VM addresses.

* For sparc64 and amd64, define *SIZ32 VM constants.
* Add a new function pointer to struct emul, pointing at a function
  that will return the default VM map address. The default function
  is uvm_map_defaultaddr, which just uses the VM_DEFAULT_ADDRESS
  macro. This gives emulations control over the default map address,
  and allows things to be mapped at the right address (in 32bit range)
* Add code to adjust the data and stack limits when a COMPAT_NETBSD32
  or COMPAT_SVR4_32 binary is executed.
* Don't use USRSTACK in kern_resource.c, use p_vmspace->vm_minsaddr
  instead (emulations might have set it differently)
* Since this changes struct emul, bump kernel version to 3.99.2

Tested on amd64, compile-tested on sparc64.

To generate a diff of this commit:
cvs rdiff -r1.11 -r1.12 src/sys/arch/amd64/amd64/netbsd32_machdep.c
cvs rdiff -r1.7 -r1.8 src/sys/arch/amd64/include/vmparam.h
cvs rdiff -r1.26 -r1.27 src/sys/arch/sparc64/include/vmparam.h
cvs rdiff -r1.44 -r1.45 src/sys/arch/sparc64/sparc64/netbsd32_machdep.c
cvs rdiff -r1.19 -r1.20 src/sys/arch/sparc64/sparc64/svr4_32_machdep.c
cvs rdiff -r1.18 -r1.19 src/sys/compat/aoutm68k/aoutm68k_exec.c
cvs rdiff -r1.39 -r1.40 src/sys/compat/darwin/darwin_exec.c
cvs rdiff -r1.26 -r1.27 src/sys/compat/freebsd/freebsd_exec.c
cvs rdiff -r1.45 -r1.46 src/sys/compat/hpux/hpux_exec.c
cvs rdiff -r1.62 -r1.63 src/sys/compat/ibcs2/ibcs2_exec.c
cvs rdiff -r1.40 -r1.41 src/sys/compat/irix/irix_exec.c
cvs rdiff -r1.72 -r1.73 src/sys/compat/linux/common/linux_exec.c
cvs rdiff -r1.55 -r1.56 src/sys/compat/mach/mach_exec.c
cvs rdiff -r1.30 -r1.31 src/sys/compat/netbsd32/netbsd32.h
cvs rdiff -r1.87 -r1.88 src/sys/compat/netbsd32/netbsd32_netbsd.c
cvs rdiff -r1.38 -r1.39 src/sys/compat/osf1/osf1_exec.c
cvs rdiff -r1.10 -r1.11 src/sys/compat/pecoff/pecoff_emul.c
cvs rdiff -r1.46 -r1.47 src/sys/compat/sunos/sunos_exec.c
cvs rdiff -r1.19 -r1.20 src/sys/compat/sunos32/sunos32_exec.c
cvs rdiff -r1.55 -r1.56 src/sys/compat/svr4/svr4_exec.c
cvs rdiff -r1.15 -r1.16 src/sys/compat/svr4_32/svr4_32_exec.c
cvs rdiff -r1.8 -r1.9 src/sys/compat/svr4_32/svr4_32_exec.h
cvs rdiff -r1.4 -r1.5 src/sys/compat/svr4_32/svr4_32_resource.c
cvs rdiff -r1.98 -r1.99 src/sys/compat/ultrix/ultrix_misc.c
cvs rdiff -r1.102 -r1.103 src/sys/kern/exec_elf32.c
cvs rdiff -r1.194 -r1.195 src/sys/kern/kern_exec.c
cvs rdiff -r1.90 -r1.91 src/sys/kern/kern_resource.c
cvs rdiff -r1.82 -r1.83 src/sys/kern/sysv_shm.c
cvs rdiff -r1.212 -r1.213 src/sys/sys/param.h
cvs rdiff -r1.197 -r1.198 src/sys/sys/proc.h
cvs rdiff -r1.98 -r1.99 src/sys/uvm/uvm_extern.h
cvs rdiff -r1.88 -r1.89 src/sys/uvm/uvm_mmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.