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.
This commit is contained in:
David Greenman 1995-05-04 08:21:24 +00:00
parent 07bb8fb7c9
commit 2384fde587

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* @(#)init_main.c 8.9 (Berkeley) 1/21/94 * @(#)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> #include <sys/param.h>
@ -204,6 +204,14 @@ main(framep)
vmspace0.vm_map.pmap = &vmspace0.vm_pmap; vmspace0.vm_map.pmap = &vmspace0.vm_pmap;
p->p_addr = proc0paddr; /* XXX */ 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 * We continue to place resource usage info and signal
* actions in the user struct so they're pageable. * actions in the user struct so they're pageable.