Clear the direction flag upon entry to the kernel.
This commit is contained in:
parent
f32baac73f
commit
c0a44e72a6
|
@ -73,6 +73,9 @@ nullpage: .global nullpage
|
||||||
.code32
|
.code32
|
||||||
_start:
|
_start:
|
||||||
__start:
|
__start:
|
||||||
|
# Clear the direction flag.
|
||||||
|
cld
|
||||||
|
|
||||||
# Initialize the stack pointer. The magic value is from kernel.cpp.
|
# Initialize the stack pointer. The magic value is from kernel.cpp.
|
||||||
movl $(stack + 65536), %esp # 64 KiB, see kernel.cpp (See below also)
|
movl $(stack + 65536), %esp # 64 KiB, see kernel.cpp (See below also)
|
||||||
|
|
||||||
|
|
|
@ -339,6 +339,7 @@ thread_exit_handler:
|
||||||
jmp interrupt_handler_prepare
|
jmp interrupt_handler_prepare
|
||||||
|
|
||||||
interrupt_handler_prepare:
|
interrupt_handler_prepare:
|
||||||
|
cld
|
||||||
movq $1, asm_is_cpu_interrupted
|
movq $1, asm_is_cpu_interrupted
|
||||||
|
|
||||||
pushq %r15
|
pushq %r15
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
.section .text
|
.section .text
|
||||||
.type syscall_handler, @function
|
.type syscall_handler, @function
|
||||||
syscall_handler:
|
syscall_handler:
|
||||||
|
cld
|
||||||
movl $0, errno
|
movl $0, errno
|
||||||
|
|
||||||
pushq %rbp
|
pushq %rbp
|
||||||
|
|
|
@ -54,6 +54,9 @@ nullpage: .global nullpage
|
||||||
.type __start, @function
|
.type __start, @function
|
||||||
_start:
|
_start:
|
||||||
__start:
|
__start:
|
||||||
|
# Clear the direction flag.
|
||||||
|
cld
|
||||||
|
|
||||||
# Initialize the stack pointer. The magic value is from kernel.cpp.
|
# Initialize the stack pointer. The magic value is from kernel.cpp.
|
||||||
movl $(stack + 65536), %esp # 64 KiB, see kernel.cpp
|
movl $(stack + 65536), %esp # 64 KiB, see kernel.cpp
|
||||||
|
|
||||||
|
|
|
@ -339,6 +339,7 @@ thread_exit_handler:
|
||||||
jmp interrupt_handler_prepare
|
jmp interrupt_handler_prepare
|
||||||
|
|
||||||
interrupt_handler_prepare:
|
interrupt_handler_prepare:
|
||||||
|
cld
|
||||||
movl $1, asm_is_cpu_interrupted
|
movl $1, asm_is_cpu_interrupted
|
||||||
|
|
||||||
# Check if an interrupt happened while having kernel permissions.
|
# Check if an interrupt happened while having kernel permissions.
|
||||||
|
|
|
@ -25,6 +25,8 @@
|
||||||
.type syscall_handler, @function
|
.type syscall_handler, @function
|
||||||
syscall_handler:
|
syscall_handler:
|
||||||
/* -- stack is 12 bytes from being 16-byte aligned -- */
|
/* -- stack is 12 bytes from being 16-byte aligned -- */
|
||||||
|
cld
|
||||||
|
|
||||||
movl $0, errno
|
movl $0, errno
|
||||||
|
|
||||||
pushl %ebp
|
pushl %ebp
|
||||||
|
|
Loading…
Reference in New Issue