1
0
Fork 0
mirror of https://github.com/hermitcore/libhermit.git synced 2025-03-09 00:00:03 +01:00

clear the DF flag to adhere the x86_64 ABI

This commit is contained in:
Stefan Lankes 2016-05-15 07:48:30 +02:00
parent 07fc5e2881
commit f838a751cf

View file

@ -114,6 +114,10 @@ start64:
mov fs, eax
mov gs, eax
; clear DF flag => default value by entering a function
; => see ABI
cld
; determine full image size
mov rax, kernel_end
sub rax, kernel_start
@ -464,6 +468,8 @@ isrsyscall:
global switch_context
align 16
switch_context:
; by entering a function the DF flag has to be cleared => see ABI
cld
; create on the stack a pseudo interrupt
; afterwards, we switch to the task with iret
push QWORD 0x10 ; SS