summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>1998-12-30 10:38:59 +0000
committerdfr <dfr@FreeBSD.org>1998-12-30 10:38:59 +0000
commit9aad9d912f0ea64471669ecde4beea9e9ead4989 (patch)
tree26f76c3cf94310fcb261c62fe3f86fbe1b71440e /sys/kern
parent14201fe4faa19db2e4da4f4944573149b4654cb8 (diff)
downloadFreeBSD-src-9aad9d912f0ea64471669ecde4beea9e9ead4989.zip
FreeBSD-src-9aad9d912f0ea64471669ecde4beea9e9ead4989.tar.gz
Various changes to support OSF1 emulation:
* Move the user stack from VM_MAXUSER_ADDRESS to a place below the 32bit boundary (needed to support 32bit OSF programs). This should also save one pagetable per process. * Add cvtqlsv to the set of instructions handled by the floating point software completion code. * Disable all floating point exceptions by default. * A minor change to execve to allow the OSF1 image activator to support dynamic loading.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/init_main.c4
-rw-r--r--sys/kern/kern_exec.c11
2 files changed, 8 insertions, 7 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index 609e001..9269b26 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
* @(#)init_main.c 8.9 (Berkeley) 1/21/94
- * $Id: init_main.c,v 1.100 1998/12/19 02:55:33 julian Exp $
+ * $Id: init_main.c,v 1.101 1998/12/19 08:23:31 julian Exp $
*/
#include "opt_devfs.h"
@@ -636,7 +636,7 @@ start_init(p)
/*
* Need just enough stack to hold the faked-up "execve()" arguments.
*/
- addr = trunc_page(VM_MAXUSER_ADDRESS - PAGE_SIZE);
+ addr = trunc_page(USRSTACK - PAGE_SIZE);
if (vm_map_find(&p->p_vmspace->vm_map, NULL, 0, &addr, PAGE_SIZE, FALSE, VM_PROT_ALL, VM_PROT_ALL, 0) != 0)
panic("init: couldn't allocate argument space");
p->p_vmspace->vm_maxsaddr = (caddr_t)addr;
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index 93e7bbd..fc23c6e 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: kern_exec.c,v 1.90 1998/12/16 16:28:57 bde Exp $
+ * $Id: kern_exec.c,v 1.91 1998/12/27 18:03:29 dfr Exp $
*/
#include <sys/param.h>
@@ -149,6 +149,7 @@ interpret:
}
imgp->vp = ndp->ni_vp;
+ imgp->fname = uap->fname;
/*
* Check file permissions (also 'opens' file)
@@ -323,8 +324,8 @@ exec_fail_dealloc:
kmem_free_wakeup(exec_map, (vm_offset_t)imgp->stringbase,
ARG_MAX + PAGE_SIZE);
- if (ndp->ni_vp) {
- vrele(ndp->ni_vp);
+ if (imgp->vp) {
+ vrele(imgp->vp);
zfree(namei_zone, ndp->ni_cnd.cn_pnbuf);
}
@@ -438,8 +439,8 @@ exec_new_vmspace(imgp)
if (vmspace->vm_refcnt == 1) {
if (vmspace->vm_shm)
shmexit(imgp->proc);
- pmap_remove_pages(&vmspace->vm_pmap, 0, USRSTACK);
- vm_map_remove(map, 0, USRSTACK);
+ pmap_remove_pages(&vmspace->vm_pmap, 0, VM_MAXUSER_ADDRESS);
+ vm_map_remove(map, 0, VM_MAXUSER_ADDRESS);
} else {
vmspace_exec(imgp->proc);
vmspace = imgp->proc->p_vmspace;
OpenPOWER on IntegriCloud