Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc64/sparc64 Pass on the P_32 flag on fork and s...
details: https://anonhg.NetBSD.org/src/rev/2da0669af474
branches: trunk
changeset: 532248:2da0669af474
user: eeh <eeh%NetBSD.org@localhost>
date: Mon Jun 03 18:08:43 2002 +0000
description:
Pass on the P_32 flag on fork and support fork syscall returns using
%g7 as the completion address.
diffstat:
sys/arch/sparc64/sparc64/vm_machdep.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diffs (31 lines):
diff -r 4240ace6a517 -r 2da0669af474 sys/arch/sparc64/sparc64/vm_machdep.c
--- a/sys/arch/sparc64/sparc64/vm_machdep.c Mon Jun 03 16:17:57 2002 +0000
+++ b/sys/arch/sparc64/sparc64/vm_machdep.c Mon Jun 03 18:08:43 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vm_machdep.c,v 1.42 2002/05/14 02:34:15 eeh Exp $ */
+/* $NetBSD: vm_machdep.c,v 1.43 2002/06/03 18:08:43 eeh Exp $ */
/*
* Copyright (c) 1996-2002 Eduardo Horvath. All rights reserved.
@@ -281,6 +281,9 @@
} else
p2->p_md.md_fpstate = NULL;
+ if (p1->p_flag & P_32)
+ p2->p_flag |= P_32;
+
/*
* Setup (kernel) stack frame that will by-pass the child
* out of the kernel. (The trap frame invariably resides at
@@ -299,7 +302,10 @@
tf2->tf_out[6] = (u_int64_t)(u_long)stack + stacksize;
/* Duplicate efforts of syscall(), but slightly differently */
- if (tf2->tf_global[1] & SYSCALL_G2RFLAG) {
+ if (tf2->tf_global[1] & SYSCALL_G7RFLAG) {
+ /* jmp %g2 (or %g7, deprecated) on success */
+ tf2->tf_npc = tf2->tf_global[7];
+ } else if (tf2->tf_global[1] & SYSCALL_G2RFLAG) {
/* jmp %g2 (or %g7, deprecated) on success */
tf2->tf_npc = tf2->tf_global[2];
} else {
Home |
Main Index |
Thread Index |
Old Index