Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Nov 2002 14:01:02 +0000
From:      Doug Rabson <dfr@nlsystems.com>
To:        Alfred Perlstein <bright@mu.org>
Cc:        Marcel Moolenaar <marcel@xcllnt.net>, Daniel Eischen <eischen@pcnet1.pcnet.com>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/lib/libc_r/arch/ia64 _atomic_lock.S
Message-ID:  <200211171401.02376.dfr@nlsystems.com>
In-Reply-To: <20021117131358.GK6882@elvis.mu.org>
References:  <20021116185125.GB618@dhcp01.pn.xcllnt.net> <200211171025.00359.dfr@nlsystems.com> <20021117131358.GK6882@elvis.mu.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sunday 17 November 2002 1:13 pm, Alfred Perlstein wrote:
> * Doug Rabson <dfr@nlsystems.com> [021117 02:25] wrote:
> > On Saturday 16 November 2002 7:58 pm, Marcel Moolenaar wrote:
> > > On Sat, Nov 16, 2002 at 02:13:19PM -0500, Daniel Eischen wrote:
> > > > On Sat, 16 Nov 2002, Marcel Moolenaar wrote:
> > > > > If you want me to send patches, let me know. I'm trying to
> > > > > figure out what to do now that the *context functions have
> > > > > been turned into syscalls. It complicates things...
> > > >
> > > > I'm working on converting libc_r to use *context() so don't
> > > > worry about doing it yourself.
> > >
> > > Cool!
> > >
> > > I hope to have the *context syscalls next week. I've decided to
> > > not attack the problem head on, because we don't have time to
> > > fix the infrastructure for it (we need to unwind to recreate the
> > > context). Instead, I hope to hack-up a workable solution from an
> > > ABI breaking change. The ABI breaker allows us to have
> > > lightweight syscalls, which we permanently want. So, doing that
> > > now is very attractive. The intend is to implement the *context
> > > syscalls as lightweight syscalls in a very hackish way. This
> > > serves as an experiment as well as solving an immediate problem.
> > > Let's hope it works out...
> >
> > So you intend to recognise the context calls in the syscall wrapper
> > and special-case them? This would work but it would also work for
> > heavyweight syscalls. I'm still worried about how you are going to
> > flush the user's register stack safely from kernel mode.
>
> I'm probably being dense, but doesn't the ABI specify behaviour
> such that one may not use stack space past the frame pointer
> (equivelant of ebp on i386) so this should be doable, right?
>
> Basically, as long as the frame pointer is moved before the
> space is used it's safe, right?

This is a bit different - I'm talking about the ia64's register stack,=20
as distinct from its normal stack. When switching from one thread to=20
another, you must flush any dirty registers into the old thread's=20
register stack backing memory. Doing this from kernel mode can be=20
tricky since the pages of backing memory might not be valid yet.

--=20
Doug Rabson=09=09=09=09Mail:  dfr@nlsystems.com
=09=09=09=09=09Phone: +44 20 8348 6160



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200211171401.02376.dfr>