Rev 2606 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 2606 | Rev 2784 | ||
|---|---|---|---|
| Line 60... | Line 60... | ||
| 60 | ((uint64_t)(gdtselector(KDATA_DES) | PL_USER) << 48) | |
60 | ((uint64_t)(gdtselector(KDATA_DES) | PL_USER) << 48) | |
| 61 | ((uint64_t)(gdtselector(KTEXT_DES) | PL_KERNEL) << 32)); |
61 | ((uint64_t)(gdtselector(KTEXT_DES) | PL_KERNEL) << 32)); |
| 62 | write_msr(AMD_MSR_LSTAR, (uint64_t)syscall_entry); |
62 | write_msr(AMD_MSR_LSTAR, (uint64_t)syscall_entry); |
| 63 | /* Mask RFLAGS on syscall |
63 | /* Mask RFLAGS on syscall |
| 64 | * - disable interrupts, until we exchange the stack register |
64 | * - disable interrupts, until we exchange the stack register |
| 65 | * (mask the IE bit) |
65 | * (mask the IF bit) |
| - | 66 | * - clear DF so that the string instructions operate in |
|
| - | 67 | * the right direction |
|
| 66 | */ |
68 | */ |
| 67 | write_msr(AMD_MSR_SFMASK, 0x200); |
69 | write_msr(AMD_MSR_SFMASK, RFLAGS_IF | RFLAGS_DF); |
| 68 | } |
70 | } |
| 69 | 71 | ||
| 70 | /** @} |
72 | /** @} |
| 71 | */ |
73 | */ |