Ignore:
Timestamp:
Nov 16, 2008, 10:58:10 AM (11 years ago)
Author:
gb
Message:

Using i386_set_ldt() to point %fs at the tcr on 32-bit FreeBSD doesn't work
on a 64-bit kernel. Using i386_set_fsbase does work on both 32-bit and
64-bit kernels, but doesn't allow writing to %fs: at least by the time
we've called i386_set_fsbase() on thread startup, %fs contains an appropriate
selector and it never changes throughout the life of the thread.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/x86-spentry32.s

    r11315 r11370  
    42634263        __(push %ebp)
    42644264        __(box_fixnum(%eax,%esi))       /* put callback index in arg_y */
    4265         __(ref_global(get_tcr,%eax))
    4266         __(subl $12,%esp)               /* alignment */
    4267         __(push $1)                     /* stack now 16-byte aligned */
    4268         __(call *%eax)
    4269         __(addl $16,%esp)               /* discard arg, alignment words */
    4270         /* linear TCR addr now in %eax */
    4271         __(movw tcr.ldt_selector(%eax), %rcontext_reg)
     4265        __ifndef([FREEBSD])
     4266         __(ref_global(get_tcr,%eax))
     4267         __(subl $12,%esp)              /* alignment */
     4268         __(push $1)                    /* stack now 16-byte aligned */
     4269         __(call *%eax)
     4270         __(addl $16,%esp)              /* discard arg, alignment words */
     4271         /* linear TCR addr now in %eax */
     4272         __(movw tcr.ldt_selector(%eax), %rcontext_reg)
     4273        __endif
    42724274
    42734275        /* ebp is 16-byte aligned, and we've pushed 4 words.  Make
Note: See TracChangeset for help on using the changeset viewer.