Subject: Bugfix.
To: None <port-vax@NetBSD.org>
From: Johnny Billquist <bqt@update.uu.se>
List: port-vax
Date: 12/23/2005 14:19:56
Can someone please commit this?
It's a bug in the kernel. Running a program like nslookup will 
immediately panic the system.

----------
diff -c -r1.89 vm_machdep.c
*** sys/arch/vax/vax/vm_machdep.c       11 Dec 2005 12:19:36 -0000      1.89
--- sys/arch/vax/vax/vm_machdep.c       23 Dec 2005 13:16:34 -0000
***************
*** 190,196 ****
         void *arg;
   {
         struct pcb *pcb = &l->l_addr->u_pcb;
!       struct trapframe *tf = (struct trapframe *)(l->l_addr + USPACE) - 1;
         struct callsframe *cf;
         extern int sret;

--- 190,196 ----
         void *arg;
   {
         struct pcb *pcb = &l->l_addr->u_pcb;
!       struct trapframe *tf = (struct trapframe *)((u_int)l->l_addr + 
USPACE) - 1;
         struct callsframe *cf;
         extern int sret;
-----------


Also, with the latest set of changes, the kernel will not build on a vax.
Several things are wrong.
First of all, DEFS.h is missing. It can be copied from
lib/libc/arch/vax/DEFS.h to sys/lib/libkern/arch/vax

Second, sys/lib/libkern/libkern.h defines different functions, such as 
memcpy. This conflicts with the definitions in 
sys/arch/vax/include/macros.h, where these functions are declared as 
inline functions.

I have patches for this, but I'm not sure my solution really is the 
correct way to deal with it. (I'm just #if -ing things out if I'm 
building for VAX).

	Johnny

-- 
Johnny Billquist                  || "I'm on a bus
                                   ||  on a psychedelic trip
email: bqt@update.uu.se           ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol