hw_x86_64: Adjust EFLAGS of prepared interrupt stack frame

Set I/O privilege level to 3 to allow core to perform port I/O from
userspace. Also make sure the IF flag is cleared for now until interrupt
handling is implemented.
This commit is contained in:
Adrian-Ken Rueegsegger 2015-02-20 11:10:51 +01:00 committed by Christian Helmuth
parent 40862a81eb
commit fe22858550

View File

@ -81,7 +81,12 @@
mov $_mt_buffer+BUFFER_SIZE, %rsp mov $_mt_buffer+BUFFER_SIZE, %rsp
pushq $0x23 pushq $0x23
pushq SP_OFFSET(%rax) pushq SP_OFFSET(%rax)
pushq $0x3000 /* XXX: Set Interrupt Enable flag */
/* Set I/O privilege level to 3 */
orq $0x3000, FLAGS_OFFSET(%rax)
btrq $9, FLAGS_OFFSET(%rax) /* XXX: Drop once interrupt handling is done */
pushq FLAGS_OFFSET(%rax)
pushq $0x1b pushq $0x1b
pushq (%rax) pushq (%rax)