kernel/x86_64: clear carry, nested task and trap flags on syscall entry
this is what's generally done on other OSes. Change-Id: I90f1a574172b8e020c9943468d2fd121e14dd062 Reviewed-on: https://review.haiku-os.org/c/haiku/+/4047 Tested-by: Commit checker robot <[email protected]> Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
committed by
Adrien Destugues
parent
55a7cd0a12
commit
addd392113
@@ -54,9 +54,10 @@ init_syscall_registers(void* dummy, int cpuNum)
|
||||
x86_write_msr(IA32_MSR_EFER, x86_read_msr(IA32_MSR_EFER)
|
||||
| IA32_MSR_EFER_SYSCALL);
|
||||
|
||||
// Flags to clear upon entry. Want interrupts disabled and the direction
|
||||
// flag cleared.
|
||||
// Flags to clear upon entry. Want interrupts disabled and the carry, trap,
|
||||
// nested task, direction and alignment check flags cleared.
|
||||
x86_write_msr(IA32_MSR_FMASK, X86_EFLAGS_INTERRUPT | X86_EFLAGS_DIRECTION
|
||||
| X86_EFLAGS_NESTED_TASK | X86_EFLAGS_CARRY | X86_EFLAGS_TRAP
|
||||
| X86_EFLAGS_ALIGNMENT_CHECK);
|
||||
|
||||
// Entry point address.
|
||||
|
||||
Reference in New Issue
Block a user