mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-19 03:06:39 +00:00
hw_x86_64: Prepare interrupt stack frame in mode transition buffer
Setup an IA-32e interrupt stack frame in the mode transition buffer region. It will be used to perform the mode switch to userspace using the iret instruction. For detailed information about the IA-32e interrupt stack frame refer to Intel SDM Vol. 3A, figure 6-8.
This commit is contained in:
parent
4b7a5ced3b
commit
40862a81eb
@ -75,6 +75,16 @@
|
||||
|
||||
.global _mt_user_entry_pic
|
||||
_mt_user_entry_pic:
|
||||
|
||||
/* Prepare stack frame in mt buffer (Intel SDM Vol. 3A, figure 6-8) */
|
||||
mov _mt_client_context_ptr, %rax
|
||||
mov $_mt_buffer+BUFFER_SIZE, %rsp
|
||||
pushq $0x23
|
||||
pushq SP_OFFSET(%rax)
|
||||
pushq $0x3000 /* XXX: Set Interrupt Enable flag */
|
||||
pushq $0x1b
|
||||
pushq (%rax)
|
||||
|
||||
1: jmp 1b
|
||||
|
||||
/* end of the mode transition code */
|
||||
|
Loading…
Reference in New Issue
Block a user