From ab9d7afa45b05a243355bf3b72d2f70857e00b83 Mon Sep 17 00:00:00 2001 From: Adrian-Ken Rueegsegger Date: Wed, 18 Feb 2015 00:41:56 +0100 Subject: [PATCH] hw_x86_64: Finally restore RAX client register value Set the stack to the mode transition buffer and pop the temporary copy of the RAX client value into the register. --- 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 3bb669d37..e8ca23d02 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 @@ -119,6 +119,10 @@ mov CR3_OFFSET(%rax), %rax mov %rax, %cr3 + /* Set stack back to mt buffer and restore client RAX */ + mov $_mt_buffer, %rsp + popq %rax + 1: jmp 1b /* end of the mode transition code */