Changes in kernel/arch/amd64/src/proc/scheduler.c [1a5eca4:9d58539] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/src/proc/scheduler.c
r1a5eca4 r9d58539 42 42 #include <arch/pm.h> 43 43 #include <arch/ddi/ddi.h> 44 #include <arch/kseg_struct.h>45 44 46 45 /** Perform amd64 specific tasks needed before the new task is run. … … 56 55 void before_thread_runs_arch(void) 57 56 { 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; 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); 62 69 } 63 70
Note:
See TracChangeset
for help on using the changeset viewer.