Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Nov 2000 22:14:09 -0500 (EST)
From:      Daniel Eischen <eischen@vigrid.com>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        Jonathan Lemon <jlemon@flugsvamp.com>, arch@FreeBSD.org
Subject:   Re: Thread-specific data and KSEs
Message-ID:  <Pine.SUN.3.91.1001121220854.26351A-100000@pcnet1.pcnet.com>
In-Reply-To: <XFMail.001121171923.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 21 Nov 2000, John Baldwin wrote:
> On 22-Nov-00 Daniel Eischen wrote:
> > On Tue, 21 Nov 2000, John Baldwin wrote:
> >> 
> >> On 22-Nov-00 Daniel Eischen wrote:
> >> > Why can't we use a segment register?
> >> 
> >> %cs = code segment and is taken
> >> %ds = data segment and is taken
> >> %es = not sure, but bet it isn't safe
> >> %ss = stack, taken
> >> %fs = per-CPU data
> > 
> > Isn't this kernel-only?
> 
> I think so, but I would prefer that we use %gs if we go this route so that the
> same mechanism can be used both in and out of the kernel.  If that makes sense.

That's fine with me.

> >> %gs ?  as I mentioned in my other message, this one might be useful for
> >> addressing a structure of thread-local variables much like %fs is used for
> >> per-CPU data.  It also has value in that supposedly x86-64 (aka k64) has
> >> both
> >> %fs and %gs, but no other seg regs.
> > 
> > All I need is one.
> 
> Well, %gs would cover x86 and k64.  I think ia64 has several application
> registers that are available for OS use and we could steal one of those.  I'm
> not sure about the alpha though.

OK, I think we can use an S register.  These are suppose to
be call-safe, if I can believe sys/alpha/include/asm.h.  Any
alpha gurus care to respond?

--
"Some folks are into open source, but me, I'm into open bar."
                                          -- Spencer F. Katt


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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SUN.3.91.1001121220854.26351A-100000>