From 1fc867f1d7f0260975e82ab05e7f1016b9841622 Mon Sep 17 00:00:00 2001 From: Adrian-Ken Rueegsegger Date: Wed, 18 Feb 2015 00:40:03 +0100 Subject: [PATCH] hw_x86_64: Switch to client page tables After activating the client page tables the client context cannot be accessed any longer. The mode transition buffer however is globally mapped and can be used to restore the remaining 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 0883118b6..3bb669d37 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 @@ -115,6 +115,10 @@ popq %rsi popq %rbp + /* Switch page tables */ + mov CR3_OFFSET(%rax), %rax + mov %rax, %cr3 + 1: jmp 1b /* end of the mode transition code */