Date: Thu, 24 Feb 2000 08:57:39 +0000 (GMT) From: Doug Rabson <dfr@nlsystems.com> To: John Polstra <jdp@polstra.com> Cc: alpha@freebsd.org Subject: Re: pcb_onfault bug on alpha? Message-ID: <Pine.BSF.4.10.10002240856070.54384-100000@tecra.nlsystems.com> In-Reply-To: <200002240707.XAA39208@vashon.polstra.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 23 Feb 2000, John Polstra wrote: > In article <Pine.BSF.4.21.0002232018480.77743-100000@salmon.nlsystems.com>, > Doug Rabson <dfr@nlsystems.com> wrote: > > > This fix looks good. > > I thought so too, but it gave me an instant unaligned access panic > when I ran my test case against it. Here again is the code: > > LEAF(copyerr, 0) > LDGP(pv) > ldq ra, (16-8)(sp) /* restore ra. */ > lda sp, 16(sp) /* kill stack frame. */ > ldq t0, curproc > ldq t0, P_ADDR(t0) > stq zero, U_PCB_ONFAULT(t0) /* reset fault handler. */ > ldiq v0, EFAULT /* return EFAULT. */ > RET > END(copyerr) > > It is dying on the "ldq t0, curproc". I have a feeling the GP > register is wrong at that point. A0 (which usually contains the > faulting address) is not equal to curproc, and it is in fact unaligned > for a 64-bit load. I noticed that the other fault handler (fusufault) > doesn't have a LDGP(pv) at its beginning. Any ideas? I'm close to > the limit of my knowledge of the Alpha register usage conventions. The LDGP(pv) part is wrong. This only correctly loads the gp if pv contains the function address (true after a call using the standard calling conventions). Since gp will already be setup to the kernel's GOT, I think this instruction should be removed. -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 442 9037 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.10002240856070.54384-100000>