From owner-freebsd-alpha Mon Mar 11 4: 0:37 2002 Delivered-To: freebsd-alpha@freebsd.org Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by hub.freebsd.org (Postfix) with ESMTP id 2836737B405 for ; Mon, 11 Mar 2002 04:00:32 -0800 (PST) Received: (from uucp@localhost) by srv1.cosmo-project.de (8.11.6/8.11.6) with UUCP id g2BC0Sp89666; Mon, 11 Mar 2002 13:00:28 +0100 (CET) (envelope-from ticso@cicely8.cicely.de) Received: from cicely8.cicely.de (cicely8.cicely.de [10.1.1.10]) by cicely5.cicely.de (8.12.1/8.12.1) with ESMTP id g2BBqKEL046247; Mon, 11 Mar 2002 12:52:21 +0100 (CET)?g (envelope-from ticso@cicely8.cicely.de) Received: (from ticso@localhost) by cicely8.cicely.de (8.11.6/8.11.6) id g2BBqIh06159; Mon, 11 Mar 2002 12:52:18 +0100 (CET) (envelope-from ticso) Date: Mon, 11 Mar 2002 12:52:17 +0100 From: Bernd Walter To: Daniel Eischen Cc: alpha@FreeBSD.ORG Subject: Re: Tester needed Message-ID: <20020311115217.GI4295@cicely8.cicely.de> References: <3C631A1B.68E59BFE@vigrid.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3C631A1B.68E59BFE@vigrid.com> User-Agent: Mutt/1.3.26i X-Operating-System: FreeBSD cicely8.cicely.de 5.0-CURRENT i386 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 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? -- B.Walter COSMO-Project http://www.cosmo-project.de ticso@cicely.de Usergroup info@cosmo-project.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message