Changeset 37b451f7 in mainline for arch/amd64/src/syscall.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/syscall.c

    rdd4d6b0 r37b451f7  
    3535
    3636#include <print.h>
     37#include <arch/cpu.h>
    3738
    3839extern void syscall_entry(void);
     
    5556        write_msr(AMD_MSR_LSTAR, (__u64)syscall_entry);
    5657        /* Mask RFLAGS on syscall
    57          * - we do not care what is in the flags field
     58         * - disable interrupts, until we exchange the stack register
     59         *   (mask the IE bit)
    5860         */
    59         write_msr(AMD_MSR_SFMASK, 0);
     61        write_msr(AMD_MSR_SFMASK, 0x200);
    6062}
    6163
     
    6365__native syscall_handler(__native id, __native a1, __native a2, __native a3)
    6466{
     67        interrupts_enable();
    6568        if (id < SYSCALL_END)
    6669                return syscall_table[id](a1,a2,a3);
    6770        else
    6871                panic("Undefined syscall %d", id);
    69        
     72        interrupts_disable();
    7073}
Note: See TracChangeset for help on using the changeset viewer.