From owner-freebsd-alpha Mon Mar 11 4:36:49 2002 Delivered-To: freebsd-alpha@freebsd.org Received: from mail.pcnet.com (pcnet1.pcnet.com [204.213.232.3]) by hub.freebsd.org (Postfix) with ESMTP id B6D5937B405 for ; Mon, 11 Mar 2002 04:36:33 -0800 (PST) Received: from localhost (eischen@localhost) by mail.pcnet.com (8.12.1/8.12.1) with ESMTP id g2BCaWDv005230; Mon, 11 Mar 2002 07:36:32 -0500 (EST) Date: Mon, 11 Mar 2002 07:36:32 -0500 (EST) From: Daniel Eischen To: Bernd Walter Cc: Daniel Eischen , alpha@FreeBSD.ORG Subject: Re: Tester needed In-Reply-To: <20020311115217.GI4295@cicely8.cicely.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Mon, 11 Mar 2002, Bernd Walter wrote: > On Thu, Feb 07, 2002 at 07:21:47PM -0500, Daniel Eischen wrote: > > I want to add the getsetcontext system call and am looking for an > > alpha tester to see if the code works. Diffs and a test program > > are at: > > > > http://people.freebsd.org/~deischen/ucontext/uc-sys.diffs > > http://people.freebsd.org/~deischen/ucontext/uc-libc.diffs > > http://people.freebsd.org/~deischen/ucontext/test_context.c > > > > Don't forget to regenerate the system calls before building > > a kernel. > > > > I've also got a question. Is the user stack stored in the PCB > > or does it have to be read from the PAL? If 'td' is the current > > thread, then how do we get and set the user stack? > > From uc-sys.diffs: > > > > +void > > +get_mcontext(struct thread *td, mcontext_t *mcp) > > +{ > > + > > + /* > > + * Use a trapframe for getsetcontext, so just copy the > > + * threads trapframe. > > + * > > + * XXX - Is there something that is missing from the saved > > + * trapframe? Like the stack pointer? > > + */ > > + bcopy(&td->td_frame, &mcp->mc_regs, sizeof(td->td_frame)); > > +#if 1 > > + mcp->mc_regs[FRAME_SP] = alpha_pal_rdusp(); > > +#else > > + mcp->mc_regs[FRAME_SP] = td->td_pcb->pcb_hw.apcb_usp; > > +#endif > > [...] > > > > And what if 'td' is not 'curthread'? Has it been saved in the > > PCB then? Should the above be: > > > > + if (td == curthread) > > + mcp->mc_regs[FRAME_SP] = alpha_pal_rdusp(); > > + else > > + mcp->mc_regs[FRAME_SP] = td->td_pcb->pcb_hw.apcb_usp; > > This one is old, but unreplied until now. > Do you still need testers? No, I'll have another patch soon that incorporates some comments from bde. I'll post that when I'm done. I could use an answer to the user stack question above though. -- Dan Eischen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message