Changes in kernel/arch/amd64/src/syscall.c [1d3d2cf:e13daa5d] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/src/syscall.c
r1d3d2cf re13daa5d 58 58 */ 59 59 write_msr(AMD_MSR_STAR, 60 ((uint64_t) (GDT_SELECTOR(KDATA_DES) | PL_USER) << 48) |61 ((uint64_t) (GDT_SELECTOR(KTEXT_DES) | PL_KERNEL) << 32));60 ((uint64_t)(gdtselector(KDATA_DES) | PL_USER) << 48) | 61 ((uint64_t)(gdtselector(KTEXT_DES) | PL_KERNEL) << 32)); 62 62 write_msr(AMD_MSR_LSTAR, (uint64_t)syscall_entry); 63 63 /* Mask RFLAGS on syscall … … 66 66 * - clear DF so that the string instructions operate in 67 67 * the right direction 68 * - clear NT to prevent a #GP should the flag proliferate to an IRET69 68 */ 70 write_msr(AMD_MSR_SFMASK, RFLAGS_IF | RFLAGS_DF | RFLAGS_NT);69 write_msr(AMD_MSR_SFMASK, RFLAGS_IF | RFLAGS_DF); 71 70 } 72 71
Note:
See TracChangeset
for help on using the changeset viewer.