Subversion Repositories HelenOS-historic

Rev

Rev 1072 | Rev 1077 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1072 Rev 1074
Line 36... Line 36...
36
 
36
 
37
void before_thread_runs_arch(void)
37
void before_thread_runs_arch(void)
38
{
38
{
39
    CPU->arch.tss->rsp0 = (__address) &THREAD->kstack[THREAD_STACK_SIZE-SP_DELTA];
39
    CPU->arch.tss->rsp0 = (__address) &THREAD->kstack[THREAD_STACK_SIZE-SP_DELTA];
40
 
40
 
41
    /* Syscall support - write thread address to hidden part of gs */
41
    /* Syscall support - write thread stack address to hidden part of gs */
42
    swapgs();
42
    swapgs();
43
    write_msr(AMD_MSR_GS,
43
    write_msr(AMD_MSR_GS,
44
          (__u64)&THREAD->kstack);
44
          (__u64)&THREAD->kstack);
45
    swapgs();
45
    swapgs();
46
 
46