summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1995-05-04 08:21:24 +0000
committerdg <dg@FreeBSD.org>1995-05-04 08:21:24 +0000
commitcae3f6f48d7fcb6484b476cfdf92d16e3a7d6d73 (patch)
tree3cec379901d805b22fd0fe36a96f95b53b965ee1 /sys
parent4c16d7d0d21d62ff73813b2b87593c94b85080ca (diff)
downloadFreeBSD-src-cae3f6f48d7fcb6484b476cfdf92d16e3a7d6d73.zip
FreeBSD-src-cae3f6f48d7fcb6484b476cfdf92d16e3a7d6d73.tar.gz
Kludged around a problem with "cat /proc/0/regs" causing a panic by
initializing proc0's frame base, too, using cpu_set_init_frame(). It's a kludge because that macro is intended to be used only for init, but does what we want nonetheless.
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/init_main.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index 9e9aecd..77f6803 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)init_main.c 8.9 (Berkeley) 1/21/94
- * $Id: init_main.c,v 1.21 1995/04/10 07:44:31 phk Exp $
+ * $Id: init_main.c,v 1.22 1995/04/23 04:13:51 phk Exp $
*/
#include <sys/param.h>
@@ -205,6 +205,14 @@ main(framep)
p->p_addr = proc0paddr; /* XXX */
/*
+ * proc0 needs to have a coherent frame base, too.
+ * This probably makes the identical call for the init proc
+ * that happens later unnecessary since it should inherit
+ * it during the fork.
+ */
+ cpu_set_init_frame(p, framep); /* XXX! */
+
+ /*
* We continue to place resource usage info and signal
* actions in the user struct so they're pageable.
*/
OpenPOWER on IntegriCloud