From 3d782282dbb5d7e68d696518758e6e2f631b7045 Mon Sep 17 00:00:00 2001 From: Adrian-Ken Rueegsegger Date: Fri, 20 Feb 2015 16:05:46 +0100 Subject: [PATCH] hw_x86_64: Switch to kernel page tables After switching to the kernel address space the client context region is accessible to store the client register values. --- repos/base-hw/src/core/spec/x86_64/mode_transition.s | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/repos/base-hw/src/core/spec/x86_64/mode_transition.s b/repos/base-hw/src/core/spec/x86_64/mode_transition.s index 55f16bb2b..86ecbf5d2 100644 --- a/repos/base-hw/src/core/spec/x86_64/mode_transition.s +++ b/repos/base-hw/src/core/spec/x86_64/mode_transition.s @@ -77,6 +77,10 @@ /* Copy client context RAX to buffer */ mov %rax, _mt_buffer + /* Switch to kernel page tables */ + mov _mt_master_context_begin+CR3_OFFSET, %rax + mov %rax, %cr3 + 1: jmp 1b .global _mt_user_entry_pic