Ignore:
Timestamp:
2016-05-02T20:58:16Z (8 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7c4b26c
Parents:
6adb775f (diff), 5035ba05 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline, which has dltest and fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/src/proc/scheduler.c

    r6adb775f r32573ff  
    4242#include <arch/pm.h>
    4343#include <arch/ddi/ddi.h>
     44#include <arch/kseg_struct.h>
    4445
    4546/** Perform amd64 specific tasks needed before the new task is run.
     
    5556void before_thread_runs_arch(void)
    5657{
    57         CPU->arch.tss->rsp0 =
    58             (uintptr_t) &THREAD->kstack[STACK_SIZE];
    59        
    60         /*
    61          * Syscall support.
    62          */
    63         swapgs();
    64         write_msr(AMD_MSR_GS, (uintptr_t) THREAD->arch.syscall_rsp);
    65         swapgs();
    66        
    67         /* TLS support - set FS to thread local storage */
    68         write_msr(AMD_MSR_FS, THREAD->arch.tls);
     58        CPU->arch.tss->rsp0 = (uintptr_t) &THREAD->kstack[STACK_SIZE];
     59
     60        kseg_t *kseg = (kseg_t *) read_msr(AMD_MSR_GS_KERNEL); 
     61        kseg->kstack_rsp = THREAD->arch.kstack_rsp;
    6962}
    7063
Note: See TracChangeset for help on using the changeset viewer.