hw_x86_64: Save info on interrupt stack to client context

As the kernel entry is called from the interrupt handler the stack
layout is as specified by Intel SDM Vol. 3A, figure 6-8. An additional
vector number is stored at the top of the stack.

Gather the necessary client information from the interrupt stack frame
and store it in the client context.
This commit is contained in:
Adrian-Ken Rueegsegger 2015-02-20 16:06:50 +01:00 committed by Christian Helmuth
parent 3d782282db
commit 1035efcf3f
1 changed files with 9 additions and 0 deletions

View File

@ -81,6 +81,15 @@
mov _mt_master_context_begin+CR3_OFFSET, %rax
mov %rax, %cr3
/* Save information on interrupt stack frame in client context */
mov _mt_client_context_ptr, %rax
popq TRAPNO_OFFSET(%rax)
popq ERRCODE_OFFSET(%rax)
popq (%rax)
popq FLAGS_OFFSET(%rax) /* Discard cs */
popq FLAGS_OFFSET(%rax)
popq SP_OFFSET(%rax)
1: jmp 1b
.global _mt_user_entry_pic