Changeset 37b451f7 in mainline for arch/amd64/src/proc/scheduler.c


Ignore:
Timestamp:
2006-02-07T02:22:44Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
65640fef
Parents:
dd4d6b0
Message:

Added (finally!) userspace to AMD64.
It does not work on Simics *$U&%&$&*#. Broken simics!!!
There should be probably LEA instead of MOV/ADD, but LEA does not
work in neither qemu nor bochs. Any other simulator to test? :-/

File:
1 edited

Legend:

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

    rdd4d6b0 r37b451f7  
    3232#include <arch.h>
    3333#include <arch/context.h>       /* SP_DELTA */
     34#include <arch/asm.h>
    3435
    3536void before_thread_runs_arch(void)
    3637{
    3738        CPU->arch.tss->rsp0 = (__address) &THREAD->kstack[THREAD_STACK_SIZE-SP_DELTA];
     39
     40        /* Syscall support - write thread address to hidden part of gs */
     41        swapgs();
     42        write_msr(AMD_MSR_GS,
     43                  (__u64)&THREAD->kstack);
     44        swapgs();
    3845}
Note: See TracChangeset for help on using the changeset viewer.