Initialize lwp0.l_md.md_tf - it was NULL before. Spotted by tnn.

While there, g/c the unused md_pcbpaddr.
This commit is contained in:
martin 2007-08-14 10:42:00 +00:00
parent 4287175475
commit 0617d834b5
2 changed files with 7 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: proc.h,v 1.9 2005/12/11 12:19:10 christos Exp $ */
/* $NetBSD: proc.h,v 1.10 2007/08/14 10:42:00 martin Exp $ */
/*
* Copyright (c) 1992, 1993
@ -46,7 +46,6 @@
struct mdlwp {
struct trapframe64 *md_tf; /* trap/syscall registers */
struct fpstate64 *md_fpstate; /* fpu state, if any; always resident */
struct pcb *md_pcbpaddr; /* phys addr of the pcb */
};
/*
* Machine-dependent part of the proc structure for SPARC.

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.138 2007/06/24 01:43:34 dyoung Exp $ */
/* $NetBSD: autoconf.c,v 1.139 2007/08/14 10:42:01 martin Exp $ */
/*
* Copyright (c) 1996
@ -48,7 +48,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.138 2007/06/24 01:43:34 dyoung Exp $");
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.139 2007/08/14 10:42:01 martin Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@ -315,6 +315,10 @@ bootstrap(void *o0, void *bootargs, void *bootsize, void *o3, void *ofw)
get_ncpus();
pmap_bootstrap(KERNBASE, bi_kend->addr);
/* fixup MD part of lwp0 - might find a better place */
lwp0.l_md.md_tf = (struct trapframe *)
((long)lwp0.l_addr + USPACE - sizeof(struct trapframe));
}
/*