hw_x86_64: Set dpl of syscall IDT entry to 3

Since this IDT entry is called from usermode the descriptor privilege
level must be 3.
This commit is contained in:
Adrian-Ken Rueegsegger 2015-02-20 16:48:31 +01:00 committed by Christian Helmuth
parent ed06c46233
commit 793b5264e3
2 changed files with 5 additions and 1 deletions

View File

@ -18,6 +18,7 @@ class Genode::Idt
enum {
SIZE_IDT = 256,
SYSCALL_VEC = 0x80,
};
/**

View File

@ -28,6 +28,9 @@ void Idt::setup()
_table[vec].offset_31_16 = (*isrs >> 16) & 0xffff;
_table[vec].offset_63_32 = (*isrs >> 32) & 0xffff;
}
/* Set DPL of syscall entry to 3 */
_table[SYSCALL_VEC].flags = _table[SYSCALL_VEC].flags | 0x6000;
}