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