Changeset 0dc2fec in mainline for kernel/arch/amd64/src/userspace.c


Ignore:
Timestamp:
2016-05-22T19:19:43Z (8 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b272c67a
Parents:
153c7a29 (diff), af2254ec (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 changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/src/userspace.c

    r153c7a29 r0dc2fec  
    4848void userspace(uspace_arg_t *kernel_uarg)
    4949{
    50         ipl_t ipl = interrupts_disable();
     50        uint64_t rflags = read_rflags();
    5151       
    52         ipl &= ~(RFLAGS_CF | RFLAGS_PF | RFLAGS_AF | RFLAGS_ZF | RFLAGS_SF |
    53             RFLAGS_DF | RFLAGS_OF);
     52        rflags &= ~RFLAGS_NT;
     53        rflags |= RFLAGS_IF;
    5454       
    5555        asm volatile (
    5656                "pushq %[udata_des]\n"
    5757                "pushq %[stack_top]\n"
    58                 "pushq %[ipl]\n"
     58                "pushq %[rflags]\n"
    5959                "pushq %[utext_des]\n"
    6060                "pushq %[entry]\n"
     
    6767                   [stack_top] "r" ((uint8_t *) kernel_uarg->uspace_stack +
    6868                       kernel_uarg->uspace_stack_size),
    69                    [ipl] "r" (ipl),
     69                   [rflags] "r" (rflags),
    7070                   [utext_des] "i" (GDT_SELECTOR(UTEXT_DES) | PL_USER),
    7171                   [entry] "r" (kernel_uarg->uspace_entry),
Note: See TracChangeset for help on using the changeset viewer.