[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: %gs:0 thread pseudoregister in oskit-mach

From: Jeroen Dekkers
Subject: Re: %gs:0 thread pseudoregister in oskit-mach
Date: Sun, 21 Apr 2002 04:20:52 +0200
User-agent: Mutt/1.3.28i

On Sun, Apr 07, 2002 at 08:12:01PM -0400, Roland McGrath wrote:
> I have implemented the %gs:0 pseudo-register in oskit-mach.  If you are
> already using oskit-mach, please update and try out the new code.  What you
> should now see is that in user threads %gs has a different value from %ds.
> You should be able to read and write one and only one word at %gs:0.  This
> should initially read as zero in new threads, and be saved and restored by
> thread switching.

You forgot to make the page table entries also user accessible. Other
than that, everything works perfect. Thank you.

2002-04-21  Jeroen Dekkers  <jeroen@dekkers.cx>

        * i386/intel/pmap.c (pmap_bootstrap): Make page table entries
          accessible in user-mode.

Index: i386/intel/pmap.c
RCS file: /cvsroot/hurd/gnumach/i386/intel/pmap.c,v
retrieving revision
diff -u -p -r1.3.2.4 pmap.c
--- i386/intel/pmap.c   8 Apr 2002 00:09:43 -0000
+++ i386/intel/pmap.c   21 Apr 2002 02:19:17 -0000
@@ -717,7 +717,7 @@ void pmap_bootstrap()
                              extern char _start[], etext[];
-                             entry |= pa_to_pte(va) | INTEL_PTE_VALID;
+                             entry |= pa_to_pte(va) | INTEL_PTE_VALID | 
                              if ((va < (vm_offset_t)_start)
                                  || (va + INTEL_PGBYTES > (vm_offset_t)etext))
                                entry |= INTEL_PTE_WRITE;

Jeroen Dekkers
Jabber supporter - http://www.jabber.org Jabber ID: jdekkers@jabber.org
Debian GNU supporter - http://www.debian.org http://www.gnu.org
IRC: jeroen@openprojects

Attachment: pgptxcaRJpv66.pgp
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]