From 51d515c77f793eae45832481c92d7fa0a24f52fd Mon Sep 17 00:00:00 2001 From: Adrian-Ken Rueegsegger Date: Tue, 17 Feb 2015 11:01:47 +0100 Subject: [PATCH] hw_x86_64: Explicitly set up segment selectors during boot --- repos/base-hw/src/core/spec/x86_64/kernel/crt0.s | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/repos/base-hw/src/core/spec/x86_64/kernel/crt0.s b/repos/base-hw/src/core/spec/x86_64/kernel/crt0.s index dfc7d1a6d..265478c91 100644 --- a/repos/base-hw/src/core/spec/x86_64/kernel/crt0.s +++ b/repos/base-hw/src/core/spec/x86_64/kernel/crt0.s @@ -63,6 +63,16 @@ .code64 _start64: .p2align MIN_PAGE_SIZE_LOG2 + /* + * Set up kernel segment selectors + */ + mov $0x10, %eax + mov %eax, %ss + mov %eax, %ds + mov %eax, %es + mov %eax, %fs + mov %eax, %gs + /* * Install initial temporary environment that is replaced later by the * environment that init_main_thread creates.