diff --git a/repos/base-hw/src/core/include/spec/x86_64/idt.h b/repos/base-hw/src/core/include/spec/x86_64/idt.h index ac1353a41..f076e280b 100644 --- a/repos/base-hw/src/core/include/spec/x86_64/idt.h +++ b/repos/base-hw/src/core/include/spec/x86_64/idt.h @@ -17,7 +17,8 @@ class Genode::Idt private: enum { - SIZE_IDT = 256, + SIZE_IDT = 256, + SYSCALL_VEC = 0x80, }; /** diff --git a/repos/base-hw/src/core/spec/x86_64/idt.cc b/repos/base-hw/src/core/spec/x86_64/idt.cc index 18ab0f93f..9701305a2 100644 --- a/repos/base-hw/src/core/spec/x86_64/idt.cc +++ b/repos/base-hw/src/core/spec/x86_64/idt.cc @@ -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; }